summaryrefslogtreecommitdiff
path: root/graphics/pgf
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf')
-rw-r--r--graphics/pgf/contrib/aiplans/Aiplans-Introduction.pdfbin0 -> 505453 bytes
-rw-r--r--graphics/pgf/contrib/aiplans/LICENSE.txt415
-rw-r--r--graphics/pgf/contrib/aiplans/README.md80
-rw-r--r--graphics/pgf/contrib/aiplans/README.pdfbin0 -> 67103 bytes
-rw-r--r--graphics/pgf/contrib/aiplans/tikzlibraryaiplans.code.tex121
-rw-r--r--graphics/pgf/contrib/argumentation/README.md2
-rw-r--r--graphics/pgf/contrib/argumentation/argumentation-doc.pdfbin275801 -> 570323 bytes
-rw-r--r--graphics/pgf/contrib/argumentation/argumentation-doc.tex1523
-rw-r--r--graphics/pgf/contrib/argumentation/argumentation.sty698
-rw-r--r--graphics/pgf/contrib/atableau/LICENSE417
-rw-r--r--graphics/pgf/contrib/atableau/README.md44
-rw-r--r--graphics/pgf/contrib/atableau/atableau.ini13
-rw-r--r--graphics/pgf/contrib/atableau/atableau.pdfbin0 -> 846663 bytes
-rw-r--r--graphics/pgf/contrib/atableau/atableau.sty3394
-rw-r--r--graphics/pgf/contrib/atableau/atableau.tex4441
-rw-r--r--graphics/pgf/contrib/circuitikz/README.md8
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/changelog.tex101
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin13862 -> 13873 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin2422724 -> 2482881 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex494
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/ctikzmanutils.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4-body.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6-body.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7-body.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3-body.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3-body.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6-body.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0-body.tex112
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2-body.tex112
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7-body.tex112
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6-body.tex112
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6.sty8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty12
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex262
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex371
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex59
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex14
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex355
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex32
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex8
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex22
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.0.tex112
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.1.2.tex112
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.2.7.tex112
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.4.6.tex112
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex12
-rw-r--r--graphics/pgf/contrib/dynkin-diagrams/README4
-rw-r--r--graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.bib64
-rw-r--r--graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdfbin894840 -> 909020 bytes
-rw-r--r--graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty240
-rw-r--r--graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex96
-rw-r--r--graphics/pgf/contrib/euclidean-lattice/README.md8
-rw-r--r--graphics/pgf/contrib/euclidean-lattice/euclidean-lattice-doc.pdfbin0 -> 263747 bytes
-rw-r--r--graphics/pgf/contrib/euclidean-lattice/euclidean-lattice.dtx695
-rw-r--r--graphics/pgf/contrib/euclidean-lattice/euclidean-lattice.ins23
-rw-r--r--graphics/pgf/contrib/fancyqr/README.md43
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-doc.pdfbin247479 -> 263629 bytes
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-doc.tex26
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code6
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code2
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-style-flat.code1
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr-style-swift.code2
-rw-r--r--graphics/pgf/contrib/fancyqr/fancyqr.sty136
-rw-r--r--graphics/pgf/contrib/fancyqr/qr-example.tex12
-rw-r--r--graphics/pgf/contrib/fancyqr/qr-minimal.tex12
-rw-r--r--graphics/pgf/contrib/lie-hasse/README4
-rw-r--r--graphics/pgf/contrib/lie-hasse/lie-hasse.pdfbin573306 -> 631841 bytes
-rw-r--r--graphics/pgf/contrib/lie-hasse/lie-hasse.sty1048
-rw-r--r--graphics/pgf/contrib/lie-hasse/lie-hasse.tex150
-rw-r--r--graphics/pgf/contrib/luatikz/README.txt9
-rw-r--r--graphics/pgf/contrib/luatikz/example/bezier2.lua11
-rw-r--r--graphics/pgf/contrib/luatikz/example/bezier3a.lua12
-rw-r--r--graphics/pgf/contrib/luatikz/example/bezier3b.lua32
-rw-r--r--graphics/pgf/contrib/luatikz/example/blinea.lua23
-rw-r--r--graphics/pgf/contrib/luatikz/example/circle.lua12
-rw-r--r--graphics/pgf/contrib/luatikz/example/curvea.lua14
-rw-r--r--graphics/pgf/contrib/luatikz/example/curveb.lua16
-rw-r--r--graphics/pgf/contrib/luatikz/example/ellipse.lua14
-rw-r--r--graphics/pgf/contrib/luatikz/example/ellipseArc.lua18
-rw-r--r--graphics/pgf/contrib/luatikz/example/immute1.lua4
-rw-r--r--graphics/pgf/contrib/luatikz/example/immute2.lua6
-rw-r--r--graphics/pgf/contrib/luatikz/example/intro.lua8
-rw-r--r--graphics/pgf/contrib/luatikz/example/linea.lua7
-rw-r--r--graphics/pgf/contrib/luatikz/example/lineb.lua9
-rw-r--r--graphics/pgf/contrib/luatikz/example/linec.lua7
-rw-r--r--graphics/pgf/contrib/luatikz/example/lined.lua15
-rw-r--r--graphics/pgf/contrib/luatikz/example/nodea.lua12
-rw-r--r--graphics/pgf/contrib/luatikz/example/nodeb.lua18
-rw-r--r--graphics/pgf/contrib/luatikz/example/plota.lua14
-rw-r--r--graphics/pgf/contrib/luatikz/example/polylinea.lua11
-rw-r--r--graphics/pgf/contrib/luatikz/example/radon1.lua119
-rw-r--r--graphics/pgf/contrib/luatikz/example/recta.lua21
-rw-r--r--graphics/pgf/contrib/luatikz/example/shadea.lua9
-rw-r--r--graphics/pgf/contrib/luatikz/example/sierpinski.lua41
-rw-r--r--graphics/pgf/contrib/luatikz/example/spiral.lua16
-rw-r--r--graphics/pgf/contrib/luatikz/example/stylea.lua19
-rw-r--r--graphics/pgf/contrib/luatikz/example/superEllipse.lua22
-rw-r--r--graphics/pgf/contrib/luatikz/luatikz.lua1999
-rw-r--r--graphics/pgf/contrib/luatikz/luatikz.pdfbin0 -> 112753 bytes
-rw-r--r--graphics/pgf/contrib/luatikz/luatikz.sty5
-rw-r--r--graphics/pgf/contrib/luatikz/luatikz.tex204
-rw-r--r--graphics/pgf/contrib/maritime/LICENSE21
-rw-r--r--graphics/pgf/contrib/maritime/README.md39
-rw-r--r--graphics/pgf/contrib/maritime/doc/maritime-doc.pdfbin0 -> 45057 bytes
-rw-r--r--graphics/pgf/contrib/maritime/doc/maritime-doc.tex160
-rw-r--r--graphics/pgf/contrib/maritime/tex/maritime.sty671
-rw-r--r--graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdfbin504537 -> 1039619 bytes
-rw-r--r--graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex41
-rw-r--r--graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty141
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/README60
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DiscY.tex8
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex2
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_O.tex33
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex6
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TipsTricks.tex58
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TitleLegend.tex50
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Z.tex1
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex28
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_decSep.tex24
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_density.tex18
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_exerciselayout.tex2
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex114
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex16
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_name.tex2
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_periodgroup.tex58
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_variations.tex2
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_user_compactPT.pdfbin0 -> 22638 bytes
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_1.pdfbin0 -> 72614 bytes
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_1.tex10
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_2.pdfbin0 -> 81563 bytes
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_2.tex10
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_3.pdfbin0 -> 73825 bytes
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_3.tex17
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_fonts.pdfbin0 -> 101435 bytes
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_fonts.tex105
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex34
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTable.sty507
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.pdfbin7457011 -> 8113922 bytes
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.tex145
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgfPT.backcolors.keys.tex57
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgfPT.buildcell.tex23
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgfPT.colorSchemes.info.pdfbin111753 -> 127186 bytes
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgfPT.data.tex239
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex58
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgfPT.formatNumbers.tex26
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgfPT.names.tex20
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/translations/pgfPT.lang.zh.tex269
-rw-r--r--graphics/pgf/contrib/pgf-spectra/README29
-rw-r--r--graphics/pgf/contrib/pgf-spectra/pgf-spectra.data.LSE.tex20
-rw-r--r--graphics/pgf/contrib/pgf-spectra/pgf-spectra.sty13
-rw-r--r--graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.pdfbin2384961 -> 2388018 bytes
-rw-r--r--graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.tex22
-rw-r--r--graphics/pgf/contrib/pgfgantt/README17
-rw-r--r--graphics/pgf/contrib/pgfgantt/pgfgantt-doc.pdfbin0 -> 661617 bytes
-rw-r--r--graphics/pgf/contrib/pgfgantt/pgfgantt.dtx348
-rw-r--r--graphics/pgf/contrib/pgfgantt/pgfgantt.ins11
-rw-r--r--graphics/pgf/contrib/pgfgantt/pgfgantt.pdfbin941473 -> 0 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/README.md12
-rw-r--r--graphics/pgf/contrib/pgfornament-han/beamerthemeHeavenlyClouds.sty26
-rw-r--r--graphics/pgf/contrib/pgfornament-han/beamerthemeTianQing.sty20
-rw-r--r--graphics/pgf/contrib/pgfornament-han/beamerthemeXiaoshan.sty5
-rw-r--r--graphics/pgf/contrib/pgfornament-han/heavenlyclouds-sample.pdfbin224881 -> 0 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.pdfbin1349245 -> 2158775 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.tex130
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/Cloud_types_en.pdfbin0 -> 149685 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/SiO2.jpgbin0 -> 20587 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/hangzhou-arch.jpgbin0 -> 289509 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-beamer-sample.pdfbin0 -> 221073 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-beamer-sample.tex (renamed from graphics/pgf/contrib/pgfornament-han/heavenlyclouds-sample.tex)10
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-poster-sample.pdfbin0 -> 261027 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-poster-sample.tex128
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/sample-refs.bib35
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/tianqing-beamer-sample.pdfbin0 -> 111508 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/tianqing-beamer-sample.tex (renamed from graphics/pgf/contrib/pgfornament-han/tianqing-sample.tex)11
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/tianqing-poster-sample.pdfbin0 -> 126209 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/tianqing-poster-sample.tex131
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-beamer-sample.pdfbin0 -> 54780 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-beamer-sample.tex (renamed from graphics/pgf/contrib/pgfornament-han/xiaoshan-sample.tex)1
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-poster-sample.pdfbin0 -> 375507 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-poster-sample.tex111
-rw-r--r--graphics/pgf/contrib/pgfornament-han/tianqing-sample.pdfbin116465 -> 0 bytes
-rw-r--r--graphics/pgf/contrib/pgfornament-han/xiaoshan-sample.pdfbin39913 -> 0 bytes
-rw-r--r--graphics/pgf/contrib/pgfplotsthemebeamer/DEPENDS.txt3
-rw-r--r--graphics/pgf/contrib/pgfplotsthemebeamer/README.md39
-rw-r--r--graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc-settings.sty200
-rw-r--r--graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.pdfbin0 -> 150527 bytes
-rw-r--r--graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.tex119
-rw-r--r--graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer.sty37
-rw-r--r--graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.pdfbin743791 -> 778044 bytes
-rw-r--r--graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.tex66
-rw-r--r--graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.pdfbin781013 -> 818213 bytes
-rw-r--r--graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.tex89
-rw-r--r--graphics/pgf/contrib/pixelarttikz/doc/testlist.csv4
-rw-r--r--graphics/pgf/contrib/pixelarttikz/tex/PixelArtTikz.sty316
-rw-r--r--graphics/pgf/contrib/pmdraw/README.md74
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-1.tex36
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-10.tex37
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-11.tex37
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-12.tex101
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-13.tex126
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-14.tex76
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-15.tex76
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-16.tex127
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-17.tex70
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-18.tex52
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-19.tex53
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-2.tex39
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-20.tex171
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-21.tex183
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-22.tex179
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-23.tex179
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-24.tex160
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-25.tex63
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-3.tex53
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-4.tex77
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-5.tex118
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-6.tex55
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-7.tex63
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-8.tex63
-rw-r--r--graphics/pgf/contrib/pmdraw/examples/example-9.tex37
-rw-r--r--graphics/pgf/contrib/pmdraw/pmdraw.pdfbin0 -> 428079 bytes
-rw-r--r--graphics/pgf/contrib/pmdraw/pmdraw.sty2487
-rw-r--r--graphics/pgf/contrib/pmdraw/pmdraw.tex4030
-rw-r--r--graphics/pgf/contrib/polyomino/README.md25
-rw-r--r--graphics/pgf/contrib/polyomino/polyomino.pdfbin0 -> 109235 bytes
-rw-r--r--graphics/pgf/contrib/polyomino/polyomino.sty286
-rw-r--r--graphics/pgf/contrib/polyomino/polyomino.tex278
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.pdfbin17705 -> 17819 bytes
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.tex2
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.pdfbin25368 -> 25473 bytes
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.tex2
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.pdfbin23829 -> 23820 bytes
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.tex2
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdfbin570243 -> 570343 bytes
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex10
-rw-r--r--graphics/pgf/contrib/profsio/tex/ProfSio.sty55
-rw-r--r--graphics/pgf/contrib/prooftrees/README39
-rw-r--r--graphics/pgf/contrib/prooftrees/README.md66
-rw-r--r--graphics/pgf/contrib/prooftrees/manifest.txt54
-rw-r--r--graphics/pgf/contrib/prooftrees/prooftrees.pdfbin911388 -> 1172076 bytes
-rw-r--r--graphics/pgf/contrib/prooftrees/prooftrees.sty73
-rw-r--r--graphics/pgf/contrib/prooftrees/prooftrees.tex346
-rw-r--r--graphics/pgf/contrib/prooftrees/prooftrees_biber.bib9
-rw-r--r--graphics/pgf/contrib/sankey/README2
-rw-r--r--graphics/pgf/contrib/sankey/sankey.dtx1577
-rw-r--r--graphics/pgf/contrib/sankey/sankey.ins8
-rw-r--r--graphics/pgf/contrib/sankey/sankey.pdfbin990719 -> 864728 bytes
-rw-r--r--graphics/pgf/contrib/spath3/README.txt (renamed from graphics/pgf/contrib/spath3/README)2
-rw-r--r--graphics/pgf/contrib/spath3/spath3.pdfbin441114 -> 446012 bytes
-rw-r--r--graphics/pgf/contrib/spath3/spath3.tex63
-rw-r--r--graphics/pgf/contrib/spath3/spath3_code.dtx127
-rw-r--r--graphics/pgf/contrib/spath3/spath3_code.pdfbin833596 -> 840527 bytes
-rw-r--r--graphics/pgf/contrib/sunpath/README.md60
-rw-r--r--graphics/pgf/contrib/sunpath/horizontal-coordinate.pdfbin0 -> 10978 bytes
-rw-r--r--graphics/pgf/contrib/sunpath/horizontal-coordinate.tex183
-rw-r--r--graphics/pgf/contrib/sunpath/releasenote.txt2
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.article.pdfbin0 -> 139319 bytes
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.article.tex39
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.docpart.tex447
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.dtx353
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.equidistance.pdfbin0 -> 13336 bytes
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.equidistance.tex36
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.ins62
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.pdfbin0 -> 225108 bytes
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.scrartcl.pdfbin0 -> 130301 bytes
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.scrartcl.tex39
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.spherical.pdfbin0 -> 13314 bytes
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.spherical.tex36
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.tex61
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.track.pdfbin0 -> 15315 bytes
-rw-r--r--graphics/pgf/contrib/sunpath/sunpath.track.tex56
-rw-r--r--graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.pdfbin450025 -> 467295 bytes
-rw-r--r--graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.tex325
-rw-r--r--graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.pdfbin451134 -> 454128 bytes
-rw-r--r--graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.tex26
-rw-r--r--graphics/pgf/contrib/tangramtikz/tex/TangramTikz.sty39
-rw-r--r--graphics/pgf/contrib/tikz-bpmn/README.md10
-rw-r--r--graphics/pgf/contrib/tikz-bpmn/tikz-bpmn-doc.pdfbin0 -> 53303 bytes
-rw-r--r--graphics/pgf/contrib/tikz-bpmn/tikz-bpmn-doc.tex333
-rw-r--r--graphics/pgf/contrib/tikz-bpmn/tikzlibrarybpmn.code.tex1031
-rw-r--r--graphics/pgf/contrib/tikz-decofonts/README.md8
-rw-r--r--graphics/pgf/contrib/tikz-decofonts/doc/tikz-decofonts-doc.pdfbin0 -> 190252 bytes
-rw-r--r--graphics/pgf/contrib/tikz-decofonts/doc/tikz-decofonts-doc.tex469
-rw-r--r--graphics/pgf/contrib/tikz-decofonts/doc/tkzbrushA.pdfbin0 -> 17239 bytes
-rw-r--r--graphics/pgf/contrib/tikz-decofonts/doc/tkzbrushA.tex11
-rw-r--r--graphics/pgf/contrib/tikz-decofonts/tex/tikz-decofonts.sty1008
-rw-r--r--graphics/pgf/contrib/tikz-triminos/README.md6
-rw-r--r--graphics/pgf/contrib/tikz-triminos/doc/tikz-triminos-doc.pdfbin0 -> 166166 bytes
-rw-r--r--graphics/pgf/contrib/tikz-triminos/doc/tikz-triminos-doc.tex368
-rw-r--r--graphics/pgf/contrib/tikz-triminos/tex/tikz-triminos.sty179
-rw-r--r--graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdfbin605728 -> 745046 bytes
-rw-r--r--graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex159
-rw-r--r--graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty259
-rw-r--r--graphics/pgf/contrib/tikzbricks/README.md8
-rw-r--r--graphics/pgf/contrib/tikzbricks/tikzbricks-doc-settings.sty70
-rw-r--r--graphics/pgf/contrib/tikzbricks/tikzbricks-doc.pdfbin245454 -> 246736 bytes
-rw-r--r--graphics/pgf/contrib/tikzbricks/tikzbricks-doc.tex21
-rw-r--r--graphics/pgf/contrib/tikzbricks/tikzbricks.sty115
-rw-r--r--graphics/pgf/contrib/tikzdotncross/README.md8
-rw-r--r--graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.pdfbin242343 -> 244545 bytes
-rw-r--r--graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex40
-rw-r--r--graphics/pgf/contrib/tikzdotncross/latex/tikzdotncross.sty89
-rw-r--r--graphics/pgf/contrib/tikzducks/README.md8
-rw-r--r--graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv62
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty91
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks-doc.pdfbin412000 -> 404360 bytes
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks-doc.tex180
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks-generic.tex1843
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks-plain.tex61
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzducks.sty1870
-rw-r--r--graphics/pgf/contrib/tikzducks/tikzlibraryducks.code.tex4
-rw-r--r--graphics/pgf/contrib/tikzlings/DEPENDS.txt4
-rw-r--r--graphics/pgf/contrib/tikzlings/README.md27
-rw-r--r--graphics/pgf/contrib/tikzlings/README.pdfbin0 -> 50623 bytes
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlibrarytikzlings.code.tex6
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-addons.sty395
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty93
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-apes.sty401
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bats.sty92
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bears.sty122
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bees.sty101
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty130
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-cats.sty100
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty106
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty193
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-doc-settings.sty159
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-doc.pdfbin712813 -> 832243 bytes
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-doc.tex412
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty103
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty123
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty84
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-list.sty4
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty112
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-meerkats.sty340
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-mice.sty72
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-moles.sty110
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-owls.sty52
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty78
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty70
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty112
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty123
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty117
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty181
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty101
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty110
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings-wolves.sty74
-rw-r--r--graphics/pgf/contrib/tikzlings/tikzlings.sty8
-rw-r--r--graphics/pgf/contrib/tikzmarmots/README.md8
-rw-r--r--graphics/pgf/contrib/tikzmarmots/tikzlibrarymarmots.code.tex2
-rw-r--r--graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc-settings.sty71
-rw-r--r--graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.pdfbin208537 -> 213788 bytes
-rw-r--r--graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.tex22
-rw-r--r--graphics/pgf/contrib/tikzmarmots/tikzmarmots-v1.sty2
-rw-r--r--graphics/pgf/contrib/tikzmarmots/tikzmarmots.sty4
-rw-r--r--graphics/pgf/contrib/tikzpingus/README.md8
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-bee.lib.tex64
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-christmas.lib.tex153
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-cloak.lib.tex78
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-devil.lib.tex90
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-doc.pdfbin4982285 -> 5161674 bytes
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-doc.tex425
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-emotions.lib.tex56
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-flags.lib.tex45
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-formal.lib.tex116
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-fun.lib.tex309
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-glasses.lib.tex105
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-hats.lib.tex173
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-horse.lib.tex229
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-magic.lib.tex14
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-medieval.lib.tex205
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-movement.lib.tex75
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-safe.lib.tex30
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-science-fiction.lib.tex190
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-shirts.lib.tex63
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-signs.lib.tex53
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-sport.lib.tex79
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus-technology.lib.tex126
-rw-r--r--graphics/pgf/contrib/tikzpingus/tikzpingus.sty2470
-rw-r--r--graphics/pgf/contrib/tikzquads/README.md3
-rw-r--r--graphics/pgf/contrib/tikzquads/doc/tikzquads.pdfbin500087 -> 499653 bytes
-rw-r--r--graphics/pgf/contrib/tikzquads/doc/tikzquads.tex20
-rw-r--r--graphics/pgf/contrib/tikzquads/latex/tikzquads.sty27
-rw-r--r--graphics/pgf/contrib/timechart/README.md16
-rw-r--r--graphics/pgf/contrib/timechart/timechart-doc.pdfbin0 -> 797483 bytes
-rw-r--r--graphics/pgf/contrib/timechart/timechart.dtx3458
-rw-r--r--graphics/pgf/contrib/timechart/timechart.ins38
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-en.pdfbin0 -> 1232028 bytes
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-en.tex1807
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.pdfbin676340 -> 1414695 bytes
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.tex1132
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-examples-integrals.pdfbin0 -> 141889 bytes
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-examples-integrals.tex251
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-exemples-integrales.pdfbin0 -> 141384 bytes
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-exemples-integrales.tex251
-rw-r--r--graphics/pgf/contrib/tkz-grapheur/tex/tkz-grapheur.sty3858
-rw-r--r--graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.pdfbin284742 -> 289282 bytes
-rw-r--r--graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.tex12
-rw-r--r--graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.pdfbin286185 -> 290612 bytes
-rw-r--r--graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.tex12
-rw-r--r--graphics/pgf/contrib/trivialpursuit/tex/TrivialPursuit.sty857
-rw-r--r--graphics/pgf/contrib/wheelchart/README.md6
-rw-r--r--graphics/pgf/contrib/wheelchart/wheelchart.pdfbin1198147 -> 1198402 bytes
-rw-r--r--graphics/pgf/contrib/wheelchart/wheelchart.sty330
-rw-r--r--graphics/pgf/contrib/wheelchart/wheelchart.tex21
-rw-r--r--graphics/pgf/contrib/wordle/README.md41
-rw-r--r--graphics/pgf/contrib/wordle/doc/wordle-doc-en.pdfbin284036 -> 0 bytes
-rw-r--r--graphics/pgf/contrib/wordle/doc/wordle-doc-en.tex426
-rw-r--r--graphics/pgf/contrib/wordle/doc/wordle-doc-fr.pdfbin279989 -> 0 bytes
-rw-r--r--graphics/pgf/contrib/wordle/doc/wordle-doc-fr.tex422
-rw-r--r--graphics/pgf/contrib/wordle/tex/wordle.sty298
-rw-r--r--graphics/pgf/contrib/wordle/wordle-doc-en.pdfbin0 -> 266174 bytes
-rw-r--r--graphics/pgf/contrib/wordle/wordle-doc-en.tex921
-rw-r--r--graphics/pgf/contrib/wordle/wordle-doc-fr.pdfbin0 -> 264372 bytes
-rw-r--r--graphics/pgf/contrib/wordle/wordle-doc-fr.tex767
-rw-r--r--graphics/pgf/contrib/wordle/wordle.sty670
430 files changed, 59370 insertions, 12082 deletions
diff --git a/graphics/pgf/contrib/aiplans/Aiplans-Introduction.pdf b/graphics/pgf/contrib/aiplans/Aiplans-Introduction.pdf
new file mode 100644
index 0000000000..9c8cc89460
--- /dev/null
+++ b/graphics/pgf/contrib/aiplans/Aiplans-Introduction.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/aiplans/LICENSE.txt b/graphics/pgf/contrib/aiplans/LICENSE.txt
new file mode 100644
index 0000000000..4db9b5af29
--- /dev/null
+++ b/graphics/pgf/contrib/aiplans/LICENSE.txt
@@ -0,0 +1,415 @@
+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/graphics/pgf/contrib/aiplans/README.md b/graphics/pgf/contrib/aiplans/README.md
new file mode 100644
index 0000000000..7e50eef9c0
--- /dev/null
+++ b/graphics/pgf/contrib/aiplans/README.md
@@ -0,0 +1,80 @@
+# <aiplans>: A TikZ-Based Library for Drawing POCL Plans
+
+<aiplans> is a specialized LaTeX package designed to assist scientists, students, and professionals in creating high-quality graphical representations, particularly Partial Order Causal Link (POCL) plans. Built on the robust TikZ framework, this library simplifies the process of generating complex, precise diagrams that are essential for academic and scientific communication. Our package is especially useful in fields such as artificial intelligence and automated planned, where visualizing causal relationships and dependencies is fundamental.
+
+## Content
+
+- [Project Structure](#project-structure)
+- [License](#license)
+- [Future Improvements Plan](#future-improvements-plan)
+- [Contact Information](#contact-information)
+- [Team Members](#team-members)
+
+## Project Structure
+
+Aiplans/
+
+├── **README.md**
+
+├── **README.pdf**
+
+├── **Aiplans-Introdution-source-code.zip**
+
+├── **Aiplans-Introdution.pdf**
+
+├── **tikzlibraryaiplans.code.tex**
+
+└── **License.txt**
+
+
+### Explanation
+
+- **README**: This file provides an overview of the project, including installation instructions, system requirements, and other essential information.
+- **Aiplans-Introdution-source-code.zip**: Introduction file Latex source code.
+- **Aiplans-Introdution.pdf**: Detailed instructions on how to use the TikZ library included in this package. It covers the steps needed to generate diagrams using LaTeX.
+- **tikzlibraryaiplans.code.tex**: The core of the project, this file contains the TikZ library specifically designed for generating AI plan diagrams. This package is crucial for the functionality provided by this project.
+- **License.txt**: The license file outlines the terms under which the package can be used, modified, and distributed.
+
+
+## License
+
+This material is subject to the [LaTeX Project Public License 1.3c](https://ctan.org/license/lppl1.3).
+
+## Future Improvements Plan
+
+As we continue to improve and expand the `<aiplans>` package, the following developments are planned for the upcoming future:
+
+### In Scope
+
+1. **Extension Features for v1.0**:
+ - **Vertical Diagram Support**: We aim to enhance the package by introducing the ability to create vertical diagrams, which will provide more flexibility in visualizing POCL plans.
+ - **Dynamic Precondition/Effect Lengths**: After the package update, the lengths of the lines will be automatically adjusted based on the actual length of the text labels. In other words, if the label's text content is longer, the corresponding line will also be lengthened; if the label's text content is shorter, the line will be shortened accordingly. This dynamic adjustment allows the diagram to more flexibly adapt to various content requirements, resulting in a final diagram that is more visually appealing and clear.
+
+2. **Code Translator**:
+ - **PDDL/HDDL Code Translation**: We are developing a code translator that can accurately convert PDDL (Planning Domain Definition Language) and HDDL (Hierarchical Domain Definition Language) code into the schema format used by our `<aiplans>` library. This feature will streamline the process of diagram creation from existing codebases or at least allow to specify the tikz code in another syntax that might be more familiar to some.
+
+## Contact Information
+
+If you have any questions, feedback, or suggestions regarding this project, please feel free to reach out to us. We are always happy to assist and appreciate your input.
+
+**Email:** [u7166251@anu.edu.au](mailto:u7166251@anu.edu.au) (Yikai Ge)
+For reporting bugs or requesting features.
+
+We strive to respond to all inquiries as quickly as possible.
+
+## Team Members
+
+This project is developed by a team of students from the Australian National University (ANU), guided by our client. He provided us with the initial idea and relevant references, playing a crucial role in shaping the direction of our research.
+
+### Client
+- **Pascal Bercher**
+
+### Maintainers
+- **Yikai Ge**
+- **Chen Wang**
+- **Cheng Zhou**
+- **Lujia Li**
+- **Yinyin Chen**
+- **Xinni Song**
+
+We have worked closely with our client to ensure that the project meets their requirements and delivers high-quality results.
diff --git a/graphics/pgf/contrib/aiplans/README.pdf b/graphics/pgf/contrib/aiplans/README.pdf
new file mode 100644
index 0000000000..cca41d75a7
--- /dev/null
+++ b/graphics/pgf/contrib/aiplans/README.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/aiplans/tikzlibraryaiplans.code.tex b/graphics/pgf/contrib/aiplans/tikzlibraryaiplans.code.tex
new file mode 100644
index 0000000000..5b6d23860c
--- /dev/null
+++ b/graphics/pgf/contrib/aiplans/tikzlibraryaiplans.code.tex
@@ -0,0 +1,121 @@
+\ProvidesPackage{aiplan}
+\RequirePackage{tikz}
+\RequirePackage{listofitems}
+\usetikzlibrary{calc}
+\usetikzlibrary{decorations.pathreplacing, decorations.markings}
+
+
+\tikzset{
+ action/.style n args={8}{
+ draw,
+ minimum width=3cm,
+ fill=blue,
+ rounded corners,
+ minimum height={max(#1,#2)*\baseHeight cm + 0.5*\baseHeight cm},
+ label={center:#7},
+ append after command={
+ \pgfextra{
+ % Define the node name
+ \edef\nodename{\tikzlastnode}
+ \ifx#3\empty % Check if label list is empty
+ \else % Process only if not empty
+ % Read the label content
+ \setsepchar{,}
+ \readlist\nameparts{\nodename}
+ \setsepchar{,}
+
+ \ifnum#8=0\relax
+ % Define positions for preconditions and effects relative to the node with shifts
+ \ifnum#1>0
+ \readlist\labellist{#3}
+ \foreach \i in {1,...,#1} {
+ % Precondition coordinates and lines
+ \coordinate (\nodename-pre-\i) at ([xshift=-#5cm, yshift=(-\i + (#1)/2+0.25) * \baseHeight cm] \nodename.west);
+ \draw (\nodename.west |- \nodename-pre-\i) -- +(-#5,0) node [midway, above, sloped, font=\scriptsize] {\labellist[\i]};
+ }
+ \fi;
+ \readlist\labellist{#4}
+ \ifnum#2>0
+ \foreach \j in {1,...,#2} {
+ % Effect coordinates and lines
+ \coordinate (\nodename-eff-\j) at ([xshift=#6cm, yshift=(-\j + (#2)/2+0.25) * \baseHeight cm] \nodename.east);
+ \draw (\nodename.east |- \nodename-eff-\j) -- +(#6,0) node [midway, above, sloped, font=\scriptsize] {\labellist[\j]};
+ }
+ \fi;
+ \else
+ \ifnum#1>0
+ \readlist\labellist{#3}
+ \foreach \i in {1,...,#1} {
+ % Precondition coordinates and lines
+ \coordinate (\nodename-pre-\i) at ([xshift=-#5 cm, yshift=(-\i + (#1)/2+0.25) * \baseHeight cm] \nodename.west);
+ \draw (\nodename.west |- \nodename-pre-\i) -- +(-#5,0) node [midway, anchor=east, xshift=-0.5 cm, sloped, font=\scriptsize]{\labellist[\i]};
+ }
+ \fi;
+ \readlist\labellist{#4}
+ \ifnum#2>0
+ \foreach \j in {1,...,#2} {
+ % Effect coordinates and lines
+ \coordinate (\nodename-eff-\j) at ([xshift=#6 cm, yshift=(-\j + (#2)/2+0.25) * \baseHeight cm] \nodename.east);
+ \draw (\nodename.east |- \nodename-eff-\j) -- +(#6,0) node [midway,anchor=west, xshift=0.5 cm, font=\scriptsize] {\labellist[\j]};
+ }
+ \fi;
+ \fi;
+ \fi;
+ }
+ },
+ label content/.initial={#3}
+ }
+}
+
+
+% Common base style for nodes
+\tikzset{
+ % COMMENT MISSING
+ base/.style n args={5}{
+ draw,
+ minimum width=0.05cm,
+ fill=black,
+ minimum height={#1*\baseHeight cm},
+ append after command={
+ \pgfextra{
+ \edef\nodename{\tikzlastnode}
+ \setsepchar{,}
+ \readlist\labellist{#2}
+ \foreach \i in {1,...,#1} {
+ \coordinate (\nodename-#5-\i) at ([xshift=#3 cm, yshift=(-\i + (#1)/2+0.25) * \baseHeight cm] \nodename.#4);
+ \draw (\nodename.#4 |- \nodename-#5-\i) -- +(#3,0)
+ node [midway, above, sloped, font=\scriptsize] {\labellist[\i]};
+ }
+ }
+ }
+ }
+}
+
+\tikzset{
+ % Init style
+ init/.style n args={3}{
+ base={#1}{#2}{#3}{east}{eff}
+ }
+}
+
+\tikzset{
+ % Goal style
+ goal/.style n args={3}{
+ base={#1}{#2}{-#3}{west}{pre}
+ }
+}
+
+
+
+\tikzset{
+ dot/.style={
+ circle,fill,inner sep=0.1em
+ }
+}
+
+\tikzset{
+ causallink/.style={
+ ->, shorten <= 0.2cm, shorten >= 0.1cm
+ }
+}
+
diff --git a/graphics/pgf/contrib/argumentation/README.md b/graphics/pgf/contrib/argumentation/README.md
index 3e6a97e5ec..c6a5ab27ec 100644
--- a/graphics/pgf/contrib/argumentation/README.md
+++ b/graphics/pgf/contrib/argumentation/README.md
@@ -4,5 +4,5 @@ The argumentation package provides utility to create abstract argumentation fram
For bug reports and feedback, please contact:
Lars Bengel <lars.bengel@fernuni-hagen.de>
-Version: 1.1 [2023/12/03]
+Version: 1.5 [2025/02/09]
This package is subject to the LaTeX Project Public License 1.3c \ No newline at end of file
diff --git a/graphics/pgf/contrib/argumentation/argumentation-doc.pdf b/graphics/pgf/contrib/argumentation/argumentation-doc.pdf
index 39c89e37e3..b3a4066158 100644
--- a/graphics/pgf/contrib/argumentation/argumentation-doc.pdf
+++ b/graphics/pgf/contrib/argumentation/argumentation-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/argumentation/argumentation-doc.tex b/graphics/pgf/contrib/argumentation/argumentation-doc.tex
index 128765d43c..ad1f7a6fd0 100644
--- a/graphics/pgf/contrib/argumentation/argumentation-doc.tex
+++ b/graphics/pgf/contrib/argumentation/argumentation-doc.tex
@@ -1,590 +1,1136 @@
-\documentclass{article}
-
-\title{The \argumentation Package}
-\author{Lars Bengel\footnote{Please report any issues at \url{https://github.com/aig-hagen/tikz_argumentation}}\\\small lars.bengel@fernuni-hagen.de}
-\date{Version 1.1 [2023/12/03]}
-
-%%%%%%%%% IMPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage[]{argumentation} % Main Package
-\usepackage{amsmath} % For example environment
-\usepackage{xspace} % For dynamic spacing after commands
-\usepackage{xcolor} % Coloring
-\usepackage[hidelinks]{hyperref} % Hyperlinks
-\usepackage{subcaption} % For two-part figures
-
+\documentclass{scrartcl}
+
+\usepackage[top=1.35in, bottom=1.33in, left=1.35in, right=1.35in]{geometry}
+\usepackage[macros,beamer]{argumentation} % Main Package
+\usepackage[T1]{fontenc} % Font Encoding
+\usepackage[utf8]{inputenc} % Input font encoding
+\usepackage[english]{babel} % Language
+\usepackage{subcaption} % Multi-part Figures
+\usepackage[nohyperref]{doc} % Showing Commands (must load before tcolorbox)
+\usepackage[breakable]{tcolorbox} % Fancier Examples
+\usepackage{booktabs} % Fancier Tables
+\usepackage{enumitem} % Fancier Enumeration
+\usepackage[hidelinks, % Setting Meta-Data and hyperlinks
+ pdfauthor={Lars Bengel},
+ pdftitle={The argumentation LaTeX-package},
+ pdfsubject={Documentation of the argumentation LaTeX-package},
+ pdfkeywords={argumentation,tikz,graphs}]{hyperref}
+
+%%% Document settings
+\KOMAoptions{
+ paper=a4,
+ fontsize=10pt,
+ cleardoublepage=empty,
+ footinclude=true
+}
+
+%%% Various commands used in the document
+\newcommand{\todo}[1]{\textcolor{magenta}{TODO: #1}} % for todos
\newcommand{\tikzname}{Ti\emph{k}Z\xspace}
\newcommand{\argumentation}{\texttt{argumentation}\xspace}
-\newcommand{\opt}[2][red]{\ensuremath{\textcolor{#1}{\langle #2\rangle}}}
\newtheorem{example}{Example}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\tcolorboxenvironment{example}{colframe=aigblue,colback=aigyellow!30,breakable,before skip=10pt,after skip=10pt}
+\newcommand{\mopt}[2][red]{\textcolor{#1}{\ttfamily \meta{#2}}}
+\newcommand{\oopt}[2][orange]{\textcolor{#1}{\ttfamily \meta{#2}}}
+\newcommand{\popt}[2][magenta]{\textcolor{#1}{\ttfamily \meta{#2}}}
+\newcommand{\sopt}[2][green]{\textcolor{#1}{\ttfamily \meta{#2}}}
+
+%%% Taken from ltxdoc-class
+\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
+\def\cmd@to@cs#1#2{\char\number`#2\relax}
+\DeclareRobustCommand\cs[2][-1.6cm]{\hspace{#1}\texttt{\char`\\#2}}
+
+\title{The \argumentation Package}
+\author{Lars Bengel\footnote{Please report any issues at \url{https://github.com/aig-hagen/tikz_argumentation}}\\\small lars.bengel@fernuni-hagen.de}
+\date{Version 1.5 [2025/02/09]}
\begin{document}
\maketitle
+\begin{minipage}{.26\textwidth}
+ \centering
+ \begin{af}[argumentstyle=gray,namestyle=monospace]
+ \argument{a}
+ \argument[right=of a1]{b}
+ \argument[below=of a1]{c}
+ \argument[right=of a3]{d}
+
+ \attack{a1}{a2}
+ \attack{a2}{a3}
+ \attack[bend right]{a3}{a4}
+ \label{af:example}
+ \end{af}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{small}
+ \begin{verbatim}
+ \begin{af}[argumentstyle=gray,namestyle=monospace]
+ \argument{a}
+ \argument[right=of a1]{b}
+ \argument[below=of a1]{c}
+ \argument[right=of a3]{d}
+
+ \attack{a1}{a2}
+ \attack{a2}{a3}
+ \attack[bend right]{a3}{a4}
+ \label{af:example}
+ \end{af}
+ \end{verbatim}
+ \end{small}
+\end{minipage}
+
+
\tableofcontents
\newpage
-\section{Example}
-\vspace{-0.7cm}
+%\sffamily
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Quick Guide}\label{sec:quick}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\noindent
+To create an argumentation framework in your \LaTeX-document, you first have to import the \argumentation package in the preamble:\\
+
+\noindent\cs[0cm]{usepackage\{argumentation\}}\\
+
+You can then create a new \texttt{af} environment in which the argumentation framework can then be built:\\
+
+\noindent\cs[0cm]{begin\{af\}}
+
+\quad\sopt{environment~contents}
+
+\noindent\cs[0cm]{end\{af\}}\\
+
+You may want to wrap the \texttt{af} environment in a \texttt{figure} environment in order to add a caption and reference label.
+You can also add a label inside the \texttt{af} environment via \verb|\label{|\sopt{label}\verb|}|.
+Anywhere in your document, you can then reference the af with \verb|\ref{|\sopt{label}\verb|}|.
+
+Inside the \texttt{af} environment, you can then add an argument as follows:\\
+
+\noindent\cs[0cm]{argument\{\mopt{name}\}}\\
+
+Here, \mopt{name} is the name of the argument displayed in the graph and the argument is automatically assigned an \emph{identifier} of the form: $a1$, $a2$, \dots.
+
+To properly add further arguments, you also need to specify a position.
+The \argumentation package offers two easy ways of doing that:\\
+
+\noindent\cs[0cm]{argument[\mopt{dir}=of \mopt{argId}]\{\mopt{name}\}}\\
+
+\noindent\cs[0cm]{argument\{\mopt{name}\} at (\popt{posX},\popt{posY})}\\
+
+The first instance is \emph{relative positioning} where \mopt{dir} is the direction of placement relative to the argument with the identifier \mopt{argId}, with \mopt{dir} typically being one of: \textsf{right}, \textsf{left}, \textsf{above}, \textsf{below}.
+
+The second instance is \emph{absolute positioning} where \texttt{(\popt{posX}, \popt{posY})} is a set of coordinates, for example something like $\texttt{(2, 0)}$, $\texttt{(0, -2)}$ or $\texttt{(-1, 3.5)}$.
+
+The next step is adding attacks.
+For that you can simply use the following command:\\
+
+\noindent\cs[0cm]{attack\{\mopt{a1}\}\{\mopt{a2}\}}\\
+
+\noindent
+Substitute \mopt{a1} and \mopt{a2} with the identifier of the two arguments.
+Alternatively, you can also directly create bidirectional attacks and self-attacks with the following two commands:\\
+
+\noindent\cs[0cm]{dualattack\{\mopt{a1}\}\{\mopt{a2}\}}\\
+\noindent\cs[0cm]{selfattack\{\mopt{a1}\}}\\
+
+
+To customize the look of the arguments and attacks and for a detailed overview over all options and commands provided by this package, please refer to the following example or to the full documentation in Section~\ref{sec:documentation}.
+
+
+\newpage
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Example Usage}\label{sec:example}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\vspace{-0.5cm}
+\begin{figure}[ht]
+ \centering
+ \begin{af}[namestyle=math]
+ \argument{a}
+ \argument[right=of a1]{b}
+ \argument[right=of a2]{c}
+ \argument[rejected,right=of a3]{d}
+ \argument[right=of a4,incomplete]{e}
+ \argument[below=of a1]{f}
+ \argument[inactive,right=of a6]{g}
+ \argument[accepted,right=of a7]{h}
+ \argument[right=of a8]{i}
+ \argument[right=of a9]{j}
+
+ \annotation[right,yshift=-0.4cm]{a5}{$a\lor b$}
+
+ \afname{$F_{\ref{af:ex2}}$} at (-1,-1)
+
+ \selfattack{a1}
+ \dualattack{a1}{a6}
+ \dualattack[inactive]{a6}{a7}
+
+ \attack[inactive]{a8}{a7}
+ \attack[inactive]{a7}{a2}
+ \annotatedattack[above]{a3}{a2}{$3$}
+ \annotatedattack[below,incomplete]{a4}{a5}{$x$}
+ \attack{a5}{a10}
+ \attack{a10}{a9}
+ \attack{a9}{a4}
+
+ \support{a4}{a3}
+ \support{a9}{a3}
+ \label{af:ex2}
+ \end{af}
+ \caption{The AF $F_{\ref{af:ex2}}$ created with the \argumentation package.}
+ \label{fig:example}
+\end{figure}
+
+\begin{verbatim}
+\usepackage[namestyle=math]{argumentation}
+...
+\begin{document}
+...
\begin{figure}[ht]
\centering
\begin{af}
- \argument{args1}{a}
- \argument[right=of args1]{args2}{b}
- \argument[right=of args2]{args3}{c}
- \argument[right=of args3]{args4}{d}
- \argument[right=of args4,incomplete]{args5}{e}
- \argument[below=of args1]{args6}{f}
- \argument[inactive,right=of args6]{args7}{g}
- \argument[inactive,argin,right=of args7]{args8}{h}
- \argument[right=of args8]{args9}{i}
- \argument[right=of args9]{args10}{j}
-
- %\annotation[right]{args5}{$a\lor b$}
-
- \afname[left of=args1,yshift=-0.8cm,xshift=-0.2cm]{cap}{\textbf{F:}}
-
- \selfattack{args1}
- \dualattack{args1}{args6}
- \dualattack[inactive]{args6}{args7}
+ \argument{a}
+ \argument[right=of a1]{b}
+ \argument[right=of a2]{c}
+ \argument[rejected,right=of a3]{d}
+ \argument[right=of a4,incomplete]{e}
+ \argument[below=of a1]{f}
+ \argument[inactive,right=of a6]{g}
+ \argument[accepted,right=of a7]{h}
+ \argument[right=of a8]{i}
+ \argument[right=of a9]{j}
+
+ \annotation[right,yshift=-0.4cm]{a5}{$a\lor b$}
+ \afname{$F_{\ref{af:ex2}}$} at (-1,-1)
+
+ \selfattack{a1}
+ \dualattack{a1}{a6}
+ \dualattack[inactive]{a6}{a7}
- \attack[inactive]{args8}{args7}
- \attack[inactive]{args7}{args2}
- \annotatedattack{args3}{args2}{$3$}
- \attack[incomplete]{args4}{args5}
- \attack{args5}{args10}
- \attack{args10}{args9}
- \attack{args9}{args4}
-
- \support{args4}{args3}
- \support{args9}{args3}
+ \attack[inactive]{a8}{a7}
+ \attack[inactive]{a7}{a2}
+ \attack{a5}{a10}
+ \attack{a10}{a9}
+ \attack{a9}{a4}
+
+ \annotatedattack[above]{a3}{a2}{$3$}
+ \annotatedattack[below,incomplete]{a4}{a5}{$x$}
+ \support{a4}{a3}
+ \support{a9}{a3}
+ \label{af:ex2}
\end{af}
- \caption{An exemplary AF created with the \argumentation package.}
+ \caption{The AF $F_{\ref{af:ex2}}$ created with the \argumentation package.}
\label{fig:example}
\end{figure}
-\vspace{-0.4cm}
-\begin{verbatim}
- \usepackage{argumentation}
- \begin{figure}[ht]
- \centering
- \begin{af}
- \argument{args1}{a}
- \argument[right=of args1]{args2}{b}
- \argument[right=of args2]{args3}{c}
- \argument[right=of args3]{args4}{d}
- \argument[right=of args4,incomplete]{args5}{e}
- \argument[below=of args1]{args6}{f}
- \argument[inactive,right=of args6]{args7}{g}
- \argument[inactive,argin,right=of args7]{args8}{h}
- \argument[right=of args8]{args9}{i}
- \argument[right=of args9]{args10}{j}
-
- \afname[left of=args1,yshift=-0.8cm,xshift=-0.2cm]{cap}{\textbf{F:}}
-
- \selfattack{args1}
- \dualattack{args1}{args6}
- \dualattack[inactive]{args6}{args7}
-
- \attack[inactive]{args8}{args7}
- \attack[inactive]{args7}{args2}
- \annotatedattack{args3}{args2}{$3$}
- \attack[incomplete]{args4}{args5}
- \attack{args5}{args10}
- \attack{args10}{args9}
- \attack{args9}{args4}
-
- \support{args4}{args3}
- \support{args9}{args3}
- \end{af}
- \caption{An exemplary AF created with the \argumentation package.}
- \label{fig:example}
- \end{figure}
+...
+\end{document}
\end{verbatim}
-\section{Documentation for Version 1.1 [2023/12/03]}
-In the following, we give an overview over the functionality of the \argumentation package.
-In general, the functionality provided by this package is fully compatible with \tikzname.
-Meaning every command from this package can be used inside the \textsf{tikzpicture} environment and every \tikzname command or option can be used inside the \texttt{af} environment or in context of the argument nodes and attack edges.
-
-\subsection{Package Options}
- The \argumentation package can be imported via the command
-
- \noindent
- \verb|\usepackage{argumentation}|
+\newpage
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Documentation for Version 1.5 [2025/02/09]}\label{sec:documentation}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The \argumentation package provides an easy way for creating argumentation frameworks\footnote{Dung, P. M. (1995). On the acceptability of arguments and its fundamental role in non-monotonic reasoning, logic programming and n-person games. Artificial intelligence.} in \LaTeX-documents.
+It builds on the \tikzname package for drawing the argumentation graphs.
+The \argumentation package provides simplified syntax while keeping the same customisation options and keeping full compatibility with all \tikzname features.
+In addition to that, the \argumentation package provides the ability to label and reference the created argumentation frameworks as well as some other additional features.
- Alternatively, one can also adjust the appearance by providing some package options via
+The \argumentation package can be imported via the command\\
- \noindent
- \verb|\usepackage[|\opt{options}\verb|]{argumentation}|
-
- \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item The package provides the following \emph{optional} options to customize the look of the argumentation frameworks.
- \end{list}
- \begin{align*}
- \mathsf{namestyle} &\quad \text{Customizes the font of the argument names.}\\
- \mathsf{argumentstyle} &\quad \text{Customizes the appearance of the argument nodes.}\\
- \mathsf{attackstyle} &\quad \text{Customizes the appearance of the attack edges.}\\
- \mathsf{supportstyle} &\quad \text{Customizes the appearance of the support edges.}\\
- \end{align*}
-
- In the following, we list the available options for each of the style parameters.\\
-
-\noindent\texttt{namestyle=}\opt{option}
-
- The \textsf{namestyle} parameter accepts three different options
- \begin{align*}
- \mathsf{normal} &\quad \text{(default) The argument name is rendered normally.}\\
- \mathsf{italics} &\quad \text{The argument name is rendered in \emph{italics}.}\\
- \mathsf{bold} &\quad \text{The argument name is rendered in \textbf{bold}.}\\
- \mathsf{bolditalics} &\quad \text{The argument name is rendered with \textbf{\emph{both}}.}\\
- \mathsf{monospace} &\quad \text{The argument name is rendered in \texttt{monospace} font.}\\
- \end{align*}
-
-\noindent\texttt{argumentstyle=}\opt{option}
-
- The \textsf{argumentstyle} parameter accepts two options
- \begin{align*}
- \mathsf{standard} &\quad \text{(default) Standard style for the argument nodes.}\\
- %\mathsf{retro} &\quad \text{Thicker outline and slightly larger nodes.}\\
- \end{align*}
+\noindent\cs{usepackage[\oopt{options}]\{argumentation\}}\\
-\newpage
-\noindent\texttt{attackstyle=}\opt{option}
-
- The \textsf{attackstyle} parameter accepts two options
- \begin{align*}
- \mathsf{standard} &\quad \text{(default) Standard style for the attack arrow tips.}\\
- \mathsf{large} &\quad \text{Alternative style, arrow tip is larger and sharper.}\\
- \end{align*}
+\vspace{-0.2cm}
+In the following, we give an overview over the functionality of the \argumentation package.
+Most importantly, that includes the \texttt{af} environment to encapsulate the created argumentation frameworks, the command \verb|\argument{ }| to create argument nodes and the \verb|attack{ }{ }| command to create attack edges.
+Options to customise the appearance of arguments and attacks are described in Section~\ref{sec:options}.
-\noindent\texttt{supportstyle=}\opt{option}
-
- The \textsf{supportstyle} parameter accepts three options
- \begin{align*}
- \mathsf{standard} &\quad \text{(default) Standard style for the attack arrow tips.}\\
- \mathsf{dashed} &\quad \text{Dashed arrow line, same tip.}\\
- \mathsf{double} &\quad \text{Double arrow line and large flat tip.}\\
- \end{align*}
+\vspace{-0.2cm}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{The \texttt{af} Environment}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The \argumentation package provides an environment for creating argumentation frameworks in \LaTeX-documents.\\
-You can override the \textsf{argumentstyle}, \textsf{attackstyle} and \textsf{supportstyle} parameters and set a custom style via the following commands respectively.
+\noindent\cs{begin\{af\} [\oopt{options}]}
-\noindent
-\verb|\setargumentstyle{|\opt{style}\verb|}|
+ \hspace{-1cm}\sopt{environment~contents}
+
+\noindent\cs[-1.6cm]{end\{af\}}\\
-\noindent
-\verb|\setattackstyle{|\opt{style}\verb|}|
+\vspace{-0.2cm}
+The \texttt{af} environment supports referencing.
+For that add the command \cs[0cm]{label\{\sopt{label}\}} anywhere inside an \texttt{af} environment.
+The AFs are automatically numbered in ascending order of occurrence.
+The \sopt{label} allows you to reference the corresponding AF via \cs[0cm]{ref\{\sopt{label}\}} anywhere in the document.
-\noindent
-\verb|\setsupportstyle{|\opt{style}\verb|}|
+If you want to create an AF that is excluded from the automatic numbering, the \argumentation package provides the \texttt{af*} version of the environment, which has the same functionality otherwise:\\
-\begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item
- where \opt{style} is a list of \tikzname style parameters.
-\end{list}
+\noindent\cs{begin\{af*\} [\oopt{options}]}
-\subsection{The \texttt{af} Environment}
-The \argumentation package provides an environment for creating abstract argumentation frameworks and bipolar argumentation frameworks in \LaTeX-documents.\\
+ \hspace{-1cm}\sopt{environment~contents}
+
+\noindent\cs[-1.6cm]{end\{af*\}}\\
-\noindent
-\verb|\begin{af}[|\opt{options}\verb|]|
+\vspace{-0.2cm}
+The \texttt{af} (and \texttt{af*}) environment also accepts the package style options (see Section~\ref{sec:options}).
+Locally set style options override defaults and the values set globally with the package import.
-\opt[green]{environment~content}
+In general, the \texttt{af} environment extends the \texttt{tikzpicture} environment, meaning all \tikzname commands and parameters can be used for the \texttt{af} environment.
+The \argumentation package also provides the options \textsf{small} or \textsf{tiny} for the \texttt{af} environment to create smaller AFs.
+This is especially useful for two-column layout documents.
-\noindent
-\verb|\end{af}|
-
-\begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item
- The \argumentation package provides the \texttt{af} environment for creating abstract argumentation framework.
- The \texttt{af} environment extends the \textsf{tikzpicture} environment, meaning all \tikzname commands can be used inside the \texttt{af} environment as well.
- Furthermore, all options for the \textsf{tikzpicture} environment can be used for the \texttt{af} environment as well.
- For instance, the option parameter \verb|node distance|, which is set to \verb|1cm| per default.
-
- If you want to create an argumentation framework with limited space available, you can provide one of the following predefined options for the environment. This is especially useful for two-column layout documents.
- \begin{align*}
- \mathsf{tiny} &\quad \text{\textsf{node distance} is set to $0.35cm$ and nodes are smaller.}\\
- \mathsf{small} &\quad \text{\textsf{node distance} is set to $0.55cm$ and nodes are smaller.}\\
- \end{align*}
-
- \begin{example}
- Consider the two AFs in Figure~\ref{fig:mini_afs} created with the \textsf{small} and \textsf{tiny} option respectively.
- \end{example}
-\end{list}
-\begin{figure}[ht]
+\begin{figure}[!ht]
\begin{subfigure}{0.48\textwidth}
\centering
- \begin{af}[small]
- \argument{args1}{a}
- \argument[right=of args1]{args2}{b}
- \argument[right=of args2]{args3}{c}
- \argument[right=of args3]{args4}{d}
- \argument[right=of args4]{args5}{e}
- \argument[below=of args1]{args6}{f}
- \argument[inactive,right=of args6]{args7}{g}
- \argument[inactive,argin,right=of args7]{args8}{h}
- \argument[right=of args8]{args9}{i}
- \argument[right=of args9]{args10}{j}
-
- \afname[left of=args1,yshift=-0.5cm,xshift=-0.2cm]{cap}{\textbf{F:}}
-
- \selfattack{args1}
- \dualattack[]{args1}{args6}
- \dualattack[inactive]{args6}{args7}
- \attack[inactive]{args8}{args7}
-
- \attack[inactive]{args7}{args2}
- \attack[]{args3}{args2}
-
- \support[]{args4}{args3}
- \support[]{args9}{args3}
-
- \attack[]{args4}{args5}
- \attack[]{args5}{args10}
- \attack[]{args10}{args9}
- \attack[]{args9}{args4}
+ \begin{af}[small,namestyle=math]
+ \label{af:small}
+ \argument{a}
+ \argument[right=of a1]{b}
+ \argument[right=of a2]{c}
+ \argument[right=of a3]{d}
+ \argument[right=of a4]{e}
+ \argument[below=of a1]{f}
+ \argument[inactive,right=of a6]{g}
+ \argument[inactive,argin,right=of a7]{h}
+ \argument[right=of a8]{i}
+ \argument[right=of a9]{j}
+
+ \afname[left of=a1,yshift=-0.55cm,xshift=-0.2cm]{\afref{af:small}}
+
+ \selfattack{a1}
+ \dualattack[]{a1}{a6}
+ \dualattack[inactive]{a6}{a7}
+ \attack[inactive]{a8}{a7}
+
+ \attack[inactive]{a7}{a2}
+ \attack[]{a3}{a2}
+
+ \support[]{a4}{a3}
+ \support[]{a9}{a3}
+
+ \attack[]{a4}{a5}
+ \attack[]{a5}{a10}
+ \attack[]{a10}{a9}
+ \attack[]{a9}{a4}
\end{af}
- \caption{An exemplary AF created with the \textsf{small} option set.}
+ \caption{An AF created with the \textsf{small} option set.}
\label{fig:example_small}
\end{subfigure}
\hfill
\begin{subfigure}{0.48\textwidth}
\centering
- \begin{af}[tiny]
- \argument{args1}{a}
- \argument[right=of args1]{args2}{b}
- \argument[right=of args2]{args3}{c}
- \argument[right=of args3]{args4}{d}
- \argument[right=of args4]{args5}{e}
- \argument[below=of args1]{args6}{f}
- \argument[inactive,right=of args6]{args7}{g}
- \argument[inactive,argin,right=of args7]{args8}{h}
- \argument[right=of args8]{args9}{i}
- \argument[right=of args9]{args10}{j}
-
- \afname[left of=args1,yshift=-0.5cm,xshift=-0.2cm]{cap}{\textbf{F:}}
-
- \selfattack{args1}
- \dualattack[]{args1}{args6}
- \dualattack[inactive]{args6}{args7}
- \attack[inactive]{args8}{args7}
-
- \attack[inactive]{args7}{args2}
- \attack[]{args3}{args2}
-
- \support[]{args4}{args3}
- \support[]{args9}{args3}
-
- \attack[]{args4}{args5}
- \attack[]{args5}{args10}
- \attack[]{args10}{args9}
- \attack[]{args9}{args4}
+ \begin{af}[tiny,namestyle=math]
+ \label{af:tiny}
+ \argument{a}
+ \argument[right=of a1]{b}
+ \argument[right=of a2]{c}
+ \argument[right=of a3]{d}
+ \argument[right=of a4]{e}
+ \argument[below=of a1]{f}
+ \argument[inactive,right=of a6]{g}
+ \argument[inactive,argin,right=of a7]{h}
+ \argument[right=of a8]{i}
+ \argument[right=of a9]{j}
+
+ \afname[left of=a1,yshift=-0.4cm,xshift=-0.2cm]{\afref{af:tiny}}
+
+ \selfattack{a1}
+ \dualattack[]{a1}{a6}
+ \dualattack[inactive]{a6}{a7}
+ \attack[inactive]{a8}{a7}
+
+ \attack[inactive]{a7}{a2}
+ \attack[]{a3}{a2}
+
+ \support[]{a4}{a3}
+ \support[]{a9}{a3}
+
+ \attack[]{a4}{a5}
+ \attack[]{a5}{a10}
+ \attack[]{a10}{a9}
+ \attack[]{a9}{a4}
\end{af}
- \caption{An exemplary AF created with the \textsf{tiny} option set.}
+ \caption{An AF created with the \textsf{tiny} option set.}
\label{fig:example_tiny}
\end{subfigure}
- \caption{Two AFs with smaller nodes, created by using the \textsf{small} and \textsf{tiny} options of the \texttt{af} environment.}
+ \caption{Argumentation frameworks using the \textsf{small} and \textsf{tiny} option of the \texttt{af} environment.}
\label{fig:mini_afs}
-
\end{figure}
-While the following commands are intended to be used inside the \texttt{af} environment, they can also be used inside the \textsf{tikzpicture} environment.
-\subsection{Arguments}
- Arguments can be created with the following command\\
+\newpage
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Creating Arguments}\label{sec:arguments}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+Inside an \texttt{af} (or \texttt{af*}) environment, you can create argument nodes for the argumentation framework with the following command\\
- \noindent
- \verb|\argument{|\opt{id}\verb|}{|\opt{name}\verb|}|
-
- \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item\opt{id}~ is the identifier of the new argument
- \item\opt{name}~ is the displayed name of the argument
- \item To create an argument, you must provide a unique identifier and the name to be displayed in the picture.
- The \opt{id} of an argument is then referred to when creating attacks as well as for the relative positioning of other arguments.
+\noindent\cs{argument [\oopt{options}] (\popt{id}) \{\mopt{name}\} at (\popt{posX},\popt{posY})}
- \end{list}
+\begin{description}
+ \item[\oopt{options}] (optional) a list of \tikzname style parameters and/or relative positioning information.
+ \item[\popt{id}] (optional) the identifier of the new argument. Per default, when omitted, arguments will automatically be assigned an identifier of the form: $a1, a2, a3,...$.
+ \item[\mopt{name}] the displayed name of the argument.
+ \item[\popt{posX},\popt{posY}] (optional) the coordinates where the argument is placed. Must be omitted if relative positioning is used.
+\end{description}
-\subsubsection{Relative Positioning}
- This package supports relative placement of the arguments via the \tikzname-library \textsf{positioning}.
- The relative positioning information is provided as an optional parameter via\\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection{Positioning}\label{sec:positioning}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The \argumentation package also provides the ability to use \emph{relative positioning} instead of absolute positioning via coordinates.
+For that, it relies on relative placement via the \tikzname-library \textsf{positioning}.
+The relative positioning information is provided as an optional parameter via \texttt{[\oopt{options}]} as follows\\
- \noindent
- \verb|\argument[|\opt{dir}\verb|=of |\opt{arg\_id}\verb|]{|\opt{id}\verb|}{|\opt{name}\verb|}|
-
- \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item\opt{dir}~ has to be one of: \emph{right}, \emph{left}, \emph{below} and \emph{above}
- \item\opt{arg\_id}~ is the identifier of another argument
- \item Additionally, you can adjust the horizontal/vertical position of an argument via the options \verb|xshift=|\opt{v} and \verb|yshift=|\opt{v}.
- The value \opt{v} is the horizontal/vertical offset, e.\,g., \verb|5pt|, \verb|-3ex| or \verb|0.2cm|.
- \end{list}
+\noindent\cs{argument[\mopt{dir}=of \mopt{argId}]\{\mopt{name}\}}
+\begin{description}
+ \item[\mopt{dir}] The direction of placement relative to the argument \mopt{argId}. Typically one of: \textsf{above}, \textsf{right}, \textsf{left} or \textsf{below}.
+ \item[\mopt{argId}] The identifier of another argument.
+ \item[\mopt{name}] The displayed name of the argument.
+\end{description}
- \begin{example}~
+Additionally, you can adjust the horizontal/vertical position of an argument by adding \verb|xshift=|\mopt{v} or \verb|yshift=|\mopt{v} inside the \texttt{[...]}.
+The value \mopt{v} is hereby the horizontal/vertical offset, e.\,g., \verb|-6.6ex| or \verb|1cm|.
- \begin{verbatim}
- \begin{af}
- \argument{arg1}{a}
- \argument[below=of arg1]{arg2}{b}
- \argument[right=of arg1, yshift=-24pt,xshift=-8pt]{arg3}{c}
- \argument[right=of arg3, xshift=-0.5cm]{arg4}{d}
- \argument[right=of arg4, yshift=5ex]{arg4}{e}
- \end{af}
- \end{verbatim}
+In the following, we list some useful style options for the \verb|\argument| command, provided by the\argumentation package:
- \begin{center}
- \begin{af}
- \argument{arg1}{a}
- \argument[below=of arg1]{arg2}{b}
- \argument[right=of arg1, yshift=-24pt,xshift=-8pt]{arg3}{c}
- \argument[right=of arg3, xshift=-0.5cm]{arg4}{d}
- \argument[right=of arg4, yshift=5ex]{arg4}{e}
+\vspace{-0.15cm}
+\begin{table}[ht]
+ \centering
+ \begin{tabular}{ll}
+ \textsf{inactive} &\quad \text{The argument is displayed with grey outline and text.}\\
+ \textsf{incomplete} &\quad \text{The argument is displayed with a dotted outline.}\\
+ \textsf{invisible} &\quad \text{The argument node is completely transparent.}\\
+ \textsf{accepted} &\quad \text{The argument is displayed with green background color.}\\
+ \textsf{rejected} &\quad \text{The argument is displayed with red background color.}\\
+ \textsf{undecided} &\quad \text{The argument is displayed with cyan background color.}\\
+ \textsf{highlight} &\quad \text{The argument is displayed with yellow background color.}\\
+ \end{tabular}
+ \caption{Some style options for the \cs[0cm]{argument} command (for exact definition see Section~\ref{sec:parameters}).}
+ \label{tab:argument_style}
+\end{table}
+
+\vspace{-0.4cm}
+\begin{example}~
+
+ \vspace{-0.2cm}
+ \begin{minipage}{0.3\textwidth}
+ \centering
+ \begin{af}[namestyle=math]
+ \argument{a}
+ \argument{b} at (1,0)
+ \argument[below=of a1,accepted](c){c}
+ \argument(x){d} at (1,-1)
+ \argument[right=of x,yshift=0.5cm]{e}
+ \argument[inactive]{f} at (2,-1.5)
\end{af}
- \end{center}
-
- \end{example}
-
-\subsubsection{Argument Styling}
- Furthermore, you can provide optional parameters to adjust the style of the argument node.
- For that you can use all \tikzname-style options and additionally the following predefined style parameters:
- \begin{align*}
- \mathsf{inactive} &\quad \text{The argument is displayed with grey outline and text.}\\
- \mathsf{incomplete} &\quad \text{The argument is displayed with a dotted outline.}\\
- \mathsf{invisible} &\quad \text{The argument node is completely transparent.}\\
- \mathsf{argin} &\quad \text{The argument is displayed with green background color.}\\
- \mathsf{argout} &\quad \text{The argument is displayed with red background color.}\\
- \mathsf{argundec} &\quad \text{The argument is displayed with cyan background color.}\\
- \end{align*}
-
- %Some relevant \tikzname style-parameters are
- %\begin{align*}
- %\textsf{circle} &\quad \text{the shape of the argument.}\\
- % \textsf{minimum~size=0.75cm} &\quad \text{the minimum size of the circle, to ensure consistent}\\
- % &\quad \text{argument size.}\\
- % \textsf{draw=black} &\quad \text{outline and text color of the argument.}\\
- %\textsf{thick} &\quad \text{the outline of the circle is rendered in \textsf{thick} mode.}\\
- % \textsf{fill=white} &\quad \text{the background color of the argument.}\\
- % \textsf{font=large} &\quad \text{the font size of the argument name.}\\
- %\textsf{text~centered} &\quad \text{positioning of the argument name inside the circle.}\\
- % \textsf{inner~sep=0} &\quad \text{inner margins of the circle, set to \textsf{0} to optimize space.}
- %\end{align*}
-
-
-\subsection{Attacks}
- Attacks between two arguments can be created with the command\\
+ \end{minipage}%
+ \begin{minipage}{0.7\textwidth}
+ \begin{small}
+ \begin{verbatim}
+ \begin{af}[namestyle=math]
+ \argument{a}
+ \argument{b} at (1,0)
+ \argument[below=of a1,accepted](c){c}
+ \argument(x){d} at (1,-1)
+ \argument[right=of x,yshift=0.5cm]{e}
+ \argument[inactive]{f} at (2,-1.5)
+ \end{af}
+ \end{verbatim}
+ \end{small}
+ \end{minipage}
+ \vspace{-0.3cm}
+\end{example}
- \noindent
- \verb|\attack{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}|
- \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item where \opt{arg1} and \opt{arg2} are the identifiers of two previously defined arguments.
- \end{list}
+\newpage
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Creating Attacks}\label{sec:attacks}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+To create an directed attack between two argument nodes, you can use the following command.
+The parameters \mopt{arg1} and \mopt{arg2} are the identifiers of the two arguments.\\
+
+\noindent\cs{attack [\oopt{options}] \{\mopt{argId1}\} \{\mopt{argId2}\}}
+\begin{description}
+ \item[\oopt{options}] (optional) a list of \tikzname style parameters.
+ \item[\mopt{arg1}] Identifier of the attacking argument.
+ \item[\mopt{arg2}] Identifier of the attacked argument.\\
+\end{description}
+
+To simplify creating special types of attacks, like bidirectional attacks or self-attacks, the following two commands are provided.\\
+
+\noindent\cs{dualattack [\oopt{options}] \{\mopt{argId1}\} \{\mopt{argId2}\}}
+\begin{description}
+ \item[\oopt{options}] (optional) a list of \tikzname style parameters.
+ \item[\mopt{arg1}] Identifier of the first argument.
+ \item[\mopt{arg2}] Identifier of the second argument.
+\end{description}
+
+\noindent\cs{selfattack [\oopt{options}] \{\mopt{argId}\}}
+\begin{description}
+ \item[\oopt{options}] (optional) a list of \tikzname style parameters.
+ \item[\mopt{arg1}] Identifier of the self-attacking argument.
+\end{description}
+
+For \verb|\selfattack| you might want to specify the position of the attack loop.
+For that, you should provide the start and end point of the attack-edge (as a degree from \verb|0| to \verb|360|) via the optional \tikzname-parameters \texttt{in=\oopt{degree1}} and \texttt{out=\oopt{degree2}}.
+The default values are \texttt{in=0} and \texttt{out=60}.\\
+
+If you want to attach a value to an attack edge, you may use the following command.\\
+
+\noindent\cs{annotatedattack [\oopt{options}] \{\mopt{argId1}\} \{\mopt{argId2}\} \{\mopt{value}\}}
+\begin{description}
+ \item[\oopt{options}] Optional \tikzname parameters. Must also include one of the following parameters to specify placement of the annotation relative to the attack arrow: \textsf{above}, \textsf{below}, \textsf{left}, \textsf{right}.
+ \item[\mopt{arg1}] Identifier of the attacking argument.
+ \item[\mopt{arg2}] Identifier of the attacked argument.
+ \item[\mopt{value}] The text that is annotated.\\
+\end{description}
+
+As an alternative to the standard attack arrow, you can use the following command.\\
+
+\noindent\cs{support [\oopt{options}] \{\mopt{argId1}\} \{\mopt{argId2}\}}
+\begin{description}
+ \item[\oopt{options}] (optional) a list of \tikzname style parameters.
+ \item[\mopt{arg1}] Identifier of the supporting argument.
+ \item[\mopt{arg2}] Identifier of the supported argument.\\
+\end{description}
+
+\newpage
+Some useful style options for the attacks (and other edges) are listed below:
-
-\subsubsection{Attack Styling}
- To customize an attack you can provide additional optional parameters:
- \begin{align*}
- \mathsf{inactive} &\quad \text{The attack is displayed in grey.}\\
- \mathsf{incomplete} &\quad \text{The attack is displayed with a dotted line.}\\
- \mathsf{invisible} &\quad \text{The attack is completely transparent.}\\
- \mathsf{selfattack} &\quad \text{Use if source and target of the attack are the same node.}\\
- \mathsf{bend~right} &\quad \text{The attack arrow is bent to the right.}\\
+\begin{table}[ht]
+ \centering
+ \begin{tabular}{ll}
+ \textsf{inactive} &\quad \text{The attack is displayed in grey.}\\
+ \textsf{incomplete} &\quad \text{The attack is displayed with a dotted line.}\\
+ \textsf{invisible} &\quad \text{The attack is completely transparent.}\\
+ \textsf{selfattack} &\quad \text{Use if source and target of the attack are the same node.}\\
+ \textsf{bend~right} &\quad \text{The attack arrow is bent to the right.}\\
&\quad \text{Can additionally provide the angle, e.\,g., \textsf{bend~right=40}.}\\
- \mathsf{bend~left} &\quad \text{The attack arrow is bent to the left. Can also provide an angle.}\\
- \end{align*}
-
- Of course, all \tikzname style parameters can be used here as well.
+ \textsf{bend~left} &\quad \text{The attack arrow is bent to the left. Can also provide an angle.}
+ \end{tabular}
+ \caption{Some useful style options for the \cs[0cm]{attack} (and related) commands. For the exact definition see Section~\ref{sec:parameters}.}
+ \label{tab:attack_style}
+\end{table}
- \begin{example}~
- \begin{verbatim}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
- \argument[right=of arg2]{arg3}{c}
- \argument[right=of arg3]{arg4}{d}
-
- \attack{arg1}{arg2}
- \attack[bend right]{arg2}{arg3}
- \attack[bend left=10,inactive]{arg3}{arg4}
- \end{af}
- \end{verbatim}
+\begin{example}~
- \begin{center}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
- \argument[right=of arg2]{arg3}{c}
- \argument[right=of arg3]{arg4}{d}
-
- \attack{arg1}{arg2}
- \attack[bend right]{arg2}{arg3}
- \attack[bend left=10,inactive]{arg3}{arg4}
+ \begin{minipage}{0.3\textwidth}
+ \centering
+ \begin{af}[namestyle=math]
+ \argument{a}
+ \argument[right=of a1]{b}
+ \argument[below=of a1]{c}
+ \argument[right=of a3]{d}
+
+ \attack{a3}{a1}
+ \selfattack[incomplete]{a3}
+ \dualattack{a1}{a2}
+ \annotatedattack[right]{a2}{a4}{$x$}
+ \support[bend left]{a4}{a3}
\end{af}
- \end{center}
- \end{example}
+ \end{minipage}%
+ \begin{minipage}{0.7\textwidth}
+ \begin{verbatim}
+ \begin{af}[namestyle=math]
+ ...
+
+ \attack{a3}{a1}
+ \selfattack[incomplete]{a3}
+ \dualattack{a1}{a2}
+ \annotatedattack[right]{a2}{a4}{$x$}
+ \support[bend left]{a4}{a3}
+ \end{af}
+ \end{verbatim}
+ \end{minipage}
+\end{example}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Beamer}\label{sec:beamer}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Most commands provided by the \argumentation package support \emph{overlay specifications} used for creating presentations with \textsf{beamer}\footnote{\url{https://tug.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf}}.
+To specify overlay information, use \verb|<X>| directly after the command name, where \verb|X| is for instance a number, a list of numbers or any other form of overlay specification (see \textsf{beamer} documentation for more information).
+All commands for creating AFs introduced so far support overlay specifications.
+
+\begin{example}~
+\begin{verbatim}
+\begin{frame}{Example AF}
+\begin{af}
+ \argument<1>{a} % Argument visible on slide 1
+ \argument<1,2>[right=of a1]{b} % Argument visible on slides 2 and 3
+ \argument<2-4>[right=of a2]{c} % Argument visible on slides 2 to 4
+
+ \attack<2->{a2}{a3} % Attack is visible on slide 2
+ % and any following slides
+\end{af}
+\end{frame}
+\end{verbatim}
+\end{example}
+
+In accordance with the \textsf{beamer} cover types, the \argumentation package provides the two cover modes: \textsf{transparent} and \textsf{invisible}.
+In \textsf{transparent} mode arguments and attacks that are inactive on a slide are rendered in gray, and in \textsf{invisible} mode they are completely invisible on inactive slides.
- Additionally, there is a shortcut for creating a symmetric attack between two arguments with
+\subsubsection{Experimental Features}
+\textbf{Warning: The following features are experimental and the performance is not necessarily optimized yet.}
+If you want to reuse (parts of) previously created argumentation frameworks in some form, the \argumentation package provides some useful commands that can be enabled via the package option $\textsf{beamer}{=}\textsf{true}$.
+While primarily intended for the use inside the $\textsf{beamer}$ document class when creating presentations, the commands also work in any other document class.
+Each command required the label of some argumentation framework and a list of argument IDs of that framework and then creates a copy of that framework, with some changes depending on the command.\\
+
+\noindent\cs{aflabeling \{\mopt{af-label}\} \{\mopt{argument list}\}}
\noindent
- \verb|\dualattack{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}|\\
+ Applies the style parameter \textsf{accepted} to all arguments in \mopt{argument list}, the parameter \textsf{rejected} to those attacked by arguments in \mopt{argument list} and \textsf{undecided} to all other arguments.\\
+
+\noindent\cs{afextension \{\mopt{af-label}\} \{\mopt{argument list}\}}
\noindent
- and a shortcut for a self-attack for an argument with
+ Applies the style parameter \textsf{accepted} to all arguments in \mopt{argument list}.\\
+
+\noindent\cs{afreduct \{\mopt{af-label}\} \{\mopt{argument list}\}}
\noindent
- \verb|\selfattack{|\opt{arg1}\verb|}|\\
+ Applies the style parameter \textsf{inactive} to all arguments in \mopt{argument list} and those attacked by them.
+ All attacks involving at least one such argument also receive the parameter \textsf{inactive}.\\
+
+\noindent\cs{afrestriction \{\mopt{af-label}\} \{\mopt{argument list}\}}
\noindent
- For both commands, you can use the same optional parameters as for the \verb|\attack| command.
+ Applies the style parameter \textsf{invisible} to all arguments \emph{not} in \mopt{argument list}.
+ All attacks involving at least one such argument also receive the parameter \textsf{invisible}.\\
- \begin{example}~
- \begin{verbatim}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
+
+See Figure~\ref{fig:beamer} for some examples.
+
+\begin{figure}[!ht]
+ %\setafstyle{small}
+ \setargumentstyle{argument thick}
+ %\centering
+ \begin{subfigure}{0.48\textwidth}
+ \centering
+ \begin{af*}[namestyle=monospace]
+ \aflabeling{af:example}{a1}
+ \end{af*}
+ \caption{Result of \cs[0cm]{aflabeling\{af:example\}\{a1\}}.}
+ \end{subfigure}
+ \begin{subfigure}{0.48\textwidth}
+ \centering
+ \begin{af*}[namestyle=monospace]
+ \afextension{af:example}{a1,a3}
+ \end{af*}
+ \caption{Result of \cs[0cm]{afextension\{af:example\}\{a1,a3\}}.}
+ \end{subfigure}
+
+ \par\bigskip
- \selfattack{arg1}
- \dualattack{arg1}{arg2}
- \end{af}
- \end{verbatim}
+ \begin{subfigure}{0.48\textwidth}
+ \centering
+ \begin{af*}[namestyle=monospace]
+ \afreduct{af:example}{a2}
+ \end{af*}
+ \caption{Result of \cs[0cm]{afreduct\{af:example\}\{a2\}}.}
+ \end{subfigure}
+ \begin{subfigure}{0.48\textwidth}
+ \centering
+ \begin{af*}[namestyle=monospace]
+ \afrestriction{af:example}{a3,a4}
+ \end{af*}
+ \caption{Result of \cs[0cm]{afrestriction\{af:example\}\{a3,a4\}}.}
+ \end{subfigure}
+ \caption{Example usage of the four commands provided by the \textsf{beamer} package option.}
+ \label{fig:beamer}
+\end{figure}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Other Commands}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+The \argumentation package also provides some additional features.
+The following command can be used to create a text annotation next to an argument node in the argumentation framework.
+The annotation we be placed above the argument node, to adjust its position you should use \texttt{xshift} and \texttt{yshift}.\\
+
+\noindent\cs{annotation [\oopt{options}] \{\mopt{argId}\} \{\mopt{value}\}}
+\begin{description}
+ \item[\oopt{options}] Optional \tikzname style parameters.
+ \item[\mopt{argId}] Identifier of the argument.
+ \item[\mopt{value}] The annotation text.\\
+\end{description}
+
+The command \cs[0cm]{afname} can be used to create a simple text node inside the AF.
+Mainly intended to add the name of the AF into the picture, you can generally put any text there.
+The command behaves essentially exactly like the \cs[0cm]{argument} command.\\
+
+\noindent\cs{afname [\oopt{options}] (\popt{id}) \{\mopt{name}\} at (\popt{posX}, \popt{posY})}
+\begin{description}
+ \item[\oopt{options}] (optional) a list of \tikzname style parameters and/or relative positioning parameters.
+ \item[\popt{id}] (optional) Identifier of the text node. If omitted the identifier will be \textsf{caption}.
+ \item[\mopt{text}] Text to be displayed.
+ \item[\popt{posX},\popt{posY}] (optional) the coordinates for placement. Omit if using relative positioning.
+\end{description}
+
+If you want to define your own style for arguments, attacks or supports, you may use one of the following commands to override the package-wide settings to your liking.
+For that you may also reuse some of the pre-defined parameters of the \argumentation package (see Section~\ref{sec:parameters}).\\
+
+\noindent\cs{setargumentstyle \{\mopt{style parameters}\}}
- \begin{center}
+\noindent\cs{setatackstyle \{\mopt{style parameters}\}}
+
+\noindent\cs{setsupportstyle \{\mopt{style parameters}\}}\\
+
+Similarly, you can also use the following command to override the default settings of the \texttt{af} environment, e.\,g., the \texttt{node distance}.\\
+
+\noindent\cs{setafstyle \{\mopt{style parameters}\}}\\
+
+Finally, when using the $\textsf{argumentstyle}{=}\emph{colored}$ package option, you may use the following command to set the color scheme.\\
+
+\noindent\cs{setargumentcolorscheme \{\mopt{outer color}\} \{\mopt{inner color}\}}
+
+\begin{example}~
+
+ \begin{minipage}{0.22\textwidth}
+ \centering
+ \setargumentstyle{argument thick,text=blue}
+ \setafstyle{node distance=0.75cm}
\begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
-
- \selfattack{arg2}
- \dualattack{arg1}{arg2}
+ \label{af:8}
+ \argument{a}
+ \argument[right=of a1]{b}
+ \argument[below=of a1]{c}
+ \argument[right=of a3]{d}
+
+ \annotation[yshift=-0.2cm]{a4}{$\top$}
+ \afname{$F_{\ref{af:8}}$} at (-1,-0.75)
+
+ \attack{a1}{a2}
+ \dualattack{a1}{a3}
+ \attack{a4}{a3}
\end{af}
- \end{center}
- \end{example}
-
+ \end{minipage}%
+ \begin{minipage}{0.7\textwidth}
+ \begin{verbatim}
+ \setargumentstyle{argument thick,text=blue}
+ \setafstyle{node distance=0.75cm}
+ \begin{af}\label{af:8}
+ ...
+
+ \annotation[yshift=-0.2cm]{a4}{$\top$}
+ \afname{$F_{\ref{af:8}}$} at (-1,-0.75)
+ \end{af}
+ \end{verbatim}
+ \end{minipage}
+\end{example}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection{Argumentation Macros}\label{sec:macros}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+To facilitate referencing argumentation frameworks and working with them in general, the \argumentation package provides some additional macros that can be enabled with the package option \textsf{macros=true}.
+Most importantly, there is the macro \verb|\afref{|\sopt{label}\verb|}| which works like the \verb|ref| command but adds the reference number directly into the index of the \verb|\AF| symbol.
+You may redefine any of the first four commands if you prefer a different naming scheme for AFs.
+
+\begin{table}[ht]
+ \centering
+ \begin{tabular}{lll}
+ \verb|\AF|&& \AF \\
+ \verb|\arguments|&& \arguments\\
+ \verb|\attacks|&&\attacks\\
+ \verb|\AFcomplete|&&\AFcomplete\\
+ \verb|\afref{af:example}|&&\afref{af:example}\\
+ \verb|\fullafref{af:example}|&\qquad\qquad\qquad&\fullafref{af:example}
+ \end{tabular}
+ \caption{Macros provided by the package option \textsf{macros=true} and their respective output.}
+ \label{tab:macros}
+\end{table}
-\subsection{Supports}
- You can create a support relation between two arguments with the command\\
+\newpage
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Package Options}\label{sec:options}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+The \argumentation package comes with some package options to customize the appearance of the created argumentation frameworks as well as some additional features.
+All style package options can both be set globally when importing the package and also locally for each \texttt{af} environment.
+To import the \argumentation package, use the following command in the preamble of your \LaTeX-document:\\
- \noindent
- \verb|\support{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}|
-
- \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item where \opt{arg1} and \opt{arg2} are the identifiers of two previously defined arguments.
- The support arrow use the same tip as the attack arrows, but have a perpendicular mark to distinguish them from attacks.
- Supports can be customized in the same way as attacks.
- \end{list}
- \begin{example}~
- \begin{verbatim}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
- \argument[right=of arg2]{arg3}{c}
-
- \support{arg1}{arg2}
- \support[bend right]{arg2}{arg3}
- \end{af}
- \end{verbatim}
+\noindent\cs[0cm]{usepackage[\oopt{options}]\{argumentation\}}\\
- \begin{center}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
- \argument[right=of arg2]{arg3}{c}
+The following package options are currently available:
+
+\begin{description}
+ \item[argumentstyle] (default \texttt{standard}) Globally sets the appearance of the argument nodes.
+ The \argumentation package provides five options: \texttt{standard}, \texttt{large}, \texttt{thick}, \texttt{gray} and \texttt{colored}.
+ Detailed descriptions of these options can be found below.
+
+ \item[attackstyle] (default \texttt{standard}) Globally sets the appearance of the attack edges.
+ The package comes with three available options: \texttt{standard}, \texttt{large} and \texttt{modern}.
+ Detailed descriptions of these options can be found below.
+
+ \item[supportstyle] (default \texttt{standard}) Globally sets the appearance of the support edges.
+ The package comes with three available options: \texttt{standard}, \texttt{dashed} and \texttt{double}.
+ Detailed descriptions of these options can be found below.
+
+ \item[namestyle] (default \texttt{none}) Sets the text formatting applied to the argument names in the document.
+ The package comes with five available options: \texttt{none}, \texttt{math}, \texttt{bold}, \texttt{monospace} and \texttt{monoemph}.
+ Detailed descriptions of these options can be found below.
- \support{arg1}{arg2}
- \support[bend right]{arg2}{arg3}
- \end{af}
- \end{center}
- \end{example}
+ \item[indexing] (default \texttt{numeric}) Enables or disables automatic generation of \tikzname node-IDs for the created arguments.
+ The available options are: \texttt{none}, \texttt{numeric} and \texttt{alphabetic}.
+ Under the default numeric indexing the generated argument IDs are of the form $a1, a2, \dots$.
+ With alphabetic indexing the IDs will simply be letters: $a,b,\dots$.
+ If \texttt{none} is selected, no IDs will be generated and you are required to provide them for each argument via the parameter \texttt{(\popt{id})} of the \verb|\argument| command.
+
+ \item[macros] Boolean (default \texttt{false}) When enabled provides additional macros for naming and referencing argumentation frameworks (see Table~\ref{tab:macros}).
+ \item[beamer] Boolean (default \texttt{false}) When enabled, provides the commands for recreating argumentations frameworks described in Section~\ref{sec:beamer}.
+\end{description}
-\subsection{Annotated Attacks}
- Many extensions of the original abstract argumentation framework rely on attacks with an associated value.
- This may, for instance, be probabilities in the case of probabilistic argumentation frameworks or numerical weights in the case of weighted argumentation frameworks.
- These annotations can be added manually via \tikzname or via the following command\\
+In the following we give an overview of the different options for the style parameters that can be used to customise the created argumentation frameworks.
+For the exact definitions of these parameters, refer to Section~\ref{sec:parameters}.
- \noindent
- \verb|\annotatedattack{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}{|\opt{value}\verb|}|
+\newpage
+\paragraph{\sffamily argumentstyle=\mopt{option}}
+\begin{align*}
+ \mathsf{standard} &\quad \text{Circular argument node with normal size argument name.}\\
+ \mathsf{large} &\quad \text{Larger font of the argument name.}\\
+ \mathsf{thick} &\quad \text{Thick black outline and normal size argument name.}\\
+ \mathsf{gray} &\quad \text{Thick gray outline, light gray background.}\\
+ \mathsf{colored} &\quad \text{Thick blue outline, light blue background.}
+\end{align*}
+
+\begin{figure}[!h]
+ \begin{subfigure}{0.32\textwidth}
+ \centering
+ \begin{af}[argumentstyle=standard]
+ \argument{a}
+ \argument[right=of a1]{b}
- \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item where \opt{arg1} and \opt{arg2} are the identifiers of two previously defined arguments and \opt{value} is the number or string that should be annotated to the attack.
- With this command, the annotation is placed above the attack arrow.
- \end{list}
-
- \begin{example}~
- \begin{verbatim}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
- \argument[right=of arg2]{arg3}{c}
+ \attack[]{a1}{a2}
+ \label{af:test}
+ \end{af}
+ \caption{\textsf{argumentstyle}=\textit{standard}}
+ \label{fig:argumentstyle_standard}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.3\textwidth}
+ \centering
+ \begin{af}[argumentstyle=large]
+ \argument{a}
+ \argument[right=of a1]{b}
- \annotatedattack{arg1}{arg2}{$x$}
- \annotatedattack[bend right]{arg2}{arg3}{$0.6$}
- \end{af}
- \end{verbatim}
-
- \begin{center}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
- \argument[right=of arg2]{arg3}{c}
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{argumentstyle}=\textit{large}}
+ \label{fig:argumentstyle_large}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.3\textwidth}
+ \centering
+ \begin{af}[argumentstyle=thick]
+ \argument{a}
+ \argument[right=of a1]{b}
- \annotatedattack{arg1}{arg2}{$x$}
- \annotatedattack[bend right]{arg2}{arg3}{$0.6$}
- \end{af}
- \end{center}
- \end{example}
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{argumentstyle}=\textit{thick}}
+ \label{fig:argumentstyle_thick}
+ \end{subfigure}
-\subsection{Further Commands}
- If you want to display an identifier for your argumentation framework in the picture, you can use the command\\
+ \par\bigskip
- \noindent
- \verb|\afname{|\opt{id}\verb|}{|\opt{name}\verb|}|
+ \begin{subfigure}{0.49\textwidth}
+ \centering
+ \begin{af}[argumentstyle=gray]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{argumentstyle}=\textit{gray}}
+ \label{fig:argumentstyle_gray}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.49\textwidth}
+ \centering
+ \begin{af}[argumentstyle=colored]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{argumentstyle}=\textit{colored}}
+ \label{fig:argumentstyle_colored}
+ \end{subfigure}
+
+ \caption{Available options for \textsf{argumentstyle}.}
+ \label{fig:argumentstyle}
+\end{figure}
- \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item where \opt{id} is an identifier for the created node and \opt{name} is the text displayed in the picture.
- Additionally, positioning information can be provided via the optional parameters.
- \end{list}
- \noindent
- To create an annotation, e.\,g., an acceptance condition or a weight, next to an argument, the following command can be used.\\
+\paragraph{\sffamily attackstyle=\mopt{option}}
- \noindent
- \verb|\annotation{|\opt{arg\_id}\verb|}{|\opt{text}\verb|}|
+\begin{align*}
+ \mathsf{standard} &\quad \text{Standard 'stealth' \tikzname arrow tip.}\\
+ \mathsf{large} &\quad \text{Arrow tip is larger and sharper.}\\
+ \mathsf{modern} &\quad \text{\tikzname ModernCS arrow tip.}
+\end{align*}
+
+\begin{figure}[!h]
+ \begin{subfigure}{0.32\textwidth}
+ \centering
+ \begin{af}[attackstyle=standard]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{attackstyle}=\textit{standard}}
+ \label{fig:attackstyle_standard}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.3\textwidth}
+ \centering
+ \begin{af}[attackstyle=large]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{attackstyle}=\textit{large}}
+ \label{fig:attackstyle_large}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.3\textwidth}
+ \centering
+ \begin{af}[attackstyle=modern]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{attackstyle}=\textit{modern}}
+ \label{fig:attackstyle_thick}
+ \end{subfigure}
+ \caption{Available options for \textsf{attackstyle}.}
+ \label{fig:attackstyle}
+\end{figure}
- \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
- \item where \opt{arg\_id} is the identifier of some argument and \opt{text} is the text to be displayed.
- Additionally, positioning information, via \textsf{xshift} or \textsf{yshift}, can be provided via the optional parameters.
- \end{list}
- \begin{example}~
- \begin{verbatim}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
- \afname[left=of arg1]{caption}{$F:$}
- \annotation[yshift=-0.4cm,xshift=0.4cm]{arg2}{$\neg a$}
+\paragraph{\sffamily supportstyle=\mopt{option}}
- \attack{arg1}{arg2}
- \end{af}
- \end{verbatim}
+\begin{align*}
+ \mathsf{standard} &\quad \text{Same tip as attack arrow, perpendicular mark on arrow line.}\\
+ \mathsf{dashed} &\quad \text{Dashed arrow line and same tip as attack arrow.}\\
+ \mathsf{double} &\quad \text{Double arrow line and large flat tip.}
+\end{align*}
+
+\begin{figure}[!h]
+ \begin{subfigure}{0.32\textwidth}
+ \centering
+ \begin{af}[supportstyle=standard]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \support[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{supportstyle}=\textit{standard}}
+ \label{fig:supportstyle_standard}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.3\textwidth}
+ \centering
+ \begin{af}[supportstyle=dashed]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \support[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{supportstyle}=\textit{dashed}}
+ \label{fig:supportstyle_dashed}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.3\textwidth}
+ \centering
+ \begin{af}[supportstyle=double]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \support[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{supportstyle}=\textit{double}}
+ \label{fig:supportstyle_double}
+ \end{subfigure}
+ \caption{Available options for \textsf{supportstyle}. Note that for \textit{standard} and \textit{dashed} the arrow tip of the selected \textsf{attackstyle} will be used.}
+ \label{fig:supportstyle}
+\end{figure}
- \begin{center}
- \begin{af}
- \argument{arg1}{a}
- \argument[right=of arg1]{arg2}{b}
- \afname[left=of arg1]{caption}{$F:$}
- \annotation[yshift=-0.4cm,xshift=0.4cm]{arg2}{$\neg a$}
+
+\paragraph{\sffamily namestyle=\mopt{option}}
+
+\begin{align*}
+ \mathsf{none} &\quad \text{No effect applied to argument name.}\\
+ \mathsf{math} &\quad \text{The argument name is rendered as $math$ text.}\\
+ &\quad\quad \text{(name must be given without mathmode).}\\
+ \mathsf{bold} &\quad \text{The argument name is rendered in $\boldsymbol{bold}$.}\\
+ &\quad\quad \text{(name must be given without mathmode).}\\
+ \mathsf{monospace} &\quad \text{The argument name is rendered in \texttt{monospace} font.}\\
+ &\quad\quad \text{(name must be given without mathmode).}\\
+ \mathsf{monoemph} &\quad \text{The argument name is rendered as {\ttfamily\emph{name}}.}
+\end{align*}
+
+\begin{figure}[!ht]
+ \begin{subfigure}{0.32\textwidth}
+ \centering
+ \begin{af}[namestyle=none]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{namestyle}=\textit{none}}
+ \label{fig:namestyle_none}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.32\textwidth}
+ \centering
+ \begin{af}[namestyle=math]
+ \argument{a}
+ \argument[right=of a1]{b}
- \support{arg1}{arg2}
- \end{af}
- \end{center}
- \end{example}
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{namestyle}=\textit{math}}
+ \label{fig:namestyle_math}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.32\textwidth}
+ \centering
+ \begin{af}[namestyle=bold]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{namestyle}=\textit{bold}}
+ \label{fig:namestyle_bold}
+ \end{subfigure}
+ \hfill
+ \par\bigskip
+ \begin{subfigure}{0.49\textwidth}
+ \centering
+ \begin{af}[namestyle=monospace]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{namestyle}=\textit{monospace}}
+ \label{fig:namestyle_monospace}
+ \end{subfigure}
+ \hfill
+ \begin{subfigure}{0.49\textwidth}
+ \centering
+ \begin{af}[namestyle=monoemph]
+ \argument{a}
+ \argument[right=of a1]{b}
+
+ \attack[]{a1}{a2}
+ \end{af}
+ \caption{\textsf{namestyle}=\textit{monoemph}}
+ \label{fig:namestyle_monoemph}
+ \end{subfigure}
+ \caption{Available options for \textsf{namestyle}. You can of course apply any formatting yourself when using the default \textsf{namestyle}=\textit{none}.}
+ \label{fig:namestyle}
+\end{figure}
-%\section{Style Definitions}
+\newpage
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Style Parameter Reference}\label{sec:parameters}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+For reference, the style parameters provided by this package are listed below.
+You may use or redefine them at your own discretion.
+\begin{table}[ht]
+ \centering
+ \ttfamily
+ \begin{tabular}{l|l}
+ \toprule
+ \tikzname-keyword & style parameters \\
+ \midrule
+ \textsf{argument size} & \emph{contains the currently selected argument size}\\
+ \textsf{argument} & \emph{contains the currently selected argument style and size}\\
+ \textsf{argument standard} & circle,inner sep=0,outer sep=0,draw=black\\
+ \textsf{argument large} & circle,inner sep=0,outer sep=0,draw=black,font=\verb|\|large\\
+ \textsf{argument thick} & circle,inner sep=0,outer sep=0,draw=black,line width=0.1em\\
+ \textsf{argument gray} & argument thick,fill=gray!30,draw=gray!65,text=black!80\\
+ \textsf{argument colored} & argument thick,fill=aigblue!40,draw=aigblue!80,text=black!80\\
+ \midrule
+ \textsf{attack} & \emph{contains the currently selected attack style}\\
+ \textsf{attack standard} & -\{stealth'\}\\
+ \textsf{attack large} & -\{Stealth[scale=1.25]\}\\
+ \textsf{attack modern} & -\{To[sharp,length=0.65ex,line width=0.05em]\}\\
+ \textsf{selfattack} & loop,min distance=0.4em,in=0,out=60,looseness=4.5\\
+ \midrule
+ \textsf{support} & \emph{contains the currently selected support style}\\
+ \textsf{support standard} & attack,postaction=\{decorate,decoration=\{\dots\}\}\\
+ \textsf{support dashed} & attack,densely dashed\\
+ \textsf{support double} & -\{Classical TikZ Rightarrow\},double\\
+ \midrule
+ \textsf{inactive} & fill=none,draw=gray!50,text=gray!60\\
+ \textsf{incomplete} & densely dashed\\
+ \textsf{accepted} & fill=green!40\\
+ \textsf{rejected} & fill=red!40\\
+ \textsf{undecided} & fill=cyan!40\\
+ \textsf{highlight} & fill=aigyellow!60\\
+ \textsf{invisible} & draw=none,fill=none,opacity=0.0\\
+ \midrule
+ \textsf{standard} & node distance=6.6ex,argument size/.style={minimum size=4.5ex},\\
+ & attack width/.style={line width=0.05em}\\
+ \textsf{small} & node distance=3.5ex,argument size/.style={minimum size=3.4ex},\\
+ & attack width/.style={line width=0.045em}\\
+ \textsf{tiny} & node distance=2.3ex,argument size/.style={minimum size=2.6ex,}\\
+ & attack width/.style={line width=0.03em},font=\verb|\small|\\
+ \bottomrule
+ \end{tabular}
+ \caption{Reference list of \tikzname-style parameters provided by the \argumentation package.}
+ \label{tab:styles}
+ \end{table}
\newpage
-\section{Version History}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Version History}\label{sec:history}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection*{[v1.5 2025/02/09]}
+\begin{itemize}
+ \item Added support for beamer overlay specifications to \verb|\argument{ }|, \verb|\attack{ }{ }| and related commands.
+ \item Added \textsf{covered} parameter for \texttt{af} environment to select between \textit{transparent} and \textit{invisible} rendering of inactive arguments/attacks on slides.
+ \item Bugfix related to experimental beamer commands.
+\end{itemize}
-\subsection*{[v1.0 2023/11/05]}
+\subsection*{[v1.4 2024/10/31]}
\begin{itemize}
- \item First Version.
+ \item Added functions \verb|\aflabeling|, \verb|\afextension|, \verb|\afreduct| and \verb|\afrestriction| that recreate (parts of) previously created argumentation frameworks. Can be enabled via the package option \textsf{beamer=true}.
+ \item Added internal storage of arguments and attacks of an argumentation framework to enable further computations.
+ \item Added environment \verb|af*| for argumentation frameworks that are unlabeled/uncounted.
+ \item Added command \verb|\setargumentcolorscheme{ }{ }| to change color scheme of the \textsf{colored} argument style.
+ \item Added command \verb|\setafstyle{ }| to set global style options for the AFs.
+ \item Added optional parameter (\popt{value}) to \verb|\attack| command to add a label to the attack edge (undocumented for now).
+ \item Major revision of the documentation.
+ \item Various minor changes to internal functions, naming scheme and comments.
+\end{itemize}
+\subsection*{[v1.3 2024/09/25]}
+\begin{itemize}
+ \item Added support for \verb|\label{ }| and \verb|\ref{ }| to \texttt{af} environment.
+ \item Added commands \verb|\AF|, \verb|\arguments|, \verb|\attacks| and \verb|\AFcomplete| to facilitate consistent naming of AFs. Have to be loaded with the package option \textsf{macros=true}.
+ \item Added commands \verb|\afref{ }| and \verb|\fullafref{ }| to reference AFs.
+ \item adjusted scaling of nodes and arrows for larger page sizes.
+ \item added new style options for arguments.
+ \item Various minor fixes and changes regarding the \textsf{namestyle} package option.
+\end{itemize}
+
+\subsection*{[v1.2 2024/06/07]}
+\begin{itemize}
+ \item Changed Syntax of \verb|\argument| command. The \textit{id} parameter is now given inside parenthesis instead of curly braces and is optional.
+ \item Added absolute positioning to \verb|\argument| command, like for \tikzname nodes.
+ \item Added package option $\textsf{indexing}$ to toggle automatic generation of identifiers for created argument nodes. Can be set to \textit{none}, or selected between \textit{alphabetic} and \textit{numeric} (default).
+ \item All package style options can now also be set locally in the \texttt{af} environment.
+ \item Adjusted \verb|\annotatedattack| to require position parameter.
+ \item Various minor bugfixes regarding the \textsf{namestyle} package option.
+ \item Added new argumentstyle \textsf{large}.
\end{itemize}
\subsection*{[v1.1 2023/12/03]}
@@ -596,4 +1142,9 @@ While the following commands are intended to be used inside the \texttt{af} envi
\item Updated and improved documentation.
\end{itemize}
-\end{document}
+\subsection*{[v1.0 2023/11/05]}
+\begin{itemize}
+ \item First Version.
+\end{itemize}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/argumentation/argumentation.sty b/graphics/pgf/contrib/argumentation/argumentation.sty
index 7cd678de3c..e7c42ece84 100644
--- a/graphics/pgf/contrib/argumentation/argumentation.sty
+++ b/graphics/pgf/contrib/argumentation/argumentation.sty
@@ -1,109 +1,655 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{argumentation}[2023/12/03 Argumentation]
+\ProvidesPackage{argumentation}[2025/02/09 Argumentation]
% Author: Lars Bengel
% E-Mail: lars.bengel@fernuni-hagen.de
-% Version: 1.1
-% Date: 2023/12/03
+% Version: 1.5
+% Date: 2025/02/09
% License: LaTeX Project Public License 1.3c
-%%%%%%%%%%% Package Requirements %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage{pgfopts} % For managing package options
-\RequirePackage{tikz} % For drawing the argumentation frameworks
-\usetikzlibrary{positioning} % For relative node positioning
-\usetikzlibrary{arrows.meta} % For directed edges / attack arrows
-\usetikzlibrary{arrows} % For directed edges / attack arrows
-\usetikzlibrary{decorations.markings} % For creating the support edge markings
-\newcommand{\argstyle}[1]{#1} % Defines the font style in which argument names are displayed
+%%%%%%%%%%% Package Requirements %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{amsbsy,amsmath} % Proper bold letters in math mode
+\RequirePackage{pgfopts} % Managing package options
+\RequirePackage{etoolbox} % Internal list handling
+\RequirePackage{refcount} % Expandable ref-counter value
+\RequirePackage{xspace} % Dynamic spaces after math commands
+\RequirePackage{xcolor} % Defining colors
+\RequirePackage{tikz} % Drawing the argumentation frameworks
+\usetikzlibrary{positioning} % Relative node positioning
+\usetikzlibrary{arrows.meta} % Directed edges / attack arrows
+\usetikzlibrary{arrows} % Directed edges / attack arrows
+\usetikzlibrary{decorations.markings} % Creating the support edge markings
-%%%%%%%%%% Package Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfkeys{/argumentation/argumentstyle/.is choice,
- /argumentation/argumentstyle/standard/.code={\tikzset{argument/.style={circle,draw=black,inner sep=0,outer sep=0}}},
- /argumentation/argumentstyle/custom/.code={},
- /argumentation/argumentstyle=standard,
+
+%%%%%%%%%%% Package Style Definitions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Color definitions
+\definecolor{aigyellow}{RGB}{210,149,81} % Highlight color
+\definecolor{aigblue}{RGB}{0,76,151} % Node color
+
+%%% Argument Style Definitions
+\tikzset{
+ argument size/.style={}, % Size of argument nodes
+ argument/.style={}, % Base style for argument nodes
+ argument standard/.style={circle,draw=black,inner sep=0,outer sep=0}, % Standard argument style
+ argument large/.style={circle,draw=black,inner sep=0,outer sep=0, font=\large}, % Large argument style
+ argument thick/.style={circle,draw=black,inner sep=0,outer sep=0, line width=0.1em}, % Thick outline argument style
+ argument gray/.style={argument thick,fill=gray!30,draw=gray!65,text=black!80}, % Gray argument style
+ argument colored/.style={argument thick,fill=aigblue!40,draw=aigblue!80}, % Colored argument stlye
+}
+
+%%% Attack/Support Edge Definitions
+\tikzset{
+ attack width/.style={}, % Width of attack arrows
+ attack/.style={}, % Base style for attack arrow
+ attack standard/.style={-{stealth'}}, % Standard attack arrow
+ attack large/.style={-{Stealth[scale=1.25]}}, % Larger arrow tip
+ attack modern/.style={-{To[sharp,length=0.65ex,line width=0.05em]}}, % Mordern rightarrow style tip
+ support/.style={}, % Base style for support
+ support standard/.style = {attack, postaction = {decorate,decoration={markings,mark=at position 0.36 with {\draw[-] (0,-0.1) -- (0.1,0.1);}}}}, % Standard support arrow
+ support dashed/.style={attack,densely dashed}, % Dashed Support arrow
+ support double/.style={-{Classical TikZ Rightarrow},double}, % double-line support arrow
+}
+
+%%% Additional Style Parameters
+\tikzset{
+ selfattack/.style={loop,min distance=0.4em,in=0,out=60,looseness=4.5}, % Self-attack
+ inactive/.style={fill=none,draw=gray!50,text=gray!60}, % Inactive argument or edge (reduct)
+ incomplete/.style={densely dashed}, % incomplete argument or edge
+ accepted/.style={fill=green!40}, % Accepted argument (in)
+ rejected/.style={fill=red!40}, % Rejected argument (out)
+ undecided/.style={fill=cyan!40}, % Undecided Argument (undec)
+ highlight/.style={fill=aigyellow!60}, % Highlighted argument
+ caption/.style={draw=none}, % Caption or text
+ invisible/.style={draw=none,fill=none,opacity=0.0}, % Invisible argument or edge
+ annotation/.style={font=\small}, % Argument annotation
+ argin/.style={accepted},
+ argout/.style={rejected},
+ argundec/.style={undecided},
+}
+
+%%% Style-Options for af environment
+\pgfkeys{/tikz/.cd,
+ af/.style={}, % Base style for af
+ standard/.style={node distance=6.6ex,argument size/.style={minimum size=4.5ex},attack width/.style={line width=0.05em}}, % Standard size style for af
+ small/.style={node distance=3.5ex,argument size/.style={minimum size=3.4ex},attack width/.style={line width=0.045em},caption/.append style={font=\small}}, % Small size style for af
+ tiny/.style={node distance=2.3ex,argument size/.style={minimum size=2.6ex,font=\small},attack width/.style={line width=0.03em},caption/.append style={font=\small}}, % Tiny size style for af
+}
+
+%%% Option for switching beamer cover type in af
+\makeatletter
+\newif\if@afoverlay
+\pgfkeys{/tikz/.cd,
+ covered/.is choice,
+ covered/transparent/.code={\@afoverlaytrue},
+ covered/invisible/.code={\@afoverlayfalse},
+ covered/.default=transparent,
+ covered=transparent,
}
+\makeatother
-\pgfkeys{/argumentation/attackstyle/.is choice,
- /argumentation/attackstyle/standard/.code={\tikzset{attack/.style={-{stealth'}}}},
- /argumentation/attackstyle/large/.code={\tikzset{attack/.style={-{Stealth[scale=1.25]}}}},
- /argumentation/attackstyle=standard,
+
+%%%%%%%%%% Internal Utility Functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\makeatletter
+\newif\ifmacros
+\newif\ifbeamer
+\newif\if@numericidx
+\newif\if@alphaidx
+\newif\if@insideaf
+
+%%% Defines the font style in which argument names are displayed
+\newcommand{\@arg@style}[1]{#1}
+
+%%% Auxilliary command for splitting a given pair x,y into two macros
+\def\@split@pair#1,#2\relax{%
+ \def\@attacker{#1}%
+ \def\@attacked{#2}%
}
-\pgfkeys{/argumentation/supportstyle/.is choice,
- /argumentation/supportstyle/standard/.code={\tikzset{support/.style = {attack,postaction = {decorate,decoration={markings,mark=at position 0.36 with {\draw[-] (0,-0.1) -- (0.1,0.1);}}}}}},
- /argumentation/supportstyle/dashed/.code={\tikzset{support/.style = {attack,densely dashed}}},
- /argumentation/supportstyle/double/.code={\tikzstyle{support}=[-{Classical TikZ Rightarrow},double]},
- /argumentation/supportstyle=standard,
+% Dummy command in case the beamer documentclass is not loaded
+\ProvideDocumentCommand{ \alt } {r<> m m} {#2}
+
+
+\makeatother
+
+%%%%%%%%%% Package Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Options for style of the argument node itself
+\pgfkeys{/tikz/.cd,
+ argumentstyle/.is choice,
+ argumentstyle/standard/.code={\tikzset{argument/.style={argument standard,argument size}}},
+ argumentstyle/large/.code={\tikzset{argument/.style={argument large,argument size}}},
+ argumentstyle/thick/.code={\tikzset{argument/.style={argument thick,argument size}}},
+ argumentstyle/gray/.code={\tikzset{argument/.style={argument gray,argument size}}},
+ argumentstyle/colored/.code={\tikzset{argument/.style={argument colored,argument size}}},
+}
+\pgfkeys{/argumentation/.cd,
+ .unknown/.code={},
+ argumentstyle/.is choice,
+ argumentstyle/standard/.code={\tikzset{argument/.style={argument standard,argument size}}},
+ argumentstyle/large/.code={\tikzset{argument/.style={argument large,argument size}}},
+ argumentstyle/thick/.code={\tikzset{argument/.style={argument thick,argument size}}},
+ argumentstyle/gray/.code={\tikzset{argument/.style={argument gray,argument size}}},
+ argumentstyle/colored/.code={\tikzset{argument/.style={argument colored,argument size}}},
+ argumentstyle=standard,
}
-\pgfkeys{/argumentation/namestyle/.is choice,
- /argumentation/namestyle/normal/.code={\relax},
- /argumentation/namestyle/italics/.code={\renewcommand{\argstyle}[1]{\emph{#1}}},
- /argumentation/namestyle/bold/.code={\renewcommand{\argstyle}[1]{\textbf{#1}}},
- /argumentation/namestyle/bolditalics/.code={\renewcommand{\argstyle}[1]{\emph{\textbf{#1}}}},
- /argumentation/namestyle/monospace/.code={\renewcommand{\argstyle}[1]{\texttt{#1}}},
- /argumentation/namestyle=normal,
+%%% Options for the style of the attack edges
+\pgfkeys{/tikz/.cd,
+ attackstyle/.is choice,
+ attackstyle/standard/.code={\tikzset{attack/.style={attack width,attack standard}}},
+ attackstyle/large/.code={\tikzset{attack/.style={attack width,attack large}}},
+ attackstyle/modern/.code={\tikzset{attack/.style={attack width,attack modern}}},
+ attackstyle=standard,
+}
+\pgfkeys{/argumentation/.cd,
+ attackstyle/.is choice,
+ attackstyle/standard/.code={\tikzset{attack/.style={attack width,attack standard}}},
+ attackstyle/large/.code={\tikzset{attack/.style={attack width,attack large}}},
+ attackstyle/modern/.code={\tikzset{attack/.style={attack width,attack modern}}},
+ attackstyle=standard,
+}
+
+%%% Options for the style of the support edges
+\pgfkeys{/tikz/.cd,
+ supportstyle/.is choice,
+ supportstyle/standard/.code={\tikzset{support/.style={support standard}}},
+ supportstyle/dashed/.code={\tikzset{support/.style={support dashed}}},
+ supportstyle/double/.code={\tikzset{support/.style={support double}}},
+ supportstyle=standard,
+}
+\pgfkeys{/argumentation/.cd,
+ supportstyle/.is choice,
+ supportstyle/standard/.code={\tikzset{support/.style={support standard}}},
+ supportstyle/dashed/.code={\tikzset{support/.style={support dashed}}},
+ supportstyle/double/.code={\tikzset{support/.style={support double}}},
+ supportstyle=standard,
+}
+
+%%% Options for the automatic text formatting for the argument names
+\makeatletter
+\pgfkeys{/tikz/.cd,
+ namestyle/.is choice,
+ namestyle/none/.code={\renewcommand{\@arg@style}[1]{##1}},
+ namestyle/math/.code={\renewcommand{\@arg@style}[1]{\ensuremath{##1}}},
+ namestyle/bold/.code={\renewcommand{\@arg@style}[1]{\ensuremath{\boldsymbol{##1}}}},
+ namestyle/monospace/.code={\renewcommand{\@arg@style}[1]{{\ttfamily##1}}},
+ namestyle/monoemph/.code={\renewcommand{\@arg@style}[1]{{\ttfamily\itshape##1}}},
+ namestyle=none,
+}
+\pgfkeys{/argumentation/.cd,
+ namestyle/.is choice,
+ namestyle/none/.code={\renewcommand{\@arg@style}[1]{##1}},
+ namestyle/math/.code={\renewcommand{\@arg@style}[1]{\ensuremath{##1}}},
+ namestyle/bold/.code={\renewcommand{\@arg@style}[1]{\ensuremath{\boldsymbol{##1}}}},
+ namestyle/monospace/.code={\renewcommand{\@arg@style}[1]{{\ttfamily##1}}},
+ namestyle/monoemph/.code={\renewcommand{\@arg@style}[1]{{\ttfamily\itshape##1}}},
+ namestyle=none,
+}
+
+
+%%% Option for automatic indexing of arguments
+\pgfkeys{/argumentation/.cd,
+ indexing/.is choice,
+ indexing/numeric/.code={\@numericidxtrue},
+ indexing/alphabetic/.code={\@alphaidxtrue},
+ indexing/none/.code={\@numericidxfalse\@alphaidxfalse},
+ indexing/.default=numeric,
+ indexing=numeric,
+}
+\makeatother
+
+%%% Option for enabling additional macros
+\pgfkeys{/argumentation/.cd,
+ macros/.is choice,
+ macros/true/.code={\macrostrue},
+ macros/false/.code={\macrosfalse},
+ macros/.default=true,
+ macros=false,
+}
+
+%%% Option for enabling beamer functionality
+\pgfkeys{/argumentation/.cd,
+ beamer/.is choice,
+ beamer/true/.code={\beamertrue},
+ beamer/false/.code={\beamerfalse},
+ beamer/.default=true,
+ beamer=false,
}
\ProcessPgfPackageOptions{/argumentation}
-%%%%%%%%%% Package Content %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\tikzset{ % global predefined tikz-styles
- argument size/.style={minimum size=0.7cm}, % Standard size of argument nodes
- selfattack/.style={loop,min distance=2mm,in=0,out=60,looseness=5}, % Standard style for self-attacks
- inactive/.style={draw=black!30, text=black!40}, % Make a node or edge inactive, i.e., greyed out
- incomplete/.style={densely dashed}, % Style for displaying incomplete nodes or attacks
- argin/.style={fill=green}, % Color an argument that is labelled in
- argout/.style={fill=red}, % Color an argument that is labelled out
- argundec/.style={fill=cyan}, % Color an argument that is labelled undecided
- caption/.style={draw=none}, % Style for displaying AF name in Figure
- invisible/.style={draw=none,text=black!0}, % Make a node or edge invisible
- annotation/.style={above,font=\small},
-}
-
-% Commands for setting custom tikz-style parameters (experimental)
-\newcommand{\setargumentstyle}[1]{\tikzset{argument/.style={#1}}}
-\newcommand{\setattackstyle}[1]{\tikzset{attack/.style={#1}}}
-\newcommand{\setsupportstyle}[1]{\tikzset{support/.style={#1}}}
-%\newcommand{\setloopstyle}[1]{\tikzset{selfattack/.style={#1}}}
-%\newcommand{\adjustargumentstyle}[1]{\tikzset{argument/.append style={#1}}}
-%\newcommand{\adjustattackstyle}[1]{\tikzset{attack/.append style={#1}}}
+%%%%%%%%%%%%%%% Arguments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\makeatletter
+% Internal counter for argument IDs
+\newcounter{@argument}
+
+%%% Command for creating arguments
+% #1 beamer overlay specification (optional)
+% #2 TikZ parameters (optional)
+% #3 unique argument ID (optional)
+% #4 argument display name
+% #5 ignored
+% #6 absolute positioning values (optional)
+\NewDocumentCommand { \argument } {D<>{.-} O{} d() m dat d()} {%
+ \stepcounter{@argument}
+ \IfNoValueTF {#3}{%
+ \if@alphaidx
+ \edef\@argid{\alph{@argument}}
+ \else\if@numericidx
+ \edef\@argid{a\arabic{@argument}}
+ \else
+ \PackageError{argumentation}{Missing argument ID}{Must either provide argument ID inside () or activate auto-indexing}
+ \fi\fi
+ }{%
+ \edef\@argid{#3}
+ }
+ \ifbeamer
+ \if@insideaf
+ \@make@argument{#2}{\@argid}{#4}{#5}{#6}{\arabic{af}}
+ \csname @af@\arabic{af}@arg@\@argid\endcsname{}
+ \else
+ \@create@argument{#1}{#2}{}{\@argid}{#4}{#6}
+ \fi
+ \else
+ \@create@argument{#1}{#2}{}{\@argid}{#4}{#6}
+ \fi
+}
+
+%%% Auxilliary command for creating arguments
+% #1 beamer overlay specification (optional)
+% #2 TikZ parameters (optional)
+% #3 TikZ parameters (optional)
+% #4 unique argument ID (optional)
+% #5 argument display name
+% #6 absolute positioning value (optional)
+\NewDocumentCommand { \@create@argument } {mmmmmm} {%
+ \alt<#1>{
+ \IfNoValueTF {#6}{%
+ \node[argument size,argument,#2,#3](#4) {\@arg@style{#5}};
+ }{%
+ \node[argument size,argument,#2,#3](#4) at (#6) {\@arg@style{#5}};
+ }
+ }{%
+ \if@afoverlay
+ \IfNoValueTF {#6}{%
+ \node[argument size,argument,inactive,#2,#3](#4) {\@arg@style{#5}};
+ }{%
+ \node[argument size,argument,inactive,#2,#3](#4) at (#6) {\@arg@style{#5}};
+ }
+ \else
+ \IfNoValueTF {#6}{%
+ \node[argument size,argument,invisible,#2,#3](#4) {\@arg@style{#5}};
+ }{%
+ \node[argument size,argument,invisible,#2,#3](#4) at (#6) {\@arg@style{#5}};
+ }
+ \fi
+ }
+}
+
+\ifbeamer
+%%% Auxilliary command for creating unique argument macros
+% #1 TikZ parameters
+% #2 unique argument ID
+% #3 argument display name
+% #4 ignored
+% #5 absolute positioning values
+% #6 unique AF ID
+\NewDocumentCommand { \@make@argument } {mmmmmm} {%
+ \expandafter\listxadd\csname @arguments@#6\endcsname{#2}
+ \expandafter\global\expandafter\edef\csname @af@#6@arg@#2\endcsname##1{%
+ \@create@argument{.-}{#1}{##1}{#2}{#3}{#5}
+ }
+}
+\fi
+\makeatother
+
+
+%%%%%%%%%%%%%%% Attacks & Support %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\makeatletter
+%%% Command for creating attacks
+% #1 beamer overlay specification (optional)
+% #2 TikZ parameters (optional)
+% #3 attacking argument ID
+% #4 attacked argument ID
+% #5 annotation text (optional)
+\NewDocumentCommand { \attack } {D<>{.-} O{} m m d()} {%
+ \ifbeamer
+ \if@insideaf
+ \@make@attack{#2}{#3}{#4}{#5}{\arabic{af}}
+ \csname @af@\arabic{af}@att@#3#4\endcsname{}
+ \else
+ \@create@attack{#1}{#2}{}{#3}{#4}{#5}
+ \fi
+ \else
+ \@create@attack{#1}{#2}{}{#3}{#4}{#5}
+ \fi
+}
+
+%%% Internal command for creating the attack in TikZ
+% #1 beamer overlay specification (optional)
+% #2 TikZ parameters (optional)
+% #3 TikZ parameters (optional)
+% #4 attacking argument ID
+% #5 attacked argument ID
+% #6 annotation text
+\NewDocumentCommand { \@create@attack } {mmmmmm} {%
+ \alt<#1>{
+ \IfNoValueTF{#6}{%
+ \path(#4) edge [attack,#2,#3] (#5);
+ }{%
+ \path(#4) edge [attack,#2,#3] node[annotation](p_#4_#5){#6} (#5);
+ }
+ }{%
+ \if@afoverlay
+ \IfNoValueTF{#6}{%
+ \path(#4) edge [attack,inactive,#2,#3] (#5);
+ }{%
+ \path(#4) edge [attack,inactive,#2,#3] node[annotation](p_#4_#5){#6} (#5);
+ }
+ \else
+ \IfNoValueTF{#6}{%
+ \path(#4) edge [attack,invisible,#2,#3] (#5);
+ }{%
+ \path(#4) edge [attack,invisible,#2,#3] node[annotation](p_#4_#5){#6} (#5);
+ }
+ \fi
+ }
+}
+
+\ifbeamer
+%%% Auxilliary command for creating unique attack macros
+% #1 TikZ parameters
+% #2 attacking argument ID
+% #3 attacked argument ID
+% #4 annotation text
+% #5 unique AF ID
+\NewDocumentCommand { \@make@attack } {mmmmm} {%
+ \expandafter\listgadd\csname @attacks@#5\endcsname{#2,#3}
+ \expandafter\global\expandafter\edef\csname @af@#5@att@#2#3\endcsname##1{
+ \@create@attack{.-}{#1}{##1}{#2}{#3}{#4}
+ }
+}
+\fi
+
+%%% Self-attack edge
+% #1 TikZ parameters (optional)
+% #2 argument ID
+\NewDocumentCommand { \selfattack } {D<>{.-} O{} m} {%
+ \attack<#1>[selfattack,#2]{#3}{#3}
+}
+
+%%% Symmetric attack edges between two arguments
+% #1 TikZ parameters (optional)
+% #2 first argument ID
+% #3 second argument ID
+\NewDocumentCommand { \dualattack } {D<>{.-} O{} m m} {%
+ \attack<#1>[bend right,#2]{#3}{#4}
+ \attack<#1>[bend right,#2]{#4}{#3}
+}
+
+%%% Create attack edge with value (DEPRECATED as of v1.4)
+% #1 TikZ parameters (optional)
+% #2 attacking argument ID
+% #3 attacked argument ID
+% #4 annotation text
+\NewDocumentCommand{ \annotatedattack } {D<>{.-} O{} m m m} {%
+ \attack<#1>[#2]{#3}{#4}(#5)
+}
-%%%%%%%%%%%%%%% Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfkeys{
- /tikz/small/.style = {node distance=0.55cm,argument size/.style={minimum size=0.55cm},caption/.append style={font=\small}},
- /tikz/tiny/.style = {node distance=0.35cm,argument size/.style={font=\small, minimum size=0.4cm},caption/.append style={font=\small}},
+%%% Support edge
+% #1 overlay specification (optional)
+% #2 TikZ parameters (optional)
+% #3 supporting argument ID
+% #4 supported argument ID
+\NewDocumentCommand { \support } {D<>{.-} O{} m m} {%
+ \alt<#1>{%
+ \path(#3) edge [support=0.35,#2] (#4);
+ }{%
+ \if@afoverlay
+ \path(#3) edge [support=0.35,inactive,#2] (#4);
+ \else
+ \path(#3) edge [support=0.35,invisible,#2] (#4);
+ \fi
+ }
}
+\makeatother
+
-\newenvironment{af}[1][]{
- \tikzpicture[#1]
+%%%%%%%%%%%%%%% AF Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcounter{af}
+
+%%% Uncounted version of the environment
+\makeatletter
+\NewDocumentEnvironment {af*} {O{}} {%
+ \setcounter{@argument}{0}
+ \pgfkeys{/argumentation/.cd, #1}
+ \tikzpicture[standard,af,#1]
}{%
\endtikzpicture
}
-%%%%%%%%%%%%%%%% Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Standard version of af environment
+\NewDocumentEnvironment {af} {O{}} {%
+ \refstepcounter{af}
+ \ifbeamer
+ \global\expandafter\def\csname @arguments@\arabic{af}\endcsname{}
+ \global\expandafter\def\csname @attacks@\arabic{af}\endcsname{}
+ \fi
+ \@insideaftrue
+ \begin{af*}[#1]
+}{%
+ \end{af*}
+ \@insideaffalse
+}
+\makeatother
-% Creates a node displaying the name of the AF
-\newcommand{\afname}[3][]{\node[caption,#1](#2){#3};}
-\newcommand{\annotation}[3][]{\node[annotation,above of=#2,#1](an_#2){#3};}
+%%%%%%%%%%%%%%%% Additional Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Definitions for referencing
+\ifmacros
+ \providecommand{\AF}{\ensuremath{F}\xspace} % AF abbreviation
+ \providecommand{\arguments}{\ensuremath{A}\xspace} % Set of arguments
+ \providecommand{\attacks}{\ensuremath{R}\xspace} % Set of attacks
+ \providecommand{\AFcomplete}{\ensuremath{\AF = (\arguments, \attacks)}\xspace} % Full AF
+ \newcommand{\afref}[1]{\ensuremath{\AF_{\ref{#1}}}\xspace} % Reference an AF
+ \newcommand{\fullafref}[1]{\ensuremath{\afref{#1} = (\arguments_{\ref{#1}}, \attacks_{\ref{#1}})}\xspace} % Full AF with reference
+\fi
-% Creates an argument node
-\newcommand{\argument}[3][]{\node[argument,argument size,#1](#2){\argstyle{#3}};}
+%%% Creates a node displaying the name of the AF
+% #1 overlay specification (optional)
+% #2 TikZ-parameters (optional)
+% #3 node identifier (optional)
+% #4 node name
+% #5 ignored
+% #6 node position
+\NewDocumentCommand { \afname } { D<>{.-} O{} D(){caption} m dat d()} {%
+ \alt<#1>{
+ \IfNoValueTF {#6}{%
+ \node[caption,#2](#3){#4};
+ }{%
+ \node[caption,#2](#3) at (#6) {#4};
+ }
+ }{%
+ \IfNoValueTF {#6}{%
+ \node[caption,invisible,#2](#3){#4};
+ }{%
+ \node[caption,invisible,#2](#3) at (#6) {#4};
+ }
+ }
+}
-% Creates an attack edge
-\newcommand{\attack}[3][]{\path(#2) edge [attack,#1] (#3);}
+%%% Create a text annotation next to another node
+\NewDocumentCommand { \annotation } {D<>{.-} O{} m m} {%
+ \alt<#1>{%
+ \node[annotation,above of=#3,#2](an_#3){#4};
+ }{%
+ \node[annotation,above of=#3,invisible,#2](an_#3){#4};
+ }
+}
-% Creates a self-attack
-\newcommand{\selfattack}[2][]{\path(#2) edge [attack,selfattack,#1] (#2);}
+%%% Commands for setting custom tikz-style parameters
+\newcommand{\setafstyle}[1]{\tikzset{af/.style={#1}}}
+\newcommand{\setargumentcolorscheme}[2]{\tikzset{argument colored/.style={argument thick,fill=#2,draw=#1}}}
+\newcommand{\setargumentstyle}[1]{\tikzset{argument/.style={argument size,#1}}}
+\newcommand{\setattackstyle}[1]{\tikzset{attack/.style={attack width,#1}}}
+\newcommand{\setsupportstyle}[1]{\tikzset{support/.style={#1}}}
+\newcommand{\setannotationstyle}[1]{\tikzset{annotation/.style={#1}}}
-% Creates two symmetric attack edges between two arguments
-\newcommand{\dualattack}[3][]{\path(#2) edge [attack, bend right,#1] (#3);\path(#3) edge [attack, bend right,#1] (#2);}
-% Creates a weighted attack
-\newcommand{\annotatedattack}[4][]{\path(#2) edge [attack,#1] node[annotation](p_#2_#3){#4} (#3);}
+%%%%%%%%%%%% Beamer Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifbeamer
+\makeatletter
+%%% Prints an extension of an AF for the given list of accepted arguments
+% #1 unique ID of an AF
+% #2 a comma-separated list of argument IDs
+\NewDocumentCommand { \afextension } {mm} {%
+ \@prepare@af{#1}
+ % Collect accepted arguments in list
+ \forcsvlist{\listeadd\@accepted@arguments}{#2}
-% Creates a support edge between two arguments
-\newcommand{\support}[3][]{\path(#2) edge [support=0.35,#1] (#3);}
+ % render the af with the given information
+ \@render@af{\@afid}{accepted}{}{}{}{}
+}
+
+%%% Prints a labeling of an AF for the given list of accepted arguments
+% #1 unique ID of an AF
+% #2 a comma-separated list of argument IDs
+\NewDocumentCommand { \aflabeling } {mm} {%
+ \@prepare@af{#1}
+ % Collect accepted arguments in list
+ \forcsvlist{\listeadd\@accepted@arguments}{#2}
+
+ % Collect rejected arguments in list
+ \renewcommand*{\do}[1]{
+ \expandafter\@split@pair##1\relax
+ \xifinlist{\@attacker}{\@accepted@arguments}{%
+ \listeadd\@rejected@arguments{\@attacked}
+ }{}
+ }
+ \dolistcsloop{@attacks@\@afid}
+
+ % Collect undecided arguments in list
+ \renewcommand*{\do}[1]{
+ \xifinlist{##1}{\@accepted@arguments}{}{
+ \xifinlist{##1}{\@rejected@arguments}{}{
+ \listadd\@undecided@arguments{##1}
+ }
+ }
+ }
+ \dolistcsloop{@arguments@\@afid}
+
+ % render the af with the given information
+ \@render@af{\@afid}{accepted}{rejected}{undecided}{}{}
+}
+
+%%% Prints the reduct of an AF wrt. the given list of arguments
+% #1 unique ID of an AF
+% #2 a comma-separated list of argument IDs
+\NewDocumentCommand { \afreduct } {mm} {%
+ \@prepare@af{#1}
+ \forcsvlist{\listeadd\@accepted@arguments}{#2}
+ \forcsvlist{\listeadd\@inactive@arguments}{#2}
+
+ \renewcommand*{\do}[1]{
+ \expandafter\@split@pair##1\relax
+ \xifinlist{\@attacker}{\@accepted@arguments}{%
+ \listeadd\@rejected@arguments{\@attacked}
+ \listeadd\@inactive@arguments{\@attacked}
+ }{}
+ }
+ \dolistcsloop{@attacks@\@afid}
+
+ \@render@af{\@afid}{inactive}{inactive}{}{inactive}{}
+}
+
+%%% Prints an AF restricted to the given list of arguments
+% #1 unique ID of an AF
+% #2 a comma-separated list of argument IDs
+\NewDocumentCommand { \afrestriction } {mm} {%
+ \@prepare@af{#1}
+ \forcsvlist{\listeadd\@accepted@arguments}{#2}
+
+ \renewcommand*{\do}[1]{%
+ \ifinlist{##1}{\@accepted@arguments}{}{
+ \listeadd\@inactive@arguments{##1}
+ }
+ }
+ \dolistcsloop{@arguments@\@afid}
+
+ \@render@af{\@afid}{}{}{}{invisible}{}
+}
+
+%%% Prepares recreation of an AF. Parses AF label to letter ID and defines lists to partition arguments
+% #1 unique ID of the AF to recreate
+\NewDocumentCommand { \@prepare@af } {m} {%
+ \edef\@afid{\getrefnumber{#1}}
+ \def\@accepted@arguments{}
+ \def\@rejected@arguments{}
+ \def\@undecided@arguments{}
+ \def\@inactive@arguments{}
+}
+
+%%% name of innermost af environment
+\def\@afenvname{af*}
+
+%%% Prepares recreation of AF by making sure we are inside an af environment
+% #1 unique ID of the AF to recreate
+% #2-#6 style parameters (see \@render@afdo)
+\NewDocumentCommand { \@render@af } {mmmmmm} {%
+ \ifx\@currenvir\@afenvname
+ \@render@afdo{#1}{#2}{#3}{#4}{#5}{#6}
+ \else
+ \begin{af*}
+ \@render@afdo{#1}{#2}{#3}{#4}{#5}{#6}
+ \end{af*}
+ \fi
+}
+
+%%% Recreates an AF
+%% Utilises lists defined in \@prepare@af
+% #1 unique ID of the AF to recreate
+% #2 style of accepted arguments
+% #3 style of rejected arguments
+% #4 style of undecided arguments
+% #5 style of inactive arguments/attacks
+% #6 style of normal attacks
+\NewDocumentCommand { \@render@afdo } {mmmmmm} {%
+ % handle arguments for rendering
+ \renewcommand*{\do}[1]{%
+ \ifinlist{##1}{\@accepted@arguments}{
+ \csname @af@#1@arg@##1\endcsname{#2}
+ }{%
+ \ifinlist{##1}{\@rejected@arguments}{%
+ \csname @af@#1@arg@##1\endcsname{#3}
+ }{%
+ \ifinlist{##1}{\@undecided@arguments}{%
+ \csname @af@#1@arg@##1\endcsname{#4}
+ }{%
+ \ifinlist{##1}{\@inactive@arguments}{%
+ \csname @af@#1@arg@##1\endcsname{#5}
+ }{%
+ \csname @af@#1@arg@##1\endcsname{}
+ }
+ }
+ }
+ }
+ }
+ \dolistcsloop{@arguments@#1}
+
+ % handle attack rendering
+ \renewcommand*{\do}[1]{%
+ \expandafter\@split@pair##1\relax
+ \xifinlist{\@attacker}{\@inactive@arguments}{%
+ \csname @af@#1@att@\@attacker\@attacked\endcsname{#5,fill=none}
+ }{%
+ \xifinlist{\@attacked}{\@inactive@arguments}{%
+ \csname @af@#1@att@\@attacker\@attacked\endcsname{#5,fill=none}
+ }{%
+ \csname @af@#1@att@\@attacker\@attacked\endcsname{#6}
+ }
+ }
+ }
+ \dolistcsloop{@attacks@#1}
+}
+\makeatother
+\fi \ No newline at end of file
diff --git a/graphics/pgf/contrib/atableau/LICENSE b/graphics/pgf/contrib/atableau/LICENSE
new file mode 100644
index 0000000000..329bcef402
--- /dev/null
+++ b/graphics/pgf/contrib/atableau/LICENSE
@@ -0,0 +1,417 @@
+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 2008 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
+ % 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 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/graphics/pgf/contrib/atableau/README.md b/graphics/pgf/contrib/atableau/README.md
new file mode 100644
index 0000000000..f659fb20ed
--- /dev/null
+++ b/graphics/pgf/contrib/atableau/README.md
@@ -0,0 +1,44 @@
+![version](https://img.shields.io/github/v/tag/AndrewMathas/aTableau?color=success&label=version)
+![LPPL](https://img.shields.io/github/license/note286/xduts?style=flat-square)
+![LaTeX](https://img.shields.io/badge/LaTeX-008080?logo=latex&logoColor=fff&style=flat)
+
+# aTableau
+
+A LaTeX package for symmetric group combinatorics, with commands for:
+
+ - Young diagrams
+ - tableaux
+ - tabloids
+ - skew tableaux
+ - shifted tableaux
+ - ribbon tableaux
+ - multitableaux
+ - abacuses
+
+``` latex
+\Tableau{12345,678,9{10},{11}}
+\Diagram[french]{4^4,2,1^3}
+\Tabloid{1379{11},249{10},6,8}
+\SkewTableau[ukrainian]{3,2,1}{345,56,9{10}}
+\SkewDiagram[skew border style={dashed,fill=red!10},skew border]{1^2}{2^3}
+\ShiftedTableau[skew boxes]{1*23,4*5}
+\ShiftedDiagram[skew border]{3,2}
+\RibbonTableau[ukrainian, skew={4,1^2}]{16rcrrrccrcc, 26, 34rc}
+\Multidiagram[australian]{3,2^2|2,1,1|1}
+\Multitableau[box font=\tiny]{123,45,67|89,{10},{11}|{12}{13}{14}}
+\Abacus[rows=3, abacus ends=..]{3}{0,2,3,4,5}
+\Abacus{3}{0,2,3,4,5}
+```
+
+### Dependencies
+[LaTeX3](https://www.latex-project.org/latex3/) and [TikZ](https://tikz.net/)
+
+## Author
+Andrew Mathas
+
+## Licence
+LPPL Version 1.3 2003-12-01
+
+## Repository
+[github.com/AndrewMathas/aTableau/](github.com/AndrewMathas/aTableau/)
+
diff --git a/graphics/pgf/contrib/atableau/atableau.ini b/graphics/pgf/contrib/atableau/atableau.ini
new file mode 100644
index 0000000000..bd80bd3baa
--- /dev/null
+++ b/graphics/pgf/contrib/atableau/atableau.ini
@@ -0,0 +1,13 @@
+author_email = andrew.mathas@sydney.edu.au
+authors = Andrew Mathas
+copyright = 2023-2025
+description = A LaTeX package for tableaux, abacuses, ...
+email = andrew.mathas@gmail.com
+keywords = tableaux, Yougn diagrans, abacuses
+license = LPPL Version 1.3 2003-12-01
+name = Andrew Mathas
+package = atableau
+repository = github.com/AndrewMathas/aTableau/
+requirements = LaTeX2e
+release date = 24 January 2025 AEDT
+version = 2.1.0
diff --git a/graphics/pgf/contrib/atableau/atableau.pdf b/graphics/pgf/contrib/atableau/atableau.pdf
new file mode 100644
index 0000000000..4ccc1130ef
--- /dev/null
+++ b/graphics/pgf/contrib/atableau/atableau.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/atableau/atableau.sty b/graphics/pgf/contrib/atableau/atableau.sty
new file mode 100644
index 0000000000..05692c3550
--- /dev/null
+++ b/graphics/pgf/contrib/atableau/atableau.sty
@@ -0,0 +1,3394 @@
+% ---------------------------------------------------------------------------
+%
+% atableau - Andrew Mathas (C) 2022-2025
+%
+% A latex package for symmetric group combinatorics, including:
+% - abacuses
+% - multitableau
+% - ribbon tableau
+% - shifted tableau
+% - skew tableau
+% - tableaux
+% - tabloids
+% - Young diagrams
+%
+% E-mail: andrew.mathas@gmail.com
+% Released under the LaTeX Project Public License v1.3c or later
+% See http://www.latex-project.org/lppl.txt
+
+% ---------------------------------------------------------------------------
+
+% load TikZ early to avoid \ExplSyntaxOn...\ExplSyntaxOff wrappers
+\RequirePackage{tikz}
+\usetikzlibrary{shapes.geometric,matrix}
+
+% Correct for negative signs in contents being too long to fit in a tableau
+\RequirePackage{amsfonts} %% <- also included by amssymb
+\DeclareMathSymbol{\shortminus}{\mathbin}{AMSa}{"39}
+
+% ---------------------------------------------------------------------------
+% package date and version
+\def\atableau@version{2.1.0}
+\def\atableau@release{2025-01-24}
+
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+\DeclareRelease{\atableau@version}{\atableau@release}{atableau.sty}
+\DeclareCurrentRelease{}{\atableau@release}
+
+\ProvidesExplPackage{atableau} {\atableau@release} {\atableau@version}
+ {A latex package for symmetric group combinatorics }
+
+
+% Give a warning if the LaTeX installation is older than TeXLive 2024
+\IfFormatAtLeastTF { 2024-04-13 } {}
+{
+ \PackageWarning {aTableau}
+ {
+ The~aTableau~package~uses~many~recent~features~from~
+ ~LaTeX3.~Your~LaTeX ~installation~appears~to~be~quite~,
+ ~which~might~result~in~errors~from~the ~package.~You~
+ ~may~need~to~update~your~LaTeX~installation~to~at~
+ ~least~TeXLive~2024
+ }
+}
+
+% ---------------------------------------------------------------------------
+% package errors
+
+\msg_new:nnnn { aTableau } { empty-tableau-row }
+ { Row~#1~of~tableau~is~empty }
+ { Empty~tableau~rows~are~not~supported}
+
+\msg_new:nnnn { aTableau } { missing-runner-labels }
+{ Your~abacus~has~a~different~number~of~runners~and~runner~labels }
+{ The~number~of~labels~given~to~the~'runner~labels'~must~match~the~number~of~abacus~runners }
+
+\msg_new:nnnn { aTableau } { missing-style }
+{ The~'#1'~styles~key~is~missing~a~value }
+{ The~styles~key~accepts~a~comma~separated~list~of~key-value~pairs~for~defining~TikZ~styles }
+
+\msg_new:nnnn { aTableau } { invalid-dots}
+ { Invalid~specifications~for~dotted~rows~or~dotted~cols }
+ { You~can~only~use~these~options~for~interior~rows~and~columns~in~the~diagrams}
+
+\msg_new:nnnn { aTableau } { invalid-ribbon-head }
+ { Invalid~ribbon~head:~the~row~and~column~indices~of~the~ribbon~head~must~be~given:~'#1'}
+ { Ribbon~specifications~must~be~for~the~form:~(optional~ribbon~style)[style]<row><col>+sequences~of~r's~and~c's~with~style}
+
+\msg_new:nnnn { aTableau } { invalid-ribbon-specification }
+ { Invalid~ribbon~specification~'#1':~expecting~r~or~c. }
+ { Ribbon~specifications~must~be~for~the~form:~[optional~style]<row><col>~sequences~of~r's and~c's~with~style}
+
+\msg_new:nnnn { aTableau } { unrecognised-abacus-label }
+ { Unrecognised~abacus~label~'#1'. }
+ { The~possible~abacus~labels~are~betas,~residues,~rows~and~shape}
+
+\msg_new:nnnn { aTableau } { unrecognised-entries }
+ { Unrecognised~entries~value:~'#1' }
+ { The~possible~diagram~values~for~entries~are:~contents,~first,~hooks,~last,~and~residues}
+
+\msg_new:nnnn { aTableau } { unrecognised-style }
+ { Unrecognised~style:~'#1' }
+ { The~available~tableau~styles~are~australian,~english,~french~and~ukrainian~and~the~available~abacus~styles~are~north,~south,~east~and~west~}
+
+\msg_new:nnnn { aTableau } { unknown-abacus-ends }
+ { Unrecognised~abacus~ends~setting:~'#1' }
+ { The~supported~ends~for~the~top/bottom~of~the~abacus~are:~-,~_~,.~,|,~and~>}
+
+\msg_new:nnnn { aTableau } { unknown-cartan }
+ { Unrecognised~Cartan~type~'#1' }
+ { The~supported~Cartan~types~are~(affine)~types~A,~AA,~C~and~DD}
+
+\msg_new:nnnn { aTableau } { unknown-baseline }
+ { Unrecognised~baseline~option:~'#1' }
+ { The~supported~halign~options~are~bottom,~centre,~left,~and~top }
+
+\msg_new:nnnn { aTableau } { unknown-halign }
+ { Unrecognised~halign~option:~'#1' }
+ { The~supported~halign~options~are~centre,~left,~and~right }
+
+\msg_new:nnnn { aTableau } { unknown-top }
+ { Unrecognised~format~for~abacus~top;~'#1' }
+ { The~supported~formats~are:~blank,~dots,~and~frame}
+
+\msg_new:nnnn { aTableau } { unknown-valign }
+ { Unrecognised~valign~option:~#1 }
+ { The~supported~valign~options~are~bottom,~centre~and~top }
+
+% ---------------------------------------------------------------------------
+% package variables
+
+\bool_new:N \l__atableau_beta_numbers_bool% true if specifying beta numbers
+\bool_new:N \l__atableau_frame_bool % true if drawing framed abacus runners
+\bool_new:N \l__atableau_conjugate_bool % true if drawing conjugate tableau/diagram
+\bool_new:N \l__atableau_border_bool % true if drawing tableau border
+\bool_new:N \l__atableau_boxes_bool % true if drawing inner tableau walls
+\bool_new:N \l__atableau_shifted_bool % true if a shifted tableau
+\bool_new:N \l__atableau_skew_border_bool % true if drawing skew border
+\bool_new:N \l__atableau_skew_boxes_bool % true if drawing skew boxes
+\bool_new:N \l__atableau_tabloid_bool % true if a tabloid
+\bool_new:N \l__atableau_separators_bool % true if drawing separators for multishapes
+
+\fp_new:N \l__atableau_ab_col_dx_fp % change in x-coordinate between columns in an abacus
+\fp_new:N \l__atableau_ab_col_dy_fp % change in y-coordinate between columns in an abacus
+\fp_new:N \l__atableau_ab_row_dx_fp % change in x-coordinate between rows in an abacus
+\fp_new:N \l__atableau_ab_row_dy_fp % change in y-coordinate between rows in an abacus
+\fp_new:N \l__atableau_abacus_ht_fp % height of the tableaux nodes/separation between abacus beads
+\fp_new:N \l__atableau_abacus_wd_fp % width of the tableaux nodes/separation between abacus runners
+\fp_new:N \l__atableau_bead_size_fp % bead radius
+\fp_new:N \l__atableau_box_ht_fp % height of a tableau box
+\fp_new:N \l__atableau_box_wd_fp % width of a tableau box
+\fp_new:N \l__atableau_rows_fp % number of rows in abacus/tableau
+\fp_new:N \l__atableau_separation_fp % distance between multitableau
+\fp_new:N \l__atableau_script_fp % scaling when used as a subscript
+\fp_new:N \l__atableau_sscriptscript_fp % scaling when used as a subsubscript
+\fp_new:N \l__atableau_tab_col_dx_fp % change in x-coordinate between columns in a tableau
+\fp_new:N \l__atableau_tab_col_dy_fp % change in y-coordinate between columns in a tableau
+\fp_new:N \l__atableau_tab_row_dx_fp % change in x-coordinate between rows in a tableau
+\fp_new:N \l__atableau_tab_row_dy_fp % change in y-coordinate between rows in a tableau
+\fp_new:N \l__atableau_tick_length_fp % half the length of the abacus ticks
+\fp_new:N \l__atableau_x_fp % x-coordinate of the origin of the diagram
+\fp_new:N \l__atableau_xa_fp % scratch x-coordinate of a node/bead
+\fp_new:N \l__atableau_xb_fp % scratch x-coordinate of a node/bead
+\fp_new:N \l__atableau_xl_fp % x-coordinate of a tableau node/bead
+\fp_new:N \l__atableau_xmax_fp % maximum x-coordinate for multidiagrams and multitableaux
+\fp_new:N \l__atableau_xoffsets_seq % x-offsets for the (1,1)-nodes in a multi-tableau
+\fp_new:N \l__atableau_xscale_fp % scaling in the x-direction
+\fp_new:N \l__atableau_xsep_fp % x-coordinate difference to next separator for multishapes
+\fp_new:N \l__atableau_y_fp % y-coordinate of the origin of the diagram
+\fp_new:N \l__atableau_ya_fp % scratch y-coordinate of a node/bead
+\fp_new:N \l__atableau_yb_fp % scratch y-coordinate of a node/bead
+\fp_new:N \l__atableau_yl_fp % y-coordinate of a tableau node/bead
+\fp_new:N \l__atableau_ymax_fp % maximum y-coordinate for multidiagrams and multitableaux
+\fp_new:N \l__atableau_ymin_fp % minimum y-coordinate for multidiagrams and multitableaux
+\fp_new:N \l__atableau_yoffsets_seq % t-offsets for the (1,1)-nodes in a multi-tableau
+\fp_new:N \l__atableau_yscale_fp % scaling in the x-direction
+
+\int_new:N \l__atableau_beads_int % number of beads in abacus
+\int_new:N \l__atableau_charge_int % charge for current component
+\int_new:N \l__atableau_col_int % current column index
+\int_new:N \l__atableau_c_int % scratch column counter
+\int_new:N \l__atableau_cols_int % number of columns in a multitableau/abacus
+\int_new:N \l__atableau_component_int % component in multidiagrams and tableaux
+\int_new:N \l__atableau_e_int % quantum characteristic
+\int_new:N \l__atableau_row_int % current row index
+\int_new:N \l__atableau_r_int % scratch row counter
+\int_new:N \l__atableau_rows_int % number of rows in abacus
+
+\seq_new:N \l__atableau_charge_seq % sequences of charges = residue/content offset
+\seq_new:N \l__atableau_component_seq % multipartition
+\seq_new:N \l__atableau_conjugate_seq % conjugate partition
+\seq_new:N \l__atableau_dotted_cols_seq % columns with dots
+\seq_new:N \l__atableau_dotted_rows_seq % rows with dots
+\seq_new:N \l__atableau_multidotted_cols_seq % sequence of dotted columns for multi shapes
+\seq_new:N \l__atableau_multidotted_rows_seq % sequence of dotted rows for multi shapes
+\seq_new:N \l__atableau_multilabel_seq % a sequence of labels for multi shapes
+\seq_new:N \l__atableau_multipaths_seq % a sequence of ribbon paths for multi shapes
+\seq_new:N \l__atableau_multiribbons_seq % a sequence of ribbon for multi shapes
+\seq_new:N \l__atableau_multiskew_seq % a sequence of skew partitions for multi shapes
+\seq_new:N \l__atableau_multisnobs_seq % a sequence of snobs for multi shapes
+\seq_new:N \l__atableau_paths_seq % ribbon paths to add to tableau/diagram
+\seq_new:N \l__atableau_rcs_seq % ribbon row, column indices
+\seq_new:N \l__atableau_ribbons_seq % ribbons to add to tableau/diagram
+\seq_new:N \l__atableau_runner_labels_seq % labels for the abacus runners
+\seq_new:N \l__atableau_shape_seq % a partition
+\seq_new:N \l__atableau_skew_seq % the inner partition for a skew shape
+\seq_new:N \l__atableau_snobs_seq % snob ribbons to add to tableau/diagram
+\seq_new:N \l__atableau_styles_seq % ribbon/bead styles
+\seq_new:N \l__atableau_texts_seq % ribbon/bead texts
+\seq_new:N \l__atableau_xsep_seq % x-coordinates separators for multishapes
+
+\tl_new:N \l__atableau_abacus_bottom_tl % specifies the bottom of the abacus
+\tl_new:N \l__atableau_abacus_top_tl % specifies the top of the abacus
+\tl_new:N \l__atableau_bead_font_tl % font for abacus beads
+\tl_new:N \l__atableau_bead_shape_tl % shape of abacus beads
+\tl_new:N \l__atableau_bead_text_tl % text colour of abacus beads
+\tl_new:N \l__atableau_bead_tl % abacus head colour
+\tl_new:N \l__atableau_border_tl % diagram border
+\tl_new:N \l__atableau_box_fill_tl % fill colour for tableau boxes
+\tl_new:N \l__atableau_box_font_tl % font for tableau boxes
+\tl_new:N \l__atableau_box_shape_tl % shape of tableau boxes
+\tl_new:N \l__atableau_box_text_tl % text colour for tableau boxes
+\tl_new:N \l__atableau_capture_exp_tl % contains captured exponent
+\tl_new:N \l__atableau_capture_part_tl % contains captured part
+\tl_new:N \l__atableau_capture_style_tl % contains captured style
+\tl_new:N \l__atableau_capture_txt_tl % contains captured text
+\tl_new:N \l__atableau_cartan_tl % the Cartan type
+\tl_new:N \l__atableau_empty_tl % symbol for empty tableau/diagram in a multi tableau/diagram
+\tl_new:N \l__atableau_entries_tl % custom entries in tableau
+\tl_new:N \l__atableau_inner_tl % colour of tableau inner walls
+\tl_new:N \l__atableau_label_tl % a label to print on an tableau/diagram
+\tl_new:N \l__atableau_left_delimiter_tl % the left delimiter for multitableau and multidiagrams
+\tl_new:N \l__atableau_multiprefix_tl % prefix used when constructing multinode names
+\tl_new:N \l__atableau_name_tl % name of a tableau node
+\tl_new:N \l__atableau_outer_tl % colour of tableau outer walls
+\tl_new:N \l__atableau_path_box_tl % node for ribbon paths
+\tl_new:N \l__atableau_prefix_tl % prefix for node names
+\tl_new:N \l__atableau_ribbon_box_tl % box entry for ribbons
+\tl_new:N \l__atableau_ribbon_style_tl % optional style used for current path< ribbon or snob
+\tl_new:N \l__atableau_ribbon_path_tl % a ribbon in the ribbon tableau
+\tl_new:N \l__atableau_ribbon_type_tl % the type of ribbon, which is either path, ribbon or snob
+\tl_new:N \l__atableau_right_delimiter_tl % the right delimiter for multitableau and multidiagrams
+\tl_new:N \l__atableau_runner_tl % abacus runner colour
+\tl_new:N \l__atableau_snob_box_tl % box entry for snobs
+\tl_new:N \l__atableau_separator_fg_tl % foreground colour of the separator
+\tl_new:N \l__atableau_separator_tl % the separator between multitableau: | or , or ...
+\tl_new:N \l__atableau_shading_tl % the type of shading to use for the abacus beads
+\tl_new:N \l__atableau_show_tl % automatic tableau/bead labelling
+\tl_new:N \l__atableau_skew_border_tl % skew border colour
+\tl_new:N \l__atableau_starstyle_tl % current star style in use
+\tl_new:N \l__atableau_styled_nodes_tl % token lists of nodes with non-default style
+\tl_new:N \l__atableau_tick_tl % abacus tick colour
+\tl_new:N \l__atableau_tikz_after_tl % TikZ commands for after the diagram
+\tl_new:N \l__atableau_tikz_before_tl % TikZ commands for before the diagram
+\tl_new:N \l__atableau_tikzpicture_tl % TikZ environment settings
+\tl_new:N \l__atableau_unstyled_nodes_tl % token lists of nodes with efault style
+
+% ---------------------------------------------------------------------------
+% Variable defaults -- most defaults are given in the settings: \keys_set:nn {aTableau} {...}
+\tl_set:Nn \l__atableau_ribbon_type_tl {ribbon} % by default, ribbons are ribbons
+
+% ---------------------------------------------------------------------------
+% default colours
+\definecolor{aTableauMain} {HTML} {00008B}
+\definecolor{aTableauInner} {HTML} {0073e6}
+\definecolor{aTableauSkew} {HTML} {818589}
+\definecolor{aTableauSkewFill} {HTML} {F8F8F8}
+\definecolor{aTableauStarStyle} {HTML} {E6F7FF}
+
+% ---------------------------------------------------------------------------
+% TikZ styling of aTableau components
+
+\tikzset{
+ % -----------------------------------------------------------------------
+ % Allow ball shading to be disabled via shade=none.
+ % The essential idea comes from https://tex.stackexchange.com/a/85750/234252
+ no~shade/.code={ \tikz@addmode{\tikz@mode@shadefalse } },
+ % -----------------------------------------------------------------------
+ % all tikz settings are in the aTableau family
+ aTableau/.is~family,
+ aTableau/.cd,
+ % -----------------------------------------------------------------------
+ % Styles for tableaux and diagrams
+ % -----------------------------------------------------------------------
+ % inner tableau wall
+ innerWall/.style = {
+ line~cap = rect,
+ thin,
+ },
+ % outer tableau wall
+ borderStyle/.style = {
+ % shifting allows us to use \__atableau_set_box_coordinates:nnn when drawing the border
+ shift = {(\fp_eval:n{-(\l__atableau_tab_row_dx_fp+\l__atableau_tab_col_dx_fp)*\l__atableau_box_wd_fp/2},
+ \fp_eval:n{-(\l__atableau_tab_row_dy_fp+\l__atableau_tab_col_dy_fp)*\l__atableau_box_ht_fp/2})},
+ line~cap = rect,
+ very~thick,
+ draw = \l__atableau_outer_tl,
+ },
+ % skew walls
+ skewBorder/.style = {
+ % shifting allows us to use \__atableau_set_box_coordinates:nnn when drawing the border
+ shift = {(\fp_eval:n{-(\l__atableau_tab_row_dx_fp+\l__atableau_tab_col_dx_fp)*\l__atableau_box_wd_fp/2},
+ \fp_eval:n{-(\l__atableau_tab_row_dy_fp+\l__atableau_tab_col_dy_fp)*\l__atableau_box_ht_fp/2})},
+ draw = \l__atableau_skew_border_tl,
+ thick
+ },
+ % styles for tableau boxes in Young diagrams
+ % -----------------------------------------------------------------------
+ node/.style = {
+ anchor = center,
+ inner~sep = 0pt,
+ minimum~height = \fp_use:N \l__atableau_box_ht_fp cm,
+ minimum~width = \fp_use:N \l__atableau_box_wd_fp cm,
+ shape = \l__atableau_box_shape_tl,
+ font = \l__atableau_box_font_tl,
+ text = \l__atableau_box_text_tl,
+ },
+ boxStyle/.style = {
+ aTableau/node,
+ aTableau/innerWall,
+ draw = \l__atableau_inner_tl,
+ fill = \l__atableau_box_fill_tl,
+ },
+ % default skew box style
+ skewBox/.style = {
+ aTableau/node,
+ aTableau/innerWall,
+ draw = \l__atableau_skew_border_tl,
+ fill = aTableauSkewFill,
+ },
+ % box styles for paths, ribbons and snobs
+ % -----------------------------------------------------------------------
+ pathBox/.style = {
+ aTableau/node,
+ draw = none, % border disabled by default
+ },
+ ribbonBox/.style = {
+ aTableau/node,
+ },
+ snobBox/.style = {
+ aTableau/node,
+ },
+ % styles for paths, ribbons and snobs
+ % -----------------------------------------------------------------------
+ % default path style
+ pathStyle/.style = {
+ draw = \l__atableau_inner_tl,
+ },
+ ribbonStyle/.style = {
+ aTableau/innerWall,
+ draw = \l__atableau_inner_tl,
+ },
+ % default ribbon style
+ snobStyle/.style = {
+ aTableau/innerWall,
+ draw = \l__atableau_inner_tl,
+ },
+ % label styles
+ % -----------------------------------------------------------------------
+ labelStyle/.style = {
+ shift = {(\fp_eval:n{-0.2*(\l__atableau_tab_row_dx_fp+\l__atableau_tab_col_dx_fp)*\l__atableau_box_wd_fp},
+ \fp_eval:n{-0.2*(\l__atableau_tab_row_dy_fp+\l__atableau_tab_col_dy_fp)*\l__atableau_box_ht_fp})},
+ font=\scriptsize,
+ text = \l__atableau_inner_tl,
+ },
+ % tableau star style
+ % -----------------------------------------------------------------------
+ tableauStarStyle/.style = {
+ fill = aTableauStarStyle,
+ text = \l__atableau_box_text_tl,
+ },
+ % cleared boxes for dotted rows and columns
+ % -----------------------------------------------------------------------
+ clearBoxes/.style = {
+ draw = white,
+ fill = white,
+ },
+ % dots used for dotted rows and columns
+ % -----------------------------------------------------------------------
+ dottedLine/.style = {
+ densely~dotted,
+ thick,
+ draw = \l__atableau_outer_tl,
+ },
+ % separators and delimiters
+ % -----------------------------------------------------------------------
+ separatorSymbol/.style = {
+ text = \l__atableau_separator_fg_tl,
+ },
+ % default separator line style
+ separatorLine/.style = {
+ thick,
+ draw = \l__atableau_separator_fg_tl,
+ },
+ % Delimiters around multitableaux and multidiagrams. To change the colour
+ % of the delimiters we need to use \path[aTableau/delimiterPath] (x,y) node...
+ delimiterStyle/.style = {
+ align = center,
+ inner~sep = 0pt,
+ minimum~height = \fp_use:N\l__atableau_ymax_fp cm,
+ },
+ % hack to set the colour
+ delimiterPath/.style = {
+ every~delimiter/.style = { \l__atableau_separator_fg_tl, },
+ },
+ leftDelimiter/.style = {
+ aTableau/delimiterStyle,
+ left~delimiter = \l__atableau_left_delimiter_tl,
+ xshift = 2pt,
+ },
+ rightDelimiter/.style = {
+ aTableau/delimiterStyle,
+ right~delimiter = \l__atableau_right_delimiter_tl,
+ xshift = -2pt,
+ },
+ % -----------------------------------------------------------------------
+ % abacus beads and runners
+ % -----------------------------------------------------------------------
+ % abacus beads
+ beadStyle/.style = {
+ ball~color = \l__atableau_bead_tl,
+ font = \l__atableau_bead_font_tl,
+ minimum~height = \fp_to_decimal:N \l__atableau_bead_size_fp cm,
+ minimum~width = \fp_to_decimal:N \l__atableau_bead_size_fp cm,
+ shading = \l__atableau_shading_tl,
+ shape = \l__atableau_bead_shape_tl,
+ text = \l__atableau_bead_text_tl,
+ anchor = center,
+ inner~sep = 0pt,
+ },
+ % abacus runners
+ runnerStyle/.style = {
+ line~cap = rect,
+ very~thick,
+ draw = \l__atableau_runner_tl,
+ },
+ runnerLabelStyle/.style = {
+ aTableau/node,
+ text = aTableauInner,
+ font = \scriptsize
+ },
+ % style for the top and bottom of the abacus
+ abacusEnds/.style = {
+ aTableau/runnerStyle,
+ },
+ % abacus star style
+ abacusStarStyle/.style = {
+ text = aTableauMain,
+ ball~color = aTableauStarStyle,
+ },
+ % abacus ticks
+ tickStyle/.style = {
+ draw = \l__atableau_tick_tl,
+ semithick,
+ },
+ % the named coordinate for an abacus tick
+ namedTick/.style = {
+ minimum~height = \fp_to_decimal:N \l__atableau_bead_size_fp cm,
+ minimum~width = \fp_to_decimal:N \l__atableau_bead_size_fp cm,
+ shape = \l__atableau_bead_shape_tl,
+ draw=none,
+ }
+}
+
+% ---------------------------------------------------------------------------
+
+% usage: \__atableau_set_style:nn {abacus|tableau} {style}
+% sets the basic styles for the tableaux and abacus commands
+\cs_new:Npn \__atableau_set_style:nn #1 #2
+{
+ \str_case:enF { #1/#2 }
+ {
+ {tableau/english}
+ {
+ \fp_set:Nn \l__atableau_tab_col_dx_fp {1}
+ \fp_set:Nn \l__atableau_tab_col_dy_fp {0}
+ \fp_set:Nn \l__atableau_tab_row_dx_fp {0}
+ \fp_set:Nn \l__atableau_tab_row_dy_fp {-1}
+ \fp_set:Nn \l__atableau_box_ht_fp {\l__atableau_yscale_fp*0.5}
+ \fp_set:Nn \l__atableau_box_wd_fp {\l__atableau_xscale_fp*0.5}
+ \tl_set:Nn \l__atableau_box_shape_tl {rectangle}
+ }
+
+ {tableau/french}
+ {
+ \fp_set:Nn \l__atableau_tab_col_dx_fp {1}
+ \fp_set:Nn \l__atableau_tab_col_dy_fp {0}
+ \fp_set:Nn \l__atableau_tab_row_dx_fp {0}
+ \fp_set:Nn \l__atableau_tab_row_dy_fp {1}
+ \fp_set:Nn \l__atableau_box_ht_fp {\l__atableau_yscale_fp*0.5}
+ \fp_set:Nn \l__atableau_box_wd_fp {\l__atableau_xscale_fp*0.5}
+ \tl_set:Nn \l__atableau_box_shape_tl {rectangle}
+ }
+
+ {tableau/australian}
+ {
+ \fp_set:Nn \l__atableau_tab_col_dx_fp {0.5}
+ \fp_set:Nn \l__atableau_tab_col_dy_fp {-0.5}
+ \fp_set:Nn \l__atableau_tab_row_dx_fp {-0.5}
+ \fp_set:Nn \l__atableau_tab_row_dy_fp {-0.5}
+ \fp_set:Nn \l__atableau_box_ht_fp {\l__atableau_yscale_fp*0.7012} % 1/sqrt(2)
+ \fp_set:Nn \l__atableau_box_wd_fp {\l__atableau_xscale_fp*0.7012}
+ \tl_set:Nn \l__atableau_box_shape_tl {diamond}
+ }
+
+ {tableau/ukrainian}
+ {
+ \fp_set:Nn \l__atableau_tab_col_dx_fp {0.5}
+ \fp_set:Nn \l__atableau_tab_col_dy_fp {0.5}
+ \fp_set:Nn \l__atableau_tab_row_dx_fp {-0.5}
+ \fp_set:Nn \l__atableau_tab_row_dy_fp {0.5}
+ \fp_set:Nn \l__atableau_box_ht_fp {\l__atableau_yscale_fp*0.7012}
+ \fp_set:Nn \l__atableau_box_wd_fp {\l__atableau_xscale_fp*0.7012}
+ \tl_set:Nn \l__atableau_box_shape_tl {diamond}
+ }
+
+ {abacus/south}
+ {
+ \fp_set:Nn \l__atableau_ab_col_dx_fp {1}
+ \fp_set:Nn \l__atableau_ab_col_dy_fp {0}
+ \fp_set:Nn \l__atableau_ab_row_dx_fp {0}
+ \fp_set:Nn \l__atableau_ab_row_dy_fp {-1}
+ \fp_set:Nn \l__atableau_abacus_ht_fp {\l__atableau_yscale_fp*0.5}
+ \fp_set:Nn \l__atableau_abacus_wd_fp {\l__atableau_xscale_fp*0.5}
+ \tl_set:Nn \l__atableau_bead_shape_tl {circle}
+ }
+
+ {abacus/north}
+ {
+ \fp_set:Nn \l__atableau_ab_col_dx_fp {1}
+ \fp_set:Nn \l__atableau_ab_col_dy_fp {0}
+ \fp_set:Nn \l__atableau_ab_row_dx_fp {0}
+ \fp_set:Nn \l__atableau_ab_row_dy_fp {1}
+ \tl_set:Nn \l__atableau_bead_shape_tl {circle}
+ \fp_set:Nn \l__atableau_abacus_wd_fp {\l__atableau_xscale_fp*0.5}
+ \fp_set:Nn \l__atableau_abacus_ht_fp {\l__atableau_yscale_fp*0.5}
+ }
+
+ {abacus/east}
+ {
+ \fp_set:Nn \l__atableau_ab_col_dx_fp {0}
+ \fp_set:Nn \l__atableau_ab_col_dy_fp {-1}
+ \fp_set:Nn \l__atableau_ab_row_dx_fp {1}
+ \fp_set:Nn \l__atableau_ab_row_dy_fp {0}
+ \tl_set:Nn \l__atableau_bead_shape_tl {circle}
+ \fp_set:Nn \l__atableau_abacus_wd_fp {\l__atableau_xscale_fp*0.5}
+ \fp_set:Nn \l__atableau_abacus_ht_fp {\l__atableau_yscale_fp*0.5}
+ }
+
+ {abacus/west}
+ {
+ \fp_set:Nn \l__atableau_ab_col_dx_fp {0}
+ \fp_set:Nn \l__atableau_ab_col_dy_fp {1}
+ \fp_set:Nn \l__atableau_ab_row_dx_fp {-1}
+ \fp_set:Nn \l__atableau_ab_row_dy_fp {0}
+ \tl_set:Nn \l__atableau_bead_shape_tl {circle}
+ \fp_set:Nn \l__atableau_abacus_wd_fp {\l__atableau_xscale_fp*0.5}
+ \fp_set:Nn \l__atableau_abacus_ht_fp {\l__atableau_yscale_fp*0.5}
+ }
+ }
+ {
+ \msg_error:nnx {aTableau} {unrecognised-style} {#1/#2}
+ }
+}
+
+% usage: \__atableau_set_xscale:n {x-scale} : rescale the x-dimension
+\cs_new_protected:Npn \__atableau_set_xscale:n #1
+{
+ \fp_set:Nn \l__atableau_xscale_fp {#1} % makes scale persistent
+ \fp_set:Nn \l__atableau_abacus_wd_fp {#1*\l__atableau_abacus_wd_fp}
+ \fp_set:Nn \l__atableau_box_wd_fp {#1*\l__atableau_box_wd_fp}
+ \fp_set:Nn \l__atableau_separation_fp {#1*\l__atableau_separation_fp }
+}
+% usage: \__atableau_set_yscale:n {y-scale} : rescale the y-dimension
+\cs_new_protected:Npn \__atableau_set_yscale:n #1
+{
+ \fp_set:Nn \l__atableau_yscale_fp {#1} % makes scale persistent
+ \fp_set:Nn \l__atableau_abacus_ht_fp {#1*\l__atableau_abacus_ht_fp}
+ \fp_set:Nn \l__atableau_box_ht_fp {#1*\l__atableau_box_ht_fp}
+}
+
+
+% usage: \__atableau_set_delimiters:nn {left delimiter} {right delimiter}
+\cs_new_protected:Npn \__atableau_set_delimiters:nn #1 #2
+{
+ \tl_set:Nn \l__atableau_left_delimiter_tl #1
+ \tl_set:Nn \l__atableau_right_delimiter_tl #2
+}
+
+% usage: \__atableau_set_multiseq_key:nn {name} {value}
+% Set up a sequence, for keys used with multishapes
+\cs_new_protected:Npn \__atableau_set_multiseq_key:nn #1 #2
+{
+ \tl_if_in:nnTF {#2} {|}
+ {
+ % unpack the ribbons into \l__atableau_multiribbons_seq
+ \seq_set_split:cnn {l__atableau_multi#1_seq} {|} {#2}
+ }
+ { \seq_set_from_clist:cn {l__atableau_#1_seq} {#2} }
+}
+
+% usage: \__atableau_set_abacus_ends:nn {top} {top}
+% Set the abacus ends abacus_top and abacus_bottom and give an error
+% message if the ends are not one of =,-,.,|,>
+\cs_new_protected:Npn \__atableau_set_abacus_ends:nn #1 #2
+{
+ \tl_set:Nn \l__atableau_abacus_top_tl {#1}
+ \str_if_in:nnF {-.>|\c_underscore_str*} {#1}
+ { \msg_error:nne {aTableau} {unknown-abacus-ends} {#1}}
+
+ \tl_set:Nn \l__atableau_abacus_bottom_tl {#2}
+ \str_if_in:nnF {-.>|\c_underscore_str*} {#2}
+ { \msg_error:nne {aTableau} {unknown-abacus-ends} {#2}}
+}
+
+% ---------------------------------------------------------------------------
+% command variants
+
+\cs_generate_variant:Nn \fp_add:Nn {NV}
+\cs_generate_variant:Nn \int_set:Nn {No}
+\cs_generate_variant:Nn \seq_put_right:Nn {Nx}
+\cs_generate_variant:Nn \seq_set_item:Nnn {NVx, Nnx, Nox}
+\cs_generate_variant:Nn \seq_set_from_clist:Nn {co}
+\cs_generate_variant:Nn \seq_set_split:Nnn {cnn}
+
+\cs_generate_variant:Nn \__atableau_add_ribbon:n {V}
+\cs_generate_variant:Nn \__atableau_count_row:n {x}
+\cs_generate_variant:Nn \__atableau_draw_tableau:n {V}
+\cs_generate_variant:Nn \__atableau_entry:n {x}
+\cs_generate_variant:Nn \__atableau_draw_abacus_end:nnn {noo}
+\cs_generate_variant:Nn \__atableau_set_bead_coordinates:nnn {nVV, nnV, noo, non, noV}
+\cs_generate_variant:Nn \__atableau_set_box_coordinates:nnn {nVV, nVn, noo }
+\cs_generate_variant:Nn \__atableau_set_partition:nn {no}
+\cs_generate_variant:Nn \__atableau_tl_put_right_braced:Nn { NV, Nx, No, Ne }
+
+% ---------------------------------------------------------------------------
+% utility functions
+
+% usage: \__atableau_tl_put_right_braced:Nn #1 #2
+% Add braces around #2 and append to #1
+\cs_new_protected:Nn \__atableau_tl_put_right_braced:Nn
+{
+ \tl_put_right:Nn #1 { {#2} }
+}
+
+% ---------------------------------------------------------------------------
+% expandable residue functions
+
+% usage: \__atableau_residue_A:nn
+% Computes the residue of #1 mod #2. This is positive integer remainder when
+% dividing by #2. As with \int_mod:n, the result is left in the input stream.
+\cs_new:Npn \__atableau_residue_A:nn #1 #2
+{
+ \int_compare:nNnTF {#1} > {0}
+ { \int_mod:nn {#1} {#2} }
+ { \int_eval:n {\int_mod:nn {#2 + \int_mod:nn {#1} {#2}} {#2}} }% \int_mod:nn is negative
+}
+
+% usage: \__atableau_residue_C:nn
+% Computes the residue of #1 in affine type C. When e=3 this residue pattern is
+% 0 1 2 3 2 1 0 1 2 3 2 1 0 1 ...
+% As with \int_mod:n, the result is left in the input stream.
+\cs_new:Npn \__atableau_residue_C:nn #1 #2
+{
+ \int_compare:nNnTF {#1} < {0}
+ { % #1 is negative
+ \int_compare:nNnTF {\int_mod:nn {#1} {2*#2}} < {-#2}
+ { \int_eval:n { 2*#2 + \int_mod:nn {#1} {2*#2} } }
+ { \int_eval:n { \int_mod:nn {-#1} {2*#2} } }
+ }
+ { % #1 is non-negative
+ \int_compare:nNnTF {\int_mod:nn {#1} {2*#2}} > {#2}
+ { \int_eval:n { 2*#2 - \int_mod:nn {#1} {2*#2} } }
+ { \int_eval:n { \int_mod:nn {#1} {2*#2} } }
+ }
+}
+
+% usage: \__atableau_residue_AA:nn
+% Computes the residue of #1 in twisted type A. When e=3 this residue pattern is
+% 0 1 2 3 3 2 1 0 1 2 3 3 2 1 0 1 ...
+% As with \int_mod:n, the result is left in the input stream.
+\cs_new:Npn \__atableau_residue_AA:nn #1 #2
+{
+ \int_compare:nNnTF {#1} < {0}
+ { % #1 is negative
+ \int_compare:nNnTF {\int_mod:nn {#1} {2*#2+1}} < {-#2}
+ { \int_eval:n { 2*#2+1 + \int_mod:nn {#1} {2*#2+1}} }
+ { \int_eval:n { \int_mod:nn {-#1} {2*#2+1} } }
+ }
+ { % #1 is non-negative
+ \int_compare:nNnTF {\int_mod:nn {#1} {2*#2+1}} > {#2}
+ { \int_eval:n { 2*#2+1 - \int_mod:nn {#1} {2*#2+1} } }
+ { \int_eval:n { \int_mod:nn {#1} {2*#2+1} } }
+ }
+}
+
+% usage: \__atableau_residue_D:nn
+% Computes the residue of #1 in affine type C. When e=3 this residue pattern is
+% 0 1 2 3 3 2 1 0 0 1 2 3 3 2 1 0 0 1 ...
+% As with \int_mod:n, the result is left in the input stream.
+\cs_new:Npn \__atableau_residue_DD:nn #1 #2
+{
+ \int_compare:nNnTF {#1} < {0}
+ { % #1 is negative
+ \int_compare:nNnTF {\int_mod:nn {#1} {2*#2+2}} < {-#2}
+ { \int_eval:n {2*#2+1 + \int_mod:nn {#1} {2*#2+2}} }
+ { \int_eval:n { -\int_mod:nn {#1} {2*#2+2} } }
+ }
+ { % #1 is non-negative
+ \int_compare:nNnTF {\int_mod:nn {#1} {2*#2+2}} > {#2}
+ { \int_eval:n {2*#2+1- \int_mod:nn {#1} {2*#2+2} } }
+ { \int_eval:n { \int_mod:nn {#1} {2*#2+2} } }
+ }
+}
+
+
+% use type A residues by default
+\cs_set_eq:NN \__atableau_residue:nn \__atableau_residue_A:nn
+
+% ---------------------------------------------------------------------------
+% Parsing input
+
+% \seq_set_split:Nnn does not respect braces around singleton entries
+% such as in { 1345, 8{10}, {11}, {12} }, with the result that {11}
+% and {12} are treated as {1}{1} and {1}{2}, respectively. As this is
+% not what we want, we use \peek_charcode:NTF to do this ourselves.
+\cs_new_protected:Npn \__atableau_peek_tableau:w
+{
+ \peek_remove_spaces:n { % ignore spaces
+ \peek_charcode_remove:NTF ,
+ {
+ % record the column index in the shape for drawing the border
+ \seq_put_right:NV \l__atableau_shape_seq \l__atableau_col_int
+
+ % increment the row index
+ \int_incr:N \l__atableau_row_int
+
+ % reset the column index, and update the skew shape for shifted tableau
+ \bool_if:NTF \l__atableau_shifted_bool
+ {
+ \seq_put_right:No \l__atableau_skew_seq {\int_use:N \l__atableau_row_int}
+ \int_set_eq:NN \l__atableau_col_int \l__atableau_row_int
+
+ }
+ {
+ \int_set:Nn \l__atableau_col_int { 0\seq_item:Nn \l__atableau_skew_seq {\l__atableau_row_int+1}}
+ }
+
+ % look for the next entry
+ \__atableau_peek_tableau:w
+ }
+ {
+ \__atableau_peek_style:nw {draw_entry:nn}
+ }
+ }
+}
+
+% ---------------------------------------------------------------------------
+
+% usage: \__atableau_peek_style:nw {command suffix}
+% Read the next entry in the input sequence, with any optional style given by
+% a * or [...], and then pass this data to the command \__atableau_#1.
+\cs_new_protected:Npn \__atableau_peek_style:nw #1
+{
+ \peek_remove_spaces:n { % ignore spaces
+ \peek_charcode:NTF [
+ { \use:c{__atableau_#1} }
+ {
+ \peek_charcode_remove:NTF *
+ { \use:c{__atableau_#1} [\l__atableau_starstyle_tl] }
+ { \use:c{__atableau_#1} [] }
+ }
+ }
+}
+
+% To parse the bead specifications used by \Abacus we need to accept the
+% a "bead specification" of the following form
+% [style]m^k_txt
+% where the [style] could simply be a *, the m is an integer, a part of the
+% partition being constructed, the k its exponent and txt is the text for the
+% node. Except for m, all of of these components are optional, with the
+% exponent being 1 if it is omitted. As is customary, the order of the
+% superscript and subscript is interchangeable. To parse these expressions we
+% first use \__atableau_peek_style:nw to strip off the style specification, via
+% \__atableau_record_style:nn, and then pass between \__atableau_peek_beads:nw
+% and \__atableau_record:nn to look ahead for the characters ^ and _ to decide
+% which of the following token lists the next character is added to:
+\cs_new_protected:Npn \__atableau_record_style:nn [#1] #2
+{
+ % clear the bead token lists
+ \tl_set:Nn \l__atableau_capture_style_tl {#1}
+ \tl_set:Nn \l__atableau_capture_part_tl {#2}
+ \tl_clear:N \l__atableau_capture_exp_tl
+ \tl_clear:N \l__atableau_capture_txt_tl
+ \__atableau_peek_beads:nw {part}
+}
+
+% look for a caret or an underscore and pass on to \__atableau_record_bead:nn
+\cs_new_protected:Npn \__atableau_peek_beads:nw #1
+{
+ \peek_remove_spaces:n { % ignore spaces
+ \peek_charcode_remove:NTF _
+ { \__atableau_record_bead:nn {txt} {}}
+ {
+ \peek_charcode_remove:NTF ^ { \__atableau_record_bead:nn {exp} {}}
+ { \__atableau_record_bead:nn {#1} }
+ }
+ }
+}
+
+% #1 is one of part, exp or txt
+\cs_new_protected:Npn \__atableau_record_bead:nn #1 #2
+{
+ \quark_if_recursion_tail_stop_do:nn {#2}
+ {
+ % the data in the sequences \l__atableau_capture_exp_tl times
+ \tl_if_empty:NT \l__atableau_capture_exp_tl { \tl_set:Nn \l__atableau_capture_exp_tl {1}}
+ \int_step_inline:nn { \l__atableau_capture_exp_tl }
+ {
+ \int_incr:N \l__atableau_beads_int
+ \seq_put_right:NV \l__atableau_shape_seq \l__atableau_capture_part_tl
+ \seq_put_right:NV \l__atableau_texts_seq \l__atableau_capture_txt_tl
+ \seq_put_right:NV \l__atableau_styles_seq \l__atableau_capture_style_tl
+ }
+ }
+ \tl_put_right:cn {l__atableau_capture_#1_tl} {#2}
+ \__atableau_peek_beads:nw {#1}
+}
+
+
+% usage: \__atableau_count_entries:nn [style] {entry}
+% Count the number of entries in the row, storing the result in c_int
+\cs_new_protected:Npn \__atableau_count_entries:nn [#1] #2
+{
+ % exit when we reach the end of the row
+ \quark_if_recursion_tail_stop:n {#2}
+
+ \int_incr:N \l__atableau_c_int
+ \__atableau_peek_style:nw {count_entries:nn}
+}
+
+% usage: \__atableau_count_row:n {entries}
+\cs_new_protected:Npn \__atableau_count_row:n #1
+{
+ \__atableau_peek_style:nw {count_entries:nn} #1 \q_recursion_tail \q_recursion_stop
+}
+
+% ---------------------------------------------------------------------------
+% creating custom diagrams
+
+% usage: \__atableau_compute_conjugate_partition:N {seq}
+% compute the conjugate partition of <seq> and store in \l__atableau_conjugate_seq
+\cs_new_protected:Npn \__atableau_compute_conjugate_partition:N #1
+{
+ \seq_clear:N \l__atableau_conjugate_seq
+ \int_zero:N \l_tmpa_int % previous part
+ \int_set:No \l__atableau_r_int {\seq_count:N #1}
+ \int_while_do:nn {\l__atableau_r_int > 0}
+ {
+ \int_set:No \l_tmpb_int {\seq_item:NV #1 \l__atableau_r_int }
+ \int_step_inline:nn { \l_tmpb_int - \l_tmpa_int }
+ {
+ \seq_put_right:NV \l__atableau_conjugate_seq \l__atableau_r_int
+ }
+ \int_set_eq:NN \l_tmpa_int \l_tmpb_int
+ \int_decr:N \l__atableau_r_int
+ }
+}
+
+% usage: \__atableau_set_partition:nn {shape|skew} {csv for partition}
+% This function allows the partition to be given either as a comma separated
+% list of integers, or as a comma separated list of integers with exponents
+% giving the multiplicity of each part. For example, 4,3,3,3,2 and 4,3^3,2
+% are both supported.
+% TODO? Rewrite using quarks?
+\cs_new_protected:Npn \__atableau_set_partition:nn #1 #2
+{
+ \seq_clear:c {l__atableau_#1_seq}
+ \clist_map_inline:nn {#2} { \__atableau_add_to_partition:nn {#1} {##1} }
+}
+
+% add parts to the partition \l__atableau_#1_seq given input
+% of the form k or k^r
+\cs_new_protected:Npn \__atableau_add_to_partition:nn #1 #2
+{
+ % split #1 on ^: the trailing ^1 sets the exponent to 1 if it's omitted
+ \seq_set_split:Nnn \l_tmpa_seq {^} {#2 ^1}
+ % given k or k^r, set \l_tmpa_int=k and \l_tmpb_int=r, where r=1 with input k
+ \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl % part
+ \seq_pop_left:NN \l_tmpa_seq \l_tmpb_tl % exponent
+ % now add \l_tmpa_int to \l__atableau_#1_seq b times
+ \int_step_inline:nn {\l_tmpb_tl} { \seq_put_right:ce {l__atableau_#1_seq} {\l_tmpa_tl} }
+}
+
+% usage: \__atableau_diagram_for_shape:N {partition}
+% Young diagrams are drawn using the \Tableau command by generating
+% a sequence of ~ for the partition. For example,
+% it replaces the sequence 3,2,2,1 with
+% the dot-sequence ~~~,~~,~~,~,
+\cs_new_protected:Npn \__atableau_diagram_for_shape:N #1
+{
+ \tl_clear:N \l__atableau_entries_tl
+ \tl_set:Nn \l_tmpb_tl {}
+ \seq_map_inline:Nn #1
+ {
+ \tl_put_right:No \l__atableau_entries_tl \l_tmpb_tl
+ \tl_put_right:Nx \l__atableau_entries_tl { \prg_replicate:nn {##1} {{{~}}} }
+ \tl_set:Nn \l_tmpb_tl {,}
+ }
+}
+
+% usage: \__atableau_shape_to_content:Nn {partition sequence}
+% Return the content sequence to for a tableau of this shape
+\cs_new_protected:Npn \__atableau_shape_to_content:N #1
+{
+ \tl_clear:N \l__atableau_entries_tl
+ \int_zero:N \l__atableau_row_int
+ \tl_set:Nn \l_tmpb_tl {}
+ \seq_map_inline:Nn #1
+ {
+ \tl_put_right:No \l__atableau_entries_tl \l_tmpb_tl
+ \int_incr:N \l__atableau_row_int
+ \int_step_inline:nn {##1}
+ {
+ \int_set:Nn \l_tmpa_int { \l__atableau_charge_int + ####1 - \l__atableau_row_int + 0\seq_item:NV \l__atableau_skew_seq \l__atableau_row_int }
+ \int_compare:nNnTF {\l_tmpa_int} < {0}
+ { \__atableau_tl_put_right_braced:Ne \l__atableau_entries_tl {\exp_not:N\shortminus\int_eval:n{-\l_tmpa_int}} }
+ { \__atableau_tl_put_right_braced:No \l__atableau_entries_tl {\int_use:N \l_tmpa_int} }
+ }
+ \tl_set:Nn \l_tmpb_tl {,}
+ }
+}
+
+% Diagrams with show=last are drawn using the \Tableau command, with
+% usage: \__atableau_shape_to_last:N {partition sequence}
+\cs_new_protected:Npn \__atableau_shape_to_last:N #1
+{
+ % compute conjugate of #1 as \l__atableau_conjugate_seq
+ %\__atableau_compute_conjugate_partition:N #1
+
+ % initialise \l_tmpc_seq -- should not be necessary but otherwise \seq_item:NV fails
+ \seq_clear:N \l_tmpc_seq % construct the tableau in this sequence and then decant
+ \seq_map_inline:Nn #1 {\seq_put_right:Nn \l_tmpc_seq {}}
+
+ % value of last entry added to the tableau
+ \int_set:Nn \l__atableau_c_int {\l__atableau_charge_int}
+
+ % length of the first row of the partition/seq #1
+ \int_set:Nn \l__atableau_row_int {0\seq_item:Nn #1 {1}}
+
+ \int_step_inline:nn {\l__atableau_row_int} % ##1 is the column index
+ {
+ \int_zero:N \l__atableau_r_int % r_int is the row index
+ \seq_map_inline:Nn #1 % ####1 is the rth entry of the partition #1
+ {
+ \int_incr:N \l__atableau_r_int
+ \tl_set:Nn \l_tmpa_tl { 0\seq_item:NV \l__atableau_skew_seq \l__atableau_r_int}
+ \bool_if:nT { \int_compare_p:nNn {##1} > {\l_tmpa_tl} && \int_compare_p:nNn {\l_tmpa_tl+####1+1} > {##1}}
+ {
+ \int_incr:N \l__atableau_c_int
+ \tl_set:No \l_tmpa_tl { \seq_item:Nn \l_tmpc_seq {\l__atableau_r_int} }
+ \__atableau_tl_put_right_braced:No \l_tmpa_tl {\int_use:N \l__atableau_c_int}
+ \seq_set_item:NVx \l_tmpc_seq \l__atableau_r_int {\l_tmpa_tl}
+ }
+ }
+ }
+
+ % finally, unpack \l_tmpc_tl into l__atableau_entries_tl
+ \tl_clear:N \l__atableau_entries_tl
+ \tl_set:Nn \l_tmpb_tl {}
+ \seq_map_inline:Nn \l_tmpc_seq {
+ \tl_put_right:No \l__atableau_entries_tl \l_tmpb_tl
+ \tl_put_right:Nn \l__atableau_entries_tl {##1}
+ \tl_set:Nn \l_tmpb_tl {,}
+ }
+}
+
+% Diagrams with show=first are drawn using the \Tableau command, with
+% usage: \__atableau_shape_to_first:N {partition sequence}
+\cs_new_protected:Npn \__atableau_shape_to_first:N #1
+{
+ \tl_clear:N \l__atableau_entries_tl
+ \int_set:Nn \l__atableau_r_int {\l__atableau_charge_int}
+ \tl_set:Nn \l_tmpb_tl {}
+ \seq_map_inline:Nn #1
+ {
+ \tl_put_right:No \l__atableau_entries_tl \l_tmpb_tl
+ \int_step_inline:nn {##1}
+ {
+ \int_incr:N \l__atableau_r_int
+ \__atableau_tl_put_right_braced:NV \l__atableau_entries_tl \l__atableau_r_int
+ }
+ \tl_set:Nn \l_tmpb_tl {,}
+ }
+ \seq_put_right:No \l__atableau_charge_seq {\int_use:N\l__atableau_r_int}
+}
+
+% usage: \__atableau_shape_to_hook:N {partition_seq}
+% Return a string for the hooks length tableau
+% Diagrams with show=hooks are drawn using the \Tableau command
+\cs_new_protected:Npn \__atableau_shape_to_hook:N #1
+{
+ % now construct the hook tableau
+ \tl_clear:N \l__atableau_entries_tl
+ \bool_if:NTF \l__atableau_shifted_bool
+ { % shifted tableau
+ % initialise l_tmpc_seq because we will construct the entries in it and unpack at the end
+ \seq_clear:N \l_tmpc_seq
+ \seq_map_inline:Nn #1 {\seq_put_right:Nn \l_tmpc_seq {}}
+ \int_set:Nn \l__atableau_col_int { 0\seq_item:Nn #1 {1} } % length of first row
+ \int_step_inline:nn { \l__atableau_col_int }
+ { % add hooks column by column, starting by determining the rows in columns ##1
+ \int_zero:N \l__atableau_row_int
+ \seq_map_inline:Nn #1
+ {
+ \bool_if:nT { \int_compare_p:nNn {##1} > {\l__atableau_row_int} && \int_compare_p:nNn {####1+\l__atableau_row_int+1} > {##1} }
+ {
+ \int_incr:N \l__atableau_row_int
+ }
+ }
+ % record length of row col+1
+ \int_set:Nn \l_tmpa_int {0\seq_item:Nn #1 {##1+1}}
+ % loop through rows 1,...,row and add the hook lengths
+ \int_step_inline:nn {\l__atableau_row_int}
+ {
+ \tl_set:Nx \l_tmpa_tl { \seq_item:Nn \l_tmpc_seq {####1} }
+ \tl_set:Nx \l_tmpb_tl { \int_eval:n {\seq_item:Nn #1 {####1} + \l__atableau_row_int - ##1 + \l_tmpa_int } }
+ \__atableau_tl_put_right_braced:NV \l_tmpa_tl \l_tmpb_tl
+ \seq_set_item:Nnx \l_tmpc_seq {####1} {\l_tmpa_tl}
+
+ }
+ }
+ \tl_set:Nx \l__atableau_entries_tl { \seq_use:Nn \l_tmpc_seq {,} }
+ }
+ { % unshifted (although could be skew, when all bets are off...)
+ % compute conjugate of #1 as \l__atableau_conjugate_seq
+ \int_zero:N \l__atableau_row_int
+ \tl_set:Nn \l_tmpb_tl {}
+ \__atableau_compute_conjugate_partition:N #1
+ \seq_map_inline:Nn #1
+ {
+ \tl_put_right:No \l__atableau_entries_tl \l_tmpb_tl
+ \int_incr:N \l__atableau_row_int
+ \int_step_inline:nn {##1}
+ {
+ \tl_set:Ne \l_tmpc_tl { \int_eval:n {##1+\seq_item:Nn \l__atableau_conjugate_seq {####1} -\l__atableau_row_int-####1+1} }
+ \__atableau_tl_put_right_braced:NV \l__atableau_entries_tl \l_tmpc_tl
+ }
+ \tl_set:Nn \l_tmpb_tl {,}
+ }
+ }
+}
+
+% Residue diagrams are drawn using the \Tableau command, with
+% usage: \__atableau_shape_to_residue:N {partition sequence}
+\cs_new_protected:Npn \__atableau_shape_to_residue:N #1
+{
+ \tl_clear:N \l__atableau_entries_tl
+ \int_zero:N \l__atableau_row_int
+ \tl_set:Nn \l_tmpb_tl {}
+ \seq_map_inline:Nn #1
+ {
+ \tl_put_right:No \l__atableau_entries_tl \l_tmpb_tl
+ \int_incr:N \l__atableau_row_int
+ \int_step_inline:nn {##1}
+ {
+ \int_set:Nn \l_tmpa_int { \l__atableau_charge_int + ####1 - \l__atableau_row_int }
+ \int_add:Nn \l_tmpa_int { + 0\seq_item:NV \l__atableau_skew_seq \l__atableau_row_int }
+ \tl_set:Nx \l_tmpa_tl { \__atableau_residue:nn { \l_tmpa_int } {\l__atableau_e_int} }
+ \__atableau_tl_put_right_braced:Nx \l__atableau_entries_tl { \l_tmpa_tl }
+ }
+ \tl_set:Nn \l_tmpb_tl {,}
+ }
+}
+
+% ---------------------------------------------------------------------------
+% draw diagram border
+
+% usage: \__atableau_draw_border:nn #1 #2 {name of sequence} {name of style}
+% The name of the sequence is either skew or shape
+\cs_new_protected:Npn \__atableau_draw_border:nn #1 #2
+{
+ \int_zero:N \l__atableau_r_int % row index
+ \int_zero:N \l__atableau_c_int % column index
+ \tl_clear:N \l__atableau_border_tl % will hold the border
+
+ \seq_map_inline:cn {l__atableau_#1_seq}
+ {
+ % compute the endpoints of this row
+ \str_if_eq:nnF {skew} {#1}
+ {
+ \int_set:Nn \l__atableau_c_int { 0\seq_item:Nn \l__atableau_skew_seq {\l__atableau_r_int+1}}
+ \bool_if:nT { \l__atableau_tabloid_bool && \int_compare_p:nNn {\l__atableau_r_int} > {0} }
+ {
+ \int_set:Nn \l__atableau_c_int { \int_min:nn {\l__atableau_c_int} {0\seq_item:Nn \l__atableau_skew_seq {\l__atableau_r_int}} }
+ }
+ }
+ \__atableau_set_box_coordinates:nVV {a} \l__atableau_r_int \l__atableau_c_int
+ \__atableau_set_box_coordinates:nVn {b} \l__atableau_r_int {##1}
+ \bool_if:nTF { \int_compare_p:n {\l__atableau_r_int = 0} || \l__atableau_tabloid_bool }
+ {
+ % add line along "top" of the row
+ \tl_put_right:Nx \l__atableau_border_tl {(\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp)}
+ \__atableau_add_row_ends:
+ }
+ {
+ % add lines for second and later rows
+ \tl_put_left:Nx \l__atableau_border_tl {(\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--}
+ \tl_put_right:Nx \l__atableau_border_tl {--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp)}
+ \__atableau_add_row_ends:
+ }
+ \int_incr:N \l__atableau_r_int
+ }
+
+ % draw the border that we have constructed
+ \tl_if_empty:NF \l__atableau_border_tl
+ {
+ % fill in the last line
+ \bool_if:nT { \l__atableau_tabloid_bool && \int_compare_p:nNn {\l__atableau_r_int} > {0} }
+ {
+ \int_set:Nn \l__atableau_c_int { 0\seq_item:NV \l__atableau_skew_seq \l__atableau_r_int }
+ \__atableau_set_box_coordinates:nVV {a} \l__atableau_r_int \l__atableau_c_int
+ }
+ \tl_put_right:Nx \l__atableau_border_tl {(\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp)}
+ % draw the border
+ \draw[aTableau/#2] \l__atableau_border_tl;
+ }
+}
+
+
+% usage: \__atableau_remove_dotted_tableau_rows:
+% Poke some holes in the border for the rows in dotted_rows_seq
+\cs_new_protected:Nn \__atableau_remove_dotted_tableau_rows:
+{
+ % To collect repeated rows in dotted_rows_seq
+ % we use \seq_map_inline:Nn and then compare ##1 with \l__atableau_r_int to
+ % determine if this is a new row.
+
+ % take a copy of \l__atableau_dotted_rows_seq so that the pop_left's below
+ % do not destroy it
+ \seq_set_eq:NN \l_tmpb_seq \l__atableau_dotted_rows_seq
+ \bool_do_until:nn { \seq_if_empty_p:N \l_tmpb_seq }
+ {
+ \seq_pop_left:NN \l_tmpb_seq \l_tmpa_tl
+ \int_set:Nn \l__atableau_row_int {\l_tmpa_tl}
+ \int_set:Nn \l__atableau_r_int {\l__atableau_row_int+1}
+
+ % LaTeX3 does not provide \seq_if_in_p:NN, so ...
+ \bool_set_true:N \l_tmpa_bool
+ \bool_do_while:nn { \l_tmpa_bool }
+ {
+ \int_set:Nn \l_tmpa_int {0\seq_item:Nn \l_tmpb_seq 1}
+ \int_compare:nNnTF {\l__atableau_r_int} = {\l_tmpa_int}
+ {
+ \seq_pop_left:NN \l_tmpb_seq \l_tmpa_tl
+ \int_incr:N \l__atableau_r_int
+ }
+ { \bool_set_false:N \l_tmpa_bool }
+ }
+
+ % We want to blank out the rows between the four coordinates
+ % a=(row,tmpa) .... b=(row,col)
+ % | |
+ % c=(r,tmpb) .... d=(r,c)
+
+ % set tmpa and tmpb to the column index for rows row and r, respectively
+ \int_set:No \l__atableau_col_int { 0\seq_item:NV \l__atableau_shape_seq \l__atableau_row_int } % mu_row
+ \int_set:No \l__atableau_c_int { 0\seq_item:NV \l__atableau_shape_seq \l__atableau_r_int } % mu_r
+
+ % shift in col-direction
+ \fp_set:Nn \l__atableau_xa_fp {\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_set:Nn \l__atableau_ya_fp {\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp}
+
+ % shift in row-direction
+ \fp_set:Nn \l__atableau_xb_fp {\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_set:Nn \l__atableau_yb_fp {\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+
+ % a draw between the coordinates a, b, c, d
+ \__atableau_set_box_coordinates:noo {l} {\l__atableau_row_int-1} {\l__atableau_col_int-1} % point b
+
+ \draw[aTableau/clearBoxes]
+ (\fp_eval:n{\l__atableau_xl_fp+0.58*\l__atableau_xa_fp-0.42*\l__atableau_xb_fp},
+ \fp_eval:n{\l__atableau_yl_fp+0.58*\l__atableau_ya_fp-0.42*\l__atableau_yb_fp})
+ --++(\fp_eval:n{(\l__atableau_r_int-\l__atableau_row_int)*\l__atableau_xb_fp},
+ \fp_eval:n{(\l__atableau_r_int-\l__atableau_row_int)*\l__atableau_yb_fp})
+ --++(\fp_eval:n{(\l__atableau_c_int-\l__atableau_col_int)*\l__atableau_xa_fp},
+ \fp_eval:n{(\l__atableau_c_int-\l__atableau_col_int)*\l__atableau_ya_fp})
+ --++(\fp_eval:n{-0.12*\l__atableau_xb_fp}, \fp_eval:n{-0.12*\l__atableau_yb_fp})
+ --++(\fp_eval:n{-(0.15+\l__atableau_c_int)*\l__atableau_xa_fp}, \fp_eval:n{-(0.15+\l__atableau_c_int)*\l__atableau_ya_fp})
+ --++(\fp_eval:n{(\l__atableau_row_int-\l__atableau_r_int+0.12)*\l__atableau_xb_fp},
+ \fp_eval:n{(\l__atableau_row_int-\l__atableau_r_int+0.12)*\l__atableau_yb_fp})
+ --cycle
+ ;
+
+ % finally, we need to add dots between b and d
+ \draw[aTableau/dottedLine]
+ (\fp_eval:n{0.5*\l__atableau_xa_fp-0.5*\l__atableau_xb_fp+\l__atableau_xl_fp},
+ \fp_eval:n{0.5*\l__atableau_ya_fp-0.5*\l__atableau_yb_fp+\l__atableau_yl_fp})
+ --++(\fp_eval:n{(\l__atableau_c_int-\l__atableau_col_int)*\l__atableau_xa_fp+(\l__atableau_r_int-\l__atableau_row_int)*\l__atableau_xb_fp},
+ \fp_eval:n{(\l__atableau_c_int-\l__atableau_col_int)*\l__atableau_ya_fp+(\l__atableau_r_int-\l__atableau_row_int)*\l__atableau_yb_fp})
+ ;
+
+ % and between a and c, which is trickier as the skew shape plays a role
+ \int_set:No \l_tmpa_int { \int_eval:n {0\seq_item:Nn \l__atableau_skew_seq \l__atableau_row_int} }
+ \int_set:No \l_tmpb_int { \int_eval:n {\int_max:nn{\l_tmpa_int}{0\seq_item:Nn \l__atableau_skew_seq \l__atableau_r_int} }}
+ \int_decr:N \l__atableau_row_int
+ \int_decr:N \l__atableau_r_int
+ \draw[aTableau/dottedLine]
+ (\fp_eval:n{\l__atableau_x_fp+\l_tmpa_int*\l__atableau_xa_fp+\l__atableau_row_int*\l__atableau_xb_fp},
+ \fp_eval:n{\l__atableau_y_fp+\l_tmpa_int*\l__atableau_ya_fp+\l__atableau_row_int*\l__atableau_yb_fp})
+ --(\fp_eval:n{\l__atableau_x_fp+\l_tmpb_int*\l__atableau_xa_fp+\l__atableau_r_int*\l__atableau_xb_fp},
+ \fp_eval:n{\l__atableau_y_fp+\l_tmpb_int*\l__atableau_ya_fp+\l__atableau_r_int*\l__atableau_yb_fp})
+ ;
+
+ \bool_if:nT { \int_compare_p:nNn {\l_tmpa_int}>{0} && \l__atableau_skew_border_bool }
+ {
+ \draw[aTableau/dottedLine,draw=\l__atableau_skew_border_tl]
+ (\fp_eval:n{\l__atableau_x_fp+\l__atableau_row_int*\l__atableau_xb_fp},
+ \fp_eval:n{\l__atableau_y_fp+\l__atableau_row_int*\l__atableau_yb_fp})
+ --(\fp_eval:n{\l__atableau_x_fp+\l__atableau_r_int*\l__atableau_xb_fp},
+ \fp_eval:n{\l__atableau_y_fp+\l__atableau_r_int*\l__atableau_yb_fp})
+ ;
+ }
+ }
+}
+
+% usage: \__atableau_remove_dotted_tableau_cols:
+% Poke some holes in the border for the cols in dotted_rows_seq
+\cs_new_protected:Nn \__atableau_remove_dotted_tableau_cols:
+{
+ % To collect repeated columns in dotted_cols_seq
+ % we use \seq_map_inline:Nn and then compare ##1 with \l__atableau_c_int to
+ % determine if this is a new column.
+
+ % conjugate partition and skew shape
+ \__atableau_compute_conjugate_partition:N \l__atableau_skew_seq
+ \seq_set_eq:NN \l_tmpa_seq \l__atableau_conjugate_seq % \l_tmpa_seq is the conjugate skew
+ \__atableau_compute_conjugate_partition:N \l__atableau_shape_seq % conjugate shape
+
+ % take a copy of \l__atableau_dotted_cols_seq so that the pop_left's below
+ % do not destroy it
+ \seq_set_eq:NN \l_tmpb_seq \l__atableau_dotted_cols_seq
+ \bool_do_until:nn { \seq_if_empty_p:N \l_tmpb_seq }
+ {
+ \seq_pop_left:NN \l_tmpb_seq \l_tmpa_tl
+ \int_set:Nn \l__atableau_col_int {\l_tmpa_tl}
+ \int_set:Nn \l__atableau_c_int {\l__atableau_col_int+1}
+
+ % LaTeX3 does not provide \seq_if_in_p:NN, so ...
+ \bool_set_true:N \l_tmpa_bool
+ \bool_do_while:nn { \l_tmpa_bool }
+ {
+ \int_set:Nn \l_tmpa_int {0\seq_item:Nn \l_tmpb_seq 1}
+ \int_compare:nNnTF {\l__atableau_c_int} = {\l_tmpa_int}
+ {
+ \seq_pop_left:NN \l_tmpb_seq \l_tmpa_tl
+ \int_incr:N \l__atableau_c_int
+ }
+ { \bool_set_false:N \l_tmpa_bool }
+ }
+
+ % We want to blank out the rows between the four coordinates
+ % a=(row,tmpa) .... b=(r,tmpb)
+ % | |
+ % c=(row,col) .... d=(r,c)
+
+ % set row and r to the row indices for col and c, respectively
+ \int_set:No \l__atableau_row_int { 0\seq_item:NV \l__atableau_conjugate_seq \l__atableau_col_int } % mu_row
+ \int_set:No \l__atableau_r_int { 0\seq_item:NV \l__atableau_conjugate_seq \l__atableau_c_int } % mu_r
+
+
+ % shift in col-direction
+ \fp_set:Nn \l__atableau_xa_fp {\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_set:Nn \l__atableau_ya_fp {\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp}
+
+ % shift in row-direction
+ \fp_set:Nn \l__atableau_xb_fp {\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_set:Nn \l__atableau_yb_fp {\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+
+ % a draw between the coordinates a, b, c, d
+ \__atableau_set_box_coordinates:noo {l} {\l__atableau_row_int-1} {\l__atableau_col_int-1} % point b
+
+ \draw[aTableau/clearBoxes]
+ (\fp_eval:n{\l__atableau_xl_fp-0.42*\l__atableau_xa_fp+0.58*\l__atableau_xb_fp},
+ \fp_eval:n{\l__atableau_yl_fp-0.42*\l__atableau_ya_fp+0.58*\l__atableau_yb_fp})
+ --++(\fp_eval:n{(\l__atableau_c_int-\l__atableau_col_int)*\l__atableau_xa_fp},
+ \fp_eval:n{(\l__atableau_c_int-\l__atableau_col_int)*\l__atableau_ya_fp})
+ --++(\fp_eval:n{(\l__atableau_r_int-\l__atableau_row_int)*\l__atableau_xb_fp},
+ \fp_eval:n{(\l__atableau_r_int-\l__atableau_row_int)*\l__atableau_yb_fp})
+ --++(\fp_eval:n{-0.12*\l__atableau_xa_fp}, \fp_eval:n{-0.12*\l__atableau_ya_fp})
+ --++(\fp_eval:n{-(0.15+\l__atableau_r_int)*\l__atableau_xb_fp}, \fp_eval:n{-(0.15+\l__atableau_r_int)*\l__atableau_yb_fp})
+ --++(\fp_eval:n{(\l__atableau_col_int-\l__atableau_c_int+0.12)*\l__atableau_xa_fp},
+ \fp_eval:n{(\l__atableau_col_int-\l__atableau_c_int+0.12)*\l__atableau_ya_fp})
+ --cycle
+ ;
+
+ % finally, we need to add dots between b and d
+ \draw[aTableau/dottedLine]
+ (\fp_eval:n{\l__atableau_xl_fp-0.5*\l__atableau_xa_fp+0.5*\l__atableau_xb_fp},
+ \fp_eval:n{\l__atableau_yl_fp-0.5*\l__atableau_ya_fp+0.5*\l__atableau_yb_fp})
+ --++(\fp_eval:n{(\l__atableau_r_int-\l__atableau_row_int)*\l__atableau_xb_fp+(\l__atableau_c_int-\l__atableau_col_int)*\l__atableau_xa_fp},
+ \fp_eval:n{(\l__atableau_r_int-\l__atableau_row_int)*\l__atableau_yb_fp+(\l__atableau_c_int-\l__atableau_col_int)*\l__atableau_ya_fp})
+ ;
+
+ % and between a and c, which is trickier as the skew shape plays a role
+ \int_set:No \l_tmpa_int { \int_eval:n {0\seq_item:Nn \l_tmpa_seq \l__atableau_col_int} }
+ \int_set:No \l_tmpb_int { \int_eval:n {\int_max:nn{\l_tmpa_int}{0\seq_item:Nn \l_tmpa_seq \l__atableau_c_int} }}
+ \int_decr:N \l__atableau_col_int
+ \int_decr:N \l__atableau_c_int
+ \draw[aTableau/dottedLine]
+ (\fp_eval:n{\l__atableau_x_fp+\l_tmpa_int*\l__atableau_xb_fp+\l__atableau_col_int*\l__atableau_xa_fp},
+ \fp_eval:n{\l__atableau_y_fp+\l_tmpa_int*\l__atableau_yb_fp+\l__atableau_col_int*\l__atableau_ya_fp})
+ --(\fp_eval:n{\l__atableau_x_fp+\l_tmpb_int*\l__atableau_xb_fp+\l__atableau_c_int*\l__atableau_xa_fp},
+ \fp_eval:n{\l__atableau_y_fp+\l_tmpb_int*\l__atableau_yb_fp+\l__atableau_c_int*\l__atableau_ya_fp})
+ ;
+
+ \bool_if:nT { \int_compare_p:nNn {\l_tmpa_int}>{0} && \l__atableau_skew_border_bool }
+ {
+ \draw[aTableau/dottedLine,draw=\l__atableau_skew_border_tl]
+ (\fp_eval:n{\l__atableau_x_fp+\l__atableau_col_int*\l__atableau_xa_fp},
+ \fp_eval:n{\l__atableau_y_fp+\l__atableau_col_int*\l__atableau_ya_fp})
+ --(\fp_eval:n{\l__atableau_x_fp+\l__atableau_c_int*\l__atableau_xa_fp},
+ \fp_eval:n{\l__atableau_y_fp+\l__atableau_c_int*\l__atableau_ya_fp})
+ ;
+ }
+ }
+}
+
+% usage: \__atableau_draw_label:
+% Add the label to a diagram
+\cs_new_protected:Nn \__atableau_draw_label:
+{
+ % determine where the label should be attached, which is the (1,1)-box by default
+ \fp_set_eq:NN \l__atableau_xa_fp \l__atableau_x_fp
+ \fp_set_eq:NN \l__atableau_ya_fp \l__atableau_y_fp
+ \bool_if:nF { \seq_if_empty_p:N \l__atableau_skew_seq || \l__atableau_skew_border_bool }
+ { % attach label to the (1,skew_1)-box
+ \tl_set:Nn \l_tmpa_tl { 0\seq_item:Nn \l__atableau_skew_seq {1} }
+ \fp_add:Nn \l__atableau_xa_fp {\l_tmpa_tl*\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_ya_fp {\l_tmpa_tl*\l__atableau_tab_col_dy_fp*\l__atableau_box_wd_fp}
+ }
+ % add the label
+ \node[aTableau/labelStyle] at (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp) { \__atableau_entry:n{\l__atableau_label_tl} };
+}
+
+% usage: \__atableau_draw_skew_boxes:
+% Draw the skew boxes using ribbons
+\cs_new_protected:Nn \__atableau_draw_skew_boxes:
+{
+ \group_begin:
+ % override the style of the skew boxes inside this group
+ \tikzset{aTableau/ribbonBox/.style=aTableau/skewBox}
+ \tikzset{aTableau/ribbonStyle/.style={draw=none,fill=none}}
+ \tl_set:Nn \l__atableau_ribbon_type_tl {ribbon} % change ribbon type to ribbon
+ \int_zero:N \l__atableau_r_int
+ \seq_map_inline:Nn \l__atableau_skew_seq
+ {
+ \int_incr:N \l__atableau_r_int
+ \int_compare:nNnT {##1} > {0}
+ {
+ \tl_clear:N \l_tmpa_tl
+ \tl_put_right:Ne \l_tmpa_tl { {\int_use:N \l__atableau_r_int} }
+ \tl_put_right:Ne \l_tmpa_tl { {##1} }
+ \tl_put_right:Ne \l_tmpa_tl { \prg_replicate:nn {##1-1} {c} }
+ \__atableau_add_ribbon:V \l_tmpa_tl
+ }
+ }
+ \group_end:
+}
+
+% usage: \__atableau_add_row_ends: increment the (xa,ya) and (xb,yb) coordinates down
+% one row and add the lines at the left and right hand ends of the row to
+% \l__atableau_border_tl. If this is a tabloid then we only want to add the
+% coordinates but otherwise we join them up
+\cs_new_protected:Nn \__atableau_add_row_ends:
+{
+ \bool_if:NTF \l__atableau_conjugate_bool
+ {
+ % adding to the left-hand side
+ \fp_add:Nn \l__atableau_xa_fp {\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_ya_fp {\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp}
+
+ % adding to the right-hand side
+ \fp_add:Nn \l__atableau_xb_fp {\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_yb_fp {\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp}
+
+ \bool_if:NTF \l__atableau_tabloid_bool
+ {
+ \tl_put_left:Nx \l__atableau_border_tl {--(\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)}
+ \tl_put_right:Nx \l__atableau_border_tl {(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp)--}
+ }
+ {
+ \tl_put_left:Nx \l__atableau_border_tl {(\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--}
+ \tl_put_right:Nx \l__atableau_border_tl {--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp)}
+ }
+ }
+ {
+ % adding to the left-hand side
+ \fp_add:Nn \l__atableau_xa_fp {\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_ya_fp {\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+
+ % adding to the right-hand side
+ \fp_add:Nn \l__atableau_xb_fp {\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_yb_fp {\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+
+ \bool_if:NTF \l__atableau_tabloid_bool
+ {
+ \tl_put_left:Nx \l__atableau_border_tl {(\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)}
+ \tl_put_right:Nx \l__atableau_border_tl {(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp)--}
+ }
+ {
+ \tl_put_left:Nx \l__atableau_border_tl {(\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--}
+ \tl_put_right:Nx \l__atableau_border_tl {--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp)}
+ }
+ }
+}
+
+% ---------------------------------------------------------------------------
+% Tableaux
+
+% usage: \__atableau_draw_tableau:n {tableau specifications}
+% The entries are first primarily because the \Diagram commands need
+% to force the entries to expand
+\cs_new_protected:Npn \__atableau_draw_tableau:n #1
+{
+ % set the star style
+ \tl_set:Nn \l__atableau_starstyle_tl {aTableau/tableauStarStyle}
+
+ % disable interior boxes if boxes_bool is false
+ \bool_if:NF \l__atableau_boxes_bool { \__atableau_tikzset_append:nn {boxStyle} {draw=none} }
+
+ % initialise the skew shape for a shifted tableaux
+ \bool_if:NT \l__atableau_shifted_bool
+ {
+ \seq_clear:N \l__atableau_skew_seq
+ \seq_put_right:No \l__atableau_skew_seq {0}
+ }
+
+ % record the tableau shape as we go so that we can draw the border
+ % in finalise_tableau
+ \seq_clear:N \l__atableau_shape_seq
+
+ % the styled boxes are drawn at the end
+ \tl_clear:N \l__atableau_styled_nodes_tl
+
+ % set initial row and column
+ \int_zero:N \l__atableau_row_int
+ \int_set:Nn \l__atableau_col_int { 0\seq_item:Nn \l__atableau_skew_seq {1}}
+
+ % Parse #1 into the rows and columns with style. Initially we used
+ % \seq_set_split:Nnn here, but this required double bracing
+ % multi-character entries whenever they were he only entry in their
+ % column. Now we peek for the commas and the style simultaneously.
+ \__atableau_peek_tableau:w #1 \q_recursion_tail \q_recursion_stop
+
+ % add the nodes with style
+ \l__atableau_styled_nodes_tl
+
+ % add the labels, ribbons, snobs and border
+ \__atableau_finalise_tableau:
+}
+
+% usage: \__atableau_finalise_tableau:
+% As it is used in several places, collect the code that finishes
+% drawing the tableau by adding the ribbons, paths, snobs, skew boxes,
+% border and the dotted rows and columns.
+\cs_new_protected:Nn \__atableau_finalise_tableau:
+{
+ % prevent paths and ribbons from updating shape
+ \cs_set_eq:NN \__atableau_update_shape: \prg_do_nothing:
+
+ % add paths
+ \seq_if_empty:NF \l__atableau_paths_seq
+ {
+ \tl_set:Nn \l__atableau_ribbon_type_tl {path} % change ribbon type to path
+ \seq_map_inline:Nn \l__atableau_paths_seq {\__atableau_add_ribbon:n {##1}}
+ }
+
+ % add ribbons
+ \tl_set:Nn \l__atableau_ribbon_type_tl {ribbon} % change ribbon type to ribbon
+ \seq_map_inline:Nn \l__atableau_ribbons_seq {\__atableau_add_ribbon:n {##1}}
+
+ % paths and ribbons are inside the delimiters, but snobs are not
+ \cs_set_eq:NN \__atableau_update_extrema:n \use_none:n
+
+ % draw border
+ \tl_if_blank:VF \l__atableau_label_tl { \__atableau_draw_label: }
+ \bool_if:NT \l__atableau_skew_boxes_bool { \__atableau_draw_skew_boxes: }
+ \bool_if:NT \l__atableau_skew_border_bool { \__atableau_draw_border:nn {skew} {skewBorder} }
+ \bool_if:NT \l__atableau_border_bool { \__atableau_draw_border:nn {shape} {borderStyle} }
+
+ % remove dotted rows and columns
+ \seq_if_empty:NF \l__atableau_dotted_rows_seq \__atableau_remove_dotted_tableau_rows:
+ \seq_if_empty:NF \l__atableau_dotted_cols_seq \__atableau_remove_dotted_tableau_cols:
+
+ % add snobs
+ \tl_set:Nn \l__atableau_ribbon_type_tl {snob} % change ribbon type to snob
+ \seq_map_inline:Nn \l__atableau_snobs_seq {\__atableau_add_ribbon:n {##1}}
+}
+
+% ---------------------------------------------------------------------------
+% box and bead coordinates
+
+% usage: \__atableau_update_multi_extrema:n {letter}
+% Update xmax, ymax and ymin using the x#1_fp and y#1_fp
+\cs_new_protected:Npn \__atableau_update_multi_extrema:n #1
+{
+ % adjust xmax, ymin and ymax for multishapes
+ \fp_set:Nn \l__atableau_xmax_fp { max(\l__atableau_xmax_fp, \use:c{l__atableau_x#1_fp}) }
+ \fp_set:Nn \l__atableau_ymax_fp { max(\l__atableau_ymax_fp, \use:c{l__atableau_y#1_fp}) }
+ \fp_set:Nn \l__atableau_ymin_fp { min(\l__atableau_ymin_fp, \use:c{l__atableau_y#1_fp}) }
+}
+
+\cs_new_protected:Npn \__atableau_update_multi_xtrema:n #1
+{
+ % adjust xmax for multishapes
+ \fp_set:Nn \l__atableau_xmax_fp { max(\l__atableau_xmax_fp, \use:c{l__atableau_x#1_fp}) }
+}
+
+% By default, we do not update ymin, ymax and xmax. This only happens for multishapes
+\cs_set_eq:NN \__atableau_update_extrema:n \use_none:n
+
+% usage: \__atableau_set_box_coordinates_normal:nnn <letter> <row> <col>: given the row and columns
+% indices, row and col, define the corresponding coordinates in a tableau
+% - \l__atableau_xl_fp : x-coordinates
+% - \l__atableau_yl_fp : y-coordinate
+% - \l__atableau_name_tl : the node name
+% Used by the tableau and diagram commands. Note that row and col both start
+% from 0, so the (1,1)-box has row=col=0.
+\cs_new_protected:Npn \__atableau_set_box_coordinates_normal:nnn #1 #2 #3
+{
+ \tl_set:Nx \l__atableau_name_tl {\l__atableau_prefix_tl-\int_eval:n{1+#2}-\int_eval:n {1+#3}}
+ \fp_set:cn {l__atableau_x#1_fp} {\l__atableau_x_fp+((#2+0.5)*\l__atableau_tab_row_dx_fp+(#3+0.5)*\l__atableau_tab_col_dx_fp)*\l__atableau_box_wd_fp }
+ \fp_set:cn {l__atableau_y#1_fp} {\l__atableau_y_fp+((#2+0.5)*\l__atableau_tab_row_dy_fp+(#3+0.5)*\l__atableau_tab_col_dy_fp)*\l__atableau_box_ht_fp }
+ \__atableau_update_extrema:n #1
+}
+
+% usage: \__atableau_set_box_coordinates_conjugate:nnn <letter> <row> <col>: given the row and columns
+% indices, row and col, define the corresponding coordinates in the conjugate tableau
+% - \l__atableau_xl_fp : x-coordinates
+% - \l__atableau_yl_fp : y-coordinate
+% - \l__atableau_name_tl : the node name
+% Used by the tableau and diagram commands
+\cs_new_protected:Npn \__atableau_set_box_coordinates_conjugate:nnn #1 #2 #3
+{
+ \tl_set:Nx \l__atableau_name_tl {\l__atableau_prefix_tl-\int_eval:n{1+#3}-\int_eval:n {1+#2}}
+ \fp_set:cn {l__atableau_x#1_fp} {\l__atableau_x_fp+((#3+0.5)*\l__atableau_tab_row_dx_fp+(#2+0.5)*\l__atableau_tab_col_dx_fp)*\l__atableau_box_wd_fp }
+ \fp_set:cn {l__atableau_y#1_fp} {\l__atableau_y_fp+((#3+0.5)*\l__atableau_tab_row_dy_fp+(#2+0.5)*\l__atableau_tab_col_dy_fp)*\l__atableau_box_ht_fp }
+ \__atableau_update_extrema:n #1
+}
+
+% by default , normal coordinates are used
+\cs_set_eq:NN \__atableau_set_box_coordinates:nnn \__atableau_set_box_coordinates_normal:nnn
+
+
+% usage: \__atableau_set_bead_coordinates:nnn <letter> <row> <col>: given the row and columns
+% indices, row and col, define the corresponding coordinates in a tableau or abacus:
+% - \l__atableau_xl_fp : x-coordinates
+% - \l__atableau_yl_fp : y-coordinate
+% - \l__atableau_name_tl : the node name
+% Used by both the tableaux and abacus commands
+\cs_new_protected:Npn \__atableau_set_bead_coordinates:nnn #1 #2 #3
+{
+ \tl_set:Nx \l__atableau_name_tl {\l__atableau_prefix_tl-\fp_to_int:n{#2-1}-\fp_to_int:n{#3}}
+ \fp_set:cn {l__atableau_x#1_fp} {\l__atableau_x_fp+(#2*\l__atableau_ab_row_dx_fp+#3*\l__atableau_ab_col_dx_fp)*\l__atableau_abacus_wd_fp }
+ \fp_set:cn {l__atableau_y#1_fp} {\l__atableau_y_fp+(#2*\l__atableau_ab_row_dy_fp+#3*\l__atableau_ab_col_dy_fp)*\l__atableau_abacus_ht_fp }
+}
+
+% ---------------------------------------------------------------------------
+% tableaux boxes/nodes
+
+\cs_new_protected:Npn \__atableau_valign_bottom:n #1 { \vbox_to_zero:n { #1 \vss } }
+\cs_new_protected:Npn \__atableau_valign_centre:n #1 { \vbox_to_zero:n { \vss #1 \vss } }
+\cs_new_protected:Npn \__atableau_valign_top:n #1 { \vbox_to_zero:n { \vss #1 } }
+\cs_set_eq:NN \__atableau_valign_center:n \__atableau_valign_centre:n
+
+% We use \vbox_to_zero:n and \hbox_overlap_center:n to ensure that an entry
+% does not change the height or width of the node when it is too large.
+\cs_new_protected:Npn \__atableau_entry_math:n #1
+{
+ \__atableau_valign:n
+ {
+ \__atableau_halign:n
+ {
+ \tl_if_blank:VF \tikz@textcolor {\color{\tikz@textcolor}}
+ \tikz@textfont $~#1 $
+ }
+ }
+}
+
+% and a text version
+\cs_new_protected:Npn \__atableau_entry_text:n #1
+{
+ \__atableau_valign:n
+ {
+ \__atableau_halign:n
+ {
+ \tl_if_blank:VF \tikz@textcolor {\color{\tikz@textcolor}}
+ \tikz@textfont #1
+ }
+ }
+}
+
+% By default tableau nodes are typeset in math-mode.
+\cs_set_eq:NN \__atableau_entry:n \__atableau_entry_math:n
+
+% usage: \__atableau_draw_entry:nn [style] {entry}
+% Used by draw_tableau to draw the node entry #2 in the tableau using the style #1
+\cs_new_protected:Npn \__atableau_draw_entry:nn [#1] #2
+{
+ % exit when we reach the end of the row
+ \quark_if_recursion_tail_stop_do:nn {#2}
+ {
+ % record the column index in the shape for drawing the border
+ \seq_put_right:NV \l__atableau_shape_seq \l__atableau_col_int
+ }
+
+ % compute the node name and its (x,y)-coordinates
+ \__atableau_set_box_coordinates:nVV {l} \l__atableau_row_int \l__atableau_col_int
+
+ \tl_if_empty:nTF {#1}
+ { % draw box if it has the default styling
+ \node[aTableau/boxStyle] (\l__atableau_name_tl)
+ at (\fp_use:N\l__atableau_xl_fp, \fp_use:N\l__atableau_yl_fp)
+ {\__atableau_entry:n{#2}};
+ }
+ { % save the node to \l__atableau_styled_nodes_tl if it is styled
+ \tl_put_right:Nx \l__atableau_styled_nodes_tl
+ {
+ \exp_not:N \node [aTableau/boxStyle,#1] (\l__atableau_name_tl)
+ at (\fp_use:N\l__atableau_xl_fp, \fp_use:N\l__atableau_yl_fp)
+ {\exp_not:N\__atableau_entry:n{#2}};
+ }
+ }
+
+ % look for the next entry, or finish
+ \int_incr:N \l__atableau_col_int
+ \__atableau_peek_tableau:w
+}
+
+% ---------------------------------------------------------------------------
+% diagrams
+
+% usage: \__atableau_draw_diagram:n {partition}
+\cs_new_protected:Npn \__atableau_draw_diagram:n #1
+{
+ % convert #1 to the partition \l__atableau_shape_seq
+ \__atableau_set_partition:nn {shape} {#1}
+
+ % set the skew shape for shifted tableaux
+ \bool_if:NT \l__atableau_shifted_bool
+ {
+ \seq_clear:N \l__atableau_skew_seq
+ \seq_map_inline:Nn \l__atableau_shape_seq
+ {
+ \seq_put_right:No \l__atableau_skew_seq {\int_use:N \l__atableau_row_int}
+ \int_incr:N \l__atableau_row_int
+ }
+ \int_zero:N \l__atableau_row_int
+ }
+
+ % depending on \l__atableau_show_tl, generate the tableau entries
+ \str_case:VnF \l__atableau_show_tl
+ {
+ {contents} { \__atableau_shape_to_content:N \l__atableau_shape_seq }
+ {last} { \__atableau_shape_to_last:N \l__atableau_shape_seq }
+ {hooks} { \__atableau_shape_to_hook:N \l__atableau_shape_seq }
+ {first} { \__atableau_shape_to_first:N \l__atableau_shape_seq }
+ {residues} { \__atableau_shape_to_residue:N \l__atableau_shape_seq }
+ {} { \__atableau_diagram_for_shape:N \l__atableau_shape_seq }
+ }
+ {
+ \msg_error:nnx {aTableau} {unrecognised-entries} {\l__atableau_show_tl}
+ }
+ \__atableau_draw_tableau:V \l__atableau_entries_tl
+}
+
+
+% ---------------------------------------------------------------------------
+% multitableau and their diagrams
+
+% usage: \__atableau_draw_multishape:n diagram|tableau
+% Draw a multitableau or multidiagram. Most of the work is in calculating the
+% x-coordinates of the origins and each diagram, their separators and the
+% maximal y-coordinates, for drawing the delimiters. We also need to set
+% various keys for the components, so that they work correctly.
+\cs_new_protected:Npn \__atableau_draw_multishape:n #1
+{
+ % save the prefix name so that we can modify it
+ \tl_set_eq:NN \l__atableau_multiprefix_tl \l__atableau_prefix_tl
+
+ % check for conjugation
+ \bool_if:NT \l__atableau_conjugate_bool { \seq_reverse:N \l__atableau_component_seq }
+
+ % reset the variables that we need
+ \int_zero:N \l__atableau_component_int % component index
+
+ % We will increment x_fp to give the origins of the component diagrams.
+ % For now we record the position of the x-coordinates of the left brace,
+ % which will be placed after the diagrams have been drawn we first have to
+ % determine their height.
+ \seq_clear:N \l__atableau_xsep_seq
+ \seq_put_right:Nx \l__atableau_xsep_seq {\fp_to_decimal:N\l__atableau_x_fp}
+
+ % keep track of min/max y-coordinates used and max x-coordinate
+ \fp_set_eq:NN \l__atableau_xmax_fp \l__atableau_x_fp
+ \fp_set:Nn \l__atableau_ymax_fp {\l__atableau_y_fp + \l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp/2} % middle of box
+ \fp_set_eq:NN \l__atableau_ymin_fp \l__atableau_ymax_fp
+
+ \seq_map_inline:Nn \l__atableau_component_seq
+ {
+ % increment component and set prefix, charge, skew, ribbons and snobs
+ \int_incr:N \l__atableau_component_int
+
+ % update ymin, ymax and xmax (re-enable each time as this is disabled when placing ribbons)
+ \fp_compare:nNnTF {\l__atableau_rows_fp} = {0}
+ { \cs_set_eq:NN \__atableau_update_extrema:n \__atableau_update_multi_extrema:n } % update xmax, ymin, ymax
+ { \cs_set_eq:NN \__atableau_update_extrema:n \__atableau_update_multi_xtrema:n } % update only xmax
+
+ % change the node prefix to include the component index
+ \tl_set:No \l__atableau_prefix_tl {\l__atableau_multiprefix_tl-\int_use:N\l__atableau_component_int}
+
+ % charge defaults to zero if not set
+ \int_set:Nn \l__atableau_charge_int {0\seq_item:NV \l__atableau_charge_seq \l__atableau_component_int}
+
+ % set the multi-component keys from the corresponding multi sequence
+ \clist_map_inline:nn {dotted_rows, dotted_cols, paths, ribbons, snobs}
+ {
+ % if multi####1 is empty then clear the ####1 sequence, otherwise set it equal to component value
+ \seq_if_empty:cTF {l__atableau_multi####1_seq}
+ { \seq_clear:c {l__atableau_####1_seq} }
+ {
+ \tl_set:Nx \l_tmpb_tl {\seq_item:cV {l__atableau_multi####1_seq} \l__atableau_component_int}
+ \seq_set_from_clist:co {l__atableau_####1_seq} {\l_tmpb_tl}
+ }
+ }
+
+ % labels are handled separately because they are not sequences
+ \seq_if_empty:NTF \l__atableau_multilabel_seq
+ { \seq_clear:N \l__atableau_label_seq }
+ {
+ \tl_set:Nx \l_tmpb_tl {\seq_item:NV \l__atableau_multilabel_seq \l__atableau_component_int}
+ \tl_set:No \l__atableau_label_tl {\l_tmpb_tl}
+ }
+
+ % skew is handled separately because it uses set_partition
+ \seq_if_empty:NTF \l__atableau_multiskew_seq
+ { \seq_clear:N \l__atableau_skew_seq }
+ {
+ \tl_set:Nx \l_tmpb_tl {\seq_item:NV \l__atableau_multiskew_seq \l__atableau_component_int}
+ \__atableau_set_partition:no {skew} {\l_tmpb_tl}
+ }
+
+ % determine the coordinates for the diagram/tableau
+ % - \l__atableau_c_int: number of columns in first row
+ % - \l__atableau_r_int: number of rows in components
+ \bool_if:nTF { \str_if_empty_p:n {##1} || \str_if_eq_p:nn {##1} {...} }
+ {
+ \int_set:Nn \l__atableau_c_int {1}
+ \int_set:Nn \l__atableau_r_int {1}
+ }
+ {
+ % the component is nonempty
+ \tl_if_eq:nnTF {#1} {diagram}
+ {
+ \__atableau_set_partition:nn {shape} {##1}
+ \int_set:No \l__atableau_c_int {\seq_item:Nn \l__atableau_shape_seq {1}+0\seq_item:Nn \l__atableau_skew_seq {1}}
+
+ % set r_int equal to the number of nonzero rows in shape_seq
+ \int_set:No \l__atableau_r_int { \seq_count:N \l__atableau_shape_seq }
+ }
+ { % coordinates for tableaux
+ \seq_set_from_clist:Nn \l_tmpa_seq {##1}
+ \int_set:No \l__atableau_c_int {0\seq_item:Nn \l__atableau_skew_seq {1}} % initialise to skew length
+ \tl_set:Nx \l_tmpc_tl {\seq_item:Nn \l_tmpa_seq {1}} % first row of tableau
+ \__atableau_count_row:x \l_tmpc_tl % length of first row + skew
+
+ % set r_int equal to the number of nonzero rows in shape_seq
+ \int_set:No \l__atableau_r_int { \seq_count:N \l_tmpa_seq }
+ }
+ }
+
+ % now that we have the coordinates we need, we compute the
+ % x-coordinates of the diagram origin and the separators
+
+ % need to switch for conjugate partitions
+ \bool_if:NTF \l__atableau_conjugate_bool
+ { % conjugating
+ % the origin is c * col_dx units from the separator + xoffset
+ \fp_add:Nn \l__atableau_x_fp
+ {
+ abs(\l__atableau_c_int*\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp) % number of columns
+ + 0\seq_item:NV \l__atableau_xoffsets_seq \l__atableau_component_int % x-offset
+ }
+ % the next separator is is r * row_dx units from the origin
+ \fp_set:Nn \l__atableau_xsep_fp {
+ abs(\l__atableau_r_int*\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp)
+ + \l__atableau_separation_fp
+ }
+
+ % compute maximum height of the diagram
+ \fp_set:Nn \l__atableau_yb_fp
+ {
+ \l__atableau_c_int*\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp
+ + \l__atableau_r_int*abs(\l__atableau_tab_col_dy_fp)*\l__atableau_box_ht_fp
+ + 0\seq_item:NV \l__atableau_yoffsets_seq \l__atableau_component_int
+ }
+ }
+ { % not conjugating
+ % the origin is r * row_dx units from the separator + xoffset
+ \fp_add:Nn \l__atableau_x_fp
+ {
+ abs(\l__atableau_r_int*\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp) % number of columns
+ + 0\seq_item:NV \l__atableau_xoffsets_seq \l__atableau_component_int % x-offset
+ }
+ % the next separator is is c * col_dx units from the origin
+ \fp_set:Nn \l__atableau_xsep_fp
+ {
+ abs(\l__atableau_c_int*\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp) % number of columns
+ + \l__atableau_separation_fp
+ }
+ % compute maximum height of the diagram
+ \fp_set:Nn \l__atableau_yb_fp
+ {
+ \l__atableau_r_int*\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp
+ + \l__atableau_c_int*\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp
+ + 0\seq_item:NV \l__atableau_yoffsets_seq \l__atableau_component_int
+ }
+ }
+
+ % Having determined the positions of the diagram origins and separators, we are ready to draw the diagram
+ % First set the y-coordinate for the origin of the current component
+ \fp_add:Nn \l__atableau_y_fp {0\seq_item:NV \l__atableau_yoffsets_seq \l__atableau_component_int}
+
+ % special processing for empty diagrams and ...
+ \str_case:nnF {##1}
+ {
+ {}
+ {
+ % an empty diagram -> \l__atableau_empty_tl
+ \__atableau_set_box_coordinates:nnn {a} {0} {0}
+ \node[aTableau/separatorSymbol] at (\fp_use:N \l__atableau_xa_fp, \fp_use:N \l__atableau_ya_fp){\l__atableau_empty_tl};
+ }
+ {...}
+ {
+ % insert dots. ?? Replace \cdots with \l__atableau_dots_tl ??
+ \__atableau_set_box_coordinates:nnn {a} {0} {0}
+ \node[aTableau/separatorSymbol] at (\fp_use:N \l__atableau_xa_fp, \fp_use:N \l__atableau_ya_fp){$\cdots$};
+ }
+ }
+ {
+ % draw the diagram/tableau
+ \use:c {__atableau_draw_#1:n} {##1}
+ }
+
+ % increment the origin by the separation distance and record the
+ % x-coordinate of the separator
+ \fp_set:Nn \l__atableau_x_fp { \l__atableau_xmax_fp+\l__atableau_box_wd_fp/2+\l__atableau_separation_fp }
+ \seq_put_right:Nx \l__atableau_xsep_seq {\fp_to_decimal:N\l__atableau_x_fp}
+
+ % add the separation distance to x_fp for the next component
+ \fp_add:NV \l__atableau_x_fp \l__atableau_separation_fp % separation
+
+ } % end of seq_map_inline to draw component diagrams/tableau
+
+ % All of the component diagrams/tableaux have been drawn
+ % It remains to add the separators. First we adjust ymin and ymax
+ \bool_if:NT \l__atableau_separators_bool
+ {
+
+ % when rows_fp is nonzero it sets the maximum y-coordinate, otherwise we
+ % need to adjust ymin and ymax by half the box height
+ \fp_compare:nNnTF {\l__atableau_rows_fp} > {0}
+ {
+ \fp_compare:nNnTF {\l__atableau_tab_row_dy_fp} > {0}
+ {
+ \fp_add:Nn \l__atableau_ymax_fp { (\l__atableau_rows_fp-0.5)*\l__atableau_box_ht_fp }
+ \fp_add:Nn \l__atableau_ymin_fp { -0.5*\l__atableau_box_ht_fp }
+ }
+ {
+ \fp_add:Nn \l__atableau_ymin_fp { (0.5-\l__atableau_rows_fp)*\l__atableau_box_ht_fp }
+ \fp_add:Nn \l__atableau_ymax_fp { 0.5*\l__atableau_box_ht_fp }
+ }
+ }
+ {
+ % adjust ymin and ymax count as they count from the centre of the box
+ \fp_add:Nn \l__atableau_ymax_fp { \l__atableau_box_ht_fp/2}
+ \fp_add:Nn \l__atableau_ymin_fp {-\l__atableau_box_ht_fp/2}
+ }
+
+ \fp_set:Nn \l__atableau_y_fp {(\l__atableau_ymin_fp+\l__atableau_ymax_fp)/2} % midway between ymin and ymax
+ \fp_set:Nn \l__atableau_ymax_fp { \l__atableau_ymax_fp-\l__atableau_ymin_fp } % maximum height
+
+ % add left delimiter: need to use \path to set the colour
+ \seq_pop_left:NN \l__atableau_xsep_seq \l_tmpa_tl
+ \tl_if_blank:VF \l__atableau_left_delimiter_tl
+ {
+ \path[aTableau/delimiterPath] (\fp_eval:n{\l_tmpa_tl-\l__atableau_separation_fp/2}, \fp_use:N \l__atableau_y_fp)
+ node[aTableau/leftDelimiter] {};
+ }
+
+ % add right delimiter
+ \seq_pop_right:NN \l__atableau_xsep_seq \l_tmpa_tl
+ \tl_if_blank:VF \l__atableau_right_delimiter_tl
+ {
+ \path[aTableau/delimiterPath] (\fp_eval:n{\l_tmpa_tl-\l__atableau_separation_fp/2}, \fp_use:N \l__atableau_y_fp)
+ node[aTableau/rightDelimiter] {};
+ }
+
+ % the internal separators
+ \tl_set:Ne \l_tmpa_tl {\fp_to_decimal:N \l__atableau_ymin_fp } % ymin
+ \tl_set:Ne \l_tmpb_tl {\fp_to_decimal:n {\l__atableau_y_fp + \l__atableau_ymax_fp/2}} % ymax
+ \seq_map_inline:Nn \l__atableau_xsep_seq
+ {
+ % add the separator
+ \str_case:VnF \l__atableau_separator_tl
+ {
+ {|} { \draw[aTableau/separatorLine](##1,\l_tmpa_tl)--(##1,\l_tmpb_tl); }
+ }
+ { % any other separator is assumed to be text
+ \node[aTableau/separatorSymbol] at (##1,\fp_use:N \l__atableau_y_fp){\l__atableau_separator_tl};
+ }
+ }
+ }
+}
+
+
+% usage: \__atableau_multidiagram:n {entries}
+% The entries are first primarily because the \Diagram commands needs
+% to force the entries to expand
+\cs_new_protected:Npn \__atableau_multidiagram:n #1
+{
+ % separate the component partitions
+ \seq_set_split:Nnn \l__atableau_component_seq {|} {#1}
+
+ % when entries=last, we need to set the charge
+ \tl_if_eq:NnT \l__atableau_show_tl {last}
+ {
+ \seq_clear:N \l__atableau_charge_seq
+ \int_zero:N \l__atableau_c_int % cumulative total of component sizes
+ \seq_set_eq:NN \l_tmpc_seq \l__atableau_component_seq
+ \seq_reverse:N \l_tmpc_seq
+ \seq_map_inline:Nn \l_tmpc_seq
+ {
+ \seq_put_left:No \l__atableau_charge_seq {\int_use:N \l__atableau_c_int}
+ \__atableau_set_partition:nn {shape} {##1}
+ \seq_map_inline:Nn \l__atableau_shape_seq { \int_add:Nn \l__atableau_c_int {####1} }
+ }
+ }
+
+ % determine the coordinates of the components of the diagram
+ \__atableau_draw_multishape:n {diagram}
+}
+
+% usage: \__atableau_multitableau:n {entries}
+% The entries are first primarily because the \Diagram commands need
+% to force the entries to expand
+\cs_new_protected:Npn \__atableau_multitableau:n #1
+{
+ % separate the entries of the component tableaux
+ \seq_set_split:Nnn \l__atableau_component_seq {|} {#1}
+
+ % determine the coordinates of the components of the tableau
+ \__atableau_draw_multishape:n {tableau}
+}
+
+% ---------------------------------------------------------------------------
+% Ribbon tableaux
+
+% usage: \__atableau_ribbon_tableau:n {ribbons}
+% Draw a ribbon tableau. The ribbons are specified by
+% (ribbon style) ij sequences of r's and c's with optional style and
+% with text as a subscript. Here i and j are the row and column
+% indices of the head of the ribbon
+\cs_new_protected:Npn \__atableau_ribbon_tableau:n #1
+{
+ % set the star style
+ \tl_set:Nn \l__atableau_starstyle_tl {aTableau/tableauStarStyle}
+
+ % record the shape as we draw the border
+ \seq_clear:N \l__atableau_shape_seq
+ \cs_set_eq:NN \__atableau_update_shape: \__atableau_update_ribbon_tableau_shape:
+
+ % draw the ribbon tableau by drawing each of the ribbons
+ \tl_set:Nn \l__atableau_ribbon_type_tl {ribbon} % change ribbon type to ribbon
+ \clist_map_inline:nn {#1} { \__atableau_add_ribbon:n {##1} }
+
+ % draw the tableau border, adding associated bells and whistles
+ \__atableau_finalise_tableau:
+}
+
+% usage: \__atableau_add_ribbon:n {ribbon} add a ribbon to the tableau
+% The code for adding ribbons is slightly different dependning onf on whether
+% \l__atableau_ribbbon_ty[e is equal to 'ribbon' or 'path'
+\cs_new_protected:Npn \__atableau_add_ribbon:n #1
+{
+ % reset the sequences that store the ribbon specifications data
+ \seq_clear:N \l__atableau_texts_seq % will contain node text
+ \seq_clear:N \l__atableau_styles_seq % will contain node styles
+ \seq_clear:N \l__atableau_rcs_seq % will contain node (row,col)-indices
+ \__atableau_peek_ribbon_style:w #1 \q_recursion_tail \q_recursion_stop
+}
+
+% usage: \__atableau_peek_ribbon_style:w {ribbon specifications}
+% look for (ribbon) style inside parentheses: (style)
+\cs_new_protected:Npn \__atableau_peek_ribbon_style:w
+{
+ \peek_remove_spaces:n { % ignore spaces
+ \peek_charcode:NTF (
+ { \__atableau_save_ribbon_style:n }
+ { \__atableau_save_ribbon_style:n ()}
+ }
+}
+
+% usage: \__atableau_save_ribbon_style:n {style}
+% read the style (style) and save in \l__atableau_ribbon_style_tl
+% and then peek for [style]rc...
+\cs_new_protected:Npn \__atableau_save_ribbon_style:n (#1)
+{
+ \tl_set:Nn \l__atableau_ribbon_style_tl {#1}
+ \__atableau_peek_style:nw {save_ribbon_head:nnn}
+}
+
+
+% usage: \__atableau_initialise_path_head:
+% Start \l__atableau_ribbon_path_tl for a path
+\cs_new_protected:Nn \__atableau_initialise_path_head:
+{ % adding a ribbon path
+ \tl_set:Nx \l__atableau_ribbon_path_tl
+ {
+ (\fp_use:N\l__atableau_xl_fp,\fp_use:N\l__atableau_yl_fp)
+ node[aTableau/pathBox,\l__atableau_ribbon_style_tl]{\__atableau_entry:n{\l__atableau_path_box_tl}}
+ }
+}
+
+% usage: \__atableau_initialise_ribbon_head:
+% Start \l__atableau_ribbon_path_tl for a ribbon
+\cs_new_protected:Nn \__atableau_initialise_ribbon_head:
+{
+ % 1. Make (xl,yl) the top corner of the ribbon and add it
+ \fp_add:Nn \l__atableau_xl_fp { 0.5*(\l__atableau_tab_col_dx_fp-\l__atableau_tab_row_dx_fp)*\l__atableau_box_wd_fp }
+ \fp_add:Nn \l__atableau_yl_fp { 0.5*(\l__atableau_tab_col_dy_fp-\l__atableau_tab_row_dy_fp)*\l__atableau_box_ht_fp }
+ \tl_set:Nx \l__atableau_ribbon_path_tl { (\fp_use:N\l__atableau_xl_fp,\fp_use:N\l__atableau_yl_fp) }
+
+ % 2. Make (xa,ya) the top left of the ribbon and add it on the left (decreasing column)
+ \fp_set:Nn \l__atableau_xa_fp {\l__atableau_xl_fp-\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_set:Nn \l__atableau_ya_fp {\l__atableau_yl_fp-\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_left:Nx \l__atableau_ribbon_path_tl { (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)-- }
+
+ % 3. Make (xb,yb) the bottom right corner and add it on the right (increasing row)
+ \fp_set:Nn \l__atableau_xb_fp {\l__atableau_xl_fp+\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_set:Nn \l__atableau_yb_fp {\l__atableau_yl_fp+\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_right:Nx \l__atableau_ribbon_path_tl { --(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp) }
+}
+
+% usage: \__atableau_save_ribbon_head:nnnn {path/ribbon} [style] {row index} {col index}
+% save the style, row and column indices for the head of the ribbon
+% and then compute the coordinates of the three "external nodes" in the
+% head.
+\cs_new_protected:Npn \__atableau_save_ribbon_head:nnn [#1] #2 #3
+{
+ % check for syntax errors to prevent an endless loop
+ \quark_if_recursion_tail_stop_do:nn {#2} { \msg_error:nnn {aTableau} {invalid-ribbon-head} {no~x-coordinate~given} }
+ \quark_if_recursion_tail_stop_do:nn {#3} { \msg_error:nnn {aTableau} {invalid-ribbon-head} {no~y-coordinate~given} }
+
+ % save any style
+ \seq_put_right:Nx \l__atableau_styles_seq {#1}
+
+ % record the row and column indices of the head
+ \int_set:No \l__atableau_row_int { \int_eval:n {#2-1} }
+ \int_set:No \l__atableau_col_int { \int_eval:n {#3-1} }
+ \seq_put_right:NV \l__atableau_rcs_seq \l__atableau_row_int
+ \seq_put_right:NV \l__atableau_rcs_seq \l__atableau_col_int
+
+ % update the shape to include the head node (#3,#4)
+ \__atableau_update_shape:
+
+ % add initial coordinates to \l__atableau_ribbon_path_tl
+ \__atableau_set_box_coordinates:nVV {l} \l__atableau_row_int \l__atableau_col_int
+
+ % initialise the start of the path/ribbon
+ \use:c {__atableau_initialise_ \l__atableau_ribbon_type_tl _head:}
+
+ %\message{row=\int_use:N\l__atableau_row_int,~col=\int_use:N\l__atableau_col_int}
+ \__atableau_peek_ribbon_text:w
+}
+
+% usage: \__atableau_peek_ribbon_text:nw {path/ribbon}
+% peek for subscripted text _{text} in the ribbon
+\cs_new_protected:Npn \__atableau_peek_ribbon_text:w
+{
+ \peek_remove_spaces:n { % ignore spaces
+ \peek_charcode_remove:NTF _
+ { \__atableau_save_ribbon_text:n }
+ {
+ \seq_put_right:Nn \l__atableau_texts_seq {} % empty text
+ \__atableau_peek_style:nw {save_ribbon:nn}
+ }
+ }
+}
+
+% usage: \__atableau_save_ribbon_text:n {text}
+% save any text for a rode in the ribbon in \l__atableau_texts_seq
+\cs_new_protected:Npn \__atableau_save_ribbon_text:n #1
+{
+ \seq_put_right:No \l__atableau_texts_seq {#1}
+ \__atableau_peek_style:nw {save_ribbon:nn}
+}
+
+% usage: \__atableau_add_to_ribbon:n
+% Extend a ribbon path. Here #1 is either r or c
+\cs_new_protected:Npn \__atableau_extend_ribbon:n #1
+{
+ \str_case:enF {#1}
+ {
+ {c} { % move back one column
+ \int_decr:N \l__atableau_col_int
+
+ % Move (xa,ya) back one column add it to the ribbon on the left
+ \fp_sub:Nn \l__atableau_xa_fp {\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_sub:Nn \l__atableau_ya_fp {\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_left:Nx \l__atableau_ribbon_path_tl { (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)-- }
+
+ % Move (xb,xb) back one column add it to the ribbon on the right
+ \fp_sub:Nn \l__atableau_xb_fp {\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_sub:Nn \l__atableau_yb_fp {\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_right:Nx \l__atableau_ribbon_path_tl { --(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp) }
+ }
+ {r} { % move forward one row
+ \int_incr:N \l__atableau_row_int
+
+ % Move (xa,ya) forward one row add it to the ribbon on the left
+ \fp_add:Nn \l__atableau_xa_fp {\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_ya_fp {\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_left:Nx \l__atableau_ribbon_path_tl { (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)-- }
+
+ % Move (xb,xb) forward one row add it to the ribbon on the right
+ \fp_add:Nn \l__atableau_xb_fp {\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_yb_fp {\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_right:Nx \l__atableau_ribbon_path_tl { --(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp) }
+ }
+ }
+ {
+ \msg_error:nnx {aTableau} {invalid-ribbon-specification} {#1}
+ }
+
+}
+
+% usage: \__atableau_add_to_path:n
+% Extend a ribbon path. Here #1 is either r or c
+\cs_new_protected:Npn \__atableau_extend_path:n #1
+{
+
+ % the ribbon hasn't finished, so move row and col according to the ribbon
+ % specification and update the nodes (xa,ya) and (xb,yb) in the ribbon
+ \str_case:enF {#1}
+ {
+ {c} { % move back one column
+ \int_decr:N \l__atableau_col_int
+
+ \fp_sub:Nn \l__atableau_xl_fp {\l__atableau_tab_col_dx_fp*\l__atableau_box_wd_fp}
+ \fp_sub:Nn \l__atableau_yl_fp {\l__atableau_tab_col_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_right:Nx \l__atableau_ribbon_path_tl
+ {
+ --(\fp_use:N\l__atableau_xl_fp,\fp_use:N\l__atableau_yl_fp)
+ node[aTableau/pathBox,\l__atableau_ribbon_style_tl]{\__atableau_entry:n{\l__atableau_path_box_tl}}
+ }
+ }
+ {r} { % move forward one row
+ \int_incr:N \l__atableau_row_int
+
+ \fp_add:Nn \l__atableau_xl_fp {\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_yl_fp {\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_right:Nx \l__atableau_ribbon_path_tl
+ {
+ --(\fp_use:N\l__atableau_xl_fp,\fp_use:N\l__atableau_yl_fp)
+ node[aTableau/pathBox,\l__atableau_ribbon_style_tl]{\__atableau_entry:n{\l__atableau_path_box_tl}}
+ }
+ }
+ }
+ {
+ \msg_error:nnx {aTableau} {invalid-ribbon-specification} {#1}
+ }
+}
+
+% For each successive r and c in the ribbon specification, determine the
+% surrpouding coordinates in the ribbon and save any custom styles in
+% \l__atableau_styles_seq and then repeat
+\cs_new_protected:Npn \__atableau_save_ribbon:nn [#1] #2
+{
+ % draw the ribbon when we run out of nodes
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__atableau_draw_ribbon: }
+
+ % Add the new coordinate(s) to \l__atableau_ribbon_path_tl. This is
+ % different for ribbons and paths
+ \use:c {__atableau_extend_ \l__atableau_ribbon_type_tl :n} {#2}
+
+ % update the shape to include the new node
+ \__atableau_update_shape:
+
+ % save the style and row and column indices
+ \seq_put_right:No \l__atableau_styles_seq {#1} % record the style of the head
+ \seq_put_right:NV \l__atableau_rcs_seq \l__atableau_row_int % record the row of the node
+ \seq_put_right:NV \l__atableau_rcs_seq \l__atableau_col_int % record the column of the node
+
+ % check to see if this node has any text
+ \__atableau_peek_ribbon_text:w
+}
+
+
+% update the shape of the ribbon tableau using the current values of
+% \l__atableau_row_int and \l__atableau_col_int
+\cs_new_protected:Nn \__atableau_update_ribbon_tableau_shape:
+{
+ % ensure that \l__atableau_shape_seq has at least a 0 in each row
+ \int_step_inline:nn { \l__atableau_row_int+1 - \seq_count:N \l__atableau_shape_seq }
+ {
+ \seq_put_right:Nn \l__atableau_shape_seq {0}
+ }
+ % for shifted tableaux we also need to ensure that skew is big enough
+ \bool_if:NT \l__atableau_shifted_bool
+ {
+ \int_set:Nn \l_tmpa_int {\seq_count:N \l__atableau_skew_seq}
+ \int_step_inline:nn { \l__atableau_row_int+1 - \l_tmpa_int }
+ {
+ \seq_put_right:Nx \l__atableau_skew_seq {\int_eval:n{\l_tmpa_int+##1-1 }}
+ }
+ }
+ \int_compare:nNnT {0\seq_item:Nn \l__atableau_shape_seq {\l__atableau_row_int+1}} < {\l__atableau_col_int+1}
+ {
+ \seq_set_item:Nox \l__atableau_shape_seq {\l__atableau_row_int+1} { \int_eval:n{\l__atableau_col_int+1} }
+ }
+}
+
+% usage: \__atableau_finalise_ribbon:n
+% Add the final node to the ribbon
+\cs_new_protected:Nn \__atableau_finalise_ribbon:
+{
+ % Add the last node to the ribbon
+ \fp_add:Nn \l__atableau_xa_fp {\l__atableau_tab_row_dx_fp*\l__atableau_box_wd_fp}
+ \fp_add:Nn \l__atableau_ya_fp {\l__atableau_tab_row_dy_fp*\l__atableau_box_ht_fp}
+ \tl_put_left:Nx \l__atableau_ribbon_path_tl { (\fp_use:N\l__atableau_xa_fp, \fp_use:N\l__atableau_ya_fp)-- }
+
+ % add a closing cycle
+ \tl_put_right:Nn \l__atableau_ribbon_path_tl {--cycle}
+}
+
+
+% usage: \__atableau_finalise_path:n
+% We do not need to do anything to finalise a path
+\cs_set_eq:NN \__atableau_finalise_path:n \prg_do_nothing:
+
+% by default, snobs have the same styles and coordinates as ribbons
+\cs_set_eq:NN \__atableau_extend_snob:n \__atableau_extend_ribbon:n
+\cs_set_eq:NN \__atableau_finalise_snob: \__atableau_finalise_ribbon:
+\cs_set_eq:NN \__atableau_initialise_snob_head: \__atableau_initialise_ribbon_head:
+
+% \__atableau_draw_ribbon: use the various sequences we have constructed
+% to draw the ribbon. We first place the nodes with default styling and
+% no text, then draw the ribbon with its supplied style and then,
+% finally, add the nodes with custom styling or text.
+\cs_new_protected:Nn \__atableau_draw_ribbon:
+{
+
+ \use:c { __atableau_finalise_ \l__atableau_ribbon_type_tl :}
+
+ % We want to first draw the ribbon, with its outline and any filling, and
+ % then place the node with the default styling (or unstyled), and styled
+ % nodes in the ribbon. To do this we build the two token lists
+ % \l__atableau_unstyled_nodes_tl and \l__atableau_styled_nodes_tl for these
+ % two types of nodes
+ \tl_clear:N \l__atableau_styled_nodes_tl
+ \tl_clear:N \l__atableau_unstyled_nodes_tl
+
+ % We need to add ribbon_node to every box in a ribbon, so we do the
+ % check here rather than in \seq_map_inline:Nn
+ \tl_if_eq:VnTF \l__atableau_ribbon_type_tl {path}
+ { \tl_clear:N \l_tmpc_tl }
+ { \tl_set_eq:Nc \l_tmpc_tl { l__atableau_ \l__atableau_ribbon_type_tl _box_tl } }
+
+ \seq_map_inline:Nn \l__atableau_styles_seq
+ {
+ % pop the text and row and column indices
+ \seq_pop_left:NN \l__atableau_texts_seq \l_tmpa_tl % text
+ \seq_pop_left:NN \l__atableau_rcs_seq \l_tmpb_tl % row index
+ \int_set:Nn \l__atableau_row_int {\l_tmpb_tl}
+ \seq_pop_left:NN \l__atableau_rcs_seq \l_tmpb_tl % column index
+ \int_set:Nn \l__atableau_col_int {\l_tmpb_tl}
+
+ % compute the box coordinates
+ \__atableau_set_box_coordinates:nVV {l} \l__atableau_row_int \l__atableau_col_int
+ \tl_if_empty:eTF {##1\l_tmpa_tl}
+ { % nodes with default style and no text are added to \l__atableau_unstyled_nodes_tl
+ \tl_put_right:Nx \l__atableau_unstyled_nodes_tl
+ {
+ \exp_not:N \node [aTableau/\l__atableau_ribbon_type_tl Box](\l__atableau_name_tl)
+ at (\fp_use:N\l__atableau_xl_fp,\fp_use:N\l__atableau_yl_fp)
+ { \exp_not:N \__atableau_entry:n{\l_tmpc_tl }};
+ }
+ }
+ { % nodes with styling are added to \l__atableau_styled_nodes_tl
+ \tl_put_right:Nx \l__atableau_styled_nodes_tl
+ {
+ \exp_not:N \node [aTableau/\l__atableau_ribbon_type_tl Box,##1](\l__atableau_name_tl)
+ at (\fp_use:N\l__atableau_xl_fp,\fp_use:N\l__atableau_yl_fp)
+ {\exp_not:N \__atableau_entry:n{\l_tmpa_tl}};
+ }
+ }
+ }
+ % draw the ribbon, applying any style
+ \exp_last_unbraced:Ne\draw { [aTableau/\l__atableau_ribbon_type_tl Style,\l__atableau_ribbon_style_tl] } \l__atableau_ribbon_path_tl;
+
+ % finally, add the unstyled and the styled nodes on top of the ribbon
+ \l__atableau_unstyled_nodes_tl
+ \l__atableau_styled_nodes_tl
+}
+
+
+% ---------------------------------------------------------------------------
+
+% abacuses
+% usage: \__atableau_draw_abacus_end:nnn {abacus_top/abacus_bottom} % {0/row index} {±1}
+% Draw the top/bottom on gthe abacus. Here #1 is either
+% \l__atableau_abacus_top_tl or \l__atableau_abacus_bottom_tl and #2 is
+% either 0, for top, or the row index of the last row, for bottom
+\cs_new_protected:Npn \__atableau_draw_abacus_end:nnn #1 #2 #3
+{
+ \str_case:Vn #1
+ {
+ {-}
+ { % draw a line
+ \__atableau_set_bead_coordinates:non {a} {#2} {0}
+ \__atableau_set_bead_coordinates:noo {b} {#2} { \int_eval:n {\l__atableau_cols_int-1} }
+ \draw[aTableau/abacusEnds]
+ (\fp_eval:n{\l__atableau_xa_fp-\l__atableau_ab_col_dx_fp*\l__atableau_abacus_wd_fp/2},
+ \fp_eval:n{\l__atableau_ya_fp-\l__atableau_ab_col_dy_fp*\l__atableau_abacus_ht_fp/2})
+ -- (\fp_eval:n{\l__atableau_xb_fp+\l__atableau_ab_col_dx_fp*\l__atableau_abacus_wd_fp/2},
+ \fp_eval:n{\l__atableau_yb_fp+\l__atableau_ab_col_dy_fp*\l__atableau_abacus_ht_fp/2});
+
+ % set default "row height" of the runner labels for use below
+ \fp_set:Nn \l_tmpa_fp {-0.4}
+ }
+ {_}
+ { % draw a line
+ \__atableau_set_bead_coordinates:non {a} {#2} {0}
+ \__atableau_set_bead_coordinates:noo {b} {#2} { \int_eval:n {\l__atableau_cols_int-1} }
+ \draw[aTableau/abacusEnds] (\fp_use:N\l__atableau_xa_fp, \fp_use:N\l__atableau_ya_fp)
+ -- (\fp_use:N\l__atableau_xb_fp, \fp_use:N\l__atableau_yb_fp);
+
+ % set default "row height" of the runner labels for use below
+ \fp_set:Nn \l_tmpa_fp {-0.4}
+ }
+ {.}
+ { % draw dots
+ \int_step_inline:nn {\l__atableau_cols_int}
+ {
+ \seq_if_in:NeF \l__atableau_dotted_cols_seq { \int_eval:n{##1-1} }
+ {
+ % draw the abacus runners from (xa,ya) to (xb,yb)
+ \__atableau_set_bead_coordinates:noo {a} { #2 } { \int_eval:n{##1-1} }
+ \__atableau_set_bead_coordinates:noo {b} { #3 } { \int_eval:n{##1-1} }
+ \draw[aTableau/abacusEnds, dotted] (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ }
+ }
+
+ % set default "row height" of the runner labels for use below
+ \fp_set:Nn \l_tmpa_fp {-1.4}
+ }
+ {>}
+ { % draw dots
+ \int_step_inline:nn {\l__atableau_cols_int}
+ {
+ \seq_if_in:NeF \l__atableau_dotted_cols_seq { \int_eval:n{##1-1} }
+ {
+ % draw the abacus runners from (xa,ya) to (xb,yb)
+ \int_compare:nNnTF {#2} = {0}
+ {
+ \__atableau_set_bead_coordinates:noo {a} { \fp_eval:n{#2+0.5} } { \fp_eval:n{##1-1} }
+ \__atableau_set_bead_coordinates:noo {b} { \fp_eval:n{#3+0.5} } { \fp_eval:n{##1-1} }
+ }
+ {
+ \__atableau_set_bead_coordinates:noo {a} { \fp_eval:n{#2-0.5} } { \fp_eval:n{##1-1} }
+ \__atableau_set_bead_coordinates:noo {b} { \fp_eval:n{#3-0.5} } { \fp_eval:n{##1-1} }
+ }
+ \draw[aTableau/abacusEnds,->] (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ }
+ }
+
+ % set default "row height" of the runner labels for use below
+ \fp_set:Nn \l_tmpa_fp {-0.8}
+ }
+
+ {*}
+ { % draw dots
+ \int_step_inline:nn {\l__atableau_cols_int}
+ {
+ \seq_if_in:NeF \l__atableau_dotted_cols_seq { \int_eval:n{##1-1} }
+ {
+ % draw the abacus runners from (xa,ya) to (xb,yb)
+ \int_compare:nNnTF {#2} = {0}
+ {
+ \__atableau_set_bead_coordinates:noo {a} { \fp_eval:n{#2} } { \fp_eval:n{##1-1} }
+ \__atableau_set_bead_coordinates:noo {b} { \fp_eval:n{#3-0.5} } { \fp_eval:n{##1-1} }
+ }
+ {
+ \__atableau_set_bead_coordinates:noo {a} { \fp_eval:n{#2} } { \fp_eval:n{##1-1} }
+ \__atableau_set_bead_coordinates:noo {b} { \fp_eval:n{#3+0.5} } { \fp_eval:n{##1-1} }
+ }
+ \draw[aTableau/abacusEnds,dotted,->] (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ }
+ }
+
+ % set default "row height" of the runner labels for use below
+ \fp_set:Nn \l_tmpa_fp {-1.8}
+ }
+
+ {|} {
+ % set default "row height" of the runner labels for use below
+ \fp_set:Nn \l_tmpa_fp {-0.4}
+ }
+ }
+}
+
+
+% usage: \__atableau_abacus:nn { #runners } { bead specifications }
+\cs_new_protected:Npn \__atableau_abacus:nn #1 #2
+{
+ % set the star style
+ \tl_set:Nn \l__atableau_starstyle_tl {aTableau/abacusStarStyle}
+
+ \int_set:Nn \l__atableau_cols_int {#1}
+
+
+ \seq_if_empty:NF \l__atableau_runner_labels_seq
+ {
+ \int_set:No \l_tmpa_int { \seq_count:N \l__atableau_runner_labels_seq }
+ \int_compare:nNnF {\l__atableau_cols_int-\l_tmpa_int } = {0}
+ {
+ \msg_error:nn {aTableau} {missing-runner-labels }
+ }
+ }
+
+ % Extract the bead positions and their styles into
+ % \l__atableau_shape_seq, \l__atableau_styles_seq and \l__atableau_text_tl
+ % We allow all of the following expressions
+ % m, m^r, [style]m, [style]m^2, *m, *m^2,
+ % m_text, m_text^r, [style]m_text, [style]m_text^2, *m_text, *m_text^2,
+ % m_text^r, [style]m_text^2, *m_text^2
+ % where m is a part of the partition \l__atableau_shape_seq and r is
+ % its' exponent. First, clear all of the sequences and zero the bead
+ % counter
+ \seq_clear:N \l__atableau_shape_seq % will record the partition
+ \seq_clear:N \l__atableau_styles_seq % will record the bead style
+ \seq_clear:N \l__atableau_texts_seq % will record the bead text
+ \int_zero:N \l__atableau_beads_int % will record the number of beads
+
+ % determine the partition/beta numbers
+ \clist_map_inline:nn {#2}
+ {
+ \__atableau_peek_style:nw {record_style:nn} ##1 \q_recursion_tail \q_recursion_stop
+ }
+
+ % unless they have been set, determine the number of abacus rows
+ \int_compare:nNnT {\l__atableau_rows_int} = {0}
+ {
+ \bool_if:NTF \l__atableau_beta_numbers_bool
+ { \int_set:Nn \l__atableau_rows_int { 1+\int_div_truncate:nn { 0\seq_item:Nn \l__atableau_shape_seq 1} {#1} } }
+ { \int_set:Nn \l__atableau_rows_int { 1+\int_div_truncate:nn {\l__atableau_beads_int-1 + 0\seq_item:Nn \l__atableau_shape_seq 1} {#1} } }
+ }
+
+ % draw the abacus runners
+ \int_zero:N \l__atableau_col_int
+ \int_step_inline:nn {\l__atableau_cols_int}
+ {
+ \int_set:Nn \l_tmpa_int {##1-1} % save recalculating this many times
+ % skip the runners in dotted_cols_seq
+ \seq_if_in:NVF \l__atableau_dotted_cols_seq \l_tmpa_int
+ {
+ % draw the abacus runners from (xa,ya) to (xb,yb)
+ \__atableau_set_bead_coordinates:nnV {a} { 0 } \l_tmpa_int
+ \__atableau_set_bead_coordinates:noV {b} { \int_eval:n{\l__atableau_rows_int+1} } \l_tmpa_int
+ \draw[aTableau/runnerStyle] (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+
+ % draw ticks
+ \int_step_inline:nn {\l__atableau_rows_int}
+ {
+ \__atableau_set_bead_coordinates:noV {l} { ####1 } \l_tmpa_int
+ % add a named node
+ \node[aTableau/namedTick] (\l__atableau_name_tl) at (\fp_use:N\l__atableau_xl_fp,\fp_use:N\l__atableau_yl_fp){};
+ % add and subtract (half) tick width
+ \fp_set:Nn \l__atableau_xa_fp {\l__atableau_xl_fp+\l__atableau_tick_length_fp*\l__atableau_ab_col_dx_fp}
+ \fp_set:Nn \l__atableau_ya_fp {\l__atableau_yl_fp+\l__atableau_tick_length_fp*\l__atableau_ab_col_dy_fp}
+ \fp_set:Nn \l__atableau_xb_fp {\l__atableau_xl_fp-\l__atableau_tick_length_fp*\l__atableau_ab_col_dx_fp}
+ \fp_set:Nn \l__atableau_yb_fp {\l__atableau_yl_fp-\l__atableau_tick_length_fp*\l__atableau_ab_col_dy_fp}
+
+ \draw[aTableau/tickStyle,name=\l__atableau_name_tl] (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ }
+ }
+ }
+
+ % set e when entries=residues
+ \tl_if_eq:VnT \l__atableau_show_tl {residues}
+ {
+ % if it is not set already, then set e based on the number of runners and the Cartan type
+ \int_compare:nNnT {\l__atableau_e_int} = {0}
+ {
+ \str_case:Vn \l__atableau_cartan_tl
+ {
+ {A } { \int_set_eq:NN \l__atableau_e_int \l__atableau_cols_int }
+ {C } { \int_set:Nn \l__atableau_e_int {\l__atableau_cols_int/2} }
+ {AA} { \int_set:Nn \l__atableau_e_int {(\l__atableau_cols_int-1)/2} }
+ {DD} { \int_set:Nn \l__atableau_e_int {\l__atableau_cols_int/2-1} }
+ }
+ }
+ }
+
+ % draw the beads on the abacus
+ \int_step_inline:nn { \l__atableau_beads_int } % finally, add the beads, with labels and styles
+ {
+
+ % determine the row and column indices for the bead
+ \bool_if:NTF \l__atableau_beta_numbers_bool
+ {
+ \int_set:No \l_tmpa_int { \seq_item:Nn \l__atableau_shape_seq {##1} } % beta number
+ }
+ {
+ \int_set:No \l_tmpa_int { \l__atableau_beads_int - ##1 + \seq_item:Nn \l__atableau_shape_seq {##1} } % part -> beta number
+ }
+ \int_set:Nn \l__atableau_row_int { \int_div_truncate:nn {\l_tmpa_int} {\l__atableau_cols_int} }
+ \int_set:Nn \l__atableau_col_int { \int_mod:nn {\l_tmpa_int} {\l__atableau_cols_int} }
+
+ % determine the bead coordinates: push everything 0.5 of a
+ % unit down to allow space of the top of the abacus
+ \__atableau_set_bead_coordinates:noV {l} {\int_eval:n{\l__atableau_row_int+1} } \l__atableau_col_int
+
+ \seq_if_in:NVF \l__atableau_dotted_rows_seq \l__atableau_row_int
+ {
+ \seq_if_in:NVF \l__atableau_dotted_cols_seq \l__atableau_col_int
+ {
+ \str_case:VnF \l__atableau_show_tl
+ {
+ {betas} { \tl_set:No \l_tmpa_tl { \int_use:N\l_tmpa_int } }
+ {residues} {
+ \int_set:Nn \l_tmpb_int { \l__atableau_charge_int+\l_tmpa_int-\l__atableau_beads_int }
+ \tl_set:No \l_tmpa_tl { \__atableau_residue:nn {\l_tmpb_int} {\l__atableau_e_int} }
+ }
+ {rows } {
+ \int_set:Nn \l_tmpb_int { \l_tmpa_int-\l__atableau_beads_int+##1 }
+ \int_compare:nNnTF {\l_tmpb_int} > {0}
+ { \tl_set:No \l_tmpa_tl { ##1 } }
+ { \tl_set:No \l_tmpa_tl { {-} } }
+ }
+ {shape} { \tl_set:No \l_tmpa_tl { \seq_item:Nn \l__atableau_shape_seq {##1} } }
+ {} { \tl_set:No \l_tmpa_tl { \seq_item:Nn \l__atableau_texts_seq {##1} } }
+ }
+ {
+ \msg_error:nnx {aTableau} {unrecognised-abacus-label} { \l__atableau_show_tl }
+ }
+ % draw the bead with style
+ \tl_set:No \l_tmpb_tl { \seq_item:Nn \l__atableau_styles_seq {##1} }
+ \exp_last_unbraced:Nx \node{[aTableau/beadStyle, \l_tmpb_tl]}
+ at (\fp_use:N\l__atableau_xl_fp,\fp_use:N\l__atableau_yl_fp){\__atableau_entry:x {\l_tmpa_tl}};
+ }
+ }
+ }
+
+ % draw the top ends of the abacus -- and set \l_tmpa_fp for the runner labels
+ \__atableau_draw_abacus_end:nnn \l__atableau_abacus_top_tl {0} {-1}
+ \int_zero:N \l__atableau_c_int
+
+ % add the runner labels using the "row height" \l_tmpa_fp
+ \int_zero:N \l__atableau_c_int
+ \seq_map_inline:Nn \l__atableau_runner_labels_seq
+ {
+ \__atableau_set_bead_coordinates:nVV {a} \l_tmpa_fp \l__atableau_c_int
+ \seq_if_in:NVF \l__atableau_dotted_cols_seq \l__atableau_c_int
+ {
+ \node[aTableau/runnerLabelStyle] at (\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp){ \__atableau_entry:n{##1} };
+ }
+ \int_incr:N \l__atableau_c_int
+ }
+
+ % draw the bottom ends of the abacus
+ \__atableau_draw_abacus_end:noo \l__atableau_abacus_bottom_tl {\int_eval:n {\l__atableau_rows_int+1}} {\int_eval:n {\l__atableau_rows_int+2}}
+
+ % remove dotted rows and columns
+ \seq_if_empty:NF \l__atableau_dotted_rows_seq \__atableau_remove_dotted_abacus_rows:
+ \seq_if_empty:NF \l__atableau_dotted_cols_seq \__atableau_remove_dotted_abacus_cols:
+
+}
+
+% usage: \__atableau_remove_dotted_abacus_cols:
+% Add dots to the columns of the abacus in \l__atableau_dotted_cols_seq
+\cs_new_protected:Nn \__atableau_remove_dotted_abacus_cols:
+{
+ % shift in row-direction
+ \fp_set:Nn \l_tmpa_fp {\l__atableau_ab_row_dx_fp*\l__atableau_abacus_wd_fp}
+ \fp_set:Nn \l_tmpb_fp {\l__atableau_ab_row_dy_fp*\l__atableau_abacus_ht_fp}
+
+ % take a copy of \l__atableau_dotted_cols_seq so that the pop_left's below
+ % do not destroy it
+ \seq_set_eq:NN \l_tmpb_seq \l__atableau_dotted_cols_seq
+ \bool_do_until:nn { \seq_if_empty_p:N \l_tmpb_seq }
+ {
+ \seq_pop_left:NN \l_tmpb_seq \l_tmpa_tl
+ \int_set:Nn \l__atableau_col_int {\l_tmpa_tl}
+ \int_set:Nn \l__atableau_c_int {\l__atableau_col_int+1}
+
+ % LaTeX3 does not provide \seq_if_in_p:NN, so ...
+ \bool_set_true:N \l_tmpa_bool
+ \bool_do_while:nn { \l_tmpa_bool }
+ {
+ \int_set:Nn \l_tmpa_int {0\seq_item:Nn \l_tmpb_seq 1}
+ \int_compare:nNnTF {\l__atableau_c_int} = {\l_tmpa_int}
+ {
+ \seq_pop_left:NN \l_tmpb_seq \l_tmpa_tl
+ \int_incr:N \l__atableau_c_int
+ }
+ { \bool_set_false:N \l_tmpa_bool }
+ }
+
+ \__atableau_set_bead_coordinates:nnV {l} { 0 } \l__atableau_col_int
+
+ % set (xa,ya) and (xb,yb) to the "left" and "right" hand coordinates that we want remove
+ \fp_set:Nn \l__atableau_xa_fp {\l__atableau_xl_fp-0.35*\l__atableau_ab_col_dx_fp*\l__atableau_abacus_wd_fp}
+ \fp_set:Nn \l__atableau_ya_fp {\l__atableau_yl_fp-0.35*\l__atableau_ab_col_dy_fp*\l__atableau_abacus_ht_fp}
+ \fp_set:Nn \l__atableau_xb_fp {\l__atableau_xl_fp+(\l__atableau_c_int-\l__atableau_col_int-0.65)*\l__atableau_ab_col_dx_fp*\l__atableau_abacus_wd_fp}
+ \fp_set:Nn \l__atableau_yb_fp {\l__atableau_yl_fp+(\l__atableau_c_int-\l__atableau_col_int-0.65)*\l__atableau_ab_col_dy_fp*\l__atableau_abacus_ht_fp}
+
+ % blank out any line at the top of the abacus and replace it with dots
+ \tl_if_in:nVT {-_} \l__atableau_abacus_top_tl
+ {
+ \draw[aTableau/clearBoxes]
+ (\fp_eval:n{\l__atableau_xa_fp-0.1*\l_tmpa_fp}, \fp_eval:n{\l__atableau_ya_fp-0.1*\l_tmpb_fp})
+ --++(\fp_eval:n{0.2*\l_tmpa_fp},\fp_eval:n{0.2*\l_tmpb_fp})
+ --(\fp_eval:n{\l__atableau_xb_fp+0.1*\l_tmpa_fp}, \fp_eval:n{\l__atableau_yb_fp+0.1*\l_tmpb_fp})
+ --++(\fp_eval:n{-0.2*\l_tmpa_fp},\fp_eval:n{-0.2*\l_tmpb_fp})
+ --cycle
+ ;
+ % first blank out the possible header line and replace with dots
+ %\draw[fill=white,draw=none](\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ \draw[aTableau/dottedLine](\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ }
+
+ % now draw the dots
+ \int_zero:N \l__atableau_row_int
+ \int_step_inline:nn {\l__atableau_rows_int}
+ {
+ \fp_add:Nn \l__atableau_xa_fp {\l_tmpa_fp}
+ \fp_add:Nn \l__atableau_ya_fp {\l_tmpb_fp}
+ \fp_add:Nn \l__atableau_xb_fp {\l_tmpa_fp}
+ \fp_add:Nn \l__atableau_yb_fp {\l_tmpb_fp}
+ \draw[aTableau/dottedLine](\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ }
+
+ % blank out any line at the bottom of the abacus and replace it with dots
+ \tl_if_in:nVT {-_} \l__atableau_abacus_bottom_tl
+ {
+ \fp_add:Nn \l__atableau_xa_fp {\l_tmpa_fp}
+ \fp_add:Nn \l__atableau_ya_fp {\l_tmpb_fp}
+ \fp_add:Nn \l__atableau_xb_fp {\l_tmpa_fp}
+ \fp_add:Nn \l__atableau_yb_fp {\l_tmpb_fp}
+ \draw[aTableau/clearBoxes]
+ (\fp_eval:n{\l__atableau_xa_fp-0.1*\l_tmpa_fp}, \fp_eval:n{\l__atableau_ya_fp-0.1*\l_tmpb_fp})
+ --++(\fp_eval:n{0.2*\l_tmpa_fp},\fp_eval:n{0.2*\l_tmpb_fp})
+ --(\fp_eval:n{\l__atableau_xb_fp+0.1*\l_tmpa_fp}, \fp_eval:n{\l__atableau_yb_fp+0.1*\l_tmpb_fp})
+ --++(\fp_eval:n{-0.2*\l_tmpa_fp},\fp_eval:n{-0.2*\l_tmpb_fp})
+ --cycle
+ ;
+ % first blank out the possible header line and replace with dots
+ \draw[aTableau/dottedLine](\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ }
+ }
+}
+
+% usage: \__atableau_remove_dotted_abacus_rows:
+% Add dots to the rows of the abacus in \l__atableau_dotted_rows_seq
+\cs_new_protected:Nn \__atableau_remove_dotted_abacus_rows:
+{
+ % shift in column-direction
+ \fp_set:Nn \l_tmpa_fp {\l__atableau_ab_col_dx_fp*\l__atableau_abacus_wd_fp}
+ \fp_set:Nn \l_tmpb_fp {\l__atableau_ab_col_dy_fp*\l__atableau_abacus_ht_fp}
+
+ % take a copy of \l__atableau_dotted_rows_seq so that the pop_left's below
+ % do not destroy it
+ \seq_set_eq:NN \l_tmpb_seq \l__atableau_dotted_rows_seq
+ \bool_do_until:nn { \seq_if_empty_p:N \l_tmpb_seq }
+ {
+ \seq_pop_left:NN \l_tmpb_seq \l_tmpa_tl
+ \int_set:Nn \l__atableau_row_int {\l_tmpa_tl}
+ \int_set:Nn \l__atableau_r_int {\l__atableau_row_int+1}
+
+ % LaTeX3 does not provide \seq_if_in_p:NN, so ...
+ \bool_set_true:N \l_tmpa_bool
+ \bool_do_while:nn { \l_tmpa_bool }
+ {
+ \int_set:Nn \l_tmpa_int {0\seq_item:Nn \l_tmpb_seq 1}
+ \int_compare:nNnTF {\l__atableau_r_int} = {\l_tmpa_int}
+ {
+ \seq_pop_left:NN \l_tmpb_seq \l_tmpa_tl
+ \int_incr:N \l__atableau_r_int
+ }
+ { \bool_set_false:N \l_tmpa_bool }
+ }
+
+ \__atableau_set_bead_coordinates:non {l} { \int_eval:n{\l__atableau_row_int+1} } { 0 }
+
+ % set (xa,ya) and (xb,yb) to the "left" and "right" hand coordinates that we want remove
+ \fp_set:Nn \l__atableau_xa_fp {\l__atableau_xl_fp-0.35*\l__atableau_ab_row_dx_fp*\l__atableau_abacus_wd_fp}
+ \fp_set:Nn \l__atableau_ya_fp {\l__atableau_yl_fp-0.35*\l__atableau_ab_row_dy_fp*\l__atableau_abacus_ht_fp}
+ \fp_set:Nn \l__atableau_xb_fp {\l__atableau_xl_fp+(\l__atableau_r_int-\l__atableau_row_int-0.65)*\l__atableau_ab_row_dx_fp*\l__atableau_abacus_wd_fp}
+ \fp_set:Nn \l__atableau_yb_fp {\l__atableau_yl_fp+(\l__atableau_r_int-\l__atableau_row_int-0.65)*\l__atableau_ab_row_dy_fp*\l__atableau_abacus_ht_fp}
+
+ \draw[aTableau/clearBoxes]
+ (\fp_eval:n{\l__atableau_xa_fp-0.12*\l_tmpa_fp}, \fp_eval:n{\l__atableau_ya_fp-0.12*\l_tmpb_fp})
+ --++(\fp_eval:n{(\l__atableau_cols_int+0.24)*\l_tmpa_fp},\fp_eval:n{(\l__atableau_cols_int+0.24)*\l_tmpb_fp})
+ --(\fp_eval:n{\l__atableau_xb_fp+(\l__atableau_cols_int+0.12)*\l_tmpa_fp}, \fp_eval:n{\l__atableau_yb_fp+(\l__atableau_cols_int+0.12)*\l_tmpb_fp})
+ --(\fp_eval:n{\l__atableau_xb_fp-0.12*\l_tmpa_fp}, \fp_eval:n{\l__atableau_yb_fp-0.12*\l_tmpb_fp})
+ --cycle
+ ;
+ % first blank out the possible header line and replace with dots
+ \draw[aTableau/dottedLine](\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+
+ % now draw the dots
+ \int_step_inline:nnn {2} {\l__atableau_cols_int}
+ {
+ \fp_add:Nn \l__atableau_xa_fp {\l_tmpa_fp}
+ \fp_add:Nn \l__atableau_ya_fp {\l_tmpb_fp}
+ \fp_add:Nn \l__atableau_xb_fp {\l_tmpa_fp}
+ \fp_add:Nn \l__atableau_yb_fp {\l_tmpb_fp}
+ \draw[aTableau/dottedLine](\fp_use:N\l__atableau_xa_fp,\fp_use:N\l__atableau_ya_fp)--(\fp_use:N\l__atableau_xb_fp,\fp_use:N\l__atableau_yb_fp);
+ }
+
+ }
+}
+
+% ---------------------------------------------------------------------------
+% Keys for the package options and their defaults
+
+% setting TikZ styles via styles = { ... }
+\cs_new_protected:Npn \__atableau_tikzset:nn #1 #2 { \pgfqkeys{/tikz}{#1/.style={#2}} }
+
+% appending to aTableau styles
+\cs_new_protected:Npn \__atableau_tikzset_append:nn #1 #2 { \pgfqkeys{/tikz/aTableau}{#1/.append~style={#2}} }
+
+% aTableau options/keys
+\keys_define:nn { atableau }
+{
+ % ---------------------------------------------------------------------------
+ % general settings
+
+ % tableaux alignment
+ align .choice:,
+ align/top .code:n = { \tikzset{baseline=(current~bounding~box.north)} },
+ align/north .code:n = { \tikzset{baseline=(current~bounding~box.north)} },
+ align/center .code:n = { \tikzset{baseline=(current~bounding~box.center)}},
+ align/centre .code:n = { \tikzset{baseline=(current~bounding~box.center)}},
+ align/bottom .code:n = { \tikzset{baseline=(current~bounding~box.south)} },
+ align/south .code:n = { \tikzset{baseline=(current~bounding~box.south)} },
+ align .unknown .code:n = { \msg_error:nnn { aTableau } { unknown-baseline } {#1} },
+ align .initial:n = centre,
+
+ % set the Cartan type
+ cartan .choices:nn = { A, C, AA, DD }
+ {
+ % record the Cartan type for use in abacuses
+ \tl_set:Nn \l__atableau_cartan_tl {#1}
+ % define all of the type dependent functions here...
+ \cs_set_eq:Nc \__atableau_residue:nn {__atableau_residue_#1:nn}
+ },
+ cartan/unknown .code:n = { \msg_error:nne { aTableau } { unknown-cartan } {#1} },
+ cartan .initial:n = A,
+
+ charge .code:n =
+ {
+ % To cater for multipartitions, the charge is a sequence .
+ % Set l__atableau_charge_int is the first item in the sequence
+ \regex_split:nnN {[,\|]} {#1} \l__atableau_charge_seq
+ \int_set:Nn \l__atableau_charge_int { \seq_item:Nn \l__atableau_charge_seq {1} }
+ },
+ charge .value_required:n = true,
+ charge .initial:n = 0,
+
+ % dotted rows and columns for tableaux and abacuses
+ dotted~cols .code:n = { \__atableau_set_multiseq_key:nn {dotted_cols} {#1} },
+ dotted~cols .value_required:n = true,
+
+ dotted~rows .code:n = { \__atableau_set_multiseq_key:nn {dotted_rows} {#1} },
+ dotted~rows .value_required:n = true,
+
+ e .int_set:N = \l__atableau_e_int,
+ e .initial:n = 0,
+
+ entries .tl_set:N = \l__atableau_show_tl, % automatic bead labelling
+ entries .value_required:n = false,
+ entries .initial:n = ,
+
+ halign .choice:,
+ halign/center .code = {\cs_set_eq:NN \__atableau_halign:n \hbox_overlap_center:n},
+ halign/centre .code = {\cs_set_eq:NN \__atableau_halign:n \hbox_overlap_center:n},
+ halign/left .code = {\cs_set_eq:NN \__atableau_halign:n \hbox_overlap_left:n},
+ halign/right .code = {\cs_set_eq:NN \__atableau_halign:n \hbox_overlap_right:n},
+ halign .unknown .code:n = { \msg_error:nne { aTableau } { unknown-halign } {#1} },
+ halign .initial:n = centre,
+
+ % math/text mode for boxes and beads
+ math~entries .code:n = { \cs_set_eq:NN \__atableau_entry:n \__atableau_entry_math:n },
+ text~entries .code:n = { \cs_set_eq:NN \__atableau_entry:n \__atableau_entry_text:n },
+
+ % tableau node name prefix
+ name .tl_set:N = \l__atableau_prefix_tl,
+ name .value_required:n = true,
+ name .initial:n = A,
+
+ % scaling
+ scale .code:n = { \__atableau_set_xscale:n {#1} \__atableau_set_yscale:n {#1} },
+ scale .value_required:n = true,
+
+ % subscript an subsubscript scalinmg
+ script .fp_set:N = \l__atableau_script_fp,
+ script .value_required:n = true,
+ script .initial:n = 0.5,
+
+ scriptscript .fp_set:N = \l__atableau_scriptscript_fp,
+ scriptscript .value_required:n = true,
+ scriptscript .initial:n = 0.4,
+
+ star~style .code:n = { \__atableau_tikzset_append:nn {tableauStarStyle} {#1} },
+ star~style .value_required:n = true,
+
+ % shortcut for setting TikZ styles, following a suggestion of Skillmon to use \keyval_parse:nnn
+ styles .code:n =
+ { \keyval_parse:nnn { \msg_error:nnn {aTableau}{missing-style} } { \__atableau_tikzset:nn } { #1 } },
+
+ % tikzpicture environment
+ tikzpicture .tl_set:N= \l__atableau_tikzpicture_tl,
+ tikzpicture .value_required:n = true,
+ tikzpicture .initial:n =,
+
+ % tikz code after
+ tikz~after .tl_set:N = \l__atableau_tikz_after_tl,
+ tikz~after .value_required:n = true,
+ tikz~after .initial:n = ,
+
+ % tikz~ code before
+ tikz~before .tl_set:N = \l__atableau_tikz_before_tl,
+ tikz~before .value_required:n = true,
+ tikz~before .initial:n = ,
+
+ valign .choices:nn = { bottom, center, centre, top }
+ {
+ \cs_set_eq:Nc \__atableau_valign:n { __atableau_valign_#1:n }
+ },
+ valign .unknown .code:n = { \msg_error:nne { aTableau } { unknown-valign } {#1} },
+ valign .initial:n = centre,
+
+ xscale .code:n = { \__atableau_set_xscale:n {#1} },
+ xscale .value_required:n = true,
+ xscale .initial:n =1,
+
+ yscale .code:n = { \__atableau_set_yscale:n {#1} },
+ yscale .value_required:n = true,
+ yscale .initial:n =1,
+
+ % ---------------------------------------------------------------------------
+ % tableau settings
+
+ % convention switches
+ Australian .code:n = \__atableau_set_style:nn {tableau} {australian},
+ australian .code:n = \__atableau_set_style:nn {tableau} {australian},
+ australian .value_required:n = false,
+
+ English .code:n = \__atableau_set_style:nn {tableau} {english},
+ english .code:n = \__atableau_set_style:nn {tableau} {english},
+ english .value_required:n = false,
+ english .initial:n =, % default style
+
+ French .code:n = \__atableau_set_style:nn {tableau} {french},
+ french .code:n = \__atableau_set_style:nn {tableau} {french},
+ french .value_required:n = false,
+
+ ukrainian .code:n = \__atableau_set_style:nn {tableau} {ukrainian},
+ Ukrainian .code:n = \__atableau_set_style:nn {tableau} {ukrainian},
+ ukrainian .value_required:n = false,
+
+ Russian .code:n = \__atableau_set_style:nn {tableau} {ukrainian},
+ russian .code:n = \__atableau_set_style:nn {tableau} {ukrainian},
+
+ border .bool_set:N = \l__atableau_border_bool,
+ border .default:n = true,
+ border .initial:n = true,
+
+ no~border .bool_set_inverse:N = \l__atableau_border_bool,
+ no~border .default:n = true,
+
+ % border colours
+
+ border~color .tl_set:N = \l__atableau_outer_tl, % an alias
+ border~color .value_required:n = true,
+ border~colour .tl_set:N = \l__atableau_outer_tl,
+ border~colour .value_required:n = true,
+ border~colour .initial:n = aTableauMain,
+
+ border~style .code:n = { \__atableau_tikzset_append:nn {borderStyle} {#1} },
+ border~style .value_required:n = true,
+
+ % node height and width
+ box~height .fp_set:N = \l__atableau_box_ht_fp,
+ box~height .value_required:n = true,
+ box~height .initial:n = 0.5,
+
+ box~width .fp_set:N = \l__atableau_box_wd_fp,
+ box~width .value_required:n = true,
+ box~width .initial:n = 0.5,
+
+ % box styling
+ box~fill .tl_set:N = \l__atableau_box_fill_tl,
+ box~fill .value_required:n = true,
+ box~fill .initial:n = white,
+
+ box~font .tl_set:N = \l__atableau_box_font_tl,
+ box~font .value_required:n = true,
+ box~font .initial:n =,
+
+ box~shape .tl_set:N = \l__atableau_box_shape_tl,
+ box~shape .value_required:n = true,
+ box~shape .initial:n = rectangle,
+
+ box~text .tl_set:N = \l__atableau_box_text_tl,
+ box~text .value_required:n = true,
+ box~text .initial:n = aTableauMain,
+
+ box~style .code:n = { \__atableau_tikzset_append:nn {boxStyle} {#1} },
+ box~style .value_required:n = true,
+
+ boxes .bool_set:N = \l__atableau_boxes_bool,
+ boxes .default:n = true,
+ boxes .initial:n = true,
+
+ no~boxes .bool_set_inverse:N = \l__atableau_boxes_bool,
+ no~boxes .default:n = true,
+
+ conjugate .code:n =
+ {
+ \tl_set:Nx \l_tmpa_tl {\str_lowercase:n {#1}}
+ \str_if_eq:VnTF \l_tmpa_tl {true}
+ {
+ \bool_set_true:N \l__atableau_conjugate_bool
+ \cs_set_eq:NN \__atableau_set_box_coordinates:nnn \__atableau_set_box_coordinates_conjugate:nnn
+ }
+ {
+ \bool_set_false:N \l__atableau_conjugate_bool
+ \cs_set_eq:NN \__atableau_set_box_coordinates:nnn \__atableau_set_box_coordinates_normal:nnn
+ }
+ },
+ conjugate .default:n = true,
+ conjugate .initial:n = false,
+
+ inner~wall .tl_set:N = \l__atableau_inner_tl,
+ inner~wall .value_required:n = true,
+ inner~wall .initial:n = aTableauInner,
+
+ inner~style .code:n = { \__atableau_tikzset_append:nn {innerWall} {#1} },
+ inner~style .value_required:n = true,
+
+ % label
+ label .code:n = {
+ \tl_if_in:nnTF {#1} {|}
+ {
+ % unpack the ribbons into \l__atableau_multiribbons_seq
+ \seq_set_split:cnn {l__atableau_multilabel_seq} {|} {#1}
+ }
+ { \tl_set:No \l__atableau_label_tl {#1} }
+ },
+
+ label~style .code:n = { \__atableau_tikzset_append:nn {labelStyle} {#1} },
+ label~style .value_required:n = true,
+
+ % -- paths ---------------------------------------
+ paths .code:n = { \__atableau_set_multiseq_key:nn {paths} {#1} },
+ paths .initial:n = ,
+
+ path~style .code:n = { \__atableau_tikzset_append:nn {pathStyle} {#1} },
+ path~style .value_required:n = true,
+ path~style .initial:n =,
+
+ path~box .tl_set:N = \l__atableau_path_box_tl,
+ path~box .initial:n = ,
+
+ path~box~style .code:n = { \__atableau_tikzset_append:nn {pathBox} {#1} },
+ path~box~style .value_required:n = true,
+ path~box~style .initial:n =,
+
+ % -- ribbons ---------------------------------------
+ ribbons .code:n = { \__atableau_set_multiseq_key:nn {ribbons} {#1} },
+ ribbons .initial:n = ,
+
+ ribbon~style .code:n = { \__atableau_tikzset_append:nn {ribbonStyle} {#1} },
+ ribbon~style .value_required:n = true,
+ ribbon~style .initial:n =,
+
+ ribbon~box .tl_set:N = \l__atableau_ribbon_box_tl,
+ ribbon~box .initial:n = ,
+
+ ribbon~box~style .code:n = { \__atableau_tikzset_append:nn {ribbonBox} {#1} },
+ ribbon~box~style .value_required:n = true,
+ ribbon~box~style .initial:n =,
+
+ % -- snobs ---------------------------------------
+ snobs .code:n = { \__atableau_set_multiseq_key:nn {snobs} {#1} },
+ snobs .initial:n = ,
+
+ snob~style .code:n = { \__atableau_tikzset_append:nn {snobStyle} {#1} },
+ snob~style .value_required:n = true,
+ snob~style .initial:n =,
+
+ snob~box .tl_set:N = \l__atableau_snob_box_tl,
+ snob~box .initial:n = ,
+
+ snob~box~style .code:n = { \__atableau_tikzset_append:nn {snobBox} {#1} },
+ snob~box~style .value_required:n = true,
+ snob~box~style .initial:n =,
+
+ % -- shifted, skew and tabloid shapes ------------
+ shifted .bool_set:N = \l__atableau_shifted_bool,
+ shifted .initial:n = false,
+
+ skew .code:n =
+ {
+ \tl_if_in:nnTF {#1} {|}
+ {
+ % unpack the skew tableau into \l__atableau_multiskew_seq
+ \seq_set_split:Nnn \l__atableau_multiskew_seq {|} {#1}
+ }
+ { \__atableau_set_partition:nn {skew} {#1} }
+ },
+ skew .value_required:n = true,
+ skew .initial:n = 0,
+
+ skew~border .bool_set:N = \l__atableau_skew_border_bool,
+ skew~border .initial:n = false,
+
+ no~skew~border .bool_set_inverse:N = \l__atableau_skew_border_bool,
+ no~skew~border .default:n = true,
+
+ skew~border~style .code:n = { \__atableau_tikzset_append:nn {skewBorder} {#1} },
+ skew~border~style .value_required:n = true,
+
+ skew~boxes .bool_set:N = \l__atableau_skew_boxes_bool,
+ skew~boxes .default:n = true,
+ skew~boxes .initial:n = false,
+
+ no~skew~boxes .bool_set_inverse:N = \l__atableau_skew_boxes_bool,
+
+ skew~box~style .code:n = { \__atableau_tikzset_append:nn {skewBox} {#1} },
+ skew~box~style .value_required:n = true,
+
+ skew colour .tl_set:N = \l__atableau_skew_border_tl,
+ skew color .tl_set:N = \l__atableau_skew_border_tl,
+ skew colour .initial:n = aTableauSkew,
+
+ tabloid .bool_set:N = \l__atableau_tabloid_bool,
+ tabloid .initial:n = false,
+
+ % -- multitableaux and multidiagrams --------------------
+
+ delimiters .code:n = { \__atableau_set_delimiters:nn #1 },
+ delimiters .value_required:n = true,
+ delimiters .initial:n = (),
+
+ left~delimiter .tl_set:N = \l__atableau_left_delimiter_tl,
+ left~delimiter .value_required:n = true,
+
+ right~delimiter .tl_set:N = \l__atableau_right_delimiter_tl,
+ right~delimiter .value_required:n = true,
+
+ empty .tl_set:N = \l__atableau_empty_tl,
+ empty .initial:n = \textendash,
+
+ separators .bool_set:N = \l__atableau_separators_bool,
+ separators .default:n = true,
+ separators .initial:n = true,
+
+ no~separators .bool_set_inverse:N = \l__atableau_separators_bool,
+ no~separators .default:n = true,
+
+ separation .fp_set:N = \l__atableau_separation_fp,
+ separation .value_required:n = true,
+ separation .initial:n = 0.3,
+
+ separator .tl_set:N = \l__atableau_separator_tl,
+ separator .value_required:n = true,
+ separator .initial:n = |,
+
+ separator~colour .tl_set:N = \l__atableau_separator_fg_tl,
+ separator~colour .value_required:n = true,
+ separator~colour .initial:n = aTableauMain,
+
+ separator~color .tl_set:N = \l__atableau_separator_fg_tl,
+ separator~color .value_required:n = true,
+
+ % set rows in abacuses, multitableau and multidiagrams
+ rows .code:n = {
+ \fp_set:Nn \l__atableau_rows_fp {#1}
+ \int_set:No \l__atableau_rows_int {\fp_to_int:N \l__atableau_rows_fp}
+ },
+ rows .value_required:n = true,
+ rows .initial:n = 0,
+
+ xoffsets .code:n = { \regex_split:nnN {[\|,]} {#1} \l__atableau_xoffsets_seq },
+ xoffsets .value_required:n = true,
+ xoffsets .initial:n = 0,
+
+ yoffsets .code:n = { \regex_split:nnN {[\|,]} {#1} \l__atableau_yoffsets_seq },
+ yoffsets .value_required:n = true,
+ yoffsets .initial:n = 0,
+
+ % ---------------------------------------------------------------------------
+ % abacus keys
+
+ south .code:n = \__atableau_set_style:nn {abacus} {south},
+ south .initial:n =,
+ east .code:n = \__atableau_set_style:nn {abacus} {east},
+ north .code:n = \__atableau_set_style:nn {abacus} {north},
+ west .code:n = \__atableau_set_style:nn {abacus} {west},
+
+ % abacus style
+ abacus~ends .code:n = { \__atableau_set_abacus_ends:nn #1 },
+ abacus~ends .value_required:n = true,
+ abacus~ends .initial:n = {-|},
+
+ abacus~ends~style .code:n = { \__atableau_tikzset_append:nn {abacusEnds} {#1} },
+ abacus~ends~style .value_required:n = true,
+
+ abacus~star~style .code:n = { \__atableau_tikzset_append:nn {abacusStarStyle} {#1} },
+ abacus~star~style .value_required:n = true,
+
+ bead .tl_set:N = \l__atableau_bead_tl, % bead colour
+ bead .value_required:n = true,
+ bead .initial:n = aTableauMain,
+
+ bead~font .tl_set:N = \l__atableau_bead_font_tl, % bead font
+ bead~font .initial:n = \small,
+ bead~font .value_required:n = true,
+
+ bead~size .fp_set:N = \l__atableau_bead_size_fp,
+ bead~size .initial:n = 0.4,
+
+ bead~sep .fp_set:N = \l__atableau_abacus_ht_fp, % bead separation
+ bead~sep .value_required:n = true,
+ bead~sep .initial:n = 0.42,
+
+ bead~shape .tl_set:N = \l__atableau_bead_shape_tl, % bead shape colour
+ bead~shape .value_required:n = true,
+ bead~shape .initial:n = circle,
+
+ bead~style .code:n = { \__atableau_tikzset_append:nn {beadStyle} {#1} },
+ bead~style .value_required:n = true,
+
+ bead~text .tl_set:N = \l__atableau_bead_text_tl, % bead text colour
+ bead~text .value_required:n = true,
+ bead~text .initial:n = white,
+
+ beta~numbers .bool_set:N = \l__atableau_beta_numbers_bool,
+ beta~numbers .initial:n = false,
+
+ no~shade .code:n = { \__atableau_tikzset_append:nn {beadStyle} {no~shade,} },
+ no~shade .value_required:n = false,
+
+ runner .tl_set:N = \l__atableau_runner_tl, % runner colour
+ runner .value_required:n = true,
+ runner .initial:n = aTableauInner,
+
+ runner~style .code:n = { \__atableau_tikzset_append:nn {runnerStyle} {#1} },
+ runner~style .value_required:n = true,
+
+ runner~labels .code:n = { \seq_set_split:Nnn \l__atableau_runner_labels_seq {,} {#1} },
+ runner~labels .value_required:n = true,
+
+ runner~label~style .code:n = { \__atableau_tikzset_append:nn {runnerLabelStyle} {#1} },
+ runner~label~style .value_required:n = true,
+
+ runner~sep .fp_set:N = \l__atableau_abacus_wd_fp, % runner separation
+ runner~sep .value_required:n = true,
+ runner~sep .initial:n = 0.42,
+
+ shading .tl_set:N = \l__atableau_shading_tl,
+ shading .value_required:n = true,
+ shading .initial:n = ball,
+
+ tick .tl_set:N = \l__atableau_tick_tl, % tick colour
+ tick .initial:n = aTableauInner,
+
+ tick~length .code:n = { \fp_set:Nn \l__atableau_tick_length_fp {#1/2} }, % (half) tick width separation
+ tick~length .value_required:n = true,
+ tick~length .initial:n = 0.1,
+
+ tick~style .code:n = { \__atableau_tikzset_append:nn {tickStyle} {#1} },
+ tick~style .value_required:n = true,
+}
+
+
+% ---------------------------------------------------------------------------
+% Usage: \__atableau_set_origin:nn (x,y)
+% Set the Cartesian coordinates for the corner of the (1,1) box
+% TODO: allow general TikZ-coorindates. To do this we could, for example, use ideas from
+% https://tex.stackexchange.com/questions/33703/extract-x-y-coordinate-of-an-arbitrary-point-in-tikz
+\cs_new_protected:Npn \__atableau_set_origin:nn (#1,#2)
+{
+ \fp_set:Nn \l__atableau_x_fp {#1}
+ \fp_set:Nn \l__atableau_y_fp {#2}
+}
+
+% usage: \__atableau_tikzpicture:nnn {settings} {origin} {aTableau command}
+% where
+% - #1: settings are a comma separated list of aTableau settings
+% - #2: origin are Cartesian coordinates in the form x,y, or NoValue
+% - #3: an internal aTableau command with parameters for drawing something
+% Apply settings and wrap an aTableau command inside a tikzpicture environment.
+% Add any tikzpicture environments settings and before and after TikZ commands
+\cs_new_protected:Npn \__atableau_tikzpicture:nnn #1 #2 #3
+{
+ \group_begin:
+ % keep changes to settings local by working inside a group
+ \keys_set:nn {atableau} {#1}
+ \IfNoValueTF {#2}
+ { % wrap inside a tikzpicture environment, placing the picture at (0,0)
+ \__atableau_set_origin:nn (0,0)
+
+ \mode_if_math:TF
+ {
+ % We want to automatically rescale when used as a subscript, which
+ % we do by putting the tikz code inside a box and then using
+ % \mathchoice to adjust for script size, using an idea of cfr's
+
+ \hbox_set:Nw \l_tmpa_box
+ \exp_last_unbraced:Ne \tikz{[\l__atableau_tikzpicture_tl]}
+ { \l__atableau_tikz_before_tl #3 \l__atableau_tikz_after_tl }
+ \hbox_set_end:
+
+ \mathchoice
+ { % display style: do nothing
+ \box_use:N \l_tmpa_box
+ }
+ { % text style: do nothing
+ \box_use:N \l_tmpa_box
+ }
+ { % script style: rescale
+ \box_scale:Nnn \l_tmpa_box {\l__atableau_script_fp*\l__atableau_xscale_fp}
+ {\l__atableau_script_fp*\l__atableau_yscale_fp}
+ \box_use:N \l_tmpa_box
+ }
+ { % scriptscript style: rescale
+ \box_scale:Nnn \l_tmpa_box {\l__atableau_scriptscript_fp*\l__atableau_xscale_fp}
+ {\l__atableau_scriptscript_fp*\l__atableau_yscale_fp}
+ \box_use:N \l_tmpa_box
+ }
+ }
+ { % Not in maths-mode. tcolorbox objects to using a box here
+ \exp_last_unbraced:Ne \tikz{[\l__atableau_tikzpicture_tl]}
+ { \l__atableau_tikz_before_tl #3 \l__atableau_tikz_after_tl }
+ }
+ }
+ { % already inside a tikzpicture environment
+ \__atableau_set_origin:nn (#2)
+ \l__atableau_tikz_before_tl #3 \l__atableau_tikz_after_tl
+ }
+ \group_end:
+}
+
+% ---------------------------------------------------------------------------
+% Public facing package commands
+
+% Almost all public-facing routines call \__atableau_tikzpicture:nnn,
+% which applies the settings, sets the coordinates of the origin and
+% then ensures that the requested diagram is drawn inside a tikzpicture
+% environment.
+
+% \Abacus (x,y) [style] {#runners} {partition}
+\NewDocumentCommand\Abacus{ d() O{} m m }
+{
+ \__atableau_tikzpicture:nnn {#2} {#1} { \__atableau_abacus:nn {#3} {#4} }
+}
+
+% \Diagram (x,y) [style] {shape}
+\NewDocumentCommand\Diagram{ d() O{} m }
+{
+ \__atableau_tikzpicture:nnn {#2} {#1} { \__atableau_draw_diagram:n {#3} }
+}
+
+% \Multidiagram (x,y) [style] {entries}
+\NewDocumentCommand\Multidiagram{ d() O{} m }
+{
+ \__atableau_tikzpicture:nnn {#2} {#1} { \__atableau_multidiagram:n {#3} }
+}
+
+% \Multitableau (x,y) [style] {entries}
+\NewDocumentCommand\Multitableau{ d() O{} m }
+{
+ \__atableau_tikzpicture:nnn {#2} {#1} { \__atableau_multitableau:n {#3} }
+}
+
+% \RibbonTableau (x,y) [style] {entries}
+\NewDocumentCommand\RibbonTableau{ d() O{} m }
+{
+ \__atableau_tikzpicture:nnn {#2} {#1} { \__atableau_ribbon_tableau:n {#3} }
+}
+
+% \ShiftedDiagram (x,y) [style] {entries}
+\NewDocumentCommand\ShiftedDiagram{ d() O{} m }
+{
+ \__atableau_tikzpicture:nnn {shifted,#2} {#1} { \__atableau_draw_diagram:n {#3} }
+}
+
+% \ShiftedTableau (x,y) [style] {entries}
+\NewDocumentCommand\ShiftedTableau{ d() O{} m }
+{
+ \__atableau_tikzpicture:nnn {shifted,#2} {#1} { \__atableau_draw_tableau:n {#3} }
+}
+
+% \SkewDiagram (x,y) [style] {skew shape} {entries}
+\NewDocumentCommand\SkewDiagram{ d() O{} m m }
+{
+ \__atableau_tikzpicture:nnn {skew={#3},#2} {#1} { \__atableau_draw_diagram:n {#4} }
+}
+
+% \SkewTableau (x,y) [style] {skew shape} {entries}
+\NewDocumentCommand\SkewTableau{ d() O{} m m }
+{
+ \__atableau_tikzpicture:nnn {skew={#3},#2} {#1} { \__atableau_draw_tableau:n {#4} }
+}
+
+% \Tableau (x,y) [style] {entries}
+\NewDocumentCommand\Tableau{ d() O{} m }
+{
+ \__atableau_tikzpicture:nnn {#2} {#1} { \__atableau_draw_tableau:n {#3} }
+}
+
+% \Tabloid (x,y) [style] {entries}
+\NewDocumentCommand\Tabloid{ d() O{} m }
+{
+ \__atableau_tikzpicture:nnn {tabloid,#2} {#1} { \__atableau_draw_tableau:n {#3} }
+}
+
+\NewDocumentCommand\aTabset{ m }{ \keys_set:nn { atableau } {#1} }
+
+% ---------------------------------------------------------------------------
+% Finally, now that everything is defined, process the package options.
+
+\IfFormatAtLeastTF { 2022-06-01 }
+ { \ProcessKeyOptions [ atableau ] }
+ {
+ \RequirePackage { l3keys2e }
+ \ProcessKeysOptions { atableau }
+ }
+
+\endinput
+
+% ---------------------------------------------------------------------------
+% CHANGE LOG
+%
+% Version 1.0.0 - 2023-10-06
+% - initial version
+% - Young diagrams, tabloids, tableaux, shifted tableaux, Ukrainian tableaux, abacuses, braids
+%
+% Version 2.0.0 - 2025-01-22
+% - completely rewritten using LaTeX3
+% - key interface for the tableaux options
+% - macros can be used both in and outside tikzpicture environments
+% - a quark-based interface allows styles to be applied to each tableau entry
+% - support for different conventions (english, french, ukrainian, australian)
+% - support diagrams, tableaux, including tabloids, skew and shifted tableaux and ribbon tableaux
+% - stars and styles
+%
+% Version 2.1.0 - 2025-01-24
+% - support for using aTableau commands in super and subscripts
+% - warning about using older versions of LaTeX3
+
+
+% ---------------------------------------------------------------------------
+%
+% Copyright (C) 2022-25 by Andrew Mathas <andrew.mathas@gmail.com>
+%
+% 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
+% Andrew Mathas.
+%
+% This package consists of the files:
+% atableau.ini
+% atableau.pdf
+% atableau.sty
+% atableau.tex
+% LICENSE
+% README.md
+%
+% ---------------------------------------------------------------------------
+
+% end of atableau.sty
diff --git a/graphics/pgf/contrib/atableau/atableau.tex b/graphics/pgf/contrib/atableau/atableau.tex
new file mode 100644
index 0000000000..a91636eb8c
--- /dev/null
+++ b/graphics/pgf/contrib/atableau/atableau.tex
@@ -0,0 +1,4441 @@
+% ----------------------------------------------------------------------
+% Title: aTableau. Author: Andrew Mathas Created: October 2023
+% Modified: 16:58 Friday, 24 January 2025
+% ----------------------------------------------------------------------
+\documentclass{amsart}
+\usepackage[svgnames,table]{xcolor}
+\usepackage{atableau}
+\usepackage{xspace}
+\usepackage{manfnt}
+\usepackage{booktabs}
+\usepackage{longtable}
+\usepackage{xltabular}
+\usepackage{siunitx}
+\usepackage{array}
+\newcolumntype{L}{>{\sffamily\color{MidnightBlue}\textbackslash}l}
+
+% ----------------------------------------------------------------------
+\usepackage{bm}
+\usepackage{mathtools}
+
+% ----------------------------------------------------------------------
+\usepackage{bbding}
+\newcommand\No{\textcolor{red}{\XSolidBrush}}
+% \Yes, which adds a hyperlink, is defined below
+
+% ----------------------------------------------------------------------
+\usepackage[a4paper,hmargin=24mm, vmargin=18mm, footskip=10mm]{geometry}
+\synctex=1
+\hfuzz=5pt
+\parindent=0pt
+\parskip=4mm
+
+\makeatletter
+\def\@evenhead{\hfill\aTableau\hfill}
+\let\@oddhead\@evenhead
+\def\@oddfoot {\color{aTableauInner} Version \atableau@version~(\atableau@release)\hfill\thepage}
+\def\@evenfoot{\color{aTableauInner} \thepage\hfill Version \atableau@version~(\atableau@release)}
+\makeatother
+
+% ----------------------------------------------------------------------
+\newcommand\aTableauColour[1]{%
+ \tikz[baseline={(current bounding box.south)}]\node[minimum width=8mm, minimum height=2ex,fill=aTableau#1]{};%
+}
+
+\ExplSyntaxOn
+% \optionlabel applies \option to the csv in #1 except in the case
+% when #1 starts with a * when the rest of #1 is printed
+\NewDocumentCommand\optionlabel{ m }
+{
+ \str_if_eq:eeTF { \str_head:n {#1} } {*}
+ {
+ \tl_set:Nx \l_tmpb_tl { \str_tail:n {#1} }
+ \tl_put_left:Nn \l_tmpb_tl {\sffamily\color{aTableauInner}}
+ }
+ {
+ \tl_clear:N \l_tmpa_tl
+ \tl_clear:N \l_tmpb_tl
+ \clist_map_inline:nn {#1}
+ {
+ \tl_put_right:Ne \l_tmpb_tl { \l_tmpa_tl \exp_not:N\option{##1}}
+ \tl_set:Nn \l_tmpa_tl {,~}
+ }
+ }
+ \l_tmpb_tl\hss
+}
+
+\NewDocumentCommand\Yes{o d()}
+{
+ \IfNoValueTF{#1}
+ {
+ \IfNoValueTF{#2}
+ { \hyperref[\g_lastlink_tl]{\textcolor{ForestGreen}{\CheckmarkBold}} }
+ { \hyperref[Key:#2]{\textcolor{ForestGreen}{\CheckmarkBold}} }
+ }
+ {
+ \hyperref[\g_lastlink_tl-\str_lowercase:f{#1}]{\textcolor{ForestGreen}{\CheckmarkBold}}
+ }
+}
+
+% Add hyperinks for (new displayed) options
+\tl_new:N \g_lastlink_tl
+\prop_new:N \l__atableau_options_prop
+\NewDocumentCommand\AddKeyLink{m}
+{
+ \tl_gset:Nx \g_lastlink_tl {Key:\str_lowercase:f{#1}}
+ \prop_if_in:NVF \l__atableau_options_prop \g_lastlink_tl
+ {
+ \phantomsection\exp_args:Nf\label{Key:\str_lowercase:f{#1}}% add a label for references
+ \prop_put:NVn \l__atableau_options_prop \g_lastlink_tl {}
+ }
+}
+% \option*[default value]{option name}[accepted values]<hyperlink context>(link name)
+% The \option command is slightly overloaded, both in terms of arguments
+% (there are five) and in terms of use.
+% 1. If #2 is given then \option gives the syntax for the using this key:
+% - #1=* determines whether a \newline or \bigskip is inserted. The
+% *-version is used when a block of keys are listed together
+% - #2 gives the default options
+% - #3 is the key name and optionally may take the form key=value
+% to describe the allowed values. If the value is given then it is
+% printed in orange after the key inside \langle...\rangle. This is
+% intended for "generic values like 'value' or 'style'.
+% The key component of #2 is used to add a hyperlink to the current
+% location, which takes the form Key:<key>-<context>, where the
+% <context> is added only if #5 is supplied
+% - any accepted values in #3 are printed in the right-hand margin
+% 2. When #2 is omitted, this an inline citation of the key. A
+% hyperlink is added
+
+% The *-version does not do a \bigskip before the option. A hyperlink is
+% added for new displayed options. If #2 is blank then the *-version
+% puts (no) before the option key. If #5 is given then it is added to
+% to the hyperlink.
+\NewDocumentCommand\option{ somo d<> d()}
+{%
+ \seq_set_split:Nnn \l_tmpa_seq {=} {#3}%
+ \seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl%
+ \seq_if_empty:NTF \l_tmpa_seq
+ { \tl_clear:N \l_tmpb_tl }
+ { \tl_set:No \l_tmpb_tl { \seq_use:Nn \l_tmpa_seq {=} } }
+ \IfNoValueTF{#2}
+ {%
+ \IfNoValueTF{#6}
+ {
+ \tl_gset:Nx \g_lastlink_tl {Key:\str_lowercase:f{\l_tmpa_tl}}
+ \IfNoValueF{#5} { \tl_gput_right:No \g_lastlink_tl {\str_lowercase:f{-#5}} }
+ }
+ { \tl_gset:Ne \g_lastlink_tl {Key:#6} }
+ \hyperref[\g_lastlink_tl]{\textsf{\color{aTableauInner}\IfBooleanT{#1}{(no)~}\l_tmpa_tl}}
+ \index{\l_tmpa_tl}%
+ \tl_if_empty:NF \l_tmpb_tl { \textsf{\,$=$\,}\textsf{\textcolor{orange}{\l_tmpb_tl}} }
+ }
+ {%
+ % encourage page breaks *before* the option, rather than after it
+ \IfBooleanTF{#1}{\newline}{\bigskip\pagebreak[0]}%
+ % adjust #3 if it contains a *, when we add = <value>
+ % add a label for references
+ \IfNoValueTF{#5} { \AddKeyLink{\l_tmpa_tl} }{ \AddKeyLink{\l_tmpa_tl-#5} }
+ \noindent\textsf
+ {
+ \textcolor{aTableauInner}{\l_tmpa_tl}
+ \tl_if_empty:NF \l_tmpb_tl { \textcolor{orange}{$\,=\,\langle$\l_tmpb_tl$\rangle$} }
+ }
+ \tl_if_blank:nF {#2}
+ { ~ \tl_if_eq:nnTF{#2} {-} {(default)} {(default:~\textcolor{DarkRed}{#2})} }%
+ \hfill%
+ \IfNoValueF{#4}{\textcolor{Grey}{[accepts:~#4]}}%
+ \index{\l_tmpa_tl|underline}%
+ \nopagebreak[4]%
+ }%
+}
+
+% index command ignoring the backslash and capitalisation
+\cs_new_protected:Npn \l_addto_index:nn #1#2 { \index{#2@\textbackslash #1} }
+\cs_generate_variant:Nn \l_addto_index:nn {Vo}
+\NewDocumentCommand\indexcmd{m}
+{
+ \tl_set:Nn \l_index_tl {#1}
+ \l_addto_index:Vo \l_index_tl { \str_lower_case:n\l_index_tl }
+}
+
+\clist_new:N \l_atableau_keys_clist
+\clist_set:Nn \l_atableau_keys_clist
+{
+ Australian,
+ English,
+ French,
+ Ukrainian,
+ align,
+ australian,
+ border,
+ box,
+ boxes,
+ no boxes,
+ color,
+ colour,
+ cols,
+ conjugate,
+ left delimiter,
+ right delimiter,
+ delimiters,
+ dotted,
+ e,
+ east,
+ english,
+ entries,
+ font,
+ french,
+ halign,
+ height,
+ inner,
+ label,
+ left,
+ math,
+ nodes,
+ north,
+ ribbon,
+ ribbons,
+ right,
+ rows,
+ scale,
+ separator,
+ separators,
+ shape,
+ shifted,
+ skew,
+ snobs,
+ snob style,
+ ribbon style,
+ path style,
+ snob box,
+ ribbon box,
+ path box,
+ snob box style,
+ ribbon box style,
+ path box style,
+ valign,
+ south,
+ star style,
+ abacus star style,
+ tabloid,
+}
+\NewDocumentCommand\HighlightKeys{m}
+{
+ \clist_if_in:NnTF \l_atableau_keys_clist {#1}
+ {
+ \textcolor{orange}{#1}
+ }
+ {
+ #1
+ }
+}
+\ExplSyntaxOff
+
+% ---------------------------------------------------------------------------
+\usepackage{enumitem}
+\setlist{itemsep=2mm, parsep=2mm}
+\newlist{options}{description}{1}
+% remove the colon from the description label by redefining \makelabel
+\setlist[options]{
+ before=\let\makelabel\optionlabel,
+ labelwidth=\textwidth,
+ nosep,
+}
+
+% ---------------------------------------------------------------------------
+% the index
+
+\usepackage{imakeidx}
+\indexsetup{level=\section*, toclevel=section, noclearpage}
+\makeindex[columns=3]
+\renewcommand*{\seename}{see}
+
+% ---------------------------------------------------------------------------
+%\renewcommand\thesubsection{\thesection\Alph{subsection}}
+\setcounter{secnumdepth}{3}
+\setcounter{tocdepth}{3}
+\renewcommand\thesubsection{\thesection\Alph{subsection}}
+\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
+
+\makeatletter
+\def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}}
+\def\l@subsubsection{\@tocline{2}{0pt}{3.5pc}{3pc}{}}
+\makeatother
+
+\newenvironment{warning}{\trivlist\item[\hskip\labelsep\textcolor{red}{\textdbend}]}{\endtrivlist}
+
+% ---------------------------------------------------------------------------
+\usepackage[skins]{tcolorbox}
+\usepackage{hyperref}
+\hypersetup{
+ colorlinks=true,
+ linkcolor=MediumBlue,
+ citecolor=FireBrick,
+}
+\tcbuselibrary{listings, breakable}
+
+\DeclareTotalTCBox\keyword{ O{} v }
+{
+ bottom=0pt,
+ colback = Ivory,
+ colupper = aTableauInner,
+ fontupper= \bfseries,
+ fontlower= \bfseries,
+ left = 0mm,
+ right = 0mm,
+ size = tight,
+ skin = tile,
+ top = 0pt,
+ nobeforeafter,
+ on line,
+ shrink tight,
+ verbatim,
+ #1}
+{#2}
+
+\newcommand\aTableau{\textcolor{aTableauMain}{\sffamily aTableau}\xspace}
+
+% hyperref links to ctan
+\newcommand\ctan[1]{\href{https://www.ctan.org/pkg/#1}{\texttt{#1}}}
+\newcommand\TikZ{\href{https://www.ctan.org/pkg/tikz}{Ti\textit{k}Z}\xspace}
+
+\lstdefinestyle{atableau}
+{
+ style=tcblatex,
+ classoffset=0,
+ texcsstyle=*\color{MediumBlue},%
+ deletetexcs={begin, end},
+ commentstyle=\color{Peru},
+ moretexcs={,% aTableau package commands
+ aTabset,
+ Abacus,
+ Diagram,
+ Multidiagram,
+ Multitableau,
+ RibbonTableau,
+ ShiftedDiagram,
+ ShiftedTableau,
+ SkewTableau,
+ SkewDiagram,
+ Tableau,
+ Tabloid,
+ },%
+% classoffset=1, % aTableau package options
+% keywordstyle=\color{aTableauInner},%
+% morekeywords={
+% Australian,
+% English,
+% French,
+% Ukrainian,
+% align,
+% australian,
+% border,
+% box,
+% boxes,
+% color,
+% colour,
+% cols,
+% conjugate,
+% delimiter,
+% delimiters,
+% dotted,
+% e,
+% east,
+% english,
+% entries,
+% finite,
+% font,
+% french,
+% halign,
+% height,
+% infinite,
+% inner,
+% label,
+% left,
+% math,
+% no,
+% nodes,
+% north,
+% only,
+% ribbon,
+% ribbons,
+% right,
+% rows,
+% scale,
+% separator,
+% separators,
+% shape,
+% shifted,
+% skew,
+% snobs,
+% valign,
+% south,
+%% star,
+%% style,
+% tabloid,
+% text,
+% text,
+% type,
+% ukrainian,
+% wall,
+% west,
+% width,
+% xoffset,
+% xscale,
+% yoffset,
+% yscale,
+% },
+% classoffset=2, % aTableau values
+% keywordstyle=\color{orange},%
+% morekeywords={
+% A, C, DD, AA,
+% beta,
+% bottom,
+% center,
+% centre,
+% contents,
+% false,
+% first,
+% hooks,
+% last,
+% left,
+% residues,
+% right,
+% row,
+% top,
+% true,
+% },
+% classoffset=3, % TikZ and LaTeX commands
+% keywordstyle=\color{teal},%
+% morekeywords={
+% draw,
+% foreach,
+% node,
+% small,
+% tiny,
+% tikz,
+% tikzpicture,
+% tikzset,
+% },
+% classoffset=4,% TikZ keys
+% keywordstyle=\color{red},
+% morekeywords={
+% circle,
+% fill,
+% overlay,
+% picture,
+% radius,
+% remember,
+% style,
+% },
+ classoffset=5, % commands that we want to hide :)
+ keywordstyle=\color{LightSkyBlue!10},
+ morekeywords={
+ bigskip,
+ medskip,
+ newline,
+ par,
+ qquad,
+ quad,
+ smallskip,
+ },
+}
+
+\newcounter{examples}
+\numberwithin{examples}{subsection}
+\newcommand\examplesautorefname{Example}
+
+\NewTCBListing[use counter=examples, number within=subsection,%crefname={Example}{Examples}
+]{example}{ !O{} }{%
+ enhanced,
+ skin=bicolor,
+ colframe=RoyalBlue!70,
+ colbacklower=OldLace,
+ colback=LightSkyBlue!10,
+ colbacktitle=RoyalBlue!70,
+ attach boxed title to top right={xshift=0mm,yshift=-3.1mm},
+ boxed title style={
+ size=small,
+ arc=1mm,
+ bottom=-1mm,
+ sharp corners=northwest,
+ sharp corners=southeast,
+ },
+ title={\tiny\thetcbcounter},
+ sharp corners=northeast,
+ parbox=false,
+ lefthand width=0.34\textwidth,
+ listing style=atableau,
+ parbox=false,
+ parskip=4mm
+ sidebyside,
+ sidebyside align=top seam,
+ sidebyside gap=2mm,
+ text and listing,
+ text outside listing,
+ boxsep = 0pt,
+ left=0mm,
+ #1
+}
+
+\let\thetcolorboxnumber\relax
+
+\DeclareTCBListing[use counter=examples, number within=subsection,%crefname={Example}{Examples}
+]{Example}{ !O{} }{%
+ enhanced,
+ skin=bicolor,
+ colframe=RoyalBlue!50,
+ colbacklower=OldLace,
+ colback=LightSkyBlue!20,
+ colbacktitle=RoyalBlue!70,
+ breakable,
+ width=\textwidth,
+ attach boxed title to top right={xshift=0mm,yshift=-3.1mm},
+ boxed title style={
+ size=small,
+ arc=1mm,
+ bottom=-1mm,
+ sharp corners=northwest,
+ sharp corners=southeast,
+ },
+ title={\tiny\thetcbcounter},
+ sharp corners=northeast,
+ parbox=false,
+ listing style=atableau,
+ text and listing,
+ listing above text,
+ %text outside listing,
+ center lower,
+ #1
+}
+
+% ---------------------------------------------------------------------------
+\NewDocumentCommand\set{ O{} >{\SplitArgument{1}{|}}m }{#1\{\,\SetContents{#1}#2\,#1\}}
+\NewDocumentCommand\SetContents{mmm}{\IfNoValueTF{#3}{#2}{#2\,#1|\,\mathopen{}#3}}
+
+\newcommand\T{\mathsf{t}}
+\newcommand\blam{{\bm{\lambda}}}
+
+% ---------------------------------------------------------------------------
+% manual title
+\makeatletter
+\author{Andrew Mathas}
+\usepackage{tikz}
+\usetikzlibrary{
+ backgrounds,
+ decorations.pathmorphing,
+ matrix,
+ patterns,
+ shadows.blur,
+ shapes.geometric,
+}
+\tikzset{
+ shadowed/.style={
+ blur shadow={shadow blur steps=5},
+ bottom color=RoyalBlue,
+ draw=NavyBlue!70,
+ shade,
+ font=\normalfont\Huge\bfseries\scshape,
+ %rounded corners=8pt,
+ top color=LightSkyBlue!30,
+ },
+ boxes/.style={draw=RoyalBlue,
+ fill=AliceBlue,
+ font=\sffamily\small,
+ inner sep=5pt,
+ rectangle,
+ rounded corners=8pt,
+ text=MidnightBlue,
+ }
+}
+
+% define the heading as a command because it contains \atableau@version
+\newcommand\aTableauHeader{%
+ \begin{center}
+ \begin{tikzpicture}
+ \aTabset{border=false}
+ \draw[shadowed, rounded corners](30mm,0) rectangle node[white]{ } (\paperwidth-30mm,22mm);
+ \begin{scope}[shift={(2.6,-0.2)}]
+ \aTabset{scale=0.5, ribbon style={fill=LightSkyBlue!10}, inner wall=MidnightBlue}
+ \Diagram(4,2) [ribbons={11,12,13,21,23,31,32,33,41,43,51,53}]{} % A
+ \Diagram(5,2) [ribbons={11,12,13,22,32,42,52}]{} % T
+ \Diagram(6,2) [ribbons={11,12,13,21,23,31,32,33,41,43,51,53}]{} % A
+ \Diagram(7,2) [ribbons={11,12,13,21,23,31,32,33,41,43,51,52,53}]{} % B
+ \Diagram(8,2) [ribbons={11,21,31,41,51,52,53}]{} % L
+ \Diagram(9,2) [ribbons={11,12,13,21,31,32,33,41,51,52,53}]{} % E
+ \Diagram(10,2)[ribbons={11,12,13,21,23,31,32,33,41,43,51,53}]{} % A
+ \Diagram(11,2)[ribbons={11,13,21,23,31,33,41,43,51,52,53}]{} % U
+ \end{scope}
+ \node[anchor=west,boxes] at (4cm,0cm) {Andrew Mathas};
+ \node[anchor=east,boxes] at (\paperwidth-4cm,0) {Version \atableau@version};
+ \end{tikzpicture}
+ \end{center}
+}
+
+% ----------------------------------------------------------------------
+\hypersetup{
+ pdfcreator={ Generated by pdfLaTeX },
+ pdfinfo={
+ Author ={ Andrew Mathas },
+ Keywords={ Algebraic combinatorics, representation theory, abacus, Young diagram, tableau, symmetric groups },
+ License ={ LaTeX Project Public License v1.3c or later },
+ Subject ={ LaTeXing tableaux and friends },
+ Title ={ ATableau - \atableau@version }
+ },
+ colorlinks=true,
+ linkcolor=blue,
+ urlcolor=MediumBlue,
+}
+
+\makeatother
+
+% ----------------------------------------------------------------------
+\numberwithin{equation}{subsection}
+\def\equationautorefname~#1\null{(#1)\null}
+\renewcommand\sectionautorefname{Chapter}
+\renewcommand\subsectionautorefname{Section}
+\def\subsubsectionautorefname~#1\null{\S#1\null}
+
+\begin{document}
+
+ % --------------------------------------------------------------
+ % title page
+ \begin{center}
+
+ \aTableauHeader
+
+ \begin{quote}
+ A \LaTeX\ package for symmetric group combinatorics, including Young
+ diagrams, tableaux, tabloids, skew tableaux, shifted tableaux, ribbon
+ tableaux, multitableaux, abacuses.
+ \end{quote}
+
+ \begin{minipage}{0.75\textwidth}
+ \tableofcontents
+ \end{minipage}
+
+ \aTabset{scale=0.6}
+ \tikzset{
+ B/.style={fill=blue,text=white},
+ G/.style={fill=ForestGreen,text=yellow},
+ R/.style={fill=red,text=white},
+ Y/.style={fill=yellow,text=ForestGreen},
+ b/.style={ball color=blue},
+ r/.style={ball color=red},
+ w/.style={ball color=white},
+ }
+ \begin{tikzpicture}
+ \Tableau(0,0){[R]1[B]2,[G]3,[Y]4} \quad
+ \Tableau(2.25,1)[australian]{[R]1[B]2,[G]3,[Y]4} \quad
+ \Tableau(3.5,1.75)[skew={0,2}]{[Y]4[G]3[R]1,[B]2} \quad
+ \Tableau(6,0)[ukrainian,skew={0,1^2}]{[B]2[R]1,[G]3,[Y]4} \quad
+ \Tableau(7.5,-1)[french,skew={0,1^2}]{[B]2[R]1,[G]3,[Y]4} \quad
+ \Tableau(6.0,-2.25)[ukrainian]{[R]1[G]3[Y]4,[B]2} \quad
+ \Tableau(3.5,-3.0)[french]{[R]1[G]3[Y]4,[B]2} \quad
+ \Tableau(2,-1)[australian]{[B]2,[R]1[G]3[Y]4} \quad
+ \Abacus(4,0.5)[abacus ends=--,scale=1.4]{3}{[b]9,[w]8,[r]8,[b]6,[b]6,[r]2,[b]1}
+ \end{tikzpicture}
+
+ \end{center}
+
+ % --------------------------------------------------------------
+ \section{Introduction}
+
+ The package provides commands for drawing common objects in algebraic
+ combinatorics and representation theory, together with styling options
+ and a key-value interface for additional customization. Under the
+ hood, everything is drawn using \TikZ (and \LaTeX3). These commands
+ can be used either as standalone commands or as part of a
+ \keyword{tikzpicture} environment. This package started as code for
+ drawing the diagrams that I need in my own research. It is written as
+ flexibly as possible in the hope that it will draw the diagrams that
+ others need.
+
+ For the impatient, here is a basic example that shows how to use the
+ two main commands provided by the \aTableau package:
+
+ \begin{example}
+ \Abacus{4}{4^3,2,1^2,0} \qquad
+ \Tableau{1239,456{10},78}
+ \end{example}
+
+ If you already know what tableaux and abacuses are, then you can
+ probably work out the (basic) syntax of these two commands from this
+ example and start using the package. If you do not know what tableaux
+ and abacuses are, then you probably don't need this package! In any
+ case, you will not find the precise mathematical definitions of these
+ objects in this manual, so please consult textbooks like
+ \cite{Mathas:ULect,Macdonald} if you need them. For more advanced
+ usage, such as adding styling, I recommend skimming through the
+ manual, and looking at the many examples. \autoref{S:keys} gives
+ quick summary of all \aTableau commands and their options.
+
+ The \aTableau commands are intended to be easy to use and easy to
+ customise. For example, partitions can be entered either as a (weakly
+ decreasing list of non-negative) integers, or using exponential
+ notation, or as a sequence of beta numbers (for the \keyword{\Abacus}
+ command), and tableaux are entered as comma-separated words. The
+ commands support the main conventions for drawing tableaux and
+ diagrams.
+
+ By way of example, the following table shows how to draw a
+ Young diagram of shape $\lambda=(4,3^2,2)$ using the four tableaux
+ conventions supported by \aTableau:
+
+ \begin{center}
+ \aTabset{align=centre}
+ \begin{longtable}{lp{0.6\textwidth}l} \toprule % longtable allows footnotes
+ \textcolor{aTableauMain}{Convention} &\textcolor{aTableauMain}{\aTableau command} & \textcolor{aTableauMain}{Picture} \\ \midrule
+ English & \keyword{\Tableau[english]{1234,567,89{10},{11}{12}}}\newline(the default)
+ & \Tableau{1234,567,89{10},{11}{12}}\\[10mm]
+ French & \keyword{\Tableau[french]{1234,567,89{10},{11}{12}}}
+ & \Tableau[french]{1234,567,89{10},{11}{12}}\\[10mm]
+ Ukrainian
+ \footnote{Some authors call this the Russian convention. The \option{russian}(ukrainian) key may also be used.}
+ & \keyword{\Tableau[ukrainian]{1234,567,89{10},{11}{12}}}
+ & \Tableau[ukrainian]{1234,567,89{10},{11}{12}}\\[10mm]
+ Australian
+ \footnote{I have not seen a name for this convention in the literature. Calling this the \textit{Australian convention} seems apt.}
+ & \keyword{\Tableau[australian]{1234,567,89{10},{11}{12}}}
+ & \Tableau[australian]{1234,567,89{10},{11}{12}} \\[10mm]
+ \bottomrule
+ \end{longtable}
+ \index{english@English}
+ \index{french@French}
+ \index{ukrainian@Ukrainian}
+ \index{australian@Australian}
+ \end{center}
+
+ This table shows how the commands provided by \aTableau work: there
+ are basic commands for drawing pictures, and these pictures can be
+ embellished using optional arguments, which use a key-value interface.
+
+ The different conventions for diagrams, and tableaux, are listed in
+ order of (my perception of) their popularity in the literature. By
+ default, the \textit{English} convention is used, so we can omit
+ \emph{english}:
+ \begin{example}[lefthand width=0.4\textwidth]
+ \Tableau{1234,567,89{10},{11}{12}}
+ \end{example}
+ for the first tableau in the table. These four conventions are used
+ in exactly the same way with the \keyword{\Diagram} command:
+ \begin{example}[lefthand width=0.4\textwidth]
+ \Diagram{4,3,3,1} \qquad
+ \Diagram[ukrainian]{4,3^2,1}
+ \end{example}
+ This example shows that partitions can either be typed out in full, as
+ a comma-separated list of positive integers, or using exponential
+ notation, which is usually shorter and easier to read.
+
+ To use the package, add the following line to your document preamble:
+
+ \indexcmd{usepackage}
+ \begin{quote}
+ \keyword{\usepackage[options]{atableau}}
+ \end{quote}
+
+ Here, the \textit{options} is an optional comma-separated list of
+ \aTableau options, or keys. We describe the possible options below.
+ For example, to make the tableaux and Young diagrams commands use the
+ \option{French} convention, by default, you could write:
+
+ \begin{quote}
+ \keyword{\usepackage[french]{atableau}}
+ \end{quote}
+
+ You can change the default options at any point in your document using
+ the \keyword{\aTabset} command, and you can change them for any
+ diagram.
+ \indexcmd{aTabset}
+
+ Each of the \aTableau commands is designed to be easy to use, easy to read,
+ and easy to customise. Each command accepts an optional list
+ of key-value options that modify and embellish the diagrams. In addition, optional
+ styling can be applied to entries of a tableau and the beads in an
+ abacus. Each command can be used as a standalone object in a
+ document, or they can be incorporated into a larger
+ \keyword{tikzpicture} environment, making it possible to use
+ these commands to create more complicated pictures.
+
+ The general syntax of an \aTableau command is:
+ \begin{quote}
+ \keyword{\Command (x,y) [options] {...specifications...}}
+ \end{quote}
+
+ \index{Cartesian coordinates}
+ The $(x,y)$-Cartesian coordinates%
+ \footnote{Currently, only Cartesian coordinates are supported. For
+ example, it is not possible to use named or polar coordinates.}
+ are optional, being necessary if (and only if), the diagram is part of
+ a~\keyword{tikzpicture} environment. See \autoref{SS:coordinates} and
+ \autoref{SS:abcoordinates} for more detail about how to use these coordinates
+ for tableaux and abacuses, respectively.
+
+ The key-value \emph{options}, or \emph{keys}, control the style and
+ appearance of the final diagram. The keys are optional and are
+ described in detail below, with examples. This section emphasises only
+ some of these options together with the fact that every key can be set
+ ``globally'' (inside the current \LaTeX\ group), by using
+ \keyword{\aTabset{...options...}}, or ``locally'', for the current
+ picture. As discussed already, the default options for the entire
+ document can also be set via
+ \keyword{\usepackage[options]{atableau}}.\indexcmd{aTabset}
+
+ Many of the \aTableau options are specific to the particular diagrams
+ being drawn. The full list of the \aTableau commands and their options
+ is given in \autoref{S:keys}, with the following sections giving more
+ details and many examples. The keys that are common to all
+ \aTableau commands are:
+
+ \begin{options}
+ \item[align]\index{align}
+ Sets the baseline for vertically aligning diagrams. The options
+ are \keyword{align=top}, \keyword{align=center}, and
+ \keyword{align=bottom}, which aligns the baseline of the diagram
+ with the top, centre or bottom of the surrounding objects,
+ respectively. By default, all \aTableau pictures are centered.
+
+ \item[math entries, text entries]\index{math entries}\index{text entries}
+ Determines whether tableaux entries, and bead labels, are typeset as
+ mathematics or text.
+
+ \item[name]\index{name}
+ Set the prefix for the \TikZ \emph{named anchors} for the boxes and
+ beads in \aTableau diagrams.
+
+ \item[scale, xscale, yscale, script, scriptscript]
+ \index{scale}\index{xscale}\index{yscale}\index{script}\index{scriptscript}
+ Use \option{scale} to rescale all \aTableau diagrams. Use
+ \option{xscale} to rescale in the $x$-direction and \option{yscale}
+ to rescale in the $y$-direction. The \option{script} and
+ \option{scriptscript} keys can be used to fine-tune the size of
+ \aTableau commands when used as subscripts (rare) and subsubscripts
+ (unlikely).
+
+ \item[styles]\index{styles}
+ A short-hand for defining single-use \TikZ-styles for the current
+ picture.
+
+ \item[tikzpicture]\index{tikzpicture}
+ When used without Cartesian coordinates, all \aTableau commands are
+ implicitly drawn inside a \keyword{tikzpicture} environment. Use
+ \option{tikzpicture=keys} to set the optional argument of this
+ environment: \keyword{\begin{tikzpicture}[ keys ]...\end{tikzpicture}}.
+
+ \item[tikz before, tikz after]\index{tikz before}\index{tikz after}
+ Use the \option{tikz before} and \option{tikz after} keys to inject
+ \TikZ code into the \keyword{tikzpicture} environment, before and
+ after the picture drawn by \aTableau.
+
+ \end{options}
+
+ With boolean options, which are set to \textsf{true} or
+ \textsf{false}, the value can typically be omitted. For example,
+ \option{border} is equivalent to \option{border=true} and to
+ \option{no border=false}. The \option{no border} key is inverse to
+ \option{border}, so \option{no border} is equivalent to \option{no
+ border=true}, and to \option{border=false}.
+
+ \index{American dialect}
+ For all keys, American spelling variations are tolerated. For example, you
+ can use \emph{center} and \emph{color} instead of the correct
+ spellings of \emph{centre} and \emph{colour}, respectively.
+
+ \begin{warning}
+ Unlike the egalitarian \aTableau settings, \TikZ-style settings
+ \emph{do not} countenance English spelling of the English language!
+ \end{warning}
+
+ The next example contrasts using the \keyword{\Diagram} command both
+ outside and inside a \keyword{tikzpicture} environment. More
+ explicitly, the second \keyword{\Diagram} command has Cartesian
+ coordinates because it is being used inside a \keyword{tikzpicture}
+ environment. Otherwise, these two \keyword{\Diagram} commands are
+ identical, except that the second diagram is embellished with labels
+ that are drawn by the other commands in the \keyword{tikzpicture}
+ environment.
+
+ \begin{Example}
+ % \usetikzlibrary{patterns}
+ \tikzset{
+ B/.style={pattern=north east lines, pattern color=blue},
+ G/.style={pattern=north west lines, pattern color=ForestGreen},
+ }
+ \Diagram[ribbons={(G)16ccccrrr, (B)16crrcccr}]{6,5^2,2} % outside tikzpicture
+ \qquad \qquad
+ \begin{tikzpicture} % inside tikzpicture with labels
+ \Diagram(0,0)[ribbons={(G)16ccccrrr, (B)16crrcccr}]{6,5^2,2}
+ % add the labels
+ \draw[->](1.5, 0.5)node[right]{$\alpha=(1,2)$} to [out=180,in=90] (A-1-2.base);
+ \draw[->](1.5,-2.5)node[right]{$f_\alpha=(4,2)$} to [out=180,in=270] (A-4-2.base);
+ \draw[red,<->]([xshift=-1mm]A-1-1.south west)
+ --node[rotate=90,above]{$l_\alpha=3$}([xshift=-1mm]A-4-1.south west);
+ \end{tikzpicture}
+ \end{Example}
+
+ The first diagram shows that most of the right-hand diagram is drawn
+ by the~\keyword{\Diagram} command, even though most of the commands in
+ the example are \TikZ commands. In particular, the shading of the
+ boxes in the \emph{$(1,2)$-hook}, and the \emph{$(1,2)$-rim hook}, is
+ done by the \option{ribbons} key. (In fact, the right-hand picture
+ could be drawn without using a \keyword{tikzpicture} environment by
+ using the \option{tikz after} key to add the three
+ \keyword{\draw}-commands.)
+
+ \begin{warning}
+ Unlike the \TikZ-commands, you should \emph{not} put a semicolon
+ after an \aTableau-command when it is used inside a
+ \keyword{tikzpicture} environment. If you accidentally add a
+ semicolon then, most of the time it will not cause any harm and
+ \TikZ will just give you a warning.
+ \end{warning}
+
+ The top of the last example defines two \TikZ-styles, \textsf{B} and
+ \text{G}, which add the \textsf{b}lue and \textsf{g}reen coloured
+ hatchings of the two hooks. Inside the \keyword{tikzpicture}
+ environment, the Young diagram is placed at position $(0,0)$ by the
+ \keyword{\Diagram} command. The three \keyword{\draw} commands are
+ used to add the three labelled arrows to the picture. Please consult
+ the very readable \TikZ manual for more details on the \TikZ-commands
+ in this example.
+
+ From the viewpoint of \aTableau, the most important point of the last
+ example is that the first \keyword{\Diagram} command is a standalone
+ diagram, whereas the second one is part of a \keyword{tikzpicture}
+ environment because it was given the Cartesian coordinate $(0,0)$. The
+ second important point is that this example uses four \emph{named
+ coordinates}: (\textsf{A-1-1}), (\textsf{A-1-2}), (\textsf{A-4-1}),
+ and (\textsf{A-4-2}). When \aTableau draws a tableau, or a diagram, it
+ creates a \TikZ named coordinate (\textsf{A-r-c}) for every box in the
+ diagram, where (\textsf{A-r-c}) is the box in row~\textsf{r} and
+ column~\textsf{c}. These named coordinates, or anchors, are
+ \textit{only} defined for the boxes in the tableau. Giving finer
+ control, the following standard \TikZ \textit{anchors} are available,
+ depending on which tableaux convention you are using:
+
+ \begin{equation}\label{E:NodeNames}
+ \begin{tikzpicture}[every node/.style={font=\tiny, text=gray}]
+ \Diagram(0,0)[scale=4]{1}
+ \node[label={above:(A-r-c)}] at (A-1-1){$\color{red}\bullet$};
+ \node[label={above:(A-r-c.north)}] at (A-1-1.north){$\color{red}\bullet$};
+ \node[label={below:(A-r-c.south)}] at (A-1-1.south){$\color{red}\bullet$};
+ \node[label={right:(A-r-c.east)}] at (A-1-1.east){$\color{red}\bullet$};
+ \node[label={left:(A-r-c.west)}] at (A-1-1.west){$\color{red}\bullet$};
+ \node[label={above right:(A-r-c.north east)}] at (A-1-1.north east){$\color{red}\bullet$};
+ \node[label={above left:(A-r-c.north west)}] at (A-1-1.north west){$\color{red}\bullet$};
+ \node[label={below right:(A-r-c.south east)}] at (A-1-1.south east){$\color{red}\bullet$};
+ \node[label={below left:(A-r-c.south west)}] at (A-1-1.south west){$\color{red}\bullet$};
+ \end{tikzpicture}
+ \qquad
+ \begin{tikzpicture}[every node/.style={font=\tiny, text=gray}]
+ \Diagram(0,0)[ukrainian, scale=4]{1}
+ \node[label={above:(A-r-c)}] at (A-1-1){$\color{red}\bullet$};
+ \node[label={above:(A-r-c.north)}] at (A-1-1.north){$\color{red}\bullet$};
+ \node[label={below:(A-r-c.south)}] at (A-1-1.south){$\color{red}\bullet$};
+ \node[label={right:(A-r-c.east)}] at (A-1-1.east){$\color{red}\bullet$};
+ \node[label={left:(A-r-c.west)}] at (A-1-1.west){$\color{red}\bullet$};
+ \node[label={above right:(A-r-c.north east)}] at (A-1-1.north east){$\color{red}\bullet$};
+ \node[label={above left:(A-r-c.north west)}] at (A-1-1.north west){$\color{red}\bullet$};
+ \node[label={below right:(A-r-c.south east)}] at (A-1-1.south east){$\color{red}\bullet$};
+ \node[label={below left:(A-r-c.south west)}] at (A-1-1.south west){$\color{red}\bullet$};
+ \end{tikzpicture}
+ \end{equation}
+
+ You can change the prefix \textsf{A} in these anchors using the
+ \option{name} key. Similar anchors are created for abacus beads.
+ These \textit{anchors} are a standard part of \TikZ. If you change
+ the shape of the node, then the available anchors may change; for more
+ information see the \TikZ manual.
+
+% The previous example also shows that the \keyword{\Diagram} command
+% accepts a \option{ribbons} option, which adds one or more
+% \textit{ribbons} to the diagram. Both the ribbon and the individual
+% boxes in the ribbon can be given \TikZ styling; see
+% \autoref{S:RibbonTableaux}. All of the options to these commands are
+% described in the following sections.
+
+ In the example above, the Cartesian coordinate $(0,0)$ is necessary
+ because the \keyword{\Diagram} command is used inside a
+ \keyword{tikzpicture} environment, but the choice of coordinate is not
+ important in the sense that changing the coordinate will not change
+ the picture. Cartesian coordinates become more meaningful when the
+ \keyword{tikzpicture} environment has more components. In the next
+ example, the key \option{name=B} makes the named
+ coordinates for the second diagram take the form (\textsf{B-r-c}),
+ instead of the default node names (\textsf{A-r-c}), which are used in
+ the first diagram. This allows us to draw (wavy) lines between boxes
+ in the two tableaux.
+
+ \begin{example}[lefthand width=0.14\textwidth, sidebyside gap=0mm,label={Ex:ABnames}]
+ % \usetikzlibrary{decorations.pathmorphing}
+ \begin{tikzpicture}[wave/.style={thick,red,->,decorate,decoration=snake}]
+ \aTabset{ribbon style={fill=blue!20, opacity=0.4}}
+ \Diagram(0,0)[e=2,entries=residues,ribbons={13crc}]{3,2}
+ \Diagram(0,-2.5)[e=2,entries=residues,ribbons={12rcr},name=B]{2^2,1}
+ \draw[wave]([shift={(0,-0.05)}]A-2-1.south east)
+ --([shift={(0,0.05)}]B-1-1.north east);
+ \end{tikzpicture}
+ \end{example}
+
+ In this example, the entries in the two tableaux were added by the key
+ \option{entries=residues}, which automatically puts the
+ \option{e}-residue into each of the boxes in the two tableaux. The
+ shading is done by the \option{ribbons} commands. Notice that
+ \option{ribbon style}, which sets the \TikZ-style of the ribbons,
+ includes \keyword{opacity=0.4}. This necessary because the ribbons
+ are drawn \textit{after} the tableau entries; see \autoref{SS:order}.
+ Alternatively, these tableau entries could be included in the ribbon
+ specifications, as described in \autoref{S:RibbonTableaux}.
+
+ The final example in the introduction uses \keyword{\ShiftedTableau}
+ inside a \emph{matrix of nodes}:
+
+ \begin{Example}
+ % \usetikzlibrary{matrix}
+ \begin{tikzpicture}[scale=0.8, arr/.style={->,SteelBlue, thick}]
+ \matrix (M)[matrix of nodes,row sep=4mm,column sep=4mm]{
+ & & & \ShiftedTableau{1234,567} \\
+ & & \ShiftedTableau{1235,467}
+ & & \ShiftedTableau{1243,567}\\
+ & \ShiftedTableau{1236,457}
+ & & \ShiftedTableau{1245,367}
+ & & \ShiftedTableau{1253,467}\\
+ \ShiftedTableau{1237,456}
+ & & \ShiftedTableau{1246,357}
+ & & \ShiftedTableau{1254,367}\\
+ & \ShiftedTableau{1247,356}\\
+ };
+ \draw[arr](M-1-4)--node[above]{$\sigma_4$}(M-2-3);
+ \draw[arr](M-1-4)--node[above]{$\sigma_3$}(M-2-5);
+ \draw[arr](M-2-3)--node[above]{$\sigma_5$}(M-3-2);
+ \draw[arr](M-2-3)--node[above]{$\sigma_3$}(M-3-4);
+ \draw[arr](M-2-5)--node[above]{$\sigma_4$}(M-3-6);
+ \draw[arr](M-3-2)--node[above]{$\sigma_6$}(M-4-1);
+ \draw[arr](M-3-2)--node[above]{$\sigma_3$}(M-4-3);
+ \draw[arr](M-3-4)--node[above]{$\sigma_5$}(M-4-3);
+ \draw[arr](M-3-4)--node[above]{$\sigma_4$}(M-4-5);
+ \draw[arr](M-3-6)--node[above]{$\sigma_3$}(M-4-5);
+ \draw[arr](M-4-1)--node[above]{$\sigma_3$}(M-5-2);
+ \draw[arr](M-4-3)--node[above]{$\sigma_6$}(M-5-2);
+ \end{tikzpicture}
+ \end{Example}
+
+ Notice that even though the \keyword{\SkewTableau} commands are being
+ used inside a \keyword{tikzpicture} environment they do not need
+ coordinates because the skew tableaux are being placed by the \TikZ
+ \keyword{\matrix} command. That is, the \keyword{\SkewTableau}
+ commands are not explicit components of the \keyword{tikzpicture}
+ environment as hey are all (implicitly) inside \TikZ-nodes.
+
+ The following sections describe the commands defined by the \aTableau
+ package and how to use them. We start with the \keyword{\Tableau}
+ command because all of the diagram and tableau commands, except for
+ \keyword{\RibbonTableau}, are derived from \keyword{\Tableau}.
+
+
+ \begin{warning}
+ The \aTableau package relies heavily on \ctan{LaTeX3}, so it
+ requires an update-to-date version of \LaTeX. You may need to update
+ your \LaTeX\ installation if it is older than \TeX Live 2024.
+ \end{warning}
+
+ % --------------------------------------------------------------
+ \section{Tableaux and Young diagrams}
+
+ \emph{Partitions} are weakly decreasing sequences of non-negative
+ integers. They are fundamental objects in algebraic combinatorics
+ and representation theory.\index{partition} Rather than working
+ with sequences of integers, it is often useful to visualise
+ partitions as Young \emph{diagrams}, which are arrays of
+ \emph{boxes}, or \emph{nodes}, in the plane\footnote{In this manual,
+ we normally refer to the entries of tableaux and diagrams as
+ \textit{boxes}, rather than \textit{nodes}. This is to avoid any
+ ambiguity with \TikZ-nodes.}. A \emph{tableau} is a (Young) diagram
+ where the boxes are labelled using some alphabet. Equivalently, a
+ diagram is a tableau with empty labels.
+ \index{young diagram@Young diagram|see{diagram}}
+ \index{diagram}
+ \index{tableau}
+ \index{box}
+ \index{node}
+ \index{node|see{box}}
+ \index{exponential notation}
+ \index{partition!exponential notation}
+
+ For example, $\lambda=(4,3,3,2,0,0,\dots)$ is a partition of $12$,
+ since the entries sum to~$12$. It is customary to omit the zeros
+ when writing partitions and to use exponents for repeated parts, so
+ we can write this partition in \emph{exponential notation} as
+ $\lambda=(4,3^2,2)$. Many authors identity a
+ partition~$\lambda=(\lambda_1,\lambda_2,\dots)$ with its
+ \emph{diagram}, which is the set $[\lambda] = \set{(r,c)|1\le
+ c\le\lambda_r\text{ for }r\ge1}$. When using the \emph{English
+ convention}, the diagram of~$\lambda$ is visualised as a left
+ justified array of boxes in the plane, where the first row has~$4$
+ boxes, the next two lower rows have~$3$ boxes and the last row
+ has~$2$ boxes. The \emph{shape} of a diagram is the partition that
+ gives the number of boxes in each row. Diagrams and tableaux drawn
+ using the \emph{French} convention are given by reflecting in a
+ horizontal line above the diagrams, whereas the \emph{Ukrainian} and
+ \emph{Australian} conventions are given by appropriately rotating
+ these diagrams. All of these conventions are used in the literature,
+ with some papers using more than one convention.
+
+ % --------------------------------------------------------------
+ \subsection{Tableaux}
+ \indexcmd{Tableau}
+ \label{S:Tableau}
+ This section describes the \keyword{\Tableau} command, which draws
+ tableaux or labelled diagrams. The syntax of this command is:
+
+ \keyword{\Tableau (x,y) [options] {tableau entries}}
+
+ where:
+
+ \begin{options}
+ \item[*$(x,y)$]\index{xy@$(x,y)$} The Cartesian coordinates $(x,y)$
+ are needed if, and only if, the tableau is a component of a
+ \keyword{tikzpicture} environment.
+ \item[*options] Optional arguments. Described, with examples, below.
+ \item[*tableau entries]\index{tableau entries} The
+ \keyword{tableau entries} are given as a comma-separated list, with commas
+ separating rows and each \textit{token}, or braced-group of
+ tokens, being in a separate column. As we explain below, each
+ tableau entry can be prefixed by (optional) \TikZ-styling
+ specifications.
+ \end{options}
+
+ We show by example how to use the \keyword{\Tableau} command,
+ starting with basic usage and finishing with style. Inside
+ \keyword{\Tableau}\!, the rows are separated by commas, with the
+ columns given by the ``letters'' in the word for each row:
+
+ \begin{example}
+ \Tableau{ 1234, 56, 7, 8 } \qquad
+ \Tableau{ \alpha\gamma\delta q,
+ xy\eta,
+ \lambda\mu,
+ \pi\sum }
+ \end{example}
+
+ The tableau specifications can be put on a single line, without any
+ spaces. Alternatively, as shown here, spaces and line breaks can be
+ added to improve readability. The one restriction is that you cannot
+ have blank lines inside a \keyword{\Tableau} command. As this example
+ suggests, by default, the entries in a tableau are typeset in
+ mathematics-mode, but this can be changed using the
+ \option{text entries} key, which is described below.
+
+ As the examples above show, the tableau entries can be individual
+ characters, or they can be \TeX\ commands. Tableaux frequently contain
+ entries that are not single characters, or given by commands. Such
+ entries can be added to a tableau by enclosing them in braces:
+
+ \begin{example}
+ \Tableau{ 13{10}{11}{2x}, 2{x^2}, {r_1} }
+ \end{example}
+
+ % There is one additional caveat for braced-entries: any
+ % \textit{singleton} braced entry \keyword{{...}} in a row needs to be
+ % \textit{double-braced}. Double-bracing is only necessary when you have
+ % a row that has only one column, and you have a multi-letter column
+ % entry. The need for double-bracing is a consequence of how \LaTeX3
+ % detects braced commas in comma-separated lists.
+ % \index{tableau entries!double-braced}
+ % \index{double-braced}
+
+ % The following example shows the difference between single and
+ % double-bracing for tableau entries.
+ % \index{tableau entries!double-braced}
+
+ % \begin{example}
+ % \Tableau{ 1345, 8{10}, {11}, {12} } \qquad
+ % \Tableau{ 1345, 8{10}, {{11}}, {{12}} }
+ % \end{example}
+
+ % The $10$'s in these tableaux do not need to be doubled-braced because
+ % they appear in a row of length~$2$, whichi s greater than~$1$!. In
+ % contrast, because they are not doubled-braced, the~$11$ and~$12$ in
+ % the first tableau are both treated as being two characters in
+ % different columns in the first tableau. In the second tableau,
+ % the~$11$ and~$12$ each appear in a separate column because they are
+ % double-braced.
+
+ % --------------------------------------------------------------
+ \subsubsection{Adding style}
+ \index{star}
+ \index{*|see{star}}
+ \index{tableau entries!style}
+ \index{tableau entries!star}
+
+ The \aTableau package provides several different ways to add \TikZ
+ style specifications to the boxes in diagrams and tableaux. This is
+ done by adding style prefixes to the tableau entries. To take
+ advantage of these styles you need to have at least rudimentary
+ knowledge of \TikZ-styling. The examples in this manual might be
+ enough to get you started as they give a good indication of what is
+ possible. For anything more exotic, please consult the \TikZ manual.
+
+ The simplest way to change the style of an entry in a tableau is to
+ add a $*$-prefix to the entry:
+
+ \begin{example}
+ \Tableau{ 1*2*3*4*5, 6*789, {10}*{11}{12}, {13} }
+ \end{example}
+
+ In this tableau, there is an asterisk before each of the entries $2$,
+ $3$, $4$, $5$ and $8$, which gives the corresponding boxes the
+ \option{star style}. The $*$-entries are given the
+ \TikZ-styling, which is \keyword{fill=}\aTableauColour{StarStyle} by default. You can
+ change the default $*$-style using the \option{star style} key:
+
+ \begin{example}
+ \Tableau[star style={fill=red!20,draw=red,thick}]
+ { 1*2*3*4*5, 6*789, {10}*{11}{12}, {13} }
+ \end{example}
+
+ Note that the $*$-styling overrides the default styling of the
+ surrounding boxes. This is because the boxes with the default styling
+ are placed first, in the order that they are entered, after which the
+ boxes with custom styles are placed.
+
+ The $*$-syntax is a quick shorthand for adding emphasis to some boxes
+ in a tableau, but all of the $*$-entries are given the same style.
+ It is possible to give every box in the tableau different styles by
+ putting \TikZ-styling specifications inside square brackets,
+ \keyword{[...]}, before the corresponding letter in the tableau
+ specification. You can mix the $*$-syntax and the
+ \keyword{[...]}-style syntax for different entries, although only one
+ of these style settings can be applied to any given box.
+
+ \begin{example}
+ \Tableau[french]{
+ 1 [blue!20]2 [circle]3 [red]4 [cyan]5,
+ 6 *7 8 9,
+ {10} *{11} {12},
+ {13} }
+ \end{example}
+
+ It is not necessary to add spaces between the entries in the way that
+ this example does. This is done only to make it clearer how the
+ style specifications are applied to the different entries in the tableau.
+
+ Omitting some technicalities, each box in a tableau is constructed as
+ a \TikZ node, so any \TikZ-styling specifications for a node can be
+ used. This example shows that some care is needed when changing the
+ style because simply giving a colour changes both the colour used to
+ \textit{fill} the box and the \textit{text colour}, which is why some
+ of tableau entries in the last example appear to be blank. If you are
+ already familiar with \TikZ then you probably already know what to do.
+ If not, then here is a short list of useful style specifications for
+ \TikZ nodes:
+ \begin{center}\index{fill}\index{text}\index{draw}\index{font}
+ \begin{tabular}{ll}\toprule
+ Style & Meaning \\\midrule
+ \keyword{draw}$=\langle\text{colour}\rangle$
+ & Sets the boundary colour of the node\\
+ \keyword{fill}$=\langle\text{colour}\rangle$
+ & Sets the fill, or background, colour of the node\\
+ \keyword{font}$=\langle\text{font commands}\rangle$
+ & Sets the font \\
+ \keyword{opacity}$=\langle\text{value}\rangle$
+ & Sets both the drawing and filling opacity to $=\langle\text{value}\rangle$\\
+ \keyword{text}$=\langle\text{colour}\rangle$
+ & Sets the text colour in the node \\
+ \bottomrule
+ \end{tabular}
+ \end{center}
+ In the style settings, any valid \LaTeX\ colour name can be used; see, for
+ example, the \ctan{xcolor} manual. In addition, the style specifications
+ \keyword{thin}\!,
+ \keyword{thick}\!,
+ \keyword{very thick}\!,
+ \keyword{ultra thick}\!,
+ \keyword{dashed}\!,
+ \keyword{dotted}\!, $\dots$.
+ change the border thickness, and its properties.
+ \autoref{SS:TableauOptions} below describes how to use these options
+ to customise the tableau style.
+
+ If you want to apply ``complicated'' style settings, such as
+ \keyword{draw=cyan,ultra thick}, which consists of a comma-separated
+ list of $\TikZ-$style settings, then the entire style must be put
+ inside matching square brackets and curly braces \keyword{[{...}]}.
+ This is necessary to ensure that \LaTeX\ does not get confused by the
+ commas in the style setting (since commas are also used to separate
+ the rows of the tableau).
+
+ \begin{example}
+ \Tableau[australian]{
+ 1 [fill=blue!20]2 3 [text=red]4 5,
+ [{circle,fill=orange}]6 *7 8 9,
+ [{draw=cyan,ultra thick}]{10} *{11} {12},
+ [{dashed,draw=red,ultra thick}]{13} }
+ \end{example}
+
+ % The last example shows that it is not necessary to double-brace
+ % singleton entries when they have a style specification.
+
+ This example shows that modifying the borders of a box is problematic
+ because boxes placed later are likely to overwrite the new border
+ style (see \autoref{SS:order}). As a result, modifying the borders of
+ the boxes is often not a good way to add emphasis to a tableau, so
+ use this sparingly. In addition, the orange circle in this example
+ looks too big, but it is what we asked for because the diameter of the
+ circle is the horizontal width of the box. The next example shows that
+ we get a better result with \textit{minimum size} specification when
+ using the \textit{Australian} and \textit{Ukrainian} conventions for
+ tableaux.
+
+ For complex or frequently used styles, we recommend using the
+ \keyword{\tikzset} command to define the style outside of the
+ \keyword{\Tableau} command. This makes your code both easier to read
+ and easier to change. If you need to define a style for a single
+ picture, then you can also use the \option{styles} key.
+
+ \begin{example}[lefthand width=0.3\textwidth]
+ \tikzset{
+ B/.style={fill=blue!40, text=yellow},
+ G/.style={fill=green!80!blue,circle,minimum size=5mm},
+ R/.style={fill=red,text=white, font=\tiny},
+ Y/.style={fill=yellow!20, text=blue}
+ }
+ \Tableau[french]{[R]1[B]2,[G]3,[Y]4} \quad
+ \Tableau[ukrainian]{[R]1[B]2,[G]3,[Y]4} \newline
+ \Tableau[english]{[R]1[B]2,[G]3,[Y]4} \quad
+ \Tableau[australian]{[R]1[B]2,[G]3,[Y]4}
+ \end{example}
+
+ In this example, the \TikZ-styles \textsf{B}, \textsf{G} \textsf{R},
+ and \textsf{Y} are applied to the tableaux entries labelled $1$, $2$,
+ $3$, and $4$, respectively. Note the use of \emph{minimum size} to
+ control the size of the circle. The colours used here, and throughout
+ this manual, are for demonstration purposes only. I recommend against
+ such garish choices in any self-respecting document!
+
+ % --------------------------------------------------------------
+ \subsubsection{Tableau coordinates}\label{SS:coordinates}
+ \index{xy@$(x,y)$}
+ \index{Cartesian coordinates!tableau}
+
+ The $(x,y)$-coordinates are required if, and only if, the
+ \keyword{\Tableau}command is used inside a \keyword{tikzpicture}
+ environment, in which case $(x,y)$ gives the coordinates of the
+ ``outside corner'' of the box in row~$1$ and column~$1$ of the
+ tableau. The following example shows how tableaux are placed using
+ $(x,y)$-coordinates inside a \keyword{tikzpicture} environment. The example
+ also shows that, by default, the tableau boxes are square and half a unit wide.
+
+ \tikzset{
+ add grid/.code = {
+ % draw coordinate axes
+ \draw[help lines, step=0.5,thin, LightGrey](-0.5,-1.5) grid (4,2.5);
+ \draw[help lines, step=1,thin, Grey](-0.5,-1.5) grid (4,2.5);
+ \foreach \pt in {0,...,3} {
+ \node[below,font=\tiny] at (\pt,-1.5){$\pt$};
+ }
+ \foreach \pt in {-1,...,2} {
+ \node[left, font=\tiny] at (-0.5,\pt){$\pt$};
+ }
+ }
+ }
+
+ \begin{example}
+ \begin{tikzpicture}[add grid]
+ \Tableau(0,0) [english] {123,45}
+ \Tableau(0,0.5) [french] {123,45}
+ \Tableau(2.5,0.5)[ukrainian] {123,45}
+ \Tableau(2.5,0) [australian]{123,45}
+ \end{tikzpicture}
+ \end{example}
+
+ % --------------------------------------------------------------
+ \subsubsection{Tableau keys}
+ \label{SS:TableauOptions}
+
+ The optional $*$-styles and $[\ldots]$-styles are the main mechanism
+ for styling the individual boxes in a tableau. Using a key-value
+ syntax, you can change aspects of the tableau produced by the
+ \keyword{\Tableau} command. The rest of this section describes these
+ keys, their default values, and gives examples of how to use them.
+
+ The options below can be applied to the \keyword{\Tableau}
+ command by giving them as a comma-separated list inside square
+ brackets:
+ \begin{center}
+ \keyword{\Tableau [options] {tableau entries}}\quad or \quad
+ \keyword{\Tableau (x,y) [options] {tableau entries}}.
+ \end{center}
+ The options can appear in any order, with later options having
+ precedence over earlier ones.
+
+ When used inside a \keyword{\Tableau} command, the options only affect
+ that particular tableau. Most of these options, or keys, can also be
+ used in the \keyword{\aTabset} command, to change the default settings
+ of all tableaux in the same \LaTeX\ group, or as optional arguments in
+ \keyword{\usepackage[..]{atableau}}, to change the default settings
+ for the entire document. For example, if you put the command
+ \keyword{\aTabset[ukrainian]} in the preamble of your document then,
+ by default, all subsequent tableaux and Young diagrams will be drawn
+ using the Ukrainian convention.
+
+ \option[-]{english}
+ \option*[]{french}
+ \option*[]{ukrainian}
+ \option*[]{australian}
+
+ These four (mutually exclusive) options change the convention, or
+ orientation, that is used when drawing the tableaux. Rather than
+ defining these conventions precisely, we use the tired and true method
+ in combinatorics of defining by example.
+
+ \begin{example}[lefthand width=0.3\textwidth]
+ \Tableau[ukrainian, styles={R={fill=red!20,draw=red}}]
+ {12[R]3,45}
+ \end{example}
+
+ \begin{example}[lefthand width=0.3\textwidth]
+ \tikzset{R/.style={fill=red!20, circle, draw=red, ultra thick}}
+ \Tableau[french]{12[R]3,45}
+ \end{example}
+
+ \begin{example}[lefthand width=0.3\textwidth]
+ \tikzset{B/.style={fill=blue!20, dashed, thick}}
+ \Tableau[english]{12[B]3,45}
+ \end{example}
+
+ \begin{example}[lefthand width=0.3\textwidth]
+ \Tableau[australian, styles={B={fill=blue!20, text=white}}]
+ {12[B]3,45}
+ \end{example}
+
+ Changing the convention sets the \option{box height} and \option{box
+ width}, relative to the current \option{scale}. If you want to use a
+ custom box height and box width, then you need to set them
+ \emph{after} specifying the convention.
+
+ By default, the \option{english} convention is used to draw tableaux
+ and Young diagrams. The default convention can be changed using
+ \keyword{\aTabset}. Capitalised names, \keyword{Australian}\!,
+ \keyword{English}\!, \keyword{French} and \keyword{Ukrainian}\!, are also
+ recognised. If, for example, your document is only going to draw
+ \option{french} tableaux and diagrams, then you can specify this when
+ you load the package using \keyword{\usepackage[french]{atableau}}\!,
+ or by adding \keyword{\aTabset{french}} to your document preamble.
+
+ \option[centre]{align=value}[centre/bottom/top]
+
+ By default, the baseline of a tableau is its centre. This can be
+ changed using the \option{align} key.
+
+ \begin{example}
+ % the default
+ Some \Tableau[align=centre]{124,357,68} words
+ \end{example}
+
+ \begin{example}
+ Some \Tableau[align=top]{124,357,68} words
+ \end{example}
+
+ \begin{example}
+ Some \Tableau[align=bottom]{124,357,68} words
+ \end{example}
+
+ Similarly, use \option{align} to control how tableaux are aligned
+ in displayed equations.
+
+ \begin{example}
+ \aTabset{align=bottom}
+ \Tableau{124,357,68}\qquad
+ \Tableau{124,35}
+ \end{example}
+
+ \begin{example}
+ % by default: align=centre
+ \Tableau{124,357,68}\qquad
+ \Tableau{124,35}
+ \end{example}
+
+ \begin{example}
+ \aTabset{align=top}
+ \Tableau{124,357,68}\qquad
+ \Tableau{124,35}
+ \end{example}
+
+ \option[true]{border}[true/false] \newline
+ \option[false]{no border}[false/true]
+
+ The \option{border} and \option{no border} keys enable and disable The
+ \option{no border} key is inverse to \option{border}, so \option{no
+ border} is equivalent to \option{no border=true}the drawing of the
+ (thick) border wall around a tableau.
+
+ \begin{example}
+ \Tableau[ukrainian, border=false]{123,455,674} \qquad
+ \Tableau[french, no border]{123,455,674} \qquad
+ \end{example}
+
+ \option[\aTableauColour{Main}]{border colour=colour}[a \LaTeX~colour]
+ \option*[thick, line~cap=rect]{border style=style}[\TikZ-styling]
+
+ The \option{border colour} option sets the colour of the border wall,
+ whereas \option{border style} sets the \TikZ-styling of the border wall.
+ (So, \option{border style} can override \option{border colour}.)
+
+ \begin{example}
+ \Tableau[ukrainian, border colour=red]{123,455,674} \qquad
+ \Tableau[french, border style={dashed,orange}]{123,455}
+ \end{example}
+
+ The \option{border style} key \emph{appends} any \TikZ-styles to the
+ current styling of the wall.
+
+ % nodes
+ \option[none]{box fill=colour}[a \LaTeX~colour]
+
+ The \option{box fill} option sets the background colour of a box in a
+ tableau, which is used in exactly the same way as the \textsf{fill} key for a \TikZ-node. If you use
+ a dark fill colour, then you will almost certainly want to change the
+ text colour using the \option{box text} key -- and you may also want to
+ change the colours of the border walls and inner walls using
+ \option{border colour} and \option{inner wall}, respectively.
+
+ \begin{example}
+ \Tableau[box fill=blue, box text=yellow]{123,455,674} \qquad
+ \Tableau[box fill=red!10]{123,455}
+ \end{example}
+
+ \option[]{box font=font command}[\LaTeX\ font command]
+
+ The \option{box font} key sets the font used to type the entries of a
+ tableau. By default, tableau entries are typeset as mathematics, so
+ this is mainly useful for changing the font size (because, for example
+ \keyword{\bfseries $1$} does not make the $1$ bold). It is only when
+ you are using \option{text entries} that font commands like
+ \keyword{\itshape} and \keyword{\bfseries} will have any effect.
+
+ \begin{example}
+ \Tableau[box font=\tiny]{123,455,674} \qquad
+ \Tableau[text entries, box font=\bfseries]{123,455}
+ \end{example}
+
+ \option[0.5]{box height=number}[a decimal giving the height in \unit{cm}]
+ \option*[0.5]{box width=number}[a decimal giving the width in \unit{cm}]
+
+ Sets the width and height of the boxes in the tableau. The default
+ height and width of the boxes is \qty{0.5}{cm} when using the
+ \option{english} and \option{french} conventions and
+ \qty{0.7012}{cm}, which is approximately $1/\sqrt{2}$\unit{cm}, when
+ using the \option{ukrainian} and \option{australian} conventions. (In
+ all cases, the default side length of the boxes is \qty{0.5}{cm}.)
+
+ \begin{example}
+ \aTabset{align=top}
+ \Tableau[box height=0.8]{123,455,674} \qquad
+ \Tableau[box width=0.2, ukrainian]{123,455}
+ \end{example}
+
+ The \option{box height} and \option{box width} keys need to be set
+ \emph{after} changing the tableau convention using
+ \option{australian}, \option{english}, \option{french}, or
+ \option{ukrainian} because the conventions change the height and width
+ of the tableau boxes (and later conventions override earlier ones). In
+ particular, in the last example, \option{box width=0.2} has no effect
+ because following \option{ukrainian} key sets the box width to
+ \qty{0.7012}{cm}.
+
+ \begin{example}
+ \aTabset{align=top}
+ \Tableau[box height=0.3]{123,455,674} \qquad
+ \Tableau[ukrainian, box width=0.3]{123,455}
+ \end{example}
+
+ See also the \option{scale}, \option{xscale} and \option{yscale}
+ options.
+
+ \option[\aTableauColour{Main}]{box text=colour}[a \LaTeX~colour]
+
+ As for a \TikZ-nodes, use \option{box text} to set the default text
+ colour for the entries of the tableau boxes.
+
+ \begin{example}
+ \Tableau[box text=red]{123,45} \qquad
+ \Tableau[box text=blue, french]{123,45}
+ \end{example}
+
+ \option[]{box style=style}[\TikZ~styling]
+
+ All of the preceding keys for tableau boxes can be overridden by using
+ \option{box style} to set the style of the tableau boxes directly.
+
+ \begin{example}
+ \Tableau[box style={text=red, draw=orange,shape=circle}]{123,45} \qquad
+ \Tableau[box style={font=\small}, french]{123,45}
+ \end{example}
+
+ \option[false]{conjugate}[false/true]
+
+ Draws the \emph{conjugate} tableau, where the rows and columns are
+ swapped.
+
+ \begin{example}
+ \Tableau{123,45,67} \qquad
+ \Tableau[conjugate]{123,45,67}
+ \end{example}
+
+ \option[centre]{halign=value}[centre, left, right]
+ \option*[centre]{valign=value}[bottom, centre, top]
+
+ By default, the entries in tableaux are centered, both horizontally
+ and vertically, and it is your responsibility to ensure that the
+ entries fit inside the tableau boxes (you can change the box
+ dimensions using the \option{box height}, \option{box width} and
+ \option{scale} keys). The \option{halign} and \option{valign} keys
+ provide a crude way to change the horizontal and vertical alignment of
+ the box entries.
+
+ \begin{example}
+ \Tableau[halign=left]{1{11}{11},{11}1} \quad
+ \Tableau[halign=centre]{1{11}{11},{11}1} \quad
+ \Tableau[halign=right]{1{11}{11},{11}1}
+ \end{example}
+
+ \begin{example}
+ \Tableau[valign=bottom]{qf,gpt,jb} \quad
+ \Tableau[valign=centre]{qf,gpt,jb} \quad
+ \Tableau[valign=top]{qf,gpt,jb}
+ \end{example}
+
+ These keys are provided for completeness only. We recommend not using them!
+
+ \option[\aTableauColour{Inner}]{inner wall=colour}[\LaTeX~colour]
+ \option*[thin, line cap=rect]{inner style=style}[\TikZ-styling]
+
+ The \option{inner wall} option sets the colour of the inner wall,
+ whereas \option{inner style} sets the \TikZ-styling of the inner wall.
+ (In particular, \option{inner style} can be used to override
+ \option{inner wall}.)
+
+ \begin{example}[label=Ex:dashed]
+ \Tableau[australian, inner wall=red]{123,455,674} \qquad
+ \Tableau[inner style=dashed]{123,455}
+ \end{example}
+
+
+ \index{dashed}
+ \index{style!dashed}
+ If you look closely at the second tableau in \autoref{Ex:dashed}, you will
+ notice that the dashes are not very clean. This is because, for
+ example, the dashes on bottom of one box do not properly match up with
+ the dashes on the top of the adjacent box below it. Rather than
+ using \option{inner style=dashes} it is better to use something like
+ \option{inner style=\{dash pattern=on 1pt off 2pt\}}.
+
+ \begin{example}
+ \Tableau[inner style={dash pattern=on 1pt off 2pt}]
+ {123,455}
+ \end{example}
+
+ You can use \option{inner wall=none}, to remove the inner tableau walls. Alternatively, use \option{no boxes}.
+
+ \begin{example}
+ \Tableau[ukrainian, inner wall=none]{123,45,67} \qquad
+ \Tableau[ukrainian, no boxes]{123,45,67}
+ \end{example}
+
+ \option[none]{label=text}[any character/text]
+ \option*[font=\textbackslash scriptsize, text=\aTableauColour{Inner}]{label style=style}[\TikZ-styling]
+
+ The \option{label} key adds a label to a tableau next to the
+ $(1,1)$-box. The style of the label can
+ be changed using the \option{label style} key.
+
+ \begin{example}
+ \Tableau[ukrainian, label={\mathtt{t}}]{13,25,4} \quad
+ \Tableau[french, label=0, label style={red}]{13,5} \quad
+ \Tableau[label style={draw=orange,circle, inner sep=0pt,
+ minimum size=2mm}, label=1] {12,35,5}
+ \end{example}
+
+ Like tableau entries, \option{label} is typeset as mathematics by default .
+
+ \option[true]{math entries}[true/false]
+ \option*[false]{text entries}[true/false]
+
+ Use the \option{math entries} and \option{text entries} keys to have
+ the tableau entries typeset as either mathematics or text,
+ respectively. By default, the entries of a tableau are typeset as
+ mathematics.
+
+ \begin{example}
+ \Tableau[math entries]{ABCD, efg, HI}\qquad% the default
+ \Tableau[text entries]{ABCD, efg, HI}
+ \end{example}
+
+ \option[A]{name=text}[string]
+
+ By default, the boxes can be referenced using the node names
+ \textsf{(A-1-1)}, \textsf{(A-1-2)}, \textsf{(A-1-3)}, \dots, with
+ \textsf{(A-$r$-$c$)} referring to the box in row~$r$ and column~$c$.
+ Use \option{name} to change the \emph{prefix} \textsf{A} to
+ anything else that you like. This feature is most useful when you
+ have several tableaux inside a \keyword{tikzpicture} environment
+ because by using \option{name} you can refer to boxes in the different
+ diagrams. If you only have one tableau, then you would not normally
+ need to change the default prefix for the node names. See
+ \autoref{E:NodeNames} for a description of the extended anchor names.
+ For examples using node names and anchors see \autoref{Ex:ABnames},
+ \autoref{Ex:pointing} and \autoref{Ex:waves}.
+
+ \option[]{paths=path specifications}[list of paths]
+ \option*[]{path style=style}[\TikZ-styling]
+
+ Use the \option{paths} key to add a comma-separated list of
+ \emph{ribbon paths} to the tableau. This allows you to draw certain
+ types of paths inside your tableaux and diagrams.
+
+ Ribbon paths are specified using the \keyword{\RibbonTableau} syntax,
+ where you first specify the row and column indices of the \emph{head}
+ of the ribbon, which is the unique node of maximal content in the
+ ribbon, and then give a sequence of \textsf{r}'s and \textsf{c}'s
+ depending on whether the row index increases, or the column index
+ decreases, respectively. As always, you have the option of adding
+ style --- and you can also specify the contents of each box in the
+ ribbon. For more details about the ribbon specifications, with
+ examples, see \autoref{S:RibbonTableaux}, which describes the
+ \keyword{\RibbonTableau} command.
+
+ \begin{example}
+ \Tableau[styles={R={red,thick}, C={cyan,thick}},
+ paths={(R)14ccrc,(C)23rcc}]{1234,567,89{10}}
+ \end{example}
+
+ The \option{path style} key changes the default style of the path:
+
+ \begin{example}
+ \Tableau[styles={R={red,thick}, C={cyan,thick}},
+ paths={(R)14ccrc,(C)23rcc},
+ path style={rounded corners}]{1234,567,89{10}}
+ \end{example}
+
+ \option[]{path box=text}[a node entry]
+ \option*[]{path box style=style}[\TikZ-styling]
+
+ The \option{path box} sets the default entry for every box on a path.
+ The \option{path box} is only used if you have not specified a box
+ entry as a subscript in the path/ribbon specification. This key is
+ useful if you want to mark all of the boxes in every path with the
+ same symbol.
+
+ \begin{example}
+ \tikzset{R/.style={red,thick},C/.style={cyan,thick}}
+ \Tableau[paths={(R)14ccrc,(C)23rcc},
+ path box=\bullet
+ ]{1234,567,89{10}}
+ \end{example}
+
+ Use \option{path box style} to change the style of the boxes in
+ the path.
+
+ \begin{example}
+ \Tableau[styles={R={red,thick}, C={cyan,thick}},
+ paths={(R)14ccrc,(C)23rcc},
+ path box style={draw,circle, minimum size=4mm}
+ ]{1234,567,89{10}}
+ \end{example}
+
+ By combining \option{path box style} and \option{path style}, you can
+ ``decorate'' the boxes on a path.
+
+ \begin{example}
+ \Tableau[styles={R={red,thick}, C={cyan,thick}},
+ paths={(R)14ccrc,(C)23rcc},
+ path box style={draw,circle, minimum size=4mm},
+ path style={draw=none},
+ ]{1234,567,89{10}}
+ \end{example}
+
+ Another way to do this is to change the style of the individual paths,
+ which gives more control because different paths can be given
+ different styling.
+
+ \begin{example}
+ \Tableau[styles={R={draw=none,text=red,thick},
+ C={cyan,thick}},
+ paths={(R)14ccrc,(C)23rcc},
+ path box style={draw,circle, minimum size=4mm},
+ ]{1234,567,89{10}}
+ \end{example}
+
+ \option[]{ribbons=ribbon specifications}[list of ribbons]
+ \option*[draw=\aTableauColour{Inner}, thin]{ribbon style=style}[\TikZ-styling]
+ \option*[]{ribbon box=text}[A node entry]
+ \option*[]{ribbon box style=style}[\TikZ-styling]
+
+ Use the \option{ribbons} key to add a comma-separated list of
+ \emph{ribbons} to a tableau. The ribbon specifications are identical
+ to those used for \option{paths}. For more details see
+ \autoref{S:RibbonTableaux}, which describes the
+ \keyword{\RibbonTableau} command.
+
+ The \option{ribbons} key works in almost exactly the same way
+ as the \option{paths} key, with the difference being that we are
+ adding ribbons to the tableau rather than lines. The
+ \option{ribbon style} key controls the default ribbon style. The
+ \option{ribbon box} and \option{ribbon box style} keys work in the
+ same way as \option{path box} and \option{path box style},
+ respectively.
+
+ \TikZ-styling can be added to ribbons using \option{ribbon style} and
+ \option{ribbon box style}. The \option{ribbon style} changes the
+ default style of the entire ribbon, whereas \option{ribbon box style}
+ changes the default style of the individual boxes in the ribbon.
+
+ \begin{example}
+ \Tableau[ribbon style={fill=blue!20,opacity=0.4},
+ ribbons={22rc}]{123,45,67}
+ \end{example}
+
+ Use \option{ribbon box style} to change the default style of the
+ boxes in a ribbon. For example, noting that a box is a ribbon of
+ length~$1$, the following code uses ribbons of length one (that is,
+ nodes), to highlight the addable nodes of this tableau.
+
+ \begin{example}
+ \Tableau[star style={fill=green!80!blue,text=white},
+ ribbon style={fill=yellow,text=red},
+ ribbons={15_A,24_B,42_C,51_D},
+ ]{123*4,567,89*{10},*{11}}
+ \end{example}
+
+ As this example indicates, ribbons are assumed to be contained inside
+ the diagram of the tableau, so they do not change the border of a
+ tableau.
+
+ \option[]{snobs=snob specifications}[list snobs]
+ \option*[draw=\aTableauColour{Inner}, thin]{snob style=style}[\TikZ-styling]
+ \option*[]{snob box=text}[A node entry]
+ \option*[]{snob box style=style}[\TikZ-styling]
+
+ Use \option{snobs} to add ribbons to the tableau, which are ribbons
+ that are placed \textit{after} the border of the diagram is drawn.
+ (Writing \textit{ribbons} backwards gives \textit{snob}bir.) The
+ \option{snob style} key controls the default style of snobs.
+
+ \begin{example}
+ \Tableau[star style={fill=green!80!blue, text=white},
+ snob style={fill=yellow, text=red},
+ snobs={15_A,24_B,42_C,51_D},
+ ]{123*4,567,89*{10},*{11}}
+ \end{example}
+
+ The difference between this pictures and the one given above using
+ \option{ribbons} is that in the \option{snobs} are drawn over the top
+ of the tableau border, causing the border to disappear for these
+ nodes. For this reason, in most cases you should normally avoid
+ \option{snobs} and use \option{ribbons}. This said, \option{snobs} are
+ exactly what are needed in \autoref{Ex:Garnir}.
+
+ The \option{snob box} and \option{snob box style} keys work in the
+ same way as the \option{path box} and \option{ribbon box}, and
+ \option{path box style} and \option{ribbon box style}, keys.
+
+ \option[1]{scale=number}[a decimal number]
+ \option*[1]{xscale=number}[a decimal number]
+ \option*[1]{yscale=number}[a decimal number]
+
+ By design, boxes in tableaux do not automatically resize to fit
+ their contents. For example, consider:
+
+ \begin{example}
+ \Tableau{ 13{10}{11}{1+x}, 2{1+x} }
+ \end{example}
+
+ This is unlikely to be the desired output! The options \option{scale},
+ \option{xscale} and \option{yscale} can be used to rescale the boxes
+ in tableaux and diagrams. The names are slightly misleading because
+ \option{xscale} rescales in the direction of increasing column index
+ and \option{yscale} rescales in the direction of increasing row index.
+
+ \begin{example}
+ \Tableau[scale=2]{ 13{10}{11}{1+x}, 2{1+x} }
+ \end{example}
+
+ \begin{example}
+ \Tableau[xscale=2]{ 13{10}{11}{1+x}, 2{1+x} }
+ \end{example}
+
+ When using the \textsf{australian} and \textsf{ukrainian} conventions,
+ \option{xscale} and \option{yscale} scale in both the \textsf{x}
+ direction and the \textsf{y}-direction, reflecting how these tableaux
+ grow with increasing column and row index, respectively.
+
+ \begin{example}
+ \Tableau[ukrainian, xscale=2]{ 13{10}{11}{1+x}, 2{1+x} }
+ \end{example}
+
+ \begin{example}
+ \Tableau[australian, yscale=2]{ 13{10}{11}{1+x},2{1+x} }
+ \end{example}
+
+ \begin{warning}
+ The options, \option{scale}, \option{xscale}, and \option{yscale},
+ affect all \aTableau diagrams, including tableaux, Young diagrams
+ and abacuses. If you want to use \keyword{\aTabset} to change the
+ default sizes of the diagrams and tableaux in your document, then it
+ is probably better to use the \option{box height} and \option{box
+ width} options.
+ \end{warning}
+
+ \option[0.5]{script=value}[decimal number]
+ \option*[0.4]{scriptscript=value}[decimal number]
+
+ Although rare, tableaux and diagrams are sometimes used as subscripts
+ and superscripts. The pacakage automatically rescales tableau when
+ they are used as subscripts and superscripts, with the \option{script}
+ and \option{scriptscript} keys giving finer control over the scaling
+ of subscripts and subsubscripts, respectively. The current values of
+ the \option{scale}, \option{xscale} and \option{yscale} keys are taken
+ into account.
+
+ \begin{example}
+ $v_{\Tableau{123,45}}$ \qquad% the default
+ $v_{\Tableau[script=0.3, xscale=2]{123,45}}$
+ \end{example}
+
+ \option[false]{shifted}[true/false]
+
+ Set to \textsf{true} for a shifted tableau or shifted diagram. Shifted
+ tableaux, and shifted diagrams, are discussed in more detail in
+ \autoref{S:Shifted}, which describes the \keyword{\ShiftedDiagram} and
+ \keyword{\ShiftedTableau} commands.
+
+ \begin{example}
+ \Tableau[shifted]{123,45} \qquad
+ \Diagram[shifted]{3,2^2}
+ \end{example}
+
+ See \autoref{S:Shifted} for the options specific to shifted tableaux and
+ shifted diagrams.
+
+ \option[0]{skew=partition}[a partition]
+
+ Specify the skew shape for a skew tableau or skew diagram. Skew
+ tableaux, and skew diagrams, are discussed in more detail in
+ \autoref{S:Skew}, which describes the \keyword{\SkewDiagram} and
+ \keyword{\SkewTableau} commands.
+
+ \begin{example}
+ \Tableau[skew={2}]{123,45} \qquad
+ \Diagram[skew={2^2,1}]{3,2^2}
+ \end{example}
+
+ See \autoref{S:Skew} for the options specific to skew tableaux and skew diagrams.
+
+ \option[fill=\aTableauColour{StarStyle}]{star style=style}[\TikZ-styling]
+
+ Use \option{star style} to change the style of the starred entries
+ of a tableau. (In \TikZ parlance, \option{star style} \emph{appends}
+ appends these styles to the default \option{star style}.)
+
+ \begin{example}
+ \Tableau[star style={text=magenta, draw=cyan, thick}]
+ {1*2*3,4*5} \qquad
+ \Tableau[star style={fill=orange!50}]{1*2*3,4*5}
+ \end{example}
+
+ Note that the tableau border is drawn \textit{after} the
+ \option{star style} is applied. You can use \option{snobs} to draw
+ over the top of the border.
+
+ \option[]{styles=\TikZ styles}[List of styles]
+
+ The \option{styles} key is a shorthand for defining \TikZ-styles that
+ are only used in the current picture. For example, instead of writing
+
+ \begin{example}
+ \tikzset{
+ B/.style={fill=blue!40, text=yellow},
+ G/.style={fill=green!80!blue,circle,minimum size=5mm},
+ R/.style={fill=red,text=white, font=\tiny},
+ Y/.style={fill=yellow!20, text=blue}
+ }
+ \Tableau[french]{[R]1[B]2,[G]3,[Y]4}
+ \end{example}
+
+ you can save some typing using the \option{styles} key:
+
+ \begin{example}
+ \Tableau[french, styles={
+ B={fill=blue!40, text=yellow},
+ G={fill=green!80!blue,circle,minimum size=5mm},
+ R={fill=red,text=white, font=\tiny},
+ Y={fill=yellow!20, text=blue},
+ }]{[R]1[B]2,[G]3,[Y]4}
+ \end{example}
+
+ Styles defined this way will only be available in the current picture.
+ Use \keyword{\tikzset} whenever you are defining styles that are likely
+ to be used more than once.
+
+ \option[false]{tabloid}[true/false]
+
+ Use the \option{tabloid} key to draw a tabloid. This key is discussed in
+ more detail in \autoref{S:Tabloid}, which describes the
+ \keyword{\Tabloid} command.
+
+ \begin{example}
+ \Tableau[tabloid]{123,45} \qquad
+ \Diagram[tabloid]{3,2^2}
+ \end{example}
+
+ See \autoref{S:Tabloid} for the options specific to tabloids.
+
+ \option[]{tikz before=commands}[\TikZ commands]
+ \option*[]{tikz after=commands}[\TikZ commands]
+
+ These keys inject \TikZ code into the underlying \keyword{tikzpicture}
+ environment, where the tableau is constructed, before and after the
+ \keyword{\Tableau} command, respectively.
+
+ \begin{example}[lefthand width=0.24\textwidth]
+ \Tableau[
+ tikz before={\draw[help lines, step=0.5](-0.5,-2)grid(2,0.5);},
+ tikz after={\draw[ultra thick, red]
+ (A-1-3.north east)--(A-1-3.south east)
+ --(A-2-1.north east)--(A-3-1.south east)
+ --(A-3-1.south west);
+ }]{134,567,89}
+ \end{example}
+
+ Both before and after hooks are provided because the order in which
+ you place \TikZ commands affects the final picture because later commands
+ are drawn over the top of earlier ones. Note that the \emph{before}
+ code cannot use the named nodes \textsf{A-r-c} because this code is
+ executed before these nodes are constructed, which happens when the
+ tableau is drawn. For more examples, see \autoref{SS:order}.
+
+ \option[]{tikzpicture=keys}[\TikZ-keys]
+
+ This command adds an optional argument to the underlying
+ \keyword{tikzpicture} environment, which contains the tableau. The
+ \option{tikzpicture} option is ignored when the \keyword{\Tableau}
+ command is equipped with $(x,y)$-coordinates.
+
+ As a first example, we can use \keyword{tikzpicture={rotate=30}}
+ to rotate a tableau by 90 degrees:
+
+ \begin{example}
+ \Tableau[tikzpicture={rotate=90}]{123,45} \qquad
+ \begin{tikzpicture}[rotate=90]
+ \Tableau(0,0){123,45}
+ \end{tikzpicture}
+ \end{example}
+
+ The two tableaux constructions in this example are equivalent. An
+ oddity with both of these examples is that the numbers in the tableaux
+ have not been rotated, which is because the \TikZ \emph{rotate} key
+ does not affect component objects, such as nodes, inside a \TikZ
+ picture. You can rotate the entire picture using the
+ \TikZ-key \textit{transform canvas}
+
+ \vspace*{15mm}
+
+ \begin{example}[valign=top, lefthand width=0.3\textwidth]
+ \Tableau[tikzpicture={transform canvas={rotate=90}}]{123,45}
+ \end{example}
+
+ A more interesting application is using
+ \option{tikzpicture=remember picture} to annotate a tableau:
+
+ \begin{example}[lefthand width=0.3\textwidth, label={Ex:pointing}]
+ \Tableau[ukrainian, name=A,
+ tikzpicture={remember picture}]
+ { 1[fill=blue!20]23[text=red]45,
+ 6*78[{draw=cyan,ultra thick}]9,
+ [{circle,fill=orange}]{10}*{11}{12},
+ [{dashed,draw=red,ultra thick}]{13}
+ }
+ \end{example}
+
+ Since \option{name}=A, the nodes in this tableau are referenced as
+ \textsf{(A-1-1)}, \textsf{(A-1-2)}, \textsf{(A-1-3)}, \dots. As the
+ example uses \textit{remember picture}, other \keyword{tikzpicture}
+ environments can reference the node names in last tableau, which
+ allows us to refer back to the table above using:
+
+ \vspace*{3mm}
+
+ \begin{example}[lefthand width=0.3\textwidth]
+ \tikz[remember picture, overlay]
+ \draw[very thick, ->, red]
+ (0,0) node[right,align=left]
+ {This circle is too big!\\Use minimum size=5mm}
+ to [out=135, in=225](A-3-1);
+ \end{example}
+
+ (See the \ctan{tikzmark} package for extensions of this idea.)
+
+ % --------------------------------------------------------------
+ \subsubsection{Compositions}
+ \index{composition}
+
+ As we have defined them, tableaux are always of \textit{partition}
+ shape, in the sense that the lengths of the rows is a weakly
+ decreasing sequence. In fact, the \keyword{\Tableau} command also
+ accepts tableaux of \emph{composition} shape, where the lengths of the
+ rows are not necessarily in decreasing order:
+
+ \begin{example}
+ \Tableau{ 45,2751,31 } \qquad
+ \SkewTableau{1,2}{ 45,27,31 }
+ \end{example}
+
+ Even though it is possible to draw compositions, and tableaux of
+ composition shape, compositions are not supported in the sense that
+ many of the options/keys assume that the diagrams are of partition
+ shape. In addition, some options assume that tableaux and diagrams do
+ not contain empty rows, and that the diagrams are \textit{connected}.
+ (For disconnected tableaux and diagrams, see the
+ \keyword{\Multidiagram} and \keyword{\Multitableau} commands in
+ \autoref{S:Multitableau}.)
+
+ % --------------------------------------------------------------
+ \subsubsection{Drawing order}
+ \label{SS:order}
+ \index{tableau!drawing order}
+
+ When \TikZ constructs a picture, later objects are drawn over the top
+ of earlier ones, which can obscure earlier features. Consequently,
+ for more complicated diagrams and tableaux it helps to know the order
+ in which the different parts of these diagrams are drawn, which is the
+ following:
+ \begin{itemize}[nosep]
+ \item First, the tableau entries that use the default styling are
+ placed, in the order that they appear in the \textit{tableau
+ specifications}.
+ \item Secondly, the styled tableau entries are placed, in the order
+ that they appear in the \textit{tableau specifications}.
+ \item Next, the nodes in any \option{ribbons} and ribbon
+ \option{paths} are placed, again in the order that the ribbons are
+ listed. For each ribbon, first the border of the ribbon is drawn,
+ together with any styling for the ribbon, and then the boxes in the
+ ribbon, together with any styling, are added.
+ \item When enabled by \option{skew border}, the skew border is
+ drawn, after which the border of the tableau is drawn.
+ \item The \option{dotted rows} and \option{dotted cols} keys are
+ applied to replace the specified rows and columns with dots.
+ \item Finally, any \option{snobs} are drawn, in the order that they are listed.
+ \end{itemize}
+
+ All of the tableau and Young diagram commands use this drawing order.
+
+ % --------------------------------------------------------------
+ \subsubsection{Special characters}
+ \index{tableau!special characters}
+ \index{tableau!comma}
+ \index{tableau!*}
+ \index{tableau![}
+
+ The characters \textsf{[}, \textsf{,}, and \textsf{*} have
+ special meanings in the \textit{tableau specifications}. Enclose these characters in
+ braces when you want to use these characters as entries in a tableau:
+
+ \begin{example}
+ \Tableau{ 13{,}5], 8{[}, {*} }
+ \end{example}
+
+ There is no need to enclose~\keyword{]} in braces because it only
+ becomes special when it has a partner~\keyword{[}.
+
+ % --------------------------------------------------------------
+ \subsection{Young diagrams}
+ \label{S:Diagram}
+ \indexcmd{Diagram}
+ \index{young diagram@Young diagram|see{diagram}}
+ \index{diagram}
+ \index{diagram}
+ \index{partition!diagram}
+
+ A \emph{Young diagram}, or simply a \emph{diagram}, is an unlabelled
+ tableau. Diagrams can be drawn using the \keyword{\Tableau} command:
+
+ \begin{example}
+ \Tableau{~~~,~~~,~~,~}
+ \end{example}
+
+ This approach works, but it is cumbersome, hard to proofread, and easy
+ to get wrong. For this reason, \aTableau provides the
+ \keyword{\Diagram} command. The \keyword{\Diagram} command uses
+ almost the same syntax as the \keyword{\Tableau} command:
+
+ \keyword{\Diagram (x,y) [options] {partition}}
+
+ As with the \keyword{\Tableau} command, the $(x,y)$-coordinates are
+ needed if, and only if, the diagram is inside a \keyword{tikzpicture}
+ environment. The \keyword{\Diagram} command allows the
+ \emph{partition} to be specified as either a comma-separated list of
+ \emph{weakly decreasing positive integers}, or by using \emph{exponential
+ notation}:
+ \index{exponential notation}
+ \index{partition!exponential notation}
+ \index{diagram!exponential notation}
+
+ \begin{example}
+ \Diagram{4,3^2,1^3} \qquad
+ \Diagram{4,3,3,1}
+ \end{example}
+
+ Internally, \keyword{\Diagram} actually does something like the first
+ example in this section, so all of the options for the
+ \keyword{\Tableau} command can be used with \keyword{\Diagram}. Rather
+ than repeating all of the \keyword{\Tableau} options in this section,
+ we highlight the more interesting options together with some new,
+ diagram specific, options.
+
+ \begin{samepage}
+ Just like the \keyword{\Tableau} command, \keyword{\Diagram} supports the
+ four different conventions for diagrams, with \option{english} being
+ the default:
+
+ \option[-]{english}
+ \option*[]{french}
+ \option*[]{ukrainian}
+ \option*[]{australian}
+ \end{samepage}
+
+ \begin{example}
+ \Diagram[australian]{3,2,1} \qquad
+ \Diagram[australian]{3,1^3}
+ \end{example}
+
+ \begin{example}
+ % English is the default convention
+ \Diagram[english]{3,2,1} \qquad
+ \Diagram{3,1^3}
+ \end{example}
+
+ \begin{example}
+ \Diagram[french]{3,2,1} \qquad
+ \Diagram[french]{3,1^3}
+ \end{example}
+
+ \begin{example}
+ \Diagram[ukrainian]{3,2,1} \qquad
+ \Diagram[ukrainian]{3,1^3}
+ \end{example}
+
+ \option[true]{border}[true/false]
+ \option*[false]{no border}[false/true]
+
+ If \option{border} is true, which it is by default, then the border of
+ the tableau is drawn. If \option{border} is false, then the border of
+ the tableau is not drawn. Notice that the border refers only to the
+ outside border of the diagram, and not to the internal borders of the
+ boxes on the diagram, which can be disabled using
+ \option{no boxes}.
+
+ \begin{example}
+ \Diagram[border=false]{3,2,1} \qquad
+ \Diagram[no border, french]{3^2,1}
+ \end{example}
+
+ The \option{no border} option, and similar options, are provided only
+ for completeness because it is the inverse of \option{border}. That
+ is, \option{no border} is equivalent to \option{border=false}, and
+ \option{no border=false} is equivalent to \option{border=true}.
+
+ \option[true]{boxes}[true/false]
+ \option*[false]{no boxes}[false/true]
+
+ The \option{boxes} and \option{no boxes} keys control whether or not
+ the internal wall around the boxes are drawn, with these two keys
+ being inverses of each other. By default, \option{boxes} is true, so
+ the internal boxes are drawn. When \option{no boxes} is in force
+ (equivalently, \option{boxes} is false), the internal walls around
+ boxes are not drawn.
+
+ \begin{example}
+ \Diagram[no boxes]{3,2,1} \qquad
+ \Tableau[french, no boxes, no border]{123,45}
+ \end{example}
+
+ \option[false]{conjugate}[false/true]
+
+ Draws the conjugate diagram, which has the rows and columns
+ interchanged.
+
+ \begin{example}
+ \Diagram[conjugate]{3,2,2} \qquad
+ \Diagram[ukrainian, conjugate]{2,1^3}
+ \end{example}
+
+ \option[]{dotted cols=column indices}[comma separated list of columns]
+ \option*[]{dotted rows=row indices}[comma separated list of rows]
+
+ The \option{dotted rows} and \option{dotted cols} keys draw diagrams
+ where the specified rows and columns are replaced with dots. This
+ makes it possible to draw \emph{generic} diagrams, where the number of
+ rows and columns is not fully specified.
+
+ \begin{example}
+ \aTabset{scale=0.7}
+ \Diagram[dotted rows={2,4,5}]{4^2,2^2,1^3} \qquad
+ \Diagram[dotted cols={5,3,4},
+ no boxes] {6,5,4,3,2,1}
+ \end{example}
+
+ As shown, if row and columns indices are in increasing
+ \textit{consecutive} order, then the corresponding rows or columns are
+ replaced as a block. Non-consecutive indices are treated separately.
+
+ \begin{example}
+ \aTabset{scale=0.7, no boxes}
+ \Diagram[dotted rows={4,5,3}] {6,5,5,5,2,1} \qquad
+ \Diagram[dotted cols={5,3,4}] {6,5,5,5,2,1}
+ \end{example}
+
+ \index{tableau!dotted rows}
+ \index{tableau!dotted cols}
+ The \option{dotted rows} and \option{dotted cols} keys work by
+ overwriting the content on the specified rows and columns, so
+ anything that was drawn in these rows and columns will disappear. The
+ \option{dotted rows} and \option{dotted cols} keys can be used with
+ the \keyword{\Tableau} command, with the caveat that this will remove
+ all boxes, with their contents, in the specified rows and columns.
+
+ When the \option{dotted rows} and \option{dotted cols} keys are
+ used together, the \option{dotted rows} are applied first.
+
+ \begin{example}
+ \Diagram[scale=0.7, no boxes,
+ dotted rows={4,5},
+ dotted cols={4,5},
+ ] {6,5,5,5,2,1}
+ \end{example}
+
+ When using these two keys together, you need to be careful when
+ choosing which rows and columns to remove because, otherwise,
+ artefacts can remain. Ideally, the endpoints of the rows and columns
+ being removed should not overlap. For example, consider the two
+ pictures:
+
+ \begin{example}
+ \aTabset{scale=0.7, no boxes}
+ \Diagram[dotted cols={3}]{6,5,5,5,2,1}\qquad
+ \Diagram[dotted cols={4,5,3}, dotted rows={4,5,3},
+ tikz after={ \draw[red](0.9,-1.4)circle(0.2); }
+ ]{6,5,5,5,2,1}
+ \end{example}
+
+ The circled horizontal dots in the right-hand diagram are a ``user
+ error'', not a bug. The left-hand diagram shows that these dots come
+ from column $3$ with \option{dotted cols} \emph{after} first removing
+ rows 4--5 with \option{dotted rows}.
+
+ The \option{dotted rows} and \option{dotted cols} keys are not
+ designed to be used with the \option{conjugate} key.
+
+ \option[]{ribbons=ribbon specifications}[list of ribbon specifications]
+ \option*[]{paths=path specifications}[list of ribbon specifications]
+ \option*[]{snobs=snobs specifications}[list of ribbon specifications]
+
+ Use \option{ribbons}, \option{paths} and \option{snobs} to add
+ ribbons, ribbon paths and snobs to a diagram, respectively. The
+ \option{snobs} are drawn after the border of the diagram.
+
+ \begin{example}
+ \Diagram[french, ribbons={*22*c_4*r*r}]{3,2^2,1} \qquad
+ \end{example}
+
+ As described in \autoref{S:Tabloid}, there are additional keys that
+ control the behaviour of paths, ribbons and snob. For example, the
+ keys \option{path style}, \option{path box} and \option{path box
+ style} are associated to \option{paths}.
+
+ \begin{example}
+ \Diagram[ukrainian, inner style=dotted,
+ styles={b={fill=blue!20,opacity=0.4},
+ R={red,text=red,thick},
+ B={blue,text=blue,thick},
+ }, path style={thick},
+ path box=\bullet,
+ paths={(R)15rccrc[b]rc,(B)43[b]rcc}
+ ]{5^2,3^3}
+ \end{example}
+
+ A description of the ribbon specifications, with examples, can be
+ found in \autoref{S:RibbonTableaux}, which describes the
+ \keyword{\RibbonTableau} command.
+
+ % --------------------------------------------------------------
+ \subsubsection{Diagrams with entries}\label{SS:entries}
+ \index{contents}
+ \index{first tableau}
+ \index{hooks}
+ \index{last tableau}
+ \index{residues}
+ \index{first tableau}
+ \index{tableau!contents}
+ \index{tableau!first}
+ \index{tableau!hooks}
+ \index{tableau!last}
+ \index{tableau!residues}
+
+ The \option{entries} key provides a shortcut for drawing some common
+ tableaux of a specified shape.
+
+ \option[]{entries=value}[contents, first, hooks, last, residues]
+
+ The possible choices are:
+
+ \begin{itemize}
+
+ \item\option{entries=first} print the \emph{first}
+ \textbf{standard} tableau of this shape, with respect to the Bruhat
+ order. This is the tableau that has the numbers $1,2\dots,n$ entered
+ in order from top left to right along down successive rows (with
+ appropriate modifications for the non-English conventions).
+
+ \index{first tableau}
+ \index{tableau!first}
+ \index{entries!first}
+ \begin{example}
+ \Diagram[entries=first]{3,2,2} \qquad
+ \Diagram[ukrainian, entries=first]{3^2,2}
+ \end{example}
+
+ \item\option{entries=last} print the \emph{last} \textbf{standard}
+ tableau of this shape, with respect to the Bruhat order. This is the
+ tableau that has the numbers $1,2\dots,n$ entered in order from top
+ to bottom down successive columns (with appropriate modifications
+ for the non-English conventions).
+
+ \index{last tableau}
+ \index{tableau!last}
+ \index{entries!last}
+ \begin{example}
+ \Diagram[entries=last]{3,2,2} \qquad
+ \Diagram[australian, entries=last]{2^2,1}
+ \end{example}
+
+ \item\option{entries=hooks} print the diagram where each box is
+ labelled by the corresponding \emph{hook length}. If $\lambda$ is a
+ partition and $\lambda'$ is its conjugate partition then the hook
+ length of the box in row~$i$ and column~$j$ is
+ $\lambda_i-i+\lambda'_j-j+1$.
+
+ \index{tableau!hook lengths}
+ \index{hook lengths}
+ \index{entries!hook lengths}
+ \begin{example}
+ \Diagram[entries=hooks]{3,2,2} \qquad
+ \Diagram[ukrainian, entries=hooks]{2^2,1}
+ \end{example}
+
+ \item\option{entries=contents} print the diagram where each box is
+ labelled by its \emph{content}, which is the row index minus the
+ column index.
+
+ \index{tableau!contents}
+ \index{contents}
+ \index{entries!contents}
+ \begin{example}
+ \Diagram[entries=contents]{3,2,1} \qquad
+ \Diagram[french, entries=contents]{2^2,1}
+ \end{example}
+ \AddKeyLink{contents}
+ \AddKeyLink{residues}
+ \AddKeyLink{charge}
+
+ \smallskip\noindent Inside a tableau, the default minus sign for a
+ negative number looks too long, so \aTableau uses
+ \keyword{\shortminus} for negative contents. For example, it prints
+ \keyword{\shortminus 1} instead of \keyword{-1}, which look like
+ $\shortminus1$ and $-1$, respectively.\indexcmd{shortminus}
+
+ \item\option{entries=residues} prints the diagram where each box is
+ labelled by its \emph{residue}, which is the row index minus the
+ column index modulo an integer~$e\ge2$, which must also be supplied.
+
+ \index{residue}
+ \index{tableau!residues}
+ \index{affine quiver}
+ \begin{example}
+ \Diagram[entries=residues, e=2]{3,2,1} \qquad
+ \Diagram[french, entries=residues, e=3]{3,2,1}
+ \end{example}
+
+ \noindent\AddKeyLink{cartan}\AddKeyLink{e}
+ By default, residue sequences for affine type $A^{(1)}_e$, or the symmetric
+ group and friends, are given. In addition, residues in affine types
+ $C^{(1)}_e$, $A^{(2)}_{2e}$ and $D^{(2)}_e$, which can be accessed
+ using \option{cartan=C}, \option{cartan=AA}, and \option{cartan=DD},
+ respectively.
+
+ \smallskip
+ \begin{example}
+ % affine type C
+ \Diagram[french, entries=residues,
+ e=2, cartan=C] {8,4,2}
+ \end{example}
+
+ \begin{example}
+ % twisted affine type A
+ \Diagram[ukrainian, entries=residues,
+ e=2, cartan=AA] {8,4,2}
+ \end{example}
+
+ \begin{example}
+ % twisted affine type D
+ \Diagram[australian, entries=residues,
+ e=2, cartan=DD] {8,4,2}
+ \end{example}
+
+ \end{itemize}
+ Use \option{charge} to add offsets to the \option{contents} and \option{residues}.
+
+ \begin{example}
+ \Diagram[entries=contents, charge=2]{3,2,1} \qquad
+ \Diagram[entries=residues, e=3, charge=1]{3,2,1}
+ \end{example}
+
+ % --------------------------------------------------------------
+ \subsection{Skew tableaux and skew diagrams}
+ \label{S:Skew}
+ \indexcmd{SkewTableau}
+ \indexcmd{SkewDiagram}
+ \index{diagram!skew}
+ \index{partition!skew}
+ \index{tableau!skew}
+
+ A partition $\mu$ is \emph{contained} in another partition $\lambda$, which
+ is written as~$\mu\subseteq\lambda$, if $\mu_k\le\lambda_k$, for
+ $k\ge0$. If $\mu\subseteq\lambda$ then the \emph{skew partition}
+ $\lambda/\mu=\set{(r,c)\in\lambda|(r,c)\notin\mu}$ is the set of nodes
+ that are in~$\lambda$ and not in~$\mu$. In this manual, $\mu$ is
+ the \emph{inner shape} and $\lambda/\mu$ is the outer shape. A
+ \emph{skew tableau} is a labelling of the nodes in the diagram of a
+ skew partition. Skew partitions and skew tableau can be drawn using
+ the commands:
+
+ \keyword{\SkewDiagram (x,y) [options] {inner shape} {outer shape}}\newline
+ \keyword{\SkewTableau (x,y) [options] {inner shape} {skew tableau specifications}}
+
+ \index{exponential notation}
+ As with the previous commands, the $(x,y)$--coordinates should be given
+ if, and only if, the picture is inside a \keyword{tikzpicture}
+ environment. The inner and outer shapes can either be given as a
+ comma-separated list of non-negative integers, or in exponential notation.
+
+ Skew tableau and skew diagrams should always be connected. Use
+ \keyword{\Multidiagram} and \keyword{\Multitableau} to draw
+ disconnected diagrams.
+
+ In fact, the \keyword{\SkewTableau} is just an alias for the
+ \keyword{\Tableau}, using the \option{skew} key to set the inner
+ shape. For this reason, all of the options for the \keyword{\Tableau}
+ command can be used with \keyword{\SkewTableau}. The entries in a
+ \keyword{\SkewTableau} are specified in exactly the same way as in the
+ \keyword{\Tableau} command. In particular, the entries of skew
+ tableaux can, optionally, be given style prefixes, both using a~$*$ to
+ add the current \option{star style}, or arbitrary \TikZ-styling using
+ \keyword{[...]}.
+
+ \begin{example}
+ \tikzset{R/.style={fill=red!20,text=red}}
+ \SkewTableau[french]{1^2}{13,5*7,[R]79} \qquad
+ \Tableau[french, skew={1^2}]{13,5*7,[R]79}
+ \end{example}
+
+ Similarly, the \keyword{\SkewDiagram} command is an alias for the
+ \keyword{\Diagram} command, with a \option{skew} key.
+
+ \begin{example}
+ \SkewDiagram[french]{1^2}{2^3} \qquad
+ \Diagram[french, skew={1^2}]{2^3}
+ \end{example}
+
+ As the \keyword{\SkewTableau} and \keyword{\SkewTableaua} commands
+ are shortcuts, all of the options for the \keyword{\Tableau} and
+ \keyword{\Diagram} commands can be used with the
+ \keyword{\SkewTableau} and \keyword{\SkewDiagram} commands,
+ respectively. In addition, the following options are supported:
+
+ \option[false]{skew border}[true/false]
+ \option*[true]{no skew border}[false/true]
+
+ These two keys are inverse to each other. When
+ \option{skew border} is \textsf{true}, the border of the (inner) skew
+ shape is drawn.
+
+ \begin{example}
+ \tikzset{R/.style={fill=red!20,circle}}
+ \SkewTableau[skew border]{2,1^2}{12[R]3,45,67}
+ \SkewTableau[french, skew border]{2,1^2}{12[R]3,45,67}
+ \end{example}
+
+ Note that \option{skew border} only draws the border of the skew shape
+ and not the boxes inside the inner skew shape. Use \option{skew boxes}
+ to draw the interior walls of the boxes in the skew shape.
+
+ \option[draw=\aTableauColour{Skew}, fill=\aTableauColour{SkewFill}, thick]{skew border style=style}[\TikZ-styling]
+
+ Use \option{skew border style} to change the style of the skew border.
+ Since the skew border is only drawn when \option{skew border} is set,
+ the \option{skew border style} does not have any effect unless
+ \option{skew border} has been set to \textsf{true}.
+
+ \begin{example}
+ \SkewTableau[skew border style={draw=yellow},
+ skew border]{2,1^2}{123,45,67} \qquad
+ \SkewDiagram[skew border style={dashed,fill=red!10},
+ skew border]{1^2}{2^3}
+ \end{example}
+
+ \option[false]{skew boxes}[false/true]
+ \option*[true]{no skew boxes}[true/false]
+ \option*[thin, fill=\aTableauColour{SkewFill}]{skew box style=style}[\TikZ-styling]
+
+ The \option{skew boxes} key adds walls to the boxes inside the inner
+ partition of a skew shape. Use \option{skew box style} to change the
+ default shading of these boxes.
+
+ \begin{example}
+ \SkewTableau[skew boxes] {2,1^2}{123,45,67}
+ \SkewTableau[skew boxes,
+ skew box style={dash pattern=on 1pt off 2pt}
+ ] {2,1^2}{123,45,67,89}
+ \end{example}
+
+ Using the options \option{skew border} and the \option{skew boxes}
+ together gives the skew (inner) shape both inner and outer borders.
+
+ \begin{example}
+ \SkewTableau[skew border, skew boxes] {2^2,1}{123,45,67}
+ \end{example}
+
+ % --------------------------------------------------------------
+ \subsection{Shifted tableaux and shifted diagrams}
+ \label{S:Shifted}
+ \indexcmd{ShiftedTableau}
+ \indexcmd{ShiftedDiagram}
+ \index{diagram!shifted}
+ \index{strict partition}
+ \index{partition!strict}
+ \index{shifted tableau}
+ \index{tableau!shifted }
+
+ \emph{Strict partitions}, which have strictly increasing parts, and
+ \emph{shifted tableaux}, which are of strict partition shape, appear
+ in several places in representation theory, such as in the study of
+ projective representations of the symmetric groups. These tableaux and
+ diagrams are drawn with row~$r$ shifted by $(r-1)$-units along the
+ row, so that the first box in each row has content~$0$. These diagrams
+ and tableaux can be drawn using the following commands:
+
+ \keyword{\ShiftedDiagram (x,y) [options] {partition }}\newline
+ \keyword{\ShiftedTableau (x,y) [options] {tableau specification}}
+
+ As usual, the $(x,y)$-coordinates are necessary if, and only if, these
+ commands are used inside a \keyword{tikzpicture} environment. The
+ partition in a~\keyword{\ShiftedDiagram} can be given using
+ exponential notation and the tableau specification for a
+ \keyword{\ShiftedTableau} can include the usual optional style
+ prefixes.
+
+ \begin{example}
+ \tikzset{R/.style={fill=red!20,circle}}
+ \ShiftedTableau{12[R]3,45,*6} \qquad
+ \ShiftedDiagram[french]{3,2,1}
+ \end{example}
+
+ In the literature, shifted tableaux and shifted diagrams almost
+ always have strict partition shape, however, this is not enforced by
+ these commands. Under the hood, the \keyword{\ShiftedTableau} is the
+ \keyword{\Tableau} command with the \option{shifted} option set
+ to true. Similarly, \keyword{\ShiftedDiagram} is the same as using
+ the \keyword{\Diagram} command with the \option{shifted} option. Consequently,
+ all of the options for the \keyword{\Tableau} and \keyword{\Diagram}
+ commands can be used with \keyword{\ShiftedTableau} and
+ \keyword{\ShiftedDiagram}, respectively. In particular, options like
+ \option{skew boxes} can be used to highlight the shifted part of the
+ diagram
+
+ \begin{example}
+ \ShiftedTableau[skew boxes]{1*23,4*5} \quad
+ \ShiftedDiagram[skew border]{3,2}
+ \end{example}
+
+ The \option{entries} key works as expected for shifted diagrams:
+
+ \begin{Example}
+ \ShiftedDiagram[entries=contents]{3,2,1} \qquad
+ \ShiftedDiagram[entries=first]{4,2,1} \qquad
+ \ShiftedDiagram[entries=hooks]{4,2,1} \qquad
+ \ShiftedDiagram[entries=last]{4,2,1} \qquad
+ \ShiftedDiagram[entries=residues, e=3]{4,2,1}
+ \end{Example}
+
+ The definition of hook lengths for shifted diagrams can be found, for
+ example, in \cite{Konvalinka:ShiftedHookLengths}.
+
+ % --------------------------------------------------------------
+ \subsection{Tabloids}
+ \label{S:Tabloid}
+ \indexcmd{Tabloid}
+
+ A \emph{tabloid} is an equivalence class of tableau, where two tableaux
+ are equivalent if they have the same entries in each row, up to a
+ permutation. In the literature, tabloids are usually drawn with lines
+ above and below each row, and without side borders. Tabloids can be
+ drawn with the \keyword{\Tabloid} command.
+
+ \keyword{\Tabloid (x,y) [options] {partition }}
+
+ The \keyword{\Tabloid} command functions in the same way as the
+ \keyword{\Tableau} command, except that it draws tabloids. In fact,
+ the \keyword{\Tabloid} is a special case of the \keyword{\Tableau}
+ command with the \option{tabloid} option set.
+
+ \begin{example}
+ \tikzset{R/.style={fill=red!20,circle,minimum size=5mm}}
+ \Tabloid[ukrainian]{12[R]3,45}\quad
+ \Tabloid[english] {12[R]3,45}\quad
+ \Tabloid[french] {12[R]3,45}
+ \end{example}
+
+ The \aTableau package does not provide a dedicated command for tabloid
+ diagrams, however, they can be drawn using the \keyword{\Diagram}
+ command together with the \option{tabloid} option:
+
+ \begin{example}
+ \Diagram[tabloid]{3^2,1} \qquad
+ \Diagram[tabloid, french]{3,1^2}
+ \end{example}
+
+ Some authors work with \emph{column tabloids}. Such tableaux do not
+ have a dedicated \aTableau command, however, they can be drawn using the
+ \option{conjugate} option: \index{tabloids!column}
+
+ \begin{example}
+ \Tabloid[conjugate]{123,4} \qquad
+ \Diagram[conjugate, tabloid]{3,1} \qquad
+ \end{example}
+
+ Similarly, skew tabloids and shifted tabloids can be drawn using the \option{skew}
+ option.
+ \label{tabloids!skew}
+
+ \begin{example}
+ \Tabloid[skew={2,1}]{19{11},29{10},6} \qquad
+ \Tabloid[conjugate, skew={0,1,2}]{19{11}7,29{10},6}
+ \end{example}
+
+
+ % --------------------------------------------------------------
+ \subsection{Ribbon tableaux}\label{S:RibbonTableaux}
+ \indexcmd{RibbonTableau}
+ \index{ribbon!head}
+ \index{tableau!ribbon tableau}
+
+ A \emph{ribbon} in a tableau, or a diagram, is a connected strip of
+ boxes~$R$ that are totally ordered by their contents. (Recall from
+ \autoref{SS:entries} that the content of the box in row~$a$ and
+ column~$b$ is $b-a$.) Therefore, a ribbon does not contain a
+ \Diagram[scale=0.3, border=false, align=bottom]{2^2}-square, and if
+ $(a,b)\in R$ then at most one of $(a+1,b)$ and $(a,b-1)$ belongs
+ to~$R$. The \emph{head} of a ribbon~$R$ is the unique node of maximal
+ content. A \emph{ribbon tableau} is a tableau that is tiled by
+ ribbons. A box is a ribbon of length~$1$, so every tableau is a ribbon
+ tableau.
+
+ \keyword{\RibbonTableau (x,y) [options] {ribbon specifications}}
+
+ Like the other commands, the $(x,y)$-coordinates are optional and are
+ required if, and only if, the diagram is being used as part of a
+ \keyword{tikzpicture} environment. All options for the
+ \keyword{\Tableau} command can be used for the ribbon command, so we
+ refer to \autoref{S:Tableau} for a description of the available
+ options.
+
+ % --------------------------------------------------------------
+ \subsubsection{Ribbon specifications}
+ Unlike the \keyword{\Tableau} command, the entries of a ribbon tableau
+ are given by ribbon specifications (rather than tableau)
+ specifications. Ribbon specifications are also used by the three keys
+ \option{ribbons}, \option{paths}, and \option{snobs}, which were
+ introduced in \autoref{SS:TableauOptions}.
+
+ To understand the ribbon specifications, observe that if $(a,b)$ is
+ the head of a ribbon, then we can walk along the ribbon by specifying
+ whether the \textsf{r}ow index increases or the \textsf{c}olumn index
+ decreases. That is, a ribbon is uniquely determined by specifying its
+ head $(a,b)$ together with a sequence of $\textsf{r}$'s and
+ \textsf{c}'s to indicate when the row index increases, or the column
+ index decreases, respectively. For example, vertical and horizontal
+ ribbons are given by a sequences of \textsf{r}'s and \textsf{c}'s,
+ respectively:
+
+ \begin{example}
+ \aTabset{align=top, no border}
+ \RibbonTableau{11rrrr} \qquad
+ \RibbonTableau{16ccccc}
+ \end{example}
+
+ The border of a ribbon tableau is the smallest (skew) partition that
+ contains all of its ribbons. In the last example shows, the
+ \option{no border} key is used to disable the ribbon tableau border so
+ that we can better see the ribbon, which is the full diagram in these
+ two cases.
+
+ The following diagram shows a see-sawing ribbon with head in row~$1$
+ and column~10, and tail in row~$5$ and column~$1$.
+
+ \begin{example}
+ \RibbonTableau{1{10}crcrcrcrccccc}
+ \end{example}
+
+ As with tableau entries, each box in a ribbon can be preceded with a
+ style specification, either using \keyword{*} for the \option{star
+ style} or using \keyword{[...]} for more customised style
+ specifications.
+
+ \begin{example}
+ \RibbonTableau{
+ *1{10}c*rc*rc*rc*rc*cc*cc,
+ *18c[fill=red]rc[fill=blue]rc*rc*cc[fill=teal]c,
+ [fill=green]16c*rc*rc*cc,
+ *14c[{draw=purple,ultra thick}]cc[fill=orange]r,
+ [{fill=yellow,draw=red,ultra thick}]23
+ }
+ \end{example}
+
+ In particular, the yellow box in this example highlights that boxes
+ are ribbons of length~$1$. Most of the time, you want to style the
+ entire ribbon rather than styling the individual boxes in the ribbon.
+ Optionally, the style for the entire ribbon can be given inside
+ parentheses $(...)$ at the \textit{start} of the ribbon. Unlike the
+ other style specifications, the $*$-shorthand for the \option{star
+ style} cannot be applied to an entire ribbon.
+
+ \begin{example}
+ \RibbonTableau{
+ (fill=red)1{10}crcrcrcrccc_Ccc,
+ (fill=orange)18crcrc*rcc_Bcc,
+ (fill=yellow)16crcr[fill=cyan]c_Acc,
+ (fill=green)14cccr,
+ (fill=blue)23
+ }
+ \end{example}
+
+ Any styles for a ribbon are applied to the region bounded by the
+ closed path given by the border of the ribbon. The ribbon style is
+ applied first, after which any styled boxes in ribbon are drawn. As
+ this example shows, the optional style of any box in the ribbon takes
+ precedence over the style of the full ribbon.
+
+ Finally, it is often necessary to label some of the boxes in the
+ ribbon. Optionally, text can be added to the boxes in a ribbon by
+ supplying it as a \textit{subscript} to the corresponding entry in the
+ ribbon specification:
+
+ \begin{example}
+ \RibbonTableau[french] { 12_1 c_2 r_3 } \quad
+ \RibbonTableau[ukrainian] { 12_a c_b r_c } \quad
+ \RibbonTableau[australian]{ 12_{1_a} c_{2_b} r_{3_c} }
+ \end{example}
+
+ Here we have put spaces between the entries for the different boxes
+ in the ribbon for clarity. There are often many ways to draw the same
+ ribbon tableau, especially if the entries have styling.
+
+ \begin{example}
+ \tikzset{Fill/.style={fill=#1!20!white},
+ B/.style={Fill=blue}, R/.style={Fill=red}, Y/.style={Fill=yellow}}
+ \RibbonTableau{ [B]12_1 [R]c_2 [Y]r_3} \qquad
+ \RibbonTableau{ [B]12_1, [R]11_2, [Y]21_3 } \qquad
+ \Tableau{ [B]2 [R]1, [Y]3 }
+ \end{example}
+
+ As shown, the easiest way to draw this particular tableau is using the \keyword{\Tableau} command.
+
+ There is no dedicated syntax for putting a label on the boundary
+ between two boxes in the diagram, but this can be done using the named
+ anchors of~\autoref{E:NodeNames}.
+
+ \begin{example}
+ \RibbonTableau[shifted, tikz after={
+ \node at (A-1-2.east){$1$};
+ \node at (A-2-2.east){$2$};
+ }]{ 14c, 12c, 23c }
+ \end{example}
+
+ Here is an example of a $3$-ribbon skew tableau.
+
+ \begin{example}
+ \RibbonTableau[skew={2^2,1^2}, skew border]{
+ 14c_0r,15r_1c, 18c_7c,26r_9r,
+ 34c_2c,35r_8r,42r_3c, 44c_4r,
+ 54r_6c,62c_5r
+ }
+ \end{example}
+
+ We have now seen the full ribbon specifications. To summarise:
+ \begin{itemize}[nosep]
+ \item The ribbon specification starts with optional \TikZ-styling
+ for the ribbon (or path), enclosed in $(...)$.
+ \item The first entry in the ribbon is given as
+ \textsf{a}\textsf{b}, if the head of the ribbon is in row
+ \textsf{a} and column \textsf{b}. The remaining entries in the
+ ribbon are specified by a sequence of \textsf{r}'s and \textsf{c}'s,
+ depending on whether the next box in the ribbon is given by
+ increasing the row index, or decreasing the column index,
+ respectively.
+ \item Optionally, each box in the ribbon, including the head, can be
+ given \TikZ-styling by prefixing it with a $*$, which gives the
+ box the \option{star style}, or by giving \TikZ-styling keys inside
+ square brackets $[...]$.
+ \end{itemize}
+
+ Finally, when drawing the border, all ribbons in a
+ \keyword{\RibbonTableau} are assumed to be contained in the smallest
+ Young diagram that contains the ribbons. This said, it is up to you to
+ ensure that the boxes in the ribbon do not have negative column
+ indices. Inside a \keyword{\Diagram} or \keyword{\Tableau} command,
+ any ribbons added using \option{paths}, \option{ribbons}, or
+ \option{snobs} do not affect the border of the diagram or tableau. You
+ can draw paths, ribbons, and snobs so that their boxes are either
+ inside or outside the border of the diagram or tableau. It can be
+ useful to place boxes outside of the diagrams.
+
+ \option[]{paths=path specifications}[comma separated ribbon specifications]<ribbons>
+ \option*[]{ribbons=ribbon specifications}[comma separated ribbon specifications]<ribbons>
+ \option*[]{snobs=snob specifications}[comma separated ribbon specifications]<ribbons>
+
+ You can add \option{ribbons}<ribbons>, \option{paths}<ribbons> and
+ \option{snobs}<ribbons> to a \keyword{\RibbonTableau} in exactly the
+ same way that you add them to \keyword{\Tableau}. At first sight, it
+ seems unnecessary to add \option{ribbons}<ribbons> and
+ \option{snobs}<ribbons> because ribbon tableaux are composed of
+ ribbons. The point is that any ribbon added to a tableau using
+ \option{ribbons}<ribbons> or \option{snobs}<ribbons> is not assumed to
+ be inside the border of the tableau.
+
+ \begin{example}
+ \RibbonTableau[
+ styles={A={fill=green!10, text=teal}, R={fill=yellow!10, text=red}},
+ ribbons={[A]15_A,[A]24_A,[A]41_A, [R]14_R,[R]33_R}
+ ]{11, (fill=blue!10)12rc, 14crrcc}
+ \end{example}
+
+ Here is a cute use of \option{paths} to add arrows to a skew
+ $2$-ribbon tableau:
+
+ \begin{example}[lefthand width=0.35\textwidth]
+ \RibbonTableau[skew={4,3,2,1},
+ styles={L={red,semithick,->}, R={red,semithick,<-}},
+ paths ={ (L)15c, (L)17c, (L)24c, (L)26c,
+ (R)32r,(R)41r,(R)52r,(R)61r, (R)34c},
+ tikz after = { % node labels: row/col/label
+ \foreach \r/\c/\l in {1/6/0,1/8/6,2/5/3,2/7/8}
+ { \node at (A-\r-\c.west){\l};}
+ \foreach \r/\c/\l in {5/1/1,4/2/2,3/3/5,7/1/4,6/2/7}
+ { \node at (A-\r-\c.south){\l};}
+ }
+ ]{ 16c,18c, 25c, 27c, 33r, 42r, 51r, 62r,71r }
+ \end{example}
+
+ The arrows are added by the \option{paths} key using the two styles
+ \textsf{L} and \textsf{R}, which draws ``left'' and ``right'' arrows
+ between the two boxes, where left and right is with respect to the
+ line-order of the two boxes in the corresponding draw command. The
+ two \keyword{\foreach}-statements might look complicated, but they are
+ just loops that add the entries to the tableau. These loops set
+ \keyword{\r}, \keyword{\c} and \keyword{\l} equal to the row index,
+ column index and label, respectively, using the two lists of
+ \keyword{\r}\!/\!\keyword{\c}\!/\!\keyword{\l} triples given above.
+
+ \option[draw=\aTableauColour{Inner}, thin]{ribbon style=style}{\TikZ-styling}
+ \option*[]{ribbon box style=style}{\TikZ-styling}
+
+ Use the \option{ribbon style} and \option{ribbon box} keys to
+ append to the default styling of the ribbons, and the boxes in the
+ ribbons, respectively. By default, the full ribbon has inner wall
+ styling, but the boxes in ribbons have no styling. If you want inner
+ walls, then they can be added using the \option{ribbon box} key.
+
+ \begin{example}
+ \RibbonTableau[ribbon style={draw=red, thick,
+ fill=orange!20}]{16_1r_2c_3c_4c_5c_6r_7c_8}
+ \RibbonTableau[ribbon box style={fill=orange!20,
+ draw=magenta}]{16_1r_2c_3c_4c_5c_6r_7c_8}
+ \end{example}
+
+ Ribbons are drawn by first drawing the full ribbon, applying
+ \option{ribbon style}, then the empty boxes in the ribbon are drawn,
+ and, finally, any boxes in the ribbon that have styling or an entry
+ are added. In particular, if the style \option{ribbon box} draws an
+ outline around a box then this has precedence over any outline added
+ by \option{ribbon style} since \option{ribbon box} is applied last.
+
+ \option[]{ribbon box=text}{default box contents}
+
+ You can add content to the boxes in a ribbon using subscripts in
+ the ribbon specifications. Alternatively, you can use
+ \option{ribbon box} if you want to add the same
+ content to each box in the ribbon.
+
+ \begin{example}
+ \RibbonTableau[ribbon box=\times]{14rccrc}\qquad
+ \RibbonTableau[ribbon box=\bullet]{14_1rc_2cr_3c}
+ \end{example}
+
+ As shown, whenever a box entry is given as a subscript it is used
+ instead of the value of \option{ribbon box}. If a ribbon
+ tableau contains multiple ribbons, then \option{ribbon box} is used
+ for all ribbons.
+
+ Similarly, there are keys \option{path style}, \option{path box},
+ \option{path box style}, \option{snob style}, \option{snob box} and
+ \option{snob box style} that work in exactly the same way. Most of the
+ \keyword{\Tableau} keys work as expected for ribbon tableaux.
+
+ % --------------------------------------------------------------
+ \subsection{Multidiagrams and multitableaux}\label{S:Multitableau}
+ \indexcmd{Multidiagram}
+ \indexcmd{Multitableau}
+ \index{diagram!multidiagram}
+ \index{tableau!multitableau}
+
+ Multitableaux and multidiagrams are $\ell$-tuples of tableaux and
+ diagrams, respectively. Such diagrams appear in many places in representation
+ theory, such as when considering representations of wreath products
+ or cyclotomic Hecke algebras. For convenience, \aTableau provides
+ the \keyword{\Multidiagram} and \keyword{\Multitableau} commands for
+ drawing these diagrams, even though it is possible to construct
+ such tableaux and diagrams using the \keyword{\Tableau} and
+ \keyword{\Diagram} commands.
+
+ \keyword{\Multidiagram (x,y) [options] {multipartition specifications} }\newline
+ \keyword{\Multitableau (x,y) [options] {multitableau specifications} }
+
+ \index{components}
+ \index{multidiagram!components}
+ \index{multitableau!components}
+ Our preferred notation for a multipartition $\blam$ is to write
+ $\blam=(\lambda^{(1)}|\lambda^{(2)}|\dots|\lambda^{(\ell)})$, where
+ $\ell\ge1$ is the \emph{level} and the partitions
+ $\lambda^{(1)},\dots,\lambda^{(\ell)}$ are the \emph{components}
+ of~$\blam$. Similarly, a multitableau is written as
+ $\T=(\T^{(1)}|\dots|\T^{(\ell)})$, where the tableaux
+ $\T^{(1)},\dots,\T^{(\ell)}$ are the \emph{components} of~$\T$.
+ Accordingly, in the \keyword{\Multidiagram} and
+ \keyword{\Multitableau} commands, the pipe symbol \keyword{|} is used
+ to separate components:
+
+ \begin{example}
+ \aTabset{scale=0.7}
+ \Multidiagram{3,2^2|2,1,1|1}
+ \Multitableau[box font=\tiny]
+ { 123,45,67 | 89,{10},{11} | {12}{13}{14} }
+\end{example}
+
+ As shown, the \keyword{\Multidiagram} command accepts exponential
+ notation for multipartitions. The entries in a \keyword{\Multitableau} can
+ be given optional styling specifications, exactly as inside the
+ \keyword{\Tableau} command.
+
+ \begin{example}
+ \tikzset{R/.style={fill=red!10,text=magenta}}
+ \Multitableau{1*24,*68 | [R]9{10},{11}}
+ \end{example}
+
+ Multitableaux and multidiagrams can, in principle, have arbitrary
+ level. In practice, the level is constrained by the page width.
+
+ \begin{example}
+ \Multitableau[french]{1,2 | 3,4 | 5,6 | 7,8 | 9,{10}}
+ \end{example}
+
+ Both the \keyword{\Multitableau} and \keyword{\Multidiagram} commands
+ accept a special component, \keyword{...}, that is used to add dots between the
+ separators:
+
+ \begin{example}
+ \aTabset{scale=0.7}
+ \Multidiagram{3,2^2|...|1}
+ \Multitableau[box font=\tiny]
+ {123,45,67 | ... | {12}{13}{14}}
+ \end{example}
+
+ The \keyword{\Multitableau} and \keyword{\Multidiagram} commands
+ accept most of the options of the \keyword{\Tableau} and
+ \keyword{\Diagram} commands, together with a few options that are
+ specific to multitableaux and multidiagrams. This section describes
+ the new options, and highlights how some of the other options are used.
+
+ \option[-]{english}
+ \option*[]{french}
+ \option*[]{ukrainian}
+ \option*[]{australian}
+
+ All four tableaux conventions are supported for multitableaux and
+ multidiagrams, with the caveat that all component diagrams use the
+ same convention.
+
+ \begin{example}
+ \aTabset{scale=0.7}
+ \Multidiagram[french]{3,2^2|...|1}
+ \Multitableau[ukrainian, box font=\tiny]
+ {123,45,67 | ... | {12}{13}{14}}
+ \end{example}
+
+ \option[]{conjugate}
+ \index{conjugate!multidiagram}
+ \index{conjugate!multitableau}
+ \index{multidiagram!conjugate}
+ \index{multitableau!conjugate}
+
+ The \option{conjugate} option prints the conjugate multitableaux and
+ multidiagrams. Conjugation for multitableaux and multidiagrams reverses
+ the order of the components and then conjugates the component
+ diagrams.
+
+ \begin{example}
+ \aTabset{scale=0.6, box font=\scriptsize}
+ \Multitableau[conjugate]{ 123,45 | 67,89} \quad
+ \Multidiagram[conjugate]{ 3,2 | 1^2 }
+ \end{example}
+
+ \option[()]{delimiters}[pair of \LaTeX{} delimiters]
+ \option*[(]{left delimiter}[a \LaTeX{} delimiter]
+ \option*[)]{right delimiter}[a \LaTeX{} delimiter]
+
+ The delimiter options control the delimiters that are put on the left
+ and right of multitableaux and multidiagrams. These options accept any
+ \LaTeX{} delimiter.
+
+ \begin{example}
+ \aTabset{scale=0.7}
+ \Multidiagram[left delimiter=\langle,
+ right delimiter={]}]{2,1|1} \quad
+ \Multidiagram[delimiters={\|}{\}} ]{1^2|2}
+ \end{example}
+
+ To remove a delimiter, set \option{left delimiter} or
+ \option{right delimiter} to nothing.
+
+ \begin{example}
+ \Multitableau[left delimiter=, right delimiter=]
+ {123,45,67|{12}{14}}
+ \end{example}
+
+ \option[\textbackslash textendash]{empty=text}[any \LaTeX{}]
+
+ The \option{empty} option determines what is printed when a component
+ diagram is empty. By default, the en-dash symbol \textendash{} is
+ used.
+
+ \begin{example}
+ \Multitableau{ 123,45 | | 67,89} \par\bigskip
+ \Multidiagram[empty=$\emptyset$]{ 3,2 | | 2^2 }
+ \end{example}
+
+ \begin{warning}
+ By default, the \option{empty} key is typeset as text and \emph{not}
+ as mathematics, which is the default for the tableau boxes.
+ \end{warning}
+
+ \option[]{entries=value}[contents, first, hooks, last, residues]<multitableau>
+ \option*[]{charge=offsets}[$|$-separated list of charges]<multitableau>
+
+ \index{contents}
+ \index{residues}
+ \index{contents!multitableau}
+ \index{first tableau!multitableau}
+ \index{hooks!multitableau}
+ \index{last tableau!multitableau}
+ \index{residues!multitableau}
+ \index{entries!multitableau}
+ \index{multidiagram!show}
+ \index{multitableau!contents}
+ \index{multitableau!first}
+ \index{multitableau!hooks}
+ \index{multitableau!last}
+ \index{multitableau!residue}
+
+ The \option{entries} key automatically fills in particular types of
+ entries for you to draw the requested tableau of the specified shape.
+ Use \option{charge} to provide offsets in each component when using
+ \option{entries=contents} and \option{entries=residues} {(}the
+ \option{charge} is ignored when using \option{entries=first} and
+ \option{entries=last}).
+
+ \nopagebreak[0]
+ The possible choices are:
+ \begin{itemize}
+
+ \item\option{entries=first} print the \emph{first} \textbf{standard} tableau of this
+ shape, which has the numbers $1,2\dots,n$ entered in order from top
+ left to right along down successive rows (with appropriate modifications for
+ the non-English conventions).
+
+ \begin{example}
+ \Multidiagram[entries=first]{3,1^2|2^2,1}
+ \end{example}
+
+ \item\option{entries=last} print the \emph{last} \textbf{standard} tableau of this
+ shape, which has the numbers $1,2\dots,n$ entered in order from top
+ to bottom down successive columns, and right to left along components (with appropriate modifications for
+ the non-English conventions).
+
+ \begin{example}
+ \Multidiagram[entries=last]{3,2,2|2^2}
+ \end{example}
+
+ \item\option{entries=hooks} print the diagram where each box in each
+ component is labelled by the corresponding \emph{hook length}.
+
+ \begin{example}
+ \Multidiagram[entries=hooks]{3,1^2|3^3}
+ \end{example}
+
+ \item\option{entries=contents} print the diagram where each box is
+ labelled by its \emph{content}, which is the row index minus the
+ column index.
+
+ \begin{example}
+ \Multidiagram[entries=contents,
+ charge={0,2}] {3,2,1|2^2}
+ \end{example}
+
+ As shown, the \option{charge} offsets the contents in each
+ component.
+
+ \item\option{entries=residues} print the diagram where each box is
+ labelled by its \emph{residue}, which is the row index minus the
+ column index modulo some integer~$e$, which must also be supplied.
+
+ \index{residues}
+ \index{tableau!residues}
+ \begin{example}
+ \Multidiagram[entries=residues, e=2]{3,2,1|1^3}
+ \end{example}
+
+ Specifying the \option{charge} offsets the residues in each component.
+
+ \begin{example}
+ \Multidiagram[french, entries=residues, e=3,
+ charge={1,2}]{3,2,1|1^2}
+ \end{example}
+
+ \medskip\noindent
+ As in \autoref{SS:entries}, residues for the other affine Cartan types
+ can be specified using \option{cartan=value}.
+
+ \end{itemize}
+
+ \option[]{label=labels}[a $|$-separated list of labels]
+
+ Use \option{label} to add labels to the component diagrams.
+
+ \begin{example}
+ \Multitableau[label={1|2}]{123,45,67|{12}{14}}
+ \end{example}
+
+ No extra space is allowed for the labels, so use the
+ \option{separation} key, or \option{xoffsets} and \option{yoffsets},
+ to adjust for wide labels.
+
+ \option[A]{name=text}[character]<multi>
+
+ The \option{name} option is used to change the default prefix for the
+ box node names. In a tableau, or diagram, the box names depend on the
+ \emph{row} and \emph{column} indices. In a multitableau, or
+ multidiagram, the box names depend on the \emph{component}, \emph{row}
+ and \emph{column} indices. Explicitly, by default, in multitableaux
+ and multidiagrams the names of the take the form \textsf{A-k-r-c},
+ where~\textsf{k} is the component index,~\textsf{r} is the row index,
+ and~\textsf{c} is the column index of the box.
+ \footnote{This follows the convention for nodes in multidiagrams
+ from~\cite{EvseevMathas:DeformedKLR}, rather than the somewhat misguided
+ convention that the author introduced in~\cite{DJM:cyc}.}
+ The \textsf{B} can be changed like using the \option{name} key.
+
+ \begin{example}
+ \Multitableau[name=A, tikz after = {
+ \draw[red, thick,<->](A-1-2-2.south east) to
+ [out=315,in=225] (A-2-2-1.south west);
+ }] { 123,4*5 | 67,*89}
+ \end{example}
+
+ \option[]{paths=path specifications}[a $|$-separated list of ribbon path specifications]<multi>
+ \option*[]{ribbons=ribbon specifications}[a $|$-separated list of ribbon specifications]<multi>
+ \option*[]{snobs=snob specifications}[a $|$-separated list of ribbon specifications]<multi>
+
+ The \option{paths}<multi>, \option{ribbons}<multi>, and
+ \option{snobs}<multi> keys work in exactly the same way for
+ multitableaux and multidiagrams as they do for tableaux and diagrams,
+ except that the ribbons for different components are separated by a
+ pipe $|$.
+
+ \begin{example}
+
+ \Multitableau[ribbons={(R)11*r | (Y)12rc},
+ styles={R={fill=red!10, opacity=0.5},
+ Y={fill=yellow!20, opacity=0.5}
+ }] { 123,45 | 67,89}
+ \end{example}
+
+ Notice that the $4$ is the first component has disappeared because
+ the second node in the ribbon \textsf{(R)11*r} has $*$-styling, which
+ writes over the $4$. (One way to recover the missing entry is to use the
+ ribbon specification \textsf{(R)11*r\textunderscore4}.)
+
+ \option[]{rows=number}[a decimal number]
+
+ The \option{rows} option sets the number of rows covered by the
+ delimiters in multitableaux and multidiagram. By default, the
+ \keyword{\Multitableau} and \keyword{\Multidiagram} set
+ the size of the delimiters so that they match the component diagrams, which may
+ not be what you want especially when using the \option{australian} and
+ \option{ukrainian} conventions. The value of \option{rows} can be a
+ decimal number.
+
+ \begin{example}
+ \Multidiagram[ukrainian, scale=0.5]{3,2^2|...|2,1^2}
+ \end{example}
+
+ \begin{example}
+ \Multitableau[rows=3, scale=0.8, box font=\tiny]
+ {{1_1}{1_1}{1_1}{2_1},{2_1}{2_1}{2_1} |
+ {1_2}{3_3},{2_2} |
+ {1_3}{1_3},{2_3}}
+ \end{example}
+
+ \begin{example}
+ \Multitableau[ukrainian, rows=2.5, scale=0.8, box font=\tiny]
+ {{1_1}{1_1}{1_1}{2_1},{2_1}{2_1}{2_1} |
+ {1_2}{3_3},{2_2} |
+ {1_3}{1_3},{2_3}}
+ \end{example}
+
+ \option[true]{separators}[true/false]
+ \option*[false]{no separators}[false/true]
+
+ When \option{separators} is true, delimiters are drawn around the
+ component diagrams in a multitableaux and a multidiagram and
+ separators are drawn between the component shapes, and
+ \option{no separators} is the inverse option. By default, separators
+ and delimiters are drawn.
+
+ \begin{example}
+ \Multitableau[separators, scale=0.8]
+ {123,45,67 | 89,{10}{11}} \par\bigskip
+ \Multidiagram[no separators, scale=0.7]
+ {3,2^2|2,1^2} \par\bigskip
+ \end{example}
+
+ \option[$|$]{separator=text}[character]
+
+ The \option{separator} determines what is printed between the
+ component diagrams in multitableaux and multipartition. By default,
+ \option{separator=$|$} draws a straight line between the
+ components, but any character can be used.
+
+ \begin{example}
+ \Multitableau[separator={,}]{ 123,45 | 67,89} \par\bigskip
+ \Multidiagram[separator=:]{ 3,2 | 2^2 }
+ \end{example}
+
+ \option[\aTableauColour{Main}]{separator colour=colour}[a \LaTeX{} colour]
+
+ The \option{separator colour} sets the colour of the delimiters and
+ the separator between component diagrams. By default, the separators
+ are the same colour as the diagram border.
+
+ \begin{example}
+ \Multitableau[separator colour=red]{123,45 | 67,89} \par\bigskip
+ \Multidiagram[separator color=brown, separator=:]
+ {3,2 | 2^2 }
+ \end{example}
+
+ \option[0.3]{separation=number}[a decimal number (the distance in \unit{cm})]
+
+ The \option{separation} key sets the distance between the separators
+ and the component tableaux and diagrams.
+
+ \begin{example}
+ \Multitableau[separation=0.1]{123,45 | 67,89} \par\bigskip
+ \Multidiagram[separation=0.8]{3,2 | 2^2}
+ \end{example}
+
+ \option[]{skew=partitions}{a $|$-separated list of partitions}
+
+ Skew multishapes can be drawn using the \option{skew} option to
+ specify a $|$-separated list of inner shapes.
+
+ \begin{example}
+ \Multitableau[skew={2,1|1}]{ 123,45 | 7{10},89} \par\bigskip
+ \Multidiagram[skew={1|2,1}, skew boxes]{ 3,2 | 2^2 }
+ \end{example}
+
+ There is no command for drawing shifted multitableau or multidiagrams.
+ Such diagrams can be drawn using the
+ \option{skew} key. In the same way, it is possible to draw
+ multitableaux and multidiagrams with components that are a mixture of
+ non-skew, skew and shifted shapes.
+
+ \begin{example}
+ \Multitableau[skew={0,1|0,1}]{ 1236,45 | 7{10}{11},89} \par\bigskip
+ \Multidiagram[skew={|0,1}]{ 3,2 | 2,1 }
+ \end{example}
+
+ \option[true]{tabloid}[true/false]
+
+ Use the \option{tabloid} key for multitabloid diagrams and tableaux.
+
+ \begin{example}
+ \Multitableau[tabloid]{ 123,45 | 67,89} \par\bigskip
+ \Multidiagram[tabloid]{ 4,2 | 2^2 }
+ \end{example}
+
+ \option[0]{xoffsets=offsets}[$|$-separated list of $x$-offsets]
+ \option*[0]{yoffsets=offsets}[$|$-separated list of $y$-offsets]
+
+ The \keyword{\Multitableau} and \keyword{\Multidiagram} commands try
+ to draw the diagrams as compactly as possible with their first rows
+ aligned, and the distance between the separators given by the value of
+ \option{separation}. Use \option{xoffsets} to offset the
+ $x$-coordinates of the component diagrams and \option{yoffsets} to
+ offset their $y$-coordinates.
+
+ \begin{example}
+ \Multitableau[xoffsets={0.5,0.2}]{ 123,45 | 67,89} \par\bigskip
+ \Multidiagram[yoffsets={0,1.5}]{ 4,2 | 2^2 }
+ \end{example}
+
+ When using \option{xoffsets} or \option{yoffsets}, you may want to use
+ \option{no separators} to disable the separators between component
+ shapes. For example, here is a homogeneous Garnir tableau using the
+ style of~\cite{KMR:UniversalSpecht}, where no separators are used and
+ the component tableaux are stacked vertically.
+
+ \begin{example}[label=Ex:Garnir]
+ \Multidiagram[entries=first, no separators,
+ xoffsets={0|-1.1}, yoffsets={0|-1},
+ styles={O={fill=orange!50}, P={fill=purple!50}},
+ snob style={draw=red,double,thick,fill=white},
+ snobs={|(O)24_{15}c_{14}, (P)26_{17}c_{16}, 27_{18},
+ 31_{11}, (P)33_{13}c_{12}}
+ ]{1|7^2,4,1}
+ \end{example}
+
+ This is a slightly lazy way of drawing this multitableau because
+ \option{entries=first} is used to automatically populate most of the
+ entries and then \option{snobs=...} are used to rewrite the ``bricks''
+ in the homogeneous Garnir belt.
+
+ % --------------------------------------------------------------
+ \section{Abacuses} \label{S:Abacus} \index{abacus} \indexcmd{Abacus}
+
+ Gordon James introduced the abacus, with beads and runners, as another
+ way to represent a partition~\cite{James:YoungD}. The abacus is
+ particularly useful in modular representation theory, where the number
+ of runners is the (quantum) characteristic. Abacus combinatorics are
+ now used to help many algebras beyond their initial appearance in the
+ representation theory of the symmetric groups.
+
+ The partition corresponding to an abacus is given by counting the
+ number of empty bead positions before each bead on the abacus. The
+ \keyword{\Abacus} command, which draws an abacus representation of a
+ partition, has a similar syntax to the tableau and diagram commands.
+
+ \keyword{\Abacus (x,y) [options] {number of runners} {bead specifications}}
+
+ As with other \aTableau commands, the $(x,y)$-coordinates are
+ necessary if, and only if, the abacus is part of a
+ \keyword{tikzpicture} environment. The number of runners is a
+ positive integer that specifies the number of abacus runners.
+
+ % --------------------------------------------------------------
+ \subsection{Bead specifications}
+
+ In their simplest form, the bead specifications are a comma separated
+ list of non-negative integers specifying a partition. Partitions can
+ be given either as comma separated lists of non-negative integers, or
+ using exponential notation. The full bead specifications add optional
+ styling and bead labels.
+
+ Here are some examples showing basic usage of the \keyword{\Abacus}
+ command:
+
+ \begin{Example}
+ \aTabset{align=top}
+ \Abacus{1}{2,1,1} \qquad \Abacus{2}{2,1^2,0^3} \qquad \Abacus{3}{2,1^2,0^5} \qquad
+ \Abacus{4}{2,1^2,0^5} \qquad \Abacus{5}{2,1^2,0^5} \qquad \Abacus{6}{2,1^2,0^5}
+ \end{Example}
+
+ The beads in an abacus correspond to the parts of the partition. Just
+ as with the \keyword{\Tableau} command, each of the beads can be given
+ optional styling, which can either be given by prepending a
+ \keyword{*}, which applies the \option{abacus star style}, or by
+ giving \TikZ styling-keys inside square brackets \keyword{[...]}.
+ When exponential notation is used, the styles are applied to all of the
+ associated beads.
+
+ \begin{example}
+ \aTabset{align=top}
+ \Abacus{3}{3,*2^3,1} \qquad
+ \Abacus{4}{2,*1,[ball color=red]1^2, *1,
+ [ball color=orange]1,[ball color=brown]0}
+ \end{example}
+
+ In particular, in the right-hand abacus, the two beads corresponding
+ to \keyword{1^2} are coloured red, whereas the other three beads that
+ correspond to a~$1$ are either orange or an off-white colour, which is
+ the default \option{abacus star style}. As with the tableaux commands,
+ we recommend using \keyword{\tikzset} to define more complicated bead styles.
+
+ In addition to applying style to the individual beads on the abacus,
+ \emph{labels} for any bead can (optionally) be given as a subscript in the
+ bead specifications. Again, the same labels are applied to all of the
+ corresponding beads when exponential notation is used.
+
+ \begin{example}
+ \Abacus{2}{5_5, 4_4, 3_3, 2_2,0_0} \qquad
+ \Abacus[styles={R={ball color=red, text=yellow}}]
+ {3}{*5^2_5, [R]4^3_4, 3, 2_2,*0^2_{oo}} \qquad
+ \Abacus{4}{8^2_-,7_+,5_a,4^2_b,1_\times^3,1_d}
+ \end{example}
+
+ The bead labels are arbitrary, however, anything wider than the bead
+ will spill into the abacus. Traditionally, abacus beads are not labelled,
+ but you can give labels to as many beads as you like.
+
+ You can remove beads that you have placed on the abacus using the \emph{no shade} style%
+ \footnote{\TikZ \emph{does not} provide a way to disable
+ a shading that is already in effect. The \emph{no shade} style, which is
+ based on a \href{https://tex.stackexchange.com/a/85750/234252}{stack exchange post},
+ is available whenever the \aTableau package is loaded.}.
+ The point of being able to remove beads in this way is that this
+ allows you to put something else in its place using the bead label.
+ In such cases, you probably want to change the text colour, which is white
+ by default.
+
+ \begin{example}[label=Ex:NoShade]
+ \Abacus[styles={C={no shade,text=red}}]
+ {5}{8^2_-,7_+,5_a,4^2_b,[C]1_\bullet^3,1_d}
+ \end{example}
+ \index{no shade}
+
+ As with tableau boxes, the bead labels are typeset in
+ mathematics~mode by default. This can changed using
+ \option{math entries} and \option{text entries}.
+ \index{math entries!abacus}
+ \index{text entries!abacus}
+
+ % --------------------------------------------------------------
+ \subsubsection{Abacus coordinates}\label{SS:abcoordinates}
+ \index{xy@$(x,y)$}
+ \index{Cartesian coordinates!abacus}
+
+ The $(x,y)$-coordinates are required if, and only if, the
+ \keyword{\Abacus}command is used inside a \keyword{tikzpicture}
+ environment, in which case $(x,y)$ gives the coordinates of the
+ ``outside corner'' of the box in row~$1$ and column~$1$ of the
+ tableau. The following example shows how tableaux are placed using
+ $(x,y)$-coordinates inside a \keyword{tikzpicture} environment. The
+ example also shows that, by default, the beads and runners in an
+ abacus are half a unit apart.
+
+ \begin{example}
+ \begin{tikzpicture}[add grid]
+ \aTabset{abacus ends=_|}
+ \Abacus(0,0.5) [south] {3}{2,1^2}
+ \Abacus(0,2) [east, bead=red] {3}{2,1^2}
+ \Abacus(2.5,0.5)[north, bead=orange] {3}{2,1^2}
+ \Abacus(3.5,-1) [west, bead=brown] {3}{2,1^2}
+ \end{tikzpicture}
+ \end{example}
+
+ % --------------------------------------------------------------
+ \subsection{Abacus keys}
+
+ The abacus keys, or options, control the general appearance of the
+ abacuses drawn by the \keyword{\Abacus} command. Many of the options,
+ or keys, for tableaux and diagrams can be applied to abacuses, and we
+ do not discuss all of these options here. For example, the
+ \keyword{\Abacus} command accepts the following keys:
+ \option{align}, \AddKeyLink{align-abacus}\AddKeyLink{halign-abacus}\AddKeyLink{valign-abacus}
+ \option{math entries}, \AddKeyLink{math entries-abacus}
+ \option{text entries}, \AddKeyLink{text entries-abacus}
+ \option{name}, \AddKeyLink{name-abacus}
+ \option{scale}, \AddKeyLink{scale-abacus}\AddKeyLink{xscale-abacus}\AddKeyLink{yscale-abacus}
+ \option{styles}, \AddKeyLink{styles-abacus}
+ \option{tikz after}, \AddKeyLink{tikz after-abacus}
+ \option{tikz before}, and \AddKeyLink{tikz before-abacus}
+ \option{tikzpicture}. \AddKeyLink{tikzpicture-abacus}
+ See \autoref{S:keys} for the complete list.
+
+ \option[-]{south}
+ \option*[]{east}
+ \option*[]{north}
+ \option*[]{west}
+
+ Just like tableaux, abacus have four different conventions. By
+ default, abacuses are drawn with the runners pointing to the south,
+ from top to bottom, and runners increasing from left to right. Similar
+ to tableaux, we number the rows $0,1,\dots$, and we number the
+ runners, or columns, $0,1,\dots,e-1$, from left to right (when using
+ \option{south}). If there are $e$ runners, then the bead in row~$r$
+ and column~$c$ is in position $er+c$. See \autoref{Ex:BeadPositions}
+ for an example.
+
+ Using the keys \option{east}, \option{north} and \option{west},
+ abacuses can be drawn so that the row index increases to the east,
+ north, and west, respectively.
+
+ \begin{Example}
+\Abacus[south,entries=betas]{2}{4^2,2,1}\qquad\Abacus[east,entries=betas]{2}{4^2,2,1}\qquad
+\Abacus[north,entries=betas]{2}{4^2,2,1}\qquad\Abacus[west,entries=betas]{2}{4^2,2,1}
+ \end{Example}
+
+ To make these conventions clearer, we have used
+ \option{entries=betas}<abacus> to label the beads in these abacuses by
+ their bead positions, or \emph{beta numbers}.
+
+ \option[$-|$]{abacus ends} [any pair of: $-$, \_\!\_, ., *, $|$, \textgreater]
+ \option*[very thick, draw=\aTableauColour{Inner}]{abacus ends style=style}[\TikZ-styling]
+
+ The \option{abacus ends} key sets the style used for the top and
+ bottom of the abacus. The meaning of these six symbols is the
+ following:
+
+ \begin{quote}
+ \begin{options}[labelwidth=1em, nosep]
+ \item[*$-$] Adds a line that extends slightly past the first and last runners
+ \item[*\_\!\_] Adds a line between the first and last runners
+ \item[*.] Add dots to the end of each runner
+ \item[**] Add dots and an arrow to the end of each runner
+ \item[*$|$] The runners do not have any additional decoration
+ \item[*$>$] Add arrows to the end of each runner
+ \end{options}
+ \end{quote}
+
+ Exactly two of these styling characters must be given when setting
+ \option{abacus ends}. There are six options for the top of the abacus,
+ and six options for the bottom, so there are 36 possible
+ configurations (most of which will never be used...). We do not list
+ all of them, but here are some examples.
+
+ \begin{Example}
+ \aTabset{align=top}
+ \Abacus[abacus ends=-|]{3}{2,1^2,0^3}\qquad\Abacus[abacus ends=-_]{3}{2,1^2,0^3}\qquad
+ \Abacus[abacus ends=_.]{3}{2,1^2,0^3}\qquad\Abacus[abacus ends=>>]{3}{2,1^2,0^3}\qquad
+ \Abacus[abacus ends=>|]{3}{2,1^2,0^3}\qquad\Abacus[abacus ends=_-]{3}{2,1^2,0^3}\qquad
+ \Abacus[abacus ends=>-]{3}{2,1^2,0^3}\qquad\Abacus[abacus ends=-*]{3}{2,1^2,0^3}
+ \end{Example}
+
+ As one more example, \emph{beta numbers} can be displayed on a single
+ runner using:
+
+ \begin{example}
+ \Abacus[abacus ends=**, east, rows=7]{1}{2,1^2,*0^2}
+ \end{example}
+
+ The \option{abacus ends style} key changes the \TikZ-styling of the
+ ends of the abacus. By default, this styling is the same as the
+ styling for the abacus runners, which is set using
+ \option{runner style}. Changes to \option{runner style} also change
+ the style of the abacus ends, but their style is ultimately determined
+ by \option{abacus ends style}.
+
+ \begin{example}
+ \Abacus[abacus ends style={aTableauMain,
+ ultra thick}]{3}{2,1^2,0^3}\qquad
+ \Abacus[runner style=cyan]{3}{2,1^2,0^3}\qquad
+ \Abacus[abacus ends style=aTableauMain,
+ runner style=cyan] {3}{2,1^2,0^3}
+ \end{example}
+
+ \option[ball color=\aTableauColour{StarStyle}, text=\aTableauColour{Main}]{abacus star style=style}
+ [\TikZ-styling]
+
+ The \option{abacus star style} key appends \TikZ-style keys to the
+ abacus $*$-style:
+
+ \begin{example}
+ \Abacus{3}{5,*4_a,*1^2,0^4} \qquad
+ \Abacus[abacus star style={ball color=yellow,text=black}]
+ {3}{5,*4_a,*1^2,0^4}
+ \end{example}
+
+ \option[\aTableauColour{Main}]{bead=colour}[a \LaTeX colour]
+
+ The \option{bead} key sets the bead colour.
+
+ \begin{example}
+ \Abacus{2}{2^3,1} \qquad
+ \Abacus[bead=black]{3}{4^3,2,1} \qquad
+ \Abacus[bead=red]{4}{4^3,[ball color=blue]2,1}
+ \end{example}
+
+ The \option{bead} key changes the colour of every bead on the
+ abacus. As shown, the colour of individual beads can be changed by
+ applying the \TikZ-style \keyword{ball color} to the bead.
+
+ \option[\textbackslash small]{bead font=font command}[\LaTeX\ font command]
+
+ The \option{bead font} key sets the font used for the bead labels.
+ By default, these labels are typeset as mathematics, so
+ this is mainly useful for changing the font size (because, for example
+ \keyword{\bfseries $1$} does not make the $1$ bold). It is only when
+ you are using \option{text entries} that font commands like
+ \keyword{\itshape} and \keyword{\bfseries} will have any effect.
+
+ \begin{example}
+ \Abacus{3}{3_3,2^2,1^3} \qquad
+ \Abacus[bead font=\tiny]{3}{3_3,2^2,1^3} \qquad
+ \Abacus[text entries, bead font=\bfseries]{3}{3_3,2^2,1^3}
+ \end{example}
+
+ The \option{scale} key can also be used to resize abacuses.
+
+ \option[0.4]{bead size=number}[decimal number, distance in \unit{cm}]
+ \option*[0.42]{bead sep=number}[decimal number, distance in \unit{cm}]
+ \option*[0.42]{runner sep=number}[decimal number, distance in \unit{cm}]
+
+ These three keys control the size of the beads and the distance
+ between them, so they would normally be used together. By default, the
+ \emph{diameter} of the abacus beads is \qty{0.4}{cm}, the distance
+ between adjacent beads on the same runner is \qty{.42}{cm}, and the
+ distance between consecutive runners is \qty{0.42}{cm}.
+
+ \begin{example}
+ \Abacus[bead size=0.6,
+ bead sep=0.65,
+ runner sep=0.65]
+ {3}{3_3,2^2,1^3}
+ \end{example}
+
+ As with tableau, you can also change the size of the abacuses using
+ \option{scale}<abacus>, \option{xscale}<abacus> and
+ \option{yscale}<abacus>. Changing these keys globally affects both
+ abacuses and tableaux.
+
+ \option[]{bead style=style}[\TikZ-styling]
+
+ The keys above are usually sufficient for fine-tuning the style of the
+ abacus beads. Alternatively, the \option{bead style} key appends
+ \TikZ-styling to the default bead style, which has many moving parts.
+
+ \begin{example}
+ \Abacus[bead style={shading=axis}, bead text=red] {3}{3_3,2^2,1^3} \qquad
+ \Abacus[bead style={no shade, fill=aTableauMain}] {3}{3_3,2^2,1^3}
+ \end{example}
+
+ By default, the beads look like balls (they use the
+ \TikZ-styling \keyword{shading=ball, ball color=}\aTableauColour{Main}).
+ In contrast, the beads on the left look like go beads, and those
+ on the right are flat.
+
+ \option[white]{bead text=colour}[a \LaTeX~colour]
+
+ The \option{bead text} key sets the text colour of the abacus labels.
+
+ \begin{example}
+ \Abacus[bead=blue, bead text=yellow] {3}{3_3,2^2,1^3}
+ \end{example}
+
+ \option[false]{beta numbers}[false/true]
+
+ When \option{beta numbers} is set, the numbers in the bead
+ specifications are entered as \emph{beta numbers}. The beta numbers
+ give the bead positions, which are numbered $0,1,\dots$, starting from
+ the first row and then continuing in this way in subsequent rows. More
+ explicitly, if there are $e$ runners then the bead in row~$r$ and
+ column~$c$ is in position $er+c$. Up to shift, bead numbers are first
+ column hook lengths. In particular, beta numbers are pairwise
+ distinct.
+
+ \begin{example}
+ \Abacus{3}{3,2^2} \qquad
+ \Abacus[beta numbers]{3}{5,3,2} \qquad
+ \Abacus[beta numbers]{3}{6,4,3,[ball color=red]0}
+ \end{example}
+
+ There is no inverse key to \option{beta numbers}, however,
+ \option{beta numbers=false} will remove the requirement to use beta
+ numbers in the bead specifications.
+
+ \option[]{dotted cols=column indices}[list of runner indices]<abacus>
+ \option*[]{dotted rows=row indices}[list of row indices]<abacus>
+
+ The \option{dotted rows}<abacus> and \option{dotted cols}<abacus> keys
+ draw abacuses where the specified rows and columns are replaced with
+ dots. This makes it possible to draw \emph{generic} abacuses, where
+ the number of rows and columns is not fully specified. Note that for
+ abacuses, both the row and column indexing starts from~$0$.
+
+ \begin{example}
+ \Abacus[dotted rows={2,4}]{4}{8,5,4,3,2,1} \qquad
+ \Abacus[dotted cols={1,3},abacus ends=-*]{6}{9,8,5,4,3^3,2}
+ \end{example}
+
+ As with tableau, consecutive rows and columns are treated together.
+
+ \begin{example}
+ \Abacus[dotted rows={1,2,3}]{4}{8,5,4,3,2,1} \qquad
+ \Abacus[dotted cols={1,2,3},abacus ends=-*]{6}{9,8,5,4,3^3,2}
+ \end{example}
+
+ Comparing these two examples shows that the beads and runners in the
+ dotted rows and columns are removed by \option{dotted rows}<abacus>
+ and \option{dotted cols}<abacus>, respectively. Named coordinates,
+ for use with \option{name}<abacus>, are not created for the bead and
+ tick positions on the dotted rows and columns.
+
+ The \option{dotted cols}<abacus> ad \option{dotted rows}<abacus> keys
+ can be used together, in which case the \option{dotted rows}<abacus>
+ are removed first, after which the \option{dotted cols}<abacus> are
+ removed. The output may need to be adjusted if the dotted rows and
+ columns overlap. For example, consider the abacus:
+
+ \begin{example}
+ \Abacus[dotted cols={2,3},
+ dotted rows={2,3}
+ ]{6}{26,21^2,5^2,3,2^2,0^2}
+ \end{example}
+
+ The cross-hatched dots in the centre of the abacus are not ideal. The
+ following trick addresses this:
+
+ \begin{example}[lefthand width=0.16\textwidth, label=Ex:DottedAbacus]
+ \Abacus[dotted cols={2,3}, dotted rows={2,3},
+ tikz after = {
+ \draw[aTableau/clearBoxes](A-1-1.south east)rectangle(A-4-4.north west);
+ \draw[aTableau/dottedLine](A-1-1.south east)--(A-4-4.north west);
+ }
+ ]{6}{26,21^2,5^2,3,2^2,0^2}
+ \end{example}
+
+ \option[]{entries=value}[betas, residues, rows, shape]<abacus>
+
+ Like the \option{entries} key for tableaux, the
+ \option{entries}<abacus> key for abacuses provides a shortcut for
+ labelling the abacus beads by some common choices. The possible
+ choices are:
+
+ \begin{itemize}
+
+ \item\option{entries=betas}\index{entries!beta}\index{beta numbers!entries}
+ \label{beta numbers!abacuses}
+ Labels the beads by the corresponding \emph{beta numbers}.
+ \begin{example}
+ \Abacus[entries=betas]{3}{3,2^2,0^2} \qquad
+ \Abacus[entries=betas]{4}{3,2^2,1^3,0^2}
+ \end{example}
+
+ \item\option{entries=residues}\index{entries!residues}
+ Labels the beads by their residues. Unlike for tableaux, it is not
+ necessary to specify the quantum characteristic \option{e}<abacus>,
+ because this is determined by the number of runners and the
+ \option{cartan}<abacus> type. You can override this by setting
+ \option{e}<abacus> manually.
+ \begin{example}
+ \Abacus[entries=residues,]{3}{3,2^2,0^2} \qquad
+ \Abacus[entries=residues, cartan=C]
+ {4}{3,2^2,1^3,0^2}
+ \end{example}
+
+ \AddKeyLink{e-abacus}
+ \AddKeyLink{charge-abacus}
+ \AddKeyLink{cartan-abacus}
+ \noindent
+ As with (multi)tableau, use the \option{charge}<abacus> key to
+ add an offset to the residues, and the \option{cartan}<abacus> key for
+ residues of other Cartan types.
+
+ \item\option{entries=rows}\index{entries!rows}
+ Labels the beads by their rows index of the corresponding part in the
+ partition.
+ \begin{example}
+ \Abacus[entries=rows]{3}{3,2^2,0^2} \qquad
+ \Abacus[entries=rows]{4}{3,2^2,1^3,0^2}
+ \end{example}
+ \noindent
+ As shown, the beads corresponding to zero parts of the corresponding
+ partition are marked with a dash, since there is no corresponding row
+ in partition for such beads.
+
+ \item\option{entries=shape}\index{entries!partition}
+ Labels the beads by their shape. That is, each bead is labelled by the
+ corresponding by the corresponding part of the partition.
+ \begin{example}
+ \Abacus[entries=shape]{3}{3,2^2,0^2} \qquad
+ \Abacus[entries=shape]{4}{3,2^2,1^3,0^2}
+ \end{example}
+
+ \end{itemize}
+
+ \option[A]{name=text}{text}
+
+ Just like the tableaux commands, the \keyword{abacus} command defines
+ named coordinates for all of the \emph{beads} and \emph{ticks} on the
+ abacus. By default, the named coordinates take the form
+ $(\mathsf{A{-}r{-}c})$, for the bead or tick in row~$r$ and column~$c$ of the
+ abacus. Note that for abacuses, both the row and column indexing starts
+ from~$0$. The key \option{name} changes the prefix used for the names.
+ For example, after \option{name=X} the bead and tick names take the
+ form~$(\mathsf{X{-}r{-}c})$.
+
+ \begin{Example}[label=Ex:BeadPositions]
+ \Abacus[name=X,
+ tikz after={
+ \draw[orange,<-,thick] (X-0-0.west) -- ++(-1,0)
+ node[blue,align=left,anchor=east] {Empty bead\\ position};
+ \draw[red,<-,thick] (X-2-2.east) -- ++(2,0)
+ node[blue,align=left,anchor=west] {First part of\\the partition};
+ }]{3}{4^3,1^2}
+ \end{Example}
+
+ \option[]{no shade}[]
+
+ The abacus balls are drawn with the \TikZ style
+ \keyword{shading=ball}. As noted in \autoref{Ex:NoShade}, you can
+ disable the \TikZ-ball shading for individual beads using the \TikZ-style \keyword{no shade}. The
+ \option{no shade} key disables the ball shading for \emph{all} beads,
+ which allows you to fully customise how the abacus beads are
+ displayed.
+
+ \begin{example}
+ \Abacus[no shade, bead text=red]{3}{3_1,2_2,2_3} \qquad
+ \Abacus[bead style={no shade, shape=diamond,
+ fill=brown, text=yellow}]{3}{3_1,2_2,2_3,0^2}
+ \end{example}
+
+ As the first example shows, if you use the \option{no shade} key then
+ you need to define a new style for the abacus beads. As the second
+ example shows, rather than using \option{no shade} as an
+ \keyword{\Abacus} key, you can use it inside \option{bead style} as a
+ \TikZ-style. (We include the \option{no shade} option partly for
+ convenience and partly to advertise how to use it.)
+
+ \option[]{rows=row index}[non-negative integer]<abacus>
+
+ By default, the \keyword{\Abacus} command uses the smallest number of
+ rows necessary to display all of the beads on the abacus. Use
+ \option{rows}<abacus> to change the number of rows displayed. If you use
+ the \option{rows}<abacus> key, then it is your responsibility to ensure that
+ the abacus has enough rows to display all of the beads.
+
+ \begin{example}
+ \Abacus{3}{3,2^2,0^2} \qquad
+ \Abacus[rows=4]{3}{3,2^2,0^2} \qquad
+ \Abacus[rows=5]{3}{3,2^2,0^2}
+ \end{example}
+
+ \option[draw=\aTableauColour{Inner}]{runner=colour}[a \LaTeX colour]
+ \option*[very thick]{runner style=style}[\TikZ-styling]
+
+ Use \option{runner} to set the colour of abacus runners.
+
+ \begin{example}
+ \Abacus{3}{3,2^2} \qquad
+ \Abacus[runner=red]{3}{5,3,2,0^2} \qquad
+ \Abacus[runner=brown, bead=blue]
+ {3}{6,4,3,[ball color=red]0^2}
+ \end{example}
+
+ The \option{runner style} key appends \TikZ-styling to the abacus
+ runner style.
+
+ \begin{example}
+ \Abacus[runner style={dashed}]{3}{3,2^2} \quad
+ \end{example}
+
+ \option[]{runner labels=labels}{list of labels for the abacus runners}
+ \option*[font=\textbackslash scriptsize, text=\aTableauColour{Inner}]{runner label style=style}[\TikZ-styling]
+
+ The \option{runner labels} key adds labels to the each runner. An
+ error if given if the number of labels does not match the number of
+ runners. Use \option{runner label style} to change the style of the
+ label.
+
+ \begin{example}
+ \Abacus[runner labels={1,2,0},
+ entries=residues]{3}{3,2^2,0^2} \qquad
+ \Abacus[runner labels={2,3,0,1}, entries=residues,
+ runner label style={circle, draw=cyan, inner sep=0pt,
+ minimum size=2.5mm}] {4}{5,3,2^2,0^2}
+ \end{example}
+
+ As with the \option{label} key for tableau, the runner labels are
+ typeset as mathematics, by default.
+
+ \option[\aTableauColour{Inner}]{tick=colour}[a \LaTeX colour]
+ \option*[semithick]{tick style=style}[\TikZ-styling]
+ \option*[0.1]{tick length=number}[length in \unit{cm}]
+
+ These three keys control the ticks on the abacus runners, which mark
+ the empty bead positions. Use \option{tick} to the colour of the
+ ticks on the abacus runners. The other two key have the obvious meanings.
+
+ \begin{example}
+ \Abacus[tick=red]{3}{6,4,3,1,0} \qquad
+ \Abacus[tick style={ultra thick,orange}]{3}{6,4,3,1,0} \qquad
+ \Abacus[tick length=0.3]{3}{6,4,3,1,0} \qquad
+ \end{example}
+
+ % --------------------------------------------------------------
+ \section{Examples from the literature}
+
+ This section shows how to draw some tableaux that appear in the
+ literature. All of these diagrams predate this package. The aim of
+ this section is to show how these pictures can be drawn using this
+ package.
+
+ Diagrams like the following are common. Note the use of a ribbon to
+ add the $\alpha$ in row~$6$ and column~$8$.
+
+ \begin{example}
+ \Diagram[french, no boxes, ribbons={*68_\alpha}]
+ {15,13,12,9,8^2,5,3}
+ \end{example}
+
+ Mendes~ \cite{Mendes:hooks} uses tableaux like these to give a new
+ proof of the Murnaghan-Nakayama rule.
+
+ \begin{example}
+ \tikzset{C/.style={circle,draw=blue,
+ minimum size=3.5mm, fill=white,thick}}
+ \Diagram[paths={
+ [C]13_1cc_\bullet, [C]21_2r_\bullet,
+ [C]23_3c_\bullet, [C]14_4
+ }]{4,3,1} \qquad
+ \Diagram[path style={rounded corners},
+ paths={[C]12_1cr_\bullet, [C]14_2c_\bullet,
+ [C]23_3c_\bullet, [C]31_4}]{4,3,1}
+ \end{example}
+
+ The following ribbon tableau comes from a nice paper by
+ Fayers~\cite{Fayers:DyckTilings}, which is uses Dyck tilings to
+ understand homogeneous Garnir relations for KLR algebras of type~$A$.
+
+ \begin{example}
+ \RibbonTableau[skew={1^2}, ukrainian, scale=0.7,
+ ribbons={(draw=none)21_m}
+ ]{
+ 12,16c_\circ c_\circ c_\circ r_\circ r_\circ *r,
+ 18crcccrr*r,19,1{10},1{11},1{12},
+ 22,29crcccrr*rccrcrr,
+ 2{12}ccrcrcccrr*r_lccrcrrr,
+ 31,*32,41,42,51,52,53,
+ 62cr,81,91,{10}1,{10}2,{11}1,{11}2
+ }
+ \end{example}
+
+ The entries of a tableau are usually single characters, or numbers,
+ but they can be more complicated. The paper
+ \cite{bowman2023quiverpresentationsisomorphismshecke} contains
+ tableaux with entries that are \emph{symbols}, which are produced by
+ the \keyword{\Symb} command below.
+
+ \begin{example}
+ \newcommand\Symb[2]{\genfrac{}{}{0pt}{}{#1}{#2}}
+ \Tableau[ukrainian, box font=\scriptsize,
+ tikz after = {\draw[ultra thick, red]
+ (A-2-3.east)--(A-2-2.south)--(A-3-2.west)
+ --(A-3-3.north)--cycle;
+ }]{
+ {\Symb11}{\Symb11}{\Symb11}{\Symb0s},
+ {\Symb11}{\Symb11}{\Symb11}{\Symb0s},
+ {\Symb11}{\Symb11}{\Symb{s^*}s}{\Symb0f},
+ {\Symb11}{\Symb11}{\Symb11},
+ {\Symb11}{\Symb11}
+ }
+ \end{example}
+
+ The next example, also from
+ \cite{bowman2023quiverpresentationsisomorphismshecke}, is a little
+ more involved. Most of the diagram is drawn using \emph{pics} from
+ \TikZ, which are a good way to add repeating features to a
+ \keyword{tikzpicture}. In the code below, \emph{pics} are used to add
+ the up and down strings to this drawing, taking as input the string
+ colour, the starting box, the list of the boxes the strings goes
+ through, and the final box. At the risk of further obfuscation, this
+ could be done a little more efficiently. From the perspective of this
+ manual, the most interesting feature of this picture is that it is a
+ non-trivial example that uses the named nodes for
+ the tableaux boxes; see \autoref{E:NodeNames}.
+
+\begin{Example}[label=Ex:waves]
+\begin{tikzpicture}[
+ Cap/.style={out=45, in=135}, % caps are drawn with to[Cap]
+ Cup/.style={out=315,in=225}, % cups are drawn with to[Cup]
+ every node/.style={font=\scriptsize},
+ redribbon/.style={fill=red!40,opacity=0.4},
+ % define pics for drawing the curvy up and down strings
+ pics/ustring/.style n args = {4}{% {colour}{first coord}{wave coords}{last coord}
+ code = {
+ \def\last{#2} % should not be necessary
+ \draw[thick,#1](T-|#2.north west)node[above=-3.5]{$\vee$}--(#2.north west)
+ foreach [remember=\pt as \last (initially #2)] \pt in {#3}
+ {to[Cup](\last.north east) to[Cap] (\pt.north west)}
+ to[Cup] (#4.north east) -- (#4.north east|-T)node[below=-3.5]{$\wedge$};
+ }
+ },
+ pics/dstring/.style n args = {4}{% {colour}{first coord}{wave coords}{last coord}
+ code = {
+ \def\last{#2} % should not be necessary
+ \draw[thick,#1](O-|#2.south west)node[below=-3.5]{$\wedge$}--(#2.south west)
+ foreach [remember=\pt as \last (initially #2)] \pt in {#3}
+ {to[Cap](\last.south east) to[Cup] (\pt.south west)}
+ to[Cap] (#4.south east) -- (#4.south east|-O)node[above=-3.5]{$\vee$};
+ }
+ },
+ ]
+ \coordinate (O) at (0,0); \coordinate (T) at (0,3.2);
+ \draw(-2,0)--(2.5,0) (-2,3.2)--(2.5,3.2);
+ \Diagram(0,0)[ukrainian, inner style=dotted, ribbons={(redribbon)24rcrcrc}]{5,4^3,3}
+ \pic at (T) {ustring={gray}{A-1-5}{}{A-1-5}}; % up strings
+ \pic at (T) {ustring={gray}{A-4-4}{}{A-4-4}};
+ \pic at (T) {ustring={gray}{A-5-2}{A-4-3,A-3-4}{A-3-4}};
+ \pic at (T) {ustring={gray}{A-5-3}{}{A-5-3}};
+ \pic at (T) {ustring={red}{A-5-1}{A-4-2,A-3-3,A-2-4}{A-2-4}};
+ \pic at (O) {dstring={gray}{A-1-1}{}{A-1-1}}; % down strings
+ \pic at (O) {dstring={gray}{A-2-1}{A-1-2}{A-1-2}};
+ \pic at (O) {dstring={gray}{A-3-1}{A-2-2,A-1-3}{A-1-3}};
+ \pic at (O) {dstring={gray}{A-4-1}{A-3-2,A-2-3,A-1-4}{A-1-4}};
+ \pic at (O) {dstring={gray}{A-5-1}{A-4-2,A-3-3,A-2-4,A-1-5}{A-1-5}};
+\end{tikzpicture}
+\end{Example}
+
+ % --------------------------------------------------------------
+ \section{Summary of \aTableau commands and options}\label{S:keys}
+ \rowcolors{2}{LightSkyBlue!10}{}
+
+ For this impatient, this section compactly lists the \aTableau
+ commands and their options. The sections above show these commands and
+ options are used, with examples.
+
+ The \aTableau package provides the following commands:
+
+ \begin{center}
+ \begin{tabular}{Lll}\toprule
+ \large\sffamily\color{MidnightBlue}Command
+ & \large\sffamily\color{MidnightBlue} Picture
+ & \large\sffamily\color{MidnightBlue} Section \\\midrule
+ Abacus & An abacus for a partition & \autoref{S:Abacus}\\
+ Diagram & A Young diagram for a partition & \autoref{S:Diagram}\\
+ Multidiagram & An $\ell$-tuple of Young diagrams & \autoref{S:Multitableau} \\
+ Multitableau & An $\ell$-tuple of tableaux & \autoref{S:Multitableau} \\
+ RibbonTableau & A ribbon tableau & \autoref{S:RibbonTableaux} \\
+ ShiftedDiagram & A shifted Young diagram & \autoref{S:Shifted} \\
+ ShiftedTableau & A shifted tableau & \autoref{S:Shifted} \\
+ SkewDiagram & A skew Young diagram & \autoref{S:Skew} \\
+ SkewTableau & A skew tableau & \autoref{S:Skew} \\
+ Tableau & A tableau & \autoref{S:Tableau} \\
+ Tabloid & A tabloid & \autoref{S:Tabloid} \\
+ \bottomrule
+ \end{tabular}
+ \end{center}
+
+ In addition, the \keyword{\aTabset} command is provided for setting
+ can default \aTableau values for the \aTableau options.
+
+ For easier reference, here is the list of the \aTableau keys, together
+ with a quick explanation of what they do. The last two columns
+ indicate whether the options apply to tableau (and diagrams), or to
+ abacuses~--- or both! Options starting with \keyword{(no)} are a pair
+ of boolean options and their inverses. If not given a true or false
+ value then they are implicitly set to true. Although not explicitly
+ listed, spelling variations of keys from the American dialect
+ of English are tolerated.
+
+ Both the key names and the green ticks below are hyperlinks to the
+ relevant sections of the manual.
+
+ \newcommand\heading[1]{\textcolor{MidnightBlue}{\textsf{\large#1}}}
+ \rowcolors{2}{LightSkyBlue!10}{}
+ \begin{xltabular}{0.9\textwidth}{l>{\raggedright}Xcc}\toprule
+ \heading{Key} & \heading{Meaning} & \heading{Tableau} & \heading{Abacus} \\
+ \midrule
+ \endhead
+ \option{abacus ends} & Set the top and bottom of the abacus & \No & \Yes\\
+ \option{abacus ends style} & Set the style of the top and bottom of the abacus & \No & \Yes\\
+ \option{align} & Set baseline alignment of \aTableau diagram & \Yes & \Yes[abacus]\\
+ \option{australian} & Use the Australian convention for tableaux & \Yes & \No \\
+ \option{bead} & Set the colour of the abacus beads & \No & \Yes \\
+ \option{bead font} & Set the font used for the abacus bead labels & \No & \Yes \\
+ \option{bead sep} & The distance between adjacent beads on a runner & \No & \Yes \\
+ \option{bead size} & The diameter of the abacus beads & \No & \Yes \\
+ \option{bead style} & Set the style of the abacus beads & \No & \Yes \\
+ \option{bead text} & Set the colour of the abacus bead labels & \No & \Yes \\
+ \option{beta numbers} & Enter bead specification as beta numbers & \No & \Yes \\
+ \option*{border} & Draw the tableau border & \Yes & \No \\
+ \option{border colour} & Set tableau border colour & \Yes & \No \\
+ \option{border style} & Set tableau border style & \Yes & \No \\
+ \option{box height} & Set tableau box height & \Yes & \No \\
+ \option{box style} & Set tableau box style & \Yes & \No \\
+ \option{box width} & Set tableau box width & \Yes & \No \\
+ \option*{boxes} & Draw inner walls around boxes & \Yes & \No \\
+ \option{cartan} & Set Cartan type for residues & \Yes & \Yes[abacus] \\
+ \option{charge} & Set charge for contents and residues & \Yes & \Yes[abacus] \\
+ \option{conjugate} & Draw the conjugate tableau/diagram & \Yes & \No \\
+ \option{e} & Set the quantum characteristic for residues & \Yes & \Yes[abacus] \\
+ \option{east} & Make abacus grow in the easterly direction & \Yes & \No \\
+ \option{delimiters} & Set delimiters for multitableau and multidiagrams & \Yes & \No \\
+ \option{empty} & Symbol for empty tableau in multitableau & \Yes & \No \\
+ \option{dotted cols} & Specify columns to replace with dots & \Yes & \Yes[abacus] \\
+ \option{dotted rows} & Specify rows to replace with dots & \Yes & \Yes[abacus] \\
+ \option{english} & Use the English convention for tableaux & \Yes & \No \\
+ \option{entries} & Add entries to tableaux and abacuses & \Yes & \Yes[abacus] \\
+ \option{french} & Use the French convention for tableaux & \Yes & \No \\
+ \option{halign} & Horizontal alignment of box entries and bead labels & \Yes & \Yes[abacus] \\
+ \option{inner style} & Set style of inner tableau wall & \Yes & \No \\
+ \option{inner wall} & Set colour of inner tableau wall & \Yes & \No \\
+ \option{label} & Set tableau label & \Yes & \No \\
+ \option{label style} & Set style of tableau labels & \Yes & \No \\
+ \option{left delimiter} & Set left delimiter for multitableau & \Yes & \No \\
+ \option{math entries} & Typeset box and label entries in math-mode & \Yes & \Yes[abacus] \\
+ \option{name} & Prefix of named nodes & \Yes & \Yes[abacus] \\
+ \option{north} & Make abacus grow in the northerly direction & \No & \Yes\\
+ \option{paths} & Add paths to a diagram or tableau & \Yes & \No \\
+ \option{path box} & Adds default box entry for each path & \Yes & \No \\
+ \option{path box style} & Sets style of boxes on each path & \Yes & \No \\
+ \option{path style} & Sets style of a path & \Yes & \No \\
+ \option{ribbons} & Add ribbons to tableau & \Yes & \No \\
+ \option{ribbon box} & Adds default box entry for each ribbon & \Yes & \No \\
+ \option{ribbon style} & Set ribbon style & \Yes & \No \\
+ \option{ribbon box style} & Sets style of boxes on each ribbon & \Yes & \No \\
+ \option{right delimiter} & List of labels for the abacus runners & \No & Yes \\
+ \option{rows} & Set number of rows in multitableau or abacus & \Yes & \Yes[abacus] \\
+ \option{runner} & Set runner colour & \No & \Yes \\
+ \option{runner labels} & Set the colour of the abacus runners & \No & \Yes \\
+ \option{runner label style}& Set the style for e abacus labels & \No & \Yes \\
+ \option{runner sep} & Set distance between consecutive abacus runners & \No & \Yes \\
+ \option{runner style} & Set the colour of the abacus runners & \No & \Yes \\
+ \option{scale} & Sets the \aTableau scale & \Yes & \Yes[abacus] \\
+ \option{script} & Sets the \aTableau scale for subscripts & \Yes & \Yes(scale-abacus) \\
+ \option{scriptscript} & Sets the \aTableau scale for subsubscripts & \Yes & \Yes(scale-abacus) \\
+ \option{separation} & Set distance between components in multitableau & \Yes & \No \\
+ \option{separator colour} & Set separator colour for multitableau & \Yes & \No \\
+ \option{separator} & Set separator colour in multitableau & \Yes & \No \\
+ \option*{separators} & Enable separators in multitableau & \Yes & \No \\
+ \option{shifted} & True for a shifted tableau & \Yes & \No \\
+ \option{skew} & Set inner skew shape & \Yes & \No \\
+ \option*{skew border} & Set skew border colour & \Yes & \No \\
+ \option{skew border style} & Set \TikZ-style of the skew border & \Yes & \No \\
+ \option*{skew boxes} & Enable drawing of skew boxes & \Yes & \No \\
+ \option{skew box style} & Set \TikZ-style of the skew boxes & \Yes & \No \\
+ \option{snobs} & add snobs to tableau & \Yes & \No \\
+ \option{snob box} & Adds default box entry for each snob & \Yes & \No \\
+ \option{snob box style} & Sets style of boxes on each snob & \Yes & \No \\
+ \option{snob style} & Sets style of a snob & \Yes & \No \\
+ \option{south} & Make abacus grow in the southerly direction & \Yes & \No \\
+ \option{star style} & Set \TikZ-style of tableau $*$-nodes & \Yes & \No \\
+ \option{styles} & Short-hand for defining single use \TikZ-styles & \Yes & \Yes[abacus] \\
+ \option{tabloid} & True for a shifted tableau & \Yes & \No \\
+ \option{text entries} & Typeset box and label entries in text-mode & \Yes & \Yes[abacus] \\
+ \option{tick} & Set the colour of the ticks on the abacus runner & \No & \Yes \\
+ \option{tick length} & Set the length of the ticks on the abacus runners & \No & \Yes \\
+ \option{tick style} & Set the style of the ticks on the abacus runners & \No & \Yes \\
+ \option{tikz after} & \TikZ-code injected after \aTableau picture & \Yes & \Yes[abacus] \\
+ \option{tikz before} & \TikZ-code injected before \aTableau picture & \Yes & \Yes[abacus] \\
+ \option{tikzpicture} & Sets tikzpicture environment keys & \Yes & \No \\
+ \option{ukrainian} & Use the Ukrainian convention for tableaux & \Yes & \No \\
+ \option{valign} & Set vertical alignment & \Yes & \Yes[abacus] \\
+ \option{west} & Make abacus grow in the westerly direction & \Yes & \No \\
+ \option{xoffsets} & Set $x$-offsets for components in a multitableau & \Yes & \No \\
+ \option{xscale} & Set \aTableau $x$-scale & \Yes & \Yes(scale-abacus) \\
+ \option{yoffsets} & Set $y$-offsets for components in a multitableau & \Yes & \No \\
+ \option{yscale} & Set \aTableau $y$-scale & \Yes & \Yes(scale-abacus) \\
+ \bottomrule
+ \end{xltabular}
+
+ \emph{Most readers should ignore the following two subsections.}
+
+ % --------------------------------------------------------------
+ \subsection{\aTableau Colours}\label{S:Colours}
+
+ The \aTableau package defines and uses the following colours:
+
+ \rowcolors{2}{LightSkyBlue!10}{}
+ \begin{center}
+ \begin{tabular}{lll}\toprule
+ \heading{Colour} & \heading{Name} & \heading{HTML}\\
+ \midrule
+ \aTableauColour{Inner} & aTableauInner & 0073E6 \\
+ \aTableauColour{Main} & aTableauMain & 00008B \\
+ \aTableauColour{SkewFill} & aTableauSkewFill & F8F8F8 \\
+ \aTableauColour{Skew} & aTableauSkew & 818589 \\
+ \aTableauColour{StarStyle} & aTableauStarStyle & E6F7FF \\
+ \bottomrule
+ \end{tabular}
+ \end{center}
+
+ All of these colours are defined as HTML colours using the
+ \keyword{\definecolor} command provided by \ctan{xcolor}.
+
+ We recommend using the key-value interface to change the
+ colours used in the pictures created by \aTableau, rather than
+ changing these colours. It is sometimes useful to be able to use these
+ colour names directly in your own styles.
+
+ % --------------------------------------------------------------
+ \subsection{\aTableau styles}\label{S:TikZStyles}
+
+ This package is little than a glorified interface to some \TikZ
+ commands. Under the hood there are many custom \TikZ styles that control the
+ pictures drawn by the \aTableau package. It is possible, and sometimes
+ useful (see, for example, \autoref{Ex:DottedAbacus}), to use these
+ styles in your own drawings.
+ The key-value interface to the \aTableau commands is the recommended
+ way of changing these styles. You can, if you want, change these
+ styles directly using \keyword{\tikzset}, but there is a risk that you
+ may break some of the \aTableau commands if you do this. If you do
+ change these styles, we strongly recommend that you \emph{append} to
+ these styles rather than setting them directly.
+
+ \begin{center}
+ \begin{xltabular}{0.9\textwidth}{ll}\toprule
+ \heading{Names} & \heading{Adds \TikZ-styling to...}\\
+ \midrule
+ aTableau/innerWall & Inner tableau walls\\
+ aTableau/borderStyle & Tableau borders \\
+ aTableau/skewBorder & Skew tableau borders \\
+ aTableau/boxStyle & Tableau boxes\\
+ aTableau/skewBox & Skew tableau boxes \\
+ aTableau/pathBox & Boxes on paths \\
+ aTableau/ribbonBox & Boxes on ribbons \\
+ aTableau/snobBox & Boxes on snobs \\
+ aTableau/pathStyle & Paths \\
+ aTableau/ribbonStyle & Ribbons \\
+ aTableau/snobStyle & Snobs \\
+ aTableau/labelStyle & Tableau labels \\
+ aTableau/tableauStarStyle & Star style for tableaux \\
+ aTableau/clearBoxes & Erase material. Used by \option{dotted rows} and \option{dotted cols}\\
+ aTableau/dottedLine & Adds dotted lines. Used by \option{dotted rows} and \option{dotted cols}\\
+ aTableau/separatorSymbol & Separators in multitableau\\
+ aTableau/separatorLine & Separator lines in multitableau\\
+ aTableau/leftDelimiter & Left delimiter in multitableau\\
+ aTableau/rightDelimiter & Right delimiter in multitableau\\
+ aTableau/beadStyle & Abacus beads\\
+ aTableau/runnerStyle & Abacus runners\\
+ aTableau/runnerLabelStyle & Style of abacus runner labels\\
+ aTableau/abacusEnds & Tops and bottoms of abacuses\\
+ aTableau/abacusStarStyle & Abacus stars \\
+ aTableau/tickStyle & Abacus ticks \\
+ \bottomrule
+ \end{xltabular}
+ \end{center}
+
+ Most of these styles are quite basic, but some of them are more
+ involved, which is why we recommend not changing them directly. In
+ some cases, such as the tableau boxes, the \TikZ styling does not
+ fully control the rendering of these features. Most of these styles
+ can be augmented by styles supplied by the key-value interface, which
+ is another reason to avoid changing them directly.
+
+ % --------------------------------------------------------------
+ \section{Feature requests and bug reports}
+
+ Please make any feature requests and bug reports on the package github
+ page
+ \begin{center}
+ \href{https://github.com/AndrewMathas/aTableau/}{github.com/AndrewMathas/aTableau/}.
+ \end{center}
+ Please give as much detail as possible when making such requests.
+
+ Bug reports must be a accompanied by a \textit{minimal working
+ example}, which is the smallest possible amount of \LaTeX\ code that
+ demonstrates the problem and compiles, unless you are reporting a
+ problem that gives a compilation error in which case your example
+ should give the error. This is necessary because if I cannot reproduce
+ your problem, then it is unlikely that I will be able to fix it.
+
+
+ % --------------------------------------------------------------
+ \subsection*{Acknowledgements}
+
+ Several features in the package have benefited from discussions on
+ \url{tex.stackexchange}. In particular, I thank
+ Max Chernoff,
+ Lars Madsen,
+ Clea F. Rees,
+ and
+ Jonathan P. Spratte.
+
+% ----------------------------------------------------------------------
+% bibliography
+% \bibliography{papers}
+% \bibliographystyle{andrew}
+
+\begin{thebibliography}{10}
+
+\bibitem{bowman2023quiverpresentationsisomorphismshecke}
+\textsc{C.~Bowman, M.~D. Visscher, A.~Hazi, and C.~Stroppel},
+ \href{https://arxiv.org/abs/2309.13695}{\textit{Quiver presentations and
+ isomorphisms of Hecke categories and Khovanov arc algebras}}, 2023.
+\newblock \href{http://arxiv.org/abs/2309.13695}{arXiv:2309.13695}.
+
+\bibitem{DJM:cyc}
+\textsc{R.~Dipper, G.~James, and A.~Mathas},
+ \href{http://dx.doi.org/10.1007/PL00004665}{\textit{Cyclotomic {$q$}-{S}chur
+ algebras}}, Math. Z., \textbf{229} (1998), 385--416.
+
+\bibitem{EvseevMathas:DeformedKLR}
+\textsc{A.~Evseev and A.~Mathas},
+ \href{http://dx.doi.org/10.5802/art.8}{\textit{Content systems and
+ deformations of cyclotomic {KLR} algebras of type~$A$ and~$C$}}, Annals of
+ Representation Theory, \textbf{1} (2024), 193--297.
+\newblock \href{http://arxiv.org/abs/2209.00134}{arXiv:2209.00134}.
+
+\bibitem{Fayers:DyckTilings}
+\textsc{M.~Fayers}, \textit{Dyck tilings and the homogeneous Garnir relations
+ for graded Specht modules}, 2013, preprint.
+\newblock \href{http://arxiv.org/abs/1309.6467}{arXiv:1309.6467}.
+
+\bibitem{James:YoungD}
+\textsc{G.~James}, \textit{Some combinatorial results involving {Y}oung
+ diagrams}, Math. Proc. Cambridge Philos. Soc., \textbf{83} (1978), 1--10.
+
+\bibitem{KMR:UniversalSpecht}
+\textsc{A.~Kleshchev, A.~Mathas, and A.~Ram},
+ \href{http://dx.doi.org/10.1112/plms/pds019}{\textit{Universal graded
+ {S}pecht modules for cyclotomic {H}ecke algebras}}, Proc. Lond. Math. Soc.
+ (3), \textbf{105} (2012), 1245--1289.
+\newblock \href{http://arxiv.org/abs/1102.3519}{arXiv:1102.3519}.
+
+\bibitem{Konvalinka:ShiftedHookLengths}
+\textsc{M.~z. Konvalinka}, \href{http://dx.doi.org/10.37236/588}{\textit{The
+ weighted hook length formula {III}: {S}hifted tableaux}}, Electron. J.
+ Combin., \textbf{18} (2011), Paper 101, 29.
+
+\bibitem{Macdonald}
+\textsc{I.~G. Macdonald}, \textit{Symmetric functions and {H}all polynomials},
+ Oxford Mathematical Monographs, The Clarendon Press Oxford University Press,
+ New York, second~ed., 1995.
+\newblock With contributions by A. Zelevinsky, Oxford Science Publications.
+
+\bibitem{Mathas:ULect}
+\textsc{A.~Mathas},
+ \href{http://dx.doi.org/10.1090/ulect/015}{\textit{Iwahori-{H}ecke algebras
+ and {S}chur algebras of the symmetric group}}, University Lecture Series,
+ \textbf{15}, American Mathematical Society, Providence, RI, 1999.
+
+\bibitem{Mendes:hooks}
+\textsc{A.~Mendes}, \textit{The combinatorics of rim hook tableaux}, Australas.
+ J. Combin., \textbf{73} (2019), 132--148.
+
+\end{thebibliography}
+
+% ----------------------------------------------------------------------
+% indices
+\printindex
+
+\end{document}
diff --git a/graphics/pgf/contrib/circuitikz/README.md b/graphics/pgf/contrib/circuitikz/README.md
index 30e3589b74..9af5cd284b 100644
--- a/graphics/pgf/contrib/circuitikz/README.md
+++ b/graphics/pgf/contrib/circuitikz/README.md
@@ -84,12 +84,12 @@ This file may be distributed and/or modified
1. under the LaTeX Project Public License and/or
2. under the GNU Public License.
-Copyright 2018-2024 by Romano Giannetti
+Copyright 2018-2025 by Romano Giannetti
-Copyright 2015-2024 by Stefan Lindner
+Copyright 2015-2025 by Stefan Lindner
-Copyright 2013-2024 by Stefan Erhardt
+Copyright 2013-2025 by Stefan Erhardt
-Copyright 2007-2024 by Massimo Redaelli
+Copyright 2007-2025 by Massimo Redaelli
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index d9594dc1fc..8fa2397c54 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,105 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.7.1 (2025-01-10)
+
+ Various new blocks have been added, and several fixes have been
+ applied (the barrier one is slightly backward-incompatible\ldots).
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added a flag to have German style TVS (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/836}{Dr.~Matthias
+ Jung}, implemented by Romano)
+ \item
+ Added many blocks all over the map (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/693}{Dr.~Matthias
+ Jung}, with tweaks by Romano)
+ \item
+ Fix for straight voltage on \texttt{open} bipoles (reported by
+ \href{https://github.com/circuitikz/circuitikz/issues/821}{Oliver
+ Wallscheid on GitHub})
+ \item
+ Fix a very, very old bug about aliases for american/european sources
+ \item
+ Fix \texttt{barrier} wire linewidth (issue
+ \href{https://github.com/circuitikz/circuitikz/issues/833}{\#833} by
+ schtandard).
+ \item
+ Fix stroke-type transorb (which did not work at all)
+ \item
+ Reduce \texttt{barrier} and \texttt{openbarrier} default widths so
+ no wire is drawn by default. This breaks backward-compatibility and
+ changes the meaning of some associated keys, but the appearance with
+ the default settings remains unchanged. See
+ \href{https://github.com/circuitikz/circuitikz/pull/835}{\#835} for
+ rationale.
+ \item
+ Documentation enhancement (example of chopper macro)
+ \end{itemize}
+\item
+ Version 1.7.0 (2024-08-03)
+
+ There are no big changes here, but the change to the resistor code
+ (maybe one of the most used by the package) well deserves a minor
+ version bump. A couple of new components, and several minor fixes.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ New component: new kind of current tap (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/807}{EEpchi
+ and Dr4UX on GitHub})
+ \item
+ New arrow tip \texttt{Jack\ Tap} to help drawing jack connectors
+ (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/806}{Anisio
+ Rogerio Braga})
+ \item
+ Change the drawing of the thermocouple (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/811}{Dr4UX on
+ GitHub})
+ \item
+ Change and enhancement to the drawing of the American resistors
+ (triggered by
+ \href{https://github.com/circuitikz/circuitikz/issues/814}{Dr4UX on
+ GitHub}), fixing a long-standing small asymmetry that nobody noticed
+ \item
+ Minor adjustment for joins in \texttt{viscoe} component
+ \item
+ Minor additions (\texttt{rectjoinfill}) and fixes in documentation
+ \end{itemize}
+\item
+ Version 1.6.9 (2024-05-25)
+
+ Several new components and a bug fix for a nasty long-standing bug
+ about switching diode types.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Added a Relais-Shape (contributed by
+ \href{https://github.com/circuitikz/circuitikz/pull/795}{Jakob
+ ``DraUX'' on GitHub}
+ \item
+ Added a center tap anchor for tube filament (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/792}{user
+ bogger33 on GitHub})
+ \item
+ Added neon lamps (two versions, suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/793}{user
+ bogger33 on GitHub})
+ \item
+ Added a configurable spark gap (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/800}{user
+ bogger33 on GitHub})
+ \item
+ Fix a long-standing problem when
+ \href{https://github.com/circuitikz/circuitikz/issues/794}{(locally)
+ switching diode type}
+ \end{itemize}
+\item
Version 1.6.8 (2024-05-05)
Several new components, more anchors, a bit of documentation
@@ -466,7 +565,7 @@ full list of changes.
Robustify some shapes: do not let arrows option pass to the inner
drawing (see
\href{https://tex.stackexchange.com/a/632084/38080}{here} and
- \href{https://matrix.to/\#/!NuxCISwYQJuyWwNsEI:matrix.org/$vQO6luq1F66LJ79dERmaqKI46qMBcjStqYCPi725uZE?via=matrix.org&via=2krueger.de&via=im.f3l.de}{here})
+ \href{https://matrix.to/\#/!NuxCISwYQJuyWwNsEI:matrix.org/$vQO6luq1F66LJ79dERmaqKI46qMBcjStqYCPi725uZE?via=matrix.org\&via=2krueger.de\&via=im.f3l.de}{here})
\item
Add warning about global draw options in the manual
\item
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index d4f9bc36a2..264a3929e6 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex
index cf033189f9..92f030f3a4 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
index 9d1e52303d..73d435b14b 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
index 20a79f3d68..064ab954c2 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -5,10 +5,10 @@
% !TeX spellcheck = en_US
% !TeX encoding = utf8
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -126,10 +126,10 @@ The use of \Circuitikz\ is, of course, not limited to academic teaching. The pac
\subsection{License}
Copyright \copyright{}
-2007--2024 by Massimo Redaelli,
-2013--2024 by Stefan Erhardt,
-2015--2024 by Stefan Lindner,
-and 2018--2024 by Romano Giannetti.
+2007--2025 by Massimo Redaelli,
+2013--2025 by Stefan Erhardt,
+2015--2025 by Stefan Lindner,
+and 2018--2025 by Romano Giannetti.
This package is author-maintained. Permission is granted to copy, distribute and/or modify this software under the terms of the \LaTeX\ Project Public License, version 1.3.1, or the GNU Public License. This software is provided ‘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.
\subsection{Loading the package}
@@ -195,8 +195,8 @@ Finally, the \TikZ{} library \texttt{bending} is loaded by the package, and its
\subsubsection{Related packages}
-At the Friedrich-Alexander-Universität, a group of developers are implementing a graphical interface to draw circuits with \Circuitikz{}.
-You can find more information \href{https://github.com/circuitikz/circuitikz/issues/782}{in this GitHub issue} or, better, in their \href{https://ussi.e-technik.uni-erlangen.de/}{main site}.
+At the Friedrich-Alexander-Universität, a group of developers are implementing a graphical user interface to draw circuits with \Circuitikz{}.
+You can find more information \href{https://github.com/circuitikz/circuitikz/issues/782}{in this GitHub issue} or, better, on their \href{https://circuit2tikz.tf.fau.de/}{main site}. You can try out the GUI \href{https://circuit2tikz.tf.fau.de/designer/}{here}.
\subsubsection{Extension packages}
@@ -264,10 +264,14 @@ Nevertheless, \href{https://tex.stackexchange.com/a/529159/38080}{Schrödinger'
The \texttt{use fpu reciprocal} key seems to have no side effects, but given that it is patching an internal interface of \TikZ{} it can break any time, so it is advisable to use it only if and when needed.
-\subsection{Incompabilities between versions}\label{sec:incompatible-changes}
+\subsection{Incompatibilities between versions}\label{sec:incompatible-changes}
Here, we will provide a list of incompatibilities between different versions of \Circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than include a lot of switches and compatibility layers. In general, changes that would invalidate a circuit (changes of polarity of components and so on) are almost always protected by a flag; the same is not true for purely aesthetic changes.
If unsure, you can check the version in your local installation by using the macro \verb!\pgfcircversion{}!.
\begin{itemize}
+ \item In version \texttt{1.7.1}, the default widths of \texttt{barrier} and \texttt{openbarrier} were reduced so that no wire is drawn as part of the symbols by default.
+ This is accompanied by a change to the meanings of the configuration keys \texttt{bipoles/barrier/width}, \texttt{bipoles/barrier/height} and \texttt{bipoles/openbarrier/gap} (as well as the new key \texttt{bipoles/openbarrier/width}).
+ The change avoids problems when using barriers on short pieces of path or as nodes, cf.~the details in \href{https://github.com/circuitikz/circuitikz/pull/835}{the relevant pull request on GitHub}.
+ The new default values are chosen such that the components are identical to the default appearance before the change.
\item Since version \texttt{1.6.3} the default symbol for the minus sign changed from the simple \verb|$-$| to \verb|$\vphantom{+}-$|. The reason is that in some (most?) font, the minus sign is enclosed in a smaller bounding box than the plus sign and that leads to poorly aligned minus symbols in \texttt{american} and \texttt{raised} voltages. This was not noticed before because the two symbols share the same bounding box in the default Computer Modern font. You can look at \href{https://github.com/circuitikz/circuitikz/issues/721}{this issue on GitHub} for more details; if you want to go back to the previous definitions you can write
\begin{lstlisting}
\ctikzset{amplifiers/minus=$-$}
@@ -507,7 +511,7 @@ You can use a single path or multiple paths when drawing your circuit, it's just
\end{circuitikz}
\end{LTXexample}
-One of the problems with this circuit is that we would like to have the current labels in a different position, such as for example on the upper side of the resistors, so that Kirchoff's Current Law at the node is better shown to students. No problem; as you can see in section~\ref{curr-and-volt} you can use the position specifiers \verb|<>^_| after the key \texttt{i}:
+One of the problems with this circuit is that we would like to have the current labels in a different position, such as for example on the upper side of the resistors, so that Kirchhoff's Current Law at the node is better shown to students. No problem; as you can see in section~\ref{curr-and-volt} you can use the position specifiers \verb|<>^_| after the key \texttt{i}:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[american]
@@ -1942,6 +1946,118 @@ And finally do:
\end{tikzpicture}
\end{LTXexample}
+\subsubsection{Using macros}
+
+Sometimes, a good old \LaTeX{} macro can solve a problem instead of designing a new component.
+For example, GitHub's user Patrick Jansky asked for a generic ``chopper'' block;\footnote{%
+ See \href{https://github.com/circuitikz/circuitikz/issues/828}{the original issue on GitHub}.}
+Unfortunately, this kind of block is quite difficult to implement as a node: it should change size and orientation on the base of the ``port'' terminals you need.
+
+In this case, probably an old-fashioned macro, using partway coordinate specifiers,
+\footnote{See \href{https://tikz.dev/tikz-coordinates\#sec-13.5.3}{\TikZ{} manual section 13.5}}
+could be the best option for this task. Below, one possible example (not optimized at all!).
+
+\begin{lstlisting}
+\NewDocumentCommand{\ChopperByTerminals}{O{} O{0.2cm} m m m}{%
+ % #1 -> options to the draw command
+ % #2 -> half width
+ % by default is drawn to the right (if vertical), to the left if #2 is negative
+ % If horizontal, by default is above, below if #2 is negative
+ % #3 -> terminal A on port 1
+ % #4 -> terminal B on port 2
+ % #5 -> name for the "anchors"
+ \coordinate(#5-P1A) at (#3);
+ \coordinate(#5-P1B) at (#4);
+ % the center of the block is midway P1A to P1B, at distance #2 at 90 clockwise
+ % degrees from the center of the line
+ \coordinate(#5-C1) at ($(#5-P1A)!0.5!(#5-P1B)$);
+ \coordinate(#5-C) at ($(#5-C1)!#2!90:(#5-P1B)$);
+ \coordinate(#5-P2B) at ($(#5-P1A)!2!(#5-C)$);
+ \coordinate(#5-P2A) at ($(#5-P1B)!2!(#5-C)$);
+ \coordinate(#5-T1A) at ($(#5-P1B)!1.2!(#5-P1A)$);
+ \coordinate(#5-T1B) at ($(#5-P1A)!1.2!(#5-P1B)$);
+ \coordinate(#5-T2A) at ($(#5-P2B)!1.2!(#5-P2A)$);
+ \coordinate(#5-T2B) at ($(#5-P2A)!1.2!(#5-P2B)$);
+ \coordinate(#5-CKA) at ($(#5-T1A)!0.5!(#5-T2A)$);
+ \coordinate(#5-CKB) at ($(#5-T1B)!0.5!(#5-T2B)$);
+ \coordinate(#5-C2) at ($(#5-P2A)!0.5!(#5-P2B)$);
+ \draw [draw, thick, fill=white, #1] (#5-T1A) rectangle (#5-T2B);
+ \draw [draw, thick, line join=round, #1] (#5-P1A) -- (#5-P2B) --
+ (#5-P1B) -- (#5-P2A) -- (#5-P1A);
+}
+\end{lstlisting}
+
+You can use this definition as follows, for example:
+
+\begin{lstlisting}
+\begin{tikzpicture}[]
+ \node[op amp](A) at (0,0) {};
+ \ChopperByTerminals[draw=red][-0.2cm]{A.-}{A.+}{chopper in}
+ \draw [red, <-] (chopper in-CKA) -- ++(0,.5) node[above]{$f_c$};
+ \ChopperByTerminals[draw=red]{[xshift=1.2cm]A.-}{[xshift=1.2cm]A.+}{chopper out}
+ \draw [red, <-] (chopper out-CKA) -- ++(0,.5) node[above]{$f_c$};
+ %Try another one
+ \draw (4,1) node[npn](Q1){} (7,1) node[npn, xscale=-1](Q2){};
+ \coordinate (Qcenter) at ($(Q1.E)!0.5!(Q2.E)$);
+ \ChopperByTerminals[][-0.2cm]{Q1.E}{Q2.E}{cE}
+ \draw [<-] (cE-CKA) -- ++(-0.5,0) node[left]{$f_c$};
+ % pseudo-anchors
+ \ChopperByTerminals[draw=blue][-1cm]{4,-1.25}{7,-1.25}{C}
+ \foreach \a in {P1A, P1B, P2A, P2B, CKA, CKB, C, C1, C2}
+ \node[circle, draw, inner sep=1pt, pin={[font=\tiny, fill=white]60:C-\a}]
+ at (C-\a) {};
+\end{tikzpicture}
+\end{lstlisting}
+
+Obtaining:
+
+\begin{center} %% to insulate the definition, you never know
+\NewDocumentCommand{\ChopperByTerminals}{O{} O{0.2cm} m m m}{%
+ % #1 -> options to the draw command
+ % #2 -> half width
+ % by default is drawn to the right (if vertical), to the left if #2 is negative
+ % If horizontal, by default is above, below if #2 is negative
+ % #3 -> terminal A on port 1
+ % #4 -> terminal B on port 2
+ % #5 -> name for the "anchors"
+ \coordinate(#5-P1A) at (#3);
+ \coordinate(#5-P1B) at (#4);
+ % the center of the block is midway P1A and P1B, distance #2 at 90 clockwise
+ % degrees from the center
+ \coordinate(#5-C1) at ($(#5-P1A)!0.5!(#5-P1B)$);
+ \coordinate(#5-C) at ($(#5-C1)!#2!90:(#5-P1B)$);
+ \coordinate(#5-P2B) at ($(#5-P1A)!2!(#5-C)$);
+ \coordinate(#5-P2A) at ($(#5-P1B)!2!(#5-C)$);
+ \coordinate(#5-T1A) at ($(#5-P1B)!1.2!(#5-P1A)$);
+ \coordinate(#5-T1B) at ($(#5-P1A)!1.2!(#5-P1B)$);
+ \coordinate(#5-T2A) at ($(#5-P2B)!1.2!(#5-P2A)$);
+ \coordinate(#5-T2B) at ($(#5-P2A)!1.2!(#5-P2B)$);
+ \coordinate(#5-CKA) at ($(#5-T1A)!0.5!(#5-T2A)$);
+ \coordinate(#5-CKB) at ($(#5-T1B)!0.5!(#5-T2B)$);
+ \coordinate(#5-C2) at ($(#5-P2A)!0.5!(#5-P2B)$);
+ \draw [draw, thick, fill=white, #1] (#5-T1A) rectangle (#5-T2B);
+ \draw [draw, thick, line join=round, #1] (#5-P1A) -- (#5-P2B) -- (#5-P1B) -- (#5-P2A) -- (#5-P1A);
+}
+\begin{tikzpicture}[]
+ \node[op amp](A) at (0,0) {};
+ \ChopperByTerminals[draw=red][-0.2cm]{A.-}{A.+}{chopper in}
+ \draw [red, <-] (chopper in-CKA) -- ++(0,.5) node[above]{$f_c$};
+ \ChopperByTerminals[draw=red]{[xshift=1.2cm]A.-}{[xshift=1.2cm]A.+}{chopper out}
+ \draw [red, <-] (chopper out-CKA) -- ++(0,.5) node[above]{$f_c$};
+ %Try another one
+ \draw (4,1) node[npn](Q1){} (7,1) node[npn, xscale=-1](Q2){};
+ \coordinate (Qcenter) at ($(Q1.E)!0.5!(Q2.E)$);
+ \ChopperByTerminals[][-0.2cm]{Q1.E}{Q2.E}{cE}
+ \draw [<-] (cE-CKA) -- ++(-0.5,0) node[left]{$f_c$};
+ % pseudo-anchors
+ \ChopperByTerminals[draw=blue][-1cm]{4,-1.25}{7,-1.25}{C}
+ \foreach \a in {P1A, P1B, P2A, P2B, CKA, CKB, C, C1, C2}
+ \node[circle, draw, inner sep=1pt, pin={[font=\tiny, fill=white]60:C-\a}] at (C-\a) {};
+\end{tikzpicture}
+\end{center}
+
+
+
\section{The components: list}
@@ -2200,6 +2316,83 @@ For the \texttt{photoresistor} and the two ``flavors'' of the light-dependent re
\end{tikzpicture}
\end{LTXexample}
+\begingroup % protect changes to resistors
+\newcommand\showjoin[1]{%
+\begin{tikzpicture}[scale=4, transform shape]
+ \clip (0.2,-0.05) rectangle (0.6,0.3);
+ \draw[ultra thick] (0,0) to[R, resistors/thickness=#1] ++(2,0);
+\end{tikzpicture}%
+}
+\newcommand{\splat}{\begin{center}\ttfamily\scriptsize\begin{tabular}{cccc}
+ \showjoin{1}&\showjoin{2}&\showjoin{3}&\showjoin{4}\\
+ thickness=1 & thickness=2 & thickness=3 & thickness=4 \\
+ \end{tabular}\end{center}%
+}
+\newcommand{\rdivider}[1]{\begin{tikzpicture}
+ \ctikzset{resistors/thickness=#1}
+ \draw (0,0) node[ground]{} to[V] ++(0,2) to[R] ++(2,0)
+ to[R] ++(0,-2) to[short,-*] (0,0);
+\end{tikzpicture}\qquad}
+\newcommand{\divsplat}[1]{#1\par
+ \begin{center}
+ \rdivider{1}\rdivider{2}\rdivider{3}\rdivider{4}
+\end{center}}
+
+\paragraph{Details of American (``zig-zag'') resistors.\label{sec:zigzag-details}} American (zig-zag) resistors have a little joining problem\footnote{Noticed by \href{https://github.com/circuitikz/circuitikz/issues/811}{user Dr4UX on GitHub} and later \href{https://github.com/circuitikz/circuitikz/discussions/814}{discussed here}.} with the leading wires if the thickness is greater than two. In the following drawing you can see the problem when the thickness grows from 1 to 4.
+
+\splat
+
+Since \texttt{v1.7.0}, one possibility to correct the problem is to change the type of joining of the zig-zag line, using the key \texttt{resistors/zigzag join}, which is a command that by default is void. For example, the following effect is obtained by using
+
+\begin{lstlisting}[numbers=none]
+\ctikzset{resistors/zigzag hook/.code={\pgfsetroundcap}}
+\end{lstlisting}
+{\ctikzset{resistors/zigzag hook/.code={\pgfsetroundcap}}
+\splat}
+
+or you can even go full rounded
+
+\begin{lstlisting}[numbers=none]
+\ctikzset{resistors/zigzag hook/.code={\pgfsetroundcap\pgfsetroundjoin}}
+\end{lstlisting}
+{\ctikzset{resistors/zigzag hook/.code={\pgfsetroundcap\pgfsetroundjoin}}
+\splat}
+
+Another possibility is to add a little horizontal ``stub'' to the shape, with the key \texttt{resistors/zigzag stub} (default \texttt{0}), which will add a first part which is a continuation of the wire:
+\begin{lstlisting}[numbers=none]
+\ctikzset{resistors/zigzag stub=0.05}% this is relative to the resistor's length
+\end{lstlisting}
+{\ctikzset{resistors/zigzag stub=0.05}
+\splat}
+
+\dots or you can just combine all of them as you prefer. With the standard join/cap options, the look of the resistors for thickness from 1 to 4 is shown here:
+
+\ctikzset{american}
+\divsplat{Standard drawing of American resistors}
+\divsplat{With a 5\% stub: \ctikzset{resistors/zigzag stub=0.05}}
+\divsplat{With a 20\% stub: \ctikzset{resistors/zigzag stub=0.2}}
+
+
+\bigskip
+Finally, here is the detailed shape with thickness 2 (red=0, blue=0.05, green=0.2), magnified six times:
+
+\vspace*{2cm}% this vspace fences are needed because the transform canvas wreak havoc with the bbox
+\begin{tikzpicture}[transform canvas={scale=6}]
+ \ctikzset{resistors/zigzag stub=0}
+ \draw[red] (0,0.2) to [resistor, resistors/thickness=4] ++(2,0);
+ \ctikzset{resistors/zigzag stub=0.05}
+ \draw[blue] (0,0.1) to [resistor, resistors/thickness=4] ++(2,0);
+ \ctikzset{resistors/zigzag stub=0.2}
+ \draw[green] (0,0) to [resistor, resistors/thickness=4] ++(2,0);
+ % \draw [very thin](1,0.5) -- (1,-0.5);
+ % \draw [very thin](0,0) -- ++(2,0);
+ % \draw [very thin](0,0.1) -- ++(2,0);
+ % \draw [very thin](0,0.2) -- ++(2,0);
+\end{tikzpicture}
+\vspace*{2cm}
+
+\endgroup % changes to resistors stops here
+
\subsection{Capacitors and inductors: dynamical bipoles}
@@ -2431,9 +2624,9 @@ The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptyd
\footnotetext{Added by André Alves in \texttt{v1.4.4}}
\circuitdescbip*[emptyvarcap]{empty varcap}{Empty varcap}{VCo}
\circuitdescbip*[emptytvsdiode]{empty TVS diode}{Empty TVS diode, transorb\footnotemark}{tvsDo}
- \footnotetext{Transobs were suggested by \href{Anisio Braga}{https://tex.stackexchange.com/q/642219/38080}}
+ \footnotetext{Transorbs were suggested by \href{https://tex.stackexchange.com/q/642219/38080}{Anisio Braga}}
\circuitdescbip*[emptyshdiode]{empty Shockley diode}{Empty Shockley diode\footnotemark}{shDo}
- \footnotetext{Shockley diodes were suggested by \href{@Dauph}{https://tex.stackexchange.com/q/646039/38080}}
+ \footnotetext{Shockley diodes were suggested by \href{https://tex.stackexchange.com/q/646039/38080}{@Dauph}}
\circuitdescbip*[emptybidirectionaldiode]{empty bidirectionaldiode}{Empty bidirectionaldiode}{biDo}
\circuitdescbip[fulldiode] {full diode}{Full diode}{D*}
\circuitdescbip[fullsdiode]{full Schottky diode}{Full Schottky diode}{sD*}
@@ -2461,6 +2654,7 @@ These shapes have no exact node-style counterpart, because the stroke line is bu
\circuitdescbip*[emptylediode]{stroke led}{Stroke led}{leD-}(arrows/-30/0.3)
\circuitdescbip*[emptylaserdiode]{stroke laser diode}{Stroke laser diode}{lasD-}(arrows/-30/0.3)
\circuitdescbip*[emptyvarcap]{stroke varcap}{Stroke varcap}{VC-}
+ \circuitdescbip*[emptytvsdiode]{stroke TVS diode}{Stroke TVS diode, transorb}{tvsD-}
\end{groupdesc}
\subsubsection{Tripole-like diodes}\label{sec:othertrip} The following tripoles are entered with the usual command, of the form \texttt{to[Tr, \dots]}. In the following list you can see the traditional, or \texttt{legacy}, shape of the Thyristors-type devices.
@@ -2616,6 +2810,17 @@ As you can see, you can also have the option to globally change the color, relat
\end{tikzpicture}
\end{LTXexample}
+\paragraph{Zener and TVS diode options} You can change the shape of the Zener \texttt{ZZener} and \texttt{TVS} diodes using the flag \texttt{diode straight whiskers} (and reset it with the option \texttt{diode sloped whiskers}); this will change the ``whiskers'' of the diodes to be at a right angle\footnote{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/836}{Dr. Matthias Jung}} instead the sloped normal way.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \draw (0,1) to [zzDo] ++(1,0) to[zzD-] ++(1,0)
+ to[zzD*] ++(1,0) to[tvsD-] ++(2,0);
+ \ctikzset{diode straight whiskers}
+ \draw (0,0) to [zzDo] ++(1,0) to[zzD-] ++(1,0)
+ to[zzD*] ++(1,0) to[tvsD-] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
\subsection{Sources and generators}
@@ -2626,16 +2831,18 @@ Notice that source and generators are divided in three classes that can be style
\circuitdescbip{battery}{Battery}{}
\circuitdescbip{battery1}{Single battery cell}{}
\circuitdescbip{battery2}{Single battery cell}{}
+ \circuitdescbip{solar}{Solar-driven battery (arrows follow the same style options as photodiodes, see \ref{sec:opto-arrows})\footnotemark}{}
+ \footnotetext{Contributed by \href{https://github.com/circuitikz/circuitikz/pull/693}{Dr. Matthias Jung}.}
\circuitdescbip{baertty}{Randall Munroe's baertty\footnotemark}{}
\footnotetext{\href{https://xkcd.com/2818}{Mandatory xkcd}}
\end{groupdesc}
\subsubsection{Stationary sources}
\begin{groupdesc}
- \circuitdescbip*[vsource]{european voltage source}{Voltage source (european style)}{vsource}
+ \circuitdescbip*[vsource]{european voltage source}{Voltage source (european style)}{vsource, vsourceEU}
\circuitdescbip*[vsourceC]{cute european voltage source}{Voltage source (cute european style)}{vsourceC, ceV}
\circuitdescbip*[vsourceAM]{american voltage source}{Voltage source (american style)}{vsourceAM}
- \circuitdescbip*[isource]{european current source}{Current source (european style)}{isource}
+ \circuitdescbip*[isource]{european current source}{Current source (european style)}{isource, isourceEU}
\circuitdescbip*[isourceC]{cute european current source}{Current source (cute european style)}{isourceC, ceI}
\circuitdescbip*[isourceAM]{american current source}{Current source (american style)}{isourceAM}
\end{groupdesc}
@@ -2666,10 +2873,10 @@ Similarly, if (default behavior) \texttt{europeanvoltages} option is active (or
\subsubsection{Controlled sources}
\begin{groupdesc}
- \circuitdescbip*[cvsource]{european controlled voltage source}{Controlled voltage source (european style)}{cvsource}
+ \circuitdescbip*[cvsource]{european controlled voltage source}{Controlled voltage source (european style)}{cvsource, cvsourceEU}
\circuitdescbip*[cvsourceC]{cute european controlled voltage source}{Voltage source (cute european style)}{cvsourceC, cceV}
\circuitdescbip*[cvsourceAM]{american controlled voltage source}{Controlled voltage source (american style)}{cvsourceAM}
- \circuitdescbip*[cisource]{european controlled current source}{Controlled current source (european style)}{cisource}
+ \circuitdescbip*[cisource]{european controlled current source}{Controlled current source (european style)}{cisource, cisourceEU}
\circuitdescbip*[cisourceC]{cute european controlled current source}{Current source (cute european style)}{cisourceC, cceI}
\circuitdescbip*[cisourceAM]{american controlled current source}{Controlled current source (american style)}{cisourceAM}
\circuitdescbip*[ecsource]{empty controlled source}{Empty controlled source}{ecsource}
@@ -2852,9 +3059,9 @@ Notice that the size of the double-circle sources (and of the triple-circle one)
\end{LTXexample}
\paragraph{Waveform symbols.}
-Internal symbols of sinusoidal, triangular and square sources are drawn with the same line thickness as the component by default. You can modify this by setting the key \texttt{sources/symbols/thickness} for independent sources and the corresponding \texttt{csource/...} for dependent ones. The value used here is relative to the component (i.e. the circle) value.
+Internal symbols of sinusoidal, triangular and square sources are drawn with the same line thickness as the component by default. You can modify this by setting the key \texttt{sources/symbol/thickness} for independent sources and the corresponding \texttt{csource/...} for dependent ones. The value used here is relative to the component (i.e. the circle) value.
-Normally the symbol is oriented in the same direction as the line, and rotate rigidly with the component; you can change this orientation using the key \texttt{sources/symbols/rotate} or \texttt{csource/...}. The default value is \texttt{90} which correspond to the ``line'' direction (remember, path components are defined as horizontal ones).
+Normally the symbol is oriented in the same direction as the line, and rotate rigidly with the component; you can change this orientation using the key \texttt{sources/symbol/rotate} or \texttt{csource/...}. The default value is \texttt{90} which correspond to the ``line'' direction (remember, path components are defined as horizontal ones).
If instead of an angle value you use \texttt{auto}, the symbol will be rotated so that the waveform is always vertical, similar to what happens in instruments:
\begin{LTXexample}[varwidth=true]
@@ -3019,12 +3226,44 @@ Sometimes it is better to use a shape for instruments which is very different fr
\footnotetext{Suggested by \texttt{@nobrl} on GitHub}
\circuitdescbip{iloop}{Current loop (symbolic)}{}(left/135/0.2, right/45/0.2, center/-90/0.3, i/30/0.4)
\circuitdescbip{iloop2}{Current loop (real)}{}(left/135/0.2, right/-45/0.2, center/-90/0.3, i+/135/0.4, i-/45/0.4)
+ \circuitdescbip{currtap}{Current tap (probe)\footnotemark}{}(tap/-90/0.2)
+ \footnotetext{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/807}{user EEpchi on GitHub}.}
\end{groupdesc}
\subsubsection{Instruments customizations}\label{sec:tweak-instruments}
You can change the scale of all the instruments (including the current loops) by setting the key \texttt{instruments/scale} to something different from the default \texttt{1.0}.
+\paragraph{Current probes.}
+You can change the inner dot in several way, by changing the following keys under the \verb!\ctikzset! key \texttt{bipoles/currtap}:
+\begin{center}
+ \begin{tabular}{>{\ttfamily}l>{\ttfamily}lp{0.7\linewidth}}
+ \toprule
+ parameter & default & description \\
+ \midrule
+ thickness & default & Set the thickness of the line (\texttt{default}: do not change the class thickness) \\
+ color & default & stroke color: \texttt{default} is the same as the component \\
+ dash & default & dash pattern: none means solid line, default means keep the global pattern\footnotemark \\
+ fill & default & fill the inner dot; \texttt{default} means use the wire color, \texttt{none} do not fill, other keys must be a valid color \\
+ dot size& 0.5 & relative size of the inner dot \\
+ \bottomrule
+ \end{tabular}
+ \footnotetext{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.}
+\end{center}
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{circuitikz}
+ \draw (0,2) to[currtap, bipoles/currtap/fill=none, *-]
+ ++(2,0) to[currtap, bipoles/currtap/.cd,
+ fill=yellow, color=red, thickness=3,
+ dash={{1.14pt}{2pt}}] ++(2,0);
+ \draw (0,0) to[currtap=I, *-, name=ct] ++(2,0)
+ to[currtap, -*, name=ct2,
+ bipoles/currtap/dot size=0.3] ++(2,0);
+ \draw (ct.tap) -- ++(0,-1) (ct2.tap) -- ++(0,-1);
+\end{circuitikz}
+\end{LTXexample}
+
\paragraph{Oscilloscope waveform.} You can change the waveform shown in the oscilloscope ``screen''\footnote{Suggested by \href{https://tex.stackexchange.com/q/595062/38080}{Mario Tafur on TeX.SX}}. To change it, you just set the key \texttt{bipoles/oscope/waveform} to one of the available shape. You have available the shapes in the following list (the default is \texttt{ramps}):
\begin{LTXexample}[pos=t, basicstyle=\small\ttfamily]
@@ -3266,12 +3505,16 @@ Here you'll find bipoles that are not easily grouped in the categories above.
\circuitdescbip*{fuse}{Fuse}{}
\circuitdescbip*{afuse}{Asymmetric fuse}{asymmetric fuse}
\circuitdescbip{wfuse}{``wiggly'' fuse}{wiggly fuse}()[left/110/0.2, right/70/0.2]
+ \circuitdescbip*{relais}{Relais\footnotemark}{}
+ \footnotetext{Contributed by \href{https://github.com/circuitikz/circuitikz/pull/795}{Jakob «DraUX»}}
\circuitdescbip{squid}{Squid}{}
\circuitdescbip{barrier}{Barrier}{}
\circuitdescbip{openbarrier}{Open barrier}{}
\end{groupdesc}
-You can tune how big is the gap in the \texttt{openbarrier} component by setting the key \texttt{bipoles/openbarrier/gap} (default value \texttt{0.5}; \texttt{0} means no gap and \texttt{1} full gap).
+You can tune how big the gap in the \texttt{openbarrier} is by setting \texttt{bipole/openbarrier/gap} (default value \texttt{1} meaning full width).
+The default width \texttt{bipole/openbarrier/width} is \texttt{0.21}, while \texttt{bipole/barrier/width} is \texttt{0}.
+These settings ensure minimal width without drawing any wire when the components' node shapes are used.
\begin{groupdesc}
\circuitdescbip*{european gas filled surge arrester}{European gas filled surge arrester}{}
@@ -3287,6 +3530,13 @@ If otherwise \texttt{americangfsurgearrester} option is active (or the style \te
\begin{groupdesc}
\circuitdescbip*{lamp}{Lamp}{}
\circuitdescbip*{bulb}{Bulb}{}
+ \circuitdescbip*{neonlampcc}{Neon lamp\footnotemark\ (double cathode style)}{}
+ \footnotetext{The neon lamps have been added in \texttt{v1.6.9} thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/793}{user bogger33 on GitHub}.}
+ \circuitdescbip*{neonlampac}{Neon lamp (anode and cathode style)}{}
+ \circuitdescbip*{sparkgap}{Spark gap\footnotemark (unenclosed)}{}
+ \footnotetext{The spark gap has been added in \texttt{v1.6.9} thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/800}{user bogger33 on GitHub}.}
+ \circuitdescbip*[sparkgap]{sparkgap, sparkgap/circle}{Spark gap}{}
+ \circuitdescbip*[sparkgap]{sparkgap, sparkgap/dot, sparkgap/circle}{Spark gap (gas filled)}{}
\circuitdescbip*{loudspeaker}{loudspeaker}{}( north/90/0.4, ne/45/0.4, east/0/0.4, se/-45/0.4, south/-90/0.4, sw/-135/0.4, west/180/0.4, nw/135/0.4, left/135/0.2, right/45/0.2, center/-135/0.2)
\circuitdescbip*{mic}{mic}{}( north/90/0.4, east/0/0.4, south/-90/0.4, west/180/0.4, left/135/0.2, right/45/0.2, center/-135/0.2)
\circuitdescbip*{tlmic}{tail-less mic\footnotemark}{}( north/90/0.4, east/0/0.4, south/-90/0.4, west/180/0.4, left/135/0.2, right/45/0.2, center/-135/0.2)
@@ -3311,6 +3561,7 @@ You can use microphones and loudspeakers with \texttt{waves} (see section~\ref{s
\end{circuitikz}
\end{LTXexample}
+
You have two types of microphones; \texttt{mic} has protruding connection and \texttt{tlmic} (for tail-less microphone) is inline. This last one is handy for use as a separate shape (which is named \texttt{tlmicshape}). You can change the (relative) thickness of the straight bar using the key \texttt{bipoles/mic/bar thickness} (default \texttt{1}).
\begin{LTXexample}[varwidth=true]
@@ -3324,9 +3575,9 @@ You have two types of microphones; \texttt{mic} has protruding connection and \t
\subsubsection{Miscellaneous element customization}\label{sec:tweak-misc}
-You can change the scale of all the miscellaneous elements by setting the key \texttt{misc/scale} to something different from the default \texttt{1.0}.
+You can change the scale of all the miscellaneous elements by setting the key \texttt{misc/scale} to something different from the default \texttt{1.0}; relative thickness can be controlled with \texttt{misc/thickness}.
-\paragraph{Wiggly fuses} can have (or not have) poles; you can switch between the two forms by setting to \texttt{true} or \texttt{false} (default \texttt{true}) the key \texttt{bipoles/wfuse/dots}; if they have poles, you can choose any of the pole shapes with the key \texttt{bipoles/wfuse/shape}.
+\paragraph{Wiggly fuses.} Wiggly fuses can have (or not have) poles; you can switch between the two forms by setting to \texttt{true} or \texttt{false} (default \texttt{true}) the key \texttt{bipoles/wfuse/dots}; if they have poles, you can choose any of the pole shapes with the key \texttt{bipoles/wfuse/shape}.
The pole nodes are named \texttt{-left} and \texttt{-right} so that you can access their borders.
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
@@ -3342,6 +3593,30 @@ The pole nodes are named \texttt{-left} and \texttt{-right} so that you can acce
\end{circuitikz}
\end{LTXexample}
+\paragraph{Neon lamps.} Neon lamp ``dot'' size is the same as the size of poles (\texttt{circ} and \texttt{ocirc}), and they can be changed locally:
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \draw (0,0) to[neonlampcc, nodes width=0.03] ++(2,0)
+ to[neonlampac, misc/thickness=3] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+
+\paragraph{Spark gap.} The \texttt{sparkgap} component is similar to the (American) surge arrester, but it's more configurable; it will render bare (unenclosed) by default, but you can add a (fillable) enclosure with the key \texttt{sparkgap/circle} and a dot with \texttt{sparkgap/dot} (they are boolean keys, false by default).
+Moreover, the arrows are configurable like other arrows in the package (see~\ref{sec:tunablearrows}) using the \texttt{sparkgap end arrow} key (default \texttt{Triangle[scale=2]}). The gap is tunable with \texttt{sparkgap/gap} (default \texttt{0.05}).
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}
+ \draw (0,2) to[sparkgap, l=gap\textsubscript{1}] ++(2,0)
+ to[sparkgap, sparkgap/circle,
+ sparkgap/dot, l=S2] ++(2,0);
+ \ctikzset{sparkgap end arrow={Kite[scale=1.5]}}
+ \draw (0,0) to[sparkgap, l=S3] ++(2,0)
+ to[sparkgap, l=S4, sparkgap/circle,
+ sparkgap/gap=0.15] ++(2,0);
+\end{tikzpicture}
+\end{LTXexample}
+As in neon lamps, the dot (if activated by the key \texttt{sparkgap/dot}) follows the size of poles and can be changed locally.
+
+
\subsection{Multiple wires (buses)}
These are simple drawings to indicate multiple wires.
@@ -3445,9 +3720,9 @@ While the horizontal line will be drawn with the current path values, you can ch
\end{circuitikz}
\end{LTXexample}
-\subsection{Arrows}\label{sec:arrows}
+\subsection{Arrows (fake and real)}\label{sec:arrows}
-These are pseudo-arrows used in lot of places in the packages (for transistors, flows, currents, and so on). The first three arrows are magnified by a factor~3 in the boxes below; for the \texttt{trarrow}, the anchor \texttt{tip} is exactly on the tip and \texttt{btip} is slightly receded.
+The main arrow shapes in \Circuitikz{} are really shapes, used as pseudo-arrows in lot of places in the packages (for transistors, flows, currents, and so on). The first three arrows are magnified by a factor~3 in the boxes below; for the \texttt{trarrow}, the anchor \texttt{tip} is exactly on the tip and \texttt{btip} is slightly receded.
\begin{groupdesc}
\circuitdesc[3]{currarrow}{Arrow for current and voltage}{}(center/0/0.2)
@@ -3507,6 +3782,30 @@ The arrows are the ones set with the keys \texttt{tunable start arrow} and \text
Notice also the need to force a transparency group if you want a semitransparent arrow.
+\subsubsection{Arrow tips}\label{sec:arrow-tips}
+
+In addition to the pseudo-arrows, \Circuitikz{} also adds a couple of ``real'' arrow tips.
+The package automatically loads the \texttt{arrows.meta} \TikZ{} library but \emph{not} the deprecated \texttt{arrows} library; in the first versions of the package it used quite a lot the \texttt{latex'} tip, which is not available anymore. To maintain the backward compatibility, the `latexslim` tip has been added, and used by default in several components. This is an old-style arrow tip, with no customization possible.
+
+The other tip is \texttt{Jack Tap}\footnote{Added after a suggestion from \href{https://github.com/circuitikz/circuitikz/issues/806}{Anisio Rogerio Braga} on GitHub}, which is mainly used to build jack connectors (see section~\ref{sec:jacks}). This is a new-style arrow tip, and accepts the parameter \texttt{length} (default \texttt{0.3 cm}), \texttt{width} (default \texttt{0.15 cm}), and the boolean \texttt{swap}.
+
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}
+ \draw (0,.25) (0,0) edge[-latexslim] ++(1,0)
+ ++(0, -0.5) edge[-{Jack Tap[swap]}] ++(1,0)
+ ++(0, -0.5) edge[-Jack Tap] ++(1,0)
+ ++(0, -0.5) edge[-{Jack Tap[fill=cyan]}] ++(1,0)
+ ++(0, -0.5) edge[-{Jack Tap[width=.3cm,fill]}]++(1,0)
+ ++(0, -0.5) edge[-{Jack Tap[width=.3cm,line join=round,
+ line cap=round]}, thick] ++(1,0)
+ ++(0, -0.5) edge[^-^f] ++(1,0)
+ ++(0, -0.5) edge[vf-v] ++(1,0);
+\end{circuitikz}
+\end{LTXexample}
+You can also have a filled version, by adding the key \texttt{fill} (without arguments\footnote{This usage of the \texttt{fill} key in arrow tips will be added to \TikZ{} in version \texttt{3.1.11}, see \href{https://github.com/pgf-tikz/pgf/pull/1352}{this PR by Henri Menke}; \Circuitikz{} will add it to older versions.}) or \texttt{fill=color} if you want a color different from the stroke ones, and they accept the \texttt{line join} and \texttt{line cap} as most of the standard \TikZ{} arrows.
+As you can see, the normal and swapped \texttt{Jack Tap} tips have the shorthands \texttt{v} and \verb|^| (and \texttt{vf} and \verb|^f| for their filled counterparts). Notice that the tips are automatically reversed when they are at the \emph{start} of the path.
+
\subsection{Terminal shapes}\label{sec:terminals}
These are the so-called ``bipole nodes'' shapes, or poles (see section~\ref{sec:bipole-nodes}). These nodes are always filled; the ``open'' versions (starting with an \texttt{o}) are by default filled with the color specified by the key \texttt{open nodes fill} (by default \texttt{white}), but you can override locally it with the \texttt{fill} parameter.
@@ -3520,6 +3819,12 @@ These are the so-called ``bipole nodes'' shapes, or poles (see section~\ref{sec:
\circuitdesc{osquarepole}{Open square-shape terminal}{}
\end{groupdesc}
+This is not a pole, but it's used to "fill" nasty corners (look closer, and see ~\ref{sec:line-joins}).
+
+\begin{groupdesc}
+ \circuitdesc{rectjoinfill}{Filling square with line width size}{}
+\end{groupdesc}
+
Since version 0.9.0, ``bipole nodes'' shapes have all the standard geographical anchors, so you can do things like these:
\begin{LTXexample}[varwidth=true]
@@ -3639,6 +3944,33 @@ You can use the \texttt{plug center} anchor to add the IEC ``multiplier'':
\end{circuitikz}
\end{LTXexample}
+\subsubsection{Jack connectors}\label{sec:jacks}
+
+There are \emph{lots} of different jack connectors symbols --- see the \href{https://github.com/circuitikz/circuitikz/issues/806}{discussion here} for examples. So instead of creating a monster component, it has been decided to add elements to simplify the drawing of such connectors. The first (and for now only) such element is the \texttt{Jack Tap} arrow tip (see section~\ref{sec:arrow-tips}) with its shorthands \texttt{v} and \verb|^|.
+
+For example, and audio jack can be drawn like this:
+
+\begin{LTXexample}[pos=t, varwidth=true]
+% drawing based on one by Anisio Rogerio Braga
+% https://github.com/circuitikz/circuitikz/issues/806
+\newcommand\dx{1.5}\newcommand\dy{1}
+\begin{circuitikz}
+ \draw[-v] (0,\dy/3*4) to[short, o-] ++(\dx,0);
+ \draw[-Triangle] (0,\dy) node[ocirc]{} -| ++(\dx/3,\dy/3);
+ \draw[-Triangle] (0,\dy/3*2) node[ocirc]{} -| ++(\dx/3,-\dy/3);
+ \draw[-^] (0,\dy/3) to[short, o-] ++(2*\dx/3,0);
+ \draw (0,0.0) to[short, o-] ++(1.75*\dx,0) rectangle ++(0.2,4*\dy/3);
+\end{circuitikz}\qquad\qquad
+%---% audio jack with an inserted plug
+\begin{circuitikz}
+ \draw[-v] (0,\dy/3*4) to[short, o-] ++(\dx,0.2);
+ \draw[-Triangle] (0,\dy) node[ocirc]{} -| ++(\dx/3,\dy/3);
+ \draw[-Triangle] (0,\dy/3*2) node[ocirc]{} -| ++(\dx/3,-\dy/3);
+ \draw[-^] (0,\dy/3) to[short, o-] ++(2*\dx/3,-0.2);
+ \draw (0,0.0) to[short, o-] ++(1.75*\dx,0) rectangle ++(0.2,4*\dy/3);
+\end{circuitikz}
+\end{LTXexample}
+
\subsection{Block diagram components}
\noindent Contributed by Stefan Erhardt.
@@ -3669,6 +4001,14 @@ You can use the \texttt{plug center} anchor to add the IEC ``multiplier'':
\circuitdescbip*{highpass}{highpass}{}
\circuitdescbip*{lowpass}{lowpass}{}
\circuitdescbip*{allpass}{allpass}{}
+ \circuitdescbip*{vallpass}{variable allpass\footnotemark}{}
+ \footnotetext{This block, as well as \texttt{bgenerator}, \texttt{cgenerator}, \texttt{qgenerator}, \texttt{ngenerator},
+ \texttt{biast}, \texttt{sinetable}, \texttt{register}, \texttt{harmonics}, and the TV/Radio system blocks have been
+ contributed by \href{https://github.com/circuitikz/circuitikz/pull/693}{Dr. Matthias Jung}.}
+ \circuitdescbip*{bgenerator}{Block generator (use \texttt{t=\dots} to specify text)}{}
+ \circuitdescbip*{qgenerator}{Crystal generator (use \texttt{t=\dots} to specify text)}{}
+ \circuitdescbip*{cgenerator}{Clock generator}{}
+ \circuitdescbip*{ngenerator}{Generic generator (use \texttt{t=\dots} to specify text)}{}
\circuitdescbip*{highpass2}{simplified highpass (with only 2 waves)}{}
\circuitdescbip*{lowpass2}{simplified lowpass (with only 2 waves)}{}
\circuitdescbip*{adc}{A/D converter}{}
@@ -3684,6 +4024,9 @@ You can use the \texttt{plug center} anchor to add the IEC ``multiplier'':
\circuitdescbip*{vtattenuator}{var.\ T attenuator}{}
\circuitdescbip*{phaseshifter}{phase shifter}{}
\circuitdescbip*{vphaseshifter}{var.\ phase shifter}{}
+ \circuitdescbip*{biast}{BIAS-T circuit as block}{}
+ \circuitdescbip*{sinetable}{Sine lookup table}{}
+ \circuitdescbip*{register}{Register (use \texttt{t=\dots} to specify text)}{}(clk/180/0.2)
\circuitdescbip*{detector}{detector}{}
\circuitdescbip*{saturation}{Saturation\footnotemark}{}
\footnotetext{Contributed by \href{https://github.com/circuitikz/circuitikz/issues/758}{P. Sacco \texttt{<paul.sacco@estaca.eu>}}}
@@ -3700,6 +4043,16 @@ You can use the \texttt{plug center} anchor to add the IEC ``multiplier'':
\circuitdescbip*{tacac}{three phases AC/DC converter}{}(ac up in/135/.3, ac mid in/185/.3, ac down in/-135/.3, ac up out/45/.3, ac mid out/-5/.3, ac down out/-45/.3)
\end{groupdesc}
+Blocks to draw TV/radio system schematics, contributed by \href{https://github.com/circuitikz/circuitikz/pull/693}{Dr. Matthias Jung}.
+\begin{groupdesc}
+ % radio/tv block sets
+ \circuitdescbip*{camera}{Videocamera}{}
+ \circuitdescbip*{tvset}{Television (TV)}{}
+ \circuitdescbip*{trx}{Radio tranceiver (HAM-Radio)}{}(plus/160/0.2, minus/200/0.2)
+ \circuitdescbip*{swr}{Standing Wave Ratio (SWR) meter}{}
+ \circuitdescbip*{power}{Power Supply}{}(u1/160/0.2, u2/200/0.2, plus/45/0.2, minus/-45/0.2)
+\end{groupdesc}
+
\begin{groupdesc}
\circuitdesc*{fourport}{Generic fourport}{}(port1/180/0.1, port2/0/0.1, port3/0/0.2, port4/180/0.1)
\circuitdesc*{coupler}{Coupler}{}(left down/180/0.1, right down/0/0.1, right up/0/0.2, left up/180/0.1)
@@ -3882,6 +4235,7 @@ With the option \texttt{>} you can draw an arrow to the input of the block diagr
\end{circuitikz}
\end{LTXexample}
+
You can also change the width for the generic block:
\begin{LTXexample}[pos=t, varwidth=t, basicstyle=\small\ttfamily]
@@ -3895,7 +4249,6 @@ You can also change the width for the generic block:
\end{circuitikz}
\end{LTXexample}
-
\paragraph{Multi ports}
Since inputs and outputs can vary, input arrows can be placed as nodes. Note that you have to rotate the arrow on your own:
@@ -3910,6 +4263,26 @@ Since inputs and outputs can vary, input arrows can be placed as nodes. Note tha
\end{circuitikz}
\end{LTXexample}
+You can use additional anchors to mix different kinds of elements.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily, pos=t]
+% Author: Prof. Dr. Matthias Jung Year: 2023
+\begin{tikzpicture}
+ %\useasboundingbox (-3.75,-1.0) rectangle (10.5,3);
+ \node[draw, powershape] at (0,0) (supply) {};
+ \draw(supply.south) node[anchor=north]{\qty{13,8}{V}};
+ \node[draw, trxshape] at (5,0) (trx) {};
+ \draw(trx.east) -- ++(1,0) node[swrshape, anchor=west](swr){};
+ \draw(swr.east) -- ++(1,0) node[antenna]{};
+ \draw(trx.south) node[ground]{};
+ \draw[red](supply.plus) to [fuse, color=red] ++(2.5,0)
+ to [short, i={I}, color=red] (trx.plus);
+ \draw(trx.minus) to [short, i={}] (supply.minus);
+ \draw(supply.u1) to [short, -o] ++(-1,0) coordinate(c1);
+ \draw(supply.u2) to [short, -o] ++(-1,0) coordinate(c2);
+ \draw(c1) to [open, l_={$\sim\qty{230}{\volt}$}] (c2);
+\end{tikzpicture}
+\end{LTXexample}
\paragraph{Labels and custom two-port boxes}
@@ -3932,6 +4305,15 @@ Some two-ports have the option to place a normal label (\texttt{l=}) and a inner
\end{circuitikz}
\end{LTXexample}
+Each block determines where the text is added:
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz} \draw
+ (0,0) to[qgenerator, t=G,*-] ++(2,0)
+ to[vallpass,>] ++(2,0)
+ to[ngenerator, t=FM,>] ++(2,0)
+ to[short,-o] ++(0.3,0);
+\end{circuitikz}
+\end{LTXexample}
\paragraph{Box option}
Several devices have the possibility to add a box around them with the \texttt{box} or \texttt{boxed} option. The inner symbol scales down to fit inside the box. For the ``circled'' devices (mixer, adder, oscillator and circulator) the inner circle is normally drawn, unless you use the \texttt{box only} or \texttt{boxed only} option.\footnote{Since 1.5.0, suggested by \href{https://github.com/circuitikz/circuitikz/issues/621}{GitHub user myzinsky}}
@@ -4189,7 +4571,7 @@ You can also change\footnote{Thanks to the idea by \href{https://github.com/circ
\end{tikzpicture}
\end{LTXexample}
-\paragraph{Circles.} Since \texttt{1.2.6}, you can add a circle\footnote{Suggested by Matthias Jung \href{https://github.com/circuitikz/circuitikz/issues/442}{on GitHub}} to most of the transistor shapes --- with the exception of multi-terminal (\texttt{bjtnpn} and \texttt{bjtpnp}, where it would be awkward anyway) and graphene FETs. The circle is intended in some case as the component's housing, and used to distinguish discrete components from integrated ones.
+\paragraph{Circles.} Since \texttt{1.2.6}, you can add a circle\footnote{Suggested by Dr. Matthias Jung \href{https://github.com/circuitikz/circuitikz/issues/442}{on GitHub}} to most of the transistor shapes --- with the exception of multi-terminal (\texttt{bjtnpn} and \texttt{bjtpnp}, where it would be awkward anyway) and graphene FETs. The circle is intended in some case as the component's housing, and used to distinguish discrete components from integrated ones.
To add the circle to a single transistor, you use the \texttt{tr circle} keys in the node; if you want all of your transistors with a circle, you can set the property \texttt{tr circle} with a \verb|\ctikzset| command (it will respect normal grouping, of course); in that case, you can use \texttt{tr circle=false} to locally disable them.
@@ -4827,7 +5209,8 @@ Note that the \verb|diodetube| is used as component name to avoid clashes with t
Normally, the filament is not drawn. If you want a filament, put the \verb|filament| option in the node description:
\begin{groupdesc}
- \circuitdesc*{diodetube,filament}{Tube Diode}{}(anode/90/0.2, filament 1/-135/0.2, filament 2/-45/0.2 )
+ \circuitdesc*{diodetube,filament}{Tube Diode\footnotemark}{}(anode/90/0.2, filament 1/-90/0.4, filament 2/-45/0.2, filament center/0/0.5 )
+ \footnotetext{The \texttt{filament center} anchor has been added in \texttt{v1.6.9} thanks to a suggestion by \href{https://github.com/circuitikz/circuitikz/issues/792}{user bogger33 on GitHub}.}
\end{groupdesc}
Sometimes, you don't want the cathode to be drawn (but you do want the filament). Use the \verb|nocathode| option in the node description:
@@ -4869,18 +5252,27 @@ fully configurable, and the attributes are described below:
\verb|tubes/filament angle| & \verb|15| & angle from the centerpoint \\
\end{tabular}
-Conventionally, the model of the tube is indicated at the \verb|east| anchor:
+Conventionally, the model of the tube is indicated at the \verb|east| anchor, and you can access filament anchors if you need them:
-\begin{LTXexample}[varwidth]
-\ctikzset{tubes/width=1.4}
-\ctikzset{tubes/height=1}
-\begin{circuitikz}
-\draw (0,0) node[triode] (Tri) {};
-\draw (Tri.east) node[right] {12AX7};
-\end{circuitikz}
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\ctikzset{tubes/width=1.4, tubes/height=1}
+\begin{circuitikz}
+ \draw (0,2) node[triode, filament] (Tri) {};
+ \draw (Tri.east) node[right] {12AX7};
+ \ctikzset{tubes/filament angle=40,
+ tubes/filament distance=0.2}
+ \draw (0,0) node[triode, filament] (Pent) {};
+ \draw (Pent.east) node[right] {BOH};
+ \path (Tri.filament 1) node[red,ocirc]{};
+ \path (Pent.filament 1) node[red,ocirc]{};
+ \path (Tri.filament center) node[blue,ocirc]{};
+ \draw (Pent.filament center) -- ++(0,-1) node[tlground]{};
+ \end{circuitikz}
\end{LTXexample}
+
+
Example triode amplifier:
\begin{lstlisting}
@@ -5128,6 +5520,7 @@ Notes that in the transmission and receiving antennas, the ``waves'' are outside
\circuitdesc{waves}{Waves}{}( north/90/0.4, north east/45/0.4, east/-45/0.4, south east/-45/0.4,
south/-90/0.4, south west/-135/0.4, west/180/0.4, north west/135/0.4,
left/135/0.2, top/45/0.2, right/45/0.2, bottom/-45/0.2 )
+ \circuitdesc{harmonics}{Harmonics which could be combined with waves}{}
\circuitdescbip*{mstline}{Microstrip transmission line\footnotemark}{}(left/135/0.2, right/45/0.2, center/-90/0.3)
\circuitdesc*{mslstub}{Microstrip linear stub}{text}(left/135/0.2, right/45/0.2, center/-45/0.3)
\circuitdesc*{msport}{Microstrip port}{T}(left/135/0.2, right/45/0.2, center/-45/0.3)
@@ -5142,6 +5535,27 @@ Notes that in the transmission and receiving antennas, the ``waves'' are outside
\circuitdesc{match}{match}{}
\end{groupdesc}
+The \texttt{waves} and \texttt{harmonics} can help with RF block diagrams
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily, pos=t]
+% Author: Prof. Dr. Matthias Jung, DL9MJ % Year: 2023
+\begin{circuitikz}[european]
+ \draw(0,0) node [dinantenna](ant1){};
+ \draw[thick](ant1.south) -- ++(0,-1)
+ node[anchor=south west](){$f=\qty{145,9}{\mega\hertz}$};
+ \draw(3.5,0) node [dinantenna](ant2){};
+ \draw(3.75,-0.5) node[tvsetshape, anchor=west, fill=gray](tv){};
+ \draw[thick] (ant2) |- (tv);
+ \draw(tv.north) node[above](){TV};
+ %
+ \draw[gray](ant1.right) node[harmonics, xscale=2, anchor=left](){};
+ \draw[thick](ant1.right) node[waves, xscale=2, anchor=left](){};
+ %
+ \draw(tv.south) ++(0,-0.25)
+ node[below](foo){$f=$\,\qtyrange{582}{590}{\mega\hertz}};
+ \draw(foo.south) node[below](){DVB-T2 Kanal 35};
+\end{circuitikz}
+\end{LTXexample}
+
\subsubsection{RF elements customization}
The RF elements can be scaled using the key \texttt{RF/scale}, default \texttt{1.0}.
@@ -6553,7 +6967,7 @@ with the parameter \texttt{number inputs} :
\end{circuitikz}
\end{LTXexample}
-You can suppress the drawing of the logic ports input leads by using the boolean key \texttt{logic ports draw input leads} (default \texttt{true}) or, locally, with the style \texttt{no inputs leads} (that can be reverted with \texttt{input leads}), like in the following example. The anchors do not change and you have to take responsibility to make the connection to the ``border''-anchors.
+You can suppress the drawing of the logic ports input leads by using the boolean key \texttt{logic ports draw input leads} (default \texttt{true}) or, locally, with the style \texttt{no input leads} (that can be reverted with \texttt{input leads}), like in the following example. The anchors do not change and you have to take responsibility to make the connection to the ``border''-anchors.
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}
@@ -7393,9 +7807,9 @@ External pins' length is controlled by the key \texttt{multipoles/external pins
like in chips. In addition, like in logic ports, you can suppress the
drawing of the leads by using the boolean key
\texttt{logic ports draw input leads} (default \texttt{true}) or, locally,
-with the style \texttt{no inputs leads} (that can be reverted with
+with the style \texttt{no input leads} (that can be reverted with
\texttt{input leads}).
-The main difference between setting \texttt{external pins width} to \texttt{0} or using \texttt{no inputs lead} is that in the first case the normal pin anchors and the border anchors will coincide, and in the second case they will not move and stay where they should have been if the leads were drawn.
+The main difference between setting \texttt{external pins width} to \texttt{0} or using \texttt{no input lead} is that in the first case the normal pin anchors and the border anchors will coincide, and in the second case they will not move and stay where they should have been if the leads were drawn.
You can draw only selected pins and leave out the rest by setting the keys
\texttt{multipoles/draw only \emph{side} pins} and the corresponding style
@@ -7797,7 +8211,7 @@ You can, if you want, avoid printing the numbers of the pin with \texttt{hide nu
\end{LTXexample}
-Also, you can suppress the drawing of the pins, by using the style \texttt{no inputs leads} (that can be reverted with \texttt{input leads}). The main difference between setting \texttt{external pins width} to \texttt{0} or using \texttt{no inputs lead} is that in the first case the normal pin anchors and the border anchors will coincide, and in the second case they will not move and stay where they should have been if the leads were drawn.
+Also, you can suppress the drawing of the pins, by using the style \texttt{no input leads} (that can be reverted with \texttt{input leads}). The main difference between setting \texttt{external pins width} to \texttt{0} or using \texttt{no input lead} is that in the first case the normal pin anchors and the border anchors will coincide, and in the second case they will not move and stay where they should have been if the leads were drawn.
For special use you can suppress the orientation mark with the key \texttt{no topmark} (default \texttt{topmark}).
diff --git a/graphics/pgf/contrib/circuitikz/doc/ctikzmanutils.sty b/graphics/pgf/contrib/circuitikz/doc/ctikzmanutils.sty
index 1104d2c0d2..beb5505701 100644
--- a/graphics/pgf/contrib/circuitikz/doc/ctikzmanutils.sty
+++ b/graphics/pgf/contrib/circuitikz/doc/ctikzmanutils.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4-body.tex
index fa6fb3c2a8..ca5392fa83 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4.sty
index faa09eb32f..3d552d4eaa 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.4.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6-body.tex
index 0630698e49..6aee9b47e4 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6.sty
index 3d41bfcc1d..d282f55cd5 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.6.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7-body.tex
index 91f5dabcd0..4e3ba24e3a 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7.sty
index efe138d2a2..4162977f99 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.7.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3-body.tex
index b65bc59c8f..e058f29ecf 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3.sty
index ccd07fea83..da59d5636b 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.8.3.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3-body.tex
index dfaa1bb4d6..0f077a1deb 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3.sty
index 2ce27f90e2..9f90dc99bd 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.3.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6-body.tex
index 450ac4fcff..83d7eac703 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6.sty
index 49fe5703fa..8b357c6f91 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-0.9.6.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0-body.tex
index b4cbf9d327..f632aefb0a 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -342,10 +342,10 @@
%%%%%%%%%
%%%%%%%%%%% Springe nach tex/pgfcirc.defines
%%%---------- open: tex/pgfcirc.defines.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2304,10 +2304,10 @@
%%%---------- close: tex/pgfcirc.defines
%%%%%%%%%%% Springe nach tex/pgfcircutils
%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2376,10 +2376,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircshapes
%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -3182,10 +3182,10 @@
%%%---------- close: tex/pgfcircshapes
%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -4198,10 +4198,10 @@
%%%---------- close: tex/pgfcircmonopoles
%%%%%%%%%%% Springe nach tex/pgfcircbipoles
%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -9302,10 +9302,10 @@
%%%---------- close: tex/pgfcircbipoles
%%%%%%%%%%% Springe nach tex/pgfcirctripoles
%%%---------- open: tex/pgfcirctripoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -15010,10 +15010,10 @@
%%%---------- close: tex/pgfcirctripoles
%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
%%%---------- open: tex/pgfcircquadpoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -16161,10 +16161,10 @@
%%%---------- close: tex/pgfcircquadpoles
%%%%%%%%%%% Springe nach tex/pgfcircmultipoles
%%%---------- open: tex/pgfcircmultipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -17939,10 +17939,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirclabel
%%%---------- open: tex/pgfcirclabel.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -18308,10 +18308,10 @@
%%%---------- close: tex/pgfcirclabel
%%%%%%%%%%% Springe nach tex/pgfcircvoltage
%%%---------- open: tex/pgfcircvoltage.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -18807,10 +18807,10 @@
%%%---------- close: tex/pgfcircvoltage
%%%%%%%%%%% Springe nach tex/pgfcirccurrent
%%%---------- open: tex/pgfcirccurrent.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -19022,10 +19022,10 @@
%%%---------- close: tex/pgfcirccurrent
%%%%%%%%%%% Springe nach tex/pgfcircflow
%%%---------- open: tex/pgfcircflow.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -19236,10 +19236,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircpath
%%%---------- open: tex/pgfcircpath.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0.sty
index 9771552881..b5a2c5aa66 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.0.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2-body.tex
index 9d25525027..9219fbd4bb 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -343,10 +343,10 @@
%%%%%%%%%
%%%%%%%%%%% Springe nach tex/pgfcirc.defines
%%%---------- open: tex/pgfcirc.defines.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2449,10 +2449,10 @@
%%%---------- close: tex/pgfcirc.defines
%%%%%%%%%%% Springe nach tex/pgfcircutils
%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2535,10 +2535,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircshapes
%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -3341,10 +3341,10 @@
%%%---------- close: tex/pgfcircshapes
%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -4357,10 +4357,10 @@
%%%---------- close: tex/pgfcircmonopoles
%%%%%%%%%%% Springe nach tex/pgfcircbipoles
%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -10254,10 +10254,10 @@
%%%---------- close: tex/pgfcircbipoles
%%%%%%%%%%% Springe nach tex/pgfcirctripoles
%%%---------- open: tex/pgfcirctripoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -16161,10 +16161,10 @@
%%%---------- close: tex/pgfcirctripoles
%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
%%%---------- open: tex/pgfcircquadpoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -17448,10 +17448,10 @@
%%%---------- close: tex/pgfcircquadpoles
%%%%%%%%%%% Springe nach tex/pgfcircmultipoles
%%%---------- open: tex/pgfcircmultipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -20142,10 +20142,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirclabel
%%%---------- open: tex/pgfcirclabel.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -20511,10 +20511,10 @@
%%%---------- close: tex/pgfcirclabel
%%%%%%%%%%% Springe nach tex/pgfcircvoltage
%%%---------- open: tex/pgfcircvoltage.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -21060,10 +21060,10 @@
%%%---------- close: tex/pgfcircvoltage
%%%%%%%%%%% Springe nach tex/pgfcirccurrent
%%%---------- open: tex/pgfcirccurrent.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -21275,10 +21275,10 @@
%%%---------- close: tex/pgfcirccurrent
%%%%%%%%%%% Springe nach tex/pgfcircflow
%%%---------- open: tex/pgfcircflow.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -21489,10 +21489,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircpath
%%%---------- open: tex/pgfcircpath.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2.sty
index 0a3ea7c761..cdb974752f 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.1.2.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7-body.tex
index e36e6ff66c..ce976529cd 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -320,10 +320,10 @@
%%%%%%%%%
%%%%%%%%%%% Springe nach tex/pgfcirc.defines
%%%---------- open: tex/pgfcirc.defines.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2641,10 +2641,10 @@
%%%---------- close: tex/pgfcirc.defines
%%%%%%%%%%% Springe nach tex/pgfcircutils
%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2736,10 +2736,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircshapes
%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -3548,10 +3548,10 @@
%%%---------- close: tex/pgfcircshapes
%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -4650,10 +4650,10 @@
%%%---------- close: tex/pgfcircmonopoles
%%%%%%%%%%% Springe nach tex/pgfcircbipoles
%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -10813,10 +10813,10 @@
%%%---------- close: tex/pgfcircbipoles
%%%%%%%%%%% Springe nach tex/pgfcirctripoles
%%%---------- open: tex/pgfcirctripoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -17247,10 +17247,10 @@
%%%---------- close: tex/pgfcirctripoles
%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
%%%---------- open: tex/pgfcircquadpoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -18993,10 +18993,10 @@
%%%---------- close: tex/pgfcircquadpoles
%%%%%%%%%%% Springe nach tex/pgfcircmultipoles
%%%---------- open: tex/pgfcircmultipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -22024,10 +22024,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirclabel
%%%---------- open: tex/pgfcirclabel.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -22395,10 +22395,10 @@
%%%---------- close: tex/pgfcirclabel
%%%%%%%%%%% Springe nach tex/pgfcircvoltage
%%%---------- open: tex/pgfcircvoltage.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -23026,10 +23026,10 @@
%%%---------- close: tex/pgfcircvoltage
%%%%%%%%%%% Springe nach tex/pgfcirccurrent
%%%---------- open: tex/pgfcirccurrent.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -23256,10 +23256,10 @@
%%%---------- close: tex/pgfcirccurrent
%%%%%%%%%%% Springe nach tex/pgfcircflow
%%%---------- open: tex/pgfcircflow.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -23497,10 +23497,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircpath
%%%---------- open: tex/pgfcircpath.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7.sty
index 10621785e2..ea2e861f54 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.2.7.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6-body.tex b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6-body.tex
index 4182695e66..39e989317e 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6-body.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6-body.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -324,10 +324,10 @@
%% we have to load this before options to define the magics for compatibility
%%%%%%%%%%% Springe nach tex/pgfcirc.defines
%%%---------- open: tex/pgfcirc.defines.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -1225,10 +1225,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircutils
%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -1630,10 +1630,10 @@
%%%---------- close: tex/pgfcircutils
%%%%%%%%%%% Springe nach tex/pgfcircpath
%%%---------- open: tex/pgfcircpath.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -1995,10 +1995,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircshapes
%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2817,10 +2817,10 @@
%%%---------- close: tex/pgfcircshapes
%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -4020,10 +4020,10 @@
%%%---------- close: tex/pgfcircmonopoles
%%%%%%%%%%% Springe nach tex/pgfcircbipoles
%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -10250,10 +10250,10 @@
%%%---------- close: tex/pgfcircbipoles
%%%%%%%%%%% Springe nach tex/pgfcirctripoles
%%%---------- open: tex/pgfcirctripoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -18818,10 +18818,10 @@
%%%---------- close: tex/pgfcirctripoles
%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
%%%---------- open: tex/pgfcircquadpoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -22579,10 +22579,10 @@
%%%---------- close: tex/pgfcircquadpoles
%%%%%%%%%%% Springe nach tex/pgfcircmultipoles
%%%---------- open: tex/pgfcircmultipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -24740,10 +24740,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirclabel
%%%---------- open: tex/pgfcirclabel.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -25142,10 +25142,10 @@
%%%---------- close: tex/pgfcirclabel
%%%%%%%%%%% Springe nach tex/pgfcircvoltage
%%%---------- open: tex/pgfcircvoltage.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -25852,10 +25852,10 @@
%%%---------- close: tex/pgfcircvoltage
%%%%%%%%%%% Springe nach tex/pgfcirccurrent
%%%---------- open: tex/pgfcirccurrent.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -26098,10 +26098,10 @@
%%%---------- close: tex/pgfcirccurrent
%%%%%%%%%%% Springe nach tex/pgfcircflow
%%%---------- open: tex/pgfcircflow.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6.sty
index fb63155a42..62fad943ae 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz-1.4.6.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index 69ce1bbddd..a6da82fba5 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.6.8}
-\def\pgfcircversiondate{2024/05/05}
+\def\pgfcircversion{1.7.1}
+\def\pgfcircversiondate{2025/01/10}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index 943745bf7a..b932385e57 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -266,6 +266,58 @@
%
%>>>
+%% check loaded TikZ/pgf version %<<<`
+%
+% parse the release date, thanks to Skillmon
+% https://github.com/pgf-tikz/pgf/issues/1348#issuecomment-2231681032
+% date can be yyyy-mm-dd or (older TikZ) yyyy/mm/dd
+\begingroup
+ \pgfutil@protected\def\parsedate#1%
+ {%
+ \afterassignment\parsedate@month
+ \pgf@circ@count@a=#1\relax
+ }
+ \pgfutil@protected\def\parsedate@month#1%
+ {%
+ \afterassignment\parsedate@day
+ \pgf@circ@count@b=%
+ }
+ \pgfutil@protected\def\parsedate@day#1%
+ {%
+ \afterassignment\parsedate@cleanup
+ \pgf@circ@count@c=%
+ }
+ \def\parsedate@cleanup#1\relax{}%
+ \parsedate{\pgfrevisiondate}%
+ \xdef\ctikz@@pgfyear{\the\pgf@circ@count@a}%
+ \xdef\ctikz@@pgfmonth{\the\pgf@circ@count@b}%
+ \xdef\ctikz@@pgfday{\the\pgf@circ@count@c}%
+\endgroup
+% The following code thanks to Skillmon:
+% https://tex.stackexchange.com/a/722570/38080
+% modified by romano to check the date
+\def\ctikz@@ifpgfafter@auxi#1#2%
+ {%
+ \ifnum#1
+ \ctikz@@ifpgfafter@auxii{#2}%
+ \fi
+ }
+\def\ctikz@@ifpgfafter@auxii#1\fi#2\ctikz@@ifpgfafter#3{\fi#1}
+\def\ctikz@@ifpgfafter#1-#2-#3#%
+ {%
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfyear>#1}\pgfutil@firstoftwo
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfyear<#1}\pgfutil@secondoftwo
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfmonth>#2}\pgfutil@firstoftwo
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfmonth<#2}\pgfutil@secondoftwo
+ \ctikz@@ifpgfafter@auxi{\ctikz@@pgfday<#3}\pgfutil@secondoftwo
+ \pgfutil@gobble\ctikz@@ifpgfafter\pgfutil@firstoftwo
+ }
+%
+% usage \ctikz@@ifpgfafter 2023-01-16{true}{false}
+% ^^^ no spaces here, braces needed.
+%
+%>>>
+
%% arrow tips macros and utilities %<<<1
% the default arrow is latexslim, which has been ported over old arrows library (deprecated)
@@ -298,9 +350,70 @@
\pgfpathclose
\pgfusepathqfill
}
-
\pgfarrowsdeclarereversed{latexslim reversed}{latexslim reversed}{latexslim}{latexslim}
-
+%% Jack Tap, see
+%% https://github.com/circuitikz/circuitikz/issues/806
+\pgfdeclarearrow{name=Jack Tap,
+ parameters = {%
+ \the\pgfarrowlength,%
+ \the\pgfarrowwidth,%
+ \ifpgfarrowswap s\fi%
+ \ifpgfarrowopen o\fi%
+ \ifpgfarrowroundjoin j\fi
+ \ifpgfarrowroundcap c\fi%
+ },
+ setup code = {
+ \pgfarrowssettipend{.5\pgfarrowlength}
+ \pgfarrowssetlineend{-.6\pgfarrowlength}
+ \pgfarrowssetvisualbackend{-.6\pgfarrowlength}
+ \pgfarrowssetbackend{-.6\pgfarrowlength}
+ % hull
+ \pgfarrowshullpoint{.5\pgfarrowlength}{0pt}
+ \pgfarrowshullpoint{0pt}{\pgfarrowwidth}
+ \pgfarrowshullpoint{-.6\pgfarrowlength}{0pt}
+ % Saves: Only the length:
+ \pgfarrowssavethe\pgfarrowlength
+ \pgfarrowssavethe\pgfarrowwidth
+ },
+ drawing code = {
+ \pgfsetdash{}{+0pt}
+ \pgfarrowlinewidth=\pgflinewidth
+ \ifpgfarrowroundjoin\pgfsetroundjoin\else\pgfsetmiterjoin\fi
+ \ifpgfarrowroundcap\pgfsetroundcap\else\pgfsetbuttcap\fi
+ \pgfpathmoveto{\pgfqpoint{-.6\pgfarrowlength}{0pt}}
+ \pgfpathlineto{\pgfqpoint{-.5\pgfarrowlength}{0pt}}
+ \pgfpathlineto{\pgfqpoint{0pt}{\pgfarrowwidth}}
+ \pgfpathlineto{\pgfqpoint{.5\pgfarrowlength}{0pt}}
+ \ifpgfarrowopen
+ \pgfusepathqstroke
+ \else
+ \pgfpathclose
+ \ifdim\pgfarrowlinewidth>0pt\pgfusepathqfillstroke\else\pgfusepathqfill\fi
+ \fi
+ },
+ defaults = {length = 0.3cm, width=0.15cm, open},
+ % cache=false, % breaks everything
+}
+% the new "fill without arg" will be in TikZ 3.1.11. Apply it here if we have an
+% older version
+\ctikz@@ifpgfafter 2023-01-16{\relax}{%
+ % thanks @muzimuzhi https://github.com/pgf-tikz/pgf/issues/1348#issuecomment-2229075269
+ % undo the fill/.value required key
+ \expandafter\let\csname pgfk@/pgf/arrow keys/fill/.@def\endcsname\@undefined
+ \pgfkeys{/pgf/arrow keys/fill/.code={%
+ \def\pgf@temp{#1}%
+ \ifx\pgf@temp\pgf@nonetext%
+ \pgfarrowsaddtooptions{\pgfarrowopentrue}%
+ \else\ifx\pgf@temp\pgfkeysnovalue@text%
+ \pgfarrowsaddtooptions{\pgfarrowopenfalse}%
+ \else
+ \pgfarrowsaddtooptions{\pgfarrowopenfalse\def\pgf@arrows@fill@color{#1}}%
+ \fi\fi
+ }}%
+}
+\tikzset{v/.tip={Jack Tap[swap]}, ^/.tip={Jack Tap},
+ vf/.tip={Jack Tap[swap,fill]}, ^f/.tip={Jack Tap[fill]}}
+%
% select the arrows using available defaults.
\def\pgfcirc@arrow@default{default}
% choose the arrows to use. Use #2 and #3 if the key is equal to "default"
@@ -466,7 +579,30 @@
\fi
\fi
}
-
+% similar o the above, use the fill parameter to set fill or draw
+% for a subset of the shape
+\def\pgf@circ@subset@fill@or@draw#1{%
+ % You *must* be sure that this is called inside a \pgfscope!
+ \edef\@@none{none}\edef\@@default{default}
+ \edef\@@tmp{\ctikzvalof{#1/fill}}
+ \ifx\@@tmp\@@none
+ \pgfusepath{draw}
+ \else
+ \ifx\@@tmp\@@default\else
+ \pgfsetfillcolor{\@@tmp}
+ \fi
+ \pgfusepath{draw, fill}
+ \fi
+}
+% ...and for the thickness
+\def\pgf@circ@subset@thickness#1{%
+ % You *must* be sure that this is called inside a \pgfscope!
+ \edef\@@default{default}
+ \edef\@@tmp{\ctikzvalof{#1/thickness}}
+ \ifx\@@tmp\@@default\else
+ \pgfsetlinewidth{\@@tmp\pgflinewidth}%
+ \fi
+}
% set the text color (via \color) if the color is not default or none
% needed in some strange case (like bodydiode' dots)
\def\pgf@circ@maybe@color#1{%
@@ -557,6 +693,7 @@
% #7 - macros drawing the bipole
%
\long\def\pgfcircdeclarebipolescaled#1#2#3#4#5#6#7{
+ % \typeout{Declaring bipole:\space #4,}
\pgfdeclareshape{#4shape}{
\savedmacro{\ctikzclass}{\edef\ctikzclass{#1}}
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
@@ -602,97 +739,33 @@
\pgf@y=.5\pgf@y
}
\anchor{center}{\pgfpointorigin}
- \anchor{n}{
- \northeast
- \pgf@x=0cm
- }
- \anchor{north east}{
- \northeast
- }
- \anchor{north west}{
- \northeast
- \pgf@x=-\pgf@x
- }
- \anchor{ne}{
- \northeast
- }
- \anchor{nw}{
- \northeast
- \pgf@x=-\pgf@x
- }
- \anchor{e}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{s}{
- \southwest
- \pgf@x=0cm
- }
- \anchor{south east}{
- \southwest
- \pgf@x=-\pgf@x
- }
- \anchor{south west}{
- \southwest
- }
- \anchor{se}{
- \southwest
- \pgf@x=-\pgf@x
- }
- \anchor{sw}{
- \southwest
- }
- \anchor{w}{
- \southwest
- \pgf@y=0cm
- }
- \anchor{north}{
- \northeast
- \pgf@x=0cm
- }
- \anchor{east}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{south}{
- \southwest
- \pgf@x=0cm
- }
- \anchor{west}{
- \southwest
- \pgf@y=0cm
- }
- \anchor{right}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{above}{
- \northeast
- \pgf@x=0cm
- }
- \anchor{left}{
- \southwest
- \pgf@y=0cm
- }
- \anchor{below}{
- \southwest
- \pgf@x=0cm
- }
- \anchor{a}{
- \northeast
- \pgf@y=0cm
- }
- \anchor{b}{
- \southwest
- \pgf@y=0cm
- }
+ \anchor{n}{\northeast\pgf@x=0cm }
+ \anchor{north east}{\northeast}
+ \anchor{north west}{\northeast\pgf@x=-\pgf@x}
+ \anchor{ne}{\northeast}
+ \anchor{nw}{\northeast\pgf@x=-\pgf@x}
+ \anchor{e}{\northeast\pgf@y=0cm }
+ \anchor{s}{\southwest\pgf@x=0cm }
+ \anchor{south east}{\southwest\pgf@x=-\pgf@x}
+ \anchor{south west}{\southwest}
+ \anchor{se}{\southwest\pgf@x=-\pgf@x}
+ \anchor{sw}{\southwest}
+ \anchor{w}{\southwest\pgf@y=0cm }
+ \anchor{north}{\northeast\pgf@x=0cm }
+ \anchor{east}{\northeast\pgf@y=0cm }
+ \anchor{south}{\southwest\pgf@x=0cm }
+ \anchor{west}{\southwest\pgf@y=0cm }
+ \anchor{right}{\northeast\pgf@y=0cm }
+ \anchor{above}{\northeast\pgf@x=0cm }
+ \anchor{left}{\southwest\pgf@y=0cm }
+ \anchor{below}{\southwest\pgf@x=0cm }
+ \anchor{a}{\northeast\pgf@y=0cm }
+ \anchor{b}{\southwest\pgf@y=0cm }
\savedanchor{\textanchor}{%
\pgf@y=\ht\pgfnodeparttextbox
\pgf@x=-.5\wd\pgfnodeparttextbox
}
- \anchor{text}{
- \textanchor
- }
+ \anchor{text}{ \textanchor }
\anchorborder{%
\ifpgf@circuit@bipole@inverted
\pgf@circ@res@left=-\pgf@x
@@ -711,7 +784,6 @@
#2%
\pgf@circ@draw@component{
\pgf@circ@setcolor
-
\northeast
\pgf@circ@res@up = \pgf@y
\pgf@circ@res@zero = 0cm
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index 4978311dca..c1292d4969 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -632,13 +632,21 @@
\pgfusepath{draw}
\endpgfscope
}%
-
%% Zig-zag resistors
+% see https://github.com/circuitikz/circuitikz/discussions/814
+\ctikzset{resistors/zigzag stub/.initial=0}
+\ctikzset{resistors/zigzag hook/.code={}}
\def\pgf@circ@zigzag#1{%
+ \pgf@circ@res@temp=\ctikzvalof{resistors/zigzag stub}\pgf@circ@res@step
+ \advance \pgf@circ@res@step by -2\pgf@circ@res@temp
\divide \pgf@circ@res@step by \numexpr4*\zigs\relax
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \ifdim\pgf@circ@res@temp>0pt
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@temp -\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \fi
\pgf@circ@res@other = \pgf@circ@res@left
+ \advance\pgf@circ@res@other by \pgf@circ@res@temp
\pgf@circ@count@a=\zigs\relax
% first half zig
\advance\pgf@circ@res@other by \pgf@circ@res@step
@@ -655,11 +663,14 @@
\advance\pgf@circ@res@other by 2\pgf@circ@res@step
\pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{#1\pgf@circ@res@down}}
\advance\pgf@circ@res@other by \pgf@circ@res@step
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \ifdim\pgf@circ@res@temp>0pt
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other+\pgf@circ@res@temp+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \fi
\pgfsetbeveljoin
+ \pgfkeys{/tikz/circuitikz/resistors/zigzag hook}
\pgfusepath{draw}
}
-
%% Resistor
\pgfcircdeclarebipolescaled{resistors}
{
@@ -672,7 +683,7 @@
{
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistor/width}*\scaledRlen}
\pgf@circ@zigzag{1}
}
@@ -692,7 +703,7 @@
{
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/vresistor/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/vresistor/width}*\scaledRlen}
\pgf@circ@zigzag{.5}
\pgfscope
@@ -731,7 +742,7 @@
{
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/potentiometer/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/potentiometer/width}*\scaledRlen}
\pgf@circ@zigzag{1}
\pgfscope
@@ -761,7 +772,7 @@
{%
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistivesens/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/resistivesens/width}*\scaledRlen}
\pgf@circ@zigzag{.5}
\pgfscope
@@ -810,7 +821,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right/\@@intscale+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{+0pt}}
\pgftransformationadjustments
- \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/ldresistor/width}*\scaledRlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
+ \pgfmathsetlength{\pgf@circ@res@step}{\ctikzvalof{bipoles/ldresistor/width}*\scaledRlen}
\pgf@circ@zigzag{\@@hscale}
}%
@@ -1955,6 +1966,9 @@
\ctikzset{bipoles/battery1/width/.initial=.3}
\ctikzset{bipoles/battery2/height/.initial=.6}
\ctikzset{bipoles/battery2/width/.initial=.3}
+\ctikzset{bipoles/solar/height/.initial=.6}
+\ctikzset{bipoles/solar/width/.initial=.3}
+
% noise sources
\ctikzset{bipoles/noise sources/fillcolor/.initial=gray!50}
@@ -2128,6 +2142,41 @@
\pgfusepath{draw}
}
+% Solar cell
+\pgfcircdeclarebipolescaled{batteries}
+{}
+{\ctikzvalof{bipoles/solar/height}}
+{solar}
+{\ctikzvalof{bipoles/solar/height}}
+{\ctikzvalof{bipoles/solar/width}}
+{
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{0}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{0}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgfusepath{draw}
+
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \ifpgf@circ@fixbatteries
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \pgfsetlinewidth{3\pgflinewidth}
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}}
+ \else
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \pgfsetlinewidth{3\pgflinewidth}
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}}
+ \fi
+
+ \pgfusepath{draw}
+ \pgf@circ@draw@pdarrows
+}
+
%%%
%%% https://xkcd.com/2818/
%%% Also https://chat.stackexchange.com/transcript/message/64238058#64238058
@@ -3430,6 +3479,9 @@
\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true}
\pgfcirc@activate@bipole@opt{v}{batterytwo}{battery2}{battery2}{\circuitikzbasekey/bipole/is voltage=true,
\circuitikzbasekey/bipole/is voltageoutsideofsymbol=true}
+\pgfcirc@activate@bipole@opt{v}{solarsource}{solar}{solar}{\circuitikzbasekey/bipole/is voltage=true,
+ \circuitikzbasekey/bipole/is voltageoutsideofsymbol=true}
+
%% Sources: voltage
\pgfcirc@activate@bipole@opt{v}{vsource}{vsource}{european voltage source}{%
@@ -3452,6 +3504,11 @@
\pgfcirc@style@to@style{controlled voltage source}{cvsource}
\pgfcirc@style@to@style{controlled voltage source}{controlled vsource}
\pgfcirc@style@to@style{controlled voltage source}{cV}
+%% fix the mess about not having the shortcut accessible in every mode...
+\pgfcirc@style@to@style{american voltage source}{vsourceAM}
+\pgfcirc@style@to@style{american controlled voltage source}{cvsourceAM}
+\pgfcirc@style@to@style{european voltage source}{vsourceEU}
+\pgfcirc@style@to@style{european controlled voltage source}{cvsourceEU}
\pgfcirc@activate@bipole@simple@opt{v}{esource}{%
\circuitikzbasekey/bipole/is voltage=true,
@@ -3547,6 +3604,11 @@
\pgfcirc@style@to@style{controlled current source}{cisource}
\pgfcirc@style@to@style{controlled current source}{controlled isource}
\pgfcirc@style@to@style{controlled current source}{cI}
+%% fix the mess about not having the shortcut accessible in every mode...
+\pgfcirc@style@to@style{american current source}{isourceAM}
+\pgfcirc@style@to@style{american controlled current source}{cisourceAM}
+\pgfcirc@style@to@style{european current source}{isourceEU}
+\pgfcirc@style@to@style{european controlled current source}{cisourceEU}
\pgfcirc@activate@bipole@opt{i}{isourcesin}{isourcesin}{sinusoidal current source}{%
\circuitikzbasekey/bipole/is current=true}
@@ -3673,6 +3735,13 @@
}}
%
+% Whiskers for ZZener and TVS
+%
+\newif\ifpgf@zz@straightwhisk
+\pgf@zz@straightwhiskfalse
+\ctikzset{diode straight whiskers/.code=\pgf@zz@straightwhisktrue}
+\ctikzset{diode sloped whiskers/.code=\pgf@zz@straightwhiskfalse}
+%
% Flipping arrows in LED and photodiodes
%
\newif\ifpgf@led@fliparrows
@@ -3696,9 +3765,9 @@
\pgf@circuit@fulldiodefalse
\ctikzset{diode/.is choice}
-\ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
-\ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue }
-\ctikzset{diode/stroke/.code = \pgf@circuit@strokediodetrue}
+\ctikzset{diode/empty/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodefalse}%default
+\ctikzset{diode/full/.code = \pgf@circuit@fulldiodetrue\pgf@circuit@strokediodefalse}
+\ctikzset{diode/stroke/.code = \pgf@circuit@fulldiodefalse\pgf@circuit@strokediodetrue}
\tikzset{full diodes/.style = { \circuitikzbasekey/diode = full}}
\tikzset{empty diodes/.style = { \circuitikzbasekey/diode = empty}}
@@ -3766,10 +3835,15 @@
{
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgf@circ@fulldiode@triangle@shift
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-0.5\pgf@circ@res@up}}
+ \ifpgf@zz@straightwhisk
+ \edef\@@tmp{0.0}
+ \else
+ \edef\@@tmp{0.5}
+ \fi
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-\@@tmp\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-0.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-\@@tmp\pgf@circ@res@down}}
\pgfusepath{draw}
}
@@ -4051,10 +4125,15 @@
\pgfscope
\pgf@circ@basicdiodeshape
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-0.5\pgf@circ@res@up}}
+ \ifpgf@zz@straightwhisk
+ \edef\@@tmp{0.0}
+ \else
+ \edef\@@tmp{0.5}
+ \fi
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-1.8\pgf@circ@res@left}{\pgf@circ@res@down-\@@tmp\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-0.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-0.2\pgf@circ@res@left}{\pgf@circ@res@up-\@@tmp\pgf@circ@res@down}}
\pgfusepath{draw}
\endpgfscope
}
@@ -4232,10 +4311,15 @@
\pgftransformxshift{\pgf@circ@res@left}
\pgf@circ@basicdiodeshape
\endpgfscope
- \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{1.3\pgf@circ@res@up}}
+ \ifpgf@zz@straightwhisk
+ \edef\@@tmp{1.0}
+ \else
+ \edef\@@tmp{1.3}
+ \fi
+ \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{\@@tmp\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{1.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{\@@tmp\pgf@circ@res@down}}
\pgfusepath{draw}
\endpgfscope
}
@@ -4260,10 +4344,15 @@
\pgftransformxshift{\pgf@circ@res@left}
\pgf@circ@fulldiode@triangle@shift
\endpgfscope
- \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{1.3\pgf@circ@res@up}}
+ \ifpgf@zz@straightwhisk
+ \edef\@@tmp{1.0}
+ \else
+ \edef\@@tmp{1.3}
+ \fi
+ \pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{\@@tmp\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{1.3\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@right}{\@@tmp\pgf@circ@res@down}}
\pgfusepath{draw}
}
@@ -4741,6 +4830,8 @@
\pgfcirc@style@to@style{#1 agtobar}{aGTOb#2}
\pgfcirc@node@to@style{l}{emptytriac}{#1 triac}{\circuitikzbasekey/bipole/is strokedsymbol=true}
\pgfcirc@style@to@style{#1 triac}{Tr#2}
+ \pgfcirc@node@to@style{l}{emptytvsdiode}{#1 tvsdiode}{\circuitikzbasekey/bipole/is strokedsymbol=true}
+ \pgfcirc@style@to@style{#1 tvsdiode}{Tr#2}
}
\pgfcirc@tmp@generatestrokeddiodes{stroke}{-}
\def\pgfcircdiodestylemacro{\ifpgf@circuit@strokediode stroke \else\ifpgf@circuit@fulldiode full \else empty \fi\fi}
@@ -6031,6 +6122,13 @@
\ctikzset{bipoles/qpprobe/voltage/additional shift/.initial=.5}
\ctikzset{bipoles/iloop/width/.initial=.40}
\ctikzset{bipoles/iloop/height/.initial=.60}
+% currtap see https://github.com/circuitikz/circuitikz/issues/807
+\ctikzset{bipoles/currtap/height/.initial=0.4}
+\ctikzset{bipoles/currtap/dot size/.initial=0.5}
+\ctikzset{bipoles/currtap/fill/.initial=default}
+\ctikzset{bipoles/currtap/dash/.initial=none}
+\ctikzset{bipoles/currtap/color/.initial=default}
+\ctikzset{bipoles/currtap/thickness/.initial=default}
\ctikzset{bipoles/oscope/height/.initial=.60}
\ctikzset{bipoles/oscope/width/.initial=.60}
@@ -6607,6 +6705,28 @@
\pgfusepath{draw}
\endpgfscope
}
+%% currtap
+\pgfcircdeclarebipolescaled{instruments}
+{
+ \savedmacro{\@@dotsize}{\def\@@dotsize{\ctikzvalof{bipoles/currtap/dot size}}}
+ \anchor{tap}{\northeast\pgf@x=0pt\pgf@y=\@@dotsize\pgf@y\pgf@y=-\pgf@y}
+}
+{\ctikzvalof{bipoles/currtap/height}}
+{currtap}
+{\ctikzvalof{bipoles/currtap/height}}
+{\ctikzvalof{bipoles/currtap/height}}
+{
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{0.95\pgf@circ@res@left}{0pt}}
+ \pgfpatharc{180}{0}{0.95\pgf@circ@res@right}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
+ \pgf@circ@subset@color@dash{bipoles/currtap}
+ \pgf@circ@subset@thickness{bipoles/currtap}
+ \pgfusepath{draw}
+ \pgfpathcircle{\pgfpoint{0pt}{0pt}}{\@@dotsize*\pgf@circ@res@up}
+ \pgf@circ@subset@fill@or@draw{bipoles/currtap}
+}
% %>>>
% Path definitions for Instruments%<<<
@@ -6619,8 +6739,8 @@
\pgfcirc@activate@bipole@simple{l}{rmeterwa}
\pgfcirc@activate@bipole@simple{l}{smeter}
\pgfcirc@activate@bipole@simple{l}{iloop}
-% \pgfcirc@activate@bipole@simple{l}{iloop2} that was wrong
\pgfcirc@activate@bipole{l}{ilooptwo}{iloop2}{iloop2}
+\pgfcirc@activate@bipole@simple{l}{currtap}
\pgfcirc@activate@bipole@simple{l}{qvprobe}
\pgfcirc@activate@bipole@simple{l}{qiprobe}
\pgfcirc@activate@bipole@simple{l}{qpprobe}
@@ -6774,16 +6894,22 @@
% spring into the damper
\pgfscope
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
+ \pgfscope
+ \pgftransformationadjustments
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
+ \pgfpathlineto{\pgfpoint{.95\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgfsetcornersarced{\pgfpoint{.25\pgf@circ@res@up}{.25\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{.75\pgf@circ@res@left}{.75\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{.5\pgf@circ@res@left}{-.75\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{.25\pgf@circ@res@left}{.75\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{0pt}{-.75\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/damper/length}\pgf@circ@res@right}{.75\pgf@circ@res@up}}
+ \pgfsetbuttcap
+ \pgfsetbeveljoin
\pgfusepath{stroke}
\endpgfscope
+ \endpgfscope
% damper box
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
@@ -6977,7 +7103,7 @@
\ctikzset{bipoles/tlmic/width/.initial=.5}% it MUST be mic width *5/8
\ctikzset{bipoles/mic/bar thickness/.initial=1}
-% arresters, fuses, lamps, etc
+% arresters, fuses, relais, lamps, etc
\ctikzset{bipoles/european gas filled surge arrester/height/.initial=.30}
\ctikzset{bipoles/european gas filled surge arrester/width/.initial=.80}
@@ -6994,6 +7120,7 @@
\ctikzset{bipoles/afuse/height/.initial=.20}
\ctikzset{bipoles/afuse/width/.initial=.50}
\ctikzset{bipoles/lamp/height/.initial=.60}
+\ctikzset{bipoles/lamp/width/.initial=.60}
\ctikzset{bipoles/wfuse/height/.initial=.20}
\ctikzset{bipoles/wfuse/width/.initial=.50}
\ctikzset{bipoles/wfuse/shape/.initial=ocirc}
@@ -7001,14 +7128,28 @@
\ctikzset{bipoles/wfuse/dots/.is choice}
\ctikzset{bipoles/wfuse/dots/.is if=pgf@circ@wfuse@dots}
%
-\ctikzset{bipoles/lamp/width/.initial=.60}
+\ctikzset{bipoles/relais/height/.initial=.8}
+\ctikzset{bipoles/relais/width/.initial=.3}
+%
\ctikzset{bipoles/bulb/height/.initial=.8}
\ctikzset{bipoles/bulb/width/.initial=.8}
+% suggested by @bogger33, see https://github.com/circuitikz/circuitikz/issues/793
+\ctikzset{bipoles/neonlampcc/height/.initial=.60}
+\ctikzset{bipoles/neonlampac/height/.initial=.60}
+\pgf@circ@declare@family@arrows{sparkgap}
+\newif\ifpgf@sparkgap@dot
+\newif\ifpgf@sparkgap@circle
+\ctikzset{sparkgap/circle/.is if=pgf@sparkgap@circle}
+\ctikzset{sparkgap/dot/.is if=pgf@sparkgap@dot}
+\ctikzset{sparkgap/gap/.initial=.05}
+\ctikzset{bipoles/sparkgap/height/.initial=.60}
+%
\ctikzset{bipoles/squid/height/.initial=.60}
\ctikzset{bipoles/squid/width/.initial=.60}
-\ctikzset{bipoles/barrier/height/.initial=.60}
-\ctikzset{bipoles/barrier/width/.initial=.60}
-\ctikzset{bipoles/openbarrier/gap/.initial=0.5}
+\ctikzset{bipoles/barrier/height/.initial=.21}
+\ctikzset{bipoles/barrier/width/.initial=.0}
+\ctikzset{bipoles/openbarrier/width/.initial=.3}
+\ctikzset{bipoles/openbarrier/gap/.initial=1}
\ctikzset{bipoles/thermocouple/height/.initial=.250}
\ctikzset{bipoles/thermocouple/height 2/.initial=.60}
\ctikzset{bipoles/thermocouple/width/.initial=.140}
@@ -7157,18 +7298,18 @@
{\ctikzvalof{bipoles/thermocouple/height}}
{\ctikzvalof{bipoles/thermocouple/width}}
{
+ \pgfsetrectcap
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
- \pgfusepath{draw}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
- \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
- \pgfusepath{draw}
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{0}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
\pgfusepath{draw}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfsetroundcap
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
}
%% fuse
\pgfcircdeclarebipolescaled{misc}
@@ -7233,6 +7374,25 @@
\pgfnode{\cshape}{center}{}{\thisshape-right}{\pgfusepath{draw}}
\fi
}
+
+%% Relais
+\pgfcircdeclarebipolescaled{misc}
+{}
+{\ctikzvalof{bipoles/relais/height}}
+{relais}
+{\ctikzvalof{bipoles/relais/height}}
+{\ctikzvalof{bipoles/relais/width}}
+{
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgf@circ@draworfill
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+
%% SQUID added by Cor Molenaar 5 March 2010
\pgfcircdeclarebipolescaled{misc}
{}
@@ -7264,46 +7424,39 @@
{\ctikzvalof{bipoles/barrier/height}}
{\ctikzvalof{bipoles/barrier/width}}
{
- \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
-
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@step}}
- \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}}
-
+ \pgfusepath{draw}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@down}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@up}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@down}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@up}{\pgf@circ@res@up}}
\pgfusepath{draw}
}
-%
% open version of the barrier symbol
% suggested by Radványi Patrik Tamás <patrikradvanyi@gmail.com>
-%
\pgfcircdeclarebipolescaled{misc}
{}
{\ctikzvalof{bipoles/barrier/height}}
{openbarrier}
{\ctikzvalof{bipoles/barrier/height}}
-{\ctikzvalof{bipoles/barrier/width}}
+{\ctikzvalof{bipoles/openbarrier/width}}
{
- % this is set with normal wire linewidth
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
\pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/openbarrier/gap}*\pgf@circ@res@left}{0pt}}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint{\ctikzvalof{bipoles/openbarrier/gap}*\pgf@circ@res@right}{0pt}}
\pgfusepath{draw}
-
- % do the cross part
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
-
- \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{0.35*\pgf@circ@res@left}{0.35*\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{0.35*\pgf@circ@res@right}{0.35*\pgf@circ@res@up}}
-
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@down}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@up}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@down}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@up}{\pgf@circ@res@up}}
\pgfusepath{draw}
}
+
%% Lamp
\pgfcircdeclarebipolescaled{misc}
{}
@@ -7340,11 +7493,116 @@
\pgfsetbeveljoin
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}
\pgfusepath{draw}
-}% %>>>
+}%
+% neon lamps, suggested by @bogger33 https://github.com/circuitikz/circuitikz/issues/793
+% implemented by Romano
+% double-cathode (capacitor) style
+\pgfcircdeclarebipolescaled{misc}
+{}
+{\ctikzvalof{bipoles/neonlampcc/height}}
+{neonlampcc}
+{\ctikzvalof{bipoles/neonlampcc/height}}
+{\ctikzvalof{bipoles/neonlampcc/height}}
+{
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgf@circ@draworfill
+ %% leads in
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \def\@@w{0.2}\def\@@h{0.6}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@right}{0pt}}
+ %% "capacitor style" symbol
+ \pgfusepath{draw}
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\@@w\pgf@circ@res@right}{\@@h\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@right}{\@@h\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\@@w\pgf@circ@res@left}{\@@h\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@left}{\@@h\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ %% dot
+ \pgftransformshift{\pgfpoint{\@@w\pgf@circ@res@left-3*\ctikzvalof{nodes width}\pgf@circ@Rlen}
+ {\@@h\pgf@circ@res@down + 2*\ctikzvalof{nodes width}\pgf@circ@Rlen}}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{draw,fill}}
+}
+% anode-cathode style
+\pgfcircdeclarebipolescaled{misc}
+{}
+{\ctikzvalof{bipoles/neonlampac/height}}
+{neonlampac}
+{\ctikzvalof{bipoles/neonlampac/height}}
+{\ctikzvalof{bipoles/neonlampac/height}}
+{
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgf@circ@draworfill
+ %% leads in
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \def\@@w{0.5}\def\@@h{0.5}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
+ %% one terminal is a straight plate
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\@@w\pgf@circ@res@left}{\@@h\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\@@w\pgf@circ@res@left}{\@@h\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ %% the other is an "ocirc" shape
+ \pgftransformshift{\pgfpoint{\@@w\pgf@circ@res@right}{0pt}}
+ \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw,fill}}
+ %% dot
+ \pgftransformshift{\pgfpoint{-\@@w\pgf@circ@res@right}{\@@h\pgf@circ@res@down}}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{draw,fill}}
+}
+% spark gap, suggested by @bogger33 https://github.com/circuitikz/circuitikz/issues/800
+\pgfcircdeclarebipolescaled{misc}
+{
+ \savedmacro{\changeh}{\edef\changeh{\ifpgf@sparkgap@circle 1 \else 0.5 \fi}}
+ \pgfcirc@border@extend@updown{\changeh}{\changeh}
+}
+{\ctikzvalof{bipoles/sparkgap/height}}
+{sparkgap}
+{\ctikzvalof{bipoles/sparkgap/height}}
+{\ctikzvalof{bipoles/sparkgap/height}}{
+ % circle (if requested)
+ \pgfscope
+ \ifpgf@sparkgap@circle
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathcircle{\pgfpointorigin}{\pgf@circ@res@up}
+ \pgf@circ@draworfill
+ \fi
+ \endpgfscope
+ % arrows
+ \pgfscope
+ \pgfcirc@set@arrows{sparkgap}{}{Triangle[scale=2]}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{sparkgap/gap}\pgf@circ@res@right}{0pt}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\ctikzvalof{sparkgap/gap}\pgf@circ@res@left}{0pt}}
+ \pgfusepath{draw}
+ \endpgfscope{}
+ % dot (if requested)
+ \ifpgf@sparkgap@dot
+ \pgftransformshift{\pgfpoint
+ {\ctikzvalof{sparkgap/gap}\pgf@circ@res@left-1*\ctikzvalof{nodes width}\pgf@circ@Rlen}
+ {-4*\ctikzvalof{nodes width}\pgf@circ@Rlen}}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{draw,fill}}
+ \fi
+}
+
+%>>>
%% Path definitions for Miscellaneous%<<<
\pgfcirc@activate@bipole@simple{l}{lamp}
+\pgfcirc@activate@bipole@simple{l}{neonlampcc}
+\pgfcirc@activate@bipole@simple{l}{neonlampac}
+\pgfcirc@activate@bipole@simple{l}{sparkgap}
\pgfcirc@activate@bipole@simple{l}{bulb}
\pgfcirc@activate@bipole@simple{l}{squid}
\pgfcirc@activate@bipole@simple{l}{barrier}
@@ -7355,6 +7613,7 @@
\pgfcirc@style@to@style{asymmetric fuse}{afuse}
\pgfcirc@activate@bipole@simple{l}{wfuse}
\pgfcirc@activate@bipole{l}{wfuse}{wfuse}{wiggly fuse}
+\pgfcirc@activate@bipole@simple{l}{relais}
\def\pgf@circ@gfsurgearrester@path#1{\ifpgf@circuit@europeangfsurgearrester\pgf@circ@europeangfsurgearrester@path{#1}\else\pgf@circ@americangfsurgearrester@path{#1}\fi}
\pgfcirc@activate@bipole{l}{europeangfsurgearrester}{european gas filled surge arrester}{european gas filled surge arrester}
\pgfcirc@activate@bipole{l}{americangfsurgearrester}{american gas filled surge arrester}{american gas filled surge arrester}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex
index e1843d5da8..4d00670a54 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirccurrent.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex
index 364c56a414..b620979ec5 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircflow.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
index a81bfdc6c6..09bae28f18 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex
index 84fa6c6d1e..77b6edc904 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -49,6 +49,7 @@
\ctikzset{monopoles/dinantenna/width/.initial=.2}
\ctikzset{monopoles/dinantenna/height/.initial=.6}
\ctikzset{monopoles/waves/width/.initial=0.5}%
+\ctikzset{monopoles/harmonics/width/.initial=0.5}%
%>>>
%% Node shapes for grounds and power supply%<<<
@@ -617,6 +618,56 @@
}
}
+\pgfdeclareshape{harmonics}{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{RF}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \anchor{center}{\pgfpointorigin}
+ \savedanchor{\northeast}{
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@circ@res@step=\ctikzvalof{monopoles/harmonics/width}\pgf@circ@scaled@Rlen
+ \pgf@x=\pgf@circ@res@step
+ \pgf@y=\pgf@circ@res@step
+ }
+ \anchor{text}{
+ \northeast
+ \pgf@y=\dimexpr\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax
+ }
+ \anchor{top}{\northeast\pgf@x=0pt}
+ \anchor{right}{\northeast\pgf@y=0pt}
+ \anchor{left}{\northeast\pgf@x=-\pgf@x\pgf@y=0pt}
+ \anchor{bottom}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt}
+ \anchor{north}{\northeast\pgf@x=0pt}
+ \anchor{north east}{\northeast}
+ \anchor{east}{\northeast\pgf@y=0pt}
+ \anchor{south east}{\northeast\pgf@y=-\pgf@y}
+ \anchor{south}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt}
+ \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x}
+ \anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0pt}
+ \anchor{north west}{\northeast\pgf@x=-\pgf@x}
+ \pgf@circ@draw@component{
+ \pgf@circ@scaled@Rlen=\scaledRlen
+ \pgf@circ@res@step=\ctikzvalof{monopoles/waves/width}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@step=0.5\pgf@circ@res@step
+ \pgf@circ@setcolor
+ \pgfscope
+ % define a triangle for clipping the waves
+ \pgfpathmoveto{\pgfpoint{-2\pgf@circ@res@step}{0pt}}
+ \pgfpathlineto{\pgfpoint{2.1\pgf@circ@res@step}{1\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{2.1\pgf@circ@res@step}{-1\pgf@circ@res@step}}
+ \pgfpathclose
+ \pgfusepath{clip}
+ % ...and build the waves as clipped circles
+ \c@pgf@counta=32\pgf@circ@res@other=0.125\pgf@circ@res@step
+ \pgfmathloop%
+ \ifnum\c@pgf@counta>1
+ \pgfpathcircle{\pgfpoint{-2\pgf@circ@res@step}{0pt}}{\the\c@pgf@counta*\pgf@circ@res@other}
+ \advance\c@pgf@counta-1\relax%
+ \repeatpgfmathloop
+ \pgfusepath{draw}
+ \endpgfscope
+ }
+}
+
% the four types of antennas: simple, din, TX, RX. Notice that you can flip them...
%
\pgfdeclareshape{bareantenna}{
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
index e403a53fa6..5f98f3b91b 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
index e3665b8862..7d94de4959 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -231,13 +231,15 @@
\compattikzset{#2/.style={\comnpatname #1, #3={##1}}}%
}
% create a bipole
-\def\pgfcirc@activate@bipole#1#2#3#4{% path name, base node name, style name
+\def\pgfcirc@activate@bipole#1#2#3#4{% type of label, path name, base node name, style name
+ % \typeout{Activate bipole:\space #4,}
\expandafter\def\csname pgf@circ@#2@path\endcsname##1{\pgf@circ@bipole@path{#3}{##1}}%
\pgfcirc@path@to@style{#1}{#2}{#4}{}% no options here, let's see
}
\def\pgfcirc@activate@bipole@simple#1#2{\pgfcirc@activate@bipole{#1}{#2}{#2}{#2}}
% create a bipole with options
-\def\pgfcirc@activate@bipole@opt#1#2#3#4#5{% path name, base node name, style name
+\def\pgfcirc@activate@bipole@opt#1#2#3#4#5{% type of label, path name, base node name, style name, options
+ % \typeout{Activate bipole:\space #4,}
\expandafter\def\csname pgf@circ@#2@path\endcsname##1{\pgf@circ@bipole@path{#3}{##1}}%
\pgfcirc@path@to@style{#1}{#2}{#4}{#5}% no options here, let's see
}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
index 2cc6e461aa..cca01b5bee 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -544,6 +544,11 @@
\ctikzset{bipoles/lowpass/width/.initial=.7}
\ctikzset{bipoles/lowpass2/width/.initial=.7}
\ctikzset{bipoles/allpass/width/.initial=.7}
+\ctikzset{bipoles/vallpass/width/.initial=.7}
+\ctikzset{bipoles/bgenerator/width/.initial=.7}
+\ctikzset{bipoles/qgenerator/width/.initial=.7}
+\ctikzset{bipoles/cgenerator/width/.initial=.7}
+\ctikzset{bipoles/ngenerator/width/.initial=.7}
\ctikzset{bipoles/adc/width/.initial=.7}
\ctikzset{bipoles/dac/width/.initial=.7}
\ctikzset{bipoles/dsp/width/.initial=.7}
@@ -557,10 +562,26 @@
\ctikzset{bipoles/vtattenuator/width/.initial=.7}
\ctikzset{bipoles/phaseshifter/width/.initial=.7}
\ctikzset{bipoles/vphaseshifter/width/.initial=.7}
+\ctikzset{bipoles/biast/width/.initial=.7}
+\ctikzset{bipoles/sinetable/width/.initial=.7}
+\ctikzset{bipoles/register/width/.initial=.7}
\ctikzset{bipoles/detector/width/.initial=.7}
\ctikzset{bipoles/saturation/width/.initial=.7}
\ctikzset{bipoles/sigmoid/width/.initial=.7}
\ctikzset{bipoles/allornothing/width/.initial=.7}
+
+\ctikzset{bipoles/camera/height/.initial=1.2}
+\ctikzset{bipoles/camera/depth/.initial=.3}
+\ctikzset{bipoles/camera/width/.initial=.4}
+\ctikzset{bipoles/tvset/width/.initial=0.6}
+\ctikzset{bipoles/tvset/height/.initial=.4}
+\ctikzset{bipoles/trx/width/.initial=1}
+\ctikzset{bipoles/trx/height/.initial=.4}
+\ctikzset{bipoles/swr/width/.initial=0.6}
+\ctikzset{bipoles/swr/height/.initial=.4}
+\ctikzset{bipoles/power/width/.initial=1}
+\ctikzset{bipoles/power/height/.initial=.4}
+
\ctikzset{tripoles/mixer/width/.initial=0.7}
\ctikzset{tripoles/adder/width/.initial=0.7}
\ctikzset{tripoles/circulator/width/.initial=.7}
@@ -719,6 +740,19 @@
\endpgfscope
}
%
+\def\pgfcirc@twoport@draw@narrowsine#1{% #1 -> y shift
+ \pgfscope
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgftransformyshift{#1\pgf@circ@res@step}
+ \pgfpathmoveto{\pgfpoint{.125\pgf@circ@res@step}{0\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.125\pgf@circ@res@step}{.125\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.125\pgf@circ@res@step}{-.125\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.125\pgf@circ@res@step}{-.125\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.125\pgf@circ@res@step}{.125\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \endpgfscope
+}
+%
\def\pgfcirc@twoport@draw@splitline{%
\pgfscope
\pgfcirc@twoport@maybedash
@@ -889,6 +923,90 @@
\pgfcirc@twoport@draw@sine{0.0}{0}
\pgfcirc@twoport@draw@sine{-0.5}{0}
}
+%% variable allpass filter
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/vallpass/width}}
+{vallpass}
+{\ctikzvalof{bipoles/vallpass/width}}
+{\ctikzvalof{bipoles/vallpass/width}}
+{
+ \pgfcirc@twoport@draw@sine{0.5}{0}
+ \pgfcirc@twoport@draw@sine{0.0}{0}
+ \pgfcirc@twoport@draw@sine{-0.5}{0}
+ \pgfcirc@set@arrows{tunable}{}{latex}
+ \pgfpathmoveto{\pgfpoint{0.7\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.8\pgf@circ@res@up}}
+ \pgfusepath{draw}
+}
+%% Block Generator
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/bgenerator/width}}
+{bgenerator}
+{\ctikzvalof{bipoles/bgenerator/width}}
+{\ctikzvalof{bipoles/bgenerator/width}}
+{
+ \pgfcirc@twoport@draw@narrowsine{0.25}
+ \pgfcirc@twoport@draw@narrowsine{0.0}
+ \pgfcirc@twoport@draw@narrowsine{-0.25}
+ \pgftext[x=0.45\pgf@circ@res@left]{\ctikzvalof{bipoles/twoport/text}}
+}
+%% Crystal Generator
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/qgenerator/width}}
+{qgenerator}
+{\ctikzvalof{bipoles/qgenerator/width}}
+{\ctikzvalof{bipoles/qgenerator/width}}
+{
+ \pgfcirc@twoport@draw@narrowsine{0.45}
+ \pgfcirc@twoport@draw@narrowsine{0.20}
+ \pgfcirc@twoport@draw@narrowsine{-0.05}
+ \pgftext[x=0.45\pgf@circ@res@left,y=0.25\pgf@circ@res@up]{\ctikzvalof{bipoles/twoport/text}}
+ \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{-0.4\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{ 0.7\pgf@circ@res@step}{-0.4\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgfpathrectangle{\pgfpoint{-0.7\pgf@circ@res@step}{-0.7\pgf@circ@res@step}}
+ {\pgfpoint{1.4\pgf@circ@res@step}{0.2\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{-0.7\pgf@circ@res@step}{-0.8\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{ 0.7\pgf@circ@res@step}{-0.8\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{-0.7\pgf@circ@res@step}{-0.4\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{ 0.7\pgf@circ@res@step}{-0.4\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+%% Clock generator
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/cgenerator/width}}
+{cgenerator}
+{\ctikzvalof{bipoles/cgenerator/width}}
+{\ctikzvalof{bipoles/cgenerator/width}}
+{
+ \pgfpathmoveto{\pgfpoint{-0.70\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.42\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.42\pgf@circ@res@step}{+0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.14\pgf@circ@res@step}{+0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.14\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{+0.14\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{+0.14\pgf@circ@res@step}{+0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{+0.42\pgf@circ@res@step}{+0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{+0.42\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{+0.70\pgf@circ@res@step}{-0.35\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+%% Generic generator
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/ngenerator/width}}
+{ngenerator}
+{\ctikzvalof{bipoles/ngenerator/width}}
+{\ctikzvalof{bipoles/ngenerator/width}}
+{
+ \pgfcirc@twoport@draw@sine{0.5}{0}
+ \pgftext[y=-0.35\pgf@circ@res@up]{\ctikzvalof{bipoles/twoport/text}}
+}
%% ADC
\pgfcirc@define@twoports{blocks}
{}
@@ -1056,6 +1174,89 @@
\pgf@circ@text@strokecolor
\pgftext[center,x=0,y=0]{\Large$\varphi$}
}
+%% BIAS-T
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/biast/width}}
+{biast}
+{\ctikzvalof{bipoles/biast/width}}
+{\ctikzvalof{bipoles/biast/width}}
+{
+ \pgfpathmoveto{\pgfpoint{-0.80\pgf@circ@res@step}{-0.50\pgf@circ@res@step}} % Line to Plate 1
+ \pgfpathlineto{\pgfpoint{-0.50\pgf@circ@res@step}{-0.50\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{-0.50\pgf@circ@res@step}{-0.50\pgf@circ@res@step}} % Plate 1
+ \pgfpathlineto{\pgfpoint{-0.50\pgf@circ@res@step}{-0.20\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{-0.50\pgf@circ@res@step}{-0.50\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.50\pgf@circ@res@step}{-0.80\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{-0.30\pgf@circ@res@step}{-0.50\pgf@circ@res@step}} % Plate 1
+ \pgfpathlineto{\pgfpoint{-0.30\pgf@circ@res@step}{-0.20\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{-0.30\pgf@circ@res@step}{-0.50\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.30\pgf@circ@res@step}{-0.80\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{-0.30\pgf@circ@res@step}{-0.50\pgf@circ@res@step}} % Line to Center
+ \pgfpathlineto{\pgfpoint{ 0.00\pgf@circ@res@step}{-0.50\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgfpathcircle{\pgfpoint{ 0.00\pgf@circ@res@step}{-0.50\pgf@circ@res@step}}{0.075\pgf@circ@res@step}
+ \pgfusepath{fill}
+ \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{-0.50\pgf@circ@res@step}} % Line to Right
+ \pgfpathlineto{\pgfpoint{ 0.80\pgf@circ@res@step}{-0.50\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{-0.50\pgf@circ@res@step}} % Line to Coils
+ \pgfpathlineto{\pgfpoint{ 0.00\pgf@circ@res@step}{-0.20\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{-0.20\pgf@circ@res@step}} % Arc1
+ \pgfpatharc{-90}{90}{0.09\pgf@circ@res@step}
+ \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{-0.02\pgf@circ@res@step}} % Arc2
+ \pgfpatharc{-90}{90}{0.09\pgf@circ@res@step}
+ \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{+0.16\pgf@circ@res@step}} % Arc3
+ \pgfpatharc{-90}{90}{0.09\pgf@circ@res@step}
+ \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{+0.36\pgf@circ@res@step}} % Arc4
+ \pgfpatharc{-90}{90}{0.09\pgf@circ@res@step}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{+0.52\pgf@circ@res@step}} % Line to Coils
+ \pgfpathlineto{\pgfpoint{ 0.00\pgf@circ@res@step}{+0.80\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+%% Sine table
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/sinetable/width}}
+{sinetable}
+{\ctikzvalof{bipoles/sinetable/width}}
+{\ctikzvalof{bipoles/sinetable/width}}
+{
+ \pgfcirc@twoport@draw@sine{0.0}{0}
+ \pgfcirc@set@arrows{tunable}{}{latex}
+ \pgfpathmoveto{\pgfpoint{-0.70\pgf@circ@res@step}{-0.70\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{+0.70\pgf@circ@res@step}{-0.70\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpoint{-0.70\pgf@circ@res@step}{-0.70\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.70\pgf@circ@res@step}{+0.70\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+%% Register
+\pgfcirc@define@twoports{blocks}
+{
+ \savedanchor\northwest{
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@y=\ctikzvalof{bipoles/twoport/width}\pgf@circ@scaled@Rlen
+ \pgf@y=.5\pgf@y
+ \pgf@x=-\ctikzvalof{bipoles/twoport/width}\pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{clk}{\northwest\pgf@y=0.5\pgf@y}
+}
+{\ctikzvalof{bipoles/register/width}}
+{register}
+{\ctikzvalof{bipoles/register/width}}
+{\ctikzvalof{bipoles/register/width}}
+{
+ \pgfpathmoveto{\pgfpoint{-1.00\pgf@circ@res@step}{+0.70\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.60\pgf@circ@res@step}{+0.50\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-1.00\pgf@circ@res@step}{+0.30\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ \pgf@circ@text@strokecolor
+ \pgftext[center,x=0,y=0]{\ctikzvalof{bipoles/twoport/text}}
+}
%% detector
\pgfcirc@define@twoports@norotate{blocks}
{}
@@ -1130,6 +1331,139 @@
\pgfpathlineto{\pgfpoint{0.55\pgf@circ@res@step}{.4\pgf@circ@res@step}}
\pgfusepath{draw}
}
+
+%% Camera:
+\pgfcircdeclarebipolescaled{misc}
+{}
+{\ctikzvalof{bipoles/camera/depth}}
+{camera}
+{\ctikzvalof{bipoles/camera/height}}
+{\ctikzvalof{bipoles/camera/width}}{
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{.7\pgf@circ@res@up}}
+ {\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{.7\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.8\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.8\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{.7\pgf@circ@res@up}}
+ \pgfpathclose
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgf@circ@draworfill
+}
+
+% TV:
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/tvset/height}}
+{tvset}
+{\ctikzvalof{bipoles/tvset/height}}
+{\ctikzvalof{bipoles/tvset/width}}
+{
+ \pgfsetlinewidth{2\pgflinewidth} % double in size
+ % Legs
+ \pgfpathmoveto{\pgfpoint{+0.60\pgf@circ@res@step}{-1.10\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{+0.30\pgf@circ@res@step}{-0.70\pgf@circ@res@step}}
+ \pgfusepath{draw}
+ %
+ \pgfpathmoveto{\pgfpoint{-0.60\pgf@circ@res@step}{-1.10\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.30\pgf@circ@res@step}{-0.70\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+
+% Transceiver (TRX)
+\pgfcirc@define@twoports{blocks}
+{
+ \anchor{plus}{\northeast \advance\pgf@y by -0.2\pgf@x\pgf@x=-\pgf@x}
+ \anchor{minus}{\northeast \advance\pgf@y by -0.2\pgf@x\pgf@x=-\pgf@x\pgf@y=-\pgf@y}
+}
+{\ctikzvalof{bipoles/trx/height}}
+{trx}
+{\ctikzvalof{bipoles/trx/height}}
+{\ctikzvalof{bipoles/trx/width}}
+{
+ % VFO-Wheel:
+ \pgfpathcircle{\pgfpoint{0.60\pgf@circ@res@step}{0.00\pgf@circ@res@step}}{0.25\pgf@circ@res@step}
+ \pgfpathcircle{\pgfpoint{0.68\pgf@circ@res@step}{0.10\pgf@circ@res@step}}{0.06\pgf@circ@res@step}
+ % Volume and Squelch:
+ \pgfpathcircle{\pgfpoint{-0.8\pgf@circ@res@step}{+0.15\pgf@circ@res@step}}{0.1\pgf@circ@res@step}
+ \pgfpathcircle{\pgfpoint{-0.8\pgf@circ@res@step}{-0.15\pgf@circ@res@step}}{0.1\pgf@circ@res@step}
+ % Display:
+ \pgfpathrectangle{\pgfpoint{-0.55\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
+ {\pgfpoint{+0.75\pgf@circ@res@step}{+0.5\pgf@circ@res@step}}%
+ \pgfusepath{draw}
+}
+% Standing Wave Ratio (SWR) Meter
+\pgfcirc@define@twoports{blocks}
+{}
+{\ctikzvalof{bipoles/swr/height}}
+{swr}
+{\ctikzvalof{bipoles/swr/height}}
+{\ctikzvalof{bipoles/swr/width}}
+{
+ % Screen:
+ \pgfscope
+ \pgfsetstrokecolor{gray}\pgfsetdash{{1.5pt}{1pt}}{0pt}
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
+ \pgfpatharc{160}{110}{1.1\pgf@circ@res@step}
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}}
+ \pgfpatharc{-160}{-110}{-1.1\pgf@circ@res@step}
+ \pgfusepath{draw}
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{-0.7\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@step}{-0.2\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0pt}{-0.4\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.7\pgf@circ@res@step}{-0.2\pgf@circ@res@step}}
+ \pgfpathclose
+ \pgfpathmoveto{\pgfpoint{-0.35\pgf@circ@res@step}{-0.3\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.3\pgf@circ@res@step}{0.3\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{0.35\pgf@circ@res@step}{-0.3\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.3\pgf@circ@res@step}{0.3\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+% Power supply
+\pgfcirc@define@twoports{blocks}
+{
+ \anchor{u1}{\northeast \advance\pgf@y by -0.2\pgf@x\pgf@x=-\pgf@x}
+ \anchor{u2}{\northeast \advance\pgf@y by -0.2\pgf@x\pgf@x=-\pgf@x\pgf@y=-\pgf@y}
+ \anchor{plus}{\northeast \advance\pgf@y by -0.2\pgf@x \advance\pgf@x by -0.25\pgf@x}
+ \anchor{minus}{\northeast \advance\pgf@y by -0.2\pgf@x\pgf@y=-\pgf@y \advance\pgf@x by -0.25\pgf@x}
+}
+{\ctikzvalof{bipoles/power/height}}
+{power}
+{\ctikzvalof{bipoles/power/height}}
+{\ctikzvalof{bipoles/power/width}}
+{
+ % Plus:
+ \color{red}
+ \pgfsetstrokecolor{red}
+ \pgfpathcircle{\pgfpoint{0.75\pgf@circ@res@step}{0.20\pgf@circ@res@step}}{0.075\pgf@circ@res@step}%
+ \pgfusepath{fill}
+ \pgfpathmoveto{\pgfpoint{0.50\pgf@circ@res@step}{0.20\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.60\pgf@circ@res@step}{0.20\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpoint{0.55\pgf@circ@res@step}{0.25\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.55\pgf@circ@res@step}{0.15\pgf@circ@res@step}}
+ \pgfusepath{stroke}
+ % Minus:
+ \color{black}
+ \pgfsetstrokecolor{black}
+ \pgfpathcircle{\pgfpoint{0.75\pgf@circ@res@step}{-0.20\pgf@circ@res@step}}{0.075\pgf@circ@res@step}%
+ \pgfusepath{fill}
+ \pgfpathmoveto{\pgfpoint{0.50\pgf@circ@res@step}{-0.20\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.60\pgf@circ@res@step}{-0.20\pgf@circ@res@step}}
+ \pgfusepath{stroke}
+ % Displays:
+ \pgfpathrectangle{\pgfpoint{-0.5\pgf@circ@res@step}{0.00\pgf@circ@res@step}}{\pgfpoint{+0.4\pgf@circ@res@step}{+0.25\pgf@circ@res@step}}%
+ \pgfpathrectangle{\pgfpoint{-0.0\pgf@circ@res@step}{0.00\pgf@circ@res@step}}{\pgfpoint{+0.4\pgf@circ@res@step}{+0.25\pgf@circ@res@step}}%
+ % Poti:
+ \pgfpathcircle{\pgfpoint{-0.30\pgf@circ@res@step}{-0.20\pgf@circ@res@step}}{0.075\pgf@circ@res@step}%
+ \pgfusepath{draw}
+ % Switch:
+ \pgfpathrectangle{\pgfpoint{-0.9\pgf@circ@res@step}{0.00\pgf@circ@res@step}}{\pgfpoint{+0.15\pgf@circ@res@step}{+0.25\pgf@circ@res@step}}%
+ \pgfpathmoveto{\pgfpoint{-0.90\pgf@circ@res@step}{0.125\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{-0.75\pgf@circ@res@step}{0.125\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+
%% converters help function
%% definition for styling the DC symbols (GitHub issue #680)
\ctikzset{blocks dc in segments/.initial=1}
@@ -1574,6 +1908,11 @@
\pgfcirc@activate@bipole@simple{l}{lowpass}
\pgfcirc@activate@bipole@simple{l}{lowpass2}
\pgfcirc@activate@bipole@simple{l}{allpass}
+\pgfcirc@activate@bipole@simple{l}{vallpass}
+\pgfcirc@activate@bipole@simple{l}{bgenerator}
+\pgfcirc@activate@bipole@simple{l}{qgenerator}
+\pgfcirc@activate@bipole@simple{l}{cgenerator}
+\pgfcirc@activate@bipole@simple{l}{ngenerator}
\pgfcirc@activate@bipole@simple{l}{adc}
\pgfcirc@activate@bipole@simple{l}{dac}
\pgfcirc@activate@bipole@simple{l}{dsp}
@@ -1587,10 +1926,18 @@
\pgfcirc@activate@bipole@simple{l}{vtattenuator}
\pgfcirc@activate@bipole@simple{l}{phaseshifter}
\pgfcirc@activate@bipole@simple{l}{vphaseshifter}
+\pgfcirc@activate@bipole@simple{l}{biast}
+\pgfcirc@activate@bipole@simple{l}{sinetable}
+\pgfcirc@activate@bipole@simple{l}{register}
\pgfcirc@activate@bipole@simple{l}{detector}
\pgfcirc@activate@bipole@simple{l}{saturation}
\pgfcirc@activate@bipole@simple{l}{sigmoid}
\pgfcirc@activate@bipole@simple{l}{allornothing}
+\pgfcirc@activate@bipole@simple{l}{camera}
+\pgfcirc@activate@bipole@simple{l}{tvset}
+\pgfcirc@activate@bipole@simple{l}{trx}
+\pgfcirc@activate@bipole@simple{l}{swr}
+\pgfcirc@activate@bipole@simple{l}{power}
\pgfcirc@activate@bipole@simple{l}{fiber}
\pgfcirc@activate@bipole@simple{l}{sacdc}
\pgfcirc@activate@bipole@simple{l}{sdcac}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex
index f633ba1c5b..b402557279 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircshapes.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 7457dabb46..85995946f3 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -4025,6 +4025,8 @@
\pgfmathsetmacro{\@@BDscale}{\ctikzvalof{tripoles/#1/bodydiode scale}* \ctikzvalof{\ctikzclass/scale}/\ctikzvalof{diodes/scale}}
\pgftransformscale{\@@BDscale}
\ifpgf@circuit@fulldiode
+ % I'm not sure why this is needed, but...
+ \pgf@circ@maybe@color{transistor bodydiode/color}
\pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
\else
\pgfnode{emptydiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
@@ -8613,6 +8615,11 @@
\pgf@y=\pgf@circ@res@up\advance\pgf@y by -\pgf@circ@res@right
\fi
}
+ \savedmacro{\tubes@filament@angle}{\edef\tubes@filament@angle{\ctikzvalof{tubes/filament angle}}}
+ \savedmacro{\tubes@filament@distance}{\edef\tubes@filament@distance{\ctikzvalof{tubes/filament distance}}}
+ \savedmacro{\tubes@tube@radius}{\edef\tubes@tube@radius{\ctikzvalof{tubes/tube radius}}}
+ \savedmacro{\tubes@cathode@width}{\edef\tubes@cathode@width{\ctikzvalof{tubes/cathode width}}}
+ \savedmacro{\tubes@cathode@distance}{\edef\tubes@cathode@distance{\ctikzvalof{tubes/cathode distance}}}
\anchor{tube ne}{\tubene}
\anchor{tubesq ne}{\tubesquarene}
% tube shape anchors: geo
@@ -8647,30 +8654,37 @@
\anchor{cathode}{%
\northwest
\pgf@y=-\pgf@y
- \pgf@x=\ctikzvalof{tubes/cathode width}\pgf@x
+ \pgf@x=\tubes@cathode@width\pgf@x
}
\anchor{cathode 1}{%
\northwest
\pgf@y=-\pgf@y
- \pgf@x=\ctikzvalof{tubes/cathode width}\pgf@x
+ \pgf@x=\tubes@cathode@width\pgf@x
}
\anchor{cathode 2}{%
\northwest
\pgf@y=-\pgf@y
- \pgf@x=-\ctikzvalof{tubes/cathode width}\pgf@x
+ \pgf@x=-\tubes@cathode@width\pgf@x
}
\anchor{filament 1}{%
\northwest
- \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})}
+ \pgfmathparse{(\tubes@tube@radius*sin(\tubes@filament@angle)}
\pgf@x=\pgfmathresult\pgf@x
\pgf@y=-\pgf@y
}
\anchor{filament 2}{%
\northwest
- \pgfmathparse{(\ctikzvalof{tubes/tube radius}*sin(\ctikzvalof{tubes/filament angle})}
+ \pgfmathparse{(\tubes@tube@radius*sin(\tubes@filament@angle)}
\pgf@x=-\pgfmathresult\pgf@x
\pgf@y=-\pgf@y
}
+ \anchor{filament center}{%
+ \northwest
+ \pgf@ya=0.5\pgf@y
+ \pgf@ya=-\tubes@cathode@distance\pgf@y
+ \advance\pgf@ya by -\tubes@filament@distance\pgf@y
+ \pgf@x=0pt\pgf@y=\pgf@ya
+ }
% Extra anchors
#2%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex
index 08535b7bc0..caf50139cd 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircutils.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
index e041b3b524..f797ce312b 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -192,12 +192,14 @@
\pgfmathsetlength{\absvshift}{\absvshift+sign(\absvshift)*height{"Q"}} % with the current font.
\fi
% apply the same shift to open "straight" voltage as raised
- \ifpgf@circuit@bipole@voltage@straight
- \ifx\@@kind\@@open
- \def\pgf@circ@bipole@voltage@label@anchor{center}
- \pgfmathsetlength{\absvshift}{\absvshift+sign(\absvshift)*height{"Q"}} % with the current font.
- \fi
- \fi
+ % commented out due to https://github.com/circuitikz/circuitikz/issues/821
+ % but I'm not sure if it's correct
+ % \ifpgf@circuit@bipole@voltage@straight
+ % \ifx\@@kind\@@open
+ % \def\pgf@circ@bipole@voltage@label@anchor{center}
+ % \pgfmathsetlength{\absvshift}{\absvshift+sign(\absvshift)*height{"Q"}} % with the current font.
+ % \fi
+ % \fi
}
% %\pgf@circ@Rlen/\ctikzvalof{current arrow scale} is equal to the length of the currarrow
%absolute move, minimum space is length of arrowhead
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.0.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.0.tex
index 9f955a4654..45433f03e1 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.0.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.0.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -31,10 +31,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirc.defines
%%%---------- open: tex/pgfcirc.defines.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -1993,10 +1993,10 @@
%%%---------- close: tex/pgfcirc.defines
%%%%%%%%%%% Springe nach tex/pgfcircutils
%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2065,10 +2065,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircshapes
%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2871,10 +2871,10 @@
%%%---------- close: tex/pgfcircshapes
%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -3887,10 +3887,10 @@
%%%---------- close: tex/pgfcircmonopoles
%%%%%%%%%%% Springe nach tex/pgfcircbipoles
%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -8991,10 +8991,10 @@
%%%---------- close: tex/pgfcircbipoles
%%%%%%%%%%% Springe nach tex/pgfcirctripoles
%%%---------- open: tex/pgfcirctripoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -14699,10 +14699,10 @@
%%%---------- close: tex/pgfcirctripoles
%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
%%%---------- open: tex/pgfcircquadpoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -15850,10 +15850,10 @@
%%%---------- close: tex/pgfcircquadpoles
%%%%%%%%%%% Springe nach tex/pgfcircmultipoles
%%%---------- open: tex/pgfcircmultipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -17628,10 +17628,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirclabel
%%%---------- open: tex/pgfcirclabel.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -17997,10 +17997,10 @@
%%%---------- close: tex/pgfcirclabel
%%%%%%%%%%% Springe nach tex/pgfcircvoltage
%%%---------- open: tex/pgfcircvoltage.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -18496,10 +18496,10 @@
%%%---------- close: tex/pgfcircvoltage
%%%%%%%%%%% Springe nach tex/pgfcirccurrent
%%%---------- open: tex/pgfcirccurrent.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -18711,10 +18711,10 @@
%%%---------- close: tex/pgfcirccurrent
%%%%%%%%%%% Springe nach tex/pgfcircflow
%%%---------- open: tex/pgfcircflow.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -19008,10 +19008,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircpath
%%%---------- open: tex/pgfcircpath.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.1.2.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.1.2.tex
index ea2d3e5b14..aedc4b598d 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.1.2.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.1.2.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -32,10 +32,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirc.defines
%%%---------- open: tex/pgfcirc.defines.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2138,10 +2138,10 @@
%%%---------- close: tex/pgfcirc.defines
%%%%%%%%%%% Springe nach tex/pgfcircutils
%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2224,10 +2224,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircshapes
%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -3030,10 +3030,10 @@
%%%---------- close: tex/pgfcircshapes
%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -4046,10 +4046,10 @@
%%%---------- close: tex/pgfcircmonopoles
%%%%%%%%%%% Springe nach tex/pgfcircbipoles
%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -9943,10 +9943,10 @@
%%%---------- close: tex/pgfcircbipoles
%%%%%%%%%%% Springe nach tex/pgfcirctripoles
%%%---------- open: tex/pgfcirctripoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -15850,10 +15850,10 @@
%%%---------- close: tex/pgfcirctripoles
%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
%%%---------- open: tex/pgfcircquadpoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -17137,10 +17137,10 @@
%%%---------- close: tex/pgfcircquadpoles
%%%%%%%%%%% Springe nach tex/pgfcircmultipoles
%%%---------- open: tex/pgfcircmultipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -19831,10 +19831,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirclabel
%%%---------- open: tex/pgfcirclabel.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -20200,10 +20200,10 @@
%%%---------- close: tex/pgfcirclabel
%%%%%%%%%%% Springe nach tex/pgfcircvoltage
%%%---------- open: tex/pgfcircvoltage.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -20749,10 +20749,10 @@
%%%---------- close: tex/pgfcircvoltage
%%%%%%%%%%% Springe nach tex/pgfcirccurrent
%%%---------- open: tex/pgfcirccurrent.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -20964,10 +20964,10 @@
%%%---------- close: tex/pgfcirccurrent
%%%%%%%%%%% Springe nach tex/pgfcircflow
%%%---------- open: tex/pgfcircflow.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -21261,10 +21261,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircpath
%%%---------- open: tex/pgfcircpath.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.2.7.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.2.7.tex
index 52008ac993..9def87d0ae 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.2.7.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.2.7.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -32,10 +32,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirc.defines
%%%---------- open: tex/pgfcirc.defines.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2353,10 +2353,10 @@
%%%---------- close: tex/pgfcirc.defines
%%%%%%%%%%% Springe nach tex/pgfcircutils
%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2448,10 +2448,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircshapes
%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -3260,10 +3260,10 @@
%%%---------- close: tex/pgfcircshapes
%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -4362,10 +4362,10 @@
%%%---------- close: tex/pgfcircmonopoles
%%%%%%%%%%% Springe nach tex/pgfcircbipoles
%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -10525,10 +10525,10 @@
%%%---------- close: tex/pgfcircbipoles
%%%%%%%%%%% Springe nach tex/pgfcirctripoles
%%%---------- open: tex/pgfcirctripoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -16959,10 +16959,10 @@
%%%---------- close: tex/pgfcirctripoles
%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
%%%---------- open: tex/pgfcircquadpoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -18705,10 +18705,10 @@
%%%---------- close: tex/pgfcircquadpoles
%%%%%%%%%%% Springe nach tex/pgfcircmultipoles
%%%---------- open: tex/pgfcircmultipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -21736,10 +21736,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirclabel
%%%---------- open: tex/pgfcirclabel.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -22107,10 +22107,10 @@
%%%---------- close: tex/pgfcirclabel
%%%%%%%%%%% Springe nach tex/pgfcircvoltage
%%%---------- open: tex/pgfcircvoltage.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -22738,10 +22738,10 @@
%%%---------- close: tex/pgfcircvoltage
%%%%%%%%%%% Springe nach tex/pgfcirccurrent
%%%---------- open: tex/pgfcirccurrent.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -22968,10 +22968,10 @@
%%%---------- close: tex/pgfcirccurrent
%%%%%%%%%%% Springe nach tex/pgfcircflow
%%%---------- open: tex/pgfcircflow.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -23292,10 +23292,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircpath
%%%---------- open: tex/pgfcircpath.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.4.6.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.4.6.tex
index 422784d674..1ae3bf3d7d 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.4.6.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz-1.4.6.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -32,10 +32,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirc.defines
%%%---------- open: tex/pgfcirc.defines.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -927,10 +927,10 @@
%%%---------- close: tex/pgfcirc.defines
%%%%%%%%%%% Springe nach tex/pgfcircutils
%%%---------- open: tex/pgfcircutils.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -1332,10 +1332,10 @@
%%%---------- close: tex/pgfcircutils
%%%%%%%%%%% Springe nach tex/pgfcircpath
%%%---------- open: tex/pgfcircpath.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -1697,10 +1697,10 @@
%%%%%%%%%%% Springe nach tex/pgfcircshapes
%%%---------- open: tex/pgfcircshapes.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -2519,10 +2519,10 @@
%%%---------- close: tex/pgfcircshapes
%%%%%%%%%%% Springe nach tex/pgfcircmonopoles
%%%---------- open: tex/pgfcircmonopoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -3722,10 +3722,10 @@
%%%---------- close: tex/pgfcircmonopoles
%%%%%%%%%%% Springe nach tex/pgfcircbipoles
%%%---------- open: tex/pgfcircbipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -9952,10 +9952,10 @@
%%%---------- close: tex/pgfcircbipoles
%%%%%%%%%%% Springe nach tex/pgfcirctripoles
%%%---------- open: tex/pgfcirctripoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -18520,10 +18520,10 @@
%%%---------- close: tex/pgfcirctripoles
%%%%%%%%%%% Springe nach tex/pgfcircquadpoles
%%%---------- open: tex/pgfcircquadpoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -22281,10 +22281,10 @@
%%%---------- close: tex/pgfcircquadpoles
%%%%%%%%%%% Springe nach tex/pgfcircmultipoles
%%%---------- open: tex/pgfcircmultipoles.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -24442,10 +24442,10 @@
%%%%%%%%%%% Springe nach tex/pgfcirclabel
%%%---------- open: tex/pgfcirclabel.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -24844,10 +24844,10 @@
%%%---------- close: tex/pgfcirclabel
%%%%%%%%%%% Springe nach tex/pgfcircvoltage
%%%---------- open: tex/pgfcircvoltage.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -25554,10 +25554,10 @@
%%%---------- close: tex/pgfcircvoltage
%%%%%%%%%%% Springe nach tex/pgfcirccurrent
%%%---------- open: tex/pgfcirccurrent.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -25800,10 +25800,10 @@
%%%---------- close: tex/pgfcirccurrent
%%%%%%%%%%% Springe nach tex/pgfcircflow
%%%---------- open: tex/pgfcircflow.tex
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index a738c664ea..6f3c8c364f 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -1,7 +1,7 @@
-% Copyright 2018-2024 by Romano Giannetti
-% Copyright 2015-2024 by Stefan Lindner
-% Copyright 2013-2024 by Stefan Erhardt
-% Copyright 2007-2024 by Massimo Redaelli
+% Copyright 2018-2025 by Romano Giannetti
+% Copyright 2015-2025 by Stefan Lindner
+% Copyright 2013-2025 by Stefan Erhardt
+% Copyright 2007-2025 by Massimo Redaelli
%
% This file may be distributed and/or modified
%
@@ -16,8 +16,8 @@
\startmodule[circuitikz]
\usemodule[tikz]
-\def\pgfcircversion{1.6.8}
-\def\pgfcircversiondate{2024/05/05}
+\def\pgfcircversion{1.7.1}
+\def\pgfcircversiondate{2025/01/10}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
diff --git a/graphics/pgf/contrib/dynkin-diagrams/README b/graphics/pgf/contrib/dynkin-diagrams/README
index e43f31e0b8..105afe57df 100644
--- a/graphics/pgf/contrib/dynkin-diagrams/README
+++ b/graphics/pgf/contrib/dynkin-diagrams/README
@@ -1,6 +1,6 @@
Dynkin diagrams
-v3.1415926535897932384
-2 June 2023
+v3.141592653589793238462
+4 December 2024
Authors:
Ben McKay
diff --git a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.bib b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.bib
index 9660120699..952e4a90bf 100644
--- a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.bib
+++ b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.bib
@@ -1,6 +1,5 @@
% Encoding: ISO-8859-1
-
@Book{Adams:1996,
Title = {Lectures on exceptional {L}ie groups},
Author = {Adams, J. F.},
@@ -477,4 +476,67 @@ MRREVIEWER = {Stephen Gelbart},
url = {https://doi.org/10.1007/978-1-4612-0979-9},
}
+@Book{Knapp:2002,
+ author = {Knapp, Anthony W.},
+ publisher = {Birkh\"{a}user Boston, Inc., Boston, MA},
+ title = {Lie groups beyond an introduction},
+ year = {2002},
+ edition = {Second},
+ isbn = {0-8176-4259-5},
+ series = {Progress in Mathematics},
+ volume = {140},
+ mrclass = {22-01},
+ mrnumber = {1920389},
+ pages = {xviii+812},
+}
+
+@Article{Witt:1941,
+ author = {Witt, Ernst},
+ journal = {Abh. Math. Sem. Hansischen Univ.},
+ title = {Spiegelungsgruppen und {A}ufz\"ahlung halbeinfacher {L}iescher {R}inge},
+ year = {1941},
+ issn = {0025-5858},
+ pages = {289--322},
+ volume = {14},
+ doi = {10.1007/BF02940749},
+ fjournal = {Abhandlungen aus dem Mathematischen Seminar der Hansischen Universit\"at},
+ mrclass = {09.1X},
+ mrnumber = {5099},
+ mrreviewer = {O.\ F. G. Schilling},
+ url = {https://doi.org/10.1007/BF02940749},
+}
+
+@Article{Johnson.et.al.1999,
+ author = {Johnson, N. W. and Ratcliffe, J. G. and Kellerhals, R. and Tschantz, S. T.},
+ journal = {Transform. Groups},
+ title = {The size of a hyperbolic {C}oxeter simplex},
+ year = {1999},
+ issn = {1083-4362,1531-586X},
+ number = {4},
+ pages = {329--353},
+ volume = {4},
+ doi = {10.1007/BF01238563},
+ fjournal = {Transformation Groups},
+ mrclass = {20F55 (57M60)},
+ mrnumber = {1726696},
+ mrreviewer = {Andrei\ Yu.\ Vesnin},
+ url = {https://doi.org/10.1007/BF01238563},
+}
+
+@Book{McMullen.Schulte:2002,
+ author = {McMullen, Peter and Schulte, Egon},
+ publisher = {Cambridge University Press, Cambridge},
+ title = {Abstract regular polytopes},
+ year = {2002},
+ isbn = {0-521-81496-0},
+ series = {Encyclopedia of Mathematics and its Applications},
+ volume = {92},
+ doi = {10.1017/CBO9780511546686},
+ mrclass = {52B15 (20F55 51F15 51M20)},
+ mrnumber = {1965665},
+ mrreviewer = {Rade\ \v Zivaljevi\'c},
+ pages = {xiv+551},
+ url = {https://doi.org/10.1017/CBO9780511546686},
+}
+
@Comment{jabref-meta: databaseType:bibtex;}
diff --git a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdf b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdf
index 2109c1ba1c..4f440b3170 100644
--- a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdf
+++ b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty
index e45f21ee18..b2af571c4c 100644
--- a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty
+++ b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty
@@ -1,6 +1,6 @@
% The Dynkin Diagrams package.
%
-% Version 3.141 592 653 589 793 238 4
+% Version 3.141 592 653 589 793 238 462
%
% This package draws Dynkin diagrams in LaTeX
% documents, using the TikZ package.
@@ -13,7 +13,7 @@
% Released under the LaTeX Project Public License v1.3c or later, see
% http://www.latex-project.org/lppl.txt
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{dynkin-diagrams}[2023/06/02 Dynkin diagrams]
+\ProvidesPackage{dynkin-diagrams}[2024/12/04 Dynkin diagrams]
\RequirePackage{tikz}
\RequirePackage{xstring}
\RequirePackage{etoolbox}
@@ -1873,6 +1873,7 @@
}%
+
%% \dynkinQuadrupleEdge{<p>}{<q>}
%% \dynkinQuadrupleEdge*{<p>}{<q>}
%% Draws an oriented edge of valence 4 from root <p> to root <q> on the current Dynkin diagram.
@@ -2041,6 +2042,8 @@
% Is the right side of the Dynkin diagram folded?
\newif\ifdynkin@Coxeter
% Should we draw Coxeter diagrams?
+\newif\ifdynkin@Coxeter@above
+% Should we draw Coxeter diagram extra labels above or below?
\newif\ifdynkin@Kac@arrows
% Should we draw arrows following Kac?
\newif\ifdynkin@odd
@@ -2097,6 +2100,8 @@
},
Coxeter/.is if = dynkin@Coxeter,
Coxeter=false,
+ Coxeter above/.is if = dynkin@Coxeter@above,
+ Coxeter above=true,
double edges/.style = {
fold style/.style = {
draw=black,
@@ -2598,6 +2603,10 @@
{%
\global\dynkin@rank=\dynkin@string\relax%
\global\dynkin@nodes=\dynkin@string\relax%
+ \ifWitt@symbol%
+ \global\advance\dynkin@rank by -1\relax%
+ \global\advance\dynkin@nodes by -1\relax%
+ \fi
\ifdynkin@is@twisted%
\IfStrEqCase{\dynkin@series}%
{%
@@ -2800,7 +2809,6 @@
% Turn Satake codes into Dynkin diagram expressions in \dynkin@string.
\dynkin@grok@Satake@codes%
}%
-
% Expand out any digits in \dynkin@string into multiples of the various root marks.
\expand@Dynkin@Roots@Digits%
% Assign to \dynkin@roots the input string \dynkin@string with all . symbols removed,
@@ -2881,20 +2889,41 @@
\global\dynkin@rank@minus@three\the\dynkin@rank@minus@two\relax%
\global\advance\dynkin@rank@minus@three by -1\relax%
}%
+
+\newif\ifWitt@symbol
\newcount\dynkin@lenny%
%% \dynkin@grok@series
%% Interprets the dynkin@series, to see if it is extended, twisted, and what twisted series it is.
\NewDocumentCommand\dynkin@grok@series{}%
{%
- \StrLen{\dynkin@series}[\dynkin@lenny]
+ \StrLen{\dynkin@series}[\dynkin@lenny]\relax%
\ifnum\dynkin@lenny>1\relax%
\dynkin@error@series%
\fi%
+% We need to check if the series is a Witt symbol.
+ \IfSubStr{PSRQTUVW}{\dynkin@series}%
+ {%
+ \global\Witt@symboltrue%
+ \IfStrEqCase{\dynkin@series}%
+ {%
+ {P}{\global\xdef\dynkin@series{A}}%
+ {S}{\global\xdef\dynkin@series{B}}%
+ {R}{\global\xdef\dynkin@series{C}}%
+ {Q}{\global\xdef\dynkin@series{D}}%
+ {T}{\global\xdef\dynkin@series{E}}%
+ {U}{\global\xdef\dynkin@series{F}}%
+ {V}{\global\xdef\dynkin@series{G}}%
+ {W}{\global\xdef\dynkin@series{I}}%
+ }%
+ }%
+ {%
+ \global\Witt@symbolfalse%
+ }%
\edef\series{\dynkin@series}%
\IfStrEqCase{\dynkin@twisted@series}%
{%
{0}{}%
- {1}{ \global\dynkin@is@extendedtrue}%
+ {1}{\global\dynkin@is@extendedtrue}%
{2}{%
\IfSubStr{ADE}{\dynkin@series}%
{%
@@ -3431,7 +3460,8 @@
{%
\global#5=%
\stringCharacterInPosition%
- {13456782}{#4}%
+ {87654312}{#4}%
+ %% {13456782}{#4}% <-- Old error!
\relax%
}%
{Kac}%
@@ -3459,19 +3489,6 @@
}%
[\global#5=#4\relax]%
}%
- {G}%
- {%
- \IfStrEqCase{#3}%
- {%
- {Carter}{\global#5=%
- \stringCharacterInPosition{21}{#4}%
- \relax}%
- {Dynkin}{\global#5=%
- \stringCharacterInPosition{21}{#4}%
- \relax}%
- }%
- [\global#5=#4\relax]%
- }%
}%
[\global#5=#4\relax]%
}%
@@ -3607,7 +3624,8 @@
{%
\global#5=%
\stringCharacterInPosition%
- {18234567}{#3}%
+ {78654321}{#3}%
+% {18234567}{#3}% <<--- Old error.
\relax%
}%
{Kac}%
@@ -3640,25 +3658,6 @@
}%
[\global#5=#3\relax]%
}%
- {G}%
- {%
- \IfStrEqCase{#4}%
- {%
- {Carter}%
- {%
- \global#5=%
- \stringCharacterInPosition{21}{#3}%
- \relax%
- }%
- {Dynkin}%
- {%
- \global#5=%
- \stringCharacterInPosition{21}{#3}%
- \relax%
- }%
- }%
- [\global#5=#3\relax]%
- }%
}%
[\global#5=#3\relax]%
}%
@@ -3756,7 +3755,8 @@
{%
{Adams}{\global\dynkin@Root@Number=\stringCharacterInPosition{13245678}{#1}\relax}%
{Carter}{\global\dynkin@Root@Number=\stringCharacterInPosition{86754321}{#1}\relax}%
- {Dynkin}{\global\dynkin@Root@Number=\stringCharacterInPosition{18234567}{#1}\relax}%
+ {Dynkin}{\global\dynkin@Root@Number=\stringCharacterInPosition{78654321%%18234567
+}{#1}\relax}%
{Kac}{\global\dynkin@Root@Number=\stringCharacterInPosition{78654321}{#1}\relax}%
}%
[\global\dynkin@Root@Number=#1\relax]%
@@ -3777,12 +3777,14 @@
}%
{G}%
{%
- \IfStrEqCase{\dynkin@ordering}%
- {%
- {Carter}{\global\dynkin@Root@Number=\stringCharacterInPosition{21}{#1}\relax}%
- {Dynkin}{\global\dynkin@Root@Number=\stringCharacterInPosition{21}{#1}\relax}%
- }%
- [\global\dynkin@Root@Number=#1\relax]%
+ \global\dynkin@Root@Number=#1\relax%
+% \IfStrEqCase{\dynkin@ordering}%
+% {%
+% {Carter}{\global\dynkin@Root@Number=\stringCharacterInPosition{21}{#1}\relax}%
+% {Dynkin}{\global\dynkin@Root@Number=\stringCharacterInPosition{21}{#1}\relax}%
+% {Kac}{\global\dynkin@Root@Number=\stringCharacterInPosition{21}{#1}\relax}%
+% }%
+% [\global\dynkin@Root@Number=#1\relax]%
}%
}%
[\global\dynkin@Root@Number=#1\relax]%
@@ -4338,9 +4340,15 @@
\else%
\ifdynkin@Coxeter%
\Adynkin%
- \dynkinEdgeLabel%
- {\the\dynkin@rank@minus@one}%
- {\the\dynkin@rank}{4}%
+ \ifdynkin@Coxeter@above%
+ \dynkinEdgeLabel%
+ {\the\dynkin@rank@minus@one}%
+ {\the\dynkin@rank}{4}%
+ \else%
+ \dynkinEdgeLabel*%
+ {\the\dynkin@rank@minus@one}%
+ {\the\dynkin@rank}{4}%
+ \fi%
\else
% Create the roots.
\ifnum\dynkin@ply>1\relax%
@@ -4994,7 +5002,11 @@
\dynkinEdge*{SingleEdge}{1}{2}%
\dynkinEdge*{SingleEdge}{2}{3}%
\dynkinEdge*{SingleEdge}{3}{4}%
- \dynkinEdgeLabel{2}{3}{4}%
+ \ifdynkin@Coxeter@above%
+ \dynkinEdgeLabel{2}{3}{4}%
+ \else%
+ \dynkinEdgeLabel*{2}{3}{4}%
+ \fi%
\else%
\dynkinEdge*{SingleEdge}{1}{2}%
\dynkinEdge*{SingleEdge}{3}{4}%
@@ -5002,6 +5014,9 @@
\fi%
\fi%
}%
+
+\newif\ifGtwo@old@dynkin@reverse@arrows
+
%% \Gdynkin
%% Draws a G series Dynkin diagram.
\NewDocumentCommand\Gdynkin{}%
@@ -5013,14 +5028,84 @@
\dynkin@jump{1}%
\dynkinPlaceRootHere*{1}{left}{above}%
\dynkinPlaceRootRelativeTo*{2}{1}{southfold}{left}{below}%
+ \ifdynkin@reverse@arrows%
+ \global\Gtwo@old@dynkin@reverse@arrowstrue\relax%
+ \else%
+ \global\Gtwo@old@dynkin@reverse@arrowsfalse\relax%
+ \fi%
+ \IfStrEqCase{\dynkin@ordering}%
+ {%
+ {Adams}{%
+ \ifdynkin@reverse@arrows%
+ \global\dynkin@reverse@arrowsfalse\relax%
+ \else%
+ \global\dynkin@reverse@arrowstrue\relax%
+ \fi\relax}%
+ {Bourbaki}{%
+ \ifdynkin@reverse@arrows%
+ \global\dynkin@reverse@arrowsfalse\relax%
+ \else%
+ \global\dynkin@reverse@arrowstrue\relax%
+ \fi\relax}%
+% {Carter}{%
+% \ifdynkin@reverse@arrows%
+% \global\dynkin@reverse@arrowsfalse\relax%
+% \else%
+% \global\dynkin@reverse@arrowstrue\relax%
+% \fi\relax}%
+ {Carter}{\relax}%
+ {Dynkin}{\relax}%
+ {Kac}{\relax}%
+ }%
+ [\relax]%
\dynkinEdge*{TripleDownRightSemiCircle}{1}{2}%
+ \ifGtwo@old@dynkin@reverse@arrows%
+ \global\dynkin@reverse@arrowstrue\relax%
+ \else%
+ \global\dynkin@reverse@arrowsfalse\relax%
+ \fi%
\ifdynkin@arrows%
\dynkinLeftFold*{1}{2}%
\fi%
\else%
\dynkinPlaceRootHere*{1}{below}{above}%
\dynkinPlaceRootRelativeTo*{2}{1}{east}{below}{above}%
- \dynkinTripleEdge*{1}{2}%
+ \ifdynkin@reverse@arrows%
+ \global\Gtwo@old@dynkin@reverse@arrowstrue\relax%
+ \else%
+ \global\Gtwo@old@dynkin@reverse@arrowsfalse\relax%
+ \fi%
+ \IfStrEqCase{\dynkin@ordering}%
+ {%
+ {Adams}{%
+ \ifdynkin@reverse@arrows%
+ \global\dynkin@reverse@arrowsfalse\relax%
+ \else%
+ \global\dynkin@reverse@arrowstrue\relax%
+ \fi\relax}%
+ {Bourbaki}{%
+ \ifdynkin@reverse@arrows%
+ \global\dynkin@reverse@arrowsfalse\relax%
+ \else%
+ \global\dynkin@reverse@arrowstrue\relax%
+ \fi\relax}%
+% {Carter}{%
+% \ifdynkin@reverse@arrows%
+% \global\dynkin@reverse@arrowsfalse\relax%
+% \else%
+% \global\dynkin@reverse@arrowstrue\relax%
+% \fi\relax}%
+ {Carter}{\relax}% <<--- This was wrong for a long time!
+ {Dynkin}{\relax}%
+ {Kac}{\relax}%
+ }%
+ [\relax]%
+ \dynkinTripleEdge*{1}{2}\relax%
+ \ifGtwo@old@dynkin@reverse@arrows%
+ \global\dynkin@reverse@arrowstrue\relax%
+ \else%
+ \global\dynkin@reverse@arrowsfalse\relax%
+ \fi%
\fi%
\fi%
}%
@@ -5030,7 +5115,11 @@
\newcommand*{\Hdynkin}%
{%
\Adynkin%
- \dynkinEdgeLabel{1}{2}{5}%
+ \ifdynkin@Coxeter@above%
+ \dynkinEdgeLabel{1}{2}{5}%
+ \else%
+ \dynkinEdgeLabel*{1}{2}{5}%
+ \fi%
}%
%% \Idynkin
%% Draws an I series Coxeter diagram.
@@ -5038,7 +5127,11 @@
{%
\dynkin@rank=2\relax%
\Adynkin%
- \dynkinEdgeLabel{1}{2}{\dynkin@gonality}%
+ \ifdynkin@Coxeter@above%
+ \dynkinEdgeLabel{1}{2}{\dynkin@gonality}%
+ \else%
+ \dynkinEdgeLabel*{1}{2}{\dynkin@gonality}%
+ \fi%
}%
%% \extendedAdynkin
@@ -5183,9 +5276,15 @@
\dynkinEdge*{SingleEdge}%
{\the\dynkin@rank@minus@one}%
{\the\dynkin@rank}%
- \dynkinEdgeLabel%
- {\the\dynkin@rank@minus@one}%
- {\the\dynkin@rank}{4}%
+ \ifdynkin@Coxeter@above%
+ \dynkinEdgeLabel%
+ {\the\dynkin@rank@minus@one}%
+ {\the\dynkin@rank}{4}%
+ \else%
+ \dynkinEdgeLabel*%
+ {\the\dynkin@rank@minus@one}%
+ {\the\dynkin@rank}{4}%
+ \fi%
\else%
\ifnum\dynkin@ply<3\relax%
\dynkinEdge*{DoubleEdge}%
@@ -5211,7 +5310,11 @@
\Cdynkin{}%
\ifdynkin@Coxeter%
\dynkinEdge*{SingleEdge}{0}{1}%
- \dynkinEdgeLabel{0}{1}{4}%
+ \ifdynkin@Coxeter@above%
+ \dynkinEdgeLabel{0}{1}{4}%
+ \else%
+ \dynkinEdgeLabel*{0}{1}{4}%
+ \fi%
\else%
\dynkinEdge*{DoubleEdge}{0}{1}%
\fi%
@@ -5391,8 +5494,11 @@
\xdef\dynkin@gonality{6}%
\dynkinPlaceRootHere*{0}{below}{above}%
\dynkinEast%
+ \let\extended@G@old@order\dynkin@ordering%
+ \xdef\dynkin@ordering{Carter}%
\Gdynkin%
\dynkinEdge*{SingleEdge}{0}{1}%
+ \xdef\dynkin@ordering{\extended@G@old@order}%
}%
%% \extendedHdynkin
@@ -5423,7 +5529,11 @@
\dynkin@rank=1\relax%
\Adynkin%
\dynkinEdge*{SingleEdge}{0}{1}%
- \dynkinEdgeLabel{0}{1}{\infty}%
+ \ifdynkin@Coxeter@above%
+ \dynkinEdgeLabel{0}{1}{\infty}%
+ \else%
+ \dynkinEdgeLabel*{0}{1}{\infty}%
+ \fi%
}%
\newcount\dynkin@height@minus@one%
%% \twistedAdynkin
@@ -5531,6 +5641,8 @@
\fi%
\fi%
}%
+
+\newif\iftwisted@D@old@dynkin@reverse@arrows
%% \twistedDdynkin
%% Draws a twisted D series affine Dynkin diagram.
\NewDocumentCommand\twistedDdynkin{}%
@@ -5546,7 +5658,17 @@
\dynkinPlaceRootRelativeTo*{1}{0}{east}{below}{above}%
\dynkinPlaceRootRelativeTo*{2}{1}{east}{below}{above}%
\dynkinEdge*{SingleEdge}{0}{1}%
- \dynkinTripleEdge*{2}{1}%
+ \ifdynkin@reverse@arrows%
+ \global\dynkin@reverse@arrowsfalse\relax%
+ \else%
+ \global\dynkin@reverse@arrowstrue\relax%
+ \fi%
+ \dynkinTripleEdge*{1}{2}%
+ \ifdynkin@reverse@arrows%
+ \global\dynkin@reverse@arrowsfalse\relax%
+ \else%
+ \global\dynkin@reverse@arrowstrue\relax%
+ \fi%
\else%
\ClassError%
{Dynkin diagrams}%
diff --git a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex
index 5f4bb33e41..e97a5d2f2c 100644
--- a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex
+++ b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex
@@ -1,7 +1,7 @@
\documentclass{amsart}
\title[The Dynkin diagrams package]%
{The Dynkin diagrams package \\
-Version 3.141\,592\,653\,589\,793\,238\,4}
+Version 3.141\,592\,653\,589\,793\,238\,462}
%% My name:
\makeatletter
\DeclareRobustCommand{\scotsMc}{\scotsMcx{c}}
@@ -20,7 +20,8 @@ Version 3.141\,592\,653\,589\,793\,238\,4}
\author{Ben \scotsMc{}Kay}
\address{School of Mathematical Sciences, University College Cork, Cork, Ireland}
\email{b.mckay@ucc.ie}
-\date{2 June 2023}
+\date{4 December 2024}
+\thanks{Thanks to Jeffrey Adams, Paul Aspinwall, Mikhail Borovoi, Fran Burstall, Michiel Van Couwenberghe, Xu Gao, Skip Garibaldi, Enrico Gregorio, Mamuka Jibladze, Tasho Kaletha, Jordan Lambert, Sriotchilism O'Zaic, Gopal Prasad, Anthony Pulido, Andres Sambarino, Paul Schwahn, Felix Weinstein, Niels Wen and Gordon Williams.}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
\usepackage{etoolbox}
@@ -168,6 +169,11 @@ before upper={\widowpenalties=3 10000 10000 150}}
\begin{document}
\maketitle
+\renewcommand\do[1]{\dyn#1}
+\renewcommand{\wdtA}{3cm}
+\begin{dynkinTable}{The Dynkin diagrams of the reduced simple root systems \cite{Bourbaki:2002} pp. 265--290, plates I--IX}{2.25cm}{2.5cm}
+\docsvlist{A{},B{},C{},D{},E6,E7,E8,F4,G2}
+\end{dynkinTable}
\begin{center}
\begin{varwidth}{\textwidth}
\tableofcontents
@@ -176,6 +182,8 @@ before upper={\widowpenalties=3 10000 10000 150}}
\setlength{\arrayrulewidth}{1.5pt}
+\newpage
+
\section{Quick introduction}
\begin{tcolorbox}[title={Load the Dynkin diagram package (see options below)}]
\begin{Verbatim}
@@ -202,7 +210,9 @@ The Dynkin diagram of \(B_3\) is
\draw[very thick,red] (root 1) to [out=-45, in=-135] (root 3);
\end{dynkinDiagram}
\end{tcblisting}
+
\newpage
+
\section{Interaction with \TikZ}
Inside a \TikZ environment, default behaviour is to draw from the origin, so you can draw around the diagram:
\begin{tcblisting}{title={Inside a \TikZ environment}}
@@ -228,14 +238,7 @@ The Dynkin diagram of \(B_3\) is
\end{tikzpicture}
\end{tcblisting}
-\newpage
-
-\renewcommand\do[1]{\dyn#1}
-\renewcommand{\wdtA}{3cm}
-\begin{dynkinTable}{The Dynkin diagrams of the reduced simple root systems \cite{Bourbaki:2002} pp. 265--290, plates I--IX}{2.25cm}{2.5cm}
-\docsvlist{A{},B{},C{},D{},E6,E7,E8,F4,G2}
-\end{dynkinTable}
-
+\newpage
\section{Set options globally}
@@ -251,6 +254,7 @@ The Dynkin diagram of \(B_3\) is
densely dashed}}
\end{Verbatim}
\end{tcolorbox}
+
You can also pass options to the package in \verb!\usepackage!.
\emph{Danger:} spaces in option names are replaced with hyphens: \texttt{edge length=1cm} is \texttt{edge-length=1cm} as a global option; moreover you should drop the extension \verb!/.style! on any option with spaces in its name (but not otherwise). For example,
\begin{tcolorbox}[title={\dots or pass global options to the package}]
@@ -275,6 +279,9 @@ The Dynkin diagram of \(B_3 \times A_2\) is \dynkins{B3|A2}.
The Dynkin diagram of \(B_3 \times A_2\) is
\begin{DynkinDiagrams}{B3|A2}\end{DynkinDiagrams}
\end{tcblisting}
+
+\newpage
+
Each factor can have its own options.
\begin{tcblisting}{title={Environment}}
The Dynkin diagram of \(B_3 \times A_2\) is
@@ -297,11 +304,11 @@ They are spaced out by the length of one edge between successive diagrams; chang
\endfoot
\endlastfoot
A_1\times A_1&\dynkins{A1|A1}&\texttt{\detokenize{\dynkins}\{A1|A1\}}\\
-A_2&\dynkins{A2}&\texttt{\detokenize{\dynkins}\{A2\}}\\
-B_2&\dynkins{B2}&\texttt{\detokenize{\dynkins}\{B2\}}\\
-C_2&\dynkins{C2}&\texttt{\detokenize{\dynkins}\{C2\}}\\
-D_2&\dynkins{D2}&\texttt{\detokenize{\dynkins}\{D2\}}\\
-G_2&\dynkins{G2}&\texttt{\detokenize{\dynkins}\{G2\}}\\
+A_2&\dynkin A2&\texttt{\detokenize{\dynkin} A2}\\
+B_2&\dynkin B2&\texttt{\detokenize{\dynkin} B2}\\
+C_2&\dynkin C2&\texttt{\detokenize{\dynkin} C2}\\
+D_2&\dynkin D2&\texttt{\detokenize{\dynkin} D2}\\
+G_2&\dynkin G2&\texttt{\detokenize{\dynkin} G2}\\
\end{longtable}
\section{Coxeter diagrams}
@@ -333,6 +340,35 @@ G_2&\dynkins{G2}&\texttt{\detokenize{\dynkins}\{G2\}}\\
[Coxeter,gonality=n]I{}}
\end{dynkinTable}
+\newpage
+
+Some people prefer Coxeter diagrams to have these labels appear on the bottom of the diagram, so say \verb!Coxeter above=false!, most likely as a global option.
+
+\pgfkeys{/Dynkin diagram,
+Coxeter above=false}
+
+\renewcommand\do[1]{\dyn#1}
+\begin{dynkinTable}{The Coxeter diagrams of the simple reflection groups}{2.25cm}{6cm}
+\forDynkinSemicolonsvlist{\do}{
+[Coxeter]A{};
+[Coxeter]B{};
+[Coxeter]C{};
+[Coxeter]D{};
+[Coxeter]E6;
+[Coxeter]E7;
+[Coxeter]E8;
+[Coxeter]F4;
+[Coxeter,gonality=n]G2;
+[Coxeter]H2;
+[Coxeter]H3;
+[Coxeter]H4;
+[Coxeter,gonality=n]I{}}
+\end{dynkinTable}
+
+\pgfkeys{/Dynkin diagram,
+Coxeter above=true}
+
+
\section{Satake diagrams}\label{section:Satake}
\begin{tcblisting}{title={Satake diagrams use the standard name instead of a rank}}
\(A_{IIIb}=\dynkin A{IIIb}\)
@@ -340,6 +376,8 @@ G_2&\dynkins{G2}&\texttt{\detokenize{\dynkins}\{G2\}}\\
We use a solid gray bar to denote the folding of a Dynkin diagram, rather than the usual double arrow, since the diagrams turn out simpler and easier to read.
+\newpage
+
\renewcommand\do[1]{\dyn#1}
\begin{dynkinTable}{The Satake diagrams of the real simple Lie algebras \cite{Helgason:2001} p. 532--534}{2.75cm}{3cm}
\docsvlist{A{I},A{II},A{IIIa},A{IIIb},A{IV},B{I},B{II},C{I},C{IIa},C{IIb},
@@ -477,6 +515,8 @@ Optionally, you can add label directions to say where to put each label relative
\end{tcblisting}
Many options to the package admit an \verb!expand! in front of them to get more expansion.
+\newpage
+
\section{Label subscripts}
Note the slight improvement that \verb!\drlap! makes: the labels are centered on the middle of the letter \(\alpha\), ignoring the space taken up by the subscripts, using the \verb!mathtools! command \verb!\mathrlap!, but only for labels which are \emph{not} placed to the left or right of a root.
\begin{tcblisting}{title={Label subscript spacing}}
@@ -968,7 +1008,7 @@ D_4 &
\dynkin[label,ordering=Kac]E6
\end{tcblisting}
Default is Bourbaki.
-Sources are Adams \cite{Adams:1996} p. 56--57, Bourbaki \cite{Bourbaki:2002} p. pp. 265--290 plates I-IX, Carter \cite{Carter:2005} p. 540--609, Dynkin \cite{Dynkin:1952}, Kac \cite{Kac:1990} p. 43.
+Sources are Adams \cite{Adams:1996} p. 11, pp. 56--57, Bourbaki \cite{Bourbaki:2002} pp. 265--290 plates I-IX, Carter \cite{Carter:2005} pp. 540--609, Dynkin \cite{Dynkin:1952} (reprinted, translated into English, in Dynkin \cite{Dynkin:2000} p. 180), Kac \cite{Kac:1990} p. 53.
\NewDocumentCommand\tablerow{mm}%
{%
@@ -1108,9 +1148,31 @@ D[3]4,E[2]6}
\renewcommand{\do}[1]{\dyn[extended,Coxeter]#1}
\begin{dynkinTable}{The extended (affine) Coxeter diagrams}{3cm}{6cm}
-\docsvlist{A{},B{},C{},D{},E6,E7,E8,F4,G2,H3,H4,I1}
+\docsvlist{A{},B{},C{},D{},E6,E7,E8,F4,G2,H2,H3,H4,I1}
\end{dynkinTable}
+
+\section{Witt symbols}
+
+The \emph{Witt symbol} \cite{Johnson.et.al.1999,McMullen.Schulte:2002,Witt:1941} is a different notation for the various series:
+\[
+\begin{array}{rll}
+\text{Witt symbol}&\text{Cartan symbol}\\
+P_{n+1}&A_n\\
+S_{n+1}&B_n\\
+R_{n+1}&C_n\\
+Q_{n+1}&D_n\\
+T_{n+1}&E_n&n=6,7,8\\
+U_5&F_4\\
+V_3&G_2\\
+W_2&I_1
+\end{array}
+\]
+\begin{tcblisting}{title={Witt symbols}}
+\dynkin[extended]P7, \dynkin[extended]Q7, \dynkin[extended]T7
+\end{tcblisting}
+
+
\newpage
\section{Kac style}
diff --git a/graphics/pgf/contrib/euclidean-lattice/README.md b/graphics/pgf/contrib/euclidean-lattice/README.md
new file mode 100644
index 0000000000..b45a8b02ff
--- /dev/null
+++ b/graphics/pgf/contrib/euclidean-lattice/README.md
@@ -0,0 +1,8 @@
+This is the `euclidean-lattice` package,
+written by Jérôme Plût <jerome.plut@ssi.gouv.fr>.
+
+This package provides a simple and efficient way
+of drawing TikZ pictures of two-dimensional Euclidean lattices.
+
+This material is distributed according to the LaTeX Project Public
+License version 1.3c (https://www.latex-project.org/lppl.txt).
diff --git a/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice-doc.pdf b/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice-doc.pdf
new file mode 100644
index 0000000000..fe52fc6e6c
--- /dev/null
+++ b/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice.dtx b/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice.dtx
new file mode 100644
index 0000000000..bced9a5cb9
--- /dev/null
+++ b/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice.dtx
@@ -0,0 +1,695 @@
+%% \iffalse
+%% Copyright (C) 2024 Jerome Plut
+%%
+%% 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
+%% 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 Jerome Plut.
+%%
+%% This work consists of the files `euclidean-lattice.ins`
+%% and `euclidean-lattice.dtx`,
+%% as well as the derived file `euclidean-lattice.sty`.
+%% \fi
+
+% \iffalse
+%<*driver>
+\ProvidesFile{euclidean-lattice.dtx}
+%</driver>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{color}
+\usepackage{euclidean-lattice}
+\usepackage[listings]{tcolorbox}
+\tcbuselibrary{skins}
+\usepackage[margin=25mm]{geometry}
+\usepackage{amsmath,amsfonts,amssymb}
+\usepackage{titling}
+\setlength{\droptitle}{-30mm}
+
+\sloppy
+\definecolor{blue1}{RGB}{0,53,130}
+\definecolor{red1}{RGB}{218,41,28}
+\definecolor{green1}{RGB}{0,150,59}
+\definecolor{purple1}{RGB}{114,36,108}
+\definecolor{cyan1}{RGB}{242,249,245}
+\definecolor{cyan2}{RGB}{28,133,115}
+\parindent 0pt
+\parskip 1ex
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\newtcblisting{example}{%
+ listing side text,tikz lower={scale=.5},
+ listing options={basicstyle=\ttfamily\fontsize{8pt}{9pt}\selectfont,
+ breaklines=true,language=tex,commentstyle=\color{cyan2}\itshape},
+ sharp corners,boxrule=.4pt,righthand width=55mm,boxsep=0mm,left=2mm,
+ sidebyside gap=2mm,
+ skin=bicolor,colback=cyan1,colframe=black,colbacklower=white,
+}
+\makeatletter
+\def\makecompact#1{\g@addto@macro#1{%
+ \setlength{\itemsep}{\z@}\setlength{\parsep}{\z@}%
+ \setlength{\topsep}{\z@}\setlength{\partopsep}{\z@}%
+}}\makecompact\itemize \makecompact\enumerate
+\makeatother
+\let\labelitemi\textendash
+
+\begin{document}
+ \DocInput{euclidean-lattice.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+%<*doc>
+\fi
+
+\GetFileInfo{euclidean-lattice.sty}
+
+\title{The \textsf{euclidean-lattice} package}
+\author{J\'er\^ome Pl\^ut
+ \textlangle\texttt{jerome.plut@cyber.gouv.fr}\textrangle}
+\date{\textsf{euclidean-lattice}~\fileversion, dated~\filedate}
+
+
+\maketitle
+
+This package provides a simple and efficient way
+of drawing \textsf{TikZ} pictures of two-dimensional Euclidean lattices.
+
+\section{Usage}
+
+\subsection{The \texttt{\textbackslash lattice} command}
+
+\DescribeMacro{\lattice}
+{\color{red1}|\lattice|}%
+{\color{green1}|<|\textit{overlay specification}|>|}%
+{\color{blue1}|[|\textit{options...}|]|}%
+|(|$a$|,|$b$|)(|$c$|,|$d$|);|
+This commands draws a part of the two-dimensional lattice
+generated by the vectors $(a,b)$ and $(c,d)$.
+
+The {\color{green1}\textit{overlay specification}} is optional
+and follows~\textsf{beamer} syntax.
+It will only work if the \textsf{beamer} class is loaded.
+
+The {\color{blue1}\textit{options}} enable customizing how the lattice
+is displayed. They follow the standard \textsf{TikZ/PGF} key-value
+interface. The following options are available.
+
+\DescribeMacro{x}
+\DescribeMacro{y}
+{{\color{blue1}\texttt{x=}$x_1$|:|$x_2$}
+and {\color{blue1}\texttt{y=}$y_1$|:|$y_2$}}
+(default value |x=-2:2|,|y=-2:2|).
+
+These two options specify a bounding box which determines
+which part of the lattice is drawn.
+As a shortcut, passing the value |x=|$x_1$
+is equivalent to |x=|$-x_1$|:|$x_1$, and likewise for~|y|.
+\begin{example}
+\draw[help lines,gray!25] (-5,0) grid (5,2);
+\lattice[x=5,y=0:2](3,0)(1,1);
+\node[inner sep=1.5pt,circle,fill=red] at (0,0){};
+\end{example}
+
+\DescribeMacro{grid}
+{{\color{blue1}\texttt{grid=}\textit{options...}}}
+
+This option specifies how to draw
+the grid generated by the two given lattice vectors.
+It may take either a single value (generally a color name),
+or several values grouped in braces.
+Note that this grid depends on the basis vectors and not only on the
+lattice; see the example below.
+\begin{example}
+\lattice[y=0:2,x=0:5,grid=gray](2,-1)(1,1);
+% Same lattice, different basis:
+\lattice[y=0:2,x=6:11,grid={yellow,very thick}]
+ (3,0)(4,1);
+\end{example}
+
+\DescribeMacro{bounding box}
+{{\color{blue1}\texttt{bounding box=}\textit{options...}}}
+
+This option specifies how to draw
+the bounding box given by the |x| and |y| options.
+It may take either a single value (generally a color name),
+or several values grouped in braces.
+\begin{example}
+\lattice[bounding box=green,x=-5:5,y=0:2](3,0)(1,1);
+\end{example}
+
+\DescribeMacro{each point}
+{{\color{blue1}\texttt{each point/.code n args=\{5\}\{}%
+\textit{code...}\texttt{\}}}}
+
+This option contains contains the code to execute for each
+lattice point. This code is called with the five following parameters:
+\begin{itemize}
+\item (|#1|) the parsed lattice node options,
+\item (|#2|,|#3|) the $(x,y)$ coordinates of the current lattice point
+(as \textsf{TikZ} canvas coordinates);
+\item (|#4|,|#5|) the coordinates of the same point
+relative to the provided lattice basis (as integers).
+\end{itemize}
+Note that, due to this parameter being expanded inside a macro, all the
+|#| signs must be doubled in its definition, as in the following example.
+\begin{example}
+\lattice[x=-5:5,y=0:2,each point/.code n args=
+ {5}{\node[##1,fill=cyan!10] at (##2,##3){(##4,##5)};}]
+ (3,0)(1,1);
+\end{example}
+
+
+\textbf{Other options}
+
+Any remaining options are directly passed to
+the |\node| calls for each lattice point.
+\begin{example}
+\lattice[red,rectangle,inner sep=2pt,x=-5:5,y=0:2]
+ (3,0)(1,1);
+\end{example}
+
+
+\subsection{Configuring default behaviour}
+
+\DescribeMacro{x}
+\DescribeMacro{y}
+\DescribeMacro{grid}
+\DescribeMacro{bounding box}
+\DescribeMacro{each point}
+The |/lattice/x|, |/lattice/y|, |/lattice/grid|, |/lattice/bounding box|,
+|/lattice/each point| PGF keys contain
+the default parameters for the correspondingly-named options.
+Note that the |#| signs must \emph{not} be doubled in |/lattice/each point|.
+\begin{example}
+\pgfqkeys{/lattice}{x=-5:5,y=-.1:2.1,
+ grid={blue!10,very thick},
+ bounding box={red,fill=gray!5},
+ each point/.code n args={5}{%
+ \node[#1,fill=cyan!10,rectangle] at (#2,#3)
+ {\tiny (#4,#5)};}}
+\lattice[grid,bounding box](3,0)(1,1);
+\end{example}
+
+\DescribeMacro{node}
+The |/lattice/node| key contains the default parameters for the |\node|
+call for each point.
+Equivalently, these are the default options passed to each |\lattice| call.
+\begin{example}
+\pgfkeys{/lattice/node={fill=yellow!25,draw=red}}
+\lattice[x=-5:5,y=0:2](3,0)(1,1);
+\end{example}
+
+\subsection{Exactness and limitations}
+
+This command only outputs lattices containing the origin.
+An offset lattice may still be obtained by using
+the PGF transformation mechanism
+and correspondingly adjusting the |x|,|y| bounding box parameters:
+\begin{example}
+\begin{scope}\pgftransformshift{\pgfpoint{1cm}{0}}
+\lattice[x=-3:1,red,rectangle](2,0)(1,1);
+\end{scope}
+\lattice(2,0)(1,1);
+\end{example}
+
+
+This command might be executed a large number of times in a single
+document, for example in the case of a \textsf{beamer} presentation
+with a large number of overlays.
+This means that we need to be careful to make it efficient.
+
+Therefore, all computations are performed using \TeX\ registers.
+Since these registers only implement 32-bit integer arithmetic,
+we use fixed-point arithmetic with 16-bit offset for numeric computations
+(which include matrix inversion).
+This implies some precision loss and enforces some numeric limits.
+The use of fixed-point arithmetic means that
+the products appearing in the determinant of the lattice
+must not exceed $2^{15}$.
+In particular, this package should work
+as long as all the coordinates (in absolute value) do not exceed~$128$,
+which should cover most typical scales of \textsf{TikZ} pictures.
+
+We compensate for the precision loss by sampling a bit too many
+lattice points (relative to the required bounding box)
+and then filtering \emph{a posteriori} to ensure that all points
+are in the bounding box.
+This last step should remain exact, at least as soon as
+the coordinates of the lattice vectors are integers
+(or integer multiples of $2^{-8}$).
+
+Therefore, we expect that in most cases, the command will exactly output
+the lattice points inside the bounding box.
+If this were to fail, however, as a last-resort option,
+enlarging the bounding box by a small number in all directions
+should ensure that all lattice points appear.
+
+%\iffalse
+%</doc>
+%\fi
+% \section{Implementation}
+%
+% \paragraph{Initialization.}
+% We obviously depend on~\textsf{tikz}
+% (and more precisely on~\textsf{pgfkeys}).
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{euclidean-lattice}[2024-07-26 Euclidean~lattices 1.0]
+\RequirePackage{tikz}
+% \end{macrocode}
+% We use fixed-point arithmetic in the 31-bit registers supported by
+% \TeX, using 16 bits for offset.
+%
+% TODO: we could slightly enhance the precision of computations by
+% correctly rounding the last bit (instead of truncating).
+% Depending on the value's sign,
+% |\advance XXX by .5\la@unit| should do the trick.
+%
+% This means that we represent a real number~$x$
+% using the integer $f(x) = B x$, where $B = 2^{16}$.
+% To multiply two such integers, we note that
+% $f(xy) = B x y = f(x) f(y)/B$,
+% which we compute as $(f(x)/\beta) \cdot (f(y)/\beta)$,
+% where $\beta = \sqrt{B} = 2^{8}$.
+% We store this value in the register |\la@unit|.
+% \begin{macrocode}
+\newdimen\la@unit \la@unit=256sp
+\def\lattice@mul#1#2{% writes #1*#2 in #1
+ \@tempdimc=#2 \divide\@tempdimc\la@unit
+ \divide #1\la@unit
+ \multiply #1\@tempdimc}%
+% \end{macrocode}
+% We perform division using
+% $f(x/y) = B x/y = B f(x)/f(y)$,
+% which we compute as $\frac{\beta f(x)}{f(y)/\beta}$.
+% \begin{macrocode}
+\def\lattice@div#1#2{%
+ \@tempdimc=#2\divide\@tempdimc\la@unit
+ \multiply #1\la@unit \divide#1\@tempdimc}%
+\def\lattice@invert#1{% writes 1/#1 in #1
+ \@tempdimc=#1 \divide\@tempdimc\la@unit
+ #1=256\p@ \divide #1\@tempdimc}%
+% \end{macrocode}
+% The next macro is our main enumeration routine.
+% It enumerates all the point in the lattice~$\Lambda$ generated
+% by the vectors $(a=|#1|,b=|#2|)$ and $(c=|#3|,d=|#4|)$
+% inside the box~$R$ delimited by the registers
+% $[|\la@Ax|,|\la@Bx|] \times [|\la@Ay|,|\la@By|]$.
+% On each such point, it invokes the macro
+% |\lattice@donode|.
+%
+% Since $\Lambda = B \cdot \mathbb{Z}^2$,
+% instead of enumerating $S = \Lambda \cap R$
+% we enumerate $B^{-1} S = \mathbb{Z}^2 \cap (B^{-1} R)$.
+% We use $(x,y)$ coordinates to describe elements of~$S$
+% and $(w,z)$ coordinates to describes elements of~$B^{-1} S$.
+%
+% We declare several numeric registers, all prefixed with |\la@|:
+% \begin{itemize}
+% \item $(a,b)$ and $(c,d)$ are the vectors of the lattice basis~$B$;
+% \item $R := [Ax, Bx] \times [Ay, By]$ is the bounding box for the drawing;
+% \item $U := (Ux, Uy)$ and $V := (Vx, Vy)$ are the side vectors
+% of the parallelogram $P := B^{-1} \cdot R$,
+% and~$C := (Cx, Cy)$~is its center;
+% \item $sM < sL$ are the slopes of the vectors $U$ and~$V$;
+% \item $wA, wB, wM$ are the horizontal parameters for enumerating
+% the parallelogram;
+% \item $zA, zB, zC$ are the vertical parameters for enumerating the
+% parallelogram;
+% \item $D$ plays a double role, first as the (inverse) determinant of
+% the lattice, and then as a vertical enumeration parameter.
+% \end{itemize}
+% \begin{macrocode}
+\newdimen\la@a \newdimen\la@b \newdimen\la@c \newdimen\la@d
+\newdimen\la@Ax\newdimen\la@Bx\newdimen\la@Ay\newdimen\la@By
+\newdimen\la@D
+\newdimen\la@Ux\newdimen\la@Uy \newdimen\la@Vx\newdimen\la@Vy
+\newdimen\la@Cx\newdimen\la@Cy
+
+\newdimen\la@sL \newdimen\la@sM
+\newdimen\la@zA \newdimen\la@zB \newdimen\la@zC
+\newdimen\la@wA \newdimen\la@wB
+\newcount\la@wM
+% \end{macrocode}
+% \begin{macrocode}
+\def\lattice@enumerate#1#2#3#4{%
+ \la@a=#1\p@ \la@b=#2\p@ \la@c=#3\p@ \la@d=#4\p@
+% \end{macrocode}
+% First we store the \textrm{inverse} of the determinant in |\la@D|.
+% \begin{macrocode}
+ \la@D=\la@a \lattice@mul\la@D\la@d
+ \@tempdima=\la@b \lattice@mul\@tempdima\la@c
+ \advance\la@D -\@tempdima
+ \lattice@invert\la@D
+% \end{macrocode}
+% Compute the inverse image $B^{-1} R = P$.
+% We first compute the sides $U$, $V$ of the parallelogram,
+% multiplying by $-1$ if needed so that both $w$-coordinates are
+% $\geqslant 0$.
+% \begin{macrocode}
+ \la@Ux=\la@Ax \advance\la@Ux-\la@Bx
+ \lattice@mul\la@Ux \la@D
+ \la@Uy=-\la@Ux
+ \lattice@mul\la@Ux \la@d \ifdim\la@Ux <\z@
+ \multiply\la@Ux -1 \multiply\la@Uy -1 \fi
+ \lattice@mul\la@Uy\la@b
+ \la@Vx=\la@By \advance\la@Vx-\la@Ay \lattice@mul\la@Vx\la@D
+ \la@Vy=-\la@Vx
+ \lattice@mul\la@Vx\la@c \ifdim\la@Vx<\z@
+ \multiply\la@Vx -1 \multiply\la@Vy -1\fi
+ \lattice@mul\la@Vy \la@a
+% \end{macrocode}
+% We ensure that $\det(U,V) > 0$, swapping both vectors if needed.
+% Since we only need the sign of this determinant, we scale down the
+% values to help prevent a numeric overflow.
+% \begin{macrocode}
+ \@tempdima \la@Ux
+ \@tempdimb \la@Vx
+ \ifdim\@tempdima<100\p@\else
+ \ifdim\@tempdimb<100\p@\else
+ \divide\@tempdima 1024
+ \divide\@tempdimb 1024\fi\fi
+ \lattice@mul\@tempdima\la@Vy
+ \lattice@mul\@tempdimb\la@Uy
+ \ifdim \@tempdimb>\@tempdima
+ \@tempdimc=\la@Ux \la@Ux=\la@Vx \la@Vx=\@tempdimc
+ \@tempdimc=\la@Uy \la@Uy=\la@Vy \la@Vy=\@tempdimc
+ \fi
+% \end{macrocode}
+% Compute the center of the parallelogram.
+% Note that we also use |\la@sL|, |\la@sM| (not yet needed)
+% as temporaries here.
+% \begin{macrocode}
+ \la@sL=\la@Ax \advance\la@sL\la@Bx \divide\la@sL 2
+ \la@sM=\la@Ay \advance\la@sM\la@By \divide\la@sM 2
+ \la@Cx=\la@sL \lattice@mul\la@Cx\la@d
+ \@tempdima=\la@sM \lattice@mul\@tempdima\la@c
+ \advance\la@Cx -\@tempdima
+ \la@Cy=\la@sM \lattice@mul\la@Cy\la@a
+ \@tempdima=\la@sL \lattice@mul\@tempdima\la@b
+ \advance\la@Cy -\@tempdima
+ \lattice@mul \la@Cx\la@D
+ \lattice@mul \la@Cy\la@D
+% \end{macrocode}
+% Compute the bounding-box in $(w,z)$ space.
+% Note that the |\la@wA|,|\la@wB| values will be re-used below
+% for enumerating all lattice points;
+% on the other hand, |\la@zA| and |\la@zB| are used here
+% as temporary values.
+% \begin{macrocode}
+ \@tempdima\la@Ux \advance\@tempdima\la@Vx
+ \la@wA=\la@Cx \advance\la@wA -.5\@tempdima
+ \la@wB=\la@wA \advance\la@wB \@tempdima
+ \@tempdima\la@Uy \ifdim\@tempdima<\z@ \multiply\@tempdima -1\fi
+ \ifdim\la@Vy<\z@ \advance\@tempdima -\la@Vy
+ \else\advance\@tempdima\la@Vy\fi
+ \la@zA=\la@Cy \advance\la@zA -.5\@tempdima
+ \la@zB=\la@zA \advance\la@zB \@tempdima
+% \end{macrocode}
+% Draw the grid if the options require it.
+% \begin{macrocode}
+ \ifx\lattice@grid\@empty\else \begin{scope}%
+ \clip (\strip@pt\la@Ax,\strip@pt\la@Ay)
+ rectangle (\strip@pt\la@Bx,\strip@pt\la@By);
+ \pgftransformcm{\strip@pt\la@a}{\strip@pt\la@b}%
+ {\strip@pt\la@c}{\strip@pt\la@d}{\pgfpointorigin}%
+ \expandafter\draw\expandafter[\lattice@grid]
+ (\strip@pt\la@wA,\strip@pt\la@zA) grid (\strip@pt\la@wB,\strip@pt\la@zB);
+ \end{scope}\fi
+% \end{macrocode}
+% Compute the last values required to enumerate over $\mathbb{Z}^2 \cap P$.
+% We represent the parallelogram~$P$ as the intersection of four half-planes.
+% Let $A_1=(w_1,z_1)$ and $A_2=(w_2,z_2)$ be
+% the left-most and right-most vertices of~$P$,
+% and $\lambda, \mu$ be the slopes of the sides
+% (the condition $\det(U,V) > 0$ guarantees that $\lambda < \mu$).
+%
+% The two sides originating from~$A_i (i=1,2)$ have equations
+% \[ z=z_i+\lambda(w-w_i), \qquad z=z_i+\mu(w-w_i); \]
+% By defining $z_3 = z_2 - \lambda (w_2 - w_1)$ and $z_4=z_2-\mu(w_2-w_1)$,
+% we may rewrite both equations from~$A_2$ as:
+% \[ z= z_3 + \mu(w-w_1),
+% \qquad z = z_4 + \lambda(w-w_1) \]
+% The parallelogram~$P$ is then defined by the following inequations,
+% where we write $t = w - w_1$:
+% \[ \max(z_3+\mu t, z_1+\lambda t) \;\leqslant\; z \;\leqslant\;
+% \min(z_1+\mu t, z_4+\lambda t). \]
+% For any given value of~$w$ we store the value of these four affine
+% functions in the variables |\la@zB|, |\la@zA|, |\la@D| (not a typo),
+% |\la@zC|, in this order.
+% When increasing the value of~$w$ we only need to increase the values
+% of these four registers respectively by $\mu$, $\lambda$, $\mu$,
+% $\lambda$.
+%
+% First we compute the values $z_2 = z_C + \frac 12(z_U+z_V)$
+% and~$w_2 - w_1 = w_U + w_V$.
+% \begin{macrocode}
+ \@tempdima=\la@Uy \advance\@tempdima\la@Vy
+ \@tempdimb=\la@Cy \advance\@tempdimb .5\@tempdima % z2
+ \@tempdima=\la@Ux \advance\@tempdima\la@Vx % w_2-w_1 = w(U+V)
+% \end{macrocode}
+% Then we compute the slopes $\lambda = |\la@sL|$ and $\mu = |\la@sM|$.
+% A Special case happens when either $w_U$ or $w_V$ is zero.
+% In the first case, $\lambda = -\infty$.
+% This means that the comparisons with |\la@zA| and |\la@zC| must be
+% ignored.
+% \begin{macrocode}
+ \ifdim\la@Ux=\z@
+ \la@sL=\z@ \la@zC=\maxdimen \la@zA=-\maxdimen
+ \else
+ \la@sL=\la@Uy \lattice@div\la@sL\la@Ux
+ \la@zC=-\@tempdima \lattice@mul\la@zC\la@sL \advance\la@zC \@tempdimb
+ \la@zA=\@tempdimb \advance\la@zA -\la@Uy \advance\la@zA -\la@Vy
+ \fi
+% \end{macrocode}
+% Likewise, if $w_V = 0$ then $\mu = +\infty$
+% and the comparisons with |\la@zB| and |\la@D| are ignored.
+% \begin{macrocode}
+ \ifdim\la@Vx=\z@
+ \la@sM=\z@ \la@zB=-\maxdimen \la@D=\maxdimen
+ \else
+ \la@sM=\la@Vy \lattice@div\la@sM\la@Vx
+ \la@zB=-\@tempdima \lattice@mul\la@zB\la@sM \advance\la@zB \@tempdimb
+ \la@D=\@tempdimb \advance\la@D -\la@Uy \advance\la@D -\la@Vy
+ \fi
+% \end{macrocode}
+%
+% At this point the enumerator for $B^{-1} S$ is fully computed;
+% it uses the registers |\la@sL|, |\la@sM| for the slopes,
+% |\la@wA|, |\la@wB| for the boundaries,
+% |\la@zA|, |\la@zB|, |\la@zC|, |\la@D| for the four affine functions,
+% as well as the original matrix~$B$ in |\la@a|, |\la@b|, |\la@c|, |\la@d|
+% (to recompute the points of~$\Lambda$).
+%
+% We re-use the freed registers in the following way:
+% \begin{itemize}
+% \item $(|\la@Vx|,|\la@Vy|)$ hold the $(w,z)$ coordinates
+% of the current lattice point (stored as integers);
+% \item $(|\la@Ux|,|\la@Uy|)$ hold the corresponding point
+% in $(x,y)$ space (stored as \textsf{dimen}s);
+% \item $(|\la@Cx|,|\la@Cy|)$ hold the $(x,y)$ coordinates
+% of the $(w,0)$ point, which is used for each column.
+% \end{itemize}
+%
+% Because the fixed-point arithmetic is imprecise, we might miss some
+% lattice points on the boundaries. We compensate for this by enlarging
+% the bounds ($-1$ for lower bounds, $+1$ for upper bounds)
+% and \emph{a posteriori} checking that all the computed points
+% are in the bounding box.
+%
+% Store in |\la@Vx| our starting $(w,z)$ coordinate,
+% which is the integer $\lceil|\la@wA|\rceil -1$.
+% Since \TeX\ knows only \emph{signed} division (groumpf),
+% computing the ceiling is sign-dependent.
+% \begin{macrocode}
+ \la@Vx=\la@wA \advance\la@Vx\expandafter\ifdim\la@Vx>\z@ -1sp\else-\p@\fi
+ \divide\la@Vx \p@
+% \end{macrocode}
+% Compute the upper boundary $|\la@wB|=\lfloor|\la@wB|\rfloor+1$.
+% \begin{macrocode}
+ \ifdim\la@wB<\z@ \advance\la@wB 1sp\else\advance\la@wB\p@\fi
+ \divide\la@wB\p@
+% \end{macrocode}
+% Compute the difference $t = \lceil w_1\rceil-w_1$
+% and correspondingly advance the four affine functions.
+% \begin{macrocode}
+ \@tempdima=\la@Vx \multiply\@tempdima\p@
+ \advance\@tempdima -\la@wA
+ \@tempdimb=\@tempdima \lattice@mul\@tempdimb\la@sL
+ \advance\la@zA\@tempdimb \advance\la@zC\@tempdimb
+ \@tempdimb=\@tempdima \lattice@mul\@tempdimb\la@sM
+ \advance\la@zB\@tempdimb \advance\la@D\@tempdimb
+% \end{macrocode}
+% Store in |\la@Cx|, |\la@Cy| the $(x,y)$ coordinates of the
+% lattice vector $w \cdot (a,b)$:
+% \begin{macrocode}
+ \la@Cx=\la@a \multiply\la@Cx\la@Vx
+ \la@Cy=\la@b \multiply\la@Cy\la@Vx
+% \end{macrocode}
+% The main $w$-loop starts here.
+% \begin{macrocode}
+ \loop
+% \end{macrocode}
+% Compute the range of $z=|\la@Vy|$ for this value of $w=|\la@Vx|$.
+% The minimum value is $\max(|\la@zA|,|\la@zB|)-1$:
+% \begin{macrocode}
+ \la@Vy=\la@zA \ifdim\la@Vy<\la@zB \la@Vy=\la@zB\fi
+ \advance\la@Vy\expandafter\ifdim\la@Vy>\z@ -1sp\else-\p@\fi
+ \divide\la@Vy\p@
+% \end{macrocode}
+% The maximum value is $|\la@wM|=\min(|\la@zC|,|\la@D|)$:
+% \begin{macrocode}
+ \la@wM=\la@zC \ifnum\la@wM>\la@D \la@wM=\la@D\fi
+ \advance\la@wM\expandafter\ifnum\la@wM<\z@\@ne\else\p@\fi
+ \divide\la@wM\p@
+% \end{macrocode}
+% Compute the $(|\la@Ux|,|\la@Uy|)$ point in $(x,y)$ space:
+% \begin{macrocode}
+ \la@Ux=\la@c \multiply\la@Ux\la@Vy \advance\la@Ux\la@Cx
+ \la@Uy=\la@d \multiply\la@Uy\la@Vy \advance\la@Uy\la@Cy
+% \end{macrocode}
+% Inner ($z$) loop. Nested loops require grouping.
+% \begin{macrocode}
+ {\loop
+% \end{macrocode}
+% If the point is inside the bounding box, we invoke |\lattice@donode|.
+% Note the use of |\expandafter| to ensure that the |\node| call inside
+% the PGF key |/lattice/each node| gets the expanded options list.
+% \begin{macrocode}
+ \ifdim\la@Ux<\la@Ax\else\ifdim\la@Ux>\la@Bx\else
+ \ifdim\la@Uy<\la@Ay\else\ifdim\la@Uy>\la@By\else
+ \expandafter\lattice@donode\expandafter{\lattice@node}%
+ \fi\fi\fi\fi
+% \end{macrocode}
+% End of the $z$ loop. We increase $z$ and correspondingly advance the vector.
+% \begin{macrocode}
+ \ifnum\la@Vy<\la@wM
+ \advance\la@Vy 1sp
+ \advance\la@Ux\la@c \advance\la@Uy\la@d
+ \repeat}
+% \end{macrocode}
+% End of the $w$ loop. We increase $w$ and correspondingly advance
+% the $w\cdot (a,b)$ vector as well as the four affine functions.
+% \begin{macrocode}
+ \ifnum\la@Vx<\la@wB
+ \advance\la@Vx 1sp
+ \advance\la@Cx\la@a \advance\la@Cy\la@b
+ \advance\la@zA \la@sL \advance\la@zC \la@sL
+ \advance\la@zB \la@sM \advance\la@D \la@sM
+ \repeat
+}
+% \end{macrocode}
+% This macro gets called for each found lattice point.
+% Its main job is to ensure that the node options (here |#1|)
+% are correctly expanded.
+% \begin{macrocode}
+\def\lattice@donode#1{%
+ \pgfkeys{/lattice/arg/each point={#1}{\strip@pt\la@Ux}{\strip@pt\la@Uy}%
+ {\number\la@Vx}{\number\la@Vy}}}
+
+% \end{macrocode}
+% The PGF keys used for parsing the arguments of the |\lattice| command;
+% they correspond to the options passed in square brackets.
+% \begin{macrocode}
+\pgfqkeys{/lattice/arg}{
+ x/.store in=\lattice@x,
+ y/.store in=\lattice@y,
+ grid/.store in=\lattice@grid,
+ each point/.code n args={5}{\pgfkeys{/lattice/each point={#1}{#2}{#3}{#4}{#5}}},
+ bounding box/.store in=\lattice@bbox,
+ .unknown/.code={%
+ \expandafter\lattice@setnode\pgfkeyscurrentkey=#1\lattice@eov
+ }}
+% \end{macrocode}
+% The PGF keys used for user configuration of the default values.
+% \begin{macrocode}
+\pgfqkeys{/lattice}{
+ x/.initial=-2:2,y/.initial=-2:2,
+ node/.initial={circle,inner sep=1pt,draw=none,fill=black},
+ grid/.style={/lattice/arg/grid/.default={#1}},
+ grid={gray,very thin},
+ bounding box/.style={/lattice/arg/bounding box/.default={#1}},
+ bounding box={cyan,thin},
+ each point/.code n args={5}{\node[#1] at (#2,#3){};},
+}
+% \end{macrocode}
+% This handles the passing of any unknown |\lattice| keys
+% down to the |\node| calls.
+% \begin{macrocode}
+\def\lattice@setnode/lattice/arg/#1\lattice@eov{%
+ \edef\lattice@node{\expandafter\noexpand\lattice@node,#1}}
+% \end{macrocode}
+% This macro parses the bounding-box |x| and |y| coordinates,
+% replacing |x=10| by |x=-10:10|.
+% The |detokenize| trick was nicely provided by David Carlisle:
+% |https://tex.stackexchange.com/questions/724989/|.
+% \begin{macrocode}
+\def\lattice@getxy#1#2#3{%
+ \def\m@gic##1:##2:##3\end{\ifx ##3: #2=##1\p@ #3=##2\p@\else
+ #2=-##1\p@ #3=##1\p@\fi}%
+ \expandafter\m@gic\detokenize{#1:}:\end
+}
+% \end{macrocode}
+% The following macros parse the possible combinations of overlays
+% and square-bracket options.
+% They are similar to the way |\tikz@command@path| is defined
+% in |tikz.code.tex|.
+% Just as in that case, the overlay is handled by a |\alt| call,
+% which will fail if \textsf{beamer} is not loaded.
+% \begin{macrocode}
+\def\lattice{\@ifnextchar<\lattice@I{\@ifnextchar[\lattice@II{\lattice@@[]}}}
+\def\lattice@I{\ifnum\the\catcode`\;=\active\relax
+ \let\lattice@next\lattice@Iactive\else
+ \let\lattice@next\lattice@Inormal\fi
+ \lattice@next}
+\long\def\lattice@Inormal<#1>#2;{\alt<#1>{\lattice@I@#2;}{}}
+{\catcode`\;=\active
+ \long\gdef\lattice@Iactive<#1>#2;{\alt<#1>{\lattice@I@#2;}{}}
+}
+\def\lattice@I@{\@ifnextchar[\lattice@@{\lattice@@[]}}
+\def\lattice@II[#1]{\@ifnextchar<{\lattice@IIi[#1]}{\lattice@@[#1]}}
+\def\lattice@IIi[#1]<#2>{\lattice@I<#2>[#1]}
+% \end{macrocode}
+% This macros parses the basis vectors and calls the main loop.
+% |#4| and |#7| are dummy parameters swallowing a possible space between
+% the parentheses and the final semicolon.
+% \begin{macrocode}
+\def\lattice@@[#1](#2,#3)#4(#5,#6)#7{
+ \let\lattice@grid\@empty%
+ \let\lattice@bbox\@empty%
+ \edef\lattice@x{\pgfkeysvalueof{/lattice/x}}%
+ \edef\lattice@y{\pgfkeysvalueof{/lattice/y}}%
+ \edef\lattice@node{\pgfkeysvalueof{/lattice/node}}%
+ \pgfqkeys{/lattice/arg}{#1}%
+% \end{macrocode}
+% Read the bounding-box coordinates from the |x| and |y| keys:
+% \begin{macrocode}
+ \expandafter\lattice@getxy\expandafter{\lattice@x}\la@Ax\la@Bx
+ \expandafter\lattice@getxy\expandafter{\lattice@y}\la@Ay\la@By
+% \end{macrocode}
+% Draw the bounding-box if it was required by the options.
+% \begin{macrocode}
+ \ifx\lattice@bbox\@empty\else
+ \expandafter\draw\expandafter[\lattice@bbox]
+ (\strip@pt\la@Ax,\strip@pt\la@Ay)
+ rectangle (\strip@pt\la@Bx,\strip@pt\la@By);
+ \fi
+% \end{macrocode}
+% Call the main loop.
+% \begin{macrocode}
+ \lattice@enumerate{#2}{#3}{#5}{#6}%
+}
+% \end{macrocode}
+%
+% \Finale
+\endinput
diff --git a/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice.ins b/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice.ins
new file mode 100644
index 0000000000..d34ef1970a
--- /dev/null
+++ b/graphics/pgf/contrib/euclidean-lattice/euclidean-lattice.ins
@@ -0,0 +1,23 @@
+%%
+%% Copyright (C) 2024 Jerome Plut
+%%
+%% 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
+%% 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 Jerome Plut.
+%%
+%% This work consists of the files `euclidean-lattice.ins`
+%% and `euclidean-lattice.dtx`,
+%% as well as the derived file `euclidean-lattice.sty`.
+
+\input docstrip.tex
+\keepsilent
+\generate{\file{euclidean-lattice.sty}{\from{euclidean-lattice.dtx}{package}}}
+\endbatchfile
diff --git a/graphics/pgf/contrib/fancyqr/README.md b/graphics/pgf/contrib/fancyqr/README.md
index 63432f93e0..ea4ab04b69 100644
--- a/graphics/pgf/contrib/fancyqr/README.md
+++ b/graphics/pgf/contrib/fancyqr/README.md
@@ -5,30 +5,37 @@
[<img src="https://github.com/EagleoutIce/fancyqr/blob/gh-pages/preview-1.png?raw=true" width="600"/>](qr-example.tex)
A simple package to create fancy qr-codes with the help of the [`qrcode`][qrcode]-package.
-You may use `\fancyqr` just like the normal `\qrcode` (`\fancyqr[<qr-options>]{<url>}`). See the [documentation](https://media.githubusercontent.com/media/EagleoutIce/fancyqr/gh-pages/build/fancyqr-doc.pdf).
+You may use `\fancyqr` just like the normal `\qrcode` (`\fancyqr[<qr-options>]{<url>}`). See the [documentation](https://media.githubusercontent.com/media/EagleoutIce/fancyqr/gh-pages/build/fancyqr-doc.pdf). If you just want to create a simple qr-code, please refer to the [minimal example](qr-minimal.tex).
*fancyqr* is actively developed by *Florian Sihler* (contact me at: <florian.sihler@uni-ulm.de>) under the [GPLv3 License](LICENSE). I am very happy about every contribution (see [CONTRIBUTING.md](CONTRIBUTING.md)). You can find it on CTAN (<https://www.ctan.org/pkg/fancyqr>).
-If you do want to hide a center square (e.g., because you want to embed an image), you can use `\FancyQrDoNotPrintSquare{<x>}{<y>}` to hide a rectangle with radius x and y set from the center. If you choose this option, the default `\FancyQrRoundCut` that rounds cut corners can be changed with `\FancyQrHardCut`.
+If you do want to hide a center square (e.g., because you want to embed an image), you can use `\FancyQrDoNotPrintSquare{<x>}{<y>}` to hide a rectangle with radius x and y set from the center (with `\FancyQrDoNotPrintRadius{<factor>}` you can apply a [rounding](https://github.com/EagleoutIce/fancyqr/pull/41) to this!). If you choose this option, the default `\FancyQrRoundCut` that rounds cut corners can be changed with `\FancyQrHardCut`.
At the moment, there are six other styles (`flat`, `frame`, `blobs`, `glitch`, and `dots`) that you can load (locally) by using `\FancyQrLoad{<name>}`. The default style is named `default` and can be 'reset' by `\FancyQrLoad{default}` or `\FancyQrLoadDefault`.
There are the following extra qr-options (you can set all of them with `\fancyqrset{<keys>}`):
-| Option | Type | Default | Explanation |
-| ----------------- | ------- | :------: | ---------------------------------------------------------- |
-| `image` | LaTeX | | Automatically center an image.[^1] |
-| `image padding` | number | | Additionally hide blocks (x & y) around the image. |
-| `image x padding` | number | `0` | Additionally hide blocks (x) around the image. |
-| `image y padding` | number | `0` | Additionally hide blocks (y) around the image. |
-| `gradient` | boolean | true | Toggle the color gradient |
-| `color` | color | | Disables the `gradient` and sets the qr color accordingly. |
-| `l color` | color | `purple` | Set the top left gradient color. |
-| `left color` | color | | Alias for `l color`. |
-| `r color` | color | `teal` | Set the bottom right gradient color. |
-| `right color` | color | | Alias for `r color`. |
-| `gradient angle` | angle | `135` | Change the gradient angle. |
-| `random color` | colors | | Allow to set a random color pool to pick from. |
-| `width` | length | | Alias for [`qrcode`'s][qrcode] `height` option. |
-| `size` | length | | Alias for [`qrcode`'s][qrcode] `height` option. |
+
+| Option | Type | Default | Explanation |
+| ----------------- | ----------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------ |
+| `classic` | boolean | `false` | Use the classic qr-code style (black with flat rectangles, this loads the `flat` style). |
+| `color` | color | | Disables the `gradient` and sets the qr color accordingly. |
+| `compensate` | length | `0.15pt` | Compensating overlap to add to avoid glitches. |
+| `gradient angle` | angle | `135` | Change the gradient angle. |
+| `gradient` | boolean | true | Toggle the color gradient |
+| `image` | LaTeX | | Automatically center an image (you have to care for the size and maybe adjust the `version` and `level` to keep the qr-code readable).[^1] |
+| `image padding` | number | | Additionally hide blocks (x & y) around the image. |
+| `image x padding` | number | `0` | Additionally hide blocks (x) around the image. |
+| `image y padding` | number | `0` | Additionally hide blocks (y) around the image. |
+| `l color` | color | `purple` | Set the top left gradient color. |
+| `left color` | color | | Alias for `l color`. |
+| `level` | L/M/Q/H | `M` | [`qrcode`][qrcode] option affecting error correction (low, medium, quartile, high). |
+| `padding` | flag | | [`qrcode`][qrcode] option adding sufficient additional space around the qr-code. |
+| `r color` | color | `teal` | Set the bottom right gradient color. |
+| `random color` | colors | | Allow to set a random color pool to pick from. |
+| `right color` | color | | Alias for `r color`. |
+| `size` | length | | Alias for [`qrcode`'s][qrcode] `height` option. |
+| `tight` | flag | | [`qrcode`][qrcode] option adding no additional space around the qr-code. |
+| `version` | [0..40] ∈ ℕ | `0` | [`qrcode`][qrcode] option affecting the size (tries to be as small as possible). |
+| `width` | length | | Alias for [`qrcode`'s][qrcode] `height` option. |
The defaults are set like this:
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-doc.pdf b/graphics/pgf/contrib/fancyqr/fancyqr-doc.pdf
index c96c62abbc..f716affdf9 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-doc.pdf
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-doc.tex b/graphics/pgf/contrib/fancyqr/fancyqr-doc.tex
index 1f3b00ba2d..9e099d9f02 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-doc.tex
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-doc.tex
@@ -18,6 +18,7 @@
\usepackage{fancyqr}
\usepackage{xcolor}
\usepackage[tex]{listings}
+\usepackage{amssymb}
\lstdefinelanguage{ltx}{
language={[LaTeX]TeX},
@@ -34,17 +35,16 @@
\texorpdfstring{Florian Sihler\medskip\\*
\fancyqr{https://github.com/EagleoutIce/fancyqr}
}{Florian Sihler}}
-\date{Version v2.0 \textendash{} 2024/04/13}
-
+\date{Version v2.2 \textendash{} 2024/11/27}
\begin{document}
\maketitle
- \texttt{fancyqr} is a simple package to create fancy qr codes with the help of the \textit{\href{https://www.ctan.org/pkg/qrcode}{qrcode}}-package.
+ \texttt{fancyqr} is a simple package to create fancy qr-codes with the help of the \textit{\href{https://www.ctan.org/pkg/qrcode}{qrcode}}-package.
You can use the |\fancyqr|-macro just like the normal |\qrcode|.\footnote{\ltx{\\fancyqr[<qr-options>]\{<url>\}}}
- If you do want to hide a center square (e.g, because you want to embed an image) you can use |\FancyQrDoNotPrintSquare{<x>}{<y>}| to hide a rectangle with radius x and y set from the center. If you choose this option, the default |\FancyQrRoundCut| that rounds cut corners can be changed with |\FancyQrHardCut|.
+ If you do want to hide a center square (e.g, because you want to embed an image) you can use |\FancyQrDoNotPrintSquare{<x>}{<y>}| to hide a rectangle with radius x and y set from the center (with |\FancyQrDoNotPrintRadius{<factor>}| you can apply a \href{https://github.com/EagleoutIce/fancyqr/pull/41}{rounding} to this!). If you choose this option, the default |\FancyQrRoundCut| that rounds cut corners can be changed with |\FancyQrHardCut|.
At the moment, there are six other styles for the qr-code |flat|, |frame|, |blobs|, |glitch|, and |dots|, that you can load (locally) by using |\FancyQrLoad{<name>}|. The default style is named |default| and can be 'reset' by |\FancyQrLoad{default}| or |\FancyQrLoadDefault|.
All of the extra qr-options (you can set all of them with |\fancyqrset{<keys>}|) are showcased in \autoref{tbl:extra-keys}.
@@ -66,20 +66,26 @@
\toprule
\multicolumn{1}{l}{Option} & Type & \multicolumn{1}{c}{Default} & Explanation \\
\midrule
- image & \LaTeX & & Automatically center an image.\footnote{The package will automatically calculate the required \ltx{\\FancyQrDoNotPrintSquare} (you have to make sure that the qr code still has enough information to be readable). Therefore, the image will not scale with the qr code.} \\
+ classic & boolean & false & Use the classic qr-code style (black with flat rectangles, this loads the |flat| style). \\
+ color & color & & Disables the |gradient| and sets the color accordingly. \\
+ compensate & length & 0.15pt & Compensating overlap to add to avoid glitches. \\
+ gradient & boolean & true & Toggle the color gradient \\
+ gradient angle & angle & 135 & Change the gradient angle. \\
+ image & \LaTeX & & Automatically center an image (you have to care for the size and maybe adjust the |version| and |level| to keep the qr-code readable).\footnote{The package will automatically calculate the required \ltx{\\FancyQrDoNotPrintSquare} (you have to make sure that the qr-code still has enough information to be readable). Therefore, the image will not scale with the qr-code.} \\
image padding & number & & Additionally hide blocks (x \& y) around the image. \\
image x padding & number & 0 & Additionally hide blocks (x) around the image. \\
image y padding & number & 0 & Additionally hide blocks (y) around the image. \\
- gradient & boolean & true & Toggle the color gradient \\
- color & color & & Disables the |gradient| and sets the color accordingly. \\
l color & color & purple & Set the top left gradient color. \\
left color & color & & Alias for |l color|. \\
+ level & L/M/Q/H & M & |qrcode| option affecting error correction (low, medium, quartile, high). \\
+ padding & flag & & |qrcode| option adding sufficient additional space around the qr-code. \\
r color & color & teal & Set the bottom right gradient color. \\
- right color & color & & Alias for |r color|. \\
- gradient angle & angle & 135 & Change the gradient angle. \\
random color & colors & & Allow to set a random color pool to pick from. \\
- width & length & & Alias for |qrcode|'s |height| option. \\
+ right color & color & & Alias for |r color|. \\
size & length & & Alias for |qrcode|'s |height| option. \\
+ tight & flag & & |qrcode| option adding no additional space around the qr-code. \\
+ version & \([0..40] \in \mathbb{N}\) & 0 & |qrcode| option affecting the size (tries to be as small as possible). \\
+ width & length & & Alias for |qrcode|'s |height| option. \\
\bottomrule
\end{tabular}
\caption{Overview of special qr-options.}
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code b/graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code
index bfc7e776ec..9746c52376 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-style-blobs.code
@@ -3,11 +3,11 @@
\@tempcnta=\z@
\roundjoin
\roundcap
-\moveto(0,0)
+\moveto(.5,.5)
\loop
\advance\@tempcnta by 30
-\edef\rad{\fpeval{.2*\qr@modulesize+.115*\qr@modulesize*abs(rand())}}% fixed rand for both
-\lineto(\fpeval{cos(\@tempcnta)*\rad},\fpeval{sin(\@tempcnta)*\rad})
+\edef\rad{\fpeval{.1*\qr@modulesize+.13*\qr@modulesize*abs(rand())}}% fixed rand for both
+\lineto(\fpeval{cos(\@tempcnta)*\rad+.5},\fpeval{sin(\@tempcnta)*\rad+.5})
\ifnum\@tempcnta<360\relax
\repeat
\fillpath
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code b/graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code
index f7fd55e139..ced7e7a720 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-style-dots.code
@@ -1,4 +1,4 @@
-\def\fancyqr@dots@circle{\put(.5,.5){\circle*{\@ne}}}
+\def\fancyqr@dots@circle{\put(.5,.5){\circle*{\@ne}}}%
% .
\newpattern0000{\fancyqr@dots@circle}%
% | | - -
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-style-flat.code b/graphics/pgf/contrib/fancyqr/fancyqr-style-flat.code
index 023dd3d4a4..649f27d1bc 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr-style-flat.code
+++ b/graphics/pgf/contrib/fancyqr/fancyqr-style-flat.code
@@ -1,3 +1,4 @@
+\FancyQrHardCut%
\def\fancyqr@flat@rect{\moveto(0,0)\lineto(0,1)\lineto(1,1)\lineto(1,0)\lineto(0,0)\fillpath}
% .
\newpattern0000{\fancyqr@flat@rect}%
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr-style-swift.code b/graphics/pgf/contrib/fancyqr/fancyqr-style-swift.code
deleted file mode 100644
index 529213f04f..0000000000
--- a/graphics/pgf/contrib/fancyqr/fancyqr-style-swift.code
+++ /dev/null
@@ -1,2 +0,0 @@
-\PackageWarning{fancyqr}{Currently, swift is not supported :/}
-\FancyQrLoadDefault \ No newline at end of file
diff --git a/graphics/pgf/contrib/fancyqr/fancyqr.sty b/graphics/pgf/contrib/fancyqr/fancyqr.sty
index bb2b9f3ebb..88a4dc9dae 100644
--- a/graphics/pgf/contrib/fancyqr/fancyqr.sty
+++ b/graphics/pgf/contrib/fancyqr/fancyqr.sty
@@ -2,7 +2,7 @@
% Licensed under GNU General Public License version 3
% https://opensource.org/licenses/gpl-3.0.html
\def\filename{fancyqr}
-\ProvidesPackage{\filename}[2024/04/13 version v2.0 Fancy QR-Codes]
+\ProvidesPackage{\filename}[2024/11/27 version v2.2 Fancy QR-Codes]
\RequirePackage{pict2e, xfp, qrcode}
% element
@@ -32,18 +32,21 @@
\def\GetPattern{%
\ifcsname qcc\@up\@left\@right\@down\endcsname
\csname qcc\@up\@left\@right\@down\endcsname
-\else\rule\qr@modulesize\z@\fi}
+\fi}
% backwards compatibility
\def\fancyqr@clap#1{\hb@xt@\z@{\hss#1\hss}}
-\newdimen\fancyqr@edge@compensate
-\fancyqr@edge@compensate=.15\p@
+\newdimen\fancyqr@edge@compensate \fancyqr@edge@compensate=.15\p@
% is larger to be compensated by overlaps
\def\qrm{\dimexpr\qr@modulesize+\fancyqr@edge@compensate\relax}
\long\def\qr@newpattern#1#2#3#4#5{%
-\expandafter\def\csname qcc#1#2#3#4\endcsname{\parbox[b][\qr@modulesize]\qr@modulesize{\kern-\fancyqr@edge@compensate\relax\smash{\fancyqr@clap{\picture(\@ne,\@ne)#5\endpicture}}}%
-}}
+\expandafter\def\csname qcc#1#2#3#4\endcsname{% scaling happens implicitly by the unitlength
+ \put(\the\j,\the\numexpr\@max@y-\the\i){%
+ \advance\unitlength by\fancyqr@edge@compensate\relax
+ #5%
+ }}%
+}
% [#3][#2]
% [#4][#1]
@@ -97,11 +100,13 @@
\def\@fancy@qr@default@name{default}
\def\FancyQrLoad#1{%
+\protected@edef\fancyqr@loaded@style{#1}%
\def\fancyqr@rounded@rect@close{\fillpath}%
-\let\@tmp\newpattern\let\newpattern\qr@newpattern\@bsphack\def\@@tmp{#1}\ifx\@@tmp\@fancy@qr@default@name\FancyQrLoadDefault\else
+\let\@tmp\newpattern\let\newpattern\qr@newpattern\@bsphack\def\@@tmp{#1}%
+\ifx\@@tmp\@fancy@qr@default@name\FancyQrLoadDefault\else
\expandafter\edef\csname pingu@lib@#1@atcode\endcsname{\the\catcode`\@}%
\catcode`\@=11\relax
-\input{fancyqr-style-#1.code}
+\input{fancyqr-style-#1.code}%
\catcode`\@=\csname pingu@lib@#1@atcode\endcsname
\fi\@esphack\let\newpattern\@tmp\let\@tmp\relax}
@@ -116,12 +121,30 @@
\else\qr@white@format\fi
}%
-\def\FancyQrDoNotPrintSquare#1#2{\def\fancy@qr@donotprint@center@x{#1}\def\fancy@qr@donotprint@center@y{#2}}
+% #1 width
+% #2 height
+\def\FancyQrDoNotPrintSquare#1#2{%
+ \def\fancy@qr@donotprint@center@x{#1}%
+ \def\fancy@qr@donotprint@center@y{#2}%
+}
\FancyQrDoNotPrintSquare00
+% is a factor between 0 and 1
+\def\FancyQrDoNotPrintRadius#1{%
+ \def\fancy@qr@donotprint@center@r{#1}%
+}
+\FancyQrDoNotPrintRadius0
\newif\iffancy@qr@do@print@
\def\qr@fancy@updateif#1#2{\fancy@qr@do@print@true
-\ifnum#1>\@do@y@min\relax \ifnum#1<\@do@y@max\relax \ifnum#2>\@do@x@min\relax \ifnum#2<\@do@x@max\relax \fancy@qr@do@print@false \fi\fi\fi\fi}
+\ifdim\fancy@qr@donotprint@center@r\p@>\z@
+ \ifnum#1>\@do@y@min\relax \ifnum#1<\@do@y@max\relax \ifnum#2>\@do@x@min\relax \ifnum#2<\@do@x@max\relax
+ \ifdim\fpeval{sqrt((#1-\@half@max@y)^2 + (#2-\@half@max@x)^2)}\p@<\@max@rcrad\p@
+ \fancy@qr@do@print@false
+ \fi
+ \fi\fi\fi\fi
+\else
+\ifnum#1>\@do@y@min\relax \ifnum#1<\@do@y@max\relax \ifnum#2>\@do@x@min\relax \ifnum#2<\@do@x@max\relax \fancy@qr@do@print@false \fi\fi\fi\fi\fi
+}
\newif\iffancy@qr@roundcut@
\fancy@qr@roundcut@true
@@ -142,60 +165,67 @@
\newif\if@fancyqr@image@
+\def\qr@white{0}\def\qr@black{1}%
\def\fancy@qr@printmatrix#1{%
- \def\qr@white{0}\def\qr@black{1}%
\protected@edef\fancyqr@currprint{#1}%
- \let\qr@black@fixed\qr@black
- \let\qr@white@fixed\qr@white
- \let\qr@black@format\qr@black
- \let\qr@white@format\qr@white
+ \let\qr@black@fixed\qr@black \let\qr@white@fixed\qr@white
+ \let\qr@black@format\qr@black \let\qr@white@format\qr@white
%Set module size
- \qr@modulesize=\qr@desiredheight
+ \qr@modulesize=\qr@desiredheight\relax
\divide\qr@modulesize by \qr@size\relax
- \unitlength=\dimexpr\qr@modulesize+\fancyqr@edge@compensate\relax % initialize unitlength once
+ \unitlength=\dimexpr\qr@modulesize\relax % will be re-set in placement
\if@fancyqr@image@% image is in \fancyqr@imgbox
\edef\@x{\fpeval{ceil((.5\wd\fancyqr@imgbox)/\qr@modulesize)+\fancyqr@img@padding@x}}%
\edef\@y{\fpeval{ceil((.5\ht\fancyqr@imgbox+.5\dp\fancyqr@imgbox)/\qr@modulesize)+\fancyqr@img@padding@y}}%
\FancyQrDoNotPrintSquare\@x\@y
\fi
\qr@minipagewidth=\qr@desiredheight
- \ifqr@tight \advance\qr@minipagewidth by -\qr@modulesize \else \advance\qr@minipagewidth by 7\qr@modulesize \fi
- \minipage\qr@minipagewidth%
- \hfuzz=\qr@modulesize
- \baselineskip=\qr@modulesize
- \lineskiplimit=\z@ \lineskip=\z@ \parskip=\z@
- \ifqr@tight\else\rule\z@{4\qr@modulesize}\par\fi% %Blank space at top.
+ \ifqr@tight\else \advance\qr@minipagewidth by 8\qr@modulesize\relax \fi
+ \begingroup
\edef\@max@x{\qr@numberofrowsinmatrix\fancyqr@currprint}\edef\@half@max@x{\the\numexpr\@max@x/2}%
\edef\@max@y{\qr@numberofcolsinmatrix\fancyqr@currprint}\edef\@half@max@y{\the\numexpr\@max@y/2}%
+ % redefine the border to be white!
+ \qr@for \i=\@ne to \@max@y by \@ne{%
+ % redefine the limits to be white!
+ \qr@storetomatrix\fancyqr@currprint{\the\numexpr\z@}{\the\i}{\qr@white}%
+ \qr@storetomatrix\fancyqr@currprint{\the\numexpr\@max@x+\@ne}{\the\i}{\qr@white}%
+ }%
+ \qr@for \i=\@ne to \@max@x by \@ne{%
+ \qr@storetomatrix\fancyqr@currprint{\the\i}{\the\numexpr\z@}{\qr@white}%
+ \qr@storetomatrix\fancyqr@currprint{\the\i}{\the\numexpr\@max@y+\@ne}{\qr@white}%
+ }%
\edef\@do@x@min{\the\numexpr\@half@max@x-\fancy@qr@donotprint@center@x-\@ne}%
\edef\@do@x@max{\the\numexpr\@half@max@x+\fancy@qr@donotprint@center@x+\@ne}%
\edef\@do@y@min{\the\numexpr\@half@max@y-\fancy@qr@donotprint@center@y-\@ne}%
\edef\@do@y@max{\the\numexpr\@half@max@y+\fancy@qr@donotprint@center@y+\@ne}%
- \qr@for \i=\@ne to \@max@y by \@ne{%
- \ifqr@tight\else\rule{4\qr@modulesize}\z@\fi% %Blank space at left.
- \qr@for \j=\@ne to \@max@x by \@ne{%
+ \edef\@max@rcrad{\fpeval{max((\@ne-\fancy@qr@donotprint@center@r)*\fancy@qr@donotprint@center@x,(\@ne-\fancy@qr@donotprint@center@r)*\fancy@qr@donotprint@center@y)+\fancyqr@edge@compensate}}%
+ \edef\@tmp@tight{\ifqr@tight\z@\else-4\fi}%
+ \picture(\qr@minipagewidth,\qr@minipagewidth)(\the\numexpr\@ne+\@tmp@tight,\@tmp@tight)
+ \qr@for \i=\@ne to \@max@y by \@ne{\qr@for \j=\@ne to \@max@x by \@ne{%
\qr@fancy@updateif\i\j
\iffancy@qr@do@print@
- \edef\@mid{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\j}}%
- \ifnum\@mid=\qr@white
- \rule\qr@modulesize\z@
- \else% if not white, get its pattern
- \iffancy@qr@roundcut@\qr@fancy@clear@surround\fancyqr@currprint{\the\i}{\the\j}\fi
- \edef\@up{\qr@matrixentry\fancyqr@currprint{\the\numexpr\the\i-1}{\the\j}}%
- \edef\@left{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\numexpr\the\j-1}}%
- \edef\@right{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\numexpr\the\j+1}}%
- \edef\@down{\qr@matrixentry\fancyqr@currprint{\the\numexpr\the\i+1}{\the\j}}%
- \FancyQrColor{\GetPattern}%
- \fi\else \rule\qr@modulesize\z@\fi
- }\par}%
- \ifqr@tight\else\rule\z@{4\qr@modulesize}\par\fi
- \endminipage
- \if@fancyqr@image@\nobreak
- \llap{\parbox\qr@minipagewidth{\centering\usebox\fancyqr@imgbox}%
- % if half the width is odd, offset by half a module width, done by centering
- \edef\@halfcheck{\fpeval{round(\fancy@qr@donotprint@center@x/2)}}%
- \ifodd\@halfcheck \kern.5\qr@modulesize\fi
- }\fi
+ \edef\@mid{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\j}}%
+ \ifnum\@mid=\qr@black\relax
+ \iffancy@qr@roundcut@\qr@fancy@clear@surround\fancyqr@currprint{\the\i}{\the\j}\fi
+ \edef\@up{\qr@matrixentry\fancyqr@currprint{\the\numexpr\the\i-\@ne}{\the\j}}%
+ \edef\@left{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\numexpr\the\j-\@ne}}%
+ \edef\@right{\qr@matrixentry\fancyqr@currprint{\the\i}{\the\numexpr\the\j+\@ne}}%
+ \edef\@down{\qr@matrixentry\fancyqr@currprint{\the\numexpr\the\i+\@ne}{\the\j}}%
+ \FancyQrColor{\GetPattern}%
+ \fi\fi
+ }}%
+ \if@fancyqr@image@
+ % floating point mid
+ \put(\fpeval{.5*\@max@x+.5},\fpeval{.5*\@max@y}){%
+ \edef\@halfcheck{\fpeval{round(\fancy@qr@donotprint@center@x/2)}}%
+ \raisebox{-.5\height}{\clap{% TODO: remove this offset
+ \ifodd\@halfcheck \else\kern\qr@modulesize\fi
+ \usebox\fancyqr@imgbox
+ }}%
+ }%
+ \fi
+ \endpicture
+ \endgroup
}%
\def\fancy@qr@setup#1{%
@@ -263,6 +293,16 @@
\define@key{fancyqr}{random color}{\@fancyqr@randomcolor@true\def\@fancyqr@random@colors{#1}}
\define@key{fancyqr}{width}{\setkeys{qr}{height=#1}}
\define@key{fancyqr}{size}{\setkeys{qr}{height=#1}}
+\define@key{fancyqr}{compensate}{\setlength\fancyqr@edge@compensate{#1}}
+% \fancyqr@loaded@style
+\def\fancyqr@flat@style{flat}
+\define@boolkey{fancyqr}[@fancyqr@]{classic}[true]{} % if@fancyqr@classic
+\def\fancyqr@classic{%
+\ifx\fancyqr@loaded@style\fancyqr@flat@style\else\FancyQrLoad{\fancyqr@flat@style}\fi
+\setkeys{fancyqr}{%
+ gradient=false,color=black,l color=black,r color=black,compensate=\z@\relax
+}%
+}
\def\fancyqrset#1{\setkeys{qr,fancyqr}{#1}}
\fancyqrset{image padding=0,gradient=true,gradient angle=135,r color=teal,l color=purple}
@@ -275,12 +315,10 @@
\newcommand\@@fancyqr[1][]{\begingroup\@fancyqr@init
\ifqr@starinvoked\qr@hyperlinkfalse\fi
\setkeys{qr,fancyqr}{#1}%
+\if@fancyqr@classic\fancyqr@classic\fi%
\if@fancyqr@randomcolor@%
\ifcsname pgfmathdeclarerandomlist\endcsname\else
\PackageError{fancyqr}{Random colors requested but pgfmath not loaded}{Please load pgfmath if you want this}\fi
\pgfmathdeclarerandomlist{@@fancyqr@@randomcol}{\@fancyqr@random@colors}\let\FancyQrColor\@@fancyqr@color@random\else\if@fancyqr@gradient\let\FancyQrColor\@@fancyqr@color@gradient\fi\fi
\bgroup\qr@verbatimcatcodes\qr@setescapedspecials\qrcode@in}
\endinput
-
-% TODO: NEGATIVE PATTERNS IF MIDDLE IS 0
-% => make rounded negative corners
diff --git a/graphics/pgf/contrib/fancyqr/qr-example.tex b/graphics/pgf/contrib/fancyqr/qr-example.tex
index e0518297eb..fe32ae73c9 100644
--- a/graphics/pgf/contrib/fancyqr/qr-example.tex
+++ b/graphics/pgf/contrib/fancyqr/qr-example.tex
@@ -3,6 +3,7 @@
% https://opensource.org/licenses/gpl-3.0.html
\documentclass{article}
+\usepackage[T1]{fontenc}
\usepackage{fontawesome}
\usepackage{fancyqr}
@@ -13,13 +14,18 @@
% to showcase scalebox
\usepackage{graphicx}
+% for the coding font
+\usepackage{FiraMono}
+
\usepackage[active,tightpage]{preview} % for presentation
\setlength\PreviewBorder{15pt}
-\fancyqrset{size=3.25cm,level=H,padding}
+\fancyqrset{size=3.25cm, level=H, padding}
+\errorcontextlines=9999
\begin{document}
\preview
+\begin{center}
% \FancyQrDoNotPrintSquare{8}{9}
% \FancyQrHardCut
\mbox{\FancyQrLoad{blobs}%
@@ -28,6 +34,8 @@
\fancyqr{https://github.com/EagleoutIce/fancyqr}%
\FancyQrLoad{dots}%
\fancyqr[image={\textsf{\textbf{\textcolor{gray}{fancy}qr}}}, random color={@Red}{@Pink}{@Purple}{@DeepPurple}{@Indigo}{@Blue}{@Cyan}{@Teal}{@Green}{@Amber}{@Orange}{@DeepOrange}{@Brown}]{https://github.com/EagleoutIce/fancyqr}%
-}%
+}\\[4mm]
+\texttt{\textbackslash \textbf{fancyqr}\{\textcolor{@Grey}{https://github.com/EagleoutIce/fancyqr}\}}
+\end{center}
\endpreview
\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/fancyqr/qr-minimal.tex b/graphics/pgf/contrib/fancyqr/qr-minimal.tex
new file mode 100644
index 0000000000..b912709808
--- /dev/null
+++ b/graphics/pgf/contrib/fancyqr/qr-minimal.tex
@@ -0,0 +1,12 @@
+\documentclass{article}
+
+\usepackage{fancyqr}
+
+\usepackage[active,tightpage]{preview}
+\setlength\PreviewBorder{0pt}
+
+\begin{document}
+\preview
+\fancyqr[classic,padding]{https://github.com/EagleoutIce/fancyqr}
+\endpreview
+\end{document}
diff --git a/graphics/pgf/contrib/lie-hasse/README b/graphics/pgf/contrib/lie-hasse/README
index e63a82cc60..01eef69fb8 100644
--- a/graphics/pgf/contrib/lie-hasse/README
+++ b/graphics/pgf/contrib/lie-hasse/README
@@ -2,9 +2,9 @@ ___________________________________
Lie Hasse
- v1.0
+ v1.02
- 3 February 2020
+ 4 December 2024
___________________________________
Authors : Ben McKay
diff --git a/graphics/pgf/contrib/lie-hasse/lie-hasse.pdf b/graphics/pgf/contrib/lie-hasse/lie-hasse.pdf
index 5be5791e7f..ca9f2ffbe8 100644
--- a/graphics/pgf/contrib/lie-hasse/lie-hasse.pdf
+++ b/graphics/pgf/contrib/lie-hasse/lie-hasse.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/lie-hasse/lie-hasse.sty b/graphics/pgf/contrib/lie-hasse/lie-hasse.sty
index d1050d8839..7e74fa73ca 100644
--- a/graphics/pgf/contrib/lie-hasse/lie-hasse.sty
+++ b/graphics/pgf/contrib/lie-hasse/lie-hasse.sty
@@ -1,24 +1,20 @@
-% The Lie Hasse package.
+% The Lie Hasse package.
+% Version 1.02
%
-% Version 1.0
%
+% This package draws Hasse diagrams of root system posets of simple
+% Lie algebraS, in LaTeX documents, using the TikZ package.
%
-% This package draws Hasse diagrams of root system posets of simple
-% Lie algebraS, in LaTeX documents, using the TikZ package.
+% Benjamin McKay
+% b.mckay@ucc.ie
%
-% Benjamin McKay
-% b.mckay@ucc.ie
-%
-% Released under the LaTeX Project Public License v1.3c or later, see
+% Released under the LaTeX Project Public License v1.3c or later, see
% http://www.latex-project.org/lppl.txt
-%
-%
-%
-%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{lie-hasse}[2020/02/02 Lie Hasse]
+\ProvidesPackage{lie-hasse}[2024/12/04 Lie Hasse]
\RequirePackage[rgb]{xcolor}
\RequirePackage{dynkin-diagrams}
+\RequirePackage[outline]{contour}
\usetikzlibrary{
positioning,
fadings,
@@ -26,7 +22,7 @@
%%%
%%% Application programming interface:
%%%
-
+\NewDocumentCommand\edgeQuote{m}{\contour{white}{\(#1\)}}
\newif\iflie@hasse@threeD
\lie@hasse@threeDtrue
\xdef\lie@hasse@three@D@shift{.3}%
@@ -40,14 +36,27 @@
\lie@hasse@show@heightfalse
\newif\iflie@hasse@attach@dynkin@diagram
\lie@hasse@attach@dynkin@diagramfalse
-
+\newif\iflie@hasse@show@levi
+\lie@hasse@show@levitrue
+\newif\iflie@hasse@show@unipotent@radical
+\lie@hasse@show@unipotent@radicaltrue
\pgfkeys{
/Lie Hasse diagram/.is family,
/Lie Hasse diagram,
- attach Dynkin diagram/.is if = lie@hasse@attach@dynkin@diagram,
+ attach Dynkin diagram/.is if
+ = lie@hasse@attach@dynkin@diagram,
attach Dynkin diagram/.default = false,
- edge/.style={ultra thick},
- edge quotes/.style={/Dynkin diagram/text style,auto,inner sep=2pt},
+ edge/.style = {
+ ultra thick
+ },
+ edge length/.estore in
+ = \lie@hasse@edge@length,
+ edge length = 1cm,
+ edge quotes/.style={
+ /Dynkin diagram/text style,
+ auto,
+ inner sep=2pt
+ },
compact edge/.style={},
noncompact edge/.style={opacity=0},
compact root/.code={\dynkinDrawSolidRootMark{#1}},
@@ -67,7 +76,13 @@
show widths/.default = false,
show height/.is if = lie@hasse@show@height,
show height/.default = false,
- z shift/.estore in = \lie@hasse@three@D@shift,
+ show Levi/.is if = lie@hasse@show@levi,
+ show Levi/.default = true,
+ show unipotent radical/.is if
+ = lie@hasse@show@unipotent@radical,
+ show unipotent radical/.default = true,
+ z shift/.estore in
+ = \lie@hasse@three@D@shift,
z shift/.default = .3,
top/.style={black!20,opacity=.4},
left/.style={black!20,opacity=.9},
@@ -90,13 +105,17 @@
\dynkin@integer@rank%
}%
{%
- % Turn Satake codes into Dynkin diagram expressions in \dynkin@string.
+ % Turn Satake codes into Dynkin diagram
+ % expressions in \dynkin@string.
\dynkin@grok@Satake@codes%
}%
- % Expand out any digits in \dynkin@string into multiples of the various root marks.
+ % Expand out any digits in \dynkin@string
+ % into multiples of the various root marks.
\expand@Dynkin@Roots@Digits%
- % Assign to \dynkin@roots the input string \dynkin@string with all . symbols removed,
- % so we only get the symbols representing the marks for the various roots.
+ % Assign to \dynkin@roots the input string
+ % \dynkin@string with all . symbols removed,
+ % so we only get the symbols representing
+ % the marks for the various roots.
\StrDel{\dynkin@string}{.}[\temp]%
\xdef\dynkin@roots{\temp}%
\StrLen{\dynkin@roots}[\temp]%
@@ -115,58 +134,33 @@
{%
\pgfkeys{/Lie Hasse diagram/for all roots={#1}{#2}}%
}%
+\newif\iflie@hasse@B
+\newcount\dynkin@rank@plus@one%
\NewDocumentCommand\hasse{O{}mm}%
{%
\ifdefined\filldraw%
- \IfStrEq{#1}{}%
- {%
+ \ifx#1\empty\relax%
\studyHasseDiagramOfRootSystem{#2}{#3}%
- }%
- {%
+ \else%
\studyHasseDiagramOfRootSystem[#1]{#2}{#3}%
- }%
+ \fi%
\label@item@count 0\relax%
\expandafter\forcsvlist%
- \expandafter\add@label%
+ \expandafter\lie@hasse@add@label%
\expandafter{\dynkin@label@list}%
\ifnum\dynkin@rank=1%
\dynkin{A}{1}%
\else%
+ \global\dynkin@rank@plus@one\the\dynkin@rank\relax%
+ \global\advance\dynkin@rank@plus@one by 1\relax%
\add@compact@simple@roots@to@compact@roots{}%
\IfStrEqCase{#2}%
{%%
{A}{\hasse@A}%
- {B}{\hasse@BC}%
- {C}{\hasse@BC*}%
+ {B}{\global\lie@hasse@Btrue\hasse@BC}%
+ {C}{\global\lie@hasse@Bfalse\hasse@BC}%
{D}{\hasse@D}%
- {E}%
- {%
- \ifnum\dynkin@rank=6%
- \hasse@E@six%
- \else%
- \ifnum\dynkin@rank=7%
- \hasse@E@seven%
- \else%
- \ifnum\dynkin@rank=8%
- \hasse@E@eight%
- \else
- \ifnum\dynkin@rank>8%
- \ClassError%
- {Lie Hasse}%
- {Rank of E series Hasse diagram: #3{}%
- exceeds 8; not defined yet}%
- {}%
- \fi%
- \ifnum\dynkin@rank<6%
- \ClassError%
- {Lie Hasse}%
- {Rank of E series Hasse diagram: #3{} less than 6}%
- {}%
- \fi%
- \fi%
- \fi%
- \fi%
- }%
+ {E}{\hasse@E@series}%
{F}%
{%
\ifnum\dynkin@rank=4%
@@ -194,10 +188,11 @@
{Lie Hasse}%
{Lie algebra series #2{} not A,B,C,D,E,F or G}%
{}]%
+ \forAllPositiveRoots{\draw@lie@hasse@root}%
\draw@simple@root@labels%
\fi%
\lie@hasse@write@widths{}%
- \forAllPositiveRootsInHasseDiagram{\doRootThing}%
+ \forAllPositiveRoots{\doRootThing}%
\iflie@hasse@attach@dynkin@diagram%
\attachDynkin%
\fi%
@@ -205,13 +200,42 @@
\begin{tikzpicture}\hasse[#1]{#2}{#3}\end{tikzpicture}%
\fi%
}%
+\NewDocumentCommand\hasse@E@series{}%
+{%
+ \ifnum\dynkin@rank=6%
+ \hasse@E@six%
+ \else%
+ \ifnum\dynkin@rank=7%
+ \hasse@E@seven%
+ \else%
+ \ifnum\dynkin@rank=8%
+ \hasse@E@eight%
+ \else%
+ \ifnum\dynkin@rank>8%
+ \ClassError%
+ {Lie Hasse}%
+ {Rank of E series Hasse diagram: \the\dynkin@rank{}%
+ exceeds 8; not defined yet}%
+ {}%
+ \fi%
+ \ifnum\dynkin@rank<6%
+ \ClassError%
+ {Lie Hasse}%
+ {Rank of E series Hasse diagram: \the\dynkin@rank{}%
+ less than 6; not define yet}%
+ {}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+}%
\NewDocumentCommand\drawRootAsDynkinSum{mm}%
{%
\rootSum{#1}{#2}{\rs}%
\node at (#1;#2)
{%
\dynkin[%
- labels=\rs,%
+ expand labels=\rs,%
/Lie Hasse diagram/embedded Dynkin diagram]%
{\dynkin@series}{\the\dynkin@rank}%
};%
@@ -239,25 +263,57 @@
}%
\fi%
}%
-
-\NewDocumentCommand\backwardsGtwo{}%
-{%
- \dynkin[label,backwards,x shift in edge lengths=-1]{G}{\dynkin@roots}%
+%\NewDocumentCommand\hasseAttachGtwoBackwards{}%
+%{%
+% \dynkin[vertical shift=0,%
+% edge length=\lie@hasse@edge@length,%
+% reverse arrows]{G}{\dynkin@roots}%
+%}%
+%\NewDocumentCommand\hasseAttachGtwoForwards{}%
+%{%
+% \dynkin[vertical shift=0,%
+% edge length=\lie@hasse@edge@length]{G}{\dynkin@roots}%
+%}%
+\NewDocumentCommand\hasseAttachGtwo{}%
+{%
+ \dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]{G}{\dynkin@roots}%
+%\IfStrEqCase{\dynkin@ordering}{%
+% {Adams}{\hasseAttachGtwoForwards}%
+% {Bourbaki}{\hasseAttachGtwoForwards}%
+% {Carter}{\hasseAttachGtwoBackwards}%
+% {Dynkin}{\hasseAttachGtwoBackwards}%
+% {Kac}{\hasseAttachGtwoBackwards}%
+%}%
+%[\ClassError%
+% {Lie Hasse}%
+% {Root ordering \dynkin@ordering{} %
+% not Adams, Bourbaki, Carter, Dynkin or Kac when attaching G2 Dynkin diagram}%
+% {}]%
}%
-
\newcount\lie@hasse@E@shift%
\NewDocumentCommand\attachDynkin{}%
{%
\IfStrEqCase{\dynkin@series}{%
- {A}{\dynkin{A}{\dynkin@roots}}%
- {B}{\dynkin{B}{\dynkin@roots}}%
- {C}{\dynkin{C}{\dynkin@roots}}%
- {D}{\dynkin[y shift in edge lengths=-1.5,label]%
- {D}{\dynkin@roots}}%
+ {A}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]%
+ {A}{\dynkin@roots}}%
+ {B}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]%
+ {B}{\dynkin@roots}}%
+ {C}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]%
+ {C}{\dynkin@roots}}%
+ {D}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length,%
+ y shift in edge lengths=-1.5,label]%
+ {D}{\dynkin@roots}}%
{E}%
{%%
\ifnum\dynkin@rank=6%
\dynkin[%
+ vertical shift=0,%
+ edge length=\lie@hasse@edge@length,%
upsidedown,%
labels*={1,...,6},%
y shift in edge lengths=.5]%
@@ -266,6 +322,8 @@
\lie@hasse@E@shift\the\dynkin@rank\relax%
\advance\lie@hasse@E@shift by -2\relax%
\dynkin[%
+ vertical shift=0,%
+ edge length=\lie@hasse@edge@length,%
backwards,%
upsidedown,%
label,%
@@ -274,16 +332,17 @@
{E}{\dynkin@roots}%
\fi%
}%%
- {F}{\dynkin{F}{\dynkin@roots}}%
- {G}{\backwardsGtwo{}}%
+ {F}{\dynkin[vertical shift=0,%
+ edge length=\lie@hasse@edge@length]%
+ {F}{\dynkin@roots}}%
+ {G}{\hasseAttachGtwo}%
}%
[\ClassError%
{Lie Hasse}%
- {Lie algebra series \dynkin@series{} not A,B,C,D,E,F or G when attaching Dynkin diagram}%
+ {Lie algebra series \dynkin@series{} %
+ not A,B,C,D,E,F or G when attaching Dynkin diagram}%
{}]%
}%
-
-
\newif\iflie@hasse@multiple@diagrams
\newcommand\doHasseDiagram[1]%%
{%
@@ -291,8 +350,7 @@
\ %
\fi%
\begin{tikzpicture}%
- [show background rectangle,%
- baseline=(current bounding box.east)]]%
+ [show background rectangle,baseline=(current bounding box.east)]%
\hasse#1%
\iflie@hasse@show@height%
\rootSystemHeight{\lie@hasse@height}%
@@ -327,33 +385,26 @@
}%
\begin{center}%
\expandafter\forscsvlist%
- \expandafter\doHasseDiagram%
- \expandafter{#1}%
+ \expandafter\doHasseDiagram\expandafter{#1}%
\end{center}%
}%
-
-
%%%
%%% Package internals:
%%%
-
-
+\tikzset{/Dynkin diagram/ordering=Carter}
\pgfdeclarelayer{Dynkin middle}
\pgfdeclarelayer{Dynkin above}
\pgfsetlayers{background,Dynkin behind,Dynkin middle,Dynkin above,main}
-
-
\newcommand*\label@list@at[1]{\csname FOOBAR-#1\endcsname}
\newcommand*\defn@label@list@entry[1]{\expandafter\def\csname FOOBAR-#1\endcsname}
\def\add@to@label@list#1#2{\global\defn@label@list@entry{#1}{#2}}%
\newcount\label@item@count%
\label@item@count 0\relax%
-\newcommand\add@label[1]%
+\newcommand\lie@hasse@add@label[1]%
{%
- \advance\label@item@count by 1\relax%
+ \global\advance\label@item@count by 1\relax%
\global\add@to@label@list{\the\label@item@count}{#1}%
}%
-
\xdef\lie@hasse@compact@roots{}%
\NewDocumentCommand\if@compact@root{mmm}%
{%
@@ -369,9 +420,8 @@
\dynkinOrder{\dynkin@series}{\the\dynkin@rank}.Carter::#1->\dynkin@ordering.%
{\current@simple@root}%
\StrChar{\dynkin@roots}{\current@simple@root}[\lie@hasse@root@marker]%
-\IfStrEq{*}{\lie@hasse@root@marker}{#2}{#3}%
+\IfStrEq{x}{\lie@hasse@root@marker}{#3}{#2}%
}%
-
\NewDocumentCommand\add@compact@root{m}%
{%
\if@compact@root{#1}%
@@ -382,53 +432,65 @@
\xdef\lie@hasse@compact@roots{\temp@lie@hasse@compact@roots{ }(#1)}%
}%
}%
-
\newcount\lie@hasse@sr%
-\newcount\drpo%
\NewDocumentCommand\add@compact@simple@roots@to@compact@roots{}%
{%
-\lie@hasse@sr 1\relax%
-\drpo\the\dynkin@rank\relax%
-\advance\drpo by 1\relax%
-\loop%
- \if@compact@simple@root{\the\lie@hasse@sr}%
- {%%
- \add@compact@root{1;\the\lie@hasse@sr}%
- }%%
- {%%
- }%%
- \advance\lie@hasse@sr by 1\relax%
-\ifnum\lie@hasse@sr<\the\drpo%
-\repeat%
+ \lie@hasse@sr 1\relax%
+ \loop%
+ \if@compact@simple@root{\the\lie@hasse@sr}%
+ {%%
+ \add@compact@root{1;\the\lie@hasse@sr}%
+ }%%
+ {%%
+ }%%
+ \advance\lie@hasse@sr by 1\relax%
+ \ifnum\lie@hasse@sr<\the\dynkin@rank@plus@one%
+ \repeat%
}%
-
-\newcount\drmo%
\newcount\lie@hasse@root@count%
\newcount\lie@hasse@root@count@b%
\newcount\max@lie@hasse@root@count%
\newcount\lie@hasse@reorder
-
\NewDocumentCommand\lie@hasse@fix@order{mm}%
{%
\dynkinOrder{\dynkin@series}{\dynkin@rank}.Carter::{#1}->\dynkin@ordering.{#2}%
}%
-
\NewDocumentCommand\draw@one@simple@root@label{mm}%
%% \draw@one@simple@root@label{r}{s}, draw at Carter number r
%% the root with text s.
{%
- \node[below,%
- label=%
- {%
- [below,%
- lie@hasse@color,%
- /Lie Hasse diagram/edge quotes]%
- \(\pgfkeys{/Dynkin diagram/label macro=#2}\)%
- }%
- ]%
- at%
- (1;#1)%
- {};%
+ \if@compact@simple@root{#1}%
+ {%
+ \iflie@hasse@show@levi%
+ \global\lie@hasse@ok@roottrue%
+ \else%
+ \global\lie@hasse@ok@rootfalse%
+ \fi%
+ }%
+ {%
+ \iflie@hasse@show@unipotent@radical%
+ \global\lie@hasse@ok@roottrue%
+ \else%
+ \global\lie@hasse@ok@rootfalse%
+ \fi%
+ }%
+ \iflie@hasse@ok@root%
+ \node[%
+ below,%
+ label=%
+ {%
+ [%
+ below,%
+ lie@hasse@color,%
+ /Lie Hasse diagram/edge quotes%
+ ]%
+ \(\pgfkeys{/Dynkin diagram/label macro={\edgeQuote{#2}}}\)%
+ }%
+ ]%
+ at%
+ (1;#1)%
+ {};%
+ \fi%
}%
\NewDocumentCommand\draw@simple@root@labels{}%
{%
@@ -471,27 +533,56 @@
\pgfmathsetmacro{\lie@hasse@huenum}{#1/\the\dynkin@rank}%
\global\definecolor{lie@hasse@color}{hsb}{\lie@hasse@huenum,1,.6}%
}%
-\NewDocumentCommand\draw@lie@hasse@root{m}%
+\NewDocumentCommand\draw@lie@hasse@root{mm}%
{%
-\if@compact@root{#1}%
-{%%
-\pgfkeys{/Lie Hasse diagram/compact root=#1}%
-}%%
-{%%
-\pgfkeys{/Lie Hasse diagram/noncompact root=#1}%
-}%%
+ \if@compact@root{#1;#2}%
+ {%%
+ \iflie@hasse@show@levi%
+ \pgfkeys{/Lie Hasse diagram/compact root={#1;#2}}%
+ \fi%
+ }%%
+ {%%
+ \iflie@hasse@show@unipotent@radical%
+ \pgfkeys{/Lie Hasse diagram/noncompact root={#1;#2}}%
+ \fi%
+ }%%
}%
-\xdef\lie@hasse@grade@a{}
-\xdef\lie@hasse@grade@b{}
-\xdef\lie@hasse@index@a{}
-\xdef\lie@hasse@index@b{}
\newcount\root@gpo%
\xdef\label@text{}%
+\newif\iflie@hasse@is@levi
+\newif\iflie@hasse@ok@root
\NewDocumentCommand\draw@lie@hasse@edge{O{}mmmm}%
%[edge label options]{from grade}{from index}{to index}{simple root}
{%
\root@gpo #2\relax%
\advance\root@gpo by 1\relax%
+ \if@compact@root{#2;#3}%
+ {%
+ \if@compact@simple@root{#5}%
+ {%
+ \global\lie@hasse@is@levitrue%
+ \add@compact@root{\the\root@gpo;#4}%
+ }%
+ {%
+ \global\lie@hasse@is@levifalse%
+ }%
+ }%
+ {%
+ \global\lie@hasse@is@levifalse%
+ }%
+ \iflie@hasse@is@levi%
+ \iflie@hasse@show@levi%
+ \global\lie@hasse@ok@roottrue%
+ \else%
+ \global\lie@hasse@ok@rootfalse%
+ \fi%
+ \else%
+ \iflie@hasse@show@unipotent@radical%
+ \global\lie@hasse@ok@roottrue%
+ \else%
+ \global\lie@hasse@ok@rootfalse%
+ \fi%
+ \fi%
\set@lie@hasse@color{#5}%
\lie@hasse@fix@order{#5}{\lie@hasse@root@count@b}%
\IfStrEq{\dynkin@label@list}{}%
@@ -505,31 +596,33 @@
}%
}%
\if@compact@simple@root{#5}%
- {%%% Compact
- \draw[%
- lie@hasse@color,%
- /Lie Hasse diagram/edge,%
- /Lie Hasse diagram/compact edge]%
- (#2;#3) --%
- node[lie@hasse@color,/Lie Hasse diagram/edge quotes,#1]%
- {\(\pgfkeys{/Dynkin diagram/label macro=\label@text}\)}%
- (\the\root@gpo;#4);%
- \IfSubStr{\lie@hasse@compact@roots}{#2;#3}%
- {%% adding to a compact
- \add@compact@root{\the\root@gpo;#4}%
- }%%
- {%%
- }%%
+ {%%% Compact simple root, i.e. edge
+ \iflie@hasse@ok@root%
+ \draw[%
+ lie@hasse@color,%
+ /Lie Hasse diagram/edge,%
+ /Lie Hasse diagram/compact edge]%
+ (#2;#3)--%
+ node[lie@hasse@color,/Lie Hasse diagram/edge quotes,#1]%
+ {\(\pgfkeys{/Dynkin diagram/label macro={\edgeQuote{\label@text}}}\)}%
+ (\the\root@gpo;#4);%
+ \fi%
+ \iflie@hasse@is@levi%
+ \fi%
}%%%
{%%% Noncompact
- \draw[%
- lie@hasse@color,%
- /Lie Hasse diagram/edge,%
- /Lie Hasse diagram/noncompact edge]%
- (#2;#3) --%
+ \iflie@hasse@ok@root%
+ \draw
+ [%
+ lie@hasse@color,%
+ /Lie Hasse diagram/edge,%
+ /Lie Hasse diagram/noncompact edge%
+ ]%
+ (#2;#3)--%
node[lie@hasse@color,/Lie Hasse diagram/edge quotes,#1]%
- {\(\pgfkeys{/Dynkin diagram/label macro=\label@text}\)}%
+ {\(\pgfkeys{/Dynkin diagram/label macro={\edgeQuote{\label@text}}}\)}%
(\the\root@gpo;#4);%
+ \fi%
}%%%
}%
\newcount\A@series@grade%
@@ -555,8 +648,8 @@
\coordinate
(\the\A@series@grade;\the\A@series@j)
at
- ({.5*\the\A@series@x*\dynkin@edge@length},
- {.25*\the\A@series@y*\dynkin@edge@length})
+ ({.5*\the\A@series@x*\lie@hasse@edge@length},
+ {.25*\the\A@series@y*\lie@hasse@edge@length})
{};%
\advance\A@series@j by 1\relax%
\advance\A@series@x by 2\relax%
@@ -569,59 +662,35 @@
\ifnum\A@series@grade<\the\max@A@series@grade%
\repeat%
}%
-\newcount\A@series@grade%
-\newcount\max@A@series@grade%
-\NewDocumentCommand\draw@A@roots{}%
-{%
- \A@series@grade 1\relax%
- \max@A@series@grade \the\dynkin@rank\relax%
- \advance\max@A@series@grade by 1\relax%
- \loop%
- \max@A@series@j\the\dynkin@rank\relax%
- \advance\max@A@series@j by -\the\A@series@grade\relax%
- \advance\max@A@series@j by 2\relax%
- \A@series@j 1\relax%
- {%
- \loop%
- \draw@lie@hasse@root%
- {\the\A@series@grade;\the\A@series@j}%
- \advance\A@series@j by 1\relax%
- \ifnum\A@series@j<\the\max@A@series@j%
- \repeat%
- }%
- \advance\A@series@grade by 1\relax%
- \ifnum\A@series@grade<\the\max@A@series@grade%
- \repeat%
-}%
\newcount\maxA@i%
\newcount\maxA@j%
\newcount\A@lbl%
-\newcount\A@i%
-\newcount\A@j%
-\newcount\A@ipo%
+\newcount\lie@hasse@i%
+\newcount\lie@hasse@j%
+\newcount\lie@hasse@ipo%
\newcount\A@rj%
\newcount\A@rjmo%
\NewDocumentCommand\draw@A@edges{}%
{%
\maxA@i\the\dynkin@rank\relax%
- \A@i 1\relax%
+ \lie@hasse@i 1\relax%
\loop%
\maxA@j \the\dynkin@rank\relax%
- \advance\maxA@j by -\the\A@i\relax%
+ \advance\maxA@j by -\the\lie@hasse@i\relax%
\advance\maxA@j by 1\relax%
\ifnum\maxA@j>-1%
- \A@j 1\relax%
+ \lie@hasse@j 1\relax%
{%
\loop%
- \A@lbl\the\A@i\relax%
- \advance\A@lbl by \the\A@j\relax%
- \A@ipo \A@i\relax%
- \advance\A@ipo by 1\relax%
+ \A@lbl\the\lie@hasse@i\relax%
+ \advance\A@lbl by \the\lie@hasse@j\relax%
+ \lie@hasse@ipo \lie@hasse@i\relax%
+ \advance\lie@hasse@ipo by 1\relax%
\draw@lie@hasse@edge[left]%
- {\the\A@i}{\the\A@j}%
- {\the\A@j}{\the\A@lbl}%
+ {\the\lie@hasse@i}{\the\lie@hasse@j}%
+ {\the\lie@hasse@j}{\the\A@lbl}%
\A@rj\the\maxA@j\relax%
- \advance\A@rj by -\the\A@j\relax%
+ \advance\A@rj by -\the\lie@hasse@j\relax%
\advance\A@rj by 1\relax%
\A@rjmo\the\A@rj\relax%
\advance\A@rjmo by -1\relax%
@@ -629,15 +698,15 @@
\advance\A@lbl by \the\dynkin@rank%
\advance\A@lbl by 1%
\draw@lie@hasse@edge[right]%
- {\the\A@i}{\the\A@rj}%
+ {\the\lie@hasse@i}{\the\A@rj}%
{\the\A@rjmo}{\the\A@lbl}%
- \advance\A@j by 1\relax%
- \ifnum\A@j<\the\maxA@j%
+ \advance\lie@hasse@j by 1\relax%
+ \ifnum\lie@hasse@j<\the\maxA@j%
\repeat%
}%
\fi%
- \advance\A@i by 1\relax%
- \ifnum\A@i<\the\maxA@i%
+ \advance\lie@hasse@i by 1\relax%
+ \ifnum\lie@hasse@i<\the\maxA@i%
\repeat%
}%
%% \hasse@A@width@at@grade{g}{\w} sets the counter \w to
@@ -653,7 +722,6 @@
{%
\place@A@roots%
\draw@A@edges%
- \draw@A@roots%
}%
%% \hasse@BC@width@at@grade{g}{\w} sets the counter \w to
%% the value of the width (number of roots) at grade g of
@@ -666,138 +734,116 @@
\global\advance#2 by 1\relax%
\global\divide#2 by 2\relax%
}%
-\newcount\tdrmt%
-\newcount\tdrmo%
+\newcount\twice@dynkin@rank@minus@one%
\newcount\max@BC@r%
\newcount\BC@r%
\newcount\BC@series@x%
\newcount\BC@series@y%
\NewDocumentCommand\place@BC@roots{}%
{%
-\drmo \the\dynkin@rank\relax%
-\advance\drmo by -1\relax%
-\tdrmt \the\drmo\relax%
-\advance\tdrmt by \the\drmo\relax%
-\tdrmo \the\tdrmt\relax%
-\advance\tdrmo 1\relax%
-\max@BC@r \the\dynkin@rank\relax%
-\advance\max@BC@r by 1\relax%
-\BC@r 1\relax%
-\loop%
- \BC@series@x \the\BC@r\relax%
- \advance\BC@series@x by -1\relax%
- \advance\BC@series@x by \the\BC@series@x\relax%
- \BC@series@y 1\relax%
- {%%
+ \twice@dynkin@rank@minus@one \the\dynkin@rank\relax%
+ \advance\twice@dynkin@rank@minus@one by \the\dynkin@rank\relax%
+ \advance\twice@dynkin@rank@minus@one by -1\relax%
+ \max@BC@r \the\dynkin@rank\relax%
+ \advance\max@BC@r by 1\relax%
+ \BC@r 1\relax%
\loop%
- \coordinate
- (\the\BC@series@y;\the\BC@r)
- at
- ({.5*\the\BC@series@x*\dynkin@edge@length},
- {.5*(\the\BC@series@y-1)*\dynkin@edge@length})
- {};%
- \advance\BC@series@y by 1\relax%
- \advance\BC@series@x by 1\relax%
- \ifnum\BC@series@x<\the\tdrmo\repeat%
- }%%
- \advance\BC@r by 1\relax%
- \ifnum\BC@r<\the\max@BC@r%
-\repeat%
+ \BC@series@x \the\BC@r\relax%
+ \advance\BC@series@x by -1\relax%
+ \advance\BC@series@x by \the\BC@series@x\relax%
+ \BC@series@y 1\relax%
+ {%%
+ \loop%
+ \coordinate
+ (\the\BC@series@y;\the\BC@r)
+ at
+ ({.5*\the\BC@series@x*\lie@hasse@edge@length},
+ {.5*(\the\BC@series@y-1)*\lie@hasse@edge@length})
+ {};%
+ \advance\BC@series@y by 1\relax%
+ \advance\BC@series@x by 1\relax%
+ \ifnum\BC@series@x<\the\twice@dynkin@rank@minus@one\repeat%
+ }%%
+ \advance\BC@r by 1\relax%
+ \ifnum\BC@r<\the\max@BC@r%
+ \repeat%
+}%
+\newcount\BC@height%
+\newcount\BC@g%
+\NewDocumentCommand\draw@BC@edges{}%
+{%
+ \rootSystemHeight{\BC@height}%
+ \ifnum\BC@height>1%
+ \BC@g 1\relax%
+ \loop%
+ \draw@BC@edges@at@grade{\the\BC@g}%
+ \global\advance\BC@g by 1\relax%
+ \ifnum\BC@g<\BC@height%
+ \repeat%
+ \fi%
}%
-\newcount\max@BC@i%
\newcount\BC@i%
-\newcount\BC@series@x%
-\newcount\BC@series@y%
+\newcount\BC@width%
+\newcount\BC@width@plus@one%
+\NewDocumentCommand\draw@BC@edges@at@grade{m}%
+{%
+ \rootSystemWidthAtGrade{#1}{\BC@width}%
+ \BC@width@plus@one \BC@width\relax%
+ \advance \BC@width@plus@one by 1\relax%
+ \BC@i 1\relax%
+ {%
+ \loop%
+ \draw@BC@edges@at@root{#1}{\the\BC@i}%
+ \global\advance\BC@i by 1\relax%
+ \ifnum\BC@i<\BC@width@plus@one\repeat%
+ }%
+}%
+\newcount\BC@height%
\newcount\BC@ii%
-\newcount\BC@series@yy%
-\newcount\BC@series@yy%
-\newcount\lbl%
+\newif\ifBC@draw%
+\newcount\lie@hasse@lbl%
\newcount\temp@lbl%
-\NewDocumentCommand\draw@BC@edges{s}%
-{%
-\tdrmo \the\dynkin@rank\relax%
-\advance\tdrmo by \the\dynkin@rank\relax%
-\advance\tdrmo by -1\relax%
-\max@BC@i \the\dynkin@rank\relax%
-\advance\max@BC@i by 1\relax%
-\BC@i 1\relax%
-\loop%
- \BC@series@x \the\BC@i\relax%
- \advance\BC@series@x by \the\BC@i\relax%
- \advance\BC@series@x by -2\relax%
- \BC@series@y 1\relax%
- {%%
- \loop%
- \ifnum\BC@i>1%
- % draw an edge upward to the left
- \BC@ii \the\BC@i\relax%
- \advance\BC@ii by -1\relax%
- \BC@series@yy \the\BC@series@y\relax%
- \advance\BC@series@yy by 1\relax%
- \draw@lie@hasse@edge[right]%
- {\the\BC@series@y}{\the\BC@i}%
- {\the\BC@ii}%
- {\the\BC@ii}%
+\NewDocumentCommand\draw@BC@edges@at@root{mm}%
+{%
+ \ifnum#2>1%
+ % draw an edge upward to the left
+ \BC@ii #2\relax%
+ \advance\BC@ii by -1\relax%
+ \draw@lie@hasse@edge[right]%
+ {#1}{#2}%
+ {\the\BC@ii}
+ {\the\BC@ii}%
+ \fi%
+ \BC@drawtrue%
+ \ifodd#1
+ \ifnum#2=\the\BC@width%
+ \global\BC@drawfalse%
\fi%
- \ifnum\BC@series@y>1%
- % draw an edge downward to the left
- \BC@series@yy \the\BC@series@y\relax%
- \advance\BC@series@yy by -1\relax%
- \lbl \the\BC@i\relax%
- \advance\lbl by \the\BC@series@y\relax%
- \advance\lbl by -1\relax%
- \ifnum\dynkin@rank<\the\lbl%
- \temp@lbl \the\lbl\relax%
- \lbl \the\dynkin@rank\relax%
- \advance\lbl by \the\dynkin@rank%
- \advance\lbl by -\the\temp@lbl%
+ \fi%
+ \ifBC@draw%
+ % draw an edge upward to the right
+ \lie@hasse@lbl #2\relax%
+ \advance\lie@hasse@lbl by #1\relax%
+ \ifnum\dynkin@rank<\the\lie@hasse@lbl%
+ \temp@lbl \the\lie@hasse@lbl\relax%
+ \lie@hasse@lbl \the\dynkin@rank\relax%
+ \advance\lie@hasse@lbl by \the\dynkin@rank%
+ \advance\lie@hasse@lbl by -\the\temp@lbl%
%% For the B series:
- \IfBooleanF{#1}{\global\advance\lbl by 1\relax}%
- \draw@lie@hasse@edge[left]%
- {\the\BC@series@yy}{\the\BC@i}%
- {\the\BC@i}%
- {\the\lbl}%
- \else%
- \draw@lie@hasse@edge[left]%
- {\the\BC@series@yy}{\the\BC@i}%
- {\the\BC@i}%
- {\the\lbl}%
+ \iflie@hasse@B%
+ \global\advance\lie@hasse@lbl by 1\relax%
\fi%
+ \draw@lie@hasse@edge[left]%
+ {#1}{#2}%
+ {#2}%
+ {\the\lie@hasse@lbl}%
+ \else%
+ \draw@lie@hasse@edge[left]%
+ {#1}{#2}%
+ {#2}%
+ {\the\lie@hasse@lbl}%
\fi%
- \advance\BC@series@y by 1\relax%
- \advance\BC@series@x by 1\relax%
- \ifnum\BC@series@x<\the\tdrmo\repeat%
- }%%
- \advance\BC@i by 1\relax%
- \ifnum\BC@i<\the\max@BC@i%
-\repeat%
-}%
-\newcount\tdrpt%
-\newcount\BC@r%
-\newcount\BC@series@y%
-\newcount\maxy%
-\NewDocumentCommand\draw@BC@roots{}%
-{%
-\tdrpt \the\dynkin@rank\relax%
-\advance\tdrpt by \the\dynkin@rank\relax%
-\advance\tdrpt by 2\relax%
-\max@BC@r \the\dynkin@rank\relax%
-\advance\max@BC@r by 1\relax%
-\BC@r 1\relax%
-\loop%
- \BC@series@y 1\relax%
- \maxy \tdrpt\relax%
- \advance\maxy -\the\BC@r\relax%
- \advance\maxy -\the\BC@r\relax%
- {%%
- \loop%
- \draw@lie@hasse@root{\the\BC@series@y;\the\BC@r}%
- \advance\BC@series@y by 1\relax%
- \ifnum\BC@series@y<\the\maxy\repeat%
- }%%
- \advance\BC@r by 1\relax%
- \ifnum\BC@r<\the\max@BC@r%
-\repeat%
+ \fi%
}%
\NewDocumentCommand\hasse@BC{s}% star for C:
{%
@@ -809,7 +855,6 @@
{%
\draw@BC@edges%
}%
- \draw@BC@roots%
}%
\NewDocumentCommand\hasse@D{}%
{%
@@ -818,51 +863,45 @@
\iflie@hasse@threeD%
\draw@D@hasse@three@D%
\fi%
- \draw@D@roots%
}%
-\newcount\drmt%
\NewDocumentCommand\draw@D@hasse@three@D{}%
{%
- \drmo \the\dynkin@rank\relax%
- \advance\drmo by -1\relax%
- \drmt \the\dynkin@rank\relax%
- \advance\drmt by -2\relax%
\begin{pgfonlayer}{Dynkin middle}%
\fill[/Lie Hasse diagram/left]
- (\the\drmt;1) --
- (\the\drmo;1) --
+ (\the\dynkin@rank@minus@two;1) --
+ (\the\dynkin@rank@minus@one;1) --
(\the\dynkin@rank;1) --
- (\the\drmo;2) --
+ (\the\dynkin@rank@minus@one;2) --
cycle;%
\fill[/Lie Hasse diagram/top]
- (\the\drmt;1) --
- (1;\the\drmt) --
- (2;\the\drmo) --
- (\the\drmo;2) --
+ (\the\dynkin@rank@minus@two;1) --
+ (1;\the\dynkin@rank@minus@two) --
+ (2;\the\dynkin@rank@minus@one) --
+ (\the\dynkin@rank@minus@one;2) --
cycle;%
\fill[/Lie Hasse diagram/top]
- (\the\drmo;2) --
+ (\the\dynkin@rank@minus@one;2) --
(\the\dynkin@rank;1) --
- (3;\the\drmo) --
- (2;\the\drmo) --
+ (3;\the\dynkin@rank@minus@one) --
+ (2;\the\dynkin@rank@minus@one) --
cycle;%
\fill[/Lie Hasse diagram/top]
- (\the\drmo;1) --
+ (\the\dynkin@rank@minus@one;1) --
(\the\dynkin@rank;1) --
- (3;\the\drmo) --
- (2;\the\drmt) --
+ (3;\the\dynkin@rank@minus@one) --
+ (2;\the\dynkin@rank@minus@two) --
cycle;%
\fill[/Lie Hasse diagram/top]
- (\the\drmt;1) --
- (\the\drmo;1) --
- (2;\the\drmt) --
- (1;\the\drmt) --
+ (\the\dynkin@rank@minus@two;1) --
+ (\the\dynkin@rank@minus@one;1) --
+ (2;\the\dynkin@rank@minus@two) --
+ (1;\the\dynkin@rank@minus@two) --
cycle;%
\fill[/Lie Hasse diagram/left]
- (1;\the\drmt) --
- (2;\the\drmt) --
- (3;\the\drmo) --
- (2;\the\drmo) --
+ (1;\the\dynkin@rank@minus@two) --
+ (2;\the\dynkin@rank@minus@two) --
+ (3;\the\dynkin@rank@minus@one) --
+ (2;\the\dynkin@rank@minus@one) --
cycle;%
\end{pgfonlayer}%
}%
@@ -883,9 +922,7 @@
\newcount\D@g%
\newcount\maxD@grd%
\newcount\D@grd%
-\newcount\maxxD%
-\newcount\iD%
-\newcount\xxD%
+\newcount\lie@hasse@D@x%
\newcount\sum@D%
\NewDocumentCommand\place@D@roots{}%
{%
@@ -918,37 +955,34 @@
\repeat%
}%
}%
-\newcount\drpo%
\NewDocumentCommand\place@D@root@at{mm}%
{%
- \xxD #1\relax%
- \advance\xxD by #2\relax%
- \advance\xxD by #2\relax%
- \advance\xxD by -3\relax%
- \drpo \the\dynkin@rank\relax%
- \advance\drpo by 1\relax%
+ \lie@hasse@D@x #1\relax%
+ \advance\lie@hasse@D@x by #2\relax%
+ \advance\lie@hasse@D@x by #2\relax%
+ \advance\lie@hasse@D@x by -3\relax%
\sum@D #1\relax%
\advance\sum@D by #2\relax%
\ifnum\sum@D=\the\dynkin@rank%
\global\def\D@root@x%
- {\the\xxD-\lie@hasse@three@D@shift}%
+ {\the\lie@hasse@D@x-\lie@hasse@three@D@shift}%
\else%
- \ifnum\sum@D=\the\drpo%
+ \ifnum\sum@D=\the\dynkin@rank@plus@one%
\ifnum#1<\the\dynkin@rank%
\global\def\D@root@x%
- {\the\xxD-2+\lie@hasse@three@D@shift}%
+ {\the\lie@hasse@D@x-2+\lie@hasse@three@D@shift}%
\else%
- \global\def\D@root@x{\the\xxD}%
+ \global\def\D@root@x{\the\lie@hasse@D@x}%
\fi%
\else%
\ifnum\sum@D<\the\dynkin@rank%
- \global\def\D@root@x{\the\xxD}%
+ \global\def\D@root@x{\the\lie@hasse@D@x}%
\else%
% if \sum@D exceeds rank+1
\ifnum#1<\the\dynkin@rank%
- \global\def\D@root@x{\the\xxD-2}%
+ \global\def\D@root@x{\the\lie@hasse@D@x-2}%
\else%
- \global\def\D@root@x{\the\xxD}%
+ \global\def\D@root@x{\the\lie@hasse@D@x}%
\fi%
\fi%
\fi%
@@ -956,7 +990,7 @@
\coordinate
(#1;#2)
at
- ({(\D@root@x)*\dynkin@edge@length/2},{(#1-1)*\dynkin@edge@length/2})
+ ({(\D@root@x)*\lie@hasse@edge@length/2},{(#1-1)*\lie@hasse@edge@length/2})
{};%
}%
\NewDocumentCommand\draw@D@edges{}%
@@ -983,7 +1017,8 @@
\D@r 1\relax%
{%
\loop%
- \draw@D@edges@at{#1}{\the\D@r}{\the\max@D@roots}%
+%%% \draw@D@edges@at{#1}{\the\D@r}{\the\max@D@roots}%
+ \draw@D@edges@at{#1}{\the\D@r}%
\advance\D@r by 1\relax%
\ifnum\D@r<\the\max@D@roots@plus@one%
\repeat%
@@ -1000,10 +1035,6 @@
\newcount\hasse@D@label%
\NewDocumentCommand\draw@D@edges@at{mm}%
{%
- \drmo\the\dynkin@rank\relax%
- \advance\drmo by -1\relax%
- \drpo \the\dynkin@rank\relax%
- \advance\drpo by 1\relax%
\hasse@D@gpo#1\relax%
\advance\hasse@D@gpo by 1\relax%
\hasse@D@gpi#1\relax%
@@ -1035,7 +1066,7 @@
\xdef\hasse@D@layer{Dynkin above}%
\else%
% below or middle.
- \ifnum\hasse@D@gpi=\the\drpo%
+ \ifnum\hasse@D@gpi=\the\dynkin@rank@plus@one%
\xdef\hasse@D@layer{Dynkin behind}%
\fi%
\fi%
@@ -1045,7 +1076,7 @@
\fi%
\fi%
\ifnum\dynkin@rank>#1%
- \ifnum\hasse@D@gpi<\the\drpo%
+ \ifnum\hasse@D@gpi<\the\dynkin@rank@plus@one%
\else%
\global\advance\hasse@D@label -1\relax%
\fi%
@@ -1069,7 +1100,7 @@
\fi%
\fi%
\ifnum#1=1%
- \ifnum\drmo=#2%
+ \ifnum\dynkin@rank@minus@one=#2%
\global\hasse@Dfalse\relax%
\else%
\xdef\hasse@D@LR{right}%
@@ -1080,13 +1111,13 @@
\ifnum\hasse@D@label>\the\dynkin@rank%
\hasse@D@label -\hasse@D@label\relax%
\advance\hasse@D@label \the\dynkin@rank\relax%
- \advance\hasse@D@label \the\drmo\relax%
+ \advance\hasse@D@label \the\dynkin@rank@minus@one\relax%
\fi%
- \ifnum\drmo<#1%
+ \ifnum\dynkin@rank@minus@one<#1%
\else%
\ifnum#2=1%
\else%
- \ifnum\hasse@D@gpi<\the\drpo%
+ \ifnum\hasse@D@gpi<\the\dynkin@rank@plus@one%
\else%
\advance\hasse@D@label 1\relax%
\fi%
@@ -1099,11 +1130,11 @@
\global\advance\hasse@D@target by 1\relax%
\fi%
\else%
- \ifnum\drmo=#1%
+ \ifnum\dynkin@rank@minus@one=#1%
\global\advance\hasse@D@target by -1\relax%
\fi%
\fi%
- \ifnum\hasse@D@gpi=\the\drpo%
+ \ifnum\hasse@D@gpi=\the\dynkin@rank@plus@one%
\ifnum#2>1%
\xdef\hasse@D@layer{Dynkin behind}%
\xdef\hasse@D@LR{right}%
@@ -1112,7 +1143,7 @@
\ifnum\hasse@D@gpi=\the\dynkin@rank%
\xdef\hasse@D@layer{Dynkin above}%
\else%
- \ifnum\hasse@D@gpi=\the\drmo%
+ \ifnum\hasse@D@gpi=\the\dynkin@rank@minus@one%
\xdef\hasse@D@layer{Dynkin above}%
\else%
\xdef\hasse@D@layer{Dynkin middle}%
@@ -1129,7 +1160,7 @@
\end{pgfonlayer}%
\fi%
% % Draw any other edges.
- \ifnum\hasse@D@gpi=\the\drmo%
+ \ifnum\hasse@D@gpi=\the\dynkin@rank@minus@one%
\hasse@D@target#2\relax%
\advance\hasse@D@target by 1\relax%
\begin{pgfonlayer}{Dynkin behind}
@@ -1142,38 +1173,7 @@
}%
\newcount\maxD@grd%
\newcount\D@grd%
-\newcount\maxxD%
\newcount\sum@D%
-\NewDocumentCommand\draw@D@roots{}%
-{%
- \drmo \the\dynkin@rank\relax%
- \advance\drmo by -1\relax%
- \maxD@grd \the\dynkin@rank\relax%
- \advance\maxD@grd by \the\dynkin@rank\relax%
- \advance\maxD@grd by -2\relax%
- \D@grd 1\relax%
- \loop%
- % Construct the roots at grade \D@grd.
- \draw@D@roots@at@grade{\D@grd}%
- \advance\D@grd by 1\relax%
- \ifnum\D@grd<\the\maxD@grd%
- \repeat%
-}%
-\NewDocumentCommand\draw@D@roots@at@grade{m}%
-{%
- \hasse@D@width@at@grade{#1}{\max@D@roots}%
- \max@D@roots@plus@one \the\max@D@roots\relax%
- \advance\max@D@roots@plus@one 1\relax%
- \D@r 1\relax%
- {%
- \loop%
- \draw@lie@hasse@root{\the\D@grd;\the\D@r}%
- \advance\D@r by 1\relax%
- \ifnum\D@r<\the\max@D@roots@plus@one%
- \repeat%
- }%
-}%
-%}%
\newcount\lie@hasse@grade@no
\newcount\lie@hasse@root@no
\def\lie@hasse@XX{}
@@ -1205,14 +1205,14 @@
\coordinate
(\the\lie@hasse@grade@no;\the\lie@hasse@root@no)
at
- ({\lie@hasse@XX*\dynkin@edge@length/2},
- {(\the\lie@hasse@grade@no-1)*\dynkin@edge@length/2}) {};%
+ ({\lie@hasse@XX*\lie@hasse@edge@length/2},
+ {(\the\lie@hasse@grade@no-1)*\lie@hasse@edge@length/2}) {};%
\global\advance\lie@hasse@root@no by 1%
}%
\NewDocumentCommand\lie@hasse@place@root@list{m}%
{%
\global\lie@hasse@root@no 1\relax%
- \expandafter\forcsvlist\expandafter{\lie@hasse@place@root}{#1}%
+ \expandafter\forcsvlist\expandafter\lie@hasse@place@root{#1}%
\global\advance\lie@hasse@grade@no by 1%
}%
\NewDocumentCommand\lie@hasse@place@roots{m}%
@@ -1224,26 +1224,6 @@
}%
\expandafter\docsvlist\expandafter{#1}%
}%
-\NewDocumentCommand\lie@hasse@draw@root{m}%
-{%
- \draw@lie@hasse@root{\the\lie@hasse@grade@no;\the\lie@hasse@root@no}%
- \global\advance\lie@hasse@root@no by 1%
-}%
-\NewDocumentCommand\lie@hasse@root@draw@list{m}%
-{%
- \global\lie@hasse@root@no 1\relax%
- \expandafter\forcsvlist\expandafter{\lie@hasse@draw@root}{#1}%
- \global\advance\lie@hasse@grade@no by 1%
-}%
-\NewDocumentCommand\lie@hasse@draw@roots{m}%
-{%
- \global\lie@hasse@grade@no 1\relax%
- \renewcommand*{\do}[1]%
- {%
- \lie@hasse@root@draw@list{##1}%
- }%
- \expandafter\docsvlist\expandafter{#1}%
-}%
\newcount\lie@hasse@grade@no@plus@one%
\newcount\lie@hasse@edge@count%
\def\lie@hasse@edge@go{%
@@ -1256,7 +1236,8 @@
{%
\global\advance\lie@hasse@edge@count by 1\relax%
\begin{pgfonlayer}{Dynkin above}%
- \lie@hasse@finish@edge#1!%
+%%? \lie@hasse@finish@edge#1!%
+ \lie@hasse@finish@edge#1\relax%
\end{pgfonlayer}%
}%
\def\lie@hasse@process@edge@behind#1!%
@@ -1289,13 +1270,12 @@
\NewDocumentCommand\lie@hasse@process@edge@lists{m}%
{%
\global\lie@hasse@grade@no 1\relax%
- \expandafter\forcsvlist\expandafter{\lie@hasse@process@edge@list}{#1}%
+ \expandafter\forcsvlist\expandafter\lie@hasse@process@edge@list{#1}%
}%
\NewDocumentCommand\hasse@X{mm}%
{%
\lie@hasse@place@roots{#1}%
\lie@hasse@process@edge@lists{#2}%
- \lie@hasse@draw@roots{#1}%
}%
\NewDocumentCommand\hasse@E@six@width@at@grade{mm}%
{%
@@ -1323,7 +1303,11 @@
#2 1%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}%
-% In the following code, edges are described by grade: in grade g, the expression i+r<j. means an edge from g;i to (g+1);j labelled by root r, with a label on the left; use > instead of < to get the right. Use a star in front to get this edge on the higher layer.
+% In the following code, edges are described by grade:
+% in grade g, the expression i+r<j. means an edge from
+% g;i to (g+1);j labelled by root r, with a label on
+% the left; use > instead of < to get the right. Use a
+% star in front to get this edge on the higher layer.
\NewDocumentCommand\hasse@E@six{}%
{%
\hasse@X%
@@ -1353,13 +1337,45 @@
}%%%
\iflie@hasse@threeD%
\begin{pgfonlayer}{Dynkin middle}%
-\fill[/Lie Hasse diagram/top] (2;1) -- (5;3) -- (2;5) -- (1;5) -- (2;4) -- (1;3) -- (2;2) -- (1;2) -- cycle;%
-\fill[/Lie Hasse diagram/top] (2;3) -- (4;1) -- (6;2) -- (4;5) -- cycle;%
-\fill[/Lie Hasse diagram/right] (1;3) -- (2;3) -- (4;5) -- (3;5) -- cycle;%
-\fill[/Lie Hasse diagram/left] (3;1) -- (4;1) -- (2;3) -- (1;3) -- cycle;%
-\fill[/Lie Hasse diagram/left] (4;3) -- (5;1) -- (6;1) -- (5;2) -- cycle;%
-\fill[/Lie Hasse diagram/right] (4;3) -- (5;2) -- (6;3) -- (5;4) -- cycle;%
-\fill[/Lie Hasse diagram/top] (5;2) -- (7;1) -- (9;1) -- (7;3) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (2;1) --
+ (5;3) --
+ (2;5) --
+ (1;5) --
+ (2;4) --
+ (1;3) --
+ (2;2) --
+ (1;2) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (2;3) --
+ (4;1) --
+ (6;2) --
+ (4;5) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (1;3) --
+ (2;3) --
+ (4;5) --
+ (3;5) -- cycle;%
+ \fill[/Lie Hasse diagram/left]
+ (3;1) --
+ (4;1) --
+ (2;3) --
+ (1;3) -- cycle;%
+ \fill[/Lie Hasse diagram/left]
+ (4;3) --
+ (5;1) --
+ (6;1) --
+ (5;2) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (4;3) --
+ (5;2) --
+ (6;3) --
+ (5;4) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (5;2) --
+ (7;1) --
+ (9;1) --
+ (7;3) -- cycle;%
\end{pgfonlayer}%
\fi%
}%
@@ -1399,7 +1415,6 @@
#2 1%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}%
-
\NewDocumentCommand\hasse@E@seven{}%
{%
\hasse@X%
@@ -1457,20 +1472,64 @@
}%%%
\iflie@hasse@threeD%
\begin{pgfonlayer}{Dynkin middle}%
-\fill[/Lie Hasse diagram/top] (2;1) -- (6;3) -- (2;6) -- (1;6) -- (2;5) -- (1;4) -- (2;3) -- (1;3) --
- (2;2) -- (1;2) -- cycle;%
-\fill[/Lie Hasse diagram/top] (5;1) -- (7;3) -- (4;6) -- (2;4) -- cycle;%
-\fill[/Lie Hasse diagram/top] (7;1) -- (9;3) -- (7;5) -- (5;4) -- cycle;%
-\fill[/Lie Hasse diagram/top] (9;1) -- (12;1) -- (13;1) -- (14;1) -- (11;3) -- (7;2) -- cycle;%
-\fill[/Lie Hasse diagram/right] (1;4) -- (2;4) -- (4;6) -- (3;6) -- cycle;%
-\fill[/Lie Hasse diagram/left] (4;1) -- (5;1) -- (2;4) -- (1;4) -- cycle;%
-\fill[/Lie Hasse diagram/left] (4;4) -- (6;1) -- (8;1) -- (7;2) -- (6;2) -- (5;4) -- cycle;%
-\fill[/Lie Hasse diagram/right] (4;4) -- (5;4) -- (6;5) -- (5;6) -- cycle;%
-\fill[/Lie Hasse diagram/right] (6;2) -- (7;2) -- (9;4) -- (8;4) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (2;1) --
+ (6;3) --
+ (2;6) --
+ (1;6) --
+ (2;5) --
+ (1;4) --
+ (2;3) --
+ (1;3) --
+ (2;2) --
+ (1;2) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (5;1) --
+ (7;3) --
+ (4;6) --
+ (2;4) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (7;1) --
+ (9;3) --
+ (7;5) --
+ (5;4) -- cycle;%
+ \fill[/Lie Hasse diagram/top]
+ (9;1) --
+ (12;1) --
+ (13;1) --
+ (14;1) --
+ (11;3) --
+ (7;2) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (1;4) --
+ (2;4) --
+ (4;6) --
+ (3;6) -- cycle;%
+ \fill[/Lie Hasse diagram/left]
+ (4;1) --
+ (5;1) --
+ (2;4) --
+ (1;4) -- cycle;%
+ \fill[/Lie Hasse diagram/left]
+ (4;4) --
+ (6;1) --
+ (8;1) --
+ (7;2) --
+ (6;2) --
+ (5;4) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (4;4) --
+ (5;4) --
+ (6;5) --
+ (5;6) -- cycle;%
+ \fill[/Lie Hasse diagram/right]
+ (6;2) --
+ (7;2) --
+ (9;4) --
+ (8;4) -- cycle;%
\end{pgfonlayer}%
\fi%
}%
-
\NewDocumentCommand\hasse@E@eight@width@at@grade{mm}%
{%
\ifnum#1=1%
@@ -1527,7 +1586,6 @@
#2 1%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}%
-
\NewDocumentCommand\hasse@E@eight{}%
{%
\hasse@X{%
@@ -1754,11 +1812,11 @@
{{0,2,4,6},{1,3,5},{2,3:1,4},{2:1,3,4:1},{1:1,3:1,5:1},{2:1,4:1},{1:1,3:1},{2:1},{2:2},{2:3},{2:4}}%
{% grades:
{% 1
-1+2<1,*2+3<2,*3+4<3,*2+1>1,*3+2>2,4+3>3},
+1+2<1,*2+3>2,*3+4>3,*2+1<1,*3+2<2,4+3>3},
{% 2
-*1+3<1,*2+4<3,*2+3<2,*2+1<1,3+2>3},
+*1+3<1,*2+4>3,*2+1<1,*2+3>2,3+2>3},
{% 3
-*1+3<1,1+4<2,*2+4<3,*2+1<1,3+1>2,*3+3>3},
+*1+3<1,1+4>2,*2+4>3,*2+1<1,3+1>2,*3+3>3},
{% 4
*1+2<1,*1+4<2,2+3<2,*3+1>2,*3+4>3},
{% 5
@@ -1795,9 +1853,29 @@
#2 1%
\fi\fi\fi%
}%
+\NewDocumentCommand\hasse@G@AB{}%
+{%
+\hasse@X{{0,2},{1},{1},{1},{1}}{{1+2<1,2+1>1},{1+1<1},{1+1<1},{1+2<1}}%AB
+}%
+\NewDocumentCommand\hasse@G@CDK{}%
+{%
+\hasse@X{{0,2},{1},{1},{1},{1}}{{1+2<1,2+1>1},{1+2<1},{1+2<1},{1+1<1}}%CDK
+}%
\NewDocumentCommand\hasse@G{}%
{%
-\hasse@X{{0,2},{1},{1},{1},{1}}{{1+2<1,2+1>1},{1+1<1},{1+1<1},{1+2<1}}%
+\IfStrEqCase{\dynkin@ordering}%
+{%
+ {Adams}{\hasse@G@AB}%
+ {Bourbaki}{\hasse@G@AB}%
+ {Carter}{\hasse@G@CDK}%
+ {Dynkin}{\hasse@G@CDK}%
+ {Kac}{\hasse@G@CDK}%
+}%
+[\ClassError%
+ {Lie Hasse}%
+ {Root ordering ``\dynkin@ordering'' %
+ not Adams, Bourbaki, Carter, Dynkin or Kac when attaching G2 Dynkin diagram}%
+ {}]%
}%
\ExplSyntaxOn
\DeclareExpandableDocumentCommand{\lie@hasse@repeat@string}{O{}mm}
@@ -2026,8 +2104,8 @@
}%
\global\root@sum@resetfalse%
}%
-\xdef\my@root@sum{}%
-\xdef\my@fixed@root@sum{}%
+\xdef\lie@hasse@root@sum{}%
+\xdef\lie@hasse@fixed@root@sum{}%
\NewDocumentCommand\rootSum{oommm}%
{%
\IfValueT{#1}%
@@ -2053,15 +2131,15 @@
\fi%
\IfStrEqCase{\dynkin@series}%
{%
- {A}{\hasse@A@root@sum{#3}{#4}{\my@root@sum}}%
- {B}{\hasse@B@root@sum{#3}{#4}{\my@root@sum}}%
- {C}{\hasse@C@root@sum{#3}{#4}{\my@root@sum}}%
- {D}{\hasse@D@root@sum{#3}{#4}{\my@root@sum}}%
- {E}{\xdef\my@root@sum{\exceptional@root@sum{#3;#4}}}%
- {F}{\xdef\my@root@sum{\exceptional@root@sum{#3;#4}}}%
- {G}{\xdef\my@root@sum{\exceptional@root@sum{#3;#4}}}%
+ {A}{\hasse@A@root@sum{#3}{#4}{\lie@hasse@root@sum}}%
+ {B}{\hasse@B@root@sum{#3}{#4}{\lie@hasse@root@sum}}%
+ {C}{\hasse@C@root@sum{#3}{#4}{\lie@hasse@root@sum}}%
+ {D}{\hasse@D@root@sum{#3}{#4}{\lie@hasse@root@sum}}%
+ {E}{\xdef\lie@hasse@root@sum{\exceptional@root@sum{#3;#4}}}%
+ {F}{\xdef\lie@hasse@root@sum{\exceptional@root@sum{#3;#4}}}%
+ {G}{\xdef\lie@hasse@root@sum{\exceptional@root@sum{#3;#4}}}%
}%
- \StrSubstitute{\my@root@sum}{.}{,}[#5]%
+ \StrSubstitute{\lie@hasse@root@sum}{.}{,}[#5]%
}%
%% \rootSystemHeight[G][2]{\h} sets the counter \h to the height of the poset
%% of the root system G2. \rootSystemHeight{\h} uses the current root system.
@@ -2441,7 +2519,7 @@
10;1=1.3.4.2,%
11;1=2.3.4.2}%
}%
-\NewDocumentCommand\hasse@set@G@root@sums{}%
+\NewDocumentCommand\hasse@set@G@root@sums@AB{}%
{%
\forcsvlist{\do@hasse@list}{%
1;1=1.0,%
@@ -2451,7 +2529,33 @@
4;1=3.1,%
5;1=3.2}%
}%
-\NewDocumentCommand\forAllPositiveRootsInHasseDiagram{m}%
+\NewDocumentCommand\hasse@set@G@root@sums@CDK{}%
+{%
+\forcsvlist{\do@hasse@list}{%
+1;1=1.0,%
+1;2=0.1,%
+2;1=1.1,%
+3;1=1.2,%
+4;1=1.3,%
+5;1=2.3}%
+}%
+\NewDocumentCommand\hasse@set@G@root@sums{}%
+{%
+\IfStrEqCase{\dynkin@ordering}%
+{%
+ {Adams}{\hasse@set@G@root@sums@AB}%
+ {Bourbaki}{\hasse@set@G@root@sums@AB}%
+ {Carter}{\hasse@set@G@root@sums@CDK}%
+ {Dynkin}{\hasse@set@G@root@sums@CDK}%
+ {Kac}{\hasse@set@G@root@sums@CDK}%
+}%
+[\ClassError%
+ {Lie Hasse}%
+ {Root ordering ``\dynkin@ordering'' %
+ not Adams, Bourbaki, Carter, Dynkin or Kac when setting root sums for G2 Dynkin diagram}%
+ {}]%
+}%
+\NewDocumentCommand\forAllPositiveRoots{m}%
{%
\rootSystemHeight{\lie@hasse@height}%
\foreach \root@grady in {1,...,\the\lie@hasse@height}%
diff --git a/graphics/pgf/contrib/lie-hasse/lie-hasse.tex b/graphics/pgf/contrib/lie-hasse/lie-hasse.tex
index 82643fee14..752af00af7 100644
--- a/graphics/pgf/contrib/lie-hasse/lie-hasse.tex
+++ b/graphics/pgf/contrib/lie-hasse/lie-hasse.tex
@@ -1,5 +1,5 @@
\documentclass{amsart}
-\title[The Lie Hasse package]{The Lie Hasse package \\ Version 1.0}
+\title[The Lie Hasse package]{The Lie Hasse package \\ Version 1.02}
%% My name:
\makeatletter
\DeclareRobustCommand{\scotsMc}{\scotsMcx{c}}
@@ -19,8 +19,7 @@
\author{\authorsname}
\address{School of Mathematical Sciences, University College Cork, Cork, Ireland}
\email{b.mckay@ucc.ie}
-\date{3 February 2020}
-\usepackage{etex}
+\date{4 December 2024}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
\usepackage{etoolbox}
@@ -87,7 +86,7 @@
root radius=.02cm,
edge length=.5cm,
edge quotes/.style={opacity=0}%
- ]{E}{8}%
+ ]E8%
\end{tikzpicture}%
\end{center}%
\begin{center}
@@ -106,26 +105,26 @@ This package draws the Hasse diagram of the poset of the positive simple roots o
\begin{document}
The Hasse diagram of \(F_4\) is
\begin{center}
-\hasse[edge length=1cm]{F}{4}
+\hasse F4
\end{center}
\end{document}
\end{Verbatim}
\end{tcolorbox}
\par\noindent{}The Hasse diagram of \(F_4\) is
\begin{center}
-\hasse[edge length=1cm]{F}{4}
+\hasse[edge length=1cm]F4
\end{center}
Each edge is labelled with the simple root by which vertices differ.
\begin{tcblisting}{title={Inside a \TikZ statement}}
-\(B_4\) has Dynkin diagram \tikz \dynkin[edge length=.35cm]{B}{4};, Hasse diagram
+\(B_4\) has Dynkin diagram \tikz \dynkin{B}{4};, Hasse diagram
\begin{center}
-\hasse[edge length=1cm]{B}{4}
+\hasse[edge length=1cm]B4
\end{center}
\end{tcblisting}
\begin{tcblisting}{title={Inside a Dynkin diagram environment, diagrams fit together}}
The Hasse diagram of \(B_4\) is
\begin{dynkinDiagram}[vertical shift=0,edge length=1cm]{B}{4}
-\hasse{B}{4}
+\hasse[edge length=1cm]B4
\end{dynkinDiagram}
\end{tcblisting}
We shut off the default vertical shift of the Dynkin diagram, so that it starts at the origin.
@@ -133,35 +132,29 @@ There is an option to \verb!\hasse! for this:
\begin{tcblisting}{title={Attaching the Dynkin diagram}}
The Hasse diagram of \(B_4\) is
\begin{center}
-\hasse[attach Dynkin diagram=true]{B}{4}
+\hasse[attach Dynkin diagram=true]B4
\end{center}
\end{tcblisting}
+
+\newpage
+
Unfortunately, attaching a Dynkin diagram looks terrible for \(D\) or \(E\) series, so a Dynkin diagram appears below.
\begin{tcblisting}{title={Attaching the Dynkin diagram}}
The Hasse diagram of \(D_5\) is
\begin{center}
-\hasse[attach Dynkin diagram=true]{D}{5}
+\hasse[attach Dynkin diagram=true]D5
\end{center}
\end{tcblisting}
\begin{tcblisting}{title={Inside a \TikZ environment}}
\begin{tikzpicture}
-\hasse{A}{4}
+\hasse A4
\draw (4;1) circle (5pt);
\draw[red] (2;3) circle (5pt);
\end{tikzpicture}
\end{tcblisting}
In this example, we see that the roots of the Hasse diagram are \TikZ{} nodes labelled \(g;i\) for grade \(g\) (i.e. \(g\) units up the page) and index \(i\) (i.e. \(i^{\text{th}}\) root of grade \(g\) drawn on the page, starting from the left).
-\section{Inherited options}
-The Lie Hasse package inherits options from the Dynkin diagrams package: the edge lengths are set with
-\begin{Verbatim}
-\tikzset{/Dynkin diagram/edge lengths=1.2cm}
-\end{Verbatim}
-and similarly the ordering of roots with
-\begin{Verbatim}
-\tikzset{/Dynkin diagram/ordering=Bourbaki}
-\end{Verbatim}
-
+\newpage
\section{Prettier}
The package includes a more elaborate \verb!\hasseDiagrams! command, taking a list of semicolon separated Dynkin diagram identfiers.
\begin{tcolorbox}[title={With some global options to make prettier diagrams}]
@@ -198,11 +191,20 @@ The package includes a more elaborate \verb!\hasseDiagrams! command, taking a li
\endgroup
Global options:
\begin{verbatim}
- edge/.style={ultra thick},
- edge quotes/.style={/Dynkin diagram/text style,auto,inner sep=2pt},
+\tikzset{/Lie Hasse,
+ edge/.style={ultra thick},
+ edge quotes/.style={
+ /Dynkin diagram/text style,
+ auto,
+ inner sep=2pt},
\end{verbatim}
allow to change the edges, and to change the way that labels are printed, and how close labels are to the edges.
-
+To give even greater control, the user can define a command \verb!\edgeQuote! of one argument, which is applied to the label placed on every edge of the Hasse diagram.
+The default is
+\begin{verbatim}
+\NewDocumentCommand\edgeQuote{m}{\contour{white}{#1}}
+\end{verbatim}
+which ensures that every label, which is black text by default, has a slight white outline to make it easier to read against a coloured background.
\section{Root order}
@@ -222,6 +224,10 @@ We can use this like:
\hasseDiagrams{[ordering=Carter]E6;[ordering=Dynkin]E6}
\hasseDiagrams{[ordering=Kac]E6}
\endgroup
+The Lie Hasse package inherits the ordering of roots from the Dynkin diagrams package, so we can set it with
+\begin{Verbatim}
+\tikzset{/Dynkin diagram/ordering=Bourbaki}
+\end{Verbatim}
\section{Graph height and width}
The \emph{height} of a Hasse diagram is the number of grades.
@@ -238,7 +244,7 @@ to store the height of \(G_2\) in a counter called \verb!\h!, and
\end{Verbatim}
to store the width of \(G_2\) at grade \(3\) in a counter called \verb!\w!.
-Once you use \verb!\dynkin{G}{2}! or \verb!\hasse{G}{2}! or the other commands, like
+Once you use \verb!\dynkin G2! or \verb!\hasse G2! or the other commands, like
\begin{Verbatim}
\rootSystemHeight[G][2]{\h}
\end{Verbatim}
@@ -259,8 +265,11 @@ The \verb!show height! option:
\tikzset{/Lie Hasse diagram,show name=true,show height=true}
\hasseDiagrams{G2}
\end{Verbatim}
+\begin{center}
\tikzset{/Lie Hasse diagram,show name=true,show height=true}
-\hasseDiagrams{G2}
+\hasse G2
+\end{center}
+
The \verb!show widths! option:
\begin{Verbatim}
\tikzset{/Lie Hasse diagram/show widths=true}
@@ -293,11 +302,11 @@ Here is the Dynkin diagram of \(E_8\), indicating the order of the roots in Cart
Here is the same Dynkin diagram, except showing, at each simple root, the coefficient of that simple root in the highest root.
\begin{Verbatim}
\rootSum[E][8]{29}{1}{\rs}
-\dynkin[labels=\rs,ordering=Carter,edge length=.35cm]{E}{8}
+\dynkin[expand labels=\rs,ordering=Carter,edge length=.35cm]{E}{8}
\end{Verbatim}
\rootSum[E][8]{29}{1}{\rs}
\begin{center}
-\dynkin[labels=\rs,ordering=Carter,edge length=.35cm]{E}{8}
+\dynkin[expand labels=\rs,ordering=Carter,edge length=.35cm]{E}{8}
\end{center}
The option \verb!for all roots! allows execution of code once on every root.
@@ -312,7 +321,7 @@ The option \verb!for all roots! allows execution of code once on every root.
root radius=.05cm
},
for all roots/.code 2 args={\drawRootAsDynkinSum{#1}{#2}}}
-\hasseDiagrams{D5}
+\hasse D5
\end{Verbatim}
\begingroup
\tikzset{/Lie Hasse diagram,
@@ -341,34 +350,38 @@ A simple example:
\end{Verbatim}
\newcommand{\foo}[2]%
{%
- \node[below,scale=.75] at (#1;#2) {\(#1,#2\)};%
+ \node[below,scale=.5] at (#1;#2) {\(#1,#2\)};%
}%
Inside a \TikZ{} or \verb!dynkinDiagram! environment:
\begin{Verbatim}
\tikzset{/Lie Hasse diagram/edge quotes/.style={opacity=0},
/Dynkin diagram/edge length=1.5cm}
\begin{tikzpicture}
- \hasse{D}{6}%
- \forAllPositiveRootsInHasseDiagram{\foo}%
+ \hasse D6%
+ \forAllPositiveRoots{\foo}%
\end{tikzpicture}
\end{Verbatim}
+\begin{center}
\begingroup
\tikzset{/Lie Hasse diagram/edge quotes/.style={opacity=0},
/Dynkin diagram/edge length=1.5cm}
\begin{tikzpicture}
- \hasse{D}{6}%
- \forAllPositiveRootsInHasseDiagram{\foo}%
+ \hasse D6%
+ \forAllPositiveRoots{\foo}%
\end{tikzpicture}
+\end{center}
If you put this into the \verb!for all roots! option, it executes on its own:
\begin{Verbatim}
\tikzset{/Lie Hasse diagram/for all roots/.code 2 args={\foo{#1}{#2}}}
\hasseDiagrams{C4;D4}
\end{Verbatim}
+\begin{center}
\begingroup
\tikzset{/Lie Hasse diagram/for all roots/.code 2 args={\foo{#1}{#2}}}
\hasseDiagrams{C4;D4}
\endgroup
+\end{center}
\endgroup
\section{Three dimensional effect}
@@ -378,19 +391,19 @@ Opposite sides of any square have the same edge label, by commutativity of addit
Hence we don't need to see every edge perfectly.
The three dimensional effect is the default:
\begin{Verbatim}
-\hasse{D}{4}\hasse{E}{6}
+\hasse D4\hasse E6
\end{Verbatim}
\begin{center}
-\hasse{D}{4}\hasse{E}{6}
+\hasse D4\hasse E6
\end{center}
We can turn it off:
\begin{Verbatim}
-\hasse[three D=false]{D}{4}
-\hasse[three D=false]{E}{6}
+\hasse[three D=false] D4
+\hasse[three D=false] E6
\end{Verbatim}
\begin{center}
-\hasse[three D=false]{D}{4}
-\hasse[three D=false]{E}{6}
+\hasse[three D=false] D4
+\hasse[three D=false] E6
\end{center}
or globally with \verb!\tikzset{/Lie Hasse diagram/three D=false}!.
@@ -430,9 +443,11 @@ You can change these:
\section{Label the simple roots}
Ringel \cite{Ringel:2013} labels his edges like
\begin{Verbatim}
-\hasseDiagrams{[labels={f,e,d,c,u,b,a}]E7}
+\hasse[labels={f,e,d,c,u,b,a}]E7
\end{Verbatim}
-\hasseDiagrams{[labels={f,e,d,c,u,b,a}]E7}
+\begin{center}
+\hasse[labels={f,e,d,c,u,b,a}]E7
+\end{center}
\section{Parabolic subgroups}
This package offers nothing over Ringel's original pictures, except that the user can pick some simple roots whose associated edges are drawn differently.
@@ -440,47 +455,64 @@ The chosen simple roots are called \emph{compact}, following terminology from th
We let the reader explore the notation for parabolic subgroups in the Dynkin diagrams package, and use this to declare various roots compact.
\begin{Verbatim}
\tikzset{/Lie Hasse diagram,attach Dynkin diagram=true,three D=false}
-\hasseDiagrams{D{**x*x*x*}}
+\hasse D{**x*x*x*}
\end{Verbatim}
\begingroup
+\begin{center}
\tikzset{/Lie Hasse diagram,attach Dynkin diagram=true,three D=false}
-\hasseDiagrams{D{**x*x*x*}}
+\hasse D{**x*x*x*}
+\end{center}
\endgroup
+
Our motivation comes from trying to identify the invariant vector subbundles of the tangent bundle of a rational homogeneous variety \cite{MathOverflow:123801}.
Such diagrams are often unreadable if we don't turn off the three dimensional graphics.
By default, noncompact root edges are not drawn.
\begingroup
\tikzset{/Lie Hasse diagram,attach Dynkin diagram=true,show name=false,three D=false}
\begin{Verbatim}
-\hasseDiagrams{E{*xx*x*}}
+\hasse E{*xx*x*}
\end{Verbatim}
-\hasseDiagrams{E{*xx*x*}}
+\begin{center}
+\hasse E{*xx*x*}
+\end{center}
\begin{Verbatim}
-\hasseDiagrams{A{x*x*}}
+\hasse A{x*x*}
\end{Verbatim}
-\hasseDiagrams{A{x*x*}}
+\begin{center}
+\hasse A{x*x*}
+\end{center}
\begin{Verbatim}
-\hasseDiagrams{[parabolic=113]B8}
+\hasse[parabolic=113]B8
\end{Verbatim}
-\hasseDiagrams{[parabolic=113]B8}
+\begin{center}
+\hasse[parabolic=113]B8
+\end{center}
\begin{Verbatim}
-\hasseDiagrams{C{**xx*x**}}
+\hasse C{**xx*x**}
\end{Verbatim}
-\hasseDiagrams{C{**xx*x**}}
+\begin{center}
+\hasse C{**xx*x**}
+\end{center}
\newpage
\begin{Verbatim}
-\hasseDiagrams{E{*x*x*x**}}
+\hasse E{*x*x*x**}
\end{Verbatim}
-\hasseDiagrams{E{*x*x*x**}}
+\begin{center}
+\hasse E{*x*x*x**}
+\end{center}
\newpage
\begin{Verbatim}
-\hasseDiagrams{F{**xx}}
+\hasse F{**xx}
\end{Verbatim}
-\hasseDiagrams{F{**xx}}
+\begin{center}
+\hasse F{**xx}
+\end{center}
\begin{Verbatim}
-\hasseDiagrams{G{*x}}
+\hasse G{*x}
\end{Verbatim}
-\hasseDiagrams{G{*x}}
+\begin{center}
+\hasse G{*x}
+\end{center}
\endgroup
\section{Examples}
diff --git a/graphics/pgf/contrib/luatikz/README.txt b/graphics/pgf/contrib/luatikz/README.txt
new file mode 100644
index 0000000000..14930dc4d3
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/README.txt
@@ -0,0 +1,9 @@
+-----------------
+Luatikz is a graphics library to draw tikz graphics
+using the Lua programming language.
+-----------------
+
+License:
+
+LaTeX Project Public License 1.3c
+MIT License (expat)
diff --git a/graphics/pgf/contrib/luatikz/example/bezier2.lua b/graphics/pgf/contrib/luatikz/example/bezier2.lua
new file mode 100644
index 0000000000..55f7766ec0
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/bezier2.lua
@@ -0,0 +1,11 @@
+tikz.within( '*' )
+
+local bz =
+ bezier2{
+ p1 = p{ 0, 0 },
+ pc = p{ 2, 2 },
+ p2 = p{ 4, 0 },
+ }
+
+draw{ line_width=1, bz }
+bz.drawHelpers( 'p' )
diff --git a/graphics/pgf/contrib/luatikz/example/bezier3a.lua b/graphics/pgf/contrib/luatikz/example/bezier3a.lua
new file mode 100644
index 0000000000..5c91a4238f
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/bezier3a.lua
@@ -0,0 +1,12 @@
+tikz.within( '*' )
+
+local bz =
+ bezier3{
+ p1 = p{ 0, 0 },
+ pc1 = p{ 1, 2 },
+ pc2 = p{ 3, 3 },
+ p2 = p{ 4, 0 },
+ }
+
+draw{ line_width=1, bz }
+bz.drawHelpers( 'p' )
diff --git a/graphics/pgf/contrib/luatikz/example/bezier3b.lua b/graphics/pgf/contrib/luatikz/example/bezier3b.lua
new file mode 100644
index 0000000000..54a2a982ce
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/bezier3b.lua
@@ -0,0 +1,32 @@
+tikz.within( '*' )
+
+local bz =
+ bezier3{
+ p1 = p{ 0, 0 },
+ pc1 = p{ 1, 2 },
+ pc2 = p{ 3, 3 },
+ p2 = p{ 4, 0 },
+ }
+
+draw{ line_width = 1, bz }
+
+for t = 0, 1, 0.1
+do
+ local pt = bz.pt( t )
+ draw{
+ fill = black,
+ circle{
+ at = pt,
+ radius = 0.05,
+ }
+ }
+
+ local phit = bz.phit( t ) + math.pi / 2
+ draw{
+ line{
+ p1 = pt,
+ phi = phit,
+ length = 1,
+ }
+ }
+end
diff --git a/graphics/pgf/contrib/luatikz/example/blinea.lua b/graphics/pgf/contrib/luatikz/example/blinea.lua
new file mode 100644
index 0000000000..8a49476e51
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/blinea.lua
@@ -0,0 +1,23 @@
+tikz.within( '*' )
+
+local l1 = bline{ p{ 0, 0 }, p{ 2, 3 }, bend_right = 45 }
+local l2 = bline{ p{ 0, 3 }, p{ 2, 1 }, bend_left = 30 }
+
+draw{ draw=red, l1 }
+draw{ draw=blue, l2 }
+put{
+ node{
+ at = l1.pc,
+ anchor = south,
+ rotate = l1.line.phi * 180 / math.pi,
+ text = 'red',
+ }
+}
+put{
+ node{
+ at = l2.pc,
+ anchor = south,
+ rotate = l2.line.phi * 180 / math.pi,
+ text = 'blue',
+ }
+}
diff --git a/graphics/pgf/contrib/luatikz/example/circle.lua b/graphics/pgf/contrib/luatikz/example/circle.lua
new file mode 100644
index 0000000000..ba85c04e5a
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/circle.lua
@@ -0,0 +1,12 @@
+tikz.within( '*' )
+
+draw{
+ circle{
+ at = p{ 0, 0 },
+ radius = 2,
+ },
+ circle{
+ at = p{ 2, 1 },
+ radius = 1,
+ }
+}
diff --git a/graphics/pgf/contrib/luatikz/example/curvea.lua b/graphics/pgf/contrib/luatikz/example/curvea.lua
new file mode 100644
index 0000000000..b1d6b85506
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/curvea.lua
@@ -0,0 +1,14 @@
+tikz.within( '*' )
+
+local c =
+ curve{
+ points =
+ {
+ p{ 0, 0 },
+ p{ 2, 2 },
+ p{ 4, 0 },
+ },
+ }
+
+draw{ line_width=1, c }
+c.drawHelpers( 'p' )
diff --git a/graphics/pgf/contrib/luatikz/example/curveb.lua b/graphics/pgf/contrib/luatikz/example/curveb.lua
new file mode 100644
index 0000000000..194127837a
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/curveb.lua
@@ -0,0 +1,16 @@
+tikz.within( '*' )
+
+local c =
+ curve{
+ points =
+ {
+ p{ 0, 0 },
+ p{ 2, 2 },
+ p{ 4, 0 },
+ },
+ cycle = true,
+ tension = 1.0,
+ }
+
+draw{ line_width=1, c }
+c.drawHelpers( 'p' )
diff --git a/graphics/pgf/contrib/luatikz/example/ellipse.lua b/graphics/pgf/contrib/luatikz/example/ellipse.lua
new file mode 100644
index 0000000000..c648e81320
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/ellipse.lua
@@ -0,0 +1,14 @@
+tikz.within( '*' )
+
+draw{
+ ellipse{
+ at = p{ 0, 0 },
+ xradius = 3,
+ yradius = 2,
+ },
+ ellipse{
+ at = p{ 2, 1 },
+ xradius = 1.5,
+ yradius = 1,
+ }
+}
diff --git a/graphics/pgf/contrib/luatikz/example/ellipseArc.lua b/graphics/pgf/contrib/luatikz/example/ellipseArc.lua
new file mode 100644
index 0000000000..97536d3836
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/ellipseArc.lua
@@ -0,0 +1,18 @@
+tikz.within( '*' )
+
+draw{
+ ellipseArc{
+ at = p{ 0, 0 },
+ from = 0,
+ to = 90,
+ xradius = 3,
+ yradius = 2,
+ },
+ ellipseArc{
+ at = p{ 2, 1 },
+ xradius = 1.5,
+ yradius = 1,
+ from = -45,
+ to = 45,
+ }
+}
diff --git a/graphics/pgf/contrib/luatikz/example/immute1.lua b/graphics/pgf/contrib/luatikz/example/immute1.lua
new file mode 100644
index 0000000000..39b0e08a42
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/immute1.lua
@@ -0,0 +1,4 @@
+tikz.within( '*' )
+
+local p1 = p{ 1, 1 }
+p1.x = p1.x + 2
diff --git a/graphics/pgf/contrib/luatikz/example/immute2.lua b/graphics/pgf/contrib/luatikz/example/immute2.lua
new file mode 100644
index 0000000000..3c69f4b6b5
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/immute2.lua
@@ -0,0 +1,6 @@
+tikz.within( '*' )
+
+local p1 = p{ 1, 1 }
+p1 = p{ p1.x + 2, p1.y }
+-- or
+p1 = p1 + p{ 2, 0 }
diff --git a/graphics/pgf/contrib/luatikz/example/intro.lua b/graphics/pgf/contrib/luatikz/example/intro.lua
new file mode 100644
index 0000000000..9752fd464e
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/intro.lua
@@ -0,0 +1,8 @@
+tikz.within( '*' )
+
+local p1 = p{ 1, 1 }
+local p2 = p{ 6, 2 }
+local l1 = line{ p1, p2 }
+
+draw{ l1 }
+draw{ line{ p{ 2, 2 }, p{ 3, 3 } } }
diff --git a/graphics/pgf/contrib/luatikz/example/linea.lua b/graphics/pgf/contrib/luatikz/example/linea.lua
new file mode 100644
index 0000000000..fcc4a78989
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/linea.lua
@@ -0,0 +1,7 @@
+tikz.within( '*' )
+
+local l1 = line{ p{ 0, 0 }, p{ 2, 3 } }
+local l2 = line{ p1 = p{ 0, 3 }, p2 = p{ 2, 1 } }
+
+draw{ l1 }
+draw{ l2 }
diff --git a/graphics/pgf/contrib/luatikz/example/lineb.lua b/graphics/pgf/contrib/luatikz/example/lineb.lua
new file mode 100644
index 0000000000..0faf904967
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/lineb.lua
@@ -0,0 +1,9 @@
+tikz.within( '*' )
+
+local l1 = line{ p{ 0, 0 }, p{ 2, 3 } }
+local l2 = line{ p1 = p{ 0, 3 }, p2 = p{ 2, 1 } }
+local pi = l1.intersectLine( l2 )
+
+draw{ l1 }
+draw{ l2 }
+draw{ circle{ at = pi, radius = 0.1 } }
diff --git a/graphics/pgf/contrib/luatikz/example/linec.lua b/graphics/pgf/contrib/luatikz/example/linec.lua
new file mode 100644
index 0000000000..115def104b
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/linec.lua
@@ -0,0 +1,7 @@
+tikz.within( '*' )
+
+draw{ line{
+ p1 = p{ 0, 0 },
+ phi = -math.pi / 4,
+ length = 2,
+} }
diff --git a/graphics/pgf/contrib/luatikz/example/lined.lua b/graphics/pgf/contrib/luatikz/example/lined.lua
new file mode 100644
index 0000000000..38bc0eaa08
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/lined.lua
@@ -0,0 +1,15 @@
+tikz.within( '*' )
+
+local l = line{ p{ 0, 0 }, p{ 5, 0 } }
+draw{ l }
+
+for i = 1, 10
+do
+ l =
+ line{
+ p1 = l.p2,
+ phi = l.phi + math.pi / 5,
+ length = l.length * 2 / 3,
+ }
+ draw{ l }
+end
diff --git a/graphics/pgf/contrib/luatikz/example/nodea.lua b/graphics/pgf/contrib/luatikz/example/nodea.lua
new file mode 100644
index 0000000000..4d34f2c099
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/nodea.lua
@@ -0,0 +1,12 @@
+tikz.within( '*' )
+
+put{
+ node{
+ at = p{ 0, 0 },
+ text = [[$a^2 + b^2 = c^2$]],
+ },
+ node{
+ at = p{ 2, 1 },
+ text = [[$sin(\phi) = \frac{b}{a}$]],
+ }
+}
diff --git a/graphics/pgf/contrib/luatikz/example/nodeb.lua b/graphics/pgf/contrib/luatikz/example/nodeb.lua
new file mode 100644
index 0000000000..85d8aeb49e
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/nodeb.lua
@@ -0,0 +1,18 @@
+tikz.within( '*' )
+
+local r1 =
+ rect{
+ pc = p{ 0, 0 },
+ size = p{ 3, 3 },
+ }
+
+draw{ r1 }
+
+put{
+ node{
+ at = r1.pc,
+ text = [[this is the center of a rect]],
+ text_width = '2cm',
+ rotate = 45,
+ },
+}
diff --git a/graphics/pgf/contrib/luatikz/example/plota.lua b/graphics/pgf/contrib/luatikz/example/plota.lua
new file mode 100644
index 0000000000..1a5721082e
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/plota.lua
@@ -0,0 +1,14 @@
+tikz.within( '*' )
+
+draw{
+ plot{
+ at = p{ 0, 0 },
+ from = 0,
+ to = 5,
+ step = 0.05,
+ func =
+ function( d )
+ return p{ d, math.pow( d - 2.5, 2 ) / 2 }
+ end
+ }
+}
diff --git a/graphics/pgf/contrib/luatikz/example/polylinea.lua b/graphics/pgf/contrib/luatikz/example/polylinea.lua
new file mode 100644
index 0000000000..f19954798a
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/polylinea.lua
@@ -0,0 +1,11 @@
+tikz.within( '*' )
+
+draw{
+ polyline{
+ p{ 0, 0 },
+ p{ 2, 2 },
+ p{ 4, 0 },
+ p{ 3, -1 },
+ 'cycle',
+ }
+}
diff --git a/graphics/pgf/contrib/luatikz/example/radon1.lua b/graphics/pgf/contrib/luatikz/example/radon1.lua
new file mode 100644
index 0000000000..166c44c763
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/radon1.lua
@@ -0,0 +1,119 @@
+tikz.within( '*' )
+
+local cos = math.cos
+local sin = math.sin
+local pi = math.pi
+
+-- granularity of calculation
+local fine = 10
+
+-- factor the projection length is reduced
+local fproj = 0.35
+
+-- strength of the ellipse mediums
+local s1 = 1.00
+local s2 = 1.50
+local s3 = 1.75
+
+local e1 = ellipse{ at=p{ 0.00, 0.00 }, xradius=3.00, yradius=3.00 }
+local e2 = ellipse{ at=p{ 0.40, 1.20 }, xradius=0.85, yradius=0.50 }
+local e3 = ellipse{ at=p{ 0.00, -0.89 }, xradius=1.00, yradius=0.60 }
+
+draw{ fill='black!08!white', line_width=1, e1 }
+draw{ fill='black!16!white', line_width=1, e2 }
+draw{ fill='black!24!white', line_width=1, e3 }
+
+-- list of projection angles
+local listphi =
+{
+ -1/4 * pi,
+ 2/4 * pi,
+ 5/4 * pi,
+}
+
+-- length of projection lines
+local lenmaintop = 5.0
+local lenmainbot = 6.5
+
+for proji, phimain in ipairs( listphi )
+do
+ local lmain =
+ line{
+ p{ cos( phimain ), sin( phimain ) } * -lenmaintop,
+ p{ cos( phimain ), sin( phimain ) } * lenmainbot,
+ }
+ local phinorm = phimain - pi/2
+
+ -- gets a point on the projection.
+ -- dp: distance from projection center
+ -- dv: projection value
+ function getpproj( dp, dv )
+ return(
+ lmain.p2
+ + p{ cos( phinorm ) * dp, sin( phinorm ) * dp }
+ + p{ cos( phimain ) * dv * fproj, sin( phimain ) * dv * fproj }
+ )
+ end
+
+ -- distance of projection line
+ local ddis = 1 / fine
+
+ -- list of all projection points
+ local listp = { }
+
+ for i = -3.5 * fine, 3.5 * fine
+ do
+ local p1i =
+ lmain.p1
+ + p{ cos( phinorm ) * ddis * i, sin( phinorm ) * ddis * i }
+ local li = line{ p1i, p1i + ( lmain.p2 - lmain.p1 ) }
+ local lv = 0
+ local is1 = e1.intersectLine( li )
+
+ if is1 and #is1 > 1
+ then
+ local lis = line{ is1[ 1 ], is1[ 2 ] }
+ lv = lv + lis.length * s1
+ end
+
+ local is2 = e2.intersectLine( li )
+ if is2 and #is2 > 1
+ then
+ local lis = line{ is2[ 1 ], is2[ 2 ] }
+ lv = lv + lis.length * s2
+ end
+
+ local is3 = e3.intersectLine( li )
+ if is3 and #is3 > 1
+ then
+ local lis = line{ is3[ 1 ], is3[ 2 ] }
+ lv = lv + lis.length * s3
+ end
+
+ local pproj = getpproj( ddis * i, lv )
+ if i % ( 0.7 * fine ) == 0
+ then
+ draw{
+ dotted, arrow, line_width=0.5,
+ line{ li.p1, getpproj( ddis * i, -0.20 ) },
+ }
+ draw{
+ dotted, line_width=0.5,
+ line{ li.p1, pproj },
+ }
+ end
+ table.insert( listp, pproj )
+ end
+
+ -- draws the projection screen
+ local lenlproj = 8
+ draw{
+ line{
+ getpproj( lenlproj / 2, 0 ),
+ getpproj( -lenlproj / 2, 0 ),
+ }
+ }
+
+ -- draws the projection curve
+ draw{ line_width=1, polyline{ table.unpack( listp ) } }
+end
diff --git a/graphics/pgf/contrib/luatikz/example/recta.lua b/graphics/pgf/contrib/luatikz/example/recta.lua
new file mode 100644
index 0000000000..91c8203ef7
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/recta.lua
@@ -0,0 +1,21 @@
+tikz.within( '*' )
+
+local r1 =
+ rect{
+ pnw = p{ 0, 3 },
+ pse = p{ 3, 0 },
+ }
+
+local r2 =
+ rect{
+ psw = r1.pse,
+ size = p{ 1, 1 },
+ }
+
+local r3 =
+ rect{
+ pc = r1.pc,
+ size = p{ 1.5, 1.5 },
+ }
+
+draw{ r1, r2, r3 }
diff --git a/graphics/pgf/contrib/luatikz/example/shadea.lua b/graphics/pgf/contrib/luatikz/example/shadea.lua
new file mode 100644
index 0000000000..31e28dd314
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/shadea.lua
@@ -0,0 +1,9 @@
+tikz.within( '*' )
+
+shade{
+ ball_color = gray,
+ circle{
+ at = p0,
+ radius = 2,
+ },
+}
diff --git a/graphics/pgf/contrib/luatikz/example/sierpinski.lua b/graphics/pgf/contrib/luatikz/example/sierpinski.lua
new file mode 100644
index 0000000000..0b5588bf91
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/sierpinski.lua
@@ -0,0 +1,41 @@
+tikz.within( '*' )
+
+local s60 = math.sin( 60 / 180 * math.pi )
+local c60 = math.cos( 60 / 180 * math.pi )
+
+-- creates a table object having ptop, pleft and pright as points
+-- and a "draw yourself" function
+function equilateralTriangle( ptop, len )
+ return {
+ ptop = ptop,
+ pleft = ptop + p{ -len/2, -len*s60 },
+ pright = ptop + p{ len/2, -len*s60 },
+ draw =
+ function( self )
+ draw{
+ fill = black,
+ draw = none,
+ polyline{ self.ptop, self.pleft, self.pright, 'cycle' }
+ }
+ end
+ }
+end
+
+-- one step into the fractal
+-- ptop: top point of triangle
+-- len: current length
+-- level: current fractal level
+function drawFractal( ptop, len, level )
+ if level == 1
+ then
+ local t = equilateralTriangle( ptop, len )
+ t:draw( )
+ else
+ local ttop = equilateralTriangle( ptop, len / 2 )
+ drawFractal( ttop.ptop, len / 2, level - 1 )
+ drawFractal( ttop.pleft, len / 2, level - 1 )
+ drawFractal( ttop.pright, len / 2, level - 1 )
+ end
+end
+
+drawFractal( p{ 0, 0 }, 8, 6 )
diff --git a/graphics/pgf/contrib/luatikz/example/spiral.lua b/graphics/pgf/contrib/luatikz/example/spiral.lua
new file mode 100644
index 0000000000..12c135062e
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/spiral.lua
@@ -0,0 +1,16 @@
+tikz.within( '*' )
+
+local pi = p{ 0, 0 }
+local pdx = p{ 0.25, 0 }
+local pdy = p{ 0, 0.25 }
+
+for k = 1, 20
+do
+ local sign = 1
+ if k % 2 == 0 then sign = -1 end
+ local pn = pi + sign * k * pdx
+ local pn2 = pn + sign * k * pdy
+ draw{ line{ pi, pn }, line{ pn, pn2 } }
+ pi = pn2
+end
+
diff --git a/graphics/pgf/contrib/luatikz/example/stylea.lua b/graphics/pgf/contrib/luatikz/example/stylea.lua
new file mode 100644
index 0000000000..ef3805cdd0
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/stylea.lua
@@ -0,0 +1,19 @@
+tikz.within( '*' )
+
+local l1 = line{ p{ 0, 0 }, p{ 3, 1 } }
+local l2 = line{ p{ 0, -1 }, p{ 3, 0 } }
+local l3 = line{ p{ 0, -2 }, p{ 3, -1 } }
+
+draw{ arrow, l1 }
+draw{ double_arrow, dashed, l2 }
+draw{ color = purple, line_width = 2, dotted, l3 }
+
+put{ node{
+ at = l3.pc,
+ anchor = center,
+ align = center,
+ color = purple,
+ rotate = l3.phi * 180 / math.pi,
+ text = 'label for purple line',
+ text_width = '2cm',
+} }
diff --git a/graphics/pgf/contrib/luatikz/example/superEllipse.lua b/graphics/pgf/contrib/luatikz/example/superEllipse.lua
new file mode 100644
index 0000000000..32c629008c
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/example/superEllipse.lua
@@ -0,0 +1,22 @@
+tikz.within( '*' )
+
+local list = { 1, 1.5, 2, 4, 999 }
+
+for i, v in ipairs( list )
+do
+ local pi = p{ ( i - 1 ) * 2.5, 0 }
+ draw{
+ superEllipse{
+ at = pi,
+ n = v,
+ xradius = 1,
+ yradius = 1,
+ }
+ }
+ put{
+ node{
+ at = pi,
+ text = 'n = ' .. v,
+ }
+ }
+end
diff --git a/graphics/pgf/contrib/luatikz/luatikz.lua b/graphics/pgf/contrib/luatikz/luatikz.lua
new file mode 100644
index 0000000000..1c18f2f627
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/luatikz.lua
@@ -0,0 +1,1999 @@
+local _version = '2.12.0'
+
+if tikz
+then
+ if tikz.version ~= _version
+ then
+ error( 'version chaos' )
+ end
+ return
+end
+
+tikz = { version = _version }
+
+--==========================================================================--
+-- DEFINES
+--==========================================================================--
+
+-- directions
+tikz.north = 'north'
+tikz.north_east = 'north east'
+tikz.east = 'east'
+tikz.south_east = 'south east'
+tikz.south = 'south'
+tikz.south_west = 'south west'
+tikz.west = 'west'
+tikz.north_west = 'north west'
+
+-- colors
+tikz.black = 'black'
+tikz.blue = 'blue'
+tikz.brown = 'brown'
+tikz.cyan = 'cyan'
+tikz.darkgray = 'darkgray'
+tikz.gray = 'gray'
+tikz.green = 'green'
+tikz.lightgray = 'lightgray'
+tikz.lime = 'lime'
+tikz.magenta = 'magenta'
+tikz.olive = 'olive'
+tikz.orange = 'orange'
+tikz.pink = 'pink'
+tikz.purple = 'purple'
+tikz.red = 'red'
+tikz.teal = 'teal'
+tikz.violet = 'violet'
+tikz.yellow = 'yellow'
+tikz.white = 'white'
+
+-- align
+tikz.center = 'center'
+tikz.left = 'left'
+tikz.right = 'right'
+
+tikz.none = 'none'
+
+-- line caps
+tikz.round = 'round'
+
+--==========================================================================--
+-- HELPERS --
+--==========================================================================--
+
+-- if defined writes output here
+local outfile
+
+--
+-- Prints arguments to tex and to stdout.
+--
+local function tprint( ... )
+ local args = {...}
+ print( table.concat( args ) )
+
+ if tex
+ then
+ tex.print( table.concat( args ) )
+ end
+
+ if outfile
+ then
+ outfile:write( table.concat( args ) )
+ outfile:write( '\n%%% DO NOT EDIT THIS FILE %%%\n' )
+ end
+end
+tikz.tprint = tprint
+
+--
+-- Flattens an object stack.
+--
+-- The content of all numerated unclassed objects
+-- are put into a copy of obj.
+--
+local function flatten( o )
+ local r = { }
+ for _, v in ipairs( o )
+ do
+ if type( v ) == 'table' and getmetatable( v ) == nil
+ then
+ local fv = flatten( v )
+ for _, fvv in ipairs( fv )
+ do
+ table.insert( r, fvv )
+ end
+ for k, vv in pairs( fv )
+ do
+ if type( k ) ~= 'number'
+ then
+ r[ k ] = vv
+ end
+ end
+ else
+ table.insert( r, v )
+ end
+ end
+ -- copies (and overwrites) all named attributes
+ for k, v in pairs( o )
+ do
+ if type( k ) ~= 'number'
+ then
+ r[ k ] = v
+ end
+ end
+ return r
+end
+
+--
+-- A key marking an object having a zString function.
+--
+local _zString = { }
+
+--
+-- Converts everything to a tikz string.
+--
+local function zString( v )
+ if type( v ) == 'table' and v[ _zString ]
+ then
+ return v[ _zString ]( v )
+ end
+ return tostring( v )
+end
+
+--
+-- Creates an immutable class.
+--
+local function immutable( definer )
+ local def = { }
+ local lazy = { }
+ local proto = { }
+ def.lazy = lazy
+ def.proto = proto
+ definer( def ) -- the callee fills in data
+ local k = { } -- key the hidden table
+
+ local mt = { }
+ mt.__index =
+ function( self, key )
+ if key == 'id' then return def.id end
+
+ -- first check if native value
+ local v = self[ k ][ key ]
+ if v then return v end
+
+ -- then if a lazy function
+ local f = lazy[ key ]
+ if f
+ then
+ local v = f( self )
+ self[ k ][ key ] = v -- cache
+ return v
+ end
+
+ -- then if a proto value
+ v = proto[ key ]
+ if v
+ then
+ if type( v ) == 'function'
+ then
+ return(
+ function(...)
+ return v( self, table.unpack( {...} ) )
+ end
+ )
+ else
+ return v
+ end
+ end
+
+ -- otherwise
+ -- error( 'invalid property' )
+ end
+
+ mt.__newindex =
+ function( )
+ error( 'this is an immutable' )
+ end
+
+ if def.add
+ then
+ mt.__add = def.add
+ end
+
+ if def.concat
+ then
+ mt.__concat = def.concat
+ end
+
+ if def.div
+ then
+ mt.__div = def.div
+ end
+
+ if def.mul
+ then
+ mt.__mul = def.mul
+ end
+
+ if def.sub
+ then
+ mt.__sub = def.sub
+ end
+
+ if def.tostring
+ then
+ mt.__tostring = def.tostring
+ end
+
+ return function(...)
+ local args = {...}
+ local nt = def.constructor( table.unpack( args ) )
+ local o = { [ k ] = nt, [ _zString ] = def.zString }
+ setmetatable( o, mt )
+ return o
+ end
+end
+tikz.immutable = immutable
+
+--
+-- writes out direct options
+--
+local function _opts( s, _opts, haveOpts )
+ if not _opts
+ then
+ return haveOpts
+ end
+
+ for k, v in pairs( _opts )
+ do
+ if not haveOpts
+ then
+ table.insert( s, '[' )
+ else
+ table.insert( s, ',' )
+ end
+ haveOpts = true
+ if type( k ) == 'number'
+ then
+ table.insert( s, v )
+ else
+ table.insert( s, k..'='..v )
+ end
+ end
+ return haveOpts
+end
+
+-------------------------------------------------------------------------------
+-- Point.
+-------------------------------------------------------------------------------
+tikz.p =
+immutable( function( def )
+ def.id = 'point'
+
+ def.add =
+ function( left, right )
+ if right.id == 'line'
+ or right.id == 'bezier3'
+ then
+ return right + left
+ end
+
+ return tikz.p{ left.x + right.x, left.y + right.y }
+ end
+
+ def.concat =
+ function( left, right )
+ return zString( left )..zString( right )
+ end
+
+ -- constructor
+ def.constructor =
+ function( args )
+ return { x = args[ 1 ], y = args[ 2 ] }
+ end
+
+ -- divisor
+ def.div =
+ function( left, right )
+ return tikz.p{ left.x / right, left.y / right }
+ end
+
+ def.mul =
+ function( left, right )
+ if type( right ) == 'number'
+ then
+ return tikz.p{ left.x * right, left.y * right }
+ elseif type( left ) == 'number'
+ then
+ return tikz.p{ left * right.x, left * right.y }
+ elseif type( right ) == 'table'
+ then
+ if right.id == 'point'
+ then
+ return tikz.p{ left.x * right.x, left.y * right.y }
+ end
+ end
+ error( 'invalid operation' )
+ end
+
+ def.sub =
+ function( left, right )
+ return tikz.p{ left.x - right.x, left.y - right.y }
+ end
+
+ def.tostring =
+ function( self )
+ return 'p{ '..self.x..', '..self.y..' }'
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ return '('..self.x..','..self.y..')'
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A full circle.
+-------------------------------------------------------------------------------
+tikz.circle =
+immutable( function( def )
+ def.id = 'circle'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ return {
+ at = args.at,
+ radius = args.radius,
+ }
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ return zString( self.at )..' circle ('.. self.radius .. ')'
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A quadratic bezier curve.
+-------------------------------------------------------------------------------
+tikz.bezier2 =
+immutable( function( def )
+ def.id = 'bezier2'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ local p1 = args.p1
+ local pc = args.pc
+ local p2 = args.p2
+
+ return {
+ p1 = p1,
+ pc = pc,
+ p2 = p2,
+ }
+ end
+
+ -- draws helping information
+ def.proto.drawHelpers =
+ function( self, prefix )
+ tikz.draw{ draw = 'red', tikz.line{ self.p1, self.pc } }
+ tikz.draw{ draw = 'blue', tikz.line{ self.pc, self.p2 } }
+ if prefix ~= nil
+ then
+ tikz.put{ tikz.node{
+ at = self.p1,
+ anchor = 'north west',
+ text = prefix .. '1',
+ } }
+ tikz.put{ tikz.node{
+ at = self.pc,
+ anchor = 'north west',
+ text = prefix .. 'c',
+ } }
+ tikz.put{ tikz.node{
+ at = self.p2,
+ anchor = 'north west',
+ text = prefix .. '2',
+ } }
+ end
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { }
+ table.insert( s, zString( self.p1 ) )
+ table.insert( s, '.. controls' )
+ table.insert( s, zString( self.pc ) )
+ table.insert( s, '..' )
+ table.insert( s, zString( self.p2 ) )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A cubic bezier curve.
+-------------------------------------------------------------------------------
+tikz.bezier3 =
+immutable( function( def )
+ def.id = 'bezier3'
+
+ def.add =
+ function( left, right )
+ if right.id == 'point'
+ then
+ return tikz.bezier3{
+ p1 = left.p1 + right,
+ pc1 = left.pc1 + right,
+ pc2 = left.pc2 + right,
+ p2 = left.p2 + right,
+ }
+ end
+ error( 'unknown operation' )
+ end
+
+ -- constructor
+ def.constructor =
+ function( args )
+ local p1 = args.p1
+ local pc1 = args.pc1
+ local pc2 = args.pc2
+ local p2 = args.p2
+
+ return {
+ p1 = p1,
+ pc1 = pc1,
+ pc2 = pc2,
+ p2 = p2,
+ }
+ end
+
+ -- draws helping information
+ def.proto.drawHelpers =
+ function( self, prefix )
+ tikz.draw{ draw = 'red', tikz.line{ self.p1, self.pc1 } }
+ tikz.draw{ draw = 'yellow', tikz.line{ self.pc1, self.pc2 } }
+ tikz.draw{ draw = 'blue', tikz.line{ self.pc2, self.p2 } }
+ if prefix ~= nil
+ then
+ tikz.put{ tikz.node{
+ at = self.p1,
+ anchor = 'north west',
+ text = prefix .. '1',
+ } }
+ tikz.put{ tikz.node{
+ at = self.pc1,
+ anchor = 'north west',
+ text = prefix .. 'c1',
+ } }
+ tikz.put{ tikz.node{
+ at = self.pc2,
+ anchor = 'north west',
+ text = prefix .. 'c2',
+ } }
+ tikz.put{ tikz.node{
+ at = self.p2,
+ anchor = 'north west',
+ text = prefix .. '2',
+ } }
+ end
+ end
+
+ def.mul =
+ function( left, right )
+ if type( right ) == 'number'
+ then
+ return tikz.bezier3 {
+ p1 = left.p1 * right,
+ pc1 = left.pc1 * right,
+ pc2 = left.pc2 * right,
+ p2 = left.p2 * right,
+ }
+ elseif type( left ) == 'number'
+ then
+ return tikz.bezier3 {
+ p1 = right.p1 * left,
+ pc1 = right.pc1 * left,
+ pc2 = right.pc2 * left,
+ p2 = right.p2 * left,
+ }
+ else
+ error( 'invalid operation' )
+ end
+ end
+
+ -- point in center
+ def.lazy.pc =
+ function( self )
+ return self.pt( 0.5 )
+ end
+
+ -- gets angle at t (0-1)
+ def.proto.phit =
+ function( self, t )
+ local p1 = self.p1
+ local pc1 = self.pc1
+ local pc2 = self.pc2
+ local p2 = self.p2
+
+ local u = 1 - t
+ local uu3 = 3 * u * u
+ local ut6 = 6 * u * t
+ local tt3 = 3 * t * t
+
+ return math.atan2(
+ -uu3 * p1.y + uu3 * pc1.y - ut6 * pc1.y + ut6 * pc2.y - tt3 * pc2.y + tt3 * p2.y,
+ -uu3 * p1.x + uu3 * pc1.x - ut6 * pc1.x + ut6 * pc2.x - tt3 * pc2.x + tt3 * p2.x
+ )
+ end
+
+ -- reverts p1 and p2 and pc1 and pc2 respectively
+ def.lazy.revert =
+ function( self )
+ return tikz.bezier3{
+ p1 = self.p2,
+ pc1 = self.pc2,
+ pc2 = self.pc1,
+ p2 = self.p1,
+ }
+ end
+
+ -- gets point at t (0-1)
+ def.proto.pt =
+ function( self, t )
+ if type( t ) ~= 'number' or t < 0 or t > 1
+ then
+ error( 'invalid pt' )
+ end
+
+ local p1 = self.p1
+ local pc1 = self.pc1
+ local pc2 = self.pc2
+ local p2 = self.p2
+ local t1 = 1 - t
+
+ return(
+ tikz.p{
+ t1^3*p1.x + 3*t*t1^2*pc1.x + 3 *t^2*t1*pc2.x + t^3*p2.x,
+ t1^3*p1.y + 3*t*t1^2*pc1.y + 3 *t^2*t1*pc2.y + t^3*p2.y
+ }
+ )
+ end
+
+ def.sub =
+ function( left, right )
+ if right.id == 'point'
+ then
+ return tikz.bezier3{
+ p1 = left.p1 - right,
+ pc1 = left.pc1 - right,
+ pc2 = left.pc2 - right,
+ p2 = left.p2 - right,
+ }
+ end
+ error( 'unknown operation' )
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { }
+ table.insert( s, zString( self.p1 ) )
+ table.insert( s, '.. controls' )
+ table.insert( s, zString( self.pc1 ) )
+ table.insert( s, 'and' )
+ table.insert( s, zString( self.pc2 ) )
+ table.insert( s, '..' )
+ table.insert( s, zString( self.p2 ) )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A bend line
+-------------------------------------------------------------------------------
+tikz.bline =
+immutable( function( def )
+ def.id = 'bline'
+
+ -- moves the line.
+ def.add =
+ function( left, right )
+ if right.id == 'point'
+ then
+ return tikz.line{ p1 = left.p1 + right, p2 = left.p2 + right }
+ end
+ error( 'unknown operation' )
+ end
+
+ -- constructor
+ --
+ -- either
+ -- { p1, p2 }, (a list )
+ -- { p1 = ..., p2 = ... },
+ -- { pc = ..., phi = ..., length = ... },
+ def.constructor =
+ function( args )
+ local p1
+ local p2
+
+ if #args > 1
+ then
+ -- list
+ p1 = args[ 1 ]
+ p2 = args[ 2 ]
+ elseif type( args.p1 ) ~= 'nil' and type( args.p2 ) ~= 'nil'
+ then
+ p1 = args.p1
+ p2 = args.p2
+ elseif args.phi ~= nil
+ then
+ local phi = args.phi
+ if args.pc ~= nil
+ then
+ if args.p1 ~= nil
+ or args.p2 ~= nil
+ then
+ error( 'invalid line options', 2 )
+ end
+ local pc = args.pc
+ local len05 = args.length / 2
+ p1 = pc + tikz.p{ math.cos( phi ), math.sin( phi ) } * len05
+ p2 = pc - tikz.p{ math.cos( phi ), math.sin( phi ) } * len05
+ elseif type( args.p1 ) ~= 'nil'
+ then
+ if args.pc ~= nil
+ or args.p2 ~= nil
+ then
+ error( 'invalid line options', 2 )
+ end
+ p1 = args.p1
+ p2 = p1 + tikz.p{ math.cos( phi ), math.sin( phi ) } * args.length
+ else
+ error( 'invalid line options', 2 )
+ end
+ else
+ error( 'invalid line options', 2 )
+ end
+
+ return {
+ bend_left = args.bend_left,
+ bend_right = args.bend_right,
+ p1 = p1,
+ p2 = p2,
+ }
+ end
+
+ -- converts to a cubic bezier (that should look the same)
+ def.lazy.bezier3 =
+ function( self )
+ local phi
+ if self.bend_right ~= nil then
+ phi = self.bend_right * math.pi / 180
+ else
+ phi = -self.bend_left * math.pi / 180
+ end
+ local line = self.line
+ local phil = line.phi
+ local len = line.length * 0.3915
+ local lt1 =
+ tikz.line{
+ p1 = line.p1,
+ phi = phil-phi,
+ length = len
+ }
+ local lt2 =
+ tikz.line{
+ p1 = line.p2,
+ phi = phil+phi+math.pi,
+ length = len
+ }
+
+ return tikz.bezier3{
+ p1 = line.p1,
+ pc1 = lt1.p2,
+ pc2 = lt2.p2,
+ p2 = line.p2,
+ }
+ end
+
+ -- converts to a straight line.
+ def.lazy.line =
+ function( self )
+ return tikz.line{
+ p1 = self.p1,
+ p2 = self.p2,
+ }
+ end
+
+ -- point in center
+ def.lazy.pc =
+ function( self )
+ return self.bezier3.pc
+ end
+
+ -- gets point at t (0-1).
+ def.proto.pt =
+ function( self, t )
+ return self.bezier3.pt( t )
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { }
+ table.insert( s, zString( self.p1 ) )
+ table.insert( s, 'to' )
+ if self.bend_left ~= nil
+ then
+ table.insert( s, '[bend left='..self.bend_left..']' )
+ end
+ if self.bend_right ~= nil
+ then
+ table.insert( s, '[bend right='..self.bend_right..']' )
+ end
+ table.insert( s, zString( self.p2 ) )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A curve is defined by a list of points.
+-------------------------------------------------------------------------------
+curve =
+immutable( function( def )
+ def.id = 'curve'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ return {
+ points = args.points,
+ tension = args.tension,
+ cycle = args.cycle,
+ }
+ end
+
+ -- draws helping information
+ def.proto.drawHelpers =
+ function( self, prefix )
+ local points = self.points
+ for i, pi in ipairs( points )
+ do
+ tikz.draw{
+ fill = 'black',
+ tikz.circle{
+ at = pi,
+ radius = 0.05,
+ }
+ }
+ if prefix ~= nil
+ then
+ tikz.put{ tikz.node{
+ at = pi,
+ anchor = 'north west',
+ text = prefix .. i,
+ } }
+ end
+ end
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { 'plot' }
+ table.insert( s, '[' )
+ if self.cycle
+ then
+ table.insert( s, 'smooth cycle' )
+ else
+ table.insert( s, 'smooth' )
+ end
+ if self.tension then
+ table.insert( s, ',tension='..self.tension )
+ end
+ table.insert( s, ']' )
+ local points = self.points
+ table.insert( s, 'coordinates' )
+ table.insert( s, '{' )
+ for _, p in ipairs( points )
+ do
+ table.insert( s, zString( p ) )
+ end
+ table.insert( s, '}' )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A full ellipse.
+-------------------------------------------------------------------------------
+tikz.ellipse =
+immutable( function( def )
+ def.id = 'ellipse'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ local at = args.at
+ local xradius = args.xradius
+ local yradius = args.yradius
+
+ return {
+ at = at,
+ xradius = xradius,
+ yradius = yradius,
+ }
+ end
+
+ -- intersect with a line.
+ def.proto.intersectLine =
+ function( self, line )
+ local at = self.at
+ local rx = self.xradius
+ local ry = self.yradius
+ local p1 = line.p1
+ local p2 = line.p2
+
+ local x0 = p1.x
+ local y0 = p1.y
+ local x1 = p2.x
+ local y1 = p2.y
+ local cx = at.x
+ local cy = at.y
+
+ x0 = x0 - cx
+ y0 = y0 - cy
+ x1 = x1 - cx
+ y1 = y1 - cy
+
+ local A = ((x1 - x0) * (x1 - x0)) / rx / rx + ((y1 - y0) * (y1 - y0)) / ry / ry
+ local B = (2 * x0 * (x1 - x0)) / rx / rx + (2 * y0 * (y1 - y0)) / ry / ry
+ local C = (x0 * x0) / rx / rx + (y0 * y0) / ry / ry - 1
+ local D = B * B - 4 * A * C
+
+ local tv = { }
+ if D == 0
+ then
+ table.insert( tv, -B / 2 / A )
+ else
+ table.insert( tv, (-B + math.sqrt(D)) / 2 / A )
+ table.insert( tv, (-B - math.sqrt(D)) / 2 / A )
+ end
+
+ local r = { }
+ for _, t in ipairs( tv )
+ do
+ if t >= 0 and t <= 1
+ then
+ table.insert(
+ r,
+ p1 + tikz.p{ t * line.length * math.cos( line.phi ), t * line.length * math.sin( line.phi ) }
+ )
+ end
+ end
+
+ if #r == 0
+ then
+ return
+ elseif #r == 1
+ then
+ return r[ 1 ]
+ else
+ return r
+ end
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ s = { }
+ table.insert( s, zString( self.at ) )
+ table.insert( s, 'ellipse' )
+ table.insert( s, '[' )
+ table.insert( s, 'x radius =' )
+ table.insert( s, zString( self.xradius ) )
+ table.insert( s, ', y radius =' )
+ table.insert( s, zString( self.yradius ) )
+ table.insert( s, ']' )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- An ellipse part.
+-------------------------------------------------------------------------------
+tikz.ellipseArc =
+immutable( function( def )
+ def.id = 'ellipseArc'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ return {
+ at = args.at,
+ from = args.from,
+ to = args.to,
+ xradius = args.xradius,
+ yradius = args.yradius,
+ }
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ s = { }
+ table.insert( s, 'plot' )
+ table.insert( s, '[domain =' )
+ table.insert( s, self.from )
+ table.insert( s, ':' )
+ table.insert( s, self.to )
+ table.insert( s, ',variable = \\phi,smooth]' )
+ table.insert( s,
+ '({ '..zString(self.at.x)..'+'..zString(self.xradius)..'*cos(\\phi)},'
+ ..'{ '..zString(self.at.y)..'+'..zString(self.yradius)..'*sin(\\phi)})'
+ )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- Single line (segment).
+-------------------------------------------------------------------------------
+tikz.line =
+immutable( function( def )
+ def.id = 'line'
+
+ -- moves the line.
+ def.add =
+ function( left, right )
+ if right.id == 'point'
+ then
+ return tikz.line{
+ p1 = left.p1 + right,
+ p2 = left.p2 + right,
+ }
+ end
+ error( 'unknown operation' )
+ end
+
+ -- multiplicator
+ def.mul =
+ function( left, right )
+ if type( left ) == 'number'
+ then
+ return tikz.line{
+ p1 = right.p1 * left,
+ p2 = right.p2 * left,
+ }
+ elseif type( right ) == 'number'
+ then
+ return tikz.line{
+ p1 = left.p1 * right,
+ p2 = left.p2 * right,
+ }
+ end
+ error( 'unknown operation' )
+ end
+
+ -- constructor
+ --
+ -- either
+ -- { p1, p2 }, (a list )
+ -- { p1 = ..., p2 = ... },
+ -- { pc = ..., phi = ..., length = ... },
+ def.constructor =
+ function( args )
+ local p1
+ local p2
+
+ if #args > 1
+ then
+ -- list
+ p1 = args[ 1 ]
+ p2 = args[ 2 ]
+ elseif type( args.p1 ) ~= 'nil' and type( args.p2 ) ~= 'nil'
+ then
+ p1 = args.p1
+ p2 = args.p2
+ elseif args.phi ~= nil
+ then
+ local phi = args.phi
+ if args.pc ~= nil
+ then
+ if args.p1 ~= nil
+ or args.p2 ~= nil
+ then
+ error( 'invalid line options', 2 )
+ end
+ local pc = args.pc
+ local len05 = args.length / 2
+ p1 = pc + tikz.p{ math.cos( phi ), math.sin( phi ) } * len05
+ p2 = pc - tikz.p{ math.cos( phi ), math.sin( phi ) } * len05
+ elseif type( args.p1 ) ~= 'nil'
+ then
+ if args.pc ~= nil
+ or args.p2 ~= nil
+ then
+ error( 'invalid line options', 2 )
+ end
+ p1 = args.p1
+ p2 = p1 + tikz.p{ math.cos( phi ), math.sin( phi ) } * args.length
+ else
+ error( 'invalid line options', 2 )
+ end
+ else
+ error( 'invalid line options', 2 )
+ end
+
+ return {
+ p1 = p1,
+ p2 = p2,
+ }
+ end
+
+ -- divisor
+ def.div =
+ function( left, right )
+ if type( right ) == 'number'
+ then
+ return tikz.line{
+ p1 = left.p1 / right,
+ p2 = left.p2 / right,
+ }
+ end
+ error( 'unknown operation' )
+ end
+
+ -- length of line.
+ def.lazy.length =
+ function( self )
+ local p1 = self.p1
+ local p2 = self.p2
+ local dx = p2.x - p1.x
+ local dy = p2.y - p1.y
+ local result = math.sqrt( dx*dx + dy*dy )
+ return result
+ end
+
+ -- center of line.
+ def.lazy.pc =
+ function( self )
+ local p1 = self.p1
+ local p2 = self.p2
+ local result = tikz.p{ ( p1.x + p2.x ) / 2, ( p1.y + p2.y ) / 2 }
+ return result
+ end
+
+ -- angle of line.
+ def.lazy.phi =
+ function( self )
+ local p1 = self.p1
+ local p2 = self.p2
+ local result = math.atan2( p2.y - p1.y, p2.x - p1.x )
+ return result
+ end
+
+ -- gets point at t (0-1).
+ def.proto.pt =
+ function( self, t )
+ if type( t ) ~= 'number' or t < 0 or t > 1
+ then
+ error( 'invalid pt' )
+ end
+
+ local p1 = self.p1
+ local p2 = self.p2
+ local phi = self.phi
+ local lt = self.length * t
+
+ return(
+ tikz.p{
+ p1.x + lt * math.cos( phi ),
+ p1.y + lt * math.sin( phi ),
+ }
+ )
+ end
+
+ -- intersects the line with another.
+ def.proto.intersectLine =
+ function( self, line )
+ local p1 = self.p1
+ local p2 = self.p2
+ local p3 = line.p1
+ local p4 = line.p2
+
+ if p1.x == p3.x and p1.y == p3.y then return p1 end
+ if p1.x == p4.x and p1.y == p4.y then return p1 end
+ if p2.x == p3.x and p2.y == p3.y then return p2 end
+ if p2.x == p4.x and p2.y == p4.y then return p2 end
+
+ local den = ( p1.x - p2.x )*( p3.y - p4.y ) - ( p1.y - p2.y )*( p3.x - p4.x );
+ if den == 0
+ then
+ -- doesn't intersect
+ return
+ end
+
+ local a = p1.x*p2.y - p1.y*p2.x;
+ local b = p3.x*p4.y - p3.y*p4.x;
+ local x = ( a*( p3.x - p4.x ) - ( p1.x - p2.x )*b ) / den;
+ local y = ( a*( p3.y - p4.y ) - ( p1.y - p2.y )*b ) / den;
+
+ if
+ (
+ ( x >= p1.x and x <= p2.x or x <= p1.x and x >= p2.x )
+ and ( x >= p3.x and x <= p4.x or x <= p3.x and x >= p4.x )
+ )
+ or
+ (
+ ( y >= p1.y and y <= p2.y or y <= p1.y and y >= p2.y )
+ and ( y >= p3.y and y <= p4.y or y <= p3.y and y >= p4.y )
+ )
+ then
+ return tikz.p{ x, y }
+ end
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { }
+ table.insert( s, zString( self.p1 ) )
+ table.insert( s, '--' )
+ table.insert( s, zString( self.p2 ) )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- Function plot.
+-------------------------------------------------------------------------------
+tikz.plot =
+immutable( function( def )
+ def.id = 'plot'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ return {
+ at = args.at,
+ from = args.from,
+ to = args.to,
+ step = args.step,
+ tension = args.tension,
+ func = args.func,
+ }
+ end
+
+ def.lazy.points =
+ function( self )
+ local from = self.from
+ local to = self.to
+ local step = self.step
+ if step == nil
+ then
+ step = ( to - from ) / 100
+ end
+ local points = { }
+ local d
+ local at = self.at or tikz.p0
+ for d = from, to, step
+ do
+ table.insert( points, at + self.func( d ) )
+ end
+ return points
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { 'plot' }
+ table.insert( s, '[' )
+ table.insert( s, 'smooth' )
+ if self.tension
+ then
+ table.insert( s, ',tension='..self.tension )
+ end
+ table.insert( s, ']' )
+
+ local points = self.points
+
+ table.insert( s, 'coordinates' )
+ table.insert( s, '{' )
+ for _, p in ipairs( points )
+ do
+ table.insert( s, zString( p ) )
+ end
+ table.insert( s, '}' )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A superEllipse
+-------------------------------------------------------------------------------
+tikz.superEllipse =
+immutable( function( def )
+ def.id = 'superEllipse'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ local at = args.at
+ local n = args.n
+ local xradius = args.xradius
+ local yradius = args.yradius
+
+ return {
+ at = at,
+ n = n,
+ xradius = xradius,
+ yradius = yradius,
+ }
+ end
+
+ -- returns p on degree (0-360)
+ def.proto.pdeg =
+ function( self, t )
+ if type( t ) ~= 'number' or t < 0 or t > 360
+ then
+ error( 'invalid pdeg' )
+ end
+
+ local at = self.at
+ local n = self.n
+ local xo = self.xradius * math.abs( math.cos( t * math.pi / 180 ) )^(2/n)
+ local yo = self.yradius * math.abs( math.sin( t * math.pi / 180 ) )^(2/n)
+
+ if t <= 90
+ then
+ return tikz.p{ at.x + xo, at.y + yo }
+ elseif t <= 180
+ then
+ return tikz.p{ at.x - xo, at.y + yo }
+ elseif t <= 270
+ then
+ return tikz.p{ at.x - xo, at.y - yo }
+ else
+ return tikz.p{ at.x + xo, at.y - yo }
+ end
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { }
+ local at = self.at
+ local xa = at.x
+ local ya = at.y
+ local n = self.n
+ local xr = self.xradius
+ local yr = self.yradius
+ table.insert( s, 'plot[domain=0:90,variable=\\t,smooth]' )
+ table.insert( s, '({'..xr..'*cos(\\t)^(2/'..n..')+'..xa..'},{'..yr..'*sin(\\t)^(2/'..n..')+'..ya..'})' )
+ table.insert( s, '--' )
+ table.insert( s, 'plot[domain=90:0,variable=\\t,smooth]' )
+ table.insert( s, '({-'..xr..'*cos(\\t)^(2/'..n..')+'..xa..'},{'..yr..'*sin(\\t)^(2/'..n..')+'..ya..'})' )
+ table.insert( s, '--' )
+ table.insert( s, 'plot[domain=0:90,variable=\\t,smooth]' )
+ table.insert( s, '({-'..xr..'*cos(\\t)^(2/'..n..')+'..xa..'},{-'..yr..'*sin(\\t)^(2/'..n..')+'..ya..'})' )
+ table.insert( s, '--' )
+ table.insert( s, 'plot[domain=90:0,variable=\\t,smooth]' )
+ table.insert( s, '({'..xr..'*cos(\\t)^(2/'..n..')+'..xa..'},{-'..yr..'*sin(\\t)^(2/'..n..')+'..ya..'})' )
+ table.insert( s, '-- cycle' )
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A reference to a named node.
+-------------------------------------------------------------------------------
+local optionsNamed =
+{
+ ref = false,
+ xshift = 'xshift',
+ yshift = 'yshift',
+}
+
+tikz.named =
+immutable( function( def )
+ def.id = 'named'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ local s = { }
+ _doOptions( s, args, optionsNamed, false, 2 )
+ return {
+ opts = table.concat( s, ' ' ),
+ ref = args.ref,
+ }
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { }
+ table.insert( s, '(' )
+ if self.opts
+ then
+ table.insert( s, self.opts )
+ end
+ table.insert( s, self.ref )
+ table.insert( s, ')' )
+ return table.concat( s )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- Multiple connected lines.
+-------------------------------------------------------------------------------
+tikz.polyline =
+immutable( function( def )
+ def.id = 'polyline'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ local o = { }
+ for _, v in ipairs( args )
+ do
+ table.insert( o, v )
+ end
+ return o
+ end
+
+ -- converts to a tikz string.
+ def.zString =
+ function( self )
+ local s = { '' }
+ for k, v in ipairs( self )
+ do
+ if k > 1 then table.insert( s, '--' ) end
+ table.insert( s, zString( v ) )
+ end
+ return table.concat( s, ' ' )
+ end
+end )
+
+-------------------------------------------------------------------------------
+-- A rectangle
+-------------------------------------------------------------------------------
+tikz.rect =
+immutable( function( def )
+ def.id = 'rect'
+
+ -- constructor
+ def.constructor =
+ function( args )
+ local psw
+ local pne
+
+ if args.pnw ~= nil
+ then
+ if args.pse ~= nil
+ then
+ psw = tikz.p{ args.pnw.x, args.pse.y }
+ pne = tikz.p{ args.pse.x, args.pnw.y }
+ elseif args.size ~= nil
+ then
+ psw = tikz.p{ args.pnw.x, args.pnw.y - args.size.y }
+ pne = tikz.p{ args.pnw.x + args.size.x, args.pnw.y }
+ else
+ error( 'invalid rect options', 2 )
+ end
+ elseif args.psw ~= nil
+ then
+ psw = args.psw
+ if args.pne ~= nil
+ then
+ pne = args.pne
+ elseif args.size ~= nil
+ then
+ pne = psw + args.size
+ else
+ error( 'invalid rect options', 2 )
+ end
+ elseif args.pse ~= nil
+ then
+ if args.size ~= nil
+ then
+ psw = tikz.p{ args.pse.x - args.size.x, args.pse.y }
+ pne = tikz.p{ args.pse.x, args.pse.y + args.size.y }
+ else
+ error( 'invalid rect options', 2 )
+ end
+ elseif args.pc ~= nil
+ then
+ if args.size ~= nil
+ then
+ psw = tikz.p{ args.pc.x - args.size.x / 2, args.pc.y - args.size.y / 2 }
+ pne = tikz.p{ args.pc.x + args.size.x / 2, args.pc.y + args.size.y / 2 }
+ else
+ error( 'invalid rect options', 2 )
+ end
+ else
+ error( 'invalid rect options', 2 )
+ end
+
+ return {
+ psw = psw,
+ pne = pne,
+ }
+ end
+
+ def.zString =
+ function( self )
+ local s = { }
+ table.insert( s, zString( self.psw ) )
+ table.insert( s, 'rectangle' )
+ table.insert( s, zString( self.pne ) )
+ return table.concat( s, ' ' )
+ end
+
+ def.lazy.e =
+ function( self )
+ return self.pne.x
+ end
+
+ def.lazy.height =
+ function( self )
+ return self.pne.y - self.psw.y
+ end
+
+ def.lazy.n =
+ function( self )
+ return self.pne.y
+ end
+
+ def.lazy.pc =
+ function( self )
+ return tikz.p{ self.psw.x + self.width / 2, self.psw.y + self.height / 2 }
+ end
+
+ def.lazy.pe =
+ function( self )
+ return tikz.p{ self.pne.x, self.psw.y + self.height / 2 }
+ end
+
+ def.lazy.pn =
+ function( self )
+ return tikz.p{ self.psw.x + self.width / 2, self.pne.y }
+ end
+
+ def.lazy.pnw =
+ function( self )
+ return tikz.p{ self.psw.x, self.pne.y }
+ end
+
+ def.lazy.ps =
+ function( self )
+ return tikz.p{ self.psw.x + self.width / 2, self.psw.y }
+ end
+
+ def.lazy.pse =
+ function( self )
+ return tikz.p{ self.pne.x, self.psw.y }
+ end
+
+ def.lazy.pw =
+ function( self )
+ return tikz.p{ self.psw.x, self.psw.y + self.height / 2 }
+ end
+
+ def.lazy.s =
+ function( self )
+ return self.psw.y
+ end
+
+ def.lazy.size =
+ function( self )
+ return tikz.p{ self.width, self.height }
+ end
+
+ def.lazy.w =
+ function( self )
+ return self.psw.x
+ end
+
+ def.lazy.width =
+ function( self )
+ return self.pne.x - self.psw.x
+ end
+end )
+
+
+--==========================================================================--
+-- STYLES --
+--==========================================================================--
+tikz.style =
+immutable( function( def )
+ def.id = 'style'
+
+ -- constructor
+ def.constructor =
+ function( name )
+ return { name=name }
+ end
+end )
+
+tikz.above = tikz.style( 'above' )
+tikz.arrow = tikz.style( '-{Latex}' )
+tikz.below = tikz.style( 'below' )
+tikz.dashed = tikz.style( 'dashed' )
+tikz.dotted = tikz.style( 'dotted' )
+tikz.double_arrow = tikz.style( '{Latex}-{Latex}' )
+tikz.even_odd_rule = tikz.style( 'even odd rule' )
+tikz.midway = tikz.style( 'midway' )
+
+--==========================================================================--
+-- OUTPUT ---
+--==========================================================================--
+
+--
+-- Writes out a named option.
+--
+-- ~s: string to build
+-- ~args: arguments
+-- ~name: name of option
+-- ~haveOpts: true if had options
+-- ~rename: if defined rename options on output
+--
+local function optionNamed( s, args, name, haveOpts, rename )
+
+ local v = args[ name ]
+
+ if not v
+ then
+ return haveOpts
+ end
+
+ if not rename
+ then
+ return haveOpts
+ end
+
+ if not haveOpts
+ then
+ table.insert( s, '[' )
+ else
+ table.insert( s, ',' )
+ end
+
+ if v == true
+ then
+ table.insert( s, rename )
+ else
+ table.insert( s, rename..'='..v )
+ end
+
+ return true
+end
+
+--
+-- Writes out an unnamed option.
+--
+-- ~s: string to build
+-- ~name: name of option
+-- ~haveOpts: true if had options
+--
+local function unnamedOption( s, name, haveOpts )
+ if not haveOpts
+ then
+ table.insert( s, '[' )
+ else
+ table.insert( s, ',' )
+ end
+ table.insert( s, name )
+ return true
+end
+
+--
+-- Custom key compare.
+--
+-- keys to put on top
+local topKeys =
+{
+ node_distance = true,
+}
+
+local function kcompare( ka, kb )
+ local ta = topKeys[ ka ]
+ local tb = topKeys[ kb ]
+ if ta and not tb then return true end
+ if not ta and tb then return false end
+ return ka < kb
+end
+
+--
+-- A helper to parse arguments to pass as drawing options to hand to tikz.
+--
+-- s: string to build
+-- args: the arguments to parse.
+-- opts: named options to pass on
+-- haveOpts: true [ has already been built
+-- level: call level for error throwing
+--
+local function _doOptions( s, args, opts, haveOpts, level )
+ args = flatten( args )
+
+ for _, v in ipairs( args )
+ do
+ if v.id == 'style'
+ then
+ haveOpts = unnamedOption( s, v.name, haveOpts )
+ end
+ end
+
+ local nkeys = { }
+ for key in pairs( args )
+ do
+ if type( key ) ~= 'number'
+ then
+ table.insert( nkeys, key )
+ end
+ end
+ table.sort( nkeys, kcompare )
+
+ for _, k in ipairs( nkeys )
+ do
+ local ok = opts[ k ]
+ if ok
+ then
+ haveOpts = optionNamed( s, args, k, haveOpts, ok )
+ elseif ok == nil
+ then
+ error( 'unknown option '..k, level + 1 )
+ end
+ end
+
+ haveOpts = _opts( s, args._opts, haveOpts )
+
+ if haveOpts
+ then
+ table.insert( s, ']' )
+ end
+end
+
+-------------------------------------------------------------------------------
+-- Drawing shapes.
+-------------------------------------------------------------------------------
+local optionsDraw =
+{
+ decorate = 'decorate',
+ decoration = 'decoration',
+ dash_pattern = 'dash pattern',
+ color = 'color',
+ draw = 'draw',
+ fill = 'fill',
+ line_cap = 'line cap',
+ line_width = 'line width',
+ opacity = 'opacity',
+ pattern = 'pattern',
+ rotate = 'rotate',
+ transform_canvas = 'transform canvas',
+ xshift = 'xshift',
+ yshift = 'yshift',
+ _butt_cap = '-Butt Cap',
+ butt_cap_ = 'Butt Cap-',
+ _round_cap = '-{Round Cap[]}',
+ round_cap_ = '{Round Cap[]}-',
+ _round_cap_ = '{Round Cap[]}-{Round Cap[]}',
+}
+
+--
+-- Puts out a bounding box command
+--
+tikz.boundingbox =
+function( args )
+ tprint( '\\pgfresetboundingbox' )
+ local s = { '\\path [use as bounding box] ' }
+ for _, v in ipairs( args )
+ do
+ if v.id ~= 'style'
+ then
+ table.insert( s, zString( v ) )
+ end
+ end
+ table.insert( s, ';' )
+ tprint( table.unpack( s ) )
+end
+
+--
+-- Puts out a draw command.
+--
+tikz.draw =
+function( args )
+ local s = { '\\draw ' }
+ _doOptions( s, args, optionsDraw, false, 2 )
+
+ for _, v in ipairs( args )
+ do
+ if v.id ~= 'style'
+ then
+ table.insert( s, zString( v ) )
+ end
+ end
+
+ table.insert( s, ';' )
+ tprint( table.unpack( s ) )
+end
+
+--
+-- Puts out a path command.
+--
+tikz.path =
+function( args )
+ local s = { '\\path' }
+ _doOptions( s, args, optionsDraw, false, 2 )
+
+ for _, v in ipairs( args )
+ do
+ if v.id ~= 'style'
+ then
+ table.insert( s, zString( v ) )
+ end
+ end
+ table.insert( s, ';' )
+ tprint( table.unpack( s ) )
+end
+
+--
+-- Puts out a bounding box.
+--
+tikz.clip =
+function( args )
+ local s = { '\\begin{pgfinterruptboundingbox}', '\\clip' }
+ _doOptions( s, args, optionsDraw, false, 2 )
+
+ for _, v in ipairs( args )
+ do
+ if v.id ~= 'style' then table.insert( s, zString( v ) ) end
+ end
+ table.insert( s, ';' )
+ table.insert( s, '\\end{pgfinterruptboundingbox}' )
+ tprint( table.unpack( s ) )
+end
+
+local shadeOptions =
+{
+ ball_color = 'ball color',
+ left_color = 'left color',
+ lower_left_color = 'lower left',
+ lower_right_color = 'lower right',
+ opacity = 'opacity',
+ right_color = 'right color',
+ shading = 'shading',
+ upper_left_color = 'upper left',
+ upper_right_color = 'upper right',
+}
+
+--
+-- Puts out a shade command.
+--
+tikz.shade =
+function( args )
+ local s = { '\\shade' }
+ _doOptions( s, args, shadeOptions, false, 2 )
+
+ for _, v in ipairs( args )
+ do
+ if v.id ~= 'style' then table.insert( s, zString( v ) ) end
+ end
+ table.insert( s, ';' )
+ tprint( table.unpack( s ) )
+end
+
+--
+-- Puts out z stuff.
+--
+tikz.put =
+function( args )
+ for _, v in ipairs( args )
+ do
+ local s = { }
+ if v.id == 'node'
+ then
+ table.insert( s, '\\' )
+ table.insert( s, zString( v ) )
+ table.insert( s, ';' )
+ else
+ error( 'unknown: ' .. v.id, 1 )
+ end
+ tprint( table.unpack( s ) )
+ end
+end
+
+tikz.declarehorizonalshading =
+function( args )
+ local steps = args.steps
+ local name = args.name
+ local s = { '\\pgfdeclarehorizontalshading{' .. name .. '}{100bp}{' }
+
+ local keys = { }
+ for k, _ in pairs( steps )
+ do
+ table.insert( keys, k )
+ end
+
+ table.sort( keys )
+ for _, k in ipairs( keys )
+ do
+ if _ > 1 then table.insert( s, ';' ) end
+ table.insert( s, 'color(' .. k .. 'bp)=(' .. steps[ k ] .. ')' )
+ end
+ table.insert( s, '}' )
+
+ tprint( table.unpack( s ) )
+end
+
+-------------------------------------------------------------------------------
+-- A node to be defined to tikZ
+-------------------------------------------------------------------------------
+local optionsNode =
+{
+ above = 'above',
+ anchor = 'anchor',
+ align = 'align',
+ at = false,
+ below = 'below',
+ color = 'color',
+ draw = 'draw',
+ left = 'left',
+ minimum_height = 'minimum height',
+ node_distance = 'node distance',
+ name = false,
+ right = 'right',
+ rotate = 'rotate',
+ text = false,
+ text_width = 'text width',
+}
+
+tikz.node =
+immutable( function( def )
+ def.id = 'node';
+
+ def.zString =
+ function( self )
+ local s = { 'node' }
+
+ table.insert( s, self.opts )
+ if self.name
+ then
+ table.insert( s, ' (' )
+ table.insert( s, self.name )
+ table.insert( s, ')' )
+ end
+
+ if self.at
+ then
+ table.insert( s, ' at ' )
+ table.insert( s, zString( self.at ) )
+ end
+
+ if self.text
+ then
+ table.insert( s, ' {' )
+ local text = string.gsub( self.text, '\n', '' )
+ table.insert( s, text )
+ table.insert( s, '}' )
+ end
+
+ return table.concat( s )
+ end
+
+ -- constructor
+ def.constructor =
+ function( args )
+ local s = { }
+ _doOptions( s, args, optionsNode, false, 2 )
+ return {
+ at = args.at,
+ name = args.name,
+ opts = table.concat( s, ' ' ),
+ text = args.text
+ }
+ end
+end )
+
+tikz.outfile =
+function( filename )
+ outfile = io.open( filename, 'w' )
+ outfile:write( '%%% DO NOT EDIT THIS FILE %%%\n' )
+end
+
+--
+-- Hacking help.
+--
+function _direct( args )
+ tprint( table.unpack( args ) )
+end
+
+--
+-- Checks version metch.
+--
+tikz.checkVersion =
+function( v )
+ if v ~= tikz.version
+ then
+ error( 'version mismatch', 1 )
+ end
+end
+
+--
+-- Creates a color.
+--
+tikz.colorRGB =
+function( red, green, blue )
+ return '{rgb,255:red,'..red..'; green,'..green..'; blue,'..blue..'}'
+end
+
+--
+-- Makes a tikz scope.
+-- Argument must be a function to call.
+--
+tikz.scope =
+function( args )
+ args = flatten( args )
+ if #args ~= 1 or type( args[ 1 ] ) ~= 'function'
+ then
+ error( 'scope needs a function parameter' )
+ end
+ _direct{ [[\begin{scope}]] }
+ args[ 1 ]( )
+ _direct{ [[\end{scope}]] }
+end
+
+--==========================================================================--
+-- SHORTCUTS
+--==========================================================================--
+tikz.p0 = tikz.p{ 0, 0 }
+
+
+--==========================================================================--
+-- Running code within tikz environment.
+--==========================================================================--
+
+local env_nesting = 0
+local org_env
+tikz.within =
+function( version )
+ if version ~= '*' and version ~= tikz.version
+ then
+ error( 'version mismatch', 1 )
+ end
+
+ env_nesting = env_nesting + 1
+ if env_nesting > 1
+ then
+ return
+ end
+
+ org_env = _ENV
+ local nenv = { }
+ local mt = { }
+ mt.__index =
+ function( _, key )
+ local zk = tikz[ key ]
+ if zk ~= nil
+ then
+ return zk
+ else
+ return org_env[ key ]
+ end
+ end
+ setmetatable( nenv, mt )
+ local func = debug.getinfo( 2 ).func
+ debug.setupvalue( func, 1, nenv )
+end
+
+tikz.without =
+function( )
+ env_nesting = env_nesting - 1
+ if env_nesting > 0 then return end
+ local func = debug.getinfo( 2 ).func
+ debug.setupvalue( func, 1, org_env )
+end
diff --git a/graphics/pgf/contrib/luatikz/luatikz.pdf b/graphics/pgf/contrib/luatikz/luatikz.pdf
new file mode 100644
index 0000000000..983105ad7f
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/luatikz.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/luatikz/luatikz.sty b/graphics/pgf/contrib/luatikz/luatikz.sty
new file mode 100644
index 0000000000..5847ab888a
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/luatikz.sty
@@ -0,0 +1,5 @@
+\ProvidesPackage{luatikz}[2024/12/04 2.12.0 Luatikz]
+%This package is just wrapper to load the luatikz code.
+\RequirePackage{luacode}
+\directlua{require('luatikz')}
+\endinput
diff --git a/graphics/pgf/contrib/luatikz/luatikz.tex b/graphics/pgf/contrib/luatikz/luatikz.tex
new file mode 100644
index 0000000000..d4bf734b1d
--- /dev/null
+++ b/graphics/pgf/contrib/luatikz/luatikz.tex
@@ -0,0 +1,204 @@
+\documentclass[a4paper,11pt]{ltxdoc}
+
+\usepackage[utf8]{inputenc}
+\usepackage{makeidx}\makeindex
+\usepackage{luatextra}
+\usepackage[margin=1in]{geometry}
+
+\usepackage{fancyvrb}
+\fvset{frame=single,numbers=left,numbersep=3pt,tabsize=4}
+
+\usepackage{tikz}
+\usetikzlibrary{math,backgrounds,calc,intersections,arrows.meta,external,decorations.pathreplacing,shadings}
+\directlua{dofile('./luatikz.lua')}
+
+\newcommand{\example}[2]
+{
+\par#2
+\VerbatimInput{example/#1.lua}
+{\centering
+\begin{tikzpicture}[framed,scale=1]
+\directlua{dofile('example/#1.lua')tikz.without()}
+\end{tikzpicture}\par}
+}
+
+\newcommand{\examplecode}[2]
+{
+\bigskip\par\noindent #2
+\VerbatimInput{example/#1.lua}
+}
+
+
+\title{luatikz}
+\author{Axel Kittenberger}
+\def\version{2.12.0}
+\date{luatikz version \version}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{1ex}
+
+\begin{document}
+
+\maketitle
+
+\section{Introduction}
+Luatikz is a graphics library to draw tikz graphics using the Lua programming language.
+
+\example{intro}
+{Following code draws two lines by specifying begin and end points. First using intermediatery variables and the second line within a single codeline:}
+
+Following \TeX{} wrapper can be used to compile the luatikz Lua code.
+\VerbatimInput{example/wrapper.tex}
+
+Luatikz obviously needs \LuaLaTeX{} to compile.
+
+Note that 2D graphics is a vast topic, functionality to luatikz has been and will be added on a per need basis.
+
+\section{Pointer math}
+
+Mathematical operations are possible with points, adding them with each other or multiplying them with a scalar.
+\example{spiral}{This example uses pointer math to create a spiral:}
+
+\newpage
+\section{Immutability}
+
+In luatikz pointers like all objects are immutable. That means a object once created in memory can no longer be changed.
+However the variable holding an object can be changed to another object with different attributes.
+
+\examplecode{immute1}{Thus following example is invalid:}
+\examplecode{immute2}{This on the other hand are two valid methods to change the value of p1}
+
+\newpage
+\section{luatikz objects}
+
+\subsection{Bezier (quatratic)}
+\example{bezier2}{A quadratic bezier curve is defined by it begin, end and a control point:}
+
+\newpage
+\subsection{Bezier (cubic)}
+\example{bezier3a}{A cubic bezier curve is defined by it begin, end and two control points:}
+
+\newpage
+A cubic bezier has the functions pt and phit that return the point and angle ranging from 0..1 on the curve.
+\example{bezier3b}{This example draw 10 normal lines onto the bezier curve:}
+
+\newpage
+\subsection{BLine}
+\example{blinea}{A bline is defined by it's begin and it's end. Additionally to the standard line it is bend}
+
+\newpage
+\subsection{Circle}
+\example{circle}{A circle is defined by it's center (``at'') and the circle ``radius'':}
+
+\newpage
+\subsection{Curve}
+\example{curvea}{A curve is defined by a list of points:}
+
+\newpage
+\example{curveb}{A curve can cycle and has a changeable tension:}
+
+\newpage
+\subsection{Ellipse}
+\example{ellipse}{An ellipse is difined by it's center (``at'') and a x- and yradius:}
+
+\newpage
+\subsection{EllipseArc}
+\example{ellipseArc}{An ellipse arc is a an ellipse limited by it's ``from'' and ``to'' angle:}
+
+\newpage
+\subsection{Line}
+\example{linea}{A line is defined by it's begin and it's end. There are two basic variants to define a line:}
+
+\example{lineb}{You can use intersectLine() to find the intersection of a line with another. If there is none ``nil'' will be returned:}
+
+\newpage
+\example{linec}{A line can also be defined by it's starting point, angle and length:}
+
+\example{lined}{``length'' and ``phi'' are attributes of a line:}
+
+\newpage
+\subsection{Plot}
+\example{plota}{A plot uses a function to determine a series of points on a curve. It takes values going ``from''--``to''. The function is to be a lua function that takes the input scalar and returns a point. The whole curve is offset ``at'' a point:}
+
+%\newpage
+%\subsection{SuperEllipse}
+%\example{superEllipse}{A ``super'' ellipse is just as an ellipse, but additionally has a strength factor ``n'' that ranges from diamond, to ellipse to rectangle:}
+
+\newpage
+\subsection{Polyline}
+\example{polylinea}{A polyline is a list of points to be connected via straight lines. If the string ``cycle'' is given at the end, it cycles:}
+
+\newpage
+\subsection{Rect}
+\example{recta}{Rectangles have various creation options. Also they provide a wide range of attributes of their points ``pnw'', ``pne'', ``psw'', ``pse'', ``pn'', ``pe'', ``ps'', ``pw'', ``pc'', ``height'', and ``width'':
+}
+
+\newpage
+\section{Labels a.k.a Nodes}
+
+Labels are created as nodes. Contrary to all other objects they do not need the ``draw'' command to be printed, but the ``put'' command. This is due any call to ``draw'' is turned into exactly one ``draw'' command to tikz and nodes in tikz are not using the ``draw'' command.
+
+\example{nodea}{In it's simplest form a node is specified by it's position and text. The double square brackets are Lua's way to make string constants that may contain simple blackslashes:}
+
+All constructors options of node are as follows; they correspond to the standard tikz options:
+\begin{itemize}
+ \item above
+ \item anchor
+ \item align
+ \item at
+ \item below
+ \item color
+ \item draw
+ \item left
+ \item minimum\_height
+ \item node\_distance
+ \item name
+ \item right
+ \item rotate
+ \item text
+ \item text\_width
+\end{itemize}
+\newpage
+
+\example{nodeb}{Another node example}
+
+\newpage
+\section{Styling}
+
+Styling is applied to draw commands by specifying style options, luatikz autodetects the difference between objects and styles.
+
+\example{stylea}{An example using arrows and dashes}
+
+\newpage
+\section{Shades}
+
+The ``shade'' command works analogous to classical tikz.
+
+\example{shadea}{For example a ball:}
+
+Recognized shade options are:
+\begin{itemize}
+ \item ball\_color
+ \item left\_color
+ \item lower\_left\_color
+ \item lower\_right\_color
+ \item opacity
+ \item right\_color
+ \item shading
+ \item upper\_left\_color
+ \item upper\_right\_color
+\end{itemize}
+
+\newpage
+\section{Some larger examples}
+
+\subsection{A radon projection}
+\example{radon1}{A radon projection, calculating correct projection curves:}
+
+\newpage
+\subsection{A sierpiński fractal}
+\example{sierpinski}{A sierpiński fractal. This one creates own temporary lua objects:}
+
+\printindex
+
+\end{document}
diff --git a/graphics/pgf/contrib/maritime/LICENSE b/graphics/pgf/contrib/maritime/LICENSE
new file mode 100644
index 0000000000..d470a91845
--- /dev/null
+++ b/graphics/pgf/contrib/maritime/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 N. E. Davis
+
+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/graphics/pgf/contrib/maritime/README.md b/graphics/pgf/contrib/maritime/README.md
new file mode 100644
index 0000000000..bd84664f1d
--- /dev/null
+++ b/graphics/pgf/contrib/maritime/README.md
@@ -0,0 +1,39 @@
+# `maritime`
+
+International maritime signal flags using TikZ.
+
+The `maritime` package provides LaTeX commands for drawing international maritime signal flags using TikZ. The [documentation](./doc/maritime-doc.pdf) covers the basic usage of the package.
+
+## Contact
+
+Author: N. E. Davis
+Email: neal.davis@protonmail.com
+GitHub username: @sigilante
+
+## License
+
+The `maritime` package is made available under the MIT License.
+
+```
+MIT License
+
+Copyright (c) 2025 N. E. Davis
+
+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/graphics/pgf/contrib/maritime/doc/maritime-doc.pdf b/graphics/pgf/contrib/maritime/doc/maritime-doc.pdf
new file mode 100644
index 0000000000..08e4947289
--- /dev/null
+++ b/graphics/pgf/contrib/maritime/doc/maritime-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/maritime/doc/maritime-doc.tex b/graphics/pgf/contrib/maritime/doc/maritime-doc.tex
new file mode 100644
index 0000000000..9f0cebc06c
--- /dev/null
+++ b/graphics/pgf/contrib/maritime/doc/maritime-doc.tex
@@ -0,0 +1,160 @@
+\documentclass{article}
+\usepackage{maritime}
+\usepackage{longtable} % For multi-page tables
+\usepackage{hyperref} % For hyperlinks
+\usepackage{xcolor} % For color in examples if needed
+
+\title{International Maritime Signal Flags Documentation}
+\author{N.\ E.\ Davis, \texttt{@sigilante}, \texttt{\textasciitilde lagrev-nocfep}}
+\date{\today}
+
+\begin{document}
+
+\maketitle
+
+\section{Introduction}
+
+The \textbf{maritime} package provides LaTeX commands for drawing international maritime signal flags using TikZ. This documentation covers the basic usage of the package.
+
+\section{Installation}
+To use this package, ensure your \texttt{maritime.sty} file is in a directory where LaTeX can find it (like \texttt{texmf-local/tex/latex/maritime/}) or in the same directory as your document.
+
+\section{Usage}
+
+\subsection{Drawing Flags}
+Flags are drawn using specific commands:
+
+\begin{itemize}
+ \item \verb|\flagZ|: Draws flag Z.
+ \item \verb|\flagO|: Draws flag O.
+ \item \verb|\flagR|: Draws flag R.
+ \item \verb|\flagP|: Draws flag P.
+\end{itemize}
+
+Here's how to use them. We suggest using \verb|\quad| to separate the flags as otherwise they abut.
+
+\begin{verbatim}
+ \flagZ
+ \flagO
+ \flagR
+ \flagP
+\end{verbatim}
+
+Example:
+
+\flagZ \quad \flagO \quad \flagR \quad \flagP
+
+Furthermore, we provide the standard name at \verb|\flagXname| and the blazon at \verb|\flagXblazon| for each flag \verb|X|.
+
+Example:
+
+\begin{verbatim}
+ \flagZname: \flagZblazon
+ \flagOname: \flagOblazon
+ \flagRname: \flagRblazon
+ \flagPname: \flagPblazon
+\end{verbatim}
+
+\noindent
+\flagZname: \flagZblazon \\
+\flagOname: \flagOblazon \\
+\flagRname: \flagRblazon \\
+\flagPname: \flagPblazon
+
+\section{The Flags}
+
+We supply the alphabetical International Code of Symbols maritime flags and the NATO number flags.
+
+\begin{longtable}{lcl}
+ \caption{International Maritime Signal Flags, Letters} \\
+ A \flagAname & \flagA & \flagAblazon \\
+ B \flagBname & \flagB & \flagBblazon \\
+ C \flagCname & \flagC & \flagCblazon \\
+ D \flagDname & \flagD & \flagDblazon \\
+ E \flagEname & \flagE & \flagEblazon \\
+ F \flagFname & \flagF & \flagFblazon \\
+ G \flagGname & \flagG & \flagGblazon \\
+ H \flagHname & \flagH & \flagHblazon \\
+ I \flagIname & \flagI & \flagIblazon \\
+ J \flagJname & \flagJ & \flagJblazon \\
+ K \flagKname & \flagK & \flagKblazon \\
+ L \flagLname & \flagL & \flagLblazon \\
+ M \flagMname & \flagM & \flagMblazon \\
+ N \flagNname & \flagN & \flagNblazon \\
+ O \flagOname & \flagO & \flagOblazon \\
+ P \flagPname & \flagP & \flagPblazon \\
+ Q \flagQname & \flagQ & \flagQblazon \\
+ R \flagRname & \flagR & \flagRblazon \\
+ S \flagSname & \flagS & \flagSblazon \\
+ T \flagTname & \flagT & \flagTblazon \\
+ U \flagUname & \flagU & \flagUblazon \\
+ V \flagVname & \flagV & \flagVblazon \\
+ W \flagWname & \flagW & \flagWblazon \\
+ X \flagXname & \flagX & \flagXblazon \\
+ Y \flagYname & \flagY & \flagYblazon \\
+ Z \flagZname & \flagZ & \flagZblazon \\
+\end{longtable}
+
+\begin{longtable}{lcl}
+ \caption{International Maritime Signal Flags, Numbers} \\
+ 0 \flagZeroName & \flagZero & \flagZeroBlazon \\
+ 1 \flagOneName & \flagOne & \flagOneBlazon \\
+ 2 \flagTwoName & \flagTwo & \flagTwoBlazon \\
+ 3 \flagThreeName & \flagThree & \flagThreeBlazon \\
+ 4 \flagFourName & \flagFour & \flagFourBlazon \\
+ 5 \flagFiveName & \flagFive & \flagFiveBlazon \\
+ 6 \flagSixName & \flagSix & \flagSixBlazon \\
+ 7 \flagSevenName & \flagSeven & \flagSevenBlazon \\
+ 8 \flagEightName & \flagEight & \flagEightBlazon \\
+ 9 \flagNineName & \flagNine & \flagNineBlazon \\
+\end{longtable}
+
+\subsection{Customization}
+
+\subsubsection{Size}
+
+The standard flag size is \verb|15ex|, meaning the height of the flag is 15 times the height of the letter `x'.
+
+\begin{verbatim}
+ \flagSix
+ \flagNine
+\end{verbatim}
+
+Example:
+
+\flagSix \quad \flagNine
+
+Flags can be scaled using standard LaTeX font size commands:
+
+\begin{verbatim}
+{\Large \flagU}
+{\normalsize \flagR}
+{\tiny \flagB}
+\end{verbatim}
+
+Example:
+
+{\Large \flagU} \quad {\normalsize \flagR} \quad {\tiny \flagB}
+
+They may also be explicitly scaled using the \verb|\resizebox| command:
+
+\begin{verbatim}
+ \resizebox{!}{5cm}{\flagI}
+ \resizebox{!}{0.5cm}{\flagT}
+\end{verbatim}
+
+Example:
+
+\resizebox{!}{5cm}{\flagI} \quad \resizebox{!}{0.5cm}{\flagT}
+
+\section{Conclusion}
+
+% enjoy yourself
+\begin{center}
+\flagE \space \flagN \space \flagJ \space \flagO \space \flagY \\
+
+\flagY \quad \flagO \quad \flagU \quad \flagR \\
+\quad \flagS \quad \flagE \quad \flagL \quad \flagF
+\end{center}
+
+\end{document}
diff --git a/graphics/pgf/contrib/maritime/tex/maritime.sty b/graphics/pgf/contrib/maritime/tex/maritime.sty
new file mode 100644
index 0000000000..fde4922fa7
--- /dev/null
+++ b/graphics/pgf/contrib/maritime/tex/maritime.sty
@@ -0,0 +1,671 @@
+% =============================================================================
+% worldflags.sty - International Maritime Signal Flags with TikZ
+% (c) N. E. Davis 2025-02-15
+% =============================================================================
+\ProvidesPackage{maritime}[2025/02/15 v1.0 International Maritime Signal Flags with TikZ]
+\RequirePackage{tikz}
+\RequirePackage{xcolor}
+\RequirePackage{etex}
+\RequirePackage{xkeyval}
+\RequirePackage{graphicx}
+\RequirePackage{xstring}
+\usetikzlibrary{calc,shadows,shapes,shapes.symbols,positioning,math,decorations.text}
+
+% ----------------------------------------------------------------------------
+% Default values
+% ----------------------------------------------------------------------------
+\makeatletter
+\newdimen\fl@gwidth
+\newdimen\fl@glength
+\newdimen\cutdepth
+\newdimen\saltiredepth
+
+\def\setflagdimensions{%
+ \fl@gwidth=15ex
+ \fl@glength=\fl@gwidth
+ \cutdepth=0.75\fl@gwidth
+ % 1.414 / 10 = 0.1414
+ \saltiredepth=0.1414\fl@gwidth
+}
+\def\fl@gvariant{0} % 2022-07-09
+\def\fl@gstretch{0}
+\def\fr@mecolor{black!60}
+\def\gr@dcolor{black!80}
+\newif\if@mbl@m\@mbl@mtrue
+\newif\if@rid\@ridfalse
+\newif\ifn@@mbl@m\n@@mbl@mtrue
+\def\view@ngle{0}
+\def\hang@ngle{0}
+
+% ----------------------------------------------------------------------------
+% Colors
+% ----------------------------------------------------------------------------
+\definecolor{gridcolor}{rgb}{0.8,0.8,0.8}
+
+\definecolor{argent}{rgb}{1.0,1.0,1.0}
+\definecolor{or}{rgb}{1.0,1.0,0.0}
+\definecolor{gules}{rgb}{1.0,0.0,0.0}
+\definecolor{azure}{rgb}{0.0,0.5,1.0}
+\definecolor{vert}{rgb}{0.0,0.5,0.0}
+\definecolor{sable}{rgb}{0.0,0.0,0.0}
+
+% ----------------------------------------------------------------------------
+% Base flag
+% ----------------------------------------------------------------------------
+% A Alfa, swallowtailed per pale argent and azure
+\newcommand{\flagAname}{Alfa}
+\newcommand{\flagAblazon}{swallowtailed per pale argent and azure}
+\newcommand{\flagA}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (0.5\fl@gwidth,\fl@glength);
+ \fill [azure] (0.5\fl@gwidth,0)
+ -- (\fl@gwidth,0)
+ -- (\cutdepth,0.5\fl@glength)
+ -- (\fl@gwidth,\fl@glength)
+ -- (0.5\fl@gwidth,\fl@glength)
+ -- cycle;
+ \draw [gridcolor] (0,0)
+ -- (\fl@gwidth,0)
+ -- (\cutdepth,0.5\fl@glength)
+ -- (\fl@gwidth,\fl@glength)
+ -- (0,\fl@glength)
+ -- cycle;
+ \end{tikzpicture}%
+}
+
+% B Bravo, swallowtailed gules
+\newcommand{\flagBname}{Bravo}
+\newcommand{\flagBblazon}{swallowtailed gules}
+\newcommand{\flagB}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [gules] (00,0)
+ -- (\fl@gwidth,0)
+ -- (\cutdepth,0.5\fl@glength)
+ -- (\fl@gwidth,\fl@glength)
+ -- (0,\fl@glength)
+ -- cycle;
+ \draw [gridcolor] (0,0)
+ -- (\fl@gwidth,0)
+ -- (\cutdepth,0.5\fl@glength)
+ -- (\fl@gwidth,\fl@glength)
+ -- (0,\fl@glength)
+ -- cycle;
+ \end{tikzpicture}%
+}
+
+% C Charlie, azure a fess gules fimbriated argent
+\newcommand{\flagCname}{Charlie}
+\newcommand{\flagCblazon}{azure a fess gules fimbriated argent}
+\newcommand{\flagC}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [azure] (0,0) rectangle (\fl@gwidth,0.2\fl@glength);
+ \fill [argent] (0,0.2\fl@glength) rectangle (\fl@gwidth,0.4\fl@glength);
+ \fill [gules] (0,0.4\fl@glength) rectangle (\fl@gwidth,0.6\fl@glength);
+ \fill [argent] (0,0.6\fl@glength) rectangle (\fl@gwidth,0.8\fl@glength);
+ \fill [azure] (0,0.8\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% D Delta, gules a pale argent
+\newcommand{\flagDname}{Delta}
+\newcommand{\flagDblazon}{gules a pale argent}
+\newcommand{\flagD}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (\fl@gwidth,0.25\fl@glength);
+ \fill [azure] (0,0.25\fl@glength) rectangle (\fl@gwidth,0.75\fl@glength);
+ \fill [or] (0,0.75\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% E Echo, per fess azure and gules
+\newcommand{\flagEname}{Echo}
+\newcommand{\flagEblazon}{per fess azure and gules}
+\newcommand{\flagE}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [gules] (0,0) rectangle (\fl@gwidth,0.5\fl@glength);
+ \fill [azure] (0,0.5\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% F Foxtrot, argent, a lozenge throughout gules
+\newcommand{\flagFname}{Foxtrot}
+\newcommand{\flagFblazon}{argent, a lozenge throughout gules}
+\newcommand{\flagF}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [gules] (0.5\fl@gwidth,0)
+ -- (\fl@gwidth,0.5\fl@glength)
+ -- (0.5\fl@gwidth,\fl@glength)
+ -- (0,0.5\fl@glength)
+ -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% G Golf, Paly of six or and azure
+\newcommand{\flagGname}{Golf}
+\newcommand{\flagGblazon}{Paly of six or and azure}
+\newcommand{\flagG}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (0.1666667\fl@gwidth,\fl@glength);
+ \fill [azure] (0.1666667\fl@gwidth,0) rectangle (0.3333333\fl@gwidth,\fl@glength);
+ \fill [or] (0.3333333\fl@gwidth,0) rectangle (0.5\fl@gwidth,\fl@glength);
+ \fill [azure] (0.5\fl@gwidth,0) rectangle (0.6666667\fl@gwidth,\fl@glength);
+ \fill [or] (0.6666667\fl@gwidth,0) rectangle (0.8333333\fl@gwidth,\fl@glength);
+ \fill [azure] (0.8333333\fl@gwidth,0) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% H Hotel, per pale argent and gules
+\newcommand{\flagHname}{Hotel}
+\newcommand{\flagHblazon}{per pale argent and gules}
+\newcommand{\flagH}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (0.5\fl@gwidth,\fl@glength);
+ \fill [gules] (0.5\fl@gwidth,0) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% I India, or, a pellet
+\newcommand{\flagIname}{India}
+\newcommand{\flagIblazon}{or, a pellet}
+\newcommand{\flagI}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [sable] (0.5\fl@gwidth,0.5\fl@glength) circle (0.25\fl@gwidth);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% J Juliet, azure, a fess argent
+\newcommand{\flagJname}{Juliet}
+\newcommand{\flagJblazon}{azure, a fess argent}
+\newcommand{\flagJ}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [azure] (0,0) rectangle (\fl@gwidth,0.333333*\fl@glength);
+ \fill [argent] (0,0.333333*\fl@glength) rectangle (\fl@gwidth,0.666667*\fl@glength);
+ \fill [azure] (0,0.666667*\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% K Kilo, per pale or and azure
+\newcommand{\flagKname}{Kilo}
+\newcommand{\flagKblazon}{per pale or and azure}
+\newcommand{\flagK}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (0.5\fl@gwidth,\fl@glength);
+ \fill [azure] (0.5\fl@gwidth,0) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% L Lima, quarterly or and sable
+\newcommand{\flagLname}{Lima}
+\newcommand{\flagLblazon}{quarterly or and sable}
+\newcommand{\flagL}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [sable] (0,0) rectangle (0.5\fl@gwidth,0.5\fl@glength);
+ \fill [or] (0.5\fl@gwidth,0) rectangle (\fl@gwidth,0.5\fl@glength);
+ \fill [or] (0,0.5\fl@glength) rectangle (0.5\fl@gwidth,\fl@glength);
+ \fill [sable] (0.5\fl@gwidth,0.5\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% M Mike, azure, a saltire argent
+\newcommand{\flagMname}{Mike}
+\newcommand{\flagMblazon}{azure, a saltire argent}
+\newcommand{\flagM}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [azure] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [argent] (0,0)
+ -- (\saltiredepth,0)
+ -- (\fl@gwidth,\fl@glength-\saltiredepth)
+ -- (\fl@gwidth,\fl@glength)
+ -- (\fl@gwidth-\saltiredepth,\fl@glength)
+ -- (0,\saltiredepth)
+ -- cycle;
+ \fill [argent] (0,\fl@glength)
+ -- (\saltiredepth,\fl@glength)
+ -- (\fl@gwidth,\saltiredepth)
+ -- (\fl@gwidth,0)
+ -- (\fl@gwidth-\saltiredepth,0)
+ -- (0,\fl@glength-\saltiredepth)
+ -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% N November, chequy of sixteen azure and argent
+\newcommand{\flagNname}{November}
+\newcommand{\flagNblazon}{chequy of sixteen azure and argent}
+\newcommand{\flagN}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (0.25\fl@gwidth,0.25\fl@glength);
+ \fill [azure] (0.25\fl@gwidth,0) rectangle (0.5\fl@gwidth,0.25\fl@glength);
+ \fill [argent] (0.5\fl@gwidth,0) rectangle (0.75\fl@gwidth,0.25\fl@glength);
+ \fill [azure] (0.75\fl@gwidth,0) rectangle (\fl@gwidth,0.25\fl@glength);
+ \fill [azure] (0,0.25\fl@glength) rectangle (0.25\fl@gwidth,0.5\fl@glength);
+ \fill [argent] (0.25\fl@gwidth,0.25\fl@glength) rectangle (0.5\fl@gwidth,0.5\fl@glength);
+ \fill [azure] (0.5\fl@gwidth,0.25\fl@glength) rectangle (0.75\fl@gwidth,0.5\fl@glength);
+ \fill [argent] (0.75\fl@gwidth,0.25\fl@glength) rectangle (\fl@gwidth,0.5\fl@glength);
+ \fill [argent] (0,0.5\fl@glength) rectangle (0.25\fl@gwidth,0.75\fl@glength);
+ \fill [azure] (0.25\fl@gwidth,0.5\fl@glength) rectangle (0.5\fl@gwidth,0.75\fl@glength);
+ \fill [argent] (0.5\fl@gwidth,0.5\fl@glength) rectangle (0.75\fl@gwidth,0.75\fl@glength);
+ \fill [azure] (0.75\fl@gwidth,0.5\fl@glength) rectangle (\fl@gwidth,0.75\fl@glength);
+ \fill [azure] (0,0.75\fl@glength) rectangle (0.25\fl@gwidth,\fl@glength);
+ \fill [argent] (0.25\fl@gwidth,0.75\fl@glength) rectangle (0.5\fl@gwidth,\fl@glength);
+ \fill [azure] (0.5\fl@gwidth,0.75\fl@glength) rectangle (0.75\fl@gwidth,\fl@glength);
+ \fill [argent] (0.75\fl@gwidth,0.75\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% O Oscar, per bend gules and or
+\newcommand{\flagOname}{Oscar}
+\newcommand{\flagOblazon}{per bend gules and or}
+\newcommand{\flagO}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) -- (0,\fl@glength) -- (\fl@gwidth,0) -- cycle;
+ \fill [gules] (0,\fl@glength) -- (\fl@gwidth,\fl@glength) -- (\fl@gwidth,0) -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% P Papa, azure, an inescutcheon argent
+\newcommand{\flagPname}{Papa}
+\newcommand{\flagPblazon}{azure, an inescutcheon argent}
+\newcommand{\flagP}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [azure] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [argent] (0.333333\fl@gwidth,0.333333\fl@glength) rectangle (0.666667\fl@gwidth,0.666667\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% Q Quebec, or
+\newcommand{\flagQname}{Quebec}
+\newcommand{\flagQblazon}{or}
+\newcommand{\flagQ}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% R Romeo, gules, a cross or
+\newcommand{\flagRname}{Romeo}
+\newcommand{\flagRblazon}{gules, a cross or}
+\newcommand{\flagR}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [gules] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [or] (0.4\fl@gwidth,0) rectangle (0.6\fl@gwidth,\fl@glength);
+ \fill [or] (0,0.4\fl@glength) rectangle (\fl@gwidth,0.6\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% S Sierra, argent, an inescutcheon azure
+\newcommand{\flagSname}{Sierra}
+\newcommand{\flagSblazon}{argent, an inescutcheon azure}
+\newcommand{\flagS}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [azure] (0.333333\fl@gwidth,0.333333\fl@glength) rectangle (0.666667\fl@gwidth,0.666667\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% T Tango, tierced in pale gules, argent and azure
+\newcommand{\flagTname}{Tango}
+\newcommand{\flagTblazon}{tierced in pale gules, argent and azure}
+\newcommand{\flagT}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [gules] (0,0) rectangle (0.333333\fl@gwidth,\fl@glength);
+ \fill [argent] (0.333333\fl@gwidth,0) rectangle (0.666667\fl@gwidth,\fl@glength);
+ \fill [azure] (0.666667\fl@gwidth,0) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% U Uniform, quarterly gules and argent
+\newcommand{\flagUname}{Uniform}
+\newcommand{\flagUblazon}{quarterly gules and argent}
+\newcommand{\flagU}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (0.5\fl@gwidth,0.5\fl@glength);
+ \fill [gules] (0.5\fl@gwidth,0) rectangle (\fl@gwidth,0.5\fl@glength);
+ \fill [gules] (0,0.5\fl@glength) rectangle (0.5\fl@gwidth,\fl@glength);
+ \fill [argent] (0.5\fl@gwidth,0.5\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% V Victor, argent, a saltire gules
+\newcommand{\flagVname}{Victor}
+\newcommand{\flagVblazon}{argent, a saltire gules}
+\newcommand{\flagV}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [gules] (0,0)
+ -- (\saltiredepth,0)
+ -- (\fl@gwidth,\fl@glength-\saltiredepth)
+ -- (\fl@gwidth,\fl@glength)
+ -- (\fl@gwidth-\saltiredepth,\fl@glength)
+ -- (0,\saltiredepth)
+ -- cycle;
+ \fill [gules] (0,\fl@glength)
+ -- (\saltiredepth,\fl@glength)
+ -- (\fl@gwidth,\saltiredepth)
+ -- (\fl@gwidth,0)
+ -- (\fl@gwidth-\saltiredepth,0)
+ -- (0,\fl@glength-\saltiredepth)
+ -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% W Whiskey, azure, an inescutcheon gules fimbriated argent
+\newcommand{\flagWname}{Whiskey}
+\newcommand{\flagWblazon}{azure, an inescutcheon gules fimbriated argent}
+\newcommand{\flagW}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [azure] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [argent] (0.2\fl@gwidth,0.2\fl@glength) rectangle (0.8\fl@gwidth,0.8\fl@glength);
+ \fill [gules] (0.4\fl@gwidth,0.4\fl@glength) rectangle (0.6\fl@gwidth,0.6\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% X X-ray, argent, a cross azure
+\newcommand{\flagXname}{X-ray}
+\newcommand{\flagXblazon}{argent, a cross azure}
+\newcommand{\flagX}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [azure] (0.4\fl@gwidth,0) rectangle (0.6\fl@gwidth,\fl@glength);
+ \fill [azure] (0,0.4\fl@glength) rectangle (\fl@gwidth,0.6\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% Y Yankee, bendy sinister of ten or and gules
+\newcommand{\flagYname}{Yankee}
+\newcommand{\flagYblazon}{bendy sinister of ten or and gules}
+\newcommand{\flagY}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [gules] (0,0.8\fl@glength)
+ -- (0.2\fl@gwidth,\fl@glength)
+ -- (0.4\fl@gwidth,\fl@glength)
+ -- (0,0.6\fl@glength)
+ -- cycle;
+ \fill [gules] (0,0.4\fl@glength)
+ -- (0.6\fl@gwidth,\fl@glength)
+ -- (0.8\fl@gwidth,\fl@glength)
+ -- (0,0.2\fl@glength)
+ -- cycle;
+ \fill [gules] (0,0)
+ -- (\fl@gwidth,\fl@glength)
+ -- (\fl@gwidth,0.8\fl@glength)
+ -- (0.2\fl@gwidth,0)
+ -- cycle;
+ \fill [gules] (0.4\fl@gwidth,0)
+ -- (\fl@gwidth,0.6\fl@glength)
+ -- (\fl@gwidth,0.4\fl@glength)
+ -- (0.6\fl@gwidth,0)
+ -- cycle;
+ \fill [gules] (0.8\fl@gwidth,0)
+ -- (\fl@gwidth,0.2\fl@glength)
+ -- (\fl@gwidth,0)
+ -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% Z Zulu, per saltire or, sable, gules, and azure
+\newcommand{\flagZname}{Zulu}
+\newcommand{\flagZblazon}{per saltire or, sable, gules, and azure}
+\newcommand{\flagZ}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [sable] (0,0) -- (0,\fl@glength) -- (0.5\fl@gwidth,0.5\fl@glength) -- cycle;
+ \fill [gules] (0,0) -- (\fl@gwidth,0) -- (0.5\fl@gwidth,0.5\fl@glength) -- cycle;
+ \fill [azure] (\fl@gwidth,0) -- (\fl@gwidth,\fl@glength) -- (0.5\fl@gwidth,0.5\fl@glength) -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 0 Zero, argent, five crosses hummetty azure in saltire
+\newcommand{\flagZeroName}{Zero}
+\newcommand{\flagZeroBlazon}{argent, five crosses hummetty azure in saltire}
+\newcommand{\flagZero}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ %
+ \fill [azure] (0.066667\fl@gwidth,0.066667\fl@glength) rectangle (0.266667\fl@gwidth,0.266667\fl@glength);
+ \fill [argent] (0.066667\fl@gwidth,0.066667\fl@glength) rectangle (0.133333\fl@gwidth,0.133333\fl@glength);
+ \fill [argent] (0.066667\fl@gwidth,0.2\fl@glength) rectangle (0.133333\fl@gwidth,0.266667\fl@glength);
+ \fill [argent] (0.2\fl@gwidth,0.066667\fl@glength) rectangle (0.266667\fl@gwidth,0.133333\fl@glength);
+ \fill [argent] (0.2\fl@gwidth,0.2\fl@glength) rectangle (0.266667\fl@gwidth,0.266667\fl@glength);
+ \draw [argent] (0.066667\fl@gwidth,0.066667\fl@glength) rectangle (0.266667\fl@gwidth,0.266667\fl@glength);
+ %
+ \fill [azure] (0.066667\fl@gwidth,0.733333\fl@glength) rectangle (0.266667\fl@gwidth,0.933333\fl@glength);
+ \fill [argent] (0.066667\fl@gwidth,0.733333\fl@glength) rectangle (0.133333\fl@gwidth,0.8\fl@glength);
+ \fill [argent] (0.066667\fl@gwidth,0.866667\fl@glength) rectangle (0.133333\fl@gwidth,0.933333\fl@glength);
+ \fill [argent] (0.2\fl@gwidth,0.733333\fl@glength) rectangle (0.266667\fl@gwidth,0.8\fl@glength);
+ \fill [argent] (0.2\fl@gwidth,0.866667\fl@glength) rectangle (0.266667\fl@gwidth,0.933333\fl@glength);
+ \draw [argent] (0.066667\fl@gwidth,0.733333\fl@glength) rectangle (0.266667\fl@gwidth,0.933333\fl@glength);
+ %
+ \fill [azure] (0.733333\fl@gwidth,0.066667\fl@glength) rectangle (0.933333\fl@gwidth,0.266667\fl@glength);
+ \fill [argent] (0.733333\fl@gwidth,0.066667\fl@glength) rectangle (0.8\fl@gwidth,0.133333\fl@glength);
+ \fill [argent] (0.733333\fl@gwidth,0.2\fl@glength) rectangle (0.8\fl@gwidth,0.266667\fl@glength);
+ \fill [argent] (0.866667\fl@gwidth,0.066667\fl@glength) rectangle (0.933333\fl@gwidth,0.133333\fl@glength);
+ \fill [argent] (0.866667\fl@gwidth,0.2\fl@glength) rectangle (0.933333\fl@gwidth,0.266667\fl@glength);
+ \draw [argent] (0.733333\fl@gwidth,0.066667\fl@glength) rectangle (0.933333\fl@gwidth,0.266667\fl@glength);
+ %
+ \fill [azure] (0.733333\fl@gwidth,0.733333\fl@glength) rectangle (0.933333\fl@gwidth,0.933333\fl@glength);
+ \fill [argent] (0.733333\fl@gwidth,0.733333\fl@glength) rectangle (0.8\fl@gwidth,0.8\fl@glength);
+ \fill [argent] (0.733333\fl@gwidth,0.866667\fl@glength) rectangle (0.8\fl@gwidth,0.933333\fl@glength);
+ \fill [argent] (0.866667\fl@gwidth,0.733333\fl@glength) rectangle (0.933333\fl@gwidth,0.8\fl@glength);
+ \fill [argent] (0.866667\fl@gwidth,0.866667\fl@glength) rectangle (0.933333\fl@gwidth,0.933333\fl@glength);
+ \draw [argent] (0.733333\fl@gwidth,0.733333\fl@glength) rectangle (0.933333\fl@gwidth,0.933333\fl@glength);
+ % cross centered on 0.5\fl@gwidth, 0.5\fl@glength
+ \fill [azure] (0.4\fl@gwidth,0.4\fl@glength) rectangle (0.6\fl@gwidth,0.6\fl@glength);
+ \fill [argent] (0.4\fl@gwidth,0.4\fl@glength) rectangle (0.466667\fl@gwidth,0.466667\fl@glength);
+ \fill [argent] (0.4\fl@gwidth,0.533333\fl@glength) rectangle (0.466667\fl@gwidth,0.6\fl@glength);
+ \fill [argent] (0.533333\fl@gwidth,0.4\fl@glength) rectangle (0.6\fl@gwidth,0.466667\fl@glength);
+ \fill [argent] (0.533333\fl@gwidth,0.533333\fl@glength) rectangle (0.6\fl@gwidth,0.6\fl@glength);
+ \draw [argent] (0.4\fl@gwidth,0.4\fl@glength) rectangle (0.6\fl@gwidth,0.6\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 1 One, gules, a fess or
+\newcommand{\flagOneName}{One}
+\newcommand{\flagOneBlazon}{gules, a fess or}
+\newcommand{\flagOne}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [gules] (0,0) rectangle (\fl@gwidth,0.333333\fl@glength);
+ \fill [or] (0,0.333333\fl@glength) rectangle (\fl@gwidth,0.666667\fl@glength);
+ \fill [gules] (0,0.666667\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 2 Two, or, a fess gules
+\newcommand{\flagTwoName}{Two}
+\newcommand{\flagTwoBlazon}{or, a fess gules}
+\newcommand{\flagTwo}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (\fl@gwidth,0.333333\fl@glength);
+ \fill [gules] (0,0.333333\fl@glength) rectangle (\fl@gwidth,0.666667\fl@glength);
+ \fill [or] (0,0.666667\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 3 Three, azure, a fess gules
+\newcommand{\flagThreeName}{Three}
+\newcommand{\flagThreeBlazon}{azure, a fess gules}
+\newcommand{\flagThree}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [azure] (0,0) rectangle (\fl@gwidth,0.333333\fl@glength);
+ \fill [gules] (0,0.333333\fl@glength) rectangle (\fl@gwidth,0.666667\fl@glength);
+ \fill [azure] (0,0.666667\fl@glength) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 4 Four, gules, a saltire argent
+\newcommand{\flagFourName}{Four}
+\newcommand{\flagFourBlazon}{gules, a saltire argent}
+\newcommand{\flagFour}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [gules] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [argent] (0,0)
+ -- (\saltiredepth,0)
+ -- (\fl@gwidth,\fl@glength-\saltiredepth)
+ -- (\fl@gwidth,\fl@glength)
+ -- (\fl@gwidth-\saltiredepth,\fl@glength)
+ -- (0,\saltiredepth)
+ -- cycle;
+ \fill [argent] (0,\fl@glength)
+ -- (\saltiredepth,\fl@glength)
+ -- (\fl@gwidth,\saltiredepth)
+ -- (\fl@gwidth,0)
+ -- (\fl@gwidth-\saltiredepth,0)
+ -- (0,\fl@glength-\saltiredepth)
+ -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 5 Five, or, a saltire azure
+\newcommand{\flagFiveName}{Five}
+\newcommand{\flagFiveBlazon}{or, a saltire azure}
+\newcommand{\flagFive}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [azure] (0,0)
+ -- (\saltiredepth,0)
+ -- (\fl@gwidth,\fl@glength-\saltiredepth)
+ -- (\fl@gwidth,\fl@glength)
+ -- (\fl@gwidth-\saltiredepth,\fl@glength)
+ -- (0,\saltiredepth)
+ -- cycle;
+ \fill [azure] (0,\fl@glength)
+ -- (\saltiredepth,\fl@glength)
+ -- (\fl@gwidth,\saltiredepth)
+ -- (\fl@gwidth,0)
+ -- (\fl@gwidth-\saltiredepth,0)
+ -- (0,\fl@glength-\saltiredepth)
+ -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 6 Six, bendy sinister of seven argent and azure
+\newcommand{\flagSixName}{Six}
+\newcommand{\flagSixBlazon}{bendy sinister of seven argent and azure}
+\newcommand{\flagSix}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [argent] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \fill [azure] (0,0.142857\fl@glength)
+ -- (0.857143\fl@gwidth,\fl@glength)
+ -- (\fl@gwidth,\fl@glength)
+ -- (\fl@gwidth,0.857143\fl@glength)
+ -- (0.142857\fl@gwidth,0)
+ -- (0,0)
+ -- cycle;
+ \fill [azure] (0,0.428571\fl@glength)
+ -- (0.571429\fl@gwidth,\fl@glength)
+ -- (0.285714\fl@gwidth,\fl@glength)
+ -- (0,0.714286\fl@glength)
+ -- cycle;
+ \fill [azure] (\fl@gwidth,0.571429\fl@glength)
+ -- (\fl@gwidth,0.285714\fl@glength)
+ -- (0.714286\fl@gwidth,0)
+ -- (0.428571\fl@gwidth,0)
+ -- cycle;
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 7 Seven, gules, a pale argent
+\newcommand{\flagSevenName}{Seven}
+\newcommand{\flagSevenBlazon}{gules, a pale argent}
+\newcommand{\flagSeven}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [gules] (0,0) rectangle (0.333333\fl@gwidth,\fl@glength);
+ \fill [argent] (0.333333\fl@gwidth,0) rectangle (0.666667\fl@gwidth,\fl@glength);
+ \fill [gules] (0.666667\fl@gwidth,0) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 8 Eight, or, a pale azure
+\newcommand{\flagEightName}{Eight}
+\newcommand{\flagEightBlazon}{or, a pale azure}
+\newcommand{\flagEight}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [or] (0,0) rectangle (0.333333\fl@gwidth,\fl@glength);
+ \fill [azure] (0.333333\fl@gwidth,0) rectangle (0.666667\fl@gwidth,\fl@glength);
+ \fill [or] (0.666667\fl@gwidth,0) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
+
+% 9 Nine, azure, a pale argent
+\newcommand{\flagNineName}{Nine}
+\newcommand{\flagNineBlazon}{azure, a pale argent}
+\newcommand{\flagNine}{%
+ \setflagdimensions
+ \begin{tikzpicture}
+ \fill [azure] (0,0) rectangle (0.333333\fl@gwidth,\fl@glength);
+ \fill [argent] (0.333333\fl@gwidth,0) rectangle (0.666667\fl@gwidth,\fl@glength);
+ \fill [azure] (0.666667\fl@gwidth,0) rectangle (\fl@gwidth,\fl@glength);
+ \draw [gridcolor] (0,0) rectangle (\fl@gwidth,\fl@glength);
+ \end{tikzpicture}%
+}
diff --git a/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdf b/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdf
index bf929693ef..aa999d601b 100644
--- a/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdf
+++ b/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex b/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex
index b05a67fe68..f3c60c9d00 100644
--- a/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex
+++ b/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex
@@ -1,13 +1,16 @@
% !TeX TXS-program:compile = txs:///arara
-% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode}
-% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+% 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[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.5}
-\def\TPdate{13 décembre 2023}
+\def\TPversion{0.1.6}
+\def\TPdate{29 août 2024}
+\usepackage{amssymb}
\usepackage[table,svgnames]{xcolor}
-\usepackage[bold-style=ISO,math-style=french]{concmath-otf}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%\usepackage[bold-style=ISO,math-style=french]{concmath-otf}
%\usepackage[bold-style=ISO,math-style=french]{unicode-math}
%\setmainfont{TeX Gyre Schola}
%\setmathfont{TeX Gyre Schola Math}
@@ -91,8 +94,8 @@
\newcommand\affichegrille[4]{%
\draw[xstep=1,ystep=1,lightgray] (#1,#3) grid (#2,#4) ;
- \foreach \x in {#1,\inteval{1+#1},...,#2} \draw[lightgray] (\x,#4)--++(0,3pt) node[font=\scriptsize,above] {$\x$} ;
- \foreach \y in {#3,\inteval{1+#3},...,#4} \draw[lightgray] (#1,\y)--++(-3pt,0) node[font=\scriptsize,left] {$\y$} ;
+ \foreach \x in {#1,\inteval{1+#1},...,#2} {\draw[lightgray] (\x,#4)--++(0,3pt) node[font=\scriptsize,above] {$\x$} ;}
+ \foreach \y in {#3,\inteval{1+#3},...,#4} {\draw[lightgray] (#1,\y)--++(-3pt,0) node[font=\scriptsize,left] {$\y$} ;}
}
\newcommand\pointsutiles[1]{%
\foreach \point in {#1} {\draw[thick,fill=red] \point circle[radius=3pt] ;}
@@ -170,7 +173,7 @@
\vfill
-\hfill\textit{Merci à Arnaud pour ses retours et idées !!}
+\hfill\textit{Merci à Arnaud et Cyril pour leurs retours et idées !!}
\vfill
@@ -197,7 +200,9 @@
\part{Historique}
-\verb|v0.1.4 : |Modification de la graduation intérieure pour les rapporteurs 180°
+\verb|v0.1.6 : |Correction d'un bug avec une compilation en \textsf{pdflatex} + Améliorations pour les rotations des labels
+
+\verb|v0.1.5 : |Modification de la graduation intérieure pour les rapporteurs 180°
\verb|v0.1.4 : |Possibilité de positionner certains outils avec deux points (angle calculé automatiquement)
@@ -288,10 +293,8 @@ Les différents outils disponibles ont \textit{grosso-modo} le même mode de fon
\item pour certains outils, des dimensions minimales sont requises pour un aspect acceptable ;
\item les options personnalisables sont (sauf exceptions) :
\begin{itemize}
- \item la \textit{taille} ;
- \item l'\textit{échelle} globale ou l'\textit{échelle} des éventuels labels ;
- \item les \textit{couleurs} ;
- \item le \textit{fond} (couleur et opacité) ;
+ \item la \textit{taille}, l'\textit{échelle} globale ou l'\textit{échelle} des éventuels labels ;
+ \item les \textit{couleurs}, le \textit{fond} (couleur et opacité) ;
\item la position (\textit{placement} et/ou \textit{rotation}) ;
\item un \textit{placement automatique} avec la données de 2 points.
\end{itemize}
@@ -326,7 +329,7 @@ Les outils disponibles sont à insérer dans un environnement \TikZ, et pour le
\tkzCompas[clés]{pointe}{mine}
\end{PresentationCode}
-\subsection{Utilisation d'unités}
+\subsection{Utilisation d'unités et/ou de rotations}
\begin{tipblock}
Les outils ont été créés avec unité de base de 1~cm, afin que les graduations soient \textit{en taille réelle}.
@@ -338,6 +341,10 @@ Il est toutefois possible de modifier les unités de l'environnement \TikZ, dans
\smallskip
Ce choix est donc à \textit{réserver} dans l'optique de faire des petits schémas pour illustrer des positions d'outils.
+
+\smallskip
+
+Du fait des rotations effectuées par le code pour correctement placer les objets et les graduations, il est conseillé (même si cela devrait fonctionner) de ne pas trop spécifier de rotation globale pour l'environnement \texttt{tikzpicture}\ldots
\end{tipblock}
\pagebreak
@@ -430,6 +437,7 @@ Quelques \Cle{clés} de personnalisation sont disponibles :
\item \Cle{CouleurFond} pour la couleur du fond de la règle ;\hfill~(défaut : \Cle{black})
\item \Cle{Opacite} pour régler l'opacité du fond de la règle ;\hfill~(défaut : \Cle{0.5})
\item le booléen \Cle{AfficheValeurs} pour afficher les valeurs des graduations ;\hfill~(défaut : \Cle{true})
+ \item \Cle{EchelleValeurs} pour l'échelle (relative) des valeurs ;\hfill~(défaut : \Cle{0.8})
\item \Cle{PosVal} pour spécifier la position (haut, milieu, etc) des valeurs, parmi \Cle{h/m/b/hb}.
\hfill~(défaut : \Cle{m})
@@ -501,6 +509,7 @@ Quelques \Cle{clés} de personnalisation sont disponibles :
\item \Cle{CouleurFond} pour la couleur du fond de la règle-repère ;\hfill~(défaut : \Cle{black})
\item \Cle{Opacite} pour régler l'opacité du fond de la règle-repère ;\hfill~(défaut : \Cle{0.5})
\item le booléen \Cle{AfficheValeurs} pour afficher les valeurs des graduations ;\hfill~(défaut : \Cle{true})
+ \item \Cle{EchelleValeurs} pour l'échelle (relative) des valeurs ;\hfill~(défaut : \Cle{0.8})
\item le booléen \Cle{Retourne} pour \textit{inverser la position des graduations}.
\hfill~(défaut : \Cle{false})
@@ -564,6 +573,7 @@ Quelques \Cle{clés} de personnalisation sont disponibles :
\item \Cle{Origine} pour le placer l'équerre (au niveau du coin) ;\hfill~(défaut : \Cle{\{(0,0)\}})
\item \Cle{Rotation} pour pivoter l'équerre (au niveau du coin) ;\hfill~(défaut : \Cle{0})
\item \Cle{Echelle} pour l'échelle globale de l'équerre ;\hfill~(défaut : \Cle{1})
+ \item \Cle{EchelleValeurs} pour l'échelle (relative) des valeurs ;\hfill~(défaut : \Cle{0.8})
\item \Cle{Couleur} pour la couleur des éléments de l'équerre ;\hfill~(défaut : \Cle{black})
\item le booléen \Cle{Fond} pour afficher une couleur de fond pour l'équerre ;\hfill~(défaut : \Cle{false})
\item \Cle{CouleurFond} pour la couleur du fond de l'équerre ;\hfill~(défaut : \Cle{black})
@@ -749,7 +759,8 @@ Quelques \Cle{clés} de personnalisation sont disponibles :
\item le booléen \Cle{Fond} pour afficher une couleur de fond pour la réquerre ;\hfill~(défaut : \Cle{false})
\item \Cle{CouleurFond} pour la couleur du fond de la réquerre ;\hfill~(défaut : \Cle{black})
\item \Cle{Opacite} pour régler l'opacité du fond de la réquerre ;\hfill~(défaut : \Cle{0.5})
- \item le booléen \Cle{AfficheValeurs} pour afficher les valeurs des graduations.\hfill~(défaut : \Cle{true})
+ \item le booléen \Cle{AfficheValeurs} pour afficher les valeurs des graduations ;\hfill~(défaut : \Cle{true})
+ \item \Cle{EchelleValeurs} pour l'échelle (relative) des valeurs.\hfill~(défaut : \Cle{0.8})
\end{itemize}
À noter que pour la clé \Cle{Rotation}, il est possible de préciser un deuxième point, et dans ce cas la clé sera précisée sous la forme \Cle{Rotation=auto/pt}. Dans \textbf{ce cas}, les points \textit{support} \textbf{devront} avoir été déclarés au préalable !
diff --git a/graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty b/graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty
index bb79723d21..5f6cd30410 100644
--- a/graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty
+++ b/graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.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{OutilsGeomTikz}[2023/12/13 v0.1.5 Outils geometriques en TikZ]
+\ProvidesPackage{OutilsGeomTikz}[2024/08/29 v0.1.6 Outils geometriques en TikZ]
+% 0.1.6 Correction de bugs avec pdflatex + amélioration de la gestion des rotations/échelles des labels (tks Cyril I. ^^)
% 0.1.5 Modification de la graduation intérieure pour les rapporteurs 180°
% 0.1.4 Possibilité de positionner les outils avec deux points (angle calculé automatiquement)
% 0.1.3 Ajout du pourcenteur
@@ -60,7 +61,8 @@
Origine=\xdef\REGLposOrigin{#1},%
Rotation=\def\REGLangle{#1},%
Opacite=\def\REGLopac{#1},%
- PosVal=\def\REGLposval{#1}
+ PosVal=\def\REGLposval{#1},%
+ EchelleValeurs=\def\REGLechlabel{#1}
}
\setKVdefault[RegleGeom]{%
@@ -74,7 +76,8 @@
AfficheValeurs=true,%
Fond=false,%
Opacite=0.5,%
- PosVal=m
+ PosVal=m,%
+ EchelleValeurs=0.8
}
\NewDocumentCommand{\tkzRegle}{ O{} }{%
@@ -88,7 +91,7 @@
}{}%
\xdef\REGLlongueur{\fpeval{max(3,\REGLlongueur)}}%valeurs mini
\xdef\REGLlargeur{\fpeval{max(1.5,\REGLlargeur)}}
- \begin{scope}[shift={(\REGLposOrigin)},rotate=\REGLangle,scale=\REGLechelle]
+ \begin{scope}[shift={(\REGLposOrigin)},rotate=\REGLangle,scale=\REGLechelle,transform shape]
\ifboolKV[RegleGeom]{Fond}
{%
\begin{scope}
@@ -104,13 +107,13 @@
\ifboolKV[RegleGeom]{AfficheValeurs}%
{%
\IfSubStr{\REGLposval}{h}
- {\foreach \i in {0,1,...,\REGLlongueur} \draw[\REGLcouleur] (\i,{-0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLangle,scale={0.8*\REGLechelle},font=\small,below] {$\i$} ;}
+ {\foreach \i in {0,1,...,\REGLlongueur} {\draw[\REGLcouleur] (\i,{-0.5}) node[inner sep=1pt,outer sep=1pt,scale={\REGLechlabel},font=\small,below] {$\i$} ;}}
{}
\IfSubStr{\REGLposval}{m}
- {\foreach \i in {0,1,...,\REGLlongueur} \draw[\REGLcouleur] (\i,{-0.5*\REGLlargeur}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLangle,scale={0.8*\REGLechelle},font=\small] {$\i$} ;}
+ {\foreach \i in {0,1,...,\REGLlongueur} {\draw[\REGLcouleur] (\i,{-0.5*\REGLlargeur}) node[inner sep=1pt,outer sep=1pt,scale={\REGLechlabel},font=\small] {$\i$} ;}}
{}
\IfSubStr{\REGLposval}{b}
- {\foreach \i in {0,1,...,\REGLlongueur} \draw[\REGLcouleur] (\i,{-\REGLlargeur+0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLangle,scale={0.8*\REGLechelle},font=\small,above] {\rotatebox{180}{$\fpeval{trunc(\REGLlongueur)-\i}$}} ;}
+ {\foreach \i in {0,1,...,\REGLlongueur} {\draw[\REGLcouleur] (\i,{-\REGLlargeur+0.5}) node[inner sep=1pt,outer sep=1pt,scale={\REGLechlabel},font=\small,above] {\rotatebox{180}{$\fpeval{trunc(\REGLlongueur)-\i}$}} ;}}
{}
}%
{}%
@@ -126,7 +129,8 @@
CouleurFond=\def\REGLREPcouleurfond{#1},%
Origine=\def\REGLREPposOrigin{#1},%
Rotation=\def\REGLREPangle{#1},%
- Opacite=\def\REGLREPopac{#1}
+ Opacite=\def\REGLREPopac{#1},%
+ EchelleValeurs=\def\REGLREPechlabel{#1}
}
\setKVdefault[RegleRepereGeom]{%
@@ -140,7 +144,8 @@
AfficheValeurs=true,%
Fond=false,%
Opacite=0.5,%
- Retourne=false
+ Retourne=false,%
+ EchelleValeurs=0.8
}
\NewDocumentCommand{\tkzRegleRepere}{ O{} }{%
@@ -154,7 +159,7 @@
\pgfmathanglebetweenpoints{\pgfpointanchor{\REGLREPposOrigin}{center}}{\pgfpointanchor{\tmppointdeux}{center}}%
\edef\REGLREPangle{\pgfmathresult}%
}{}%
- \begin{scope}[shift={(\REGLREPposOrigin)},rotate=\REGLREPangle,scale=\REGLREPechelle]
+ \begin{scope}[shift={(\REGLREPposOrigin)},rotate=\REGLREPangle,scale=\REGLREPechelle,transform shape]
%bases de la règle-repère
\ifboolKV[RegleRepereGeom]{Fond}%
{\draw[draw=none,fill=\REGLREPcouleurfond!10!white,fill opacity=\REGLREPopac,rounded corners] (-0.5,0) rectangle++ ({\REGLREPlongueur+1},{-\REGLREPlargeur}) ;}%
@@ -175,12 +180,12 @@
{%
\ifboolKV[RegleRepereGeom]{Retourne}%
{%
- {\foreach \i in {0,1,...,\REGLREPlongueur} \draw[\REGLREPcouleur] (\i,{-0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLREPangle,scale={0.8*\REGLREPechelle},font=\small,below] {$\fpeval{-trunc(0.5*\REGLREPlongueur)+\i}$} ;}
- {\foreach \i in {0,1,...,\REGLREPlongueur} \draw[\REGLREPcouleur] (\i,{-\REGLREPlargeur+0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLREPangle,scale={0.8*\REGLREPechelle},font=\small,above] {\rotatebox{180}{$\inteval{\REGLREPlongueur-\i}$}} ;}
+ {\foreach \i in {0,1,...,\REGLREPlongueur} {\draw[\REGLREPcouleur] (\i,{-0.5}) node[inner sep=1pt,outer sep=1pt,scale={\REGLREPechlabel},font=\small,below] {$\fpeval{-trunc(0.5*\REGLREPlongueur)+\i}$} ;}}
+ {\foreach \i in {0,1,...,\REGLREPlongueur} {\draw[\REGLREPcouleur] (\i,{-\REGLREPlargeur+0.5}) node[inner sep=1pt,outer sep=1pt,scale={\REGLREPechlabel},font=\small,above] {\rotatebox{180}{$\inteval{\REGLREPlongueur-\i}$}} ;}}
}%
{%
- {\foreach \i in {0,1,...,\REGLREPlongueur} \draw[\REGLREPcouleur] (\i,{-0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLREPangle,scale={0.8*\REGLREPechelle},font=\small,below] {$\i$} ;}
- {\foreach \i in {0,1,...,\REGLREPlongueur} \draw[\REGLREPcouleur] (\i,{-\REGLREPlargeur+0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLREPangle,scale={0.8*\REGLREPechelle},font=\small,above] {\rotatebox{180}{$\fpeval{trunc(0.5*\REGLREPlongueur)-\i}$}} ;}
+ {\foreach \i in {0,1,...,\REGLREPlongueur} {\draw[\REGLREPcouleur] (\i,{-0.5}) node[inner sep=1pt,outer sep=1pt,scale={\REGLREPechlabel},font=\small,below] {$\i$} ;}}
+ {\foreach \i in {0,1,...,\REGLREPlongueur} {\draw[\REGLREPcouleur] (\i,{-\REGLREPlargeur+0.5}) node[inner sep=1pt,outer sep=1pt,scale={\REGLREPechlabel},font=\small,above] {\rotatebox{180}{$\fpeval{trunc(0.5*\REGLREPlongueur)-\i}$}} ;}}
}%
}
{}%
@@ -196,7 +201,8 @@
CouleurFond=\def\REQcouleurfond{#1},%
Origine=\def\REQposOrigin{#1},%
Rotation=\def\REQangle{#1},%
- Opacite=\def\REQopac{#1}
+ Opacite=\def\REQopac{#1},%
+ EchelleValeurs=\def\REQechlabel{#1}
}
\setKVdefault[RequerreGeom]{%
@@ -209,7 +215,8 @@
Rotation=0,%
AfficheValeurs=true,%
Fond=false,%
- Opacite=0.5
+ Opacite=0.5,%
+ EchelleValeurs=0.8
}
\NewDocumentCommand{\tkzRequerre}{ O{} }{%
@@ -223,7 +230,7 @@
\pgfmathanglebetweenpoints{\pgfpointanchor{\REQposOrigin}{center}}{\pgfpointanchor{\tmppointdeux}{center}}%
\edef\REQangle{\pgfmathresult}%
}{}%
- \begin{scope}[shift={(\REQposOrigin)},rotate=\REQangle,scale=\REQechelle]
+ \begin{scope}[shift={(\REQposOrigin)},rotate=\REQangle,scale=\REQechelle,transform shape]
\ifboolKV[RequerreGeom]{Fond}
{
\fill[draw=none,rounded corners,fill=\REQcouleurfond!10!white,fill opacity=\REQopac] ({-\REQlongueur*0.5},0) rectangle ({\REQlongueur*0.5},{-\REQlargeur}) ;
@@ -243,10 +250,10 @@
\end{scope}
\ifboolKV[RequerreGeom]{AfficheValeurs}%
{%
- \draw[\REQcouleur] (0,-0.5) node[inner sep=1pt,outer sep=1pt,rotate=\REQangle,scale={0.8*\REQechelle},font=\small,below] {$0$} ;
+ \draw[\REQcouleur] (0,-0.5) node[inner sep=1pt,outer sep=1pt,scale={\REQechlabel},font=\small,below] {$0$} ;
\foreach \i in {1,2,...,\fpeval{0.5*\REQlongueur-0.5}}{%
- \draw[\REQcouleur] (\i,-0.5) node[inner sep=1pt,outer sep=1pt,rotate=\REQangle,scale={0.8*\REQechelle},font=\small,below] {$\i$} ;
- \draw[\REQcouleur] (-\i,-0.5) node[inner sep=1pt,outer sep=1pt,rotate=\REQangle,scale={0.8*\REQechelle},font=\small,below] {$-\i$} ;}
+ \draw[\REQcouleur] (\i,-0.5) node[inner sep=1pt,outer sep=1pt,scale={\REQechlabel},font=\small,below] {$\i$} ;
+ \draw[\REQcouleur] (-\i,-0.5) node[inner sep=1pt,outer sep=1pt,scale={\REQechlabel},font=\small,below] {$-\i$} ;}
}%
{}%
\end{scope}
@@ -260,7 +267,8 @@
CouleurFond=\def\EQcouleurfond{#1},%
Origine=\def\EQposOrigin{#1},%
Rotation=\def\EQangle{#1},%
- Opacite=\def\EQopac{#1}
+ Opacite=\def\EQopac{#1},%
+ EchelleValeurs=\def\EQechlabel{#1}
}
\setKVdefault[EquerreGeom]{%
@@ -273,7 +281,8 @@
AfficheValeurs=true,%
Fond=false,%
Opacite=0.5,%
- PetitCote=false
+ PetitCote=false,%
+ EchelleValeurs=0.8
}
\NewDocumentCommand{\tkzEquerre}{ O{} }{%
@@ -293,7 +302,7 @@
\edef\EQangle{\fpeval{\pgfmathresult-90}}%
}%
}{}%
- \begin{scope}[shift={(\EQposOrigin)},rotate=\EQangle,scale=\EQechelle]
+ \begin{scope}[shift={(\EQposOrigin)},rotate=\EQangle,scale=\EQechelle,transform shape]
\ifboolKV[EquerreGeom]{Fond}
{%
\begin{scope} %diff extérieur-intérieur
@@ -318,10 +327,12 @@
\foreach \y in {0,1,...,\fpeval{0.925*\EQlongueur}} {\draw[\EQcouleur] (0,\y)--(0.4,\y) ;}
\ifboolKV[EquerreGeom]{AfficheValeurs}%
{%
- \foreach \i in {1,2,...,\fpeval{0.9*\EQlongueur-1}}
- \draw[\EQcouleur] (0.4,\i) node[inner sep=1pt,outer sep=1pt,rotate=\EQangle,scale={0.8*\EQechelle},font=\small,right] {\rotatebox{90}{$\i$}} ;
- \foreach \i in {1,2,...,\fpeval{0.9*\EQlargeur-0.5}}
- \draw[\EQcouleur] (\i,0.4) node[inner sep=1pt,outer sep=1pt,rotate=\EQangle,scale={0.8*\EQechelle},font=\small,above] {\rotatebox{180}{$\i$}} ;
+ \foreach \i in {1,2,...,\fpeval{0.9*\EQlongueur-1}}{%
+ \draw[\EQcouleur] (0.4,\i) node[inner sep=1pt,outer sep=1pt,scale={\EQechlabel},font=\small,right] {\rotatebox{90}{$\i$}} ;
+ }%
+ \foreach \i in {1,2,...,\fpeval{0.9*\EQlargeur-0.5}}{%
+ \draw[\EQcouleur] (\i,0.4) node[inner sep=1pt,outer sep=1pt,scale={\EQechlabel},font=\small,above] {\rotatebox{180}{$\i$}} ;
+ }%
}%
{}%
\end{scope}
@@ -336,7 +347,8 @@
CouleurFond=\def\RAPPcouleurfond{#1},%
Origine=\def\RAPPposOrigin{#1},%
Rotation=\def\RAPPangle{#1},%
- Opacite=\def\RAPPopac{#1}
+ Opacite=\def\RAPPopac{#1},%
+ EchelleValeurs=\def\RAPPechlabel{#1}
}
\setKVdefault[RapporteurGeom]{%
@@ -350,13 +362,14 @@
Fond=false,%
Opacite=0.5,%
Complet=false,%
- GraduationsInt=false
+ GraduationsInt=false,%
+ EchelleValeurs=0.8
}
\NewDocumentCommand{\tkzRapporteur}{ O{} }{%
\useKVdefault[RapporteurGeom]%
\setKV[RapporteurGeom]{#1}%
- \begin{scope}[shift={(\RAPPposOrigin)},rotate=\RAPPangle,scale=\RAPPechelle,every node/.style={rotate=\RAPPangle}]
+ \begin{scope}[shift={(\RAPPposOrigin)},rotate=\RAPPangle,scale=\RAPPechelle,transform shape]
\ifboolKV[RapporteurGeom]{Complet}
{
%fond
@@ -382,27 +395,27 @@
%valeurs si booléen
\ifboolKV[RapporteurGeom]{AfficheAngles}
{%
- \draw[\RAPPcouleur] (0:2.75) node[rotate=90,scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$0$} ;
- \draw[\RAPPcouleur] (180:3.25) node[rotate=90,scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\pm 180$} ;
- \draw[\RAPPcouleur] (180:2.75) node[rotate=90,scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\pm \pi$} ;
+ \draw[\RAPPcouleur] (0:2.75) node[rotate=90,scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$0$} ;
+ \draw[\RAPPcouleur] (180:3.25) node[rotate=90,scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\pm 180$} ;
+ \draw[\RAPPcouleur] (180:2.75) node[rotate=90,scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\pm \pi$} ;
\foreach \i in {0,10,...,170}
- {\draw[\RAPPcouleur] (\i:3.25) node[rotate={\i-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\i$} ;}
- \draw[\RAPPcouleur] (30:2.75) node[rotate={30-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{\pi}{6}$} ;
- \draw[\RAPPcouleur] (45:2.75) node[rotate={45-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{\pi}{4}$} ;
- \draw[\RAPPcouleur] (60:2.75) node[rotate={60-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{\pi}{3}$} ;
- \draw[\RAPPcouleur] (90:2.75) node[rotate={90-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{\pi}{2}$} ;
- \draw[\RAPPcouleur] (120:2.75) node[rotate={120-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{2\pi}{3}$} ;
- \draw[\RAPPcouleur] (135:2.75) node[rotate={135-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{3\pi}{4}$} ;
- \draw[\RAPPcouleur] (150:2.75) node[rotate={150-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{5\pi}{6}$} ;
+ {\draw[\RAPPcouleur] (\i:3.25) node[rotate={\i-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\i$} ;}
+ \draw[\RAPPcouleur] (30:2.75) node[rotate={30-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{\pi}{6}$} ;
+ \draw[\RAPPcouleur] (45:2.75) node[rotate={45-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{\pi}{4}$} ;
+ \draw[\RAPPcouleur] (60:2.75) node[rotate={60-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{\pi}{3}$} ;
+ \draw[\RAPPcouleur] (90:2.75) node[rotate={90-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{\pi}{2}$} ;
+ \draw[\RAPPcouleur] (120:2.75) node[rotate={120-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{2\pi}{3}$} ;
+ \draw[\RAPPcouleur] (135:2.75) node[rotate={135-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{3\pi}{4}$} ;
+ \draw[\RAPPcouleur] (150:2.75) node[rotate={150-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{5\pi}{6}$} ;
\foreach \i in {10,20,...,170}
- {\draw[\RAPPcouleur] ({-\i}:3.25) node[rotate={270-\i},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$-\i$} ;}
- \draw[\RAPPcouleur] (-30:2.75) node[rotate={270-30},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{-\pi}{6}$} ;
- \draw[\RAPPcouleur] (-45:2.75) node[rotate={270-45},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{-\pi}{4}$} ;
- \draw[\RAPPcouleur] (-60:2.75) node[rotate={270-60},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{-\pi}{3}$} ;
- \draw[\RAPPcouleur] (-90:2.75) node[rotate={270-90},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{-\pi}{2}$} ;
- \draw[\RAPPcouleur] (-120:2.75) node[rotate={270-120},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{-2\pi}{3}$} ;
- \draw[\RAPPcouleur] (-135:2.75) node[rotate={270-135},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{-3\pi}{4}$} ;
- \draw[\RAPPcouleur] (-150:2.75) node[rotate={270-150},scale=\fpeval{0.8*\RAPPechelle*\RAPPechangle},font=\tiny] {$\nicefrac{-5\pi}{6}$} ;
+ {\draw[\RAPPcouleur] ({-\i}:3.25) node[rotate={270-\i},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$-\i$} ;}
+ \draw[\RAPPcouleur] (-30:2.75) node[rotate={270-30},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{-\pi}{6}$} ;
+ \draw[\RAPPcouleur] (-45:2.75) node[rotate={270-45},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{-\pi}{4}$} ;
+ \draw[\RAPPcouleur] (-60:2.75) node[rotate={270-60},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{-\pi}{3}$} ;
+ \draw[\RAPPcouleur] (-90:2.75) node[rotate={270-90},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{-\pi}{2}$} ;
+ \draw[\RAPPcouleur] (-120:2.75) node[rotate={270-120},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{-2\pi}{3}$} ;
+ \draw[\RAPPcouleur] (-135:2.75) node[rotate={270-135},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{-3\pi}{4}$} ;
+ \draw[\RAPPcouleur] (-150:2.75) node[rotate={270-150},scale=\fpeval{\RAPPechlabel*\RAPPechangle},font=\tiny] {$\nicefrac{-5\pi}{6}$} ;
}{}
}
{
@@ -440,9 +453,9 @@
\ifboolKV[RapporteurGeom]{AfficheAngles}
{%
\foreach \i in {0,10,...,180}
- {\draw[\RAPPcouleur] (\i:3.2) node[rotate={\i-90},scale=\fpeval{\RAPPechelle*\RAPPechangle},font=\tiny] {\i} ;}
+ {\draw[\RAPPcouleur] (\i:3.2) node[rotate={\i-90},scale=\fpeval{\RAPPechangle},font=\tiny] {\i} ;}
\foreach \i in {0,10,...,180}
- {\draw[\RAPPcouleur] (\i:2.7) node[rotate={\i-90},scale=\fpeval{\RAPPechelle*\RAPPechangle},font=\tiny] {\inteval{180-\i}} ;}
+ {\draw[\RAPPcouleur] (\i:2.7) node[rotate={\i-90},scale=\fpeval{\RAPPechangle},font=\tiny] {\inteval{180-\i}} ;}
}{}
}
\end{scope}
@@ -455,7 +468,8 @@
CouleurFond=\def\POURCcouleurfond{#1},%
Origine=\def\POURCposOrigin{#1},%
Rotation=\def\POURCangle{#1},%
- Opacite=\def\POURCopac{#1}
+ Opacite=\def\POURCopac{#1},%
+ EchelleValeurs=\def\POURCechlabel{#1}
}
\setKVdefault[Pourcenteur]{%
@@ -468,13 +482,14 @@
AfficheValeurs=true,%
Fond=false,%
Opacite=0.5,%
- Decoration=true
+ Decoration=true,%
+ EchelleValeurs=0.8
}
\NewDocumentCommand{\tkzPourcenteur}{ O{} }{%
\useKVdefault[Pourcenteur]%
\setKV[Pourcenteur]{#1}%
- \begin{scope}[shift={(\POURCposOrigin)},rotate=\POURCangle,scale=\POURCechelle,every node/.style={rotate=\POURCangle}]
+ \begin{scope}[shift={(\POURCposOrigin)},rotate=\POURCangle,scale=\POURCechelle,transform shape]
\ifboolKV[Pourcenteur]{Fond}
{%
\fill[draw=none,fill=\POURCcouleurfond!10!white,fill opacity=\POURCopac] (0,0) circle[radius=3] ;
@@ -483,7 +498,7 @@
\draw[\POURCcouleur,semithick] (0,0) circle[radius=3] ;
\draw[\POURCcouleur,semithick] ({-0.15*3},0)--({0.15*3},0) (0,{-0.15*3})--(0,{0.15*3}) ;
\foreach \pct in {0,1,...,199}
- {\draw[\POURCcouleur,thin] ({0.5*\pct*3.6}:{3})--({0.5*\pct*3.6}:{3-0.2}) ;}
+ {\draw[\POURCcouleur,thin] ({0.5*\pct*3.6}:{3})--({0.5*\pct*3.6}:{3-0.2}) ;}
\foreach \pct in {0,10,...,90}{%
\draw[\POURCcouleur,thin] ({(\pct+1)*3.6}:{3})--({(\pct+1)*3.6}:{3-0.35}) ;
\filldraw[\POURCcouleur] ({(\pct+1)*3.6}:{3-0.35}) circle[fill=\POURCcouleur,radius=0.75pt] ;
@@ -505,14 +520,14 @@
\foreach \pct in {5,10,15,20,30,35,40,45,55,60,65,70,80,85,90,95}{%
\draw[\POURCcouleur,semithick] ({\pct*3.6}:{3})--({\pct*3.6}:{3-0.5}) ;
\ifboolKV[Pourcenteur]{AfficheValeurs}
- {\draw ({-\pct*3.6+90}:{3-0.6}) node[\POURCcouleur,rotate={-3.6*\pct},scale=\fpeval{0.8*\POURCechelle*\POURCechangle},font=\tiny] {\pct\,\%} ;}{}
+ {\draw ({-\pct*3.6+90}:{3-0.6}) node[\POURCcouleur,rotate={-3.6*\pct},scale=\fpeval{\POURCechlabel*\POURCechangle},font=\tiny] {\pct\,\%} ;}{}
}
\foreach \pct in {0,25,50,75}{%
\draw[\POURCcouleur,semithick] ({\pct*3.6}:{3})--({\pct*3.6}:{3-0.5}) ;
\ifboolKV[Pourcenteur]{AfficheValeurs}
{%
- \draw ({-\pct*3.6+90}:{3-0.61}) node[\POURCcouleur,rotate={-3.6*\pct},scale=\fpeval{0.8*\POURCechelle*\POURCechangle},font=\scriptsize\bfseries] {\pct\,\%} ;
- \draw ({-\pct*3.6+90}:{2+0.15}) node[\POURCcouleur,rotate={-3.6*\pct},scale=\fpeval{0.8*\POURCechelle*\POURCechangle},font=\tiny\bfseries] {\pct\,\%} ;
+ \draw ({-\pct*3.6+90}:{3-0.61}) node[\POURCcouleur,rotate={-3.6*\pct},scale=\fpeval{\POURCechlabel*\POURCechangle},font=\scriptsize\bfseries] {\pct\,\%} ;
+ \draw ({-\pct*3.6+90}:{2+0.15}) node[\POURCcouleur,rotate={-3.6*\pct},scale=\fpeval{\POURCechlabel*\POURCechangle},font=\tiny\bfseries] {\pct\,\%} ;
}{}%
}
\draw[\POURCcouleur,semithick] (0,1)--(0,2) (1.6,0)--(2,0) (0,-1.6)--(0,-2) (-1.6,0)--(-2,0) ;
@@ -533,7 +548,7 @@
CouleurFond=\def\RAPPEQcouleurfond{#1},%
Origine=\def\RAPPEQposOrigin{#1},%
Rotation=\def\RAPPEQangle{#1},%
- Opacite=\def\RAPPEQopac{#1}
+ Opacite=\def\RAPPEQopac{#1},%
}
\setKVdefault[RapporteurEquerreGeom]{%
@@ -561,7 +576,7 @@
\pgfmathanglebetweenpoints{\pgfpointanchor{\RAPPEQposOrigin}{center}}{\pgfpointanchor{\tmppointdeux}{center}}%
\edef\RAPPEQangle{\pgfmathresult}%
}{}%
- \begin{scope}[shift={(\RAPPEQposOrigin)},rotate=\RAPPEQangle,scale=\RAPPEQechelle,every node/.style={rotate=\RAPPEQangle}]
+ \begin{scope}[shift={(\RAPPEQposOrigin)},rotate=\RAPPEQangle,scale=\RAPPEQechelle,transform shape]
%fond
\ifboolKV[RapporteurEquerreGeom]{Fond}
{%
@@ -591,16 +606,16 @@
\ifboolKV[RapporteurEquerreGeom]{AfficheAngles}
{%
\foreach \i in {10,20,...,170}
- {\draw[\RAPPEQcouleur] ({-\i}:{0.6125*\RAPPEQlargeur}) node[rotate={90-\i},scale=\fpeval{\RAPPEQlargeur/8*\RAPPEQechelle*\RAPPEQechangle},font=\tiny] {\i} ;}
+ {\draw[\RAPPEQcouleur] ({-\i}:{0.6125*\RAPPEQlargeur}) node[rotate={90-\i},scale=\fpeval{\RAPPEQlargeur/8*\RAPPEQechangle},font=\tiny] {\i} ;}
%angles "extérieurs"
\foreach \i in {10,20,...,170}
- {\draw[\RAPPEQcouleur] ({-\i}:{0.6375*\RAPPEQlargeur}) node[rotate={90-\i},scale=\fpeval{\RAPPEQlargeur/8*\RAPPEQechelle*\RAPPEQechangle},font=\tiny] {\inteval{180-\i}} ;}
+ {\draw[\RAPPEQcouleur] ({-\i}:{0.6375*\RAPPEQlargeur}) node[rotate={90-\i},scale=\fpeval{\RAPPEQlargeur/8*\RAPPEQechangle},font=\tiny] {\inteval{180-\i}} ;}
}%
{}%
\ifboolKV[RapporteurEquerreGeom]{AfficheValeurs}
{%
\foreach \i in {-1,0,1}
- {\draw[\RAPPEQcouleur] ({\i},-0.375) node[scale=\fpeval{\RAPPEQechelle*\RAPPEQechangle},font=\tiny] {$\i$} ;}
+ {\draw[\RAPPEQcouleur] ({\i},-0.375) node[scale=\fpeval{\RAPPEQechangle},font=\tiny] {$\i$} ;}
}%
{}%
%tracés intérieurs
diff --git a/graphics/pgf/contrib/pgf-periodictable/README b/graphics/pgf/contrib/pgf-periodictable/README
index f33f53fa72..6015fa1578 100644
--- a/graphics/pgf/contrib/pgf-periodictable/README
+++ b/graphics/pgf/contrib/pgf-periodictable/README
@@ -1,11 +1,11 @@
-This is pgf-PeriodicTable, version 2.1.0a (2024/04/03).
+This is pgf-PeriodicTable, version 2.1.5 (2025/02/10).
The purpose of this package is to provide the Periodic Table of Elements in
a simple way. It relies on pgf/TikZ to offer a full or partial periodic table with
a variety of options and displaying the desired data for all the 118
elements. It can be done in different languages: English, French, German,
Portuguese (from Portugal and from Brazil), Spanish, Italian and translations
-by user contributions (currently Dutch).
+by user contributions - currently in Dutch and Chinese.
____________________________________________________________
Just typeset \pgfPT to get a Periodic Table of Elements or \pgfPT[<options list>]
@@ -21,6 +21,62 @@ ____________________________________________________________
____________________________________________________________
Major changes:
+*** v2.1.5 (10/02/2025) ***
+New options for loading the package, fixing the interaction of pgf-PeriodicTable with the beamer class and pdfLaTeX (small caps):
+- beamer (requires the lmodern package)
+- beamer*
+- beamer** (requires the silence package)
+New translation:
+- Chinese translation provided by Fan Hongtao
+New commands for Chinese language:
+- \pgfPTzhFontFeatures
+- \pgfPTzhtextfontSS
+- \pgfPTzhtextfontSSB
+- \pgfPTzhtextfontLv
+Changes to the default values of the following keys when the Chinese langauge is loaded:
+- name font
+- CS font
+- title font
+- Z font
+- Z padding
+Changes in Mandarin numerals:
+- default font is now BabelStone Han
+- the \pgfPTzhfont command has been renamed to \pgfPTzhnumberfont (\pgfPTzhfont is still defined for backwards compatibility)
+New keys:
+- decimal separator (sets the decimal separator in the numerical values of quantities)
+- legend acronyms font size (sets the font size of the text used in the legend acronyms description)
+New color schemes:
+- pgfPTWikipediaI
+- pgfPTWikipediaII
+New styles:
+- comma separator
+- dot separator
+- csWikipediaI
+- csWikipediaII
+The Z list key supports a new syntax which makes possible to get empty cells anywhere in the Periodic Table.
+Fixed an incorrect translation for 'fermium' in German.
+New section in package documentation 'Tips & Tricks: inspired by user questions'.
+
+*** v2.1.4 (08/09/2024) ***
+Fixed wrong box width on extra legend of Country of Discovery.
+Fixed minor issues in pgfPTbuildcell macros.
+Added the prefix 'pgfPT' to the built-in back color schemes. They are now 'pgfPTdefault', 'pgfPTSoft', 'pgfPTJmol',
+'pgfPTCPK', 'pgfPTRasmol', 'pgfPTRasmolNew', 'pgfPTWikipedia', 'pgfPTMNM', 'pgfPTPS', 'pgfPTRadio' and 'pgfPTBlocks'.
+Fixed some typos in the manual.
+
+*** v2.1.3 (07/08/2024) ***
+The engine's detection mechanism (pdfLaTeX, LuaLaTeX or XeTeX) has been changed to prevent erroneous detection when the packages 'hyperref' or 'bookmark' are loaded and the document is compiled with LuaLaTeX - in this case, pgf-PeriodicTable disturbs the selection of the document font.
+Fixed an issue with the Chemical Symbol color when a non-rgb color is used, such as cyan or yellow , which are defined in the xcolor package using the cmyk model (when loaded without options).
+
+*** v2.1.2 (01/08/2024) ***
+Fixed incorrect Spanish translations of some element names.
+Minor code improvements to eliminate runtime warnings («LaTeX Font Warning: Font shape `TU/TeXGyreHeros(0)/l/n' undefined» or «Missing character: There is no m (U+006D) in font nullfont!» ... )
+
+*** v2.1.1 (07/07/2024) ***
+New keys:
+- group numbers (to display group numbers in arabic numerals, Roman numerals or both)
+- Roman label color (sets the color of the Roman numerals)
+- O Roman (the oxidation numbers are presnted in Roman numerals)
*** v2.1.0a (03/04/2024) ***
Translation files have been renamed from 'lang.{undefined,nl}.tex' to 'pgfPT.lang.{undefined,nl}.tex' to match the runtime tree of TeX Live (names must be globally unique for reliable searching).
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DiscY.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DiscY.tex
index 66e67fc3c7..9a18c1f8dd 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DiscY.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_DiscY.tex
@@ -1,23 +1,23 @@
%\vfill%
-\subsubsection{\texorpdfstring{\ding{224} The discovery year}{The discovery year}}\vspace{6pt}%
+\subsubsection{\texorpdfstring{\ding{224} The year of discovery}{The year of discovery}}\vspace{6pt}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DiscY color
\pgfPTMoption{4}{DiscY color}{black}{%
-Sets the discovery year color.
+Sets the color of the discovery year.
}
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=pgfPTdisc,DiscY color=red]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=pgfPTdisc,DiscY color=red]}}%
\\ [5pt]\pgfPTendoption%
% DiscY font
\pgfPTMoption{4}{DiscY font}{\string\tiny\string\bfseries}{%
-Sets the discovery year font.
+Sets the font of the discovery year.
}
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=pgfPTdisc,DiscY font=\string\fontfamily{pbk}\string\selectfont\string\tiny\string\bfseries]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=pgfPTdisc,DiscY font=\fontfamily{pbk}\selectfont\tiny\bfseries]}}%
\\ [5pt]\pgfPTendoption%
% DiscY BC scale
\pgfPTMoption{4}{DiscY BC scale}{1}{%
-Sets the font factor scaling for the Before Christ (BC) acronym in the discovery year.
+Sets the font factor scaling for the Before Christ (BC) acronym in the year of discovery.
}
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=pgfPTdisc,DiscY BC scale=.8]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=pgfPTdisc,DiscY BC scale=.8]}}%
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex
index b9b76f64d1..4b9211dc54 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Examples.tex
@@ -71,7 +71,7 @@ The following examples could be used for students or for any other purposes.
\def\grupo[#1][#2] #3{%
\begin{tikzpicture}[inner xsep=0pt]
\node[below left,text width=1.75cm,text centered] (figura) at (0,0) %
-{\scalebox{.5}{\pgfPT[show title=false,show label LaAc=true,show legend=false,back color scheme=MNM,%
+{\scalebox{.5}{\pgfPT[show title=false,show label LaAc=true,show legend=false,back color scheme=pgfPTMNM,%
font=Roboto-TLF,CS font=\fontfamily{RobotoSlab-TLF}\bfseries\large,eDist color=blue!70!black,%
DiscC font=\fontsize{4}{4}\selectfont,DiscY font=\fontsize{4}{4}\selectfont\bfseries,%
name font=\fontseries{l}\fontsize{6pt}{6pt}\selectfont,name color=red!50!black,%
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_O.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_O.tex
new file mode 100644
index 0000000000..06f322d5ee
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_O.tex
@@ -0,0 +1,33 @@
+\vfill%
+\subsubsection{\texorpdfstring{\ding{224} The oxidation states}{The oxidation states}}%\vspace{6pt}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% O color
+\pgfPTMoption{4}{O color}{black}{%
+Sets the color of the oxidation states.
+}
+\\ [10pt]\pgfPTMbuildcell(5,3)[(1;1-2;Z),(1;3;radio),(2-3;1.5-3.5;CS),(4;1-3;name),(5;1-3;O)]%
+\pgfPTbuildcell(5,3)[(1;1-2;Z),(1;3;radio),(2-3;1.5-3.5;CS),(4;1-3;name),(5;1-3;O)]%
+\\ [5pt]\pgfPTMmacrobox{pgfPTstyle}[show title=false]%
+\pgfPTstyle[show title=false]%
+\\ [-1pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},O color=red]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},O color=red]}}%
+\\ [0pt]\pgfPTendoption%
+% O font \tiny\bfseries
+\pgfPTMoption{4}{O font}{\string\tiny\string\bfseries}{%
+Sets the font of the oxidation states.
+}
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},O font=\string\itshape\string\tiny]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},O font=\itshape\tiny]}}%
+\\ [0pt]\pgfPTendoption%
+% O Roman
+\newpage\vspace{-34pt}\ %
+\pgfPTMoption[\mbox{\pgfPTnewinversion{2.1.1}}]{4}{O Roman}{false}{%
+When set to \red{true} the oxidation states are displayed in Roman numerals, otherwise they are displayed in arabic numerals.
+}
+%\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},O Roman]%
+%\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},O Roman]}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list=spd,O Roman,group numbers=CAS]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list=spd,O Roman,group numbers=CAS]}}%
+\\ [5pt]\pgfPTendoption%
+\pgfPTresetcell%
+\endinput
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex
index e74b8bf418..6b57de7bb0 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_OtherCont.tex
@@ -7,12 +7,12 @@ For all the \textit{other contents} available for the cells of the periodic tabl
\begin{itemlist}
%\item\red{\textbf{name}}:\hspace{.5ex}element name
\item\red{\textbf{R}}:\hspace{.5ex}atomic radius
-\item\red{\textbf{Rcov}}:\hspace{.5ex}covalente radius
+\item\red{\textbf{Rcov}}:\hspace{.5ex}covalent radius
\item\red{\textbf{Rion}}:\hspace{.5ex}ionic radius
\item\red{\textbf{Ei}}:\hspace{.5ex}first ionization energy
\item\red{\textbf{eneg}}:\hspace{.5ex}electronegativity (Pauling)
\item\red{\textbf{eaff}}:\hspace{.5ex}electroaffnity
-\item\red{\textbf{O}}:\hspace{.5ex}oxidation states
+%\item\red{\textbf{O}}:\hspace{.5ex}oxidation states
\item\red{\textbf{Tmelt}}:\hspace{.5ex}melting point (Kelvin)
\item\red{\textbf{TmeltC}}:\hspace{.5ex}melting point (Celsius degrees)
\item\red{\textbf{Tboil}}:\hspace{.5ex}boiling point (Kelvin)
@@ -29,7 +29,7 @@ For all the \textit{other contents} available for the cells of the periodic tabl
\item\red{\textbf{lsb}}:\hspace{.5ex}lattice constant -- b
\item\red{\textbf{lsc}}:\hspace{.5ex}lattice constant -- c
\item\red{\textbf{lsca}}:\hspace{.5ex}lattice c/a ratio
-\item\red{\textbf{DiscC}}:\hspace{.5ex}discover country
+\item\red{\textbf{DiscC}}:\hspace{.5ex}country of discovery
\item\red{\textbf{spectra}}:\hspace{.5ex}visible range spectral lines
\end{itemlist}
\end{minipage}
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TipsTricks.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TipsTricks.tex
new file mode 100644
index 0000000000..ed1dbca3d0
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TipsTricks.tex
@@ -0,0 +1,58 @@
+\vfill%
+\subsection{Control overall width of table}
+\tikz{\node[text width=\linewidth-6mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=3mm] {%
+Is there a simple way to set the periodic table to text width, column width, etc.?
+};}%
+\\ [6pt]Yes, there is. It can be done using the \textsf{\large\textbackslash resizebox} command provided by the graphicx package (and also by the graphics package). For example:
+\\ [2pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\begin{minipage}{\linewidth}%
+\begin{verbatim}
+\resizebox{\linewidth}{!}{\pgfPT}
+\end{verbatim}
+\end{minipage}};}%
+\\ or
+\\ [2pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\begin{minipage}{\linewidth}%
+\begin{verbatim}
+\resizebox{\linewidth}{!}{\pgfPT[show title=false]}
+\end{verbatim}
+\end{minipage}};}%
+\\ [2pt]will produce a Periodic Table with the width of the current \textsf{\large\textbackslash linewidth}, whatever is its value (the text width, the column width, the width of a minipage,\ldots), and with the proper scaling of its height.
+\\ There is no need of loading the graphicx package since pgf-PeriodicTable loads the tikz package, which in turn loads the graphicx package.
+\\ [2pt]\tikz{\path[draw=green!70,rounded corners=2pt,fill=black!10!green!10,rounded corners=2pt] (0,0) rectangle ++(\textwidth,-4.5pt);}%
+\subsection{Compact Periodic Table}
+\tikz{\node[text width=\linewidth-6mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=3mm] {%
+Is there a way to put groups 1 and 2 really next to group 13 to 18? That would make the whole thing more compact. I sometimes need just the representative elements for teaching purposes.
+};}%
+\\ [6pt]Although it is not common usage, it can be done:
+\\ [2pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\begin{minipage}{\linewidth}%
+\begin{verbatim}
+\documentclass[border=10pt]{standalone}
+\usepackage{pgf-PeriodicTable}
+\usepgfPTlibrary{colorschemes}
+\pgfPTGroupColors{example}{G1=blue!50!white,G2=green!90!white}
+\pgfPTsetLanguage{de}
+\begin{document}
+% \pgfPTstyle[show title=false, back color scheme=example,show legend=false]
+% \pgfPT[Z list = G1]\foreach \n in {2,13,14,15,16,17,18} {%
+% \pgfPT[show period numbers=false,Z list = G\n]%
+% }% make sure there are no spaces between \pgfPT
+% or
+% \pgfPTstyle[show title=false,show period numbers=false,back color scheme=example,
+% show legend=false]
+% \pgfPT[show period numbers,Z list = G1]\pgfPT[Z list = G2]\pgfPT[Z list = p]% make
+% sure there are no spaces between \pgfPT
+% or
+ \pgfPTstyle[show title=false,show period numbers=false,back color scheme=example,
+ show legend=false]
+ \pgfPT[show period numbers,Z list = s]\pgfPT[Z list = p]
+\end{document}
+\end{verbatim}
+\end{minipage}};}%
+\newpage%
+\begin{center}
+\scalebox{.6}{\includegraphics{manualfiles/pgfPT_user_compactPT.pdf}}
+\end{center}
+\tikz{\path[draw=green!70,rounded corners=2pt,fill=black!10!green!10,rounded corners=2pt] (0,0) rectangle ++(\textwidth,-4.5pt);}%
+\endinput
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TitleLegend.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TitleLegend.tex
index a17797548a..600538875c 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TitleLegend.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_TitleLegend.tex
@@ -61,21 +61,30 @@ When set to \red{false}, only the cell is displayed with the des\-criptions in p
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend acronyms=false]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend acronyms=false]}}%
\\ [0pt]\pgfPTendoption%
+% legend acronyms
+\label{option_legend_acronyms_font_size}%
+\vfill%
+\pgfPTMoption[\pgfPTnewinversion{2.1.5}]{4}{legend acronyms font size}{document font size}%
+{Sets the font size of the text used in the \red{legend acronyms} description. It must be a valid \TeX\ dimension and \textit{it only works when the key \red{legend acronyms} is set to \red{true}}.
+\vskip0pt\relax}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend acronyms font size=14pt]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend acronyms font size=14pt]}}%
+\\ [0pt]\pgfPTendoption%
+\vfill%
+\newpage\vspace{-34pt}\ %
% legend box (style)
\label{style_legend box}%
-\vfill%
\pgfPTMstyle{4}{legend box}{left color=black!20,right color=black!10,draw=black!30}%
{Style to define the appearance of the box around the legend, legend pins and acronym descriptions, built with any of the \txttikz\ keys that can be applied to a path construction.
\textit{It only works when the key \red{legend acronyms} is set to \red{true}}.}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36}]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36}]}}%
-\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend box={draw=blue!20,fill=blue!10}]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend box={draw=blue!20,fill=blue!10}]}}%
-\newpage%\\ [10pt]
-\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend box={draw=blue!20,fill=blue!10,legend acronyms=false}]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend box={draw=blue!20,fill=blue!10},legend acronyms=false]}}%
-\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend box={}]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend box={}]}}%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36}]}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend box={draw=blue!20,fill=blue!10}]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend box={draw=blue!20,fill=blue!10}]}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend box={draw=blue!20,fill=blue!10,legend acronyms=false}]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend box={draw=blue!20,fill=blue!10},legend acronyms=false]}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend box={}]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend box={}]}}%
\\ [0pt]\pgfPTendstyle%
% legend back color
\label{option_legend back color}%
@@ -98,6 +107,7 @@ When set to \red{false}, only the cell is displayed with the des\-criptions in p
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend radio color=red,legend acronyms=false]}}%
\\ [0pt]\pgfPTendoption%
% legend CS color
+\vfill%
\label{option_legend CS color}%
\pgfPTMoption{4}{legend CS color}{black!50}%
{Sets the color of the Chemical Symbol acronym and corresponding description.}%
@@ -108,6 +118,7 @@ When set to \red{false}, only the cell is displayed with the des\-criptions in p
\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend CS color=red,legend acronyms=false]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend CS color=red,legend acronyms=false]}}%
\\ [0pt]\pgfPTendoption%
+\newpage\vspace{-34pt}\ %
% legend Z color
\label{option_legend Z color}%
\pgfPTMoption{4}{legend Z color}{\{\}}%
@@ -119,15 +130,16 @@ When set to \red{false}, only the cell is displayed with the des\-criptions in p
\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend Z color=red,legend acronyms=false]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend Z color=red,legend acronyms=false]}}%
\\ [0pt]\pgfPTendoption%
+\newpage\vspace{-34pt}\ %
% show legend pins
\label{option_show legend pins}%
\pgfPTMoption{4}{show legend pins}{true}%
{When set to \red{true} the legend pins are shown, otherwise they are not shown.}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36}]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36}]}}%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36}]}}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},show legend pins=false]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},show legend pins=false]}}%
-\\ [0pt]\pgfPTendoption%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},show legend pins=false]}}%
+\\ [-5pt]\pgfPTendoption%
% legend pins (style)
\label{style_legend pins}%
\pgfPTMstyle{4}{legend pins}{\raisebox{-\baselineskip}{%
@@ -136,9 +148,10 @@ When set to \red{false}, only the cell is displayed with the des\-criptions in p
{\ \\ [4pt]Style to define the appearance of the legend pins, built with any of the \txttikz\ keys that can be applied to a path construction.}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36}]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36}]}}%
-\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend pins={draw=red,fill=red!10}]%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend pins={draw=red,fill=red!10}]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend pins={draw=red,fill=red!10}]}}%
-\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend pins={draw=red,fill=red!10},legend acronyms=false]%
+\newpage%\\ [10pt]
+\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},legend pins={draw=red,fill=red!10},legend acronyms=false]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},legend pins={draw=red,fill=red!10},legend acronyms=false]}}%
\\ [0pt]\pgfPTendstyle%
% show extra legend
@@ -153,12 +166,14 @@ When set to \red{false}, only the cell is displayed with the des\-criptions in p
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myname,show extra legend=false]}}%
\\ [0pt]\pgfPTendoption%
% extra legend (style)
+\vfill%
\label{style_extra legend}%
\pgfPTMstyle{4}{extra legend}{\raisebox{-\baselineskip}{%
\vbox{\hsize=.5\linewidth\hbox{\{draw=black!50,fill=black!10,line width=.05pt,}\hbox{rounded corners=2pt\}}}}
}%
{\ \\ [4pt]Style to define the appearance of the extra legend, built with any of the \txttikz\ keys that can be applied to a path construction.}%
-\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=pgfPTdisc]%
+\newpage%\\ [5pt]
+\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=pgfPTdisc]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=pgfPTdisc]}}%
\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=pgfPTdisc,extra legend={draw=red,fill=red!10}]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=pgfPTdisc,extra legend={draw=red,fill=red!10}]}}%
@@ -176,11 +191,10 @@ The key \red{show legend} is set to \red{true}.
\textcolor{cyan!10!white}{legend=\{}radio=<color>,CS=<color>,Z=<color>,pins style=<tikz path keys>,\\ %
\textcolor{cyan!10!white}{legend=\{}extra style=<tikz path keys>,box=<tikz path keys>\}};}}}%
}%
-\vfill%
-\newpage%\\ [5pt]
+\newpage%
\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myname,legend={bc=black!10,extra=false}]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myname,legend={bc=black!10,extra=false}]}}%
-\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myname,legend={acro=false,extra=false}]%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myname,legend={acro=false,extra=false}]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myname,legend={acro=false,extra=false}]}}%
\\ [0pt]\pgfPTendstyle%
\endinput
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Z.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Z.tex
index 3d1f256bd6..27356e91c3 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Z.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_Z.tex
@@ -1,3 +1,4 @@
+\vfill%
\subsubsection{\texorpdfstring{\ding{224} The atomic number}{The atomic number}}%\vspace{6pt}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Z backcolor
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex
index 9e1ba55405..354278b015 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_commands.tex
@@ -15,7 +15,7 @@
\item\pgfPTMmacro{pgfPTpreviewcellstyle}[]\lb\red{name}\rb%
\ or \pgfPTMmacro{pgfPTpreviewcellstyle}[]\lp\red{scale factor}\rp\lb\red{name}\rb%
\ -- preview the named builded cell with an optional scale factor.
-\item\pgfPTMmacro{pgfPTnewcolorscheme}[trailing color]\lb\red{name}\rb\lb\red{color list}\rb%
+\item\pgfPTMmacro{pgfPTnewColorScheme}[trailing color]\lb\red{name}\rb\lb\red{color list}\rb%
\ -- makes a color scheme to fill the cells along the Periodic Table.
\item\pgfPTMmacro{pgfPTnewZlist}[]\lb\red{name}\rb%
\ -- create a user defined atomic numbers (Z) \red{named} list.
@@ -33,8 +33,8 @@
\\ [0pt]\pgfPTMline%
\newpage%
This command can also be used with options -- as described in section \hyperlink{OPTIONS}{Options for \textbackslash pgfPT: creating a Periodic Table} -- to modify, for instance, the font of the Periodic Table or the colors of the cells:
-\\ [10pt]\pgfPTMmacrobox{pgfPT}[font=pnc,back color scheme=MNM]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[font=pnc,back color scheme=MNM]}}%
+\\ [10pt]\pgfPTMmacrobox{pgfPT}[font=pnc,back color scheme=pgfPTMNM]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[font=pnc,back color scheme=pgfPTMNM]}}%
\\ [0pt]\pgfPTMline%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\\ [-32pt]\ %
@@ -87,7 +87,7 @@ It is possible to locally override the \textit{global style} defined:
\\ [-32pt]\ %
\def\tmpSection{\bs{pgfPTresetcell}}%
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{\color{black}$\mathbf{\blacktriangleright}$}\ Utilization of \tmpSection}%
-\label{command:pgfPTresetcell}\addcontentsline{toc}{subsection}{\texorpdfstring{\tmpSection{}}{\textbackslash pgfPTbuildcellstyle}}%
+\label{command:pgfPTresetcell}\addcontentsline{toc}{subsection}{\texorpdfstring{\tmpSection{}}{\textbackslash pgfPTresetcell}}%
\index{COMMANDS@\textbf{COMMANDS}!\textbackslash pgfPTresetcell}%
\\ [4pt]The \pgfPTMmacro{pgfPTresetcell}[] resets the cell to its default layout.
\\ [-32pt]\ %
@@ -154,16 +154,16 @@ It is possible to locally override the \textit{global style} defined:
There are a few \textit{color schemes} predefined:
\index{BUILT-IN@\textbf{BUILT-IN}!color schemes}%
\begin{itembar}
-\item\textbf{default}, the default built-in color scheme, which is loaded if no value is passed to the \red{back color scheme} key.
-\item\textbf{Soft}, a soft color pattern for cells, differentiating metals, non metals, semimetals, lanthanides and actinides.
-\item\textbf{Jmol}, a color scheme based upon \href{http://www.jmol.org/}{Jmol: an open-source Java viewer for chemical structures in 3D}.
-\item\textbf{CPK}, a color scheme that is based upon the colors of the popular plastic spacefilling models which were developed by Corey, Pauling and later improved by Kultun.
-\item\textbf{Rasmol} and \textbf{RasmolNew}, two color schemes based upon the computer program \href{http://www.rasmol.org/}{RasMol}.
-\item\textbf{Wikipedia}, a color scheme built on the Periodic Table of Elements available at \href{https://en.wikipedia.org/wiki/Periodic_table#Classification_of_elements}{Wikipedia}.
-\item\textbf{MNM}, a color pattern which distinguishes between \textbf{M}etals, semimetals and \textbf{N}on \textbf{M}etals.
-\item\textbf{PS}, a color scheme depicting the \textbf{P}hysical \textbf{S}tate at room temperature.
-\item\textbf{Radio}, a two color color scheme showing the radioactivity of the elements.
-\item\textbf{Blocks}, a four colored color scheme showing the \textit{s}, \textit{p}, \textit{d} and \textit{f} blocks of the Periodic Table.
+\item\textbf{pgfPTdefault}, the default built-in color scheme, which is loaded if no value is passed to the \red{back color scheme} key.
+\item\textbf{pgfPTSoft}, a soft color pattern for cells, differentiating metals, non metals, semimetals, lanthanides and actinides.
+\item\textbf{pgfPTJmol}, a color scheme based upon \href{http://www.jmol.org/}{Jmol: an open-source Java viewer for chemical structures in 3D}.
+\item\textbf{pgfPTCPK}, a color scheme that is based upon the colors of the popular plastic spacefilling models which were developed by Corey, Pauling and later improved by Kultun.
+\item\textbf{pgfPTRasmol} and \textbf{pgfPTRasmolNew}, two color schemes based upon the computer program \href{http://www.rasmol.org/}{RasMol}.
+\item\textbf{pgfPTWikipedia}, a color scheme built on the Periodic Table of Elements available at \href{https://en.wikipedia.org/wiki/Periodic_table#Classification_of_elements}{Wikipedia}.
+\item\textbf{pgfPTMNM}, a color pattern which distinguishes between \textbf{M}etals, semimetals and \textbf{N}on \textbf{M}etals.
+\item\textbf{pgfPTPS}, a color scheme depicting the \textbf{P}hysical \textbf{S}tate at room temperature.
+\item\textbf{pgfPTRadio}, a two color color scheme showing the radioactivity of the elements.
+\item\textbf{pgfPTBlocks}, a four colored color scheme showing the \textit{s}, \textit{p}, \textit{d} and \textit{f} blocks of the Periodic Table.
\end{itembar}
\vspace{5pt}
Writing a color scheme can be painstaking work, so a \textit{script} is provided for that:
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_decSep.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_decSep.tex
new file mode 100644
index 0000000000..a6e4d3f97a
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_decSep.tex
@@ -0,0 +1,24 @@
+\subsubsection{\texorpdfstring{\ding{224} \itshape Decimal separator in numbers}{Decimal separator in numbers}}\vspace{6pt}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Decimal separator
+\pgfPTMoption[\pgfPTnewinversion{2.1.5}]{4}{decimal separator}{.}{%
+Sets the decimal separator in the numeric values of quantities. \textit{If the separator character is a comma it must be provided between curly braces -- \{,\}}. \\ Note that the decimal separator key is used to perform a direct replacement of the dot with the specified character. Therefore, there is no validation and any character can be used as a decimal separator (usually a dot or a comma).
+}%
+\newpage%\\ [5pt]
+\pgfPTMmacrobox{pgfPT}[Z list={1,...,54},decimal separator={,}]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,54},decimal separator={,}]}}%
+\\ [0pt]\pgfPTendoption%
+\\ [5pt]
+\pgfPTMstyle[\pgfPTnewinversion{2.1.5}]{4}{comma separator}{no value}%
+{A style equivalent to \red{decimal separator=\{,\}}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[comma separator]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[comma separator]}}%
+\\ [0pt]\pgfPTendstyle%
+\\ [5pt]
+\pgfPTMstyle[\pgfPTnewinversion{2.1.5}]{4}{dot separator}{no value}%
+{A style equivalent to \red{decimal separator=.}}%
+\newpage%\\ [5pt]
+\pgfPTMmacrobox{pgfPT}[dot separator]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[dot separator]}}%
+\\ [0pt]\pgfPTendstyle%
+\endinput
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_density.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_density.tex
index 2a33c0371e..511bd765c6 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_density.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_density.tex
@@ -14,28 +14,28 @@ Sets the density value text color.}
\pgfPTMoption{4}{d font}{\string\tiny\string\bfseries}{%
Sets the density value text font.
}
-\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myd,show title=false]%
-\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},Z list={1,...,36},cell style=myd,show title=false]}}%
-\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myd,show title=false,d font=\string\tiny\string\itshape]%
+%\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myd,show title=false]%
+%\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},Z list={1,...,36},cell style=myd,show title=false]}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myd,show title=false,d font=\string\tiny\string\itshape]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},Z list={1,...,36},cell style=myd,show title=false,d font=\tiny\itshape]}}%
\\ [0pt]\pgfPTendoption%
-% d unit=<g/cm3|g/dm3|both> .default=g/dm3
\vfill%
+% d unit=<g/cm3|g/dm3|both> .default=g/dm3
\pgfPTMoption[\pgfPTnewinversion{1.0.1}]{4}{d unit}{both}{%
Sets the unit for the density of the elements. The two possible values to this key are \red{g/dm3} ($\mathsf{g/dm^3}$), \red{g/cm3} ($\mathsf{g/cm^3}$) and \red{both} ($\mathsf{g/dm^3}$ for elements in the gaseous state and $\mathsf{g/cm^3}$ for all other elements).
}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myd,show title=false]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myd,show title=false]}}%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myd,show title=false]}}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myd,show title=false,d unit=g/cm3]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myd,show title=false,d unit=g/cm3]}}%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myd,show title=false,d unit=g/cm3]}}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=myd,show title=false,d unit=g/dm3]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myd,show title=false,d unit=g/dm3]}}%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},cell style=myd,show title=false,d unit=g/dm3]}}%
\\ [0pt]\pgfPTendoption%
-\vfill\newpage\ \\ [-32pt]%
+\newpage\ \\ [-32pt]%
% d precision
\pgfPTMoption{4}{d precision}{-1}{%
Sets the density precision, \ie, the decimal places displayed in their value, performing the respective rounding, without zero padding the value.
-\\ [10pt]\tikz{\node[text width=\linewidth-.6666em,fill=orange!5!white,draw=orange,rounded corners=2pt] {\textbf{\red{NOTE}}:\\ Rounding is performed over density values witch actually have a maximum 5 or 8 decimal places, when the values are in $\mathsf{g/dm^3}$ or in $\mathsf{g/cm^3}$, respectively.. So giving this key a value of -1 (the value of the melting or boiling point as-is) or 5 or 8 has the same effect.
+\\ [10pt]\tikz{\node[text width=\linewidth-.6666em,fill=orange!5!white,draw=orange,rounded corners=2pt] {\textbf{\red{NOTE}}:\\ Rounding is performed over density values witch actually have a maximum 5 or 8 decimal places, when the values are in $\mathsf{g/dm^3}$ or in $\mathsf{g/cm^3}$, respectively.. So giving this key a value of -1 (the value of the density as-is) or 5 or 8 has the same effect.
\\ \textit{Therefore the values provided to this key should be any integer between -1 and 4 ($\mathsf{g/dm^3}$) or 7 ($\mathsf{g/cm^3}$). Any other integer provided will be processed as -1.}};}
}
\vfill%\\ [10pt]
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_exerciselayout.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_exerciselayout.tex
index 2eb989abae..00f6da0af4 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_exerciselayout.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_exerciselayout.tex
@@ -1,7 +1,7 @@
\vfill%
\subsubsection{\texorpdfstring{\ding{224} \itshape Exercise layout}{Exercise layout}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-The \red{keys} described in this section enable the \textit{exercise layout} of the Periodic Table, \ie, in this mode the \textit{structure} of the Periodic Table is drawn, but there are only a few contents available in the cells.
+The \red{keys} \hypertarget{exMODE}{described in this} section enable the \textit{exercise layout} of the Periodic Table, \ie, in this mode the \textit{structure} of the Periodic Table is drawn, but there are only a few contents available in the cells.
% only cells=false
\pgfPTMoption{4}{only cells}{false}%
{When set to \red{true} the Periodic Table is drawn with only the cells without any contents.
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex
index 6658536639..ed6f4ad78f 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_generallayout.tex
@@ -2,11 +2,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Z list
\label{option_Z list}%
-\pgfPTMoption{4}{Z list}{all}%
-{Set's the list of the elements to display in the Periodic Table. It could be a \lblue{name} or a \lblue{comma sepa\-rated} list of atomic numbers, which in turn supports \textit{the dots notation} as explained in the section \textit{Repeating Things: The Foreach Statement} in the \href{https://www.ctan.org/pkg/pgf}{pgfmanual}.}
+\pgfPTMoption[\pgfPTchangedinversion{2.1.5}]{4}{Z list}{all}%
+{Set's the list of the elements to display in the Periodic Table. It could be a \lblue{name} or a \lblue{comma sepa\-rated} list of atomic numbers (\hyperlink{Zlistdesc}{see below}), which in turn supports \textit{the dots notation} as explained in the section \textit{Repeating Things: The Foreach Statement} in the \href{https://www.ctan.org/pkg/pgf}{pgfmanual}.\vskip0pt\relax}
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36}]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36}]}}%
-\\ [10pt]\pgfPTMoptiontxt{%
+\\ [5pt]\pgfPTMoptiontxt{%
The possible \lblue{name} is one of the following:
\begin{itembar}
\item\textbf{built-in}:
@@ -20,11 +20,36 @@ The possible \lblue{name} is one of the following:
\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{ P1}, \myldots\ , \sq{P7}, \sq{P6*}, \sq{P7*}, which are used, respectively, for the elements of the \textit{1\raisebox{3pt}{\scriptsize st} period}, \myldots\ , \textit{7\raisebox{3pt}{\scriptsize\hspace{.5pt}th} period}, \textit{6\raisebox{3.5pt}{\scriptsize\hspace{.25pt}th} period and lanthanoids}\red{$\,^\dag$}, \textit{7\raisebox{3pt}{\scriptsize\hspace{.5pt}th} period and actinoids}\red{$\,^\dag$}.
\\ [3pt]\makebox[\linewidth][r]{\scriptsize\red{$^\dag\,$}\textit{Depending on the value of the \red{IUPAC} key, the Lanthanum or Actinium are or are not included}.}
\end{itemize}
-\item
-any \textbf{user defined} name via \pgfPTMmacro{pgfPTnewZlist}[]\{name\}\{list\}
+\item any \textbf{user defined} name via \pgfPTMmacro{pgfPTnewZlist}[]\{name\}\{list\}
\end{itembar}%
}%
-\\ [-10pt]\pgfPTendoption%
+\newpage%\vspace{-34pt}\ %
+\pgfPTMoptiontxt{%
+\hypertarget{Zlistdesc}{Since} \blue{v2.1.5} the \red{Z list} supports a new syntax which makes possible to get \textit{empty} cells \textit{anywhere} in the Periodic Table. The \red{Z list} can be:
+\vspace{6pt}
+\begin{itembar}
+\item a list of numbers -- \green{Z list=\{1,...,118\}} or \green{Z list=\{1,2,3,4,5,6,11,12,13,14,15,16\}}.
+\item[]
+\item a list of numbers preceded with a star -- \green{Z list=*\{1,...,5,9,10,...,24\}} or \green{Z list=*(\red{options})\{1,...,5,9, 10,...,24\}}.
+\begin{itemize}
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}] \red{Z list} preceded only with a star:
+\\ It is used to draw the cells skipped in the list without information, but with the atomic number and filling.
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list=*{1,...,5,9,10,...,18}]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list=*{1,...,5,9,10,...,18}]}}%
+\item[]
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}] \red{Z list} is preceded with a star followed by \red{options}:
+\\ It is used to draw the cells skipped in the list without information, with what is shown and how it is shown controlled by the options. There are only two options available -- \red{hide Z} and \red{back color=<color>} -- which can be used separately or as a comma separated pair in any order.
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list=*(hide Z){1,...,5,9,10,...,18}]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list=*(hide Z){1,...,5,9,10,...,18}]}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list=*({back color=white}){1,...,5,9,10,...,18}]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list=*({back color=white}){1,...,5,9,10,...,18}]}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list=*({hide Z,back color=white}){1,...,5,9,10,...,18}]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list=*({hide Z,back color=white}){1,...,5,9,10,...,18}]}}%
+\\ [10pt]The \textit{starred} version of the \red{Z list} can be used as an alternative or a complement to the \hyperlink{exMODE}{Exercise layout} mode of the Periodic Table.
+\end{itemize}
+\end{itembar}%
+}%
+\\ [-5pt]\pgfPTendoption%
\newpage\vspace{-34pt}\ %
% cell width
\label{option_cell width}%
@@ -84,10 +109,15 @@ any \textbf{user defined} name via \pgfPTMmacro{pgfPTnewZlist}[]\{name\}\{list\}
% font
\vfill%
\label{option_font}%
-\pgfPTMoption[\pgfPTchangedinversion{2.1.0}]{4}{font}{phv (\textrm{pdf\LaTeX}); TeX Gyre Heros (\textrm{Xe\LaTeX} or \textrm{Lua\LaTeX})}%
-{Sets the font family, via the proper \textit{\textrm{\LaTeX} font name}, to use in the Periodic Table.
-\\ [2pt]When \textrm{pdf\LaTeX} is used to typeset the Periodic Table the \textit{default} font is \textit{phv}, \ie, the Helvetica font. In this case the value of the \red{font} key can be any \textit{\textrm{\LaTeX} font name} known to the local \textrm{\LaTeX} installation.
-\\ [2pt]When \textrm{Xe\LaTeX} or \textrm{Lua\LaTeX} are used to typeset the Periodic Table the \textit{default} font is \textit{TeX Gyre Heros}, a closest alternative to Helvetica font. In this case the value of the \red{font} key can be any \textit{font name known to your Operating System} and with \textrm{Lua\LaTeX} it can also be any \textit{font name available in your \textrm{TEXMF} tree}.
+\pgfPTMoption[\pgfPTchangedinversion{2.1.5}]{4}{font}{\raisebox{-\baselineskip}{%
+\vbox{\hsize=.675\linewidth\hbox{phv (\textrm{pdf\LaTeX}); TeX Gyre Heros (\textrm{Xe\LaTeX} or \textrm{Lua\LaTeX});}%
+\hbox{BabelStone Han (for Chinese)}}}%
+}%
+%phv (\textrm{pdf\LaTeX}); TeX Gyre Heros (\textrm{Xe\LaTeX} or \textrm{Lua\LaTeX});\par BabelStone Han (for Chinese)}%
+{\ \\ [8pt]Sets the font family, via the proper \textrm{\LaTeX} \textit{font name}, to use in the Periodic Table.
+\\ [2pt]When \textrm{pdf\LaTeX} is used to typeset the Periodic Table the \textit{default} font is \textit{phv}, \ie, the Helvetica font. In this case the value of the \red{font} key can be any \textrm{\LaTeX} \textit{font name} known to the local \textrm{\LaTeX} installation.
+\\ [2pt]When \textrm{Xe\LaTeX} or \textrm{Lua\LaTeX} are used to typeset the Periodic Table the \textit{default} font is \textit{TeX Gyre Heros}, a closest alternative to Helvetica font. In this case the value of the \red{font} key can be any \textit{font name known to your Operating System or} \textrm{\LaTeX} \textit{distribuition} and with \textrm{Lua\LaTeX} it can also be any \textit{font name available in your} \textrm{TEXMF} \textit{tree}.
+\\ [2pt]If the Chinese language is loaded the default font is BabelStone Han. See \hyperlink{subsec::zhLang}{Chinese} user language for more details.
\\ \hfill\scriptsize See \textit{\textrm{\LaTeX} font names} below or the \href{https://ftp.eq.uc.pt/software/TeX/macros/unicodetex/latex/fontspec/fontspec.pdf\#page=9}{fontspec documentation} for further details.\normalsize\\ \ }%
\\ [10pt]Examples with \textrm{pdf\LaTeX}:
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},font=ptm]%
@@ -148,45 +178,51 @@ any \textbf{user defined} name via \pgfPTMmacro{pgfPTnewZlist}[]\{name\}\{list\}
\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},font=Arial,CS font=\string\fontspec{LCALLIG.TTF}\string\selectfont]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\includegraphics{manualfiles/pgfPTfontLuaXeLaTeX2.pdf}}}%
\\ [5pt]\pgfPTendoption%
+\vfill
+% back color
+\label{option_back color}%
+\pgfPTMoption{4}{back color}{white}%
+{Sets the background of each cell of the Periodic Table. It only takes effect if the \red{back color scheme} key is set to \red{solid}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},back color=black!15]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},back color=black!15]}}%
+\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},back color scheme=solid,back color=black!15]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},back color scheme=solid,back color=black!15]}}%
+\\ [5pt]\pgfPTendoption%
+\newpage\vspace{-34pt}\ %
% back color scheme
\label{option_back color scheme}%
-\vfill
-\pgfPTMoption{4}{back color scheme}{default}%
+\pgfPTMoption{4}{back color scheme}{pgfPTdefault}%
{Sets a \blue{named} back color scheme for the Periodic Table.}%
-\\ [5pt]\pgfPTMmacrobox{pgfPT}[back color scheme=Soft]%
-\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[back color scheme=Soft]}}%
-\newpage%
+\\ [2.5pt]\pgfPTMmacrobox{pgfPT}[back color scheme=pgfPTSoft]%
+\\ [2.5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[back color scheme=pgfPTSoft]}}%
+\vfill
\pgfPTMoptiontxt{%
The possible \lblue{name} is one of the following:
\begin{itembar}
\item\textbf{built-in}:
\begin{itemize}
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{Soft}, a soft color scheme that distinguishes metal, non metals, silicon and germanium, lanthanoids and actinoids.
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{Jmol}, is the color scheme used in the computer software \href{http://jmol.sourceforge.net/}{Jmol}: an open-source Java viewer for chemical structures in 3D.
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{CPK}, is the color scheme of the popular color convention for distinguishing atoms of different chemical
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTSoft}, a soft color scheme that distinguishes metals, non metals, silicon and germanium, lanthanoids and actinoids.
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTJmol}, is the color scheme used in the computer software \href{http://jmol.sourceforge.net/}{Jmol}: an open-source Java viewer for chemical structures in 3D.
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTCPK}, is the color scheme of the popular color convention for distinguishing atoms of different chemical
elements in molecular models. The scheme is named after the CPK molecular models designed by chemists Robert Corey and Linus Pauling, and improved by Walter Koltun.
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{Rasmol}, is the color scheme used in the computer software \href{http://www.rasmol.org/}{RasMol}, a program for molecular graphics visualization originally developed by Roger Sayle.
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{RasmolNew}, is a color scheme used in RasMol with revision of CPK colors made by C. Chigbo (RasMol 2.7.3).
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{Wikipedia}, is the color scheme based on the \href{https://en.wikipedia.org/wiki/Periodic_table\#Classification_of_elements}{Wikipedia Periodic Table of Elements}.
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{MNM}, is designed to show \textbf{M}etals and \textbf{N}on \textbf{M}etals in two different colors, showing also the semi-metals in a third color.
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{PS}, is designed to show the \textbf{P}hysical \textbf{S}tate of the elements at normal temperature and pressure (NTP) in different colors.
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{Radio}, is designed to show the \textbf{R}adioactive elements in one color and the non radioactive elements in another color.
-\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{Blocks}, for showing the elements in each block of the Periodic Table with the same color.
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTRasmol}, is the color scheme used in the computer software \href{http://www.rasmol.org/}{RasMol}, a program for molecular graphics visualization originally developed by Roger Sayle.
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTRasmolNew}, is a color scheme used in RasMol with revision of CPK colors made by C. Chigbo (RasMol 2.7.3).
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTWikipediaII}, is the color scheme based on the most recent (\href{https://commons.wikimedia.org/wiki/File:Simple_Periodic_Table_Chart-en.svg\#filehistory}{November 2020 to present}) \href{https://en.wikipedia.org/wiki/Periodic_table\#Classification_of_elements}{Wikipedia Periodic Table of Elements}.
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTWikipediaI}, is the color scheme based on the previous (\href{https://commons.wikimedia.org/wiki/File:Simple_Periodic_Table_Chart-en.svg\#filehistory}{until October 2020}) Wikipedia Periodic Table of Elements.
+ \\ [2pt]\tikz{\node[text width=\linewidth-3mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=1.5mm] {%
+ The higher the number on Wikipedia, the more recent the color scheme.
+ \\ For backwards compatibility (and also for simplicity) pgfPTWikipedia points to pgfPTWikipediaII.% and csWikipedia points to csWikipediaII,
+ };}
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTMNM}, is designed to show \textbf{M}etals and \textbf{N}on \textbf{M}etals in two different colors, showing also the semi-metals in a third color.
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTPS}, is designed to show the \textbf{P}hysical \textbf{S}tate of the elements at normal temperature and pressure (NTP) in different colors.
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTRadio}, is designed to show the \textbf{R}adioactive elements in one color and the non radioactive elements in another color.
+\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{pgfPTBlocks}, for showing the elements in each block of the Periodic Table with the same color.
\item[\raisebox{1pt}{\scriptsize$\vartriangleright\,$}]\sq{solid}, to show the background of each cell of the Periodic Table with the same color specified by the key \sq{\red{back color}}.
\end{itemize}
\item any \textbf{user defined} name via \bs{pgfPTnewColorScheme}\lb\red{name}\rb\lb\red{color list}\rb%
\end{itembar}%
}%
-\\ [-5pt]\pgfPTendoption%
-% back color
-\label{option_back color}%
-\pgfPTMoption{4}{back color}{white}%
-{Sets the background of each cell of the Periodic Table. It only takes effect if the \red{back color scheme} key is set to \red{solid}}%
-\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},back color=black!15]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},back color=black!15]}}%
-\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},back color scheme=solid,back color=black!15]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},back color scheme=solid,back color=black!15]}}%
-\\ [5pt]\pgfPTendoption%
+\\ [-7.5pt]\pgfPTendoption%
\newpage\ \vfill%
\textit{It is possible to set the \red{back color scheme} key with the built-in names using the following styles}:\vfill%
% STYLES for back color schemes -> csSoft,csJmol,csCPK,csRasmol,csRasmolNew,csWikipedia,csMNM,csPS,csRadio,csBlocks,csSolid
@@ -199,9 +235,11 @@ elements in molecular models. The scheme is named after the CPK molecular models
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[csSolid=black!15]}}%
\\ [5pt]\pgfPTendstyle%
\newpage\vspace{-34pt}\ %
-\foreach \csName/\x in {Soft/0,Jmol/1,CPK/0,Rasmol/1,RasmolNew/0,Wikipedia/1,MNM/0,PS/1,Radio/0,Blocks/1}{%
+%\foreach \csName/\x in {Soft/0,Jmol/1,CPK/0,Rasmol/1,RasmolNew/0,Wikipedia/1,MNM/0,PS/1,Radio/0,Blocks/1}{%
+\foreach \csName/\x\desc in {Soft/0/Soft,Jmol/1/Jmol,CPK/0/CPK,Rasmol/1/Rasmol,RasmolNew/0/RasmolNew,%
+Wikipedia/1/WikipediaII,WikipediaI/0/WikipediaI,WikipediaII/1/WikipediaII,MNM/0/MNM,PS/1/PS,Radio/0/Radio,Blocks/1/Blocks}{%
\pgfPTMstyletxt{4}{cs\csName}{no value}%
-{A style equivalent to \red{back color scheme=\csName}}%
+{A style equivalent to \red{back color scheme=pgfPT\desc}}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[cs\csName]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[cs\csName]}}%
\\ [0pt]\pgfPTendstyle%
@@ -262,7 +300,7 @@ elements in molecular models. The scheme is named after the CPK molecular models
\vfill
\label{option_languages}%
\pgfPTMoption[\pgfPTchangedinversion{2.1.0}]{4}{languages}{\{\}}%
-{Sets a language list to use in the Periodic Table. It is a comma separated list of language flags: \sq{pt}, \sq{en}, \sq{fr}, \sq{de}, \sq{it}, \sq{es} or \sq{br}. If a user language has been loaded, the corresponding ISO 639-1 code can also be used as a language flag. \textit{This key overrides the default language, that is, the language loaded at package inclusion}.\\ \ }%
+{Sets a language list to use in the Periodic Table. It is a comma separated list of language flags: \sq{pt}, \sq{en}, \sq{fr}, \sq{de}, \sq{it}, \sq{es} or \sq{br}. If a user language has been loaded, the corresponding ISO 639-1 code can also be used as a language flag. \textit{This key locally overrides the default language, that is, the language loaded at package inclusion}.\\ \ }%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},languages=pt]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},languages=pt]}}%
\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},cell style=pgfPT2lang,languages={en,fr}]%
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex
index 5e8ffea167..e973146b7f 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_libCS.tex
@@ -232,7 +232,7 @@ P6=*[RGB:62;82;126],P7=*[RGB:101;117;153]}\rb%
\label{command:pgfPTCScombine}\addcontentsline{toc}{subsubsection}{\texorpdfstring{\tmpSectionIII{}}{\textbackslash pgfPTCScombine}}%
\index{LIBRARIES@\textbf{\cyan{LIBRARIES}}!colorschemes@\textbf{\red{Color Schemes Library}}!\tmpSectionIII}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\\ [10pt]This command \textbf{combines two named Color Schemes} and merges the result in a new Color Scheme with \red{name of the new color scheme}.
+\\ [10pt]This command \textbf{combines two named Color Schemes} and merges the result into a new Color Scheme with \red{name of the new color scheme}.
\\ For example \bs{pgfPTCScombine}\lb\red{myCSA,myCSB,myCSC}\rb\ adds the color scheme \red{myCSA} to the color scheme \red{myCSB} and their sum will be available as the color scheme \red{myCSC}.
\\ [3pt]\blue{\textbf{NOTE}}: if the Color Schemes have different sizes (\ie, different number of colors), the last color from the color scheme that ends first will be used until the other color scheme also ends.
\\ [3pt]The optional parameters \lp\red{prop1:prop2,mode}\rp\ are for controlling how the two Color Schemes are combined:
@@ -292,24 +292,24 @@ P6=*[RGB:62;82;126],P7=*[RGB:101;117;153]}\rb%
}{%
\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
}% -----
-\vfill\pgfPTCScombine[add]{Soft,group,mix}%
+\vfill\pgfPTCScombine[add]{pgfPTSoft,group,mix}%
\textit{Built-in color schemes can also be mixed}:
\\ [10pt]\pgfPTMlibexample{%
-\bs{pgfPTCScombine}\lp\red{add}\rp\lb\red{Soft,group,mix}\rb%
+\bs{pgfPTCScombine}\lp\red{add}\rp\lb\red{pgfPTSoft,group,mix}\rb%
\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
}{%
\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
}% -----
-\newpage\pgfPTCScombine[add,3:1]{Soft,PS,mix}%
+\newpage\pgfPTCScombine[add,3:1]{pgfPTSoft,pgfPTPS,mix}%
\pgfPTMlibexample{%
-\bs{pgfPTCScombine}\lp\red{add,3:1}\rp\lb\red{Soft,PS,mix}\rb%
+\bs{pgfPTCScombine}\lp\red{add,3:1}\rp\lb\red{pgfPTSoft,pgfPTPS,mix}\rb%
\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
}{%
\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
}% -----
-\\ [4pt]\pgfPTCScombine{Radio,Wikipedia,mix}%
+\\ [4pt]\pgfPTCScombine{pgfPTRadio,pgfPTWikipedia,mix}%
\pgfPTMlibexample{%
-\bs{pgfPTCScombine}\lp\red{add}\rp\lb\red{Radio,Wikipedia,mix}\rb%
+\bs{pgfPTCScombine}\lp\red{add}\rp\lb\red{pgfPTRadio,pgfPTWikipedia,mix}\rb%
\\ \pgfPTMmacro{pgfPT}[back color scheme=mix,show title=false]%
}{%
\scalebox{.425}{\pgfPT[back color scheme=mix,show title=false]}%
@@ -322,7 +322,7 @@ P6=*[RGB:62;82;126],P7=*[RGB:101;117;153]}\rb%
\index{LIBRARIES@\textbf{\cyan{LIBRARIES}}!colorschemes@\textbf{\red{Color Schemes Library}}!\tmpSectionIV}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\\ [10pt]This command \textbf{writes the provided Color Schemes to a file} for later use without loading this library. It has a mandatory argument, the \red{list of the color schemes names} to be written and an optional argument, the \red{filename}. If no \red{filename} is provided the first name on the \red{list of the color schemes names} is used.
-\\ For example, \bs{pgfPTCSwrite}\lp\red{myGroupColors}\rp\lb\red{myGroupGradGreenToRed,myGroupGreens, myGroupGradYellowToRed}\rb, \dcyan{\textit{will create (or overwrite), in the current working directory, a file with name} \texttt{\large myGroupColors.tex} \textit{with the follwing contents}}:
+\\ For example, \bs{pgfPTCSwrite}\lp\red{myGroupColors}\rp\lb\red{myGroupGradGreenToRed,myGroupGreens, myGroupGradYellowToRed}\rb, \dcyan{\textit{will create (or overwrite), in the current working directory, a file with name} \texttt{\large myGroupColors.tex} \textit{with the following contents}}:
\mymfbox{\textsf{%
\textbackslash pgfPTnewColorScheme\{myGroupGradGreenToRed\}\{0/1/0,\myldots%
\\ \textbackslash pgfPTnewColorScheme\{myGroupGreens\}\{0/1/.1,\myldots%
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_name.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_name.tex
index 78f8178826..0fcc955dd2 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_name.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_name.tex
@@ -11,7 +11,7 @@ Sets the color of the element name.
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},name color=red]}}%
\\ [0pt]\pgfPTendoption%
% name font
-\pgfPTMoption{4}{name font}{\string\fontseries\{l\}\string\selectfont\string\tiny}{%
+\pgfPTMoption{4}{name font}{\string\tiny}{% \string\fontseries\{l\}\string\selectfont (removed @v2.1.2)
Sets the font of the element name.
}
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},name font=\string\itshape\string\tiny]%
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_periodgroup.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_periodgroup.tex
index 59e27e553e..07bf420037 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_periodgroup.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_periodgroup.tex
@@ -1,4 +1,3 @@
-%\vfill\vfill%
\subsubsection{\texorpdfstring{\ding{224} Periods and Groups}{Periods and Groups}}%\vspace{6pt}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% show period numbers
@@ -10,17 +9,39 @@
\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},show period numbers=false]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},show period numbers=false]}}%
\\ [5pt]\pgfPTendoption%
-%\vfill%
-%\newpage\ \\ [-32pt]%
% show group numbers
+\newpage\vspace{-34pt}\ %
\label{option_show group numbers}%
\pgfPTMoption{4}{show group numbers}{true}%
{When set to \red{true} the group numbers are shown, otherwise they are not shown.}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36}]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36}]}}%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36}]}}%
\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},show group numbers=false]%
-\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},show group numbers=false]}}%
-\\ [5pt]\pgfPTendoption%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},show group numbers=false]}}%
+\\ [0pt]\pgfPTendoption%
+\vfill%
+% group numbers
+\label{option_group numbers}%
+\pgfPTMoption[\pgfPTnewinversion{2.1.1}]{4}{group numbers}{arabic}%
+{This key controls how group numbering is displayed:
+\vspace{4pt}\begin{itemlist}
+\item\red{\textbf{arabic}}: group numbers are shown in arabic numerals as recommended by IUPAC since 1988.
+\item\red{\textbf{CAS}}: group numbers are shown in Roman numerals and `A' or `B' suffix. This is an older naming scheme, used by the Chemical Abstract Service (CAS), more popular in the United States.
+\item\red{\textbf{IUPAC}}: group numbers are shown in Roman numerals and `A' or `B' suffix. This is an older naming scheme, used by IUPAC before 1988, more popular in Europe.
+\item\red{\textbf{CAS*}}: combines the option \red{CAS} and \red{arabic}. Roman numerals and `A' or `B' suffix are above the group and the arabic numerals above them.
+\item\red{\textbf{IUPAC*}}: combines the option \red{IUPAC} and \red{arabic}. Roman numerals and `A' or `B' suffix are above the group and the arabic numerals above them.
+\end{itemlist}
+}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},group numbers=CAS]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},group numbers=CAS]}}%
+\newpage\vspace{-34pt}\ %\\ [10pt]
+\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},group numbers=IUPAC]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},group numbers=IUPAC]}}%
+\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},group numbers=CAS*]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},group numbers=CAS*]}}%
+\\ [10pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},group numbers=IUPAC*]%
+\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},group numbers=IUPAC*]}}%
+\\ [0pt]\pgfPTendoption%
\vfill%
% period label color
\label{option_period label color}%
@@ -28,19 +49,26 @@
{Sets the period label color.}%
\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},period label color=black]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},period label color=black]}}%
-\\ [5pt]\pgfPTendoption%
-\vfill%
-%\newpage\ \\ [-32pt]%
+\\ [0pt]\pgfPTendoption%
+\newpage\vspace{-34pt}\ %\vfill%
% group label color
\label{option_group label color}%
\pgfPTMoption{4}{group label color}{blue!50!black}%
{Sets the group label color.}%
-\vfill%
-\newpage%\\ [5pt]
-\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},group label color=black]%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},group label color=black]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},group label color=black]}}%
\\ [0pt]\pgfPTendoption%
\vfill%
+% Roman label color
+\label{option_Roman label color}%
+\pgfPTMoption[\pgfPTnewinversion{2.1.1}]{4}{Roman label color}{blue!70!black}%
+{Sets the Roman group label color.}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},group numbers=CAS*,Roman label color=purple]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},group numbers=CAS*,Roman label color=purple]}}%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},group numbers=CAS*,Roman label color=purple, group label color=teal]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},group numbers=CAS*,Roman label color=purple,group label color=teal]}}%
+\\ [0pt]\pgfPTendoption%
+\vfill%
% label font
\label{option_label font}%
\pgfPTMoption{4}{label font}{\string\small\string\bfseries}%
@@ -62,7 +90,6 @@ The key \red{show period numbers} is set to \red{true}.
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},per={gr=false,c=green!50!black}]}}%
\\ [0pt]\pgfPTendstyle%
\vfill%
-%\newpage\ \\ [-32pt]%
% gr={per=??,c=??,f=??} -> auto sets 'show groups numbers=true'; 'show period numbers' can be set to 'false' by the user
% gr/.default={per=true,c=blue!50!black,f=\small\bfseries}
% gr (pseudo style)
@@ -72,11 +99,10 @@ The key \red{show period numbers} is set to \red{true}.
The key \red{show group numbers} is set to \red{true}.
\\ [3pt]\makebox[\linewidth][c]{\use{gr=\{per=<true|false>,c=<color>,f=<font commands>\}}}%
}%
-\vfill%
-\newpage%\\ [5pt]
-\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},gr={per=false,c=green!50!black}]%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36},gr={per=false,c=green!50!black}]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[Z list={1,...,36},gr={per=false,c=green!50!black}]}}%
\\ [0pt]\pgfPTendstyle%
+\newpage\vspace{-34pt}\ %%
% per+gr={c=??,pc=??,gc=??,f=??} -> auto sets 'show period numbers=true' & 'show groups numbers=true'
% per+gr/.default={pc=red!50!black,gc=blue!50!black,f=\small\bfseries}
% per+gr (pseudo style)
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_variations.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_variations.tex
index 04a606adfd..019fcf8e2b 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_variations.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgf-PeriodicTableManual_variations.tex
@@ -21,7 +21,7 @@
{Sets the color used in the filling of the \textit{arrows} for the atomic radius variations.
\\ [10pt]\tikz{\node[text width=\linewidth-.6666em,fill=orange!5!white,draw=orange,rounded corners=2pt] {\textbf{\orange{NOTE}}:\\ The color provided to \red{varR color} could be any defined color via the command \texttt{\normalsize\textbackslash definecolor} or by \textit{mixing} colors, using, for instance, the syntax \texttt{\normalsize color1!value!color2}, as explained in the \href{https://ctan.org/pkg/xcolor}{xcolor} package documentation.};}
}%
-\\ [5pt]\pgfPTMmacrobox{pgfPT}[show periodic variations,cell style=pgfPTR,varR color=teal,R color=purple]%
+\\ [5pt]\pgfPTMmacrobox{pgfPT}[show periodic variations,cell style=pgfPTR,varR color=purple!50!white,R color=purple]%
\\ [5pt]\makebox[\linewidth][c]{\scalebox{.6}{\pgfPT[show periodic variations,cell style=pgfPTR,varR color=purple!50!white, R color=purple]}}%
\\ [5pt]\pgfPTendoption%
% varR font
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_user_compactPT.pdf b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_user_compactPT.pdf
new file mode 100644
index 0000000000..adc5c41f5f
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_user_compactPT.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_1.pdf b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_1.pdf
new file mode 100644
index 0000000000..ec28f5dc44
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_1.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_1.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_1.tex
new file mode 100644
index 0000000000..b0d2008a90
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_1.tex
@@ -0,0 +1,10 @@
+\documentclass{article}
+\usepackage[userlang=zh]{pgf-PeriodicTable}%
+
+\usepackage[active,tightpage]{preview}
+\PreviewEnvironment{tikzpicture}
+\setlength\PreviewBorder{0pt}%
+
+\begin{document}\noindent%
+\pgfPT
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_2.pdf b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_2.pdf
new file mode 100644
index 0000000000..046a4210ea
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_2.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_2.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_2.tex
new file mode 100644
index 0000000000..4775b8e009
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_2.tex
@@ -0,0 +1,10 @@
+\documentclass{article}
+\usepackage[userlang=zh,numerals=zh]{pgf-PeriodicTable}%
+
+\usepackage[active,tightpage]{preview}
+\PreviewEnvironment{tikzpicture}
+\setlength\PreviewBorder{0pt}%
+
+\begin{document}\noindent%
+\pgfPT
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_3.pdf b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_3.pdf
new file mode 100644
index 0000000000..41ede02fc5
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_3.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_3.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_3.tex
new file mode 100644
index 0000000000..f0af937479
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_3.tex
@@ -0,0 +1,17 @@
+\documentclass{article}
+\usepackage[userlang=zh]{pgf-PeriodicTable}%
+
+\usepackage[active,tightpage]{preview}
+\PreviewEnvironment{tikzpicture}
+\setlength\PreviewBorder{0pt}%
+
+\begin{document}\noindent%
+\setmainfont{SimSun}
+\pgfPTzhtextfontSS{SimSun}% font for names of elements Z={109,112.113,117,118} ->
+% meitnerium, copernicium, nihonium, tennessine, oganesson
+\pgfPTzhtextfontSSB{SimSun-ExtB}% font for names of elements Z={104,105,106,107,108,110,111,114} ->
+% rutherfordium, dubnium, seaborgium, bohrium, hassium,darmstadtium, roentgenium, flerovium
+\pgfPTzhtextfontLv{SimSun-ExtB}% font for name of element Z={116} -> livermorium
+
+\pgfPT[font=SimSun]
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_fonts.pdf b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_fonts.pdf
new file mode 100644
index 0000000000..0afcb0d885
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_fonts.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_fonts.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_fonts.tex
new file mode 100644
index 0000000000..896f22bb61
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPT_zh_fonts.tex
@@ -0,0 +1,105 @@
+% !TeX TS-program = XeLaTeX
+
+\documentclass{article}
+
+\usepackage{fontspec}[2020/02/03]
+\setmainfont{Verdana}
+\usepackage{tikz}
+
+\usepackage[active,tightpage]{preview}
+\PreviewEnvironment{tikzpicture}
+\setlength\PreviewBorder{0pt}%
+
+\newcount\nl\nl=1\relax% line number
+\newcount\nc\nc=0\relax% column number
+\newdimen\wdc\wdc=75pt\relax% column width
+
+% TeX Live 2024 Fonts:
+% FandolSong,FandolFang,FandolHei,FandolKai,AR PL SungtiL GB,AR PL KaitiM GB (collection-langcjk + collection-langchinese)
+% Microsoft Fonts:
+% Win10 & 11: SimSun & SimSun-ExtB
+% Win10 & 11: Microsoft YaHei & Microsoft YaHei UI
+% Win10 & 11: Microsoft JhengHei & Microsoft JhengHei UI
+
+% Testing the Fonts:
+\def\pgfPTzhTF#1{\begingroup\setmainfont{\typeface}#1\endgroup}
+
+\begin{document}
+\begin{tikzpicture}[every node/.style={below right,text depth=0pt}]
+\node[minimum height=14pt,text width=100pt,align=center,inner sep=0pt,draw]
+at (0,0) {\bfseries ELEMENT};
+\foreach \element in {hydrogen,\ldots,lawrencium,%
+rutherfordium,dubnium,seaborgium,bohrium,hassium,meitnerium,darmstadtium,%
+roentgenium,copernicium,nihonium,flerovium,livermorium,tennessine,oganesson%
+}%
+{%
+\node[minimum height=14pt,text width=100pt,align=center,inner sep=0pt,draw]
+at (0,-14pt*\nl) {\element};
+\global\advance\nl by1\relax%
+}%
+% ------------- BabelStoneHan Font ---------------------------------------------------------
+\node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,fill=green!5]
+at (100pt,14pt) {\itshape\resizebox{.9\wdc}{\height}{BabelStone Fonts}};%
+\foreach \typeface in {BabelStone Han}
+{
+\global\nl=1\relax%
+\node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
+at (100pt+\wdc*\nc,0) {\bfseries\resizebox{.9\wdc}{\height}{\typeface}};
+ \foreach \zhElement in {氢,\ldots,铹,𬬻,𬭊,𬭳,𬭛,𬭶,鿏,𫟼,𬬭,鿔,鿭,𫓧,𫟷,鿬,鿫}{
+ \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw,fill=green!5]
+ at (100pt+\wdc*\nc,-14pt*\nl) {\pgfPTzhTF{\zhElement}};
+ \global\advance\nl by1\relax%
+ }
+\global\advance\nc by1\relax%
+}
+% ------------- Win Fonts -------------------------------------------------------------------
+\node[minimum height=14pt,text width=5*\wdc,align=center,inner sep=0pt,fill=orange!10]
+at (100pt+\wdc,14pt) {\itshape Windows 10 \& Windows 11 Fonts};%
+\foreach \typeface in {SimSun,SimSun-ExtB,Microsoft YaHei,Microsoft JhengHei,MingLiU-ExtB}
+{
+\global\nl=1\relax%
+\node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
+at (100pt+\wdc*\nc,0) {\bfseries\setbox0=\hbox{\typeface}%
+ \ifdim\wd0>.9\wdc\relax\resizebox{.9\wdc}{\height}{\typeface}\else%
+ \typeface\fi};
+ \foreach \zhElement in {氢,\ldots,铹,𬬻,𬭊,𬭳,𬭛,𬭶,鿏,𫟼,𬬭,鿔,鿭,𫓧,𫟷,鿬,鿫}{
+ \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
+ at (100pt+\wdc*\nc,-14pt*\nl) {\pgfPTzhTF{\zhElement}};
+ \global\advance\nl by1\relax%
+ }
+\global\advance\nc by1\relax%
+}
+% ------------- «newline» -------------------------------------------
+\node[minimum height=14pt,text width=100pt,align=center,inner sep=0pt,draw]
+at (0,-266pt) {\bfseries ELEMENT};
+\global\advance\nl by2\relax%
+\global\nc=0\relax%
+\foreach \element in {hydrogen,\ldots,lawrencium,%
+rutherfordium,dubnium,seaborgium,bohrium,hassium,meitnerium,darmstadtium,%
+roentgenium,copernicium,nihonium,flerovium,livermorium,tennessine,oganesson%
+}%
+{%
+\node[minimum height=14pt,text width=100pt,align=center,inner sep=0pt,draw]
+at (0,-14pt*\nl) {\element};
+\global\advance\nl by1\relax%
+}%
+% ------------- TeX Live 2024 Fonts --------------------------------
+\node[minimum height=14pt,text width=6*\wdc,align=center,inner sep=0pt,fill=red!10]
+at (100pt,-252pt) {\itshape TeX Live 2024 Fonts};%
+\foreach \typeface in {FandolSong,FandolFang,FandolHei,FandolKai,AR PL SungtiL GB,AR PL KaitiM GB}
+{
+\global\nl=1\relax%
+\node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
+at (100pt+\wdc*\nc,-266pt) {\bfseries\setbox0=\hbox{\typeface}%
+ \ifdim\wd0>.9\wdc\relax\resizebox{.9\wdc}{\height}{\typeface}\else%
+ \typeface\fi};
+ \foreach \zhElement in {氢,\ldots,铹,𬬻,𬭊,𬭳,𬭛,𬭶,鿏,𫟼,𬬭,鿔,鿭,𫓧,𫟷,鿬,鿫}{
+ \node[minimum height=14pt,text width=\wdc,align=center,inner sep=0pt,draw]
+ at (100pt+\wdc*\nc,-266pt-14pt*\nl) {\pgfPTzhTF{\zhElement}};
+ \global\advance\nl by1\relax%
+ }
+\global\advance\nc by1\relax%
+}
+
+\end{tikzpicture}
+\end{document}
diff --git a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex
index 70d6e325ca..73abb57f78 100644
--- a/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/manualfiles/pgfPTmanual.macros.tex
@@ -1,12 +1,17 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definitions for pgf-PeriodicTable Manual
-% Hugo Gomes @ 04/03/2024 v2.1.0a
+% Hugo Gomes @ 10/02/2025 v2.1.5
+% Hugo Gomes @ 08/09/2024 v2.1.4
+% Hugo Gomes @ 07/08/2024 v2.1.3
+% Hugo Gomes @ 01/08/2024 v2.1.2
+% Hugo Gomes @ 07/07/2024 v2.1.1
+% Hugo Gomes @ 03/04/2024 v2.1.0a
% Hugo Gomes @ 14/02/2024 v2.1.0
% Hugo Gomes @ 29/05/2023 v2.0.1
% Hugo Gomes @ 20/02/2023 v2.0.0
% Hugo Gomes @ 08/11/2022 v1.0.1
% Hugo Gomes @ 10/10/2022 v1.0.0
-\def\pgfPTversion{2.1.0a}%
+\def\pgfPTversion{2.1.5}%
\def\pgfPTnewinversion#1{new in v#1}%
\def\pgfPTchangedinversion#1{changed in v#1}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -21,31 +26,6 @@
\setcounter{secnumdepth}{1}%
\setcounter{tocdepth}{4}
%
-\makeatletter%
-\global\renewcommand\thesection{}%
-\renewcommand\thesubsection{\@arabic\c@subsection}%
-\renewcommand\section{\@startsection{section}{1}{\z@}%
- {-3.5ex \@plus -1ex \@minus -.2ex}%
- {2.3ex \@plus.2ex}%
- {\hskip-1.4395em\normalfont\Large\bfseries}}%
-\renewcommand*\l@section[2]{%
- \ifnum \c@tocdepth >\z@%
- \addpenalty\@secpenalty%
- \addvspace{1.0em \@plus\p@}%
- \setlength\@tempdima{0em}%
- \begingroup%
- \parindent \z@ \rightskip \@pnumwidth%
- \parfillskip -\@pnumwidth%
- \leavevmode \bfseries%
- \advance\leftskip\@tempdima%
- \hskip -\leftskip%
- #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par%
- \endgroup%
- \fi}%
-\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{1.5em}}%
-\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.0em}{2.4em}}%
-\renewcommand*\l@paragraph{\@dottedtocline{4}{4.25em}{1.35em}}%
-\makeatother%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfdeclarelayer{back}%
\pgfsetlayers{back,main}%
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTable.sty b/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTable.sty
index 3768fc4f24..e29d0f458d 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTable.sty
+++ b/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTable.sty
@@ -1,4 +1,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Hugo Gomes @ 10/02/2025 v2.1.5
+% Hugo Gomes @ 08/09/2024 v2.1.4
+% Hugo Gomes @ 07/08/2024 v2.1.3
+% Hugo Gomes @ 01/08/2024 v2.1.2
+% Hugo Gomes @ 07/07/2024 v2.1.1
% Hugo Gomes @ 03/04/2024 v2.1.0a
% Hugo Gomes @ 14/02/2024 v2.1.0
% Hugo Gomes @ 29/05/2023 v2.0.1
@@ -7,7 +12,7 @@
% Hugo Gomes @ 10/10/2022 v1.0.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{pgf-PeriodicTable}[03/04/2024 pgf-PeriodicTable v2.1.0a]%%
+\ProvidesPackage{pgf-PeriodicTable}[10/02/2025 pgf-PeriodicTable v2.1.5]%%
\RequirePackage{tikz}%
\usetikzlibrary{fadings}%
\tikzfading[name=aumentax, left color=transparent!80, right color=transparent!1]%
@@ -16,17 +21,26 @@
\tikzfading[name=diminuiy, bottom color=transparent!80, top color=transparent!1]%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% check the engine and load font packages
-\ifx\pdfliteral\undefined\relax% XeLaTeX or LuaLaTeX
-\RequirePackage{fontspec}[2020/02/03]\edef\pgfPT@fontspec{1}%
-\else% pdfLaTeX
-\RequirePackage[T1]{fontenc}\edef\pgfPT@fontspec{0}%
-\fi%
+% changed in v2.1.3
+% pdfLaTeX --------------------------------------------------
+\ifx\pdftexversion\undefined\else%
+\RequirePackage[T1]{fontenc}\edef\pgfPT@fontspec{0}\edef\pgfPT@engine{0}%
+\fi% -----------------------------------------------------------
+% LuaLaTeX --------------------------------------------------
+\ifx\directlua\undefined\else%
+\RequirePackage{fontspec}[2020/02/03]\edef\pgfPT@fontspec{1}\edef\pgfPT@engine{1}%
+\fi% -----------------------------------------------------------
+% XeLaTeX ---------------------------------------------------
+\ifx\XeTeXrevision\undefined\else%
+\RequirePackage{fontspec}[2020/02/03]\edef\pgfPT@fontspec{1}\edef\pgfPT@engine{2}%
+\fi% -----------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ifs to user language and list of user translations available
\newif\ifpgfPT@user@lang\pgfPT@user@langfalse%
\newif\ifpgfPT@user@lang@isvalid\pgfPT@user@lang@isvalidfalse%
% ISO code language list ------------------------------------->
-\def\pggPT@userlanguage@ISOcode@list{nl/Nederlands}%
+% added zh in v2.1.5
+\def\pggPT@userlanguage@ISOcode@list{nl/Nederlands,zh/Chinese}%
% ----------------------------------------------------------------
\def\pggPT@userlanguage@ISOcode@check#1{%
\edef\pgfPT@tmpISOcode{#1}%
@@ -56,6 +70,10 @@
\DeclareOption{it}{\def\pgfPT@defaultLanguage{it}}%
\DeclareOption{es}{\def\pgfPT@defaultLanguage{es}}%
\DeclareOption{br}{\def\pgfPT@defaultLanguage{br}}%
+\DeclareOption{beamer}{\def\pgfPT@beamer{setting small caps compatibility with beamer via 'lmodern' package.}}% new in v2.1.5
+\DeclareOption{beamer*}{\def\pgfPT@beamerstar{setting small caps compatibility with beamer via T1 cmr fonts.}}% new in v2.1.5
+\DeclareOption{beamer**}{\def\pgfPT@beamerstar{setting small caps compatibility with beamer via T1 cmr fonts.}%
+\def\pgfPT@suppressfontwrn{suppressing small caps font substitution warnings with the 'silence' package.}}% new in v2.1.5
\DeclareOption{dvnnumerals}{%
\ifnum\pgfPT@fontspec=0\relax%
\def\pgfPT@dvn@wrn{\PackageError{pgfPT}{package option 'numerals=dvn' (Devanagari Numerals) requires 'fontspec' package with XeLaTeX engine...}}%
@@ -87,6 +105,8 @@
\pggPT@userlanguage@ISOcode@check{##2}%
\ifpgfPT@user@lang@isvalid%
\message{Loading \pggPT@userlanguage@ISOcode@Name\space language data...}%
+\edef\pgfPT@langtest{zh}\ifx\pgfPT@langtest\pggPT@userlanguage@ISOcode\relax% if Chinese...
+\def\pgfPT@lang@zh{}\fi% new v2.1.5
\pgfPT@user@langtrue\def\pgfPT@defaultLanguage{user}%
\else%
\@latex@error{Unknown language ISO code '\pgfPT@tmpISOcode' for \@cls@pkg\space`\@currname'}%
@@ -106,19 +126,69 @@
}% END \DeclareOption*
\ExecuteOptions{en}%
\ProcessOptions\relax%
+% setting beamer \textsc compatibility with beamer and pdfLaTeX. new in v2.1.5
+\ifx\pgfPT@beamer\undefined\relax\else%
+\ifnum\pgfPT@fontspec=0\relax% pdfLaTeX
+\RequirePackage{lmodern}%
+\PackageWarning{pgfPT}{\pgfPT@beamer}\else% XeLaTeX or LuaLaTeX
+\PackageWarning{pgfPT}{option 'beamer' ignored.}\fi\fi%
+\ifx\pgfPT@beamerstar\undefined\relax\else%
+\ifnum\pgfPT@fontspec=0\relax% pdfLaTeX
+\DeclareFontShape{T1}{cmss}{m}{sc}{<->sub*cmr/m/sc}{}%
+\DeclareFontShape{T1}{cmss}{m}{scsl}{<->sub*cmr/m/scsl}{}%
+\DeclareFontShape{T1}{cmss}{bx}{sc}{<->sub*cmr/bx/sc}{}%
+\DeclareFontShape{T1}{cmss}{bx}{scsl}{<->sub*cmr/bx/scsl}{}%
+\PackageWarning{pgfPT}{\pgfPT@beamerstar}
+\ifx\pgfPT@suppressfontwrn\undefined\relax\else% suppressing font warnings
+\PackageWarning{pgfPT}{\pgfPT@suppressfontwrn}%
+\RequirePackage{silence}%
+\WarningFilter{latexfont}{Font shape `T1/cmss/m/sc'}%
+\WarningFilter{latexfont}{Font shape `T1/cmss/m/scsl'}%
+\WarningFilter{latexfont}{Font shape `T1/cmss/bx/sc'}%
+\WarningFilter{latexfont}{Font shape `T1/cmss/bx/scsl'}%
+\WarningFilter{latexfont}{Font shape `T1/cmss/m/scit'}%
+\WarningFilter{latexfont}{Font shape `T1/cmss/bx/scit'}%
+\fi%
+\else% XeLaTeX or LuaLaTeX
+\PackageWarning{pgfPT}{Option 'beamer' ignored.}\fi\fi%
+%
\ifx\pgfPT@dvn@wrn\undefined\relax\else\pgfPT@dvn@wrn\fi%
\ifx\pgfPT@zh@wrn\undefined\relax\else\pgfPT@zh@wrn\fi%
\ifx\pgfPT@zhnumerals\undefined\relax\else%
\RequirePackage{zhnumber}%
\pgfPT@zhnumbers@Ztrue\pgfPT@zhnumbers@pertrue\pgfPT@zhnumbers@grtrue%
-\newfontfamily\pgfPTzhnumberfont[Script=CJK,AutoFakeBold=4]{SimSun}%
-\def\pgfPTzhfont{\@ifnextchar[{\@pgfPTzhfont}{\@pgfPTzhfont[]}}%
-\def\@pgfPTzhfont[#1]#2{\renewfontfamily\pgfPTzhnumberfont[Script=CJK,#1]{#2}}%
-\let\pgfPTnumberfont\pgfPTzhnumberfont%
+%\newfontfamily\pgfPTzhthenumberfont[Script=CJK,AutoFakeBold=4]{SimSun}% changed in v2.1.5 to ->
+\newfontfamily\pgfPTzhthenumberfont[Script=CJK,AutoFakeBold=4]{BabelStoneHan.ttf}%
+\def\pgfPTzhnumberfont{\@ifnextchar[{\@pgfPTzhnumfont}{\@pgfPTzhnumfont[]}}% changed in v2.1.5
+\def\@pgfPTzhnumfont[#1]#2{\renewfontfamily\pgfPTzhthenumberfont[Script=CJK,#1]{#2}}%
+\let\pgfPTnumberfont\pgfPTzhthenumberfont% changed in v2.1.5
+\let\pgfPTzhfont\pgfPTzhnumberfont% new in v2.1.5 for compatibility with previous versions
\let\pgfPT@printnum\zhnumber%
\fi%
\ifx\pgfPT@printnum\undefined\relax\let\pgfPT@printnum\relax\let\pgfPTnumberfont\relax\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Chinese language
+\ifx\pgfPT@lang@zh\undefined\relax\else% Chinese
+\ifnum\pgfPT@fontspec=0\relax%
+\PackageError{pgfPT}{package option 'userlang=zh' (Chinese) requires 'fontspec' package with XeLaTeX or LuaLaTeX engines...}%
+\else%
+% setting font features
+\def\pgfPT@zhFontFeatures{[Script=CJK,AutoFakeBold=4]}%
+\def\pgfPTzhFontFeatures#1{\def\pgfPT@zhFontFeatures{[Script=CJK,#1]}}%
+% extra font selection for ideographs not available in common fonts (UTF-8 ranges not available)
+% - defaults:
+\def\pgfPT@fontzhSS{BabelStoneHan.ttf}% font for names of elements Z={109,112.113,117,118} ->
+% meitnerium, copernicium, nihonium, tennessine, oganesson
+\def\pgfPT@fontzhSSB{BabelStoneHan.ttf}% font for names of elements Z={104,105,106,107,108,110,111,114} ->
+% rutherfordium, dubnium, seaborgium, bohrium, hassium,darmstadtium, roentgenium, flerovium
+\def\pgfPT@fontzhSSLv{BabelStoneHan.ttf}% font for name of element Z={116} -> livermorium
+% - user choices
+\def\pgfPTzhtextfontSS#1{\def\pgfPT@fontzhSS{#1}}%
+\def\pgfPTzhtextfontSSB#1{\def\pgfPT@fontzhSSB{#1}}%
+\def\pgfPTzhtextfontLv#1{\def\pgfPT@fontzhSSLv{#1}}%
+\fi%
+\fi%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% process user language
\ifpgfPT@user@lang%
\input{translations/pgfPT.lang.\pggPT@userlanguage@ISOcode.tex}%
@@ -142,6 +212,7 @@
\newif\ifpgfPTis@backcolorsolid%
\newif\ifpgfPTis@labeldrawn%
\newif\ifpgfPT@drawLaAc%
+\newif\ifpgfPT@Zliststar\pgfPT@Zliststarfalse% v2.1.5
\def\pgfPT@true{true}%
\def\pgfPT@TRUE{TRUE}%
\def\pgfPT@false{false}%
@@ -187,13 +258,13 @@
% Resetting global style for the Periodic Table
\def\pgfPTresetstyle{\tikzset{/pgfPerTable/.cd,languages,other languages font,other languages color,%
font,IUPAC,capitalize element names=false,show title,show period numbers,show group numbers,%
-show legend,legend acronyms,legend back color,show legend pins,show extra legend,legend radio color,%
+show legend,legend acronyms,legend acronyms font size,legend back color,show legend pins,show extra legend,legend radio color,%
legend CS color,legend Z color,show blocks=false,show families=false,show MNM line,show periodic variations=false,%
show label LaAc,title font,title color,cell width,cell height,cell style,label font,period label color,group label color,%
-label LaAc font,Z list,CS solid, CS liquid,CS gas,CS synt,CS font,CS render mode,CS outline color,CS outline width,%
-Z backcolor,Z color,Z font,Z align,Z padding,Z use box width=false,name color,name font,name align,Ar color,Ar font,Ar label,Ar precision,%
+label LaAc font,group numbers,Roman label color,Z list,CS solid, CS liquid,CS gas,CS synt,CS font,CS render mode,CS outline color,CS outline width,%
+decimal separator,Z backcolor,Z color,Z font,Z align,Z padding,Z use box width=false,name color,name font,name align,Ar color,Ar font,Ar label,Ar precision,%
R color,R font,Rcov color,Rcov font,Rion color,Rion font,Ei color,Ei font,eneg color,eneg font,eaff color,eaff font,%
-O color,O font,Tmelt color,Tmelt font,TmeltC color,TmeltC font,Tboil color,Tboil font,TboilC color,TboilC font,%
+O color,O font,O Roman=false,Tmelt color,Tmelt font,TmeltC color,TmeltC font,Tboil color,Tboil font,TboilC color,TboilC font,%
eDist color,eDist font,eDist sep,eConfign color,eConfign font,eConfignl color,eConfignl font,d color,d font,Cp color,Cp font,%
kT color,kT font,ls color,ls font,ls align,ls,lsa color,lsa font,lsb color,lsb font,lsc color,lsc font,lsca color,lsca font,%
DiscY color,DiscY font,DiscY BC scale,DiscC color,DiscC font,spectra color,spectra font,MNM line color,MNM line width,%DiscC,
@@ -217,15 +288,28 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\def\pgfPT@draw[#1]{%
\@pgfPT@setlayers%
\tikz[every node/.append style={inner sep=0pt,below right}]{%
+% changing defaults for Chinese -> new in v2.1.5
+\ifnum\pgfPT@fontspec=1\relax% fontspec is loaded
+\ifx\pgfPT@lang@zh\undefined\relax% other languages
+\else% Chinese
+\let\pgfPTnamefont\footnotesize\relax\let\pgfPTCSfont\large\relax\let\pgfPTtitlefont\LARGE\relax%
+\ifpgfPT@zhnumbers@Z\relax\else\let\pgfPTZfont\scriptsize\relax\edef\@pgf@zhZspace{0ex}\let\pgfPTZspace\@pgf@zhZspace\relax\fi%
+\fi\fi%
\pgfkeys{/pgfPerTable/.cd,#1}%
% setting the font
\ifnum\pgfPT@fontspec=1\relax% fontspec is loaded
-\edef\pgfPT@defaultfont{phv}%
-\ifx\pgfPTglobalfont\pgfPT@defaultfont\relax\edef\pgfPTglobalfont{TeX Gyre Heros}\fi% replacing 'phv' by 'TeX Gyre Heros'
-\setmainfont{\pgfPTglobalfont}%
-\ifx\NoAutoSpacing\undefined\relax\else\NoAutoSpacing\fi% XeLaTeX/LuaLaTeX -> removing extra space before ':' for babel:french
+ \edef\pgfPT@defaultfont{phv}%
+ \ifx\pgfPT@lang@zh\undefined\relax% other languages -> new if in v2.1.5
+ \ifx\pgfPTglobalfont\pgfPT@defaultfont\relax\edef\pgfPTglobalfont{TeX Gyre Heros}\fi% replacing 'phv' by 'TeX Gyre Heros'
+ \setmainfont{\pgfPTglobalfont}%
+ \ifx\NoAutoSpacing\undefined\relax\else\NoAutoSpacing\fi% XeLaTeX/LuaLaTeX -> removing extra space before ':' for babel:french
+ \else% Chinese -> new in v2.1.5
+ \ifx\pgfPTglobalfont\pgfPT@defaultfont\relax\edef\pgfPTglobalfont{BabelStoneHan.ttf}\fi% replacing 'phv' by 'BabelStone Han'
+ \setmainfont[\pgfPT@zhFontFeatures]{\pgfPTglobalfont}%
+ \fi% Chinese
\else% fontenc is loaded (with T1 option)
\fontfamily{\pgfPTglobalfont}\selectfont\renewcommand*\rmdefault{\pgfPTglobalfont}\fi%
+%
\edef\pgfPT@doc@fsize{\f@size}%
\input{pgfPT.coordinates.tex}%
% loading the cell style
@@ -296,6 +380,15 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\savebox{\pgfPT@radiobox}{\includegraphics[height=\pgfPT@dima]{pgfPT_radio_symbol.pdf}}
% computing and defining the font size for standard atomic weight ----->
\ifpgfPT@Arstar\pgfPTArfont\selectfont\pgfmathsetlength{\pgfPT@dimb}{.825*\f@size}\relax\fi%
+% shifts for Z, if in the corners of the cell
+\newdimen\pgfPT@tmpwd\pgfmathsetlength{\pgfPT@tmpwd}{\pgfPTcellwd}%
+\newdimen\pgfPT@tmpht\pgfmathsetlength{\pgfPT@tmpht}{\pgfPTcellht}%
+\ifx\pgfPT@data@Z@x\undefined\relax\else%
+\ifdim\pgfPT@data@Z@x=0pt\relax\xdef\@pgfPT@Zxshift{\pgfPTcelllinewd}\fi%
+\ifdim\pgfPT@data@Z@x=\pgfPT@tmpwd\relax\xdef\@pgfPT@Zxshift{-\pgfPTcelllinewd}\fi%
+\ifdim\pgfPT@data@Z@y=0pt\relax\xdef\@pgfPT@Zyshift{\pgfPTcelllinewd}\fi%
+\ifdim\pgfPT@data@Z@y=\pgfPT@tmpht\relax\xdef\@pgfPT@Zyshift{-\pgfPTcelllinewd}\fi%
+\fi%
% drawing the cells of lanthanides and actinides ----->
\ifpgfPTIUPACMMIX%
\global\pgfPT@drawLaAcfalse%
@@ -319,35 +412,36 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifpgfPT@Z
\ifpgfZuseboxwidth{\pgfPTZfont\pgfPTnumberfont%
\ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
- \pgfmathparse{width("\pgfPT@printnum{57}\ --\ \pgfPT@printnum{71}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \pgfmathparse{width("\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
\ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax%
\pgfmathparse{\pgfPT@data@Z@wd-2*\pgfPTZspace-.3333em}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
\node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
- at (xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{57}\ --\ \pgfPT@printnum{71}}\hspace{\pgfPTZspace}\vfil}};%
+ at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}}\hspace{\pgfPTZspace}\vfil}};%
\else%
\node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
- at (xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{57}\ --\ \pgfPT@printnum{71}\hspace{\pgfPTZspace}\vfil}};%
+ at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}\hspace{\pgfPTZspace}\vfil}};%
\fi%
\else\let\pgfPT@printnum\relax%
\node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
- at (xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{57--71}\hspace{\pgfPTZspace}\vfil}};%
+ at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xLa) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{57--71}\hspace{\pgfPTZspace}\vfil}};%
\fi%
}%
\else{%
\ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
- \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{57}\ --\ \pgfPT@printnum{71}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
- \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}%
+ \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}\edef\pgfPT@zh@scale{1}% \pgfPT@zh@scale -> new in v2.1.5 to scale the Z background in Chinese without zhnumbers
\pgfmathparse{\pgfPT@data@Z@wd-1ex}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}\else\edef\@pgfPT@resizebox{0}\fi%
\else\let\pgfPT@printnum\relax%
\pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{57}\ --\ \pgfPT@printnum{71}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \ifx\pgfPT@lang@zh\undefined\relax\edef\pgfPT@zh@scale{1}\else\edef\pgfPT@zh@scale{.8}\fi%
\fi%
- \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width=\pgfPT@data@Z@natwd,inner xsep=.5ex]%
- at (xLa) {%
+ \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width={\pgfPT@zh@scale*\pgfPT@data@Z@natwd},inner xsep=.5ex]%
+ at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xLa) {%
\ifpgfPT@zhnumbers@Z%
\ifnum\@pgfPT@resizebox=1\relax%
- \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{57}\ --\ \pgfPT@printnum{71}}\vfil}%
+ \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}}\vfil}%
\else%
- \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{57}\ --\ \pgfPT@printnum{71}\vfil}%
+ \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{57}\ -\ \pgfPT@printnum{71}\vfil}%
\fi%
\else%
\vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{57--71}\vfil}%
@@ -390,35 +484,36 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifpgfPT@Z%
\ifpgfZuseboxwidth{\pgfPTZfont\pgfPTnumberfont%
\ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
- \pgfmathparse{width("\pgfPT@printnum{89}\ --\ \pgfPT@printnum{103}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \pgfmathparse{width("\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
\ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax%
\pgfmathparse{\pgfPT@data@Z@wd-2*\pgfPTZspace-.3333em}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
\node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
- at (xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{89}\ --\ \pgfPT@printnum{103}}\hspace{\pgfPTZspace}\vfil}};%
+ at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}}\hspace{\pgfPTZspace}\vfil}};%
\else%
\node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
- at (xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{89}\ --\ \pgfPT@printnum{103}\hspace{\pgfPTZspace}\vfil}};%
+ at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}\hspace{\pgfPTZspace}\vfil}};%
\fi%
\else\let\pgfPT@printnum\relax%
\node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
- at (xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{89--103}\hspace{\pgfPTZspace}\vfil}};%
+ at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xAc) {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{89--103}\hspace{\pgfPTZspace}\vfil}};%
\fi%
}%
\else{%
\ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
- \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{89}\ --\ \pgfPT@printnum{103}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
- \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}%
+ \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}\edef\pgfPT@zh@scale{1}%
\pgfmathparse{\pgfPT@data@Z@wd-1ex}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}\else\edef\@pgfPT@resizebox{0}\fi%
\else\let\pgfPT@printnum\relax%
\pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{89}\ --\ \pgfPT@printnum{103}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \ifx\pgfPT@lang@zh\undefined\relax\edef\pgfPT@zh@scale{1}\else\edef\pgfPT@zh@scale{.85}\fi%
\fi%
- \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width=\pgfPT@data@Z@natwd,inner xsep=.5ex]%
- at (xAc) {%
+ \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width={\pgfPT@zh@scale*\pgfPT@data@Z@natwd},inner xsep=.5ex]%
+ at ([xshift=.5*\@pgfPT@Zxshift,yshift=-.5*\@pgfPT@Zyshift]xAc) {%
\ifpgfPT@zhnumbers@Z%
\ifnum\@pgfPT@resizebox=1\relax%
- \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{89}\ --\ \pgfPT@printnum{103}}\vfil}%
+ \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}}\vfil}%
\else%
- \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{89}\ --\ \pgfPT@printnum{103}\vfil}%
+ \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{89}\ -\ \pgfPT@printnum{103}\vfil}%
\fi%
\else%
\vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{89--103}\vfil}%
@@ -446,15 +541,6 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\edef\pgfPT@teststra{lanthanoids}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaAcfalse\xdef\pgfPT@@cellslist{\pgfPT@cells@La}\fi%
\edef\pgfPT@teststra{actinoids}\ifx\pgfPT@teststra\pgfPT@teststrb\pgfPT@drawLaAcfalse\xdef\pgfPT@@cellslist{\pgfPT@cells@Ac}\fi%
\fi%
-% shifts for Z, if in the corners of the cell
-\newdimen\pgfPT@tmpwd\pgfmathsetlength{\pgfPT@tmpwd}{\pgfPTcellwd}%
-\newdimen\pgfPT@tmpht\pgfmathsetlength{\pgfPT@tmpht}{\pgfPTcellht}%
-\ifx\pgfPT@data@Z@x\undefined\relax\else%
-\ifdim\pgfPT@data@Z@x=0pt\relax\xdef\@pgfPT@Zxshift{\pgfPTcelllinewd}\fi%
-\ifdim\pgfPT@data@Z@x=\pgfPT@tmpwd\relax\xdef\@pgfPT@Zxshift{-\pgfPTcelllinewd}\fi%
-\ifdim\pgfPT@data@Z@y=0pt\relax\xdef\@pgfPT@Zyshift{\pgfPTcelllinewd}\fi%
-\ifdim\pgfPT@data@Z@y=\pgfPT@tmpht\relax\xdef\@pgfPT@Zyshift{-\pgfPTcelllinewd}\fi%
-\fi%
% drawing the cells of the Periodic Table ----->
\foreach \Z in \pgfPT@@cellslist {%
\ifpgfPTis@backcolorsolid\relax\else\pgfPT@processbackcolor{\Z}\fi%
@@ -559,16 +645,17 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifpgfPT@Ar%
\ifnum\pgfPTArprecision<0\relax%
\node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Ar@wd,text centered]%
- at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]\Z) {\vbox to\pgfPT@data@Ar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@data@Ar}\vfil}};%
+ at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]\Z) {\vbox to\pgfPT@data@Ar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@formatnumber{-1}{\pgfPT@data@Ar}}\vfil}};% changed in v2.1.5
\else\ifnum\pgfPTArprecision>3\relax%
\node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Ar@wd,text centered]%
- at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]\Z) {\vbox to\pgfPT@data@Ar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@data@Ar}\vfil}};%
+ at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]\Z) {\vbox to\pgfPT@data@Ar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@formatnumber{-1}{\pgfPT@data@Ar}}\vfil}};% % changed in v2.1.5
\else%
\node[font=\pgfPTArfont,text=\pgfPTArcolor,text width=\pgfPT@data@Ar@wd,text centered]%
at ([xshift=\pgfPT@data@Ar@x,yshift=-\pgfPT@data@Ar@y]\Z) {\vbox to\pgfPT@data@Ar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@formatnumber{\pgfPTArprecision}{\pgfPT@data@Ar}}\vfil}};%
\fi\fi%\fi%
\fi%
- \ifpgfPT@Arstar%
+ \ifpgfPT@Arstar% changed in v2.1.5
+ \ifx\pgfPTdecimalseparator\pgfPT@dot\relax%
\node[font=\pgfPTArfont,%
text=\pgfPTArcolor,text width=\pgfPT@data@Arstar@wd,text centered]%
at ([xshift=\pgfPT@data@Arstar@x,yshift=-\pgfPT@data@Arstar@y]\Z) %
@@ -576,6 +663,15 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\vbox to\pgfPT@data@Arstar@ht{\vfil\resizebox{.95\textwidth}{!}{\pgfPT@box@zerodepth{\pgfPT@data@Arstar}}\vfil}%
\else\vbox to\pgfPT@data@Arstar@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@data@Arstar}\vfil}\fi%
};%
+ \else% replace . in value1/2 by user decimal separator and the , by ; in [value1,value2] if it is the case
+ \node[font=\pgfPTArfont,%
+ text=\pgfPTArcolor,text width=\pgfPT@data@Arstar@wd,text centered]%
+ at ([xshift=\pgfPT@data@Arstar@x,yshift=-\pgfPT@data@Arstar@y]\Z) %
+ {\setbox0=\hbox{\expandafter\pgfPT@formatArstar\pgfPT@data@Arstar\relax}\ifdim\wd0>.95\textwidth\relax%
+ \vbox to\pgfPT@data@Arstar@ht{\vfil\resizebox{.95\textwidth}{!}{\pgfPT@box@zerodepth{\usebox0}}\vfil}%
+ \else\vbox to\pgfPT@data@Arstar@ht{\vfil\pgfPT@box@zerodepth{\usebox0}\vfil}\fi%
+ };%
+ \fi%
\fi%
% radioactivity
\ifpgfPT@radio\relax\ifnum\pgfPT@data@radio=1\relax%
@@ -632,10 +728,10 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifpgfPT@Ei\relax%
\ifnum\pgfPTEprecision<0\relax%
\node[font=\pgfPTEifont,text=\pgfPTEicolor,text width=\pgfPT@data@Ei@wd,text centered]%
- at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]\Z) {\vbox to\pgfPT@data@Ei@ht{\vfil\pgfPT@data@Ei\vfil}};%
- \else\ifnum\pgfPTEprecision>2\relax%
+ at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]\Z) {\vbox to\pgfPT@data@Ei@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Ei}\vfil}};% changed in v2.1.5
+ \else\ifnum\pgfPTEprecision>2\relax%0
\node[font=\pgfPTEifont,text=\pgfPTEicolor,text width=\pgfPT@data@Ei@wd,text centered]%
- at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]\Z) {\vbox to\pgfPT@data@Ei@ht{\vfil\pgfPT@data@Ei\vfil}};%
+ at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]\Z) {\vbox to\pgfPT@data@Ei@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Ei}\vfil}};% changed in v2.1.5
\else%
\node[font=\pgfPTEifont,text=\pgfPTEicolor,text width=\pgfPT@data@Ei@wd,text centered]%
at ([xshift=\pgfPT@data@Ei@x,yshift=-\pgfPT@data@Ei@y]\Z) {\vbox to\pgfPT@data@Ei@ht{\vfil\pgfPT@formatnumber{\pgfPTEprecision}{\pgfPT@data@Ei}\vfil}};%
@@ -650,10 +746,10 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifpgfPT@eaff\relax%
\ifnum\pgfPTEprecision<0\relax%
\node[font=\pgfPTeafffont,text=\pgfPTeaffcolor,text width=\pgfPT@data@eaff@wd,text centered]%
- at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]\Z) {\vbox to\pgfPT@data@eaff@ht{\vfil\pgfPT@data@eaff\vfil}};%
+ at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]\Z) {\vbox to\pgfPT@data@eaff@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@eaff}\vfil}};% changed in v2.1.5
\else\ifnum\pgfPTEprecision>1\relax%
\node[font=\pgfPTeafffont,text=\pgfPTeaffcolor,text width=\pgfPT@data@eaff@wd,text centered]%
- at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]\Z) {\vbox to\pgfPT@data@eaff@ht{\vfil\pgfPT@data@eaff\vfil}};%
+ at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]\Z) {\vbox to\pgfPT@data@eaff@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@eaff}\vfil}};% changed in v2.1.5
\else%
\node[font=\pgfPTeafffont,text=\pgfPTeaffcolor,text width=\pgfPT@data@eaff@wd,text centered]%
at ([xshift=\pgfPT@data@eaff@x,yshift=-\pgfPT@data@eaff@y]\Z) {\vbox to\pgfPT@data@eaff@ht{\vfil\pgfPT@formatnumber{\pgfPTEprecision}{\pgfPT@data@eaff}\vfil}};%
@@ -661,6 +757,16 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\fi%
% O -> Oxidation States
\ifpgfPT@O\relax%
+ \ifpgfPTORoman% new in v2.1.1
+ \ifnum\Z=25\relax% Mn
+ \node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered]%
+ at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]\Z) {\vbox to\pgfPT@data@O@ht{\vfil\pgfPT@box@zerodepth{\resizebox{.95\linewidth}{\height}{\pgfPT@data@ORoman}}
+ \vfil}};%
+ \else%
+ \node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered]%
+ at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]\Z) {\vbox to\pgfPT@data@O@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@data@ORoman}\vfil}};%
+ \fi%
+ \else%
\ifnum\Z=25\relax% Mn
\node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered]%
at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]\Z) {\vbox to\pgfPT@data@O@ht{\vfil\pgfPT@box@zerodepth{\resizebox{.95\linewidth}{\height}{\pgfPT@data@O}}
@@ -669,6 +775,7 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\node[font=\pgfPTOfont,text=\pgfPTOcolor,text width=\pgfPT@data@O@wd,text centered]%
at ([xshift=\pgfPT@data@O@x,yshift=-\pgfPT@data@O@y]\Z) {\vbox to\pgfPT@data@O@ht{\vfil\pgfPT@box@zerodepth{\pgfPT@data@O}\vfil}};%
\fi%
+ \fi%
\fi%
% Tmelt -> Melting Point (Kelvin)
\ifpgfPT@Tmelt\relax%
@@ -677,19 +784,19 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
at ([xshift=\pgfPT@data@Tmelt@x,yshift=-\pgfPT@data@Tmelt@y]\Z) {%
\setbox0=\hbox{\pgfPT@data@Tmelt}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
\ifdim\pgfPT@dima>.975\linewidth\relax%
- \vbox to\pgfPT@data@Tmelt@ht{\vfil\resizebox{.95\linewidth}{\height}{\pgfPT@data@Tmelt}\vfil}%
+ \vbox to\pgfPT@data@Tmelt@ht{\vfil\resizebox{.95\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@Tmelt@ht{\vfil\pgfPT@data@Tmelt\vfil}%
+ \vbox to\pgfPT@data@Tmelt@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}\vfil}% changed in v2.1.5
\fi%
};%
\else\ifnum\pgfPTTprecision>4\relax%
\node[font=\pgfPTTmeltfont,text=\pgfPTTmeltcolor,text width=\pgfPT@data@Tmelt@wd,text centered]%
at ([xshift=\pgfPT@data@Tmelt@x,yshift=-\pgfPT@data@Tmelt@y]\Z) {
- \setbox0=\hbox{\pgfPT@data@Tmelt}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.975\linewidth\relax%
- \vbox to\pgfPT@data@Tmelt@ht{\vfil\resizebox{.95\linewidth}{\height}{\pgfPT@data@Tmelt}\vfil}%
+ \vbox to\pgfPT@data@Tmelt@ht{\vfil\resizebox{.95\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@Tmelt@ht{\vfil\pgfPT@data@Tmelt\vfil}%
+ \vbox to\pgfPT@data@Tmelt@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Tmelt}\vfil}% changed in v2.1.5
\fi%
};%
\else%
@@ -709,21 +816,21 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifnum\pgfPTTprecision<0\relax%
\node[font=\pgfPTTmeltCfont,text=\pgfPTTmeltCcolor,text width=\pgfPT@data@TmeltC@wd,text centered]%
at ([xshift=\pgfPT@data@TmeltC@x,yshift=-\pgfPT@data@TmeltC@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@TmeltC}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@TmeltC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@TmeltC}\vfil}%
+ \vbox to\pgfPT@data@TmeltC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@TmeltC@ht{\vfil\pgfPT@data@TmeltC\vfil}%
+ \vbox to\pgfPT@data@TmeltC@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}\vfil}% changed in v2.1.5
\fi%
};%
\else\ifnum\pgfPTTprecision>4\relax%
\node[font=\pgfPTTmeltCfont,text=\pgfPTTmeltCcolor,text width=\pgfPT@data@TmeltC@wd,text centered]%
at ([xshift=\pgfPT@data@TmeltC@x,yshift=-\pgfPT@data@TmeltC@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@TmeltC}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@TmeltC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@TmeltC}\vfil}%
+ \vbox to\pgfPT@data@TmeltC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@TmeltC@ht{\vfil\pgfPT@data@TmeltC\vfil}%
+ \vbox to\pgfPT@data@TmeltC@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@TmeltC}\vfil}% changed in v2.1.5
\fi%
};%
\else%
@@ -743,21 +850,21 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifnum\pgfPTTprecision<0\relax%
\node[font=\pgfPTTboilfont,text=\pgfPTTboilcolor,text width=\pgfPT@data@Tboil@wd,text centered]%
at ([xshift=\pgfPT@data@Tboil@x,yshift=-\pgfPT@data@Tboil@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@Tboil}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@Tboil@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@Tboil}\vfil}%
+ \vbox to\pgfPT@data@Tboil@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@Tboil@ht{\vfil\pgfPT@data@Tboil\vfil}%
+ \vbox to\pgfPT@data@Tboil@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}\vfil}% changed in v2.1.5
\fi%
};%
\else\ifnum\pgfPTTprecision>2\relax%
\node[font=\pgfPTTboilfont,text=\pgfPTTboilcolor,text width=\pgfPT@data@Tboil@wd,text centered]%
at ([xshift=\pgfPT@data@Tboil@x,yshift=-\pgfPT@data@Tboil@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@Tboil}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@Tboil@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@Tboil}\vfil}%
+ \vbox to\pgfPT@data@Tboil@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@Tboil@ht{\vfil\pgfPT@data@Tboil\vfil}%
+ \vbox to\pgfPT@data@Tboil@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Tboil}\vfil}% changed in v2.1.5
\fi%
};%
\else%
@@ -777,21 +884,21 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifnum\pgfPTTprecision<0\relax%
\node[font=\pgfPTTboilCfont,text=\pgfPTTboilCcolor,text width=\pgfPT@data@TboilC@wd,text centered]%
at ([xshift=\pgfPT@data@TboilC@x,yshift=-\pgfPT@data@TboilC@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@TboilC}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@TboilC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@TboilC}\vfil}%
+ \vbox to\pgfPT@data@TboilC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@TboilC@ht{\vfil\pgfPT@data@TboilC\vfil}%
+ \vbox to\pgfPT@data@TboilC@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}\vfil}% changed in v2.1.5
\fi%
};%
\else\ifnum\pgfPTTprecision>2\relax%
\node[font=\pgfPTTboilCfont,text=\pgfPTTboilCcolor,text width=\pgfPT@data@TboilC@wd,text centered]%
at ([xshift=\pgfPT@data@TboilC@x,yshift=-\pgfPT@data@TboilC@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@TboilC}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@TboilC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@TboilC}\vfil}%
+ \vbox to\pgfPT@data@TboilC@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@TboilC@ht{\vfil\pgfPT@data@TboilC\vfil}%
+ \vbox to\pgfPT@data@TboilC@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@TboilC}\vfil}% changed in v2.1.5
\fi%
};%
\else%
@@ -825,21 +932,21 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifnum\pgfPTdprecision<0\relax%
\node[font=\pgfPTdfont,text=\pgfPTdcolor,text width=\pgfPT@data@d@wd,text centered]%
at ([xshift=\pgfPT@data@d@x,yshift=-\pgfPT@data@d@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@d}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@d}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@d@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@d}\vfil}%
+ \vbox to\pgfPT@data@d@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@d}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@d@ht{\vfil\pgfPT@data@d\vfil}%
+ \vbox to\pgfPT@data@d@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@d}\vfil}% changed in v2.1.5
\fi%
};%
\else\ifnum\pgfPTdprecision>\pgfPT@maxprecision\relax%
\node[font=\pgfPTdfont,text=\pgfPTdcolor,text width=\pgfPT@data@d@wd,text centered]%
at ([xshift=\pgfPT@data@d@x,yshift=-\pgfPT@data@d@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@d}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@d}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@d@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@d}\vfil}%
+ \vbox to\pgfPT@data@d@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@d}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@d@ht{\vfil\pgfPT@data@d\vfil}%
+ \vbox to\pgfPT@data@d@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@d}\vfil}% changed in v2.1.5
\fi%
};%
\else%
@@ -858,10 +965,10 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifpgfPT@Cp\relax%
\ifnum\pgfPTCpprecision<0\relax%
\node[font=\pgfPTCpfont,text=\pgfPTCpcolor,text width=\pgfPT@data@Cp@wd,text centered]%
- at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]\Z) {\vbox to\pgfPT@data@Cp@ht{\vfil\pgfPT@data@Cp\vfil}};%
+ at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]\Z) {\vbox to\pgfPT@data@Cp@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Cp}\vfil}};% changed in v2.1.5
\else\ifnum\pgfPTCpprecision>2\relax%
\node[font=\pgfPTCpfont,text=\pgfPTCpcolor,text width=\pgfPT@data@Cp@wd,text centered]%
- at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]\Z) {\vbox to\pgfPT@data@Cp@ht{\vfil\pgfPT@data@Cp\vfil}};%
+ at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]\Z) {\vbox to\pgfPT@data@Cp@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@Cp}\vfil}};% changed in v2.1.5
\else%
\node[font=\pgfPTCpfont,text=\pgfPTCpcolor,text width=\pgfPT@data@Cp@wd,text centered]%
at ([xshift=\pgfPT@data@Cp@x,yshift=-\pgfPT@data@Cp@y]\Z) {\vbox to\pgfPT@data@Cp@ht{\vfil\pgfPT@formatnumber{\pgfPTCpprecision}{\pgfPT@data@Cp}\vfil}};%
@@ -872,21 +979,21 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifnum\pgfPTkTprecision<0\relax%
\node[font=\pgfPTkTfont,text=\pgfPTkTcolor,text width=\pgfPT@data@kT@wd,text centered]%
at ([xshift=\pgfPT@data@kT@x,yshift=-\pgfPT@data@kT@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@kT}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@kT}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@kT@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@kT}\vfil}%
+ \vbox to\pgfPT@data@kT@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@kT}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@kT@ht{\vfil\pgfPT@data@kT\vfil}%
+ \vbox to\pgfPT@data@kT@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@kT}\vfil}% changed in v2.1.5
\fi%
};%
\else\ifnum\pgfPTkTprecision>4\relax%
\node[font=\pgfPTkTfont,text=\pgfPTkTcolor,text width=\pgfPT@data@kT@wd,text centered]%
at ([xshift=\pgfPT@data@kT@x,yshift=-\pgfPT@data@kT@y]\Z) {%
- \setbox0=\hbox{\pgfPT@data@kT}\pgfmathsetlength{\pgfPT@dima}{\wd0}%
+ \setbox0=\hbox{\pgfPT@formatnumber{-1}{\pgfPT@data@kT}}\pgfmathsetlength{\pgfPT@dima}{\wd0}% changed in v2.1.5
\ifdim\pgfPT@dima>.95\linewidth\relax%
- \vbox to\pgfPT@data@kT@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@data@kT}\vfil}%
+ \vbox to\pgfPT@data@kT@ht{\vfil\resizebox{.925\linewidth}{\height}{\pgfPT@formatnumber{-1}{\pgfPT@data@kT}}\vfil}% changed in v2.1.5
\else%
- \vbox to\pgfPT@data@kT@ht{\vfil\pgfPT@data@kT\vfil}%
+ \vbox to\pgfPT@data@kT@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@kT}\vfil}% changed in v2.1.5
\fi%
};%
\else%
@@ -938,10 +1045,10 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\fi%
\ifnum\pgfPTlsprecision<0\relax%
\node[font=\pgfPTlsafont,text=\pgfPTlsacolor,text width=\pgfPT@data@lsa@wd,text centered]%
- at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]\Z) {\vbox to\pgfPT@data@lsa@ht{\vfil\pgfPT@data@lsa\vfil}};%
+ at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]\Z) {\vbox to\pgfPT@data@lsa@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsa}\vfil}};% changed in v2.1.5
\else\ifnum\pgfPTlsprecision>\pgfPT@maxprecision\relax%
\node[font=\pgfPTlsafont,text=\pgfPTlsacolor,text width=\pgfPT@data@lsa@wd,text centered]%
- at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]\Z) {\vbox to\pgfPT@data@lsa@ht{\vfil\pgfPT@data@lsa\vfil}};%
+ at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]\Z) {\vbox to\pgfPT@data@lsa@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsa}\vfil}};% changed in v2.1.5
\else%
\node[font=\pgfPTlsafont,text=\pgfPTlsacolor,text width=\pgfPT@data@lsa@wd,text centered]%
at ([xshift=\pgfPT@data@lsa@x,yshift=-\pgfPT@data@lsa@y]\Z) {\vbox to\pgfPT@data@lsa@ht{\vfil\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsa}\vfil}};%
@@ -956,10 +1063,10 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\fi%
\ifnum\pgfPTlsprecision<0\relax%
\node[font=\pgfPTlsbfont,text=\pgfPTlsbcolor,text width=\pgfPT@data@lsb@wd,text centered]%
- at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]\Z) {\vbox to\pgfPT@data@lsb@ht{\vfil\pgfPT@data@lsb\vfil}};%
+ at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]\Z) {\vbox to\pgfPT@data@lsb@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsb}\vfil}};% changed in v2.1.5
\else\ifnum\pgfPTlsprecision>\pgfPT@maxprecision\relax%
\node[font=\pgfPTlsbfont,text=\pgfPTlsbcolor,text width=\pgfPT@data@lsb@wd,text centered]%
- at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]\Z) {\vbox to\pgfPT@data@lsb@ht{\vfil\pgfPT@data@lsb\vfil}};%
+ at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]\Z) {\vbox to\pgfPT@data@lsb@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsb}\vfil}};% changed in v2.1.5
\else%
\node[font=\pgfPTlsbfont,text=\pgfPTlsbcolor,text width=\pgfPT@data@lsb@wd,text centered]%
at ([xshift=\pgfPT@data@lsb@x,yshift=-\pgfPT@data@lsb@y]\Z) {\vbox to\pgfPT@data@lsb@ht{\vfil\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsb}\vfil}};%
@@ -974,10 +1081,10 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\fi%
\ifnum\pgfPTlsprecision<0\relax%
\node[font=\pgfPTlscfont,text=\pgfPTlsccolor,text width=\pgfPT@data@lsc@wd,text centered]%
- at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]\Z) {\vbox to\pgfPT@data@lsc@ht{\vfil\pgfPT@data@lsc\vfil}};%
+ at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]\Z) {\vbox to\pgfPT@data@lsc@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsc}\vfil}};% changed in v2.1.5
\else\ifnum\pgfPTlsprecision>\pgfPT@maxprecision\relax%
\node[font=\pgfPTlscfont,text=\pgfPTlsccolor,text width=\pgfPT@data@lsc@wd,text centered]%
- at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]\Z) {\vbox to\pgfPT@data@lsc@ht{\vfil\pgfPT@data@lsc\vfil}};%
+ at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]\Z) {\vbox to\pgfPT@data@lsc@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsc}\vfil}};% changed in v2.1.5
\else%
\node[font=\pgfPTlscfont,text=\pgfPTlsccolor,text width=\pgfPT@data@lsc@wd,text centered]%
at ([xshift=\pgfPT@data@lsc@x,yshift=-\pgfPT@data@lsc@y]\Z) {\vbox to\pgfPT@data@lsc@ht{\vfil\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsc}\vfil}};%
@@ -987,10 +1094,10 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\ifpgfPT@lsca\relax%
\ifnum\pgfPTlsprecision<0\relax%
\node[font=\pgfPTlscafont,text=\pgfPTlscacolor,text width=\pgfPT@data@lsca@wd,text centered]%
- at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]\Z) {\vbox to\pgfPT@data@lsca@ht{\vfil\pgfPT@data@lsca\vfil}};%
+ at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]\Z) {\vbox to\pgfPT@data@lsca@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsca}\vfil}};% changed in v2.1.5
\else\ifnum\pgfPTlsprecision>1\relax%
\node[font=\pgfPTlscafont,text=\pgfPTlscacolor,text width=\pgfPT@data@lsca@wd,text centered]%
- at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]\Z) {\vbox to\pgfPT@data@lsca@ht{\vfil\pgfPT@data@lsca\vfil}};%
+ at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]\Z) {\vbox to\pgfPT@data@lsca@ht{\vfil\pgfPT@formatnumber{-1}{\pgfPT@data@lsca}\vfil}};% changed in v2.1.5
\else%
\node[font=\pgfPTlscafont,text=\pgfPTlscacolor,text width=\pgfPT@data@lsca@wd,text centered]%
at ([xshift=\pgfPT@data@lsca@x,yshift=-\pgfPT@data@lsca@y]\Z) {\vbox to\pgfPT@data@lsca@ht{\vfil\pgfPT@formatnumber{\pgfPTlsprecision}{\pgfPT@data@lsca}\vfil}};%
@@ -1013,6 +1120,86 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\fi%
}% end foreach \Z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% new in v2.1.5
+% process the empty list
+\ifpgfPT@Zliststar%
+\ifx\pgfPT@emptycellslist@options\undefined\relax\else%
+\edef\pgfPT@emptycellslist@option@noZ{hide Z}%
+\edef\pgfPT@emptycellslist@option@bc{back color}%
+\def\pgfPT@emptycellslist@option@decompose##1=##2\relax{%
+ \edef\pgfPT@emptycellslist@option@decompose@i{##1}%
+ \edef\pgfPT@emptycellslist@option@decompose@ii{##2}}%
+\@for\@pgfPT@tmp:=\pgfPT@emptycellslist@options\do{%
+ \ifx\@pgfPT@tmp\pgfPT@emptycellslist@option@noZ\relax\edef\pgfPT@emptycellslist@noZ{}%
+ \else%
+ \expandafter\pgfPT@emptycellslist@option@decompose\@pgfPT@tmp\relax%
+ \ifx\pgfPT@emptycellslist@option@decompose@i\pgfPT@emptycellslist@option@bc\relax%
+ \edef\pgfPT@emptycellslist@bc{\pgfPT@emptycellslist@option@decompose@ii}%
+ \else%
+ \PackageError{pgfPT}{Unknown option '\@pgfPT@tmp'. It will be ignored...}{}%
+ \fi%
+ \fi%
+ }%
+\fi%
+\foreach \Z in \pgfPT@@emptycellslist {%
+\ifx\pgfPT@emptycellslist@bc\undefined\relax%
+\ifpgfPTis@backcolorsolid\relax\else\pgfPT@processbackcolor{\Z}\fi%
+\else\colorlet{cpgfPTTMP}{\pgfPT@emptycellslist@bc}%
+\fi%
+ % drawing the cell
+ \draw[fill=cpgfPTTMP,line width=\pgfPTcelllinewd,draw=\pgfPTcelllinecolor] (\Z) rectangle ++(\pgfPTcellwd,-\pgfPTcellht);
+\ifx\pgfPT@emptycellslist@noZ\undefined\relax%
+ % append the Z box
+ \ifpgfPT@Z%
+ \ifpgfZuseboxwidth{\pgfPTZfont\pgfPTnumberfont%
+ \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
+ \pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax%
+ \pgfmathparse{\pgfPT@data@Z@wd-2*\pgfPTZspace-.3333em}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
+ at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
+ {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{\Z}}\hspace{\pgfPTZspace}\vfil}};
+ \else%
+ \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
+ at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
+ {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{\Z}\hspace{\pgfPTZspace}\vfil}};
+ \fi%
+ \else\let\pgfPT@printnum\relax%
+ \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,align=\pgfPTZalign,text width=\pgfPT@data@Z@wd]%
+ at ([xshift=.5*\pgfPT@data@Z@x,yshift=-.5*\pgfPT@data@Z@y]\Z)
+ {\vbox to\pgfPT@data@Z@ht{\vfil\hspace{\pgfPTZspace}\pgfPT@printnum{\Z}\hspace{\pgfPTZspace}\vfil}};
+ \fi%
+ }%
+ \else%
+ {%
+ \ifpgfPT@zhnumbers@Z\let\pgfPT@printnum\zhnumber%
+ \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \ifdim\pgfPT@data@Z@natwd>\pgfPT@data@Z@wd\relax\edef\@pgfPT@resizebox{1}%
+ \pgfmathparse{\pgfPT@data@Z@wd-1ex}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}\else\edef\@pgfPT@resizebox{0}\fi%
+ \else\let\pgfPT@printnum\relax%
+ \pgfPTZfont\pgfPTnumberfont\pgfmathparse{width("\pgfPT@printnum{\Z}")}\pgfmathsetlength{\pgfPT@data@Z@natwd}{\pgfmathresult}%
+ \fi%
+ \node[fill=\pgfPTZback,font=\pgfPTZfont,text=\pgfPTZcolor,text width=\pgfPT@data@Z@natwd,inner xsep=.5ex]%
+ at ([xshift=\pgfPT@data@Z@x+.5*\@pgfPT@Zxshift,yshift=-\pgfPT@data@Z@y-.5*\@pgfPT@Zyshift]\Z) {%
+ \ifpgfPT@zhnumbers@Z%
+ \ifnum\@pgfPT@resizebox=1\relax%
+ \vbox to\pgfPT@data@Z@ht{\vfil\resizebox{\pgfPT@data@Z@natwd}{\height}{\pgfPT@printnum{\Z}}\vfil}%
+ \else%
+ \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{\Z}\vfil}%
+ \fi%
+ \else%
+ \vbox to\pgfPT@data@Z@ht{\vfil\pgfPT@printnum{\Z}\vfil}%
+ \fi%
+ };}%
+ \fi%
+ \fi%
+\fi%
+\let\pgfPT@emptycellslist@noZ\undefined\relax%
+\let\pgfPT@emptycellslist@bc\undefined\relax%
+}%
+\pgfPT@Zliststarfalse\edef\pgfPT@@cellslist{\pgfPT@@cellslist,\pgfPT@@emptycellslist}%
+\fi%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpgfPTexMode%
\expandafter\pgfPT@get@limits\pgfPT@@cellslist\relax%
\pgfmathsetcount{\pgfPT@countc}{\pgfPT@limits@min-1}%
@@ -1043,6 +1230,7 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
% periods -->
\ifpgfPTperlabels%
\global\pgfPTis@labeldrawnfalse%
+\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\foreach \per in {1,...,7} {%
\edef\pgfPT@@perlist{\csname pgfPT@cells@P\@Roman\per\endcsname}%
\foreach \Zsearch in \pgfPT@@perlist{%
@@ -1185,18 +1373,26 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\fi%
\ifnum\pgfPT@fontspec=1\relax\setmainfont{\pgfPTglobalfont}\else\fontfamily{\pgfPTglobalfont}\selectfont\fi\fontseries{\seriesdefault}\fontshape{\shapedefault}%
\fi%
-% groups -->
+% groups --> changed in v2.1.5 to accommodate IUPAC*/CAS* with zhnumbers
\ifpgfPTgrlabels%
\global\pgfPTis@labeldrawnfalse%
+\pgfPT@gr@numbers{\pgfPTgrnum}% new in v2.1.1
\ifpgfPTIUPACMMIX%
\foreach \group in {1,2,4,5,...,18} {%
\edef\pgfPT@@grlist{\csname pgfPT@cells@G\@Roman\group\endcsname}%
\foreach \Zsearch in \pgfPT@@grlist{%
\foreach \Z in \pgfPT@@cellslist {%
\ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
- {\pgfPTlabfont\pgfPTnumberfont\ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
- \node[above,font=\pgfPTlabfont,text=\pgfPTlabgrcolor] at%
- ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{\group}};}\breakforeach\fi%
+ {\pgfPTlabfont\pgfPTnumberfont\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}\ifpgfPT@zhnumbers@gr%\let\pgfPT@printnum\zhnumber\else%
+ \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\zhnumber\fi\else%
+ \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\relax\fi\fi%
+ \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
+ ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{\group}};
+ \ifpgfPT@grarabic\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}%
+ \ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
+ \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
+ ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift+2ex]\Z) {\pgfPT@printnum{\group}};\fi}%
+ \breakforeach\fi%
}%
\ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
}%
@@ -1205,9 +1401,16 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\foreach \Zsearch in \pgfPT@cells@GIIILaAc{%
\foreach \Z in \pgfPT@@cellslist {%
\ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
- {\pgfPTlabfont\pgfPTnumberfont\ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
- \node[above,font=\pgfPTlabfont,text=\pgfPTlabgrcolor] at%
- ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{3}};}\breakforeach\fi%
+ {\pgfPTlabfont\pgfPTnumberfont\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}\ifpgfPT@zhnumbers@gr%\let\pgfPT@printnum\zhnumber\else%
+ \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\zhnumber\fi\else%
+ \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\relax\fi\fi%
+ \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
+ ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{3}};
+ \ifpgfPT@grarabic\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}%
+ \ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
+ \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
+ ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift+2ex]\Z) {\pgfPT@printnum{3}};\fi}%
+ \breakforeach\fi%
}%
\ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
}%
@@ -1217,9 +1420,16 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\foreach \Zsearch in \pgfPT@@grlist{%
\foreach \Z in \pgfPT@@cellslist {%
\ifnum\Z=\Zsearch\global\pgfPTis@labeldrawntrue%
- {\pgfPTlabfont\pgfPTnumberfont\ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
- \node[above,font=\pgfPTlabfont,text=\pgfPTlabgrcolor] at%
- ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{\group}};}\breakforeach\fi%
+ {\pgfPTlabfont\pgfPTnumberfont\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}\ifpgfPT@zhnumbers@gr%
+ \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\zhnumber\fi\else%
+ \ifpgfPT@grRoman\let\pgfPT@printnum\pgfPT@gr@Roman\colorlet{pgfPT@grcolor}{\pgfPTRomanlabgrcolor}\else\let\pgfPT@printnum\relax\fi\fi%
+ \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
+ ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift]\Z) {\pgfPT@printnum{\group}};%
+ \ifpgfPT@grarabic\colorlet{pgfPT@grcolor}{\pgfPTlabgrcolor}%
+ \ifpgfPT@zhnumbers@gr\let\pgfPT@printnum\zhnumber\else\let\pgfPT@printnum\relax\fi%
+ \node[above,font=\pgfPTlabfont,text=pgfPT@grcolor] at%
+ ([xshift=\pgfPT@@xshift,yshift=\pgfPT@grlabel@yshift+2ex]\Z) {\pgfPT@printnum{\group}};\fi}%
+ \breakforeach\fi%
}%
\ifpgfPTis@labeldrawn\global\pgfPTis@labeldrawnfalse\breakforeach\fi%
}%
@@ -1279,7 +1489,8 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\draw[fill=black!30,line width=.05pt,draw=black!50] (LCS.east) circle(.05*\pgfPTcellwd) ++(.05*\pgfPTcellwd,0) -- ++(\pgfPT@dimc+.35*\pgfPTcellwd,0);
\pgfPTCSfont\selectfont\ifnum\pgfPT@countb>1\relax\pgfmathsetlength{\pgfPT@dima}{.35*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.25*\f@size}
\else\pgfmathsetlength{\pgfPT@dima}{.4*\f@size}\fi%
- \fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont\relax%
+ %\fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont\relax%
+ %\fontsize{\pgfPTlegendacrofontsize}{\pgfPTlegendacrofontsize}\selectfont\relax%
\node[legendpins,%
text width={.7*\pgfPTcellwd+.2*(\pgfPT@countb-1)*\pgfPTcellwd-4pt},font=\fontsize{\the\pgfPT@dima}{\the\pgfPT@dima}\selectfont,inner xsep=2pt,inner ysep=1pt]%
at ([xshift={\pgfPT@dimc+.2*\pgfPTcellwd},yshift={.25*\pgfPT@data@CS@ht}]LCS.east)%
@@ -1650,7 +1861,8 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
{\pgfPT@theacro};%
\fi%
% acronyms description
- \fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont%
+ %\fontsize{\pgfPT@doc@fsize}{\pgfPT@doc@fsize}\selectfont% changed in v2.1.5
+ \fontsize{\pgfPTlegendacrofontsize}{\pgfPTlegendacrofontsize}\selectfont%
\ifnum\pgfPT@countb=2\relax\pgfmathsetlength{\pgfPT@dima}{.4*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.3*\f@size}%
\else\ifnum\pgfPT@countb>2\relax\pgfmathsetlength{\pgfPT@dima}{.3*\f@size}\pgfmathsetlength{\pgfPT@dimb}{.2*\f@size}%
\else\pgfmathsetlength{\pgfPT@dima}{.45*\f@size}\fi\fi%
@@ -2408,7 +2620,7 @@ d unit,d precision,E precision,ls unit,ls precision,T precision,Cp precision,kT
\tikz{%
\node[text width=\pgfPT@boxwd,text centered,inner sep=0pt] (exFlag) at (0,0) {\includegraphics[height=\pgfPT@boxht]{flags/\pgfPT@country@flag.pdf}};%
\global\pgfPT@countc=0%
- \node[below right,text width=3.75*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.north east) {%
+ \node[below right,text width=2.2*\pgfPTcellwd,inner xsep=0pt] at ([xshift=.025*\pgfPTcellwd]exFlag.north east) {%
\@for\pgfPT@tmp:=\pgfPTlanguages\do{%
\ifnum\pgfPT@countc=0\relax%
\pgfPT@box@zerodepth{\csname pgfPT@country@name@\pgfPT@tmp\endcsname}%
@@ -2979,7 +3191,9 @@ rectangle
\fi% \pgfPT@element@count=118
\fi\fi% min=1 & max 118
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\@pgfPT@resetlayers% Restoring pgf layers to those used in the document
+% corrected in v2.1.2: \@pgfPT@resetlayers -> \pgfsetlayers{\@pgfPT@resetlayers}
+% ... Warning: Missing character: There is no m (U+006D) in font nullfont! ...
+\pgfsetlayers{\@pgfPT@resetlayers}% Restoring pgf layers to those used in the document
\fontseries{\seriesdefault}\fontshape{\shapedefault}\fontfamily{\familydefault}\selectfont% Restoring the font settings to normal mode in the document
}% end tikz
}%
@@ -2990,8 +3204,13 @@ rectangle
% internal macro -> pgfPT@processlist -----------------------------------------------------------
% Analyze the key and store the list of Z numbers in \pgfPT@@cellslist ------------------------
\def\pgfPT@processlist{%
-\def\pgfPT@processlist@firstchar##1##2\relax{\edef\pgfPT@tmp{##1}}%
+\def\pgfPT@processlist@firstchar##1##2\relax{\edef\pgfPT@tmp{##1}\edef\pgfPT@theotherchars{##2}}% changed in v2.1.5
\expandafter\pgfPT@processlist@firstchar\pgfPTcells\relax%
+ %\pgfPTcells is a list of Z numbers preceded with a star -> new in v2.1.5
+ \edef\pgfPT@liststar{*}%
+ \ifx\pgfPT@tmp\pgfPT@liststar\relax%
+ \expandafter\pgfPT@processZlist@star@makeTheLists\pgfPT@theotherchars\relax%
+ \else%
\ifcat1\pgfPT@tmp\relax%
%\pgfPTcells is a list of Z numbers
\edef\pgfPT@@cellslist{\pgfPTcells}%
@@ -3017,7 +3236,45 @@ rectangle
\fi%
\fi%
\fi%
+ \fi%
+}%
+% ---- new in v2.1.5
+% \pgfPT@processZlist@star@makeTheLists
+% store the original list in \pgfPT@@cellslist
+% and makes the list \pgfPT@@emptycellslist with the 'gaps' in the original list
+% Example: original list=*({empty list options}){1,...,5,9,10,...24} -> \pgfPT@@cellslist={1,...,5,9,10,...24} and \pgfPT@@emptycellslist={6,7,8}
+% empty list options available: hide Z, back color
+\def\pgfPT@processZlist@star@makeTheLists#1\relax{\ignorespaces%
+\expandafter\pgfPT@processlist@firstchar#1\relax%
+\edef\pgfPT@leftpar{(}%
+\ifx\pgfPT@tmp\pgfPT@leftpar\relax% options to empty cells
+\message{make::parenthesis found::\pgfPT@tmp}%
+\def\pgfPT@emptycellslist@get@options(##1)##2\relax{\edef\pgfPT@emptycellslist@options{##1}\edef\pgfPT@@cellslist{##2}}%
+\expandafter\pgfPT@emptycellslist@get@options#1\relax%
+\else%
+\edef\pgfPT@@cellslist{#1}%
+\fi%
+\def\pgfPT@@emptycellslist{}%
+\expandafter\@pgfPT@processZlist@star@makeTheLists\pgfPT@@cellslist\relax%
}%
+\def\@pgfPT@processZlist@star@makeTheLists#1\relax{\ignorespaces%
+\pgfPT@countf=0% counter to indicate the start (0 -> first list element; 1 -> other list elements)
+\foreach \n in {#1} {%
+ \ifnum\pgfPT@countf=0\relax\xdef\pgfPT@@auxlist@start{\n}\global\pgfPT@countf=1\relax\else%
+ \xdef\pgfPT@@auxlist@finish{\n}\fi%
+ }%
+\foreach \n in {\pgfPT@@auxlist@start,...,\pgfPT@@auxlist@finish} {%
+ \gdef\pgfPT@foundinlist{0}% false
+ \foreach \p in {#1} {%
+ \ifnum\n=\p\relax\gdef\pgfPT@foundinlist{1}\breakforeach\fi% true
+ }%
+ \ifnum\pgfPT@foundinlist=1\relax\else\xdef\pgfPT@@emptycellslist{\pgfPT@@emptycellslist,\n}\fi%
+ }%
+\def\pgfPT@cleanemptycellslist,##1\relax{\edef\pgfPT@@emptycellslist{##1}}%
+\ifx\pgfPT@@emptycellslist\empty\relax\else%
+\pgfPT@Zliststartrue\expandafter\pgfPT@cleanemptycellslist\pgfPT@@emptycellslist\relax\fi%
+}%
+% ----
% END !! \pgfPT@processlist ----------------------------------------------------------------------
%
% INPUT: number list -> {??,...,??}
@@ -3054,15 +3311,14 @@ rectangle
% renders text via pdfliteral: -------------
% #1 outline width width #2 txt #3 #4 #5 rgb stroke color #6 #7 #8 rgb fill color -----------
% #9 txt render mode (0 - fill 1 - stroke 2 - fill then stroke ---------
-\ifx\pdfliteral\undefined\relax%
-\ifx\pdfextension\undefined\relax% XeLaTeX
-\def\pgfPT@lt[#1](#2)(#3,#4,#5)(#6,#7,#8)(#9){\special{pdf:literal direct #1 w #3 #4 #5 RG #6 #7 #8 rg #9 Tr}#2\special{pdf:literal direct 0 0 0 rg 1 w 0 Tr}}%
-\else% LuaLaTeX
-\protected\def\pdfliteral{\pdfextension literal}
+% changed in v2.1.3
+\ifcase\pgfPT@engine\relax% pdfLaTeX
\def\pgfPT@lt[#1](#2)(#3,#4,#5)(#6,#7,#8)(#9){\pdfliteral direct {#1 w #3 #4 #5 RG #6 #7 #8 rg #9 Tr}{#2}\pdfliteral direct {0 0 0 rg 1 w 0 Tr}}%
-\fi%
-\else% pdfLaTeX
+\or% LuaLaTeX
+\protected\def\pdfliteral{\pdfextension literal}%
\def\pgfPT@lt[#1](#2)(#3,#4,#5)(#6,#7,#8)(#9){\pdfliteral direct {#1 w #3 #4 #5 RG #6 #7 #8 rg #9 Tr}{#2}\pdfliteral direct {0 0 0 rg 1 w 0 Tr}}%
+\or% XeLaTeX
+\def\pgfPT@lt[#1](#2)(#3,#4,#5)(#6,#7,#8)(#9){\special{pdf:literal direct #1 w #3 #4 #5 RG #6 #7 #8 rg #9 Tr}#2\special{pdf:literal direct 0 0 0 rg 1 w 0 Tr}}%
\fi%
% END !! \pgfPT@lt --------------------------------------------------------------------------------
%
@@ -3073,9 +3329,10 @@ rectangle
% auxiliary macros to set the rgb components of one color ---------------------------------------
% with use of \extractcolorspecs from xcolor package ---------------------------------------------
% each component is stored in \pgfPT@r, g or b & s or f -------------------------------------
-\def\pgfPT@extract@rgb@stroke#1{\extractcolorspecs{#1}{\pgfPTcolmodel}{\pgfPTcolinfo}\expandafter\pgfPT@set@rgb@stroke\pgfPTcolinfo\relax}%
+% v3.1.3: added conversion of the color to rgb :: \colorlet{#1}[rgb]{#1}
+\def\pgfPT@extract@rgb@stroke#1{\colorlet{#1}[rgb]{#1}\extractcolorspecs{#1}{\pgfPTcolmodel}{\pgfPTcolinfo}\expandafter\pgfPT@set@rgb@stroke\pgfPTcolinfo\relax}%
\def\pgfPT@set@rgb@stroke#1,#2,#3\relax{\def\pgfPT@rs{#1}\def\pgfPT@gs{#2}\def\pgfPT@bs{#3}}%
-\def\pgfPT@extract@rgb@fill#1{\extractcolorspecs{#1}{\pgfPTcolmodel}{\pgfPTcolinfo}\expandafter\pgfPT@set@rgb@fill\pgfPTcolinfo\relax}%
+\def\pgfPT@extract@rgb@fill#1{\colorlet{#1}[rgb]{#1}\extractcolorspecs{#1}{\pgfPTcolmodel}{\pgfPTcolinfo}\expandafter\pgfPT@set@rgb@fill\pgfPTcolinfo\relax}%
\def\pgfPT@set@rgb@fill#1,#2,#3\relax{\def\pgfPT@rf{#1}\def\pgfPT@gf{#2}\def\pgfPT@bf{#3}}%
% END !! \pgfPT@color macros ------------------------------------------------------------------
%
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.pdf b/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.pdf
index 7c0b250d7c..c395dc96fa 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.pdf
+++ b/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.tex b/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.tex
index 659f09fd72..44ceaf521e 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/pgf-PeriodicTableManual.tex
@@ -21,7 +21,7 @@
\makebox[\linewidth][c]{\tikz{%
\node[text width=.9\linewidth+.5cm,text justified,draw=blue!10!black,rounded corners=10pt,fill=blue!5] at (0,0) {\color{blue!10!black}
\begin{abstract}
-\noindent The purpose of this package is to provide the Periodic Table of Elements in a simple way. It relies on pgf/\txttikz{} to offer a full or partial periodic table with a variety of options and displaying the desired data. The data available, from all the actual 118 elements, is: atomic number, element name, chemical symbol, relative atomic mass, standard relative atomic mass, radioactivity, atomic radius (empirycal), covalente radius, ionic radius, first ionization energy, electronegati\-vity (Pauling), electroaffinity, oxidation states, melting point (in Kelvin and Celsius degrees), boiling point (in Kelvin and Celsius degrees), electron distribuition, electronic configuration (increasing $n$ and increasing $n+\ell$), density, specific heat capacity, thermal condutivity, lattice structure, lattice constants (a, b, c and c/a ratio), discovery year, discovery country and visible range spectral lines. It is possible to get the Periodic Table in different languages: English, French, German, Portuguese (from Portugal and from Brazil), Spanish, Italian and translations provided by user contributions -- currently in Dutch only.
+\noindent The purpose of this package is to provide the Periodic Table of Elements in a simple way. It relies on pgf/\txttikz{} to offer a full or partial periodic table with a variety of options and displaying the desired data. The data available, from all the actual 118 elements, is: atomic number, element name, chemical symbol, relative atomic mass, standard relative atomic mass, radioactivity, atomic radius (empirical), covalent radius, ionic radius, first ionization energy, electronegati\-vity (Pauling), electroaffinity, oxidation states, melting point (in Kelvin and Celsius degrees), boiling point (in Kelvin and Celsius degrees), electron distribution, electronic configuration (increasing $n$ and increasing $n+\ell$), density, specific heat capacity, thermal conductivity, lattice structure, lattice constants (a, b, c and c/a ratio), discovery year, discovery country and visible range spectral lines. It is possible to get the Periodic Table in different languages: English, French, German, Portuguese (from Portugal and from Brazil), Spanish, Italian and translations provided by user contributions -- currently in Dutch and Chinese.
\\ [6pt]
\end{abstract}
};}}
@@ -43,7 +43,7 @@
\\ [6pt]You need to put the package files (pgf-PeriodicTable.sty \&\ \textit{friends}) in a location where \textrm{PDF\LaTeX}, \textrm{Lua\LaTeX} or \textrm{Xe\LaTeX} can find them. According to the TDS conventions this may be a subdirectory named \textit{tex/latex/pgf-PeriodicTable/} or \textit{tex/latex/misc/} in your (site specific) installation tree (insert your appropriate directory delimiter instead of /, if needed).
\subsection{Package loading and options}
If you are using \textrm{PDF\LaTeX}, \textrm{Lua\LaTeX} or \textrm{Xe\LaTeX} you can just simply include the style file without any option via the \texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}} command, \texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}\textcolor{purple!70!black}{\{}\textcolor{blue!70!black}{pgf-PeriodicTable}\textcolor{purple!40!black}{\}}}
-\\ [6pt]It can also be loaded with a comma separated list of \textit{options} to select the desired default language or to use Devanagari or Mandarin numerals in the Atomic Number, Periods and/or Groups.
+\\ [6pt]It can also be loaded with a comma separated list of \textit{options} to select the desired default language, to use Devanagari or Mandarin numerals in the Atomic Number, Periods and/or Groups or to fix the interaction with the beamer class.
\subsubsection{Language Option}
There are six \textit{built-in }languages -- English, French, German, Portuguese (from Portugal and Brazil), Spanish and Italian. The default language used in the package may be selected at package loading:
\\ [3pt]\texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}\textcolor{blue!70!black}{[}\textcolor{brown!60!black}{language flag}\textcolor{blue!70!black}{]}\textcolor{purple!70!black}{\{}\textcolor{blue!70!black}{pgf-PeriodicTable}\textcolor{purple!40!black}{\}}}
@@ -64,10 +64,17 @@ There are six \textit{built-in }languages -- English, French, German, Portuguese
\vspace{4pt}\hrule\vspace{12pt}
A \textit{user language} can also be chosen as default language loading the package with the following option syntax:
\\ [3pt]\texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}\textcolor{blue!70!black}{[}\textcolor{brown!60!black}{userlang=<ISO 639-1 CODE>}\textcolor{blue!70!black}{]}\textcolor{purple!70!black}{\{}\textcolor{blue!70!black}{pgf-PeriodicTable}\textcolor{purple!40!black}{\}}}
-\\ [6pt]In the present version only a Dutch translation is available. It can be loaded by:
-\\ [3pt]\texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}\textcolor{blue!70!black}{[}\textcolor{brown!60!black}{userlang=nl}%
-\textcolor{blue!70!black}{]}\textcolor{purple!70!black}{\{}\textcolor{blue!70!black}{pgf-PeriodicTable}\textcolor{purple!40!black}{\}}}
-\\ [6pt]\tikz{\node[text width=\linewidth-6mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=3mm] {Anyone who wishes to contribute with translations for use in this package can go to the \tikz[baseline=(b.base)]{\node[inner sep=0pt] (a) {\includegraphics[height=10pt]{manualfiles/pgfPTgithub-mark.pdf}}; \node[right,inner sep=0pt,xshift=.1em] (b) at (a.east) {\href{https://github.com/HugoPGomes/pgf-periodictable}{pgf-periodictable}};} project page.};}
+\\ [6pt]\textit{The \textcolor{brown!60!black}{user language ISO CODES} available are:}
+\vspace{2pt}\hrule\vspace{4pt}
+\begin{minipage}[t]{.5\linewidth}
+\begin{itemize}
+\item[$\checkmark$]\textbf{nl} for Dutch,
+\end{itemize}\end{minipage}\begin{minipage}[t]{.5\linewidth}
+\begin{itemize}
+\item[$\checkmark$]\textbf{zh} for Chinese (simplified).
+\end{itemize}\end{minipage}
+\vspace{4pt}\hrule\vspace{12pt}
+\tikz{\node[text width=\linewidth-6mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=3mm] {Anyone who wishes to contribute with translations for use in this package can go to the \tikz[baseline=(b.base)]{\node[inner sep=0pt] (a) {\includegraphics[height=10pt]{manualfiles/pgfPTgithub-mark.pdf}}; \node[right,inner sep=0pt,xshift=.1em] (b) at (a.east) {\href{https://github.com/HugoPGomes/pgf-periodictable}{pgf-periodictable}};} project page.};}
\\ [6pt]\textbf{Note that the \textit{built-in} languages are always available for the \textcolor{red!60!black}{languages} option of the \bs{pgfPT} command, but the \textit{user language} is only available if loaded with the package.}
\subsubsection{Devanagari numerals}
It is possible to get some numbers in the Periodic Table with Devanagari numerals: the atomic number and the numeration of periods and groups. To get this feature enabled the package must be loaded with the option \textit{numerals} set to \textbf{dvn}:
@@ -98,9 +105,10 @@ This option works with the \textrm{Xe\LaTeX} and \textrm{Lua\LaTeX} engines to t
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\includegraphics{manualfiles/pgfPTnumMand1.pdf}}}%
\\ [3pt]\pgfPTMline
\\ [6pt]As with the Devanagari numerals, the following command loads the specified font for the Mandarin numerals:
-\index{COMMANDS@\textbf{COMMANDS}!\textbackslash pgfPTzhfont}%
-\\ [3pt]\bs{pgfPTzhfont}\lp\red{font options}\rp\lb\red{font name}\rb
-\\ [3pt]The default font is \textit{SimSun} loaded with the \textit{AutoFakeBold=4} option.
+\index{COMMANDS@\textbf{COMMANDS}!\textbackslash pgfPTzhnumberfont}%\pgfPTzhnumberfont
+\\ [3pt]\bs{pgfPTzhnumberfont}\lp\red{font options}\rp\lb\red{font name}\rb
+\\ [3pt]\textit{For backwards compatibility (up to v2.1.4) the previous \bs{pgfPTzhfont} command now points to \bs{pgfPTzhnumberfont}, so older documents do not need any changes}.
+\\ [3pt]The default font is \textit{BabelStone Han} (since v2.1.5) loaded with the \textit{AutoFakeBold=4} option. For details on installing this font, see the \hyperlink{subsec::zhLang}{Chinese (zh) subsection} below.
\\ [6pt]It is also possible to enable or disable the numbers shown in Mandarin with the command:
\\ [3pt]\bs{pgfPTzhnumber}\lp\red{<true|false>}\rp\lb\red{comma separated list}\rb
\\ [3pt] The list can have \red{Z} for the atomic number, \red{per} for the period numbers and \red{gr} for the group numbers. At package loading, with this option, they are set to \red{true}.
@@ -112,18 +120,118 @@ This option works with the \textrm{Xe\LaTeX} and \textrm{Lua\LaTeX} engines to t
\\ [-4pt]\pgfPTMmacrobox{pgfPT}[Z list={1,...,36}]%
\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\includegraphics{manualfiles/pgfPTnumMand2.pdf}}}%
\\ [3pt]\pgfPTMline
+\newpage%
+\subsection{User languages}
+\textit{User languages} are provided by user translations. They are only available if passed as an option when loading the package. In addition to the \textit{built-in} languages, the chosen language is the only one available and becomes the default language for the Periodic Table.
+\bigskip
+\subsubsection{Dutch (nl)}
+The Dutch language is loaded by:
+\\ [3pt]\texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}\textcolor{blue!70!black}{[}\textcolor{brown!60!black}{userlang=nl}%
+\textcolor{blue!70!black}{]}\textcolor{purple!70!black}{\{}\textcolor{blue!70!black}{pgf-PeriodicTable}\textcolor{purple!40!black}{\}}}
+\\ [10pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\small\textcolor{black!50}{\%\ \string\usepackage[userlang=nl]\{pgf-PeriodicTable\}}};}%
+\\ [-4pt]\pgfPTMmacrobox{pgfPT}[]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\includegraphics{manualfiles/pgfPT_nl.pdf}}}%
+\\ [3pt]\pgfPTMline
+\bigskip
+\subsubsection{Chinese (zh)}
+\hypertarget{subsec::zhLang}{The Chinese language} is loaded by:
+\\ [3pt]\texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}\textcolor{blue!70!black}{[}\textcolor{brown!60!black}{userlang=zh}%
+\textcolor{blue!70!black}{]}\textcolor{purple!70!black}{\{}\textcolor{blue!70!black}{pgf-PeriodicTable}\textcolor{purple!40!black}{\}}}
+\\ [6pt]\tikz{\node[text width=\linewidth-6mm,draw=orange!70,rounded corners=2pt,fill=black!10!orange!10,inner sep=3mm] {%
+The default font is \textit{BabelStone Han} \textbf{which is not available in TeX Live}.
+\\ It can be downloaded for free from the BabelStone website:
+\\ [3pt]\hfil\href{https://www.babelstone.co.uk/Fonts/Han.html}{https://www.babelstone.co.uk/Fonts/Han.html}\hfil};}
+\\ [6pt]The use of a font which is not included in the TeX Live software distribution, nor in common Operating Systems, circumvents the missing Ideographs for the most recent elements -- from rutherfordium to oganesson. The BabelStone Han has all of them as can be seen in the following table:
+\begin{center}\small
+\includegraphics[width=\linewidth]{manualfiles/pgfPT_zh_fonts.pdf}
+\\ [3pt]Glyphs available in \textsf{BabelStone Han} font and in some Windows and TeX Live fonts.
+\end{center}
+\vfill%
+To use the BabelStone Han it is necessary to \href{https://www.babelstone.co.uk/Fonts/Download/BabelStoneHan.zip}{download it}, unzip it and install the extracted font file:
+\begin{itemize}\small
+\item for Windows users, just right click on \textsf{BabelStoneHan.ttf} and choose \textsf{install for all users}. This can also be done in Windows Settings $\rightarrow$ Personalization $\rightarrow$ Fonts.
+\item for Linux users, open the Linux Terminal and type \textsf{sudo apt install fonts-BabelStoneHan.ttf}
+\item for macOS users, just copy or drag the font file (\textsf{BabelStoneHan.ttf}) into \textsf{/Library/Fonts} or \mbox{double-click} on \textsf{BabelStoneHan.ttf} to open the preview window. Click on \textsf{Install font} button at the bottom of the preview window.
+\end{itemize}\medskip
+Make sure the \textsf{BabelStone Han} font is \textit{visible} to the \textrm{Xe\LaTeX} or \textrm{Lua\LaTeX} engines.
+\\ [9pt]If you do not want to install this font on your operating system, you can place it in the \textsf{truetype} fonts folder in the TeX Live distribution and \textit{Update filename database} in the TeX Live manager. After that, the font will be known only by the filename \textsf{BabelStoneHan.ttf} instead of its name, \textsf{BabelStone Han}.
+
+\newpage%
+\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\small\textcolor{black!50}{\%\ \string\usepackage[userlang=zh]\{pgf-PeriodicTable\}}};}%
+\\ [-4pt]\pgfPTMmacrobox{pgfPT}[]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\includegraphics{manualfiles/pgfPT_zh_1.pdf}}}%
+\\ [3pt]\pgfPTMline
+\vfill
+To get the Periodic Table with the atomic number and the period/group numbers in mandarin numerals load the package with the correponding options:
+\\ [10pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\small\textcolor{black!50}{\%\ \string\usepackage[userlang=zh,numerals=zh]\{pgf-PeriodicTable\}}};}%
+\\ [-4pt]\pgfPTMmacrobox{pgfPT}[]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\includegraphics{manualfiles/pgfPT_zh_2.pdf}}}%
+\\ [3pt]\pgfPTMline
+\newpage%
+When the Chinese language is loaded four extra commands are defined:
+\begin{itemize}
+\item\bs{pgfPTzhFontFeatures}\index{COMMANDS@\textbf{COMMANDS}!\textbackslash pgfPTzhFontFeatures} can be used to set font features for the loaded Chinese font (set by the \red{font} option). For more details see the \textsf{fontspec} package documentation.
+\item\bs{pgfPTzhtextfontSS}\index{COMMANDS@\textbf{COMMANDS}!\textbackslash pgfPTzhtextfontSS} is used to set the font for the elements meitnerium, copernicium, nihonium, tennessine and oganesson (Z=109, 112. 113, 117 and 118).
+\item\bs{pgfPTzhtextfontSSB}\index{COMMANDS@\textbf{COMMANDS}!\textbackslash pgfPTzhtextfontSSB} is used to set the font for the elements rutherfordium, dubnium, seaborgium, bohrium, hassium,darmstadtium, roentgenium and flerovium (Z=104, 105, 106, 107, 108, 110, 111 and 114).
+\item\bs{pgfPTzhtextfontLv}\index{COMMANDS@\textbf{COMMANDS}!\textbackslash pgfPTzhtextfontLv} is used to set the livermorium (Z=116) font.
+\end{itemize}
+The defaults for some features of the Periodic Table are also changed:
+\begin{itemize}
+\item[--]the \red{name font} is switched from \texttt{\large\textbackslash tiny} to \texttt{\large\textbackslash footnotesize}.
+\item[--]the \red{CS font} is switched from \texttt{\large\textbackslash small\textbackslash bfseries} to \texttt{\large\textbackslash large}.
+\item[--]the \red{title font} is switched from \texttt{\large\textbackslash Large\textbackslash bfseries} to \texttt{\large\textbackslash LARGE}.
+\item[--]when not using the Chinese numerals (loaded with the option \textcolor{brown!60!black}{numerals=zh}) the \red{Z font} is switched from \texttt{\large\textbackslash tiny\textbackslash bfseries} to \texttt{\large\textbackslash scriptsize}, as well the \red{Z padding} is changed from \texttt{\large 0.25ex} to \texttt{\large 0ex}.
+\end{itemize}
+\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\small\textcolor{black!50}{\%\ \string\usepackage[userlang=zh]\{pgf-PeriodicTable\}}};}%
+\\ [-4pt]\tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt,text=black!50] %
+{\bs{pgfPTzhtextfontSS}\lb\red{SimSun}\rb\% font for Z=\{109,112.113,117,118\}
+\\ \makebox[8em][s]{}\% meitnerium, copernicium, nihonium, tennessine, oganesson
+\\ \bs{pgfPTzhtextfontSSB}\lb\red{SimSun-ExtB}\rb\% font for
+\\ \makebox[8em][s]{}\% Z=\{104,105,106,107,108,110,111,114\}
+\\ \makebox[8em][s]{}\% rutherfordium, dubnium, seaborgium, bohrium, hassium,
+\\ \makebox[8em][s]{}\% darmstadtium, roentgenium, flerovium
+\\ \bs{pgfPTzhtextfontLv}\lb\red{SimSun-ExtB}\rb\% font for Z=116
+\\ \makebox[8em][s]{}\% livermorium
+};}%
+\\ [-4pt]\pgfPTMmacrobox[l]{pgfPT}[font=SimSun]%
+\\ [10pt]\makebox[\linewidth][c]{\scalebox{.6}{\includegraphics{manualfiles/pgfPT_zh_3.pdf}}}%
+\\ [3pt]\pgfPTMline
+\newpage%
\subsection{Interaction with other packages}
\subsubsection{fontspec}
-To correctly set the font in each cell contents the command \bs{fontspec} must be used. For example if you want to use \textit{Arial} for the \red{name font}, it must be set using \red{font name=\bs{fontspec}\lb Arial\rb\bs{selectfont}}.\\ All other font selection commands, \eg, \bs{large}, \mbox{\bs{itshape}}, are used as usual. For example if you want to use \textit{Arial}\hfil\ in\hfil\ \textit{large}\hfil\ size\hfil\ and\hfil\ \textit{bold}\hfil\ weight\hfil\ for\hfil\ the \red{name font}, then you type
-\\ \makebox[\linewidth][s]{\red{font name=\bs{large}\bs{bfseries}\bs{fontspec}\lb Arial\rb\bs{selectfont}}\hfil\ or\hfil\ \red{font name=\bs{fontspec}\lb Arial\rb}}
+To correctly set the font in each cell contents the command \bs{fontspec} must be used. For example if you want to use \textit{Arial} for the \red{name font}, it must be set using \red{name font=\bs{fontspec}\lb Arial\rb\bs{selectfont}}.\\ All other font selection commands, \eg, \bs{large}, \mbox{\bs{itshape}}, are used as usual. For example if you want to use \textit{Arial}\hfil\ in\hfil\ \textit{large}\hfil\ size\hfil\ and\hfil\ \textit{bold}\hfil\ weight\hfil\ for\hfil\ the \red{name font}, then you type
+\\ \makebox[\linewidth][s]{\red{name font=\bs{large}\bs{bfseries}\bs{fontspec}\lb Arial\rb\bs{selectfont}}\hfil\ or\hfil\ \red{name font=\bs{fontspec}\lb Arial\rb}}
\\ \bs{large}\bs{bfseries}\bs{selectfont}.
\subsubsection{ragged2e}
Using \texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}\textcolor{blue!70!black}{[}\textcolor{brown!60!black}{document}%
\textcolor{blue!70!black}{]}\textcolor{purple!70!black}{\{}\textcolor{blue!70!black}{ragged2e}\textcolor{purple!40!black}{\}}} and \texttt{\large\textcolor{green!40!black}{\textbackslash usepackage}%
\textcolor{purple!70!black}{\{}\textcolor{blue!70!black}{pgf-PeriodicTable}\textcolor{purple!40!black}{\}}} together, the Periodic Table will be completely fractured and out of the page.
\\ [6pt]\textit{Solution}:
-\vspace{4pt}\hrule\vspace{4pt}Use a local group: \{\bs{justifying}\bs{pgfPT}\}\vspace{4pt}\hrule
-\vfill\vfill\vfill\newpage\ \vfill%
+\vspace{4pt}\hrule\vspace{4pt}Use a local group: \{\bs{justifying}\bs{pgfPT}\}\vspace{4pt}\hrule%
+\subsubsection{beamer}
+\textrm{\large beamer}, \pack{} and \textrm{PDF\LaTeX} in combination have an issue: the \texttt{\large\textbackslash textsc} fails to produce the correct small caps. The error given is:
+\smallskip\hrule\begin{verbatim}
+Font shape `T1/cmss/m/sc' undefined
+(Font) using `T1/cmss/m/n' instead on input line ...
+\end{verbatim}\hrule
+\smallskip\hrule\smallskip\bigskip
+To avoid this, the \pack{} package can be loaded with one of the following options:
+\begin{description}
+\item[\red{beamer}] which loads the \textrm{\large lmodern} package, setting small caps compatibility with beamer via `lmodern' package.
+\\ \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\small\textcolor{black!50}{\%\ \string\usepackage[beamer]\{pgf-PeriodicTable\}}};}%
+\item[\red{beamer*}] which sets small caps compatibility with beamer via T1 \textrm{\large cmr} fonts.
+\\ \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\small\textcolor{black!50}{\%\ \string\usepackage[beamer*]\{pgf-PeriodicTable\}}};}%
+\item[\red{beamer**}] which sets small caps compatibility with beamer via T1 \textrm{\large cmr} fonts and loads the \textrm{\large silence} package to suppress small caps font substitution warnings.
+\\ \tikz{\node[text width=\linewidth-8pt,inner xsep=4pt,align=left,fill=black!10,rounded corners=2pt] %
+{\small\textcolor{black!50}{\%\ \string\usepackage[beamer**]\{pgf-PeriodicTable\}}};}%
+\end{description}
+\newpage
\section{The data}
The data available in \pack{} was mainly compiled with selected and filtered data from Wikipedia, taken from November 2021 to July 2022.
\\ [12pt]\header
@@ -133,7 +241,7 @@ Commission on Isotopic Abundances and Atomic Weights,\newline\bfseries\textsf{\t
\newline(\href{https://ciaaw.org/impressum.htm}{https://ciaaw.org/impressum.htm})}%
\\ [-1pt]\linhaimpar{radio}{Radioactivity}{}{(gperiodic-3.0.3, Dec 26 2018)}%
\\ [-1pt]\linhapar{R}{Atomic Radius}{$\mathsf{pm}$}{Calculated (Wikidata @04/jul/2022)}%
-\\ [-1pt]\linhaimpar{Rcov}{Covalente Radius}{$\mathsf{pm}$}{Single bond, Wikidata @04/jul/2022)}%
+\\ [-1pt]\linhaimpar{Rcov}{Covalent Radius}{$\mathsf{pm}$}{Single bond, Wikidata @04/jul/2022)}%
\\ [-1pt]\linhapar{Rion}{Ionic Radius}{$\mathsf{pm}$}{(Wikidata @04/jul/2022)}%
\\ [-1pt]\linhaimpar{Ei}{First Ionization Energy}{$\mathsf{kJ\cdot mol^{-1}}$}{(Wikidata @04/jul/2022)}%
\\ [-1pt]\linhapar{eneg}{Electronegativity\newline (Pauling)}{}{(Wikidata @04/jul/2022)}%
@@ -193,8 +301,11 @@ The following options and styles are used to \textit{control} the Periodic Table
\input{manualfiles/pgf-PeriodicTableManual_DarkMode.tex}%
\label{file:exerciselayout}%
\input{manualfiles/pgf-PeriodicTableManual_exerciselayout.tex}%
+\vfill%
\subsection{\texorpdfstring{$\maltese$ Cell contents options: keys, styles and \itshape pseudo styles}{Cell contents options}}
The following options and styles are used for customizing the contents available in each individual cell of the Periodic Table, like the \textit{fonts} or the \textit{colors} used in the shown contents.
+\label{file:decSep}%
+\input{manualfiles/pgf-PeriodicTableManual_decSep.tex}%
\label{file:Z}%
\input{manualfiles/pgf-PeriodicTableManual_Z.tex}%
\label{file:CS}%
@@ -203,6 +314,8 @@ The following options and styles are used for customizing the contents available
\input{manualfiles/pgf-PeriodicTableManual_name.tex}%
\label{file:Ar}%
\input{manualfiles/pgf-PeriodicTableManual_Ar.tex}%
+\label{file:O}%
+\input{manualfiles/pgf-PeriodicTableManual_O.tex}%
\label{file:density}%
\input{manualfiles/pgf-PeriodicTableManual_density.tex}%
\label{file:ls}%
@@ -229,6 +342,10 @@ In this part the \hypertarget{sec:lib}{library} packages are documented. They pr
\\ [1.6cm]%
\input{manualfiles/pgf-PeriodicTableManual_libCS.tex}%
\newpage%
+\section{Tips \& Tricks: inspired by user questions}
+In this section a list of selected user questions and the corresponding answers can be found, hoping it can be useful to anyone using this package.
+\input{manualfiles/pgf-PeriodicTableManual_TipsTricks}
+\newpage%
\section{A few more examples}
\input{manualfiles/pgf-PeriodicTableManual_Examples.tex}%
\newpage\small%
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgfPT.backcolors.keys.tex b/graphics/pgf/contrib/pgf-periodictable/pgfPT.backcolors.keys.tex
index 076f588ca0..fe18893047 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgfPT.backcolors.keys.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/pgfPT.backcolors.keys.tex
@@ -6,24 +6,27 @@
%
% defining PGF keys: the colors of the cells of the periodic table to be drawn -----------------
% list names available to use in key 'back color scheme', e.g. ----------------------------------
-% back color scheme=CPK or back color scheme=Wikipedia ------------------------------
+% v2.1.4 -> add prefix pgfPT to the built-in names
+% back color scheme=pgfPTCPK or back color scheme=pgfPTWikipedia ------------------
% if back color scheme=solid the back color key is used to fill the cells -------------------
-\def\pgfPT@backColorsScheme@default{.769/.812/.961,.678/.733/.925,.871/.89/.875,.922/.886/.71,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741}%
-\def\pgfPT@backColorsScheme@Soft{.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.945/.941/.918,.973/.945/.78,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.973/.945/.78,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.843/.839/.659,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918}%
-\def\pgfPT@backColorsScheme@Jmol{1/1/1,.851/1/1,.8/.502/1,.761/1/0,1/.71/.71,.565/.565/.565,.188/.314/.973,1/.051/.051,.565/.878/.314,.702/.89/.961,.671/.361/.949,.541/1/0,.749/.651/.651,.941/.784/.627,1/.502/0,1/1/.188,.122/.941/.122,.502/.82/.89,.561/.251/.831,.239/1/0,.902/.902/.902,.749/.761/.78,.651/.651/.671,.541/.6/.78,.612/.478/.78,.878/.4/.2,.941/.565/.627,.314/.816/.314,.784/.502/.2,.49/.502/.69,.761/.561/.561,.4/.561/.561,.741/.502/.89,1/.631/0,.651/.161/.161,.361/.722/.82,.439/.18/.69,0/1/0,.58/1/1,.58/.878/.878,.451/.761/.788,.329/.71/.71,.231/.62/.62,.141/.561/.561,.039/.49/.549,0/.412/.522,.753/.753/.753,1/.851/.561,.651/.459/.451,.4/.502/.502,.62/.388/.71,.831/.478/0,.58/0/.58,.259/.62/.69,.341/.09/.561,0/.788/0,.439/.831/1,1/1/.78,.851/1/.78,.78/1/.78,.639/1/.78,.561/1/.78,.38/1/.78,.271/1/.78,.188/1/.78,.122/1/.78,0/1/.612,0/.902/.459,0/.831/.322,0/.749/.22,0/.671/.141,.302/.761/1,.302/.651/1,.129/.58/.839,.149/.49/.671,.149/.4/.588,.09/.329/.529,.816/.816/.878,1/.82/.137,.722/.722/.816,.651/.329/.302,.341/.349/.38,.62/.31/.71,.671/.361/0,.459/.31/.271,.259/.51/.588,.259/0/.4,0/.49/0,.439/.671/.98,0/.729/1,0/.631/1,0/.561/1,0/.502/1,0/.42/1,.329/.361/.949,.471/.361/.89,.541/.31/.89,.631/.212/.831,.702/.122/.831,.702/.122/.729,.702/.051/.651,.741/.051/.529,.78/0/.4,.8/0/.349,.82/0/.31,.851/0/.271,.878/0/.22,.902/0/.18,.922/0/.149,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1}%
-\def\pgfPT@backColorsScheme@CPK{1/1/1,0/1/1,.467/0/1,0/.467/0,1/.667/.467,.133/.133/.133,.133/.2/1,1/.133/0,.122/.941/.122,0/1/1,.467/0/1,0/.467/0,.867/.467/1,.867/.467/1,1/.6/0,1/.898/.133,.122/.941/.122,0/1/1,.467/0/1,0/.467/0,1/.667/.467,.6/.6/.6,1/.667/.467,1/.667/.467,1/.667/.467,.867/.467/0,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.6/.133/0,0/1/1,.467/0/1,0/.467/0,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.4/0/.733,0/1/1,.467/0/1,0/.467/0,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.467/0/1,0/.467/0,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1}%
-\def\pgfPT@backColorsScheme@Rasmol{1/1/1,1/.753/.796,.698/.133/.133,1/.078/.576,0/1/0,.784/.784/.784,.561/.561/1,.941/0/0,.855/.647/.125,1/.078/.576,0/0/1,.133/.545/.133,.502/.502/.565,.855/.647/.125,1/.647/0,1/.784/.196,0/1/0,1/.078/.576,1/.078/.576,.502/.502/.565,1/.078/.576,.502/.502/.565,1/.078/.576,.502/.502/.565,.502/.502/.565,1/.647/0,1/.078/.576,.647/.165/.165,.647/.165/.165,.647/.165/.165,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.647/.165/.165,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.502/.502/.565,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.627/.125/.941,1/.078/.576,1/.078/.576,1/.647/0,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.855/.647/.125,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1}%
-\def\pgfPT@backColorsScheme@RasmolNew{1/1/1,1/.753/.796,.698/.129/.129,1/.078/.58,0/1/.004,.827/.827/.827,.529/.808/.902,1/0/0,.855/.647/.129,1/.078/.58,0/0/1,.133/.545/.137,.412/.412/.412,.855/.647/.129,1/.667/0,1/1/0,0/1/.004,1/.078/.576,1/.078/.576,.412/.412/.412,1/.078/.58,.412/.412/.412,1/.078/.58,.412/.412/.412,.412/.412/.412,1/.667/0,1/.078/.58,.502/.157/.157,.502/.157/.157,.502/.157/.157,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.502/.157/.157,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.412/.412/.412,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.627/.125/.945,1/.078/.576,1/.078/.576,1/.667/0,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.855/.647/.129,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576}%
-\def\pgfPT@backColorsScheme@Wikipedia{.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,.8/.8/.6,.941/1/.561,.941/1/.561,.941/1/.561,.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,.8/.8/.8,.8/.8/.6,.941/1/.561,.941/1/.561,.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.6,.8/.8/.6,.941/1/.561,.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.8,.8/.8/.6,.8/.8/.6,.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.8,.8/.8/.8,.8/.8/.8,.8/.8/.8,.753/1/1,1/.4/.4,1/.871/.678,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91}%
-\def\pgfPT@backColorsScheme@MNM{.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.878/.816/.753,.91/.839/.659,.91/.839/.659,.91/.839/.659,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.878/.816/.753,.91/.839/.659,.91/.839/.659,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.878/.816/.753,.878/.816/.753,.91/.839/.659,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.878/.816/.753,.878/.816/.753,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847}%
-\def\pgfPT@backColorsScheme@PS{.553/.706/.89,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.553/.706/.89,.553/.706/.89,.553/.706/.89,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.553/.706/.89,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.714/.867/.91,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.647/.647/.647,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.647/.647/.647,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.714/.867/.91,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647}%
-\def\pgfPT@backColorsScheme@Radio{.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.957/.933/0,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.957/.933/0,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0}%
-\def\pgfPT@backColorsScheme@Blocks{1/.937/.671,1/.937/.671,1/.937/.671,1/.937/.671,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.98/.667/.541,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.98/.667/.541,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635}%
+\def\pgfPT@backColorsScheme@pgfPTdefault{.769/.812/.961,.678/.733/.925,.871/.89/.875,.922/.886/.71,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.631/.6/.435,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.8/.878/.859,.706/.871/.827,.612/.859/.796,.42/.89/.769,.671/.608/.749,.588/.655/.89,.871/.89/.875,.922/.886/.71,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.522/.49/.329,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.62/.604/.522,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741,.78/.788/.741}%
+\def\pgfPT@backColorsScheme@pgfPTSoft{.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.945/.941/.918,.973/.945/.78,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.973/.945/.78,.843/.839/.659,.843/.839/.659,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.843/.839/.659,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.827/.824/1,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.843/.839/.659,.843/.839/.659,.945/.941/.918,.945/.941/.918,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.71/.706/1,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918,.945/.941/.918}%
+\def\pgfPT@backColorsScheme@pgfPTJmol{1/1/1,.851/1/1,.8/.502/1,.761/1/0,1/.71/.71,.565/.565/.565,.188/.314/.973,1/.051/.051,.565/.878/.314,.702/.89/.961,.671/.361/.949,.541/1/0,.749/.651/.651,.941/.784/.627,1/.502/0,1/1/.188,.122/.941/.122,.502/.82/.89,.561/.251/.831,.239/1/0,.902/.902/.902,.749/.761/.78,.651/.651/.671,.541/.6/.78,.612/.478/.78,.878/.4/.2,.941/.565/.627,.314/.816/.314,.784/.502/.2,.49/.502/.69,.761/.561/.561,.4/.561/.561,.741/.502/.89,1/.631/0,.651/.161/.161,.361/.722/.82,.439/.18/.69,0/1/0,.58/1/1,.58/.878/.878,.451/.761/.788,.329/.71/.71,.231/.62/.62,.141/.561/.561,.039/.49/.549,0/.412/.522,.753/.753/.753,1/.851/.561,.651/.459/.451,.4/.502/.502,.62/.388/.71,.831/.478/0,.58/0/.58,.259/.62/.69,.341/.09/.561,0/.788/0,.439/.831/1,1/1/.78,.851/1/.78,.78/1/.78,.639/1/.78,.561/1/.78,.38/1/.78,.271/1/.78,.188/1/.78,.122/1/.78,0/1/.612,0/.902/.459,0/.831/.322,0/.749/.22,0/.671/.141,.302/.761/1,.302/.651/1,.129/.58/.839,.149/.49/.671,.149/.4/.588,.09/.329/.529,.816/.816/.878,1/.82/.137,.722/.722/.816,.651/.329/.302,.341/.349/.38,.62/.31/.71,.671/.361/0,.459/.31/.271,.259/.51/.588,.259/0/.4,0/.49/0,.439/.671/.98,0/.729/1,0/.631/1,0/.561/1,0/.502/1,0/.42/1,.329/.361/.949,.471/.361/.89,.541/.31/.89,.631/.212/.831,.702/.122/.831,.702/.122/.729,.702/.051/.651,.741/.051/.529,.78/0/.4,.8/0/.349,.82/0/.31,.851/0/.271,.878/0/.22,.902/0/.18,.922/0/.149,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1}%
+\def\pgfPT@backColorsScheme@pgfPTCPK{1/1/1,0/1/1,.467/0/1,0/.467/0,1/.667/.467,.133/.133/.133,.133/.2/1,1/.133/0,.122/.941/.122,0/1/1,.467/0/1,0/.467/0,.867/.467/1,.867/.467/1,1/.6/0,1/.898/.133,.122/.941/.122,0/1/1,.467/0/1,0/.467/0,1/.667/.467,.6/.6/.6,1/.667/.467,1/.667/.467,1/.667/.467,.867/.467/0,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.6/.133/0,0/1/1,.467/0/1,0/.467/0,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.4/0/.733,0/1/1,.467/0/1,0/.467/0,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.467/0/1,0/.467/0,1/.667/.467,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,.867/.467/1,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/.667/.467,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1}%
+\def\pgfPT@backColorsScheme@pgfPTRasmol{1/1/1,1/.753/.796,.698/.133/.133,1/.078/.576,0/1/0,.784/.784/.784,.561/.561/1,.941/0/0,.855/.647/.125,1/.078/.576,0/0/1,.133/.545/.133,.502/.502/.565,.855/.647/.125,1/.647/0,1/.784/.196,0/1/0,1/.078/.576,1/.078/.576,.502/.502/.565,1/.078/.576,.502/.502/.565,1/.078/.576,.502/.502/.565,.502/.502/.565,1/.647/0,1/.078/.576,.647/.165/.165,.647/.165/.165,.647/.165/.165,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.647/.165/.165,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.502/.502/.565,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.627/.125/.941,1/.078/.576,1/.078/.576,1/.647/0,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.855/.647/.125,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1,1/1/1}%
+\def\pgfPT@backColorsScheme@pgfPTRasmolNew{1/1/1,1/.753/.796,.698/.129/.129,1/.078/.58,0/1/.004,.827/.827/.827,.529/.808/.902,1/0/0,.855/.647/.129,1/.078/.58,0/0/1,.133/.545/.137,.412/.412/.412,.855/.647/.129,1/.667/0,1/1/0,0/1/.004,1/.078/.576,1/.078/.576,.412/.412/.412,1/.078/.58,.412/.412/.412,1/.078/.58,.412/.412/.412,.412/.412/.412,1/.667/0,1/.078/.58,.502/.157/.157,.502/.157/.157,.502/.157/.157,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.502/.157/.157,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.412/.412/.412,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.627/.125/.945,1/.078/.576,1/.078/.576,1/.667/0,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,.855/.647/.129,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576,1/.078/.576}%
+\def\pgfPT@backColorsScheme@pgfPTWikipediaI{.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,.8/.8/.6,.941/1/.561,.941/1/.561,.941/1/.561,.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,.8/.8/.8,.8/.8/.6,.941/1/.561,.941/1/.561,.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.6,.8/.8/.6,.941/1/.561,.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.8,.8/.8/.6,.8/.8/.6,.941/1/.561,.753/1/1,1/.4/.4,1/.871/.678,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.8,.8/.8/.8,.8/.8/.8,.8/.8/.8,.753/1/1,1/.4/.4,1/.871/.678,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91,.91/.91/.91}%
+\def\pgfPT@backColorsScheme@pgfPTWikipediaII{.627/1/.627,.753/1/1,1/.616/.616,1/.871/.678,.8/.8/.6,.627/1/.627,.627/1/.627,.627/1/.627,1/1/.6,.753/1/1,1/.616/.616,1/.871/.678,.8/.8/.8,.8/.8/.6,.627/1/.627,.627/1/.627,1/1/.6,.753/1/1,1/.616/.616,1/.871/.678,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.6,.8/.8/.6,.627/1/.627,1/1/.6,.753/1/1,1/.616/.616,1/.871/.678,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.8,.8/.8/.6,.8/.8/.6,1/1/.6,.753/1/1,1/.616/.616,1/.871/.678,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.749/1,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.8,.8/.8/.8,.8/.8/.8,1/1/.6,.753/1/1,1/.616/.616,1/.871/.678,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.6/.8,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,1/.753/.753,.8/.8/.8,.8/.8/.8,.8/.8/.8,.8/.8/.8,1/1/.6,.753/1/1}%
+\let\pgfPT@backColorsScheme@pgfPTWikipedia\pgfPT@backColorsScheme@pgfPTWikipediaII\relax%
+\def\pgfPT@backColorsScheme@pgfPTMNM{.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.878/.816/.753,.91/.839/.659,.91/.839/.659,.91/.839/.659,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.878/.816/.753,.91/.839/.659,.91/.839/.659,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.878/.816/.753,.878/.816/.753,.91/.839/.659,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.878/.816/.753,.878/.816/.753,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.91/.839/.659,.91/.839/.659,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847,.886/.886/.847}%
+\def\pgfPT@backColorsScheme@pgfPTPS{.553/.706/.89,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.553/.706/.89,.553/.706/.89,.553/.706/.89,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.553/.706/.89,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.714/.867/.91,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.647/.647/.647,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.647/.647/.647,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.714/.867/.91,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.553/.706/.89,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,1/.878/.718,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647,.647/.647/.647}%
+\def\pgfPT@backColorsScheme@pgfPTRadio{.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.957/.933/0,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.957/.933/0,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.761/.839/.604,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0,.957/.933/0}%
+\def\pgfPT@backColorsScheme@pgfPTBlocks{1/.937/.671,1/.937/.671,1/.937/.671,1/.937/.671,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.98/.667/.541,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,1/.937/.671,1/.937/.671,.98/.667/.541,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.757/.835/.914,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.98/.667/.541,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635,.718/.871/.635}%
% user defined color schemes(s): -----------------------------------------------------------------
% \pgfPTnewcolorscheme[<trailing color (default=1/1/1 e.g. white)>]{name}{list} -----
\def\pgfPTnewColorScheme{\@ifnextchar[\pgfPT@newColorScheme@withoptions{\pgfPT@newColorScheme@noptions}}%
\def\pgfPT@newColorScheme@withoptions[#1/#2/#3]#4#5{%
-\expandafter\def\csname pgfPT@backColorsScheme@#4\endcsname{#5,#1/#2/#3}%
+\expandafter\gdef\csname pgfPT@backColorsScheme@#4\endcsname{#5,#1/#2/#3}%
\definecolor{cpgfPTTMP}{rgb}{#1,#2,#3}%
\xglobal\colorlet{cpgfPTTMP}{cpgfPTTMP}%
}%
@@ -36,22 +39,24 @@
\pgfkeys{/pgfPerTable/.cd,%
back color scheme/.get=\pgfPTbcs,%
back color scheme/.store in=\pgfPTbcs,%
-back color scheme/.default=default,%
+back color scheme/.default=pgfPTdefault,%
back color/.get=\pgfPTbcsolid,%
back color/.store in=\pgfPTbcsolid,%
back color/.default=white,%
-csSoft/.style={back color scheme=Soft},%
-csJmol/.style={back color scheme=Jmol},%
-csCPK/.style={back color scheme=CPK},%
-csRasmol/.style={back color scheme=Rasmol},%
-csRasmolNew/.style={back color scheme=RasmolNew},%
-csWikipedia/.style={back color scheme=Wikipedia},%
-csMNM/.style={back color scheme=MNM},%
-csPS/.style={back color scheme=PS},%
-csRadio/.style={back color scheme=Radio},%
-csBlocks/.style={back color scheme=Blocks},%
+csSoft/.style={back color scheme=pgfPTSoft},%
+csJmol/.style={back color scheme=pgfPTJmol},%
+csCPK/.style={back color scheme=pgfPTCPK},%
+csRasmol/.style={back color scheme=pgfPTRasmol},%
+csRasmolNew/.style={back color scheme=pgfPTRasmolNew},%
+csWikipediaI/.style={back color scheme=pgfPTWikipediaI},%
+csWikipediaII/.style={back color scheme=pgfPTWikipediaII},%
+csWikipedia/.style={back color scheme=pgfPTWikipediaII},%
+csMNM/.style={back color scheme=pgfPTMNM},%
+csPS/.style={back color scheme=pgfPTPS},%
+csRadio/.style={back color scheme=pgfPTRadio},%
+csBlocks/.style={back color scheme=pgfPTBlocks},%
csSolid/.style={back color scheme=solid,back color=#1}%
-}% STYLES -> csSoft,csJmol,csCPK,csRasmol,csRasmolNew,csWikipedia,csMNM,csPS,csRadio,csBlocks,csSolid
+}% STYLES -> csSoft,csJmol,csCPK,csRasmol,csRasmolNew,csWikipediaI,csWikipediaII,csWikipedia,csMNM,csPS,csRadio,csBlocks,csSolid
% setting keys with default values ---------------------------------------------------------------
\pgfkeys{/pgfPerTable/.cd,back color scheme,back color}%
% end !! PGF keys: the cells of the periodic table to be drawn ----------------------------------
@@ -59,7 +64,7 @@ csSolid/.style={back color scheme=solid,back color=#1}%
\def\pgfPTcolorSchemeInfo{%
\global\pgfPT@dima=0pt\relax%
\foreach \Z in {1,...,118}{\path (-\pgfPTcellwd,-10pt*\Z) rectangle node[midway,font=\tiny\bfseries] {Z=\Z} ++(\pgfPTcellwd,-10pt);}%
-\foreach \cs in {default,Soft,Jmol,CPK,Rasmol,RasmolNew,Wikipedia,MNM,PS,Radio,Blocks}{%
+\foreach \cs in {pgfPTdefault,pgfPTSoft,pgfPTJmol,pgfPTCPK,pgfPTRasmol,pgfPTRasmolNew,pgfPTWikipedia,pgfPTWikipediaI,pgfPTWikipediaII,pgfPTMNM,pgfPTPS,pgfPTRadio,pgfPTBlocks}{%
\node[below right,text width=\pgfPTcellwd,text centered,font=\tiny,inner xsep=0pt] at (\pgfPT@dima,0pt) {\cs};%
\path (\pgfPTcellwd+\pgfPT@dima,0pt) rectangle node[midway,font=\tiny\bfseries] {(r,g,b)} ++(2*\pgfPTcellwd,-10pt);%
\edef\pgfPT@@colorlist{\csname pgfPT@backColorsScheme@\cs\endcsname}%
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgfPT.buildcell.tex b/graphics/pgf/contrib/pgf-periodictable/pgfPT.buildcell.tex
index a9a3699c36..7684834830 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgfPT.buildcell.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/pgfPT.buildcell.tex
@@ -38,7 +38,9 @@
\newif\ifpgfPT@dot\pgfPT@dotfalse%
\newif\ifpgfPT@unnamedcell\pgfPT@unnamedcelltrue%
\newdimen\pgfPT@cell@collumnwd\pgfPT@cell@collumnwd=0pt%
+\newdimen\pgfPT@cell@collumnwd@unnamedcell\pgfPT@cell@collumnwd@unnamedcell=0pt%
\newdimen\pgfPT@cell@lineht\pgfPT@cell@lineht=0pt%
+\newdimen\pgfPT@cell@lineht@unnamedcell\pgfPT@cell@lineht@unnamedcell=0pt%
\newdimen\pgfPT@tmpx\pgfPT@tmpx=0pt%
\newdimen\pgfPT@tmpy\pgfPT@tmpy=0pt%
\newdimen\pgfPT@tmpwd\pgfPT@tmpwd=0pt%
@@ -47,10 +49,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\pgfPTbuildcellstyle#1(#2,#3)[#4]{\pgfPT@unnamedcellfalse\relax%
\pgfPTbuildcell(#2,#3)[#4]%
-\expandafter\edef\csname pgfPT@cellcontents@#1\endcsname{\pgfPT@cellcontents}%
-\expandafter\edef\csname ppfPT@thebuildcellcom@#1\endcsname{\textbackslash pgfPTbuildcell(\detokenize{#2},\detokenize{#3})\%\par[\detokenize{#4}]}%
-\expandafter\edef\csname pgfPT@nlinhas@#1\endcsname{#2}%
-\expandafter\edef\csname pgfPT@ncolunas@#1\endcsname{#3}%
+\expandafter\xdef\csname pgfPT@cellcontents@#1\endcsname{\pgfPT@cellcontents}%
+\expandafter\xdef\csname ppfPT@thebuildcellcom@#1\endcsname{\textbackslash pgfPTbuildcell(\detokenize{#2},\detokenize{#3})\%\par[\detokenize{#4}]}%
+\expandafter\xdef\csname pgfPT@nlinhas@#1\endcsname{#2}%
+\expandafter\xdef\csname pgfPT@ncolunas@#1\endcsname{#3}%
\pgfPT@unnamedcelltrue\relax%
}%
\def\pgfPT@builtincellstyle#1(#2,#3)[#4]{\pgfPT@unnamedcellfalse\relax%
@@ -66,7 +68,8 @@
% \pgfPTbuildcell(<lines>,<columns>)[<entries>]
%
\def\pgfPTbuildcell(#1,#2)[#3]{%
-\ifpgfPT@unnamedcell\gdef\ppfPT@thebuildcellcom{\textbackslash pgfPTbuildcell(\detokenize{#1},\detokenize{#2})\%\par[\detokenize{#3}]}\fi%
+\ifpgfPT@unnamedcell\gdef\pgfPT@numlinhas@unnamedcell{#1}\gdef\pgfPT@numcolunas@unnamedcell{#2}%
+\gdef\ppfPT@thebuildcellcom{\textbackslash pgfPTbuildcell(\detokenize{#1},\detokenize{#2})\%\par[\detokenize{#3}]}\fi%
\gdef\pgfPT@numlinhas{#1}\gdef\pgfPT@numcolunas{#2}%
\pgfPT@cellcontentssize=0%
\xdef\pgfPT@cellcontents{}% vanishes list contents
@@ -74,6 +77,10 @@
\pgfmathsetlength{\pgfPT@cell@lineht}{\pgfPTcellht/#1}%
\global\pgfPT@cell@lineht=\pgfPT@cell@lineht%
\global\pgfPT@cell@collumnwd=\pgfPT@cell@collumnwd%
+\ifpgfPT@unnamedcell%
+\global\pgfPT@cell@lineht@unnamedcell=\pgfPT@cell@lineht%
+\global\pgfPT@cell@collumnwd@unnamedcell=\pgfPT@cell@collumnwd%
+\fi%
\expandafter\pgfPTg@bblespaces#3\relax%
\@for\@tmp:=\pgfPT@listn@spaces\do{\expandafter\pgfPT@buildcellcontents\@tmp\relax}%
\ifpgfPT@unnamedcell\global\let\pgfPT@cellcontents@unnamed\pgfPT@cellcontents\relax\fi%
@@ -186,7 +193,7 @@
\@for\pgfPT@tmp:=\pgfPT@builtincells@names\do{\edef\pgfPT@tempb{\pgfPT@tmp}\ifx\pgfPT@tempa\pgfPT@tempb\relax\def\pgfPT@builtin{1}\fi}%
\ifnum\pgfPT@builtin=1\relax\textit{Built-in style}\else\textit{User style}\fi\ \textbf{#2}\relax%
\if\pgfPT@preview@cellcontents\@empty\relax%
-\textit{ doesn't exist!}%
+\textit{ doesn't exist!} (\pgfPT@preview@cellcontents)%
\else%
\edef\pgfPT@numlinhas{\csname pgfPT@nlinhas@#2\endcsname}%
\edef\pgfPT@numcolunas{\csname pgfPT@ncolunas@#2\endcsname}%
@@ -204,6 +211,8 @@
\\ [2pt]The build command:\\ \textcolor{green!70!black}{\footnotesize\ppfPT@thebuildcellcom}\\ %
\else\textbf{Using the last cell built}%
\edef\pgfPT@preview@cellcontents{\csname pgfPT@cellcontents@unnamed\endcsname}%
+\let\pgfPT@numlinhas\pgfPT@numlinhas@unnamedcell\let\pgfPT@numcolunas\pgfPT@numcolunas@unnamedcell%
+\let\pgfPT@cell@lineht\pgfPT@cell@lineht@unnamedcell\let\pgfPT@cell@collumnwd\pgfPT@cell@collumnwd@unnamedcell%
\\ [2pt]The build command:\\ \textcolor{green!70!black}{\footnotesize\ppfPT@thebuildcellcom}\\ %
\fi\fi%
\makebox[\linewidth][c]{%
@@ -354,7 +363,7 @@ at (-.5*\pgfPT@cell@collumnwd+\pgfPT@cell@collumnwd*\coluna,\pgfPT@cell@lineht)
% wd -> \pgfPT@<what>@wd
% ht -> \pgfPT@<what>@ht
% and turning the if<what> to true
-% what -> \@pgfPT@<what>rtue
+% what -> \@pgfPT@<what>true
\ifdim\pgfPTcellwd=34pt\relax%
\xdef\pgfPT@loadcell@scaleX{1}%
\else%
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgfPT.colorSchemes.info.pdf b/graphics/pgf/contrib/pgf-periodictable/pgfPT.colorSchemes.info.pdf
index a621b09057..68481a1175 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgfPT.colorSchemes.info.pdf
+++ b/graphics/pgf/contrib/pgf-periodictable/pgfPT.colorSchemes.info.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgfPT.data.tex b/graphics/pgf/contrib/pgf-periodictable/pgfPT.data.tex
index 62d62e0f89..b04a4ba5a7 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgfPT.data.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/pgfPT.data.tex
@@ -38,7 +38,8 @@
% spectra: visible range spectral lines
% cor: Physical state color
% --------------------------------------------------------------------------------------------------
-\def\pgfPT@virgula{,\noexpand\hspace{.2ex}}%
+%\def\pgfPT@virgula{,\noexpand\hspace{.2ex}}%
+\def\pgfPT@virgula{,{\hskip.2ex}}% changed in v2.1.5 (to \pgfPT@formatArstar work...)
\def\pgfPT@virgtxt{,\ }%
\def\pgfPT@espaco{\noexpand\hspace{.2ex}}%
\edef\pgfPT@BClabel{\csname pgfPT@labels@BC@\pgfPT@defaultLanguage\endcsname}\relax%
@@ -142,122 +143,122 @@
}%
% ############################ THE DATA #############################
%
-\def\pgfPT@data@i{H/CS,1.008/Ar,[1.0078\noexpand\pgfPT@virgula1.0082]/Arstar,0/radio,53/R,32/Rcov,139.9\noexpand\pgfPT@espaco(1-)/Rion,1312/Ei,2.2/eneg,72.77/eaff,\noexpand\pgfPT@pm1/O,13.99/Tmelt,-259.16/TmeltC,20.271/Tboil,-252.879/TboilC,1/eDist,::1s+1/eConfign,::1s+1/eConfignl,0.08988/d,28.836/Cp,0.1805/kT,hex/ls,470/lsa,470/lsb,340/lsc,0.72/lsca,1766/DiscY,21/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@ii{He/CS,4.0026/Ar,4.0026/Arstar,0/radio,31/R,46/Rcov,---/Rion,2372.3/Ei,---/eneg,0/eaff,---/O,---/Tmelt,---/TmeltC,4.222/Tboil,-268.928/TboilC,2/eDist,::1s+2/eConfign,::1s+2/eConfignl,0.1786/d,20.786/Cp,0.1513/kT,fcc/ls,424.4/lsa,/lsb,/lsc,/lsca,1895/DiscY,19/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@iii{Li/CS,6.94/Ar,[6.938\noexpand\pgfPT@virgula6.997] /Arstar,0/radio,167/R,133/Rcov,76\noexpand\pgfPT@espaco(1+)/Rion,520.2/Ei,0.98/eneg,59.63/eaff,+1/O,453.65/Tmelt,180.5/TmeltC,1603/Tboil,1330/TboilC,2\noexpand\pgfPTeDistsep1/eDist,[He]::2s+1/eConfign,[He]::2s+1/eConfignl,534/d,24.86/Cp,84.8/kT,bcc/ls,350.93/lsa,/lsb,/lsc,/lsca,1817/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@iv{Be/CS,9.0122/Ar,9.0122/Arstar,0/radio,112/R,10/Rcov,45\noexpand\pgfPT@espaco(2+)/Rion,899.5/Ei,1.57/eneg,0/eaff,+2/O,1560/Tmelt,1287/TmeltC,2742/Tboil,2469/TboilC,2\noexpand\pgfPTeDistsep2/eDist,[He]::2s+2/eConfign,[He]::2s+2/eConfignl,1850/d,16.443/Cp,200/kT,hcp/ls,228.56/lsa,/lsb,358.32/lsc,1.57/lsca,1798/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@v{B/CS,10.81/Ar,[10.806\noexpand\pgfPT@virgula10.821] /Arstar,0/radio,87/R,85/Rcov,27\noexpand\pgfPT@espaco(3+)/Rion,800.6/Ei,2.04/eneg,26.99/eaff,+3/O,2349/Tmelt,2076/TmeltC,4200/Tboil,3927/TboilC,2\noexpand\pgfPTeDistsep3/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+1/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+1/eConfignl,2340/d,11.087/Cp,27.4/kT,rho/ls,505.66/lsa,/lsb,/lsc,/lsca,1808/DiscY,7/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@vi{C/CS,12.011/Ar,[12.009\noexpand\pgfPT@virgula12.012]/Arstar,0/radio,67/R,75/Rcov,16\noexpand\pgfPT@espaco(4+)/Rion,1086.5/Ei,2.55/eneg,121.78/eaff,0\noexpand\pgfPT@virgula\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula\noexpand\pgfPT@pm4/O,3823/Tmelt,3550/TmeltC,4300/Tboil,4027/TboilC,2\noexpand\pgfPTeDistsep4/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+2/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+2/eConfignl,2267/d,8.517/Cp,140/kT,hex/ls,246.12/lsa,/lsb,670.79/lsc,2.73/lsca,3750\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,12/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@vii{N/CS,14.007/Ar,[14.006\noexpand\pgfPT@virgula14.008]/Arstar,0/radio,56/R,71/Rcov,146\noexpand\pgfPT@espaco(3-)\noexpand\pgfPT@virgula16\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula13\noexpand\pgfPT@espaco(5+)/Rion,1402.3/Ei,3.04/eneg,0/eaff,\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+5/O,63.15/Tmelt,-210/TmeltC,77.355/Tboil,-195.795/TboilC,2\noexpand\pgfPTeDistsep5/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+3/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+3/eConfignl,1.251/d,29.124/Cp,0.02583/kT,hex/ls,386.1/lsa,386.1/lsb,626.5/lsc,1.62/lsca,1772/DiscY,21/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@viii{O/CS,15.999/Ar,[15.999\noexpand\pgfPT@virgula16.000]/Arstar,0/radio,48/R,63/Rcov,140\noexpand\pgfPT@espaco(2-)/Rion,1313.9/Ei,3.44/eneg,140.98/eaff,--2/O,54.36/Tmelt,-218.79/TmeltC,90.188/Tboil,-182.962/TboilC,2\noexpand\pgfPTeDistsep6/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+4/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+4/eConfignl,1.429/d,29.378/Cp,0.02658/kT,mono/ls,540.3/lsa,342.9/lsb,508.6/lsc,0.94/lsca,1771/DiscY,19/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@ix{F/CS,18.998/Ar,18.998/Arstar,0/radio,42/R,64/Rcov,133\noexpand\pgfPT@espaco(1-)/Rion,1681/Ei,3.98/eneg,328.16/eaff,--1/O,53.48/Tmelt,-219.67/TmeltC,85.04/Tboil,-188.11/TboilC,2\noexpand\pgfPTeDistsep7/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+5/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+5/eConfignl,1.7/d,31.304/Cp,0.0277/kT,mono/ls,550/lsa,328/lsb,728/lsc,1.32/lsca,1886/DiscY,5/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@x{Ne/CS,20.18/Ar,20.18/Arstar,0/radio,38/R,67/Rcov,---/Rion,2080.7/Ei,---/eneg,0/eaff,---/O,24.56/Tmelt,-248.59/TmeltC,27.104/Tboil,-246.046/TboilC,2\noexpand\pgfPTeDistsep8/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+6/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+6/eConfignl,0.9002/d,20.786/Cp,0.0491/kT,fcc/ls,442.9/lsa,/lsb,/lsc,/lsca,1898/DiscY,21/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@xi{Na/CS,22.99/Ar,22.99/Arstar,0/radio,190/R,155/Rcov,102\noexpand\pgfPT@espaco(1+)/Rion,495.8/Ei,0.93/eneg,52.87/eaff,+1/O,370.944/Tmelt,97.794/TmeltC,1156.09/Tboil,882.94/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Ne]::3s+1/eConfign,[Ne]::3s+1/eConfignl,968/d,28.23/Cp,142/kT,bcc/ls,429.06/lsa,/lsb,/lsc,/lsca,1807/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xii{Mg/CS,24.305/Ar,[24.304\noexpand\pgfPT@virgula24.307] /Arstar,0/radio,145/R,139/Rcov,72\noexpand\pgfPT@espaco(2+)/Rion,737.7/Ei,1.31/eneg,0/eaff,+2/O,923/Tmelt,650/TmeltC,1363/Tboil,1090/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Ne]::3s+2/eConfign,[Ne]::3s+2/eConfignl,1738/d,24.869/Cp,156/kT,hcp/ls,320.94/lsa,/lsb,521.05/lsc,1.62/lsca,1755/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xiii{Al/CS,26.982/Ar,26.982/Arstar,0/radio,118/R,126/Rcov,53.5\noexpand\pgfPT@espaco(3+)/Rion,577.5/Ei,1.61/eneg,41.76/eaff,+3/O,933.47/Tmelt,660.32/TmeltC,2743/Tboil,2470/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep3/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+1/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+1/eConfignl,2700/d,24.2/Cp,237/kT,fcc/ls,404.95/lsa,/lsb,/lsc,/lsca,1824/DiscY,2/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xiv{Si/CS,28.085/Ar,[28.084\noexpand\pgfPT@virgula28.086]/Arstar,0/radio,111/R,116/Rcov,40\noexpand\pgfPT@espaco(4+)/Rion,786.5/Ei,1.9/eneg,134.07/eaff,\noexpand\pgfPT@pm4/O,1687/Tmelt,1414/TmeltC,3538/Tboil,3265/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep4/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+2/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+2/eConfignl,2330/d,19.789/Cp,149/kT,dia/ls,543.095/lsa,/lsb,/lsc,/lsca,1823/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xv{P/CS,30.974/Ar,30.974/Arstar,0/radio,98/R,111/Rcov,212\noexpand\pgfPT@espaco(3-)\noexpand\pgfPT@virgula44\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula38\noexpand\pgfPT@espaco(5+)/Rion,1011.8/Ei,2.19/eneg,72.04/eaff,\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula+5/O,317.3/Tmelt,44.15/TmeltC,550/Tboil,277/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep5/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+3/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+3/eConfignl,1823/d,23.824/Cp,0.236/kT,tric/ls,1145/lsa,550.3/lsb,1126.1/lsc,0.98/lsca,1669/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xvi{S/CS,32.06/Ar,[32.059\noexpand\pgfPT@virgula32.076]/Arstar,0/radio,88/R,103/Rcov,184\noexpand\pgfPT@espaco(2-)\noexpand\pgfPT@virgula37\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula29\noexpand\pgfPT@espaco(6+)/Rion,999.6/Ei,2.58/eneg,200.41/eaff,\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+6/O,388.36/Tmelt,115.21/TmeltC,717.8/Tboil,444.6/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep6/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+4/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+4/eConfignl,1960/d,22.75/Cp,0.205/kT,fcort/ls,1046.5/lsa,1286.6/lsb,2448.6/lsc,2.34/lsca,500\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,12/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xvii{Cl/CS,35.45/Ar,[35.446\noexpand\pgfPT@virgula35.457]/Arstar,0/radio,79/R,99/Rcov,181\noexpand\pgfPT@espaco(1-)\noexpand\pgfPT@virgula12\noexpand\pgfPT@espaco(5+)\noexpand\pgfPT@virgula27\noexpand\pgfPT@espaco(7+)/Rion,1251.2/Ei,3.16/eneg,348.58/eaff,\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+5\noexpand\pgfPT@virgula+7/O,171.6/Tmelt,-101.5/TmeltC,239.11/Tboil,-34.04/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep7/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+5/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+5/eConfignl,3.2/d,33.949/Cp,0.0089/kT,bcort/ls,622.35/lsa,445.61/lsb,817.85/lsc,1.31/lsca,1774/DiscY,18/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@xviii{Ar/CS,39.95/Ar,[39.792\noexpand\pgfPT@virgula39.963]/Arstar,0/radio,71/R,96/Rcov,---/Rion,1520.6/Ei,---/eneg,0/eaff,0/O,83.81/Tmelt,-189.34/TmeltC,87.302/Tboil,-185.848/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep8/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+6/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+6/eConfignl,1.784/d,20.786/Cp,0.01772/kT,fcc/ls,525.6/lsa,/lsb,/lsc,/lsca,1894/DiscY,21/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@xix{K/CS,39.098/Ar,39.098/Arstar,0/radio,243/R,196/Rcov,138\noexpand\pgfPT@espaco(1+)/Rion,418.8/Ei,0.82/eneg,48.38/eaff,+1/O,336.7/Tmelt,63.5/TmeltC,1032/Tboil,759/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Ar]::4s+1/eConfign,[Ar]::4s+1/eConfignl,890/d,29.6/Cp,102.5/kT,bcc/ls,532.8/lsa,/lsb,/lsc,/lsca,1807/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xx{Ca/CS,40.078/Ar,40.078(4) /Arstar,0/radio,194/R,171/Rcov,100\noexpand\pgfPT@espaco(2+)/Rion,589.8/Ei,1/eneg,2.37/eaff,+2/O,1115/Tmelt,842/TmeltC,1757/Tboil,1484/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Ar]::4s+2/eConfign,[Ar]::4s+2/eConfignl,1550/d,25.929/Cp,201/kT,fcc/ls,558.84/lsa,/lsb,/lsc,/lsca,1808/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxi{Sc/CS,44.956/Ar,44.956/Arstar,0/radio,184/R,148/Rcov,74.5\noexpand\pgfPT@espaco(3+)/Rion,633.1/Ei,1.36/eneg,18/eaff,+3/O,1814/Tmelt,1541/TmeltC,3109/Tboil,2836/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+1\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+1/eConfignl,2985/d,25.52/Cp,15.8/kT,hcp/ls,330.9/lsa,/lsb,527.33/lsc,1.59/lsca,1879/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxii{Ti/CS,47.867/Ar,47.867/Arstar,0/radio,176/R,136/Rcov,86\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula67\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula60.5\noexpand\pgfPT@espaco(4+)/Rion,658.8/Ei,1.54/eneg,7.29/eaff,+2\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+4/O,1941/Tmelt,1668/TmeltC,3560/Tboil,3287/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+2\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+2/eConfignl,4506/d,25.06/Cp,21.9/kT,hcp/ls,295.03/lsa,/lsb,468.31/lsc,1.59/lsca,1791/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxiii{V/CS,50.942/Ar,50.942/Arstar,0/radio,171/R,134/Rcov,79\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula64\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula58\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula54\noexpand\pgfPT@espaco(5+)/Rion,650.9/Ei,1.63/eneg,50.91/eaff,+2\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+5/O,2183/Tmelt,1910/TmeltC,3680/Tboil,3407/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep11\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+3\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+3/eConfignl,6110/d,24.89/Cp,30.7/kT,bcc/ls,302.31/lsa,/lsb,/lsc,/lsca,1830/DiscY,23/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxiv{Cr/CS,51.996/Ar,51.996/Arstar,0/radio,166/R,122/Rcov,73\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula61.5\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula44\noexpand\pgfPT@espaco(6+)/Rion,652.9/Ei,1.66/eneg,65.21/eaff,+2\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+6/O,2180/Tmelt,1907/TmeltC,2755/Tboil,2482/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep1/eDist,[Ar]::3d+5\noexpand\pgfPT@virgula4s+1/eConfign,[Ar]::4s+1\noexpand\pgfPT@virgula3d+5/eConfignl,7150/d,23.35/Cp,93.9/kT,bcc/ls,288.46/lsa,/lsb,/lsc,/lsca,1797/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxv{Mn/CS,54.938/Ar,54.938/Arstar,0/radio,161/R,119/Rcov,67\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula58\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula53\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula25.5\noexpand\pgfPT@espaco(6+)\noexpand\pgfPT@virgula46\noexpand\pgfPT@espaco(7+)/Rion,717.3/Ei,1.55/eneg,0/eaff,+2\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+6\noexpand\pgfPT@virgula+7/O,1519/Tmelt,1246/TmeltC,2334/Tboil,2061/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+5\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+5/eConfignl,7210/d,26.32/Cp,7.81/kT,bcc/ls,891.39/lsa,/lsb,/lsc,/lsca,1774/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxvi{Fe/CS,55.845/Ar,55.845(2)/Arstar,0/radio,156/R,116/Rcov,61\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula55\noexpand\pgfPT@espaco(3+)/Rion,762.5/Ei,1.83/eneg,14.79/eaff,+2\noexpand\pgfPT@virgula+3/O,1811/Tmelt,1538/TmeltC,3134/Tboil,2861/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep14\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+6\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+6/eConfignl,7860/d,25.1/Cp,80.4/kT,bcc/ls,286.64/lsa,/lsb,/lsc,/lsca,2000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,3/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxvii{Co/CS,58.933/Ar,58.933/Arstar,0/radio,152/R,111/Rcov,65\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula54.5\noexpand\pgfPT@espaco(3+)/Rion,760.4/Ei,1.88/eneg,63.9/eaff,+2\noexpand\pgfPT@virgula+3/O,1768/Tmelt,1495/TmeltC,3200/Tboil,2927/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep15\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+7\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+7/eConfignl,8900/d,24.81/Cp,100/kT,hcp/ls,250.71/lsa,/lsb,406.95/lsc,1.62/lsca,1735/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxviii{Ni/CS,58.693/Ar,58.693/Arstar,0/radio,149/R,110/Rcov,69\noexpand\pgfPT@espaco(2+)/Rion,737.1/Ei,1.91/eneg,111.65/eaff,+2/O,1728/Tmelt,1455/TmeltC,3003/Tboil,2730/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep16\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+8\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+8/eConfignl,8908/d,26.07/Cp,90.9/kT,fcc/ls,352.4/lsa,/lsb,/lsc,/lsca,1751/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxix{Cu/CS,63.546/Ar,63.546(3)/Arstar,0/radio,145/R,112/Rcov,77\noexpand\pgfPT@espaco(1+)\noexpand\pgfPT@virgula73\noexpand\pgfPT@espaco(2+)/Rion,745.5/Ei,1.9/eneg,119.24/eaff,+1\noexpand\pgfPT@virgula+2/O,1357.77/Tmelt,1084.62/TmeltC,2835/Tboil,2562/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep1/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+1/eConfign,[Ar]::4s+1\noexpand\pgfPT@virgula3d+10/eConfignl,8960/d,24.44/Cp,401/kT,fcc/ls,361.47/lsa,/lsb,/lsc,/lsca,8000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,12/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxx{Zn/CS,65.38/Ar,65.38(2)/Arstar,0/radio,142/R,118/Rcov,74\noexpand\pgfPT@espaco(2+)/Rion,906.4/Ei,1.65/eneg,0/eaff,+2/O,692.68/Tmelt,419.53/TmeltC,1180/Tboil,907/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10/eConfignl,7140/d,25.39/Cp,116/kT,hcp/ls,266.49/lsa,/lsb,494.68/lsc,1.86/lsca,1746/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxxi{Ga/CS,69.723/Ar,69.723/Arstar,0/radio,136/R,124/Rcov,62\noexpand\pgfPT@espaco(3+)/Rion,578.8/Ei,1.81/eneg,29.06/eaff,+3/O,302.9146/Tmelt,29.7646/TmeltC,2673/Tboil,2400/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep3/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+1/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+1/eConfignl,5910/d,25.86/Cp,40.6/kT,bcort/ls,452.58/lsa,451.86/lsb,765.7/lsc,1.69/lsca,1875/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxxii{Ge/CS,72.63/Ar,72.630(8)/Arstar,0/radio,125/R,121/Rcov,73\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula53\noexpand\pgfPT@espaco(4+)/Rion,762/Ei,2.01/eneg,118.94/eaff,+2\noexpand\pgfPT@virgula\noexpand\pgfPT@pm4/O,1211.4/Tmelt,938.25/TmeltC,3106/Tboil,2833/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep4/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+2/eConfignl,5323/d,23.222/Cp,60.2/kT,dia/ls,565.791/lsa,/lsb,/lsc,/lsca,1886/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxxiii{As/CS,74.922/Ar,74.922/Arstar,0/radio,114/R,121/Rcov,58\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula46\noexpand\pgfPT@espaco(5+)/Rion,947/Ei,2.18/eneg,77.65/eaff,\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula+5/O,1090/Tmelt,817/TmeltC,887/Tboil,614/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep5/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+3/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+3/eConfignl,5727/d,24.64/Cp,50.2/kT,rho/ls,375.98/lsa,375.98/lsb,1054.75/lsc,2.81/lsca,1250/DiscY,12/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxxiv{Se/CS,78.971/Ar,78.971(8)/Arstar,0/radio,103/R,116/Rcov,198\noexpand\pgfPT@espaco(2-)\noexpand\pgfPT@virgula50\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula42\noexpand\pgfPT@espaco(6+)/Rion,941/Ei,2.55/eneg,194.96/eaff,\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+6/O,494/Tmelt,221/TmeltC,958/Tboil,685/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep6/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+4/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+4/eConfignl,4810/d,25.363/Cp,0.519/kT,mono/ls,905.4/lsa,908.3/lsb,1160.1/lsc,1.28/lsca,1817/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxxv{Br/CS,79.904/Ar,[79.901\noexpand\pgfPT@virgula79.907]/Arstar,0/radio,94/R,114/Rcov,196\noexpand\pgfPT@espaco(1-)\noexpand\pgfPT@virgula59\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula31\noexpand\pgfPT@espaco(5+)/Rion,1139.9/Ei,2.96/eneg,324.54/eaff,\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+5/O,265.8/Tmelt,-7.3/TmeltC,332/Tboil,58.8/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep7/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+5/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+5/eConfignl,3102.8/d,75.69/Cp,0.122/kT,bcort/ls,672.65/lsa,464.51/lsb,870.23/lsc,1.29/lsca,1825/DiscY,5/DiscC,1/spectra,liquido/cor}%
-\def\pgfPT@data@xxxvi{Kr/CS,83.798/Ar,83.798(2)/Arstar,0/radio,88/R,117/Rcov,---/Rion,1350.8/Ei,3/eneg,0/eaff,0/O,115.78/Tmelt,-157.37/TmeltC,119.735/Tboil,-153.415/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+6/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+6/eConfignl,3.749/d,20.786/Cp,0.00943/kT,fcc/ls,570.6/lsa,/lsb,/lsc,/lsca,1898/DiscY,21/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@xxxvii{Rb/CS,85.468/Ar,85.468/Arstar,0/radio,265/R,210/Rcov,152\noexpand\pgfPT@espaco(1+)/Rion,403/Ei,0.82/eneg,46.88/eaff,+1/O,312.45/Tmelt,39.3/TmeltC,961/Tboil,688/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Kr]::5s+1/eConfign,[Kr]::5s+1/eConfignl,1532/d,31.06/Cp,58.2/kT,bcc/ls,558.5/lsa,/lsb,/lsc,/lsca,1861/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxxviii{Sr/CS,87.62/Ar,87.62/Arstar,0/radio,219/R,185/Rcov,118\noexpand\pgfPT@espaco(2+)/Rion,549.5/Ei,0.95/eneg,5.02/eaff,+2/O,1050/Tmelt,777/TmeltC,1650/Tboil,1382/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Kr]::5s+2/eConfign,[Kr]::5s+2/eConfignl,2640/d,26.4/Cp,35.4/kT,fcc/ls,608.49/lsa,/lsb,/lsc,/lsca,1787/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xxxix{Y/CS,88.906/Ar,88.906/Arstar,0/radio,212/R,163/Rcov,90\noexpand\pgfPT@espaco(3+)/Rion,600/Ei,1.22/eneg,29.6/eaff,+3/O,1799/Tmelt,1526/TmeltC,3203/Tboil,2930/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Kr]::4d+1\noexpand\pgfPT@virgula5s+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+1/eConfignl,4472/d,26.53/Cp,17.2/kT,hcp/ls,364.74/lsa,/lsb,573.06/lsc,1.57/lsca,1794/DiscY,4/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xl{Zr/CS,91.224/Ar,91.224(2)/Arstar,0/radio,206/R,154/Rcov,72\noexpand\pgfPT@espaco(4+)/Rion,640.1/Ei,1.33/eneg,41.81/eaff,+4/O,2128/Tmelt,1855/TmeltC,4650/Tboil,4377/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Kr]::4d+2\noexpand\pgfPT@virgula5s+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+2/eConfignl,6520/d,25.36/Cp,22.6/kT,hcp/ls,323.2/lsa,/lsb,514.7/lsc,1.59/lsca,1789/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xli{Nb/CS,92.906/Ar,92.906/Arstar,0/radio,198/R,147/Rcov,64\noexpand\pgfPT@espaco(5+)/Rion,652.1/Ei,1.6/eneg,88.52/eaff,+5/O,2750/Tmelt,2477/TmeltC,5017/Tboil,4744/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep12\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+4\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+4/eConfignl,8570/d,24.6/Cp,53.7/kT,bcc/ls,330.04/lsa,/lsb,/lsc,/lsca,1801/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xlii{Mo/CS,95.95/Ar,95.95/Arstar,0/radio,190/R,138/Rcov,65\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula59\noexpand\pgfPT@espaco(6+)/Rion,684.3/Ei,2.16/eneg,72.1/eaff,+4\noexpand\pgfPT@virgula+6/O,2896/Tmelt,2623/TmeltC,4912/Tboil,4639/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+5\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+5/eConfignl,10280/d,24.06/Cp,138/kT,bcc/ls,314.69/lsa,/lsb,/lsc,/lsca,1781/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xliii{Tc/CS,[98]/Ar,/Arstar,1/radio,183/R,128/Rcov,64.5\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula56\noexpand\pgfPT@espaco(7+)/Rion,702/Ei,1.9/eneg,53/eaff,+4\noexpand\pgfPT@virgula+7/O,2430/Tmelt,2157/TmeltC,4538/Tboil,4265/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep2/eDist,[Kr]::4d+5\noexpand\pgfPT@virgula5s+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+5/eConfignl,11000/d,24.27/Cp,50.6/kT,hcp/ls,273.5/lsa,/lsb,438.8/lsc,1.6/lsca,1937/DiscY,11/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@xliv{Ru/CS,101.07/Ar,101.07/Arstar,0/radio,178/R,125/Rcov,68\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula62\noexpand\pgfPT@espaco(4+)/Rion,710.2/Ei,2.2/eneg,100.96/eaff,+3\noexpand\pgfPT@virgula+4/O,2607/Tmelt,2334/TmeltC,4423/Tboil,4150/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep15\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+7\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+7/eConfignl,12450/d,24.06/Cp,117/kT,hcp/ls,270.55/lsa,/lsb,428.16/lsc,1.58/lsca,1844/DiscY,15/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xlv{Rh/CS,102.91/Ar,102.91/Arstar,0/radio,173/R,125/Rcov,66.5\noexpand\pgfPT@espaco(3+)/Rion,719.7/Ei,2.28/eneg,110.27/eaff,+3/O,2237/Tmelt,1964/TmeltC,3968/Tboil,3695/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep16\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+8\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+8/eConfignl,12410/d,24.98/Cp,150/kT,fcc/ls,380.34/lsa,/lsb,/lsc,/lsca,1804/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xlvi{Pd/CS,106.42/Ar,106.42/Arstar,0/radio,169/R,120/Rcov,86\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula61.5\noexpand\pgfPT@espaco(4+)/Rion,804.4/Ei,2.2/eneg,54.24/eaff,0\noexpand\pgfPT@virgula+2\noexpand\pgfPT@virgula+4/O,1828.05/Tmelt,1554.9/TmeltC,3236/Tboil,2963/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18/eDist,[Kr]::4d+10/eConfign,[Kr]::4d+10/eConfignl,12023/d,25.98/Cp,71.8/kT,fcc/ls,389.02/lsa,/lsb,/lsc,/lsca,1802/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xlvii{Ag/CS,107.87/Ar,107.87/Arstar,0/radio,165/R,128/Rcov,115\noexpand\pgfPT@espaco(1+)/Rion,731/Ei,1.93/eneg,125.86/eaff,+1/O,1234.93/Tmelt,961.78/TmeltC,2483/Tboil,2210/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+10/eConfignl,10490/d,25.35/Cp,429/kT,fcc/ls,408.57/lsa,/lsb,/lsc,/lsca,3000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,0/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xlviii{Cd/CS,112.41/Ar,112.41/Arstar,0/radio,161/R,136/Rcov,95\noexpand\pgfPT@espaco(2+)/Rion,867.8/Ei,1.69/eneg,0/eaff,+2/O,594.22/Tmelt,321.07/TmeltC,1040/Tboil,767/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep2/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10/eConfignl,8650/d,26.02/Cp,96.6/kT,hcp/ls,297.88/lsa,/lsb,561.67/lsc,1.89/lsca,1817/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xlix{In/CS,114.82/Ar,114.82/Arstar,0/radio,156/R,142/Rcov,80\noexpand\pgfPT@espaco(3+)/Rion,558.3/Ei,1.78/eneg,37.04/eaff,+3/O,429.75/Tmelt,156.6/TmeltC,2345/Tboil,2072/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep3/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+1/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+1/eConfignl,7310/d,26.74/Cp,81.8/kT,tetr/ls,325.17/lsa,/lsb,494.59/lsc,1.52/lsca,1863/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@l{Sn/CS,118.71/Ar,118.71/Arstar,0/radio,145/R,140/Rcov,118\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula69\noexpand\pgfPT@espaco(4+)/Rion,708.6/Ei,1.96/eneg,107.3/eaff,+2\noexpand\pgfPT@virgula\noexpand\pgfPT@pm4/O,505.08/Tmelt,231.93/TmeltC,2875/Tboil,2602/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep4/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+2/eConfignl,7265/d,25.77/Cp,66.8/kT,ctetr/ls,583.1/lsa,/lsb,318.1/lsc,0.55/lsca,3000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,0/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@li{Sb/CS,121.76/Ar,121.76/Arstar,0/radio,133/R,140/Rcov,76\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula60\noexpand\pgfPT@espaco(5+)/Rion,834/Ei,2.05/eneg,101.06/eaff,\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula+5/O,903.78/Tmelt,630.63/TmeltC,1908/Tboil,1635/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep5/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+3/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+3/eConfignl,6697/d,25.23/Cp,24.4/kT,rho/ls,430.7/lsa,/lsb,1127.3/lsc,2.62/lsca,815/DiscY,12/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lii{Te/CS,127.6/Ar,127.60(3)/Arstar,0/radio,123/R,136/Rcov,221\noexpand\pgfPT@espaco(2-)\noexpand\pgfPT@virgula97\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula56\noexpand\pgfPT@espaco(6+)/Rion,869.3/Ei,2.1/eneg,190.16/eaff,\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+6/O,722.66/Tmelt,449.51/TmeltC,1261/Tboil,988/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep6/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+4/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+4/eConfignl,6240/d,25.73/Cp,3/kT,rho/ls,445.72/lsa,/lsb,592.9/lsc,1.33/lsca,1782/DiscY,14/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@liii{I/CS,126.9/Ar,126.9/Arstar,0/radio,115/R,133/Rcov,220\noexpand\pgfPT@espaco(1-)\noexpand\pgfPT@virgula95\noexpand\pgfPT@espaco(5+)\noexpand\pgfPT@virgula53\noexpand\pgfPT@espaco(7+)/Rion,1008.4/Ei,2.66/eneg,295.15/eaff,\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+5\noexpand\pgfPT@virgula+7/O,386.85/Tmelt,113.7/TmeltC,457.4/Tboil,184.3/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep7/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+5/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+5/eConfignl,4933/d,54.44/Cp,0.449/kT,bcort/ls,726.97/lsa,479.03/lsb,979.42/lsc,1.35/lsca,1811/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@liv{Xe/CS,131.29/Ar,131.29/Arstar,0/radio,108/R,131/Rcov,---/Rion,1170.4/Ei,2.6/eneg,0/eaff,0/O,161.4/Tmelt,-111.75/TmeltC,165.051/Tboil,-108.099/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+6/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+6/eConfignl,5.894/d,20.786/Cp,0.00565/kT,fcc/ls,620.23/lsa,/lsb,/lsc,/lsca,1898/DiscY,21/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@lv{Cs/CS,132.91/Ar,132.91/Arstar,0/radio,298/R,232/Rcov,167\noexpand\pgfPT@espaco(1+)/Rion,375.7/Ei,0.79/eneg,45.51/eaff,+1/O,301.7/Tmelt,28.5/TmeltC,944/Tboil,671/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Xe]::6s+1/eConfign,[Xe]::6s+1/eConfignl,1930/d,32.21/Cp,35.9/kT,bcc/ls,614.1/lsa,/lsb,/lsc,/lsca,1860/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lvi{Ba/CS,137.33/Ar,137.33/Arstar,0/radio,253/R,196/Rcov,135\noexpand\pgfPT@espaco(2+)/Rion,502.9/Ei,0.89/eneg,13.95/eaff,+2/O,1000/Tmelt,727/TmeltC,1910/Tboil,1637/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::6s+2/eConfign,[Xe]::6s+2/eConfignl,3510/d,28.07/Cp,18.4/kT,bcc/ls,501.9/lsa,/lsb,/lsc,/lsca,1808/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lvii{La/CS,138.91/Ar,138.91/Arstar,0/radio,226/R,180/Rcov,103.2\noexpand\pgfPT@espaco(3+)/Rion,538.1/Ei,1.1/eneg,53.8/eaff,+3/O,1193/Tmelt,920/TmeltC,3737/Tboil,3464/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Xe]::5d+1\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula5d+1/eConfignl,6162/d,27.11/Cp,13.4/kT,hex/ls,377.2/lsa,/lsb,1214.4/lsc,3.22/lsca,1838/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lviii{Ce/CS,140.12/Ar,140.12/Arstar,0/radio,210/R,163/Rcov,101\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula87\noexpand\pgfPT@espaco(4+)/Rion,534.4/Ei,1.12/eneg,55/eaff,+3\noexpand\pgfPT@virgula+4/O,1068/Tmelt,795/TmeltC,3716/Tboil,3443/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep19\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+1\noexpand\pgfPT@virgula5d+1\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+1\noexpand\pgfPT@virgula5d+1/eConfignl,6770/d,26.94/Cp,11.3/kT,hex/ls,362/lsa,/lsb,599/lsc,1.65/lsca,1803/DiscY,9/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lix{Pr/CS,140.91/Ar,140.91/Arstar,0/radio,247/R,17/Rcov,99\noexpand\pgfPT@espaco(3+)/Rion,527/Ei,1.13/eneg,10.54/eaff,+3/O,1208/Tmelt,935/TmeltC,3403/Tboil,3130/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep21\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+3\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+3/eConfignl,6770/d,27.2/Cp,12.5/kT,hex/ls,367.21/lsa,/lsb,1183.26/lsc,3.22/lsca,1885/DiscY,1/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lx{Nd/CS,144.24/Ar,144.24/Arstar,0/radio,206/R,17/Rcov,98.3\noexpand\pgfPT@espaco(3+)/Rion,533.1/Ei,1.14/eneg,9.41/eaff,+3/O,1297/Tmelt,1024/TmeltC,3347/Tboil,3074/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep22\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+4\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+4/eConfignl,7010/d,27.45/Cp,16.5/kT,hex/ls,365.82/lsa,/lsb,1179.66/lsc,3.22/lsca,1885/DiscY,1/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxi{Pm/CS,[145]/Ar,[145]/Arstar,1/radio,205/R,173/Rcov,97\noexpand\pgfPT@espaco(3+)/Rion,540/Ei,1.13/eneg,12.45/eaff,+3/O,1315/Tmelt,1042/TmeltC,3273/Tboil,3000/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep23\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+5\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+5/eConfignl,7260/d,---/Cp,17.9/kT,hex/ls,365/lsa,/lsb,1165/lsc,3.19/lsca,1945/DiscY,22/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@lxii{Sm/CS,150.36/Ar,150.36(2)/Arstar,0/radio,238/R,172/Rcov,95.8\noexpand\pgfPT@espaco(3+)/Rion,544.5/Ei,1.17/eneg,15.63/eaff,+3/O,1345/Tmelt,1072/TmeltC,2173/Tboil,1900/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep24\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+6\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+6/eConfignl,7520/d,29.54/Cp,13.3/kT,rho/ls,362.1/lsa,/lsb,2625/lsc,7.25/lsca,1879/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxiii{Eu/CS,151.96/Ar,151.96/Arstar,0/radio,231/R,168/Rcov,117\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula94.7\noexpand\pgfPT@espaco(3+)/Rion,547.1/Ei,1.2/eneg,11.2/eaff,+2\noexpand\pgfPT@virgula+3/O,1099/Tmelt,826/TmeltC,1802/Tboil,1529/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep25\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+7\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+7/eConfignl,5244/d,27.66/Cp,13.9/kT,bcc/ls,458.1/lsa,/lsb,/lsc,/lsca,1901/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxiv{Gd/CS,157.25/Ar,157.25(3)/Arstar,0/radio,233/R,169/Rcov,93.5\noexpand\pgfPT@espaco(3+)/Rion,593.4/Ei,1.2/eneg,13.22/eaff,+3/O,1585/Tmelt,1312/TmeltC,3273/Tboil,3000/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep25\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+7\noexpand\pgfPT@virgula5d+1\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+7\noexpand\pgfPT@virgula5d+1/eConfignl,7900/d,37.03/Cp,10.6/kT,hcp/ls,363.6/lsa,/lsb,578.26/lsc,1.59/lsca,1880/DiscY,20/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxv{Tb/CS,158.93/Ar,158.93/Arstar,0/radio,225/R,168/Rcov,92.3\noexpand\pgfPT@espaco(3+)/Rion,565.8/Ei,1.2/eneg,12.67/eaff,+3/O,1629/Tmelt,1356/TmeltC,3396/Tboil,3123/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep27\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+9\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+9/eConfignl,8230/d,28.91/Cp,11.1/kT,hcp/ls,360.1/lsa,/lsb,569.36/lsc,1.58/lsca,1843/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxvi{Dy/CS,162.5/Ar,162.5/Arstar,0/radio,228/R,167/Rcov,91.2\noexpand\pgfPT@espaco(3+)/Rion,573/Ei,1.22/eneg,33.96/eaff,+3/O,1680/Tmelt,1407/TmeltC,2840/Tboil,2567/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep28\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+10\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+10/eConfignl,8540/d,27.7/Cp,10.7/kT,hcp/ls,359.3/lsa,/lsb,565.37/lsc,1.57/lsca,1886/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxvii{Ho/CS,164.93/Ar,164.93/Arstar,0/radio,226/R,166/Rcov,90.1\noexpand\pgfPT@espaco(3+)/Rion,581/Ei,1.23/eneg,32.61/eaff,+3/O,1734/Tmelt,1461/TmeltC,2873/Tboil,2600/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep29\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+11\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+11/eConfignl,8790/d,27.15/Cp,16.2/kT,hcp/ls,357.73/lsa,/lsb,561.58/lsc,1.57/lsca,1878/DiscY,20/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxviii{Er/CS,167.26/Ar,167.26/Arstar,0/radio,226/R,165/Rcov,89\noexpand\pgfPT@espaco(3+)/Rion,589.3/Ei,1.24/eneg,30.1/eaff,+3/O,1802/Tmelt,1529/TmeltC,3141/Tboil,2868/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep30\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+12\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+12/eConfignl,9066/d,28.12/Cp,14.5/kT,hcp/ls,355.88/lsa,/lsb,558.74/lsc,1.57/lsca,1843/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxix{Tm/CS,168.93/Ar,168.93/Arstar,0/radio,222/R,164/Rcov,88\noexpand\pgfPT@espaco(3+)/Rion,596.7/Ei,1.25/eneg,99/eaff,+3/O,1818/Tmelt,1545/TmeltC,2223/Tboil,1950/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep31\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+13\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+13/eConfignl,9320/d,27.03/Cp,16.9/kT,hcp/ls,353.75/lsa,/lsb,555.46/lsc,1.57/lsca,1879/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxx{Yb/CS,173.05/Ar,173.05/Arstar,0/radio,222/R,170/Rcov,86.8\noexpand\pgfPT@espaco(3+)/Rion,603.4/Ei,1.1/eneg,0/eaff,+3/O,1097/Tmelt,824/TmeltC,1703/Tboil,1430/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14/eConfignl,6900/d,26.74/Cp,38.5/kT,fcc/ls,548.47/lsa,/lsb,/lsc,/lsca,1878/DiscY,20/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxi{Lu/CS,174.97/Ar,174.97/Arstar,0/radio,217/R,162/Rcov,86.1\noexpand\pgfPT@espaco(3+)/Rion,523.5/Ei,1.27/eneg,23.04/eaff,+3/O,1925/Tmelt,1652/TmeltC,3675/Tboil,3402/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+1\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+1/eConfignl,9841/d,26.86/Cp,16.4/kT,hcp/ls,350.31/lsa,/lsb,555.09/lsc,1.58/lsca,1906/DiscY,6/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxii{Hf/CS,178.49/Ar,178.49(2)/Arstar,0/radio,208/R,152/Rcov,71\noexpand\pgfPT@espaco(4+)/Rion,658.5/Ei,1.3/eneg,17.18/eaff,+4/O,2506/Tmelt,2233/TmeltC,4876/Tboil,4603/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+2\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+2/eConfignl,13310/d,25.73/Cp,23/kT,hcp/ls,319.64/lsa,/lsb,505.11/lsc,1.58/lsca,1922/DiscY,2/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxiii{Ta/CS,180.95/Ar,180.95/Arstar,0/radio,200/R,146/Rcov,64\noexpand\pgfPT@espaco(5+)/Rion,761/Ei,1.5/eneg,31/eaff,+5/O,3290/Tmelt,3017/TmeltC,5731/Tboil,5458/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep11\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+3\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+3/eConfignl,16690/d,25.36/Cp,57.5/kT,bcc/ls,330.26/lsa,/lsb,/lsc,/lsca,1802/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxiv{W/CS,183.84/Ar,183.84/Arstar,0/radio,193/R,137/Rcov,66\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula60\noexpand\pgfPT@espaco(6+)/Rion,770/Ei,2.36/eneg,78.76/eaff,+4\noexpand\pgfPT@virgula+6/O,3695/Tmelt,3422/TmeltC,6203/Tboil,5930/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep12\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+4\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+4/eConfignl,19250/d,24.27/Cp,173/kT,bcc/ls,316.52/lsa,/lsb,/lsc,/lsca,1783/DiscY,17/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxv{Re/CS,186.21/Ar,186.21/Arstar,0/radio,188/R,131/Rcov,63\noexpand\pgfPT@espaco(4+)/Rion,760/Ei,1.9/eneg,5.83/eaff,+4/O,3459/Tmelt,3186/TmeltC,5869/Tboil,5596/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+5\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+5/eConfignl,21020/d,25.48/Cp,48/kT,hcp/ls,276.1/lsa,/lsb,445.8/lsc,1.62/lsca,1925/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxvi{Os/CS,190.23/Ar,190.23(3)/Arstar,0/radio,185/R,129/Rcov,63\noexpand\pgfPT@espaco(4+)/Rion,840/Ei,2.2/eneg,103.99/eaff,+4/O,3306/Tmelt,3033/TmeltC,5285/Tboil,5012/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep14\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+6\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+6/eConfignl,22590/d,24.7/Cp,87.6/kT,hcp/ls,273.43/lsa,/lsb,431.73/lsc,1.58/lsca,1803/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxvii{Ir/CS,192.22/Ar,192.22/Arstar,0/radio,180/R,122/Rcov,68\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula62.5\noexpand\pgfPT@espaco(4+)/Rion,880/Ei,2.2/eneg,150.91/eaff,+3\noexpand\pgfPT@virgula+4/O,2719/Tmelt,2446/TmeltC,4403/Tboil,4130/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep15\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+7\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+7/eConfignl,22560/d,25.1/Cp,147/kT,fcc/ls,383.92/lsa,/lsb,/lsc,/lsca,1803/DiscY,7/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxviii{Pt/CS,195.08/Ar,195.08/Arstar,0/radio,177/R,123/Rcov,80\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula62.5\noexpand\pgfPT@espaco(4+)/Rion,870/Ei,2.28/eneg,205.04/eaff,+2\noexpand\pgfPT@virgula+4/O,2041.4/Tmelt,1768.3/TmeltC,4098/Tboil,3825/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep17\noexpand\pgfPTeDistsep1/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+9\noexpand\pgfPT@virgula6s+1/eConfign,[Xe]::6s+1\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+9/eConfignl,21450/d,25.86/Cp,71.6/kT,fcc/ls,392.35/lsa,/lsb,/lsc,/lsca,1735/DiscY,13/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxix{Au/CS,196.97/Ar,196.97/Arstar,0/radio,174/R,124/Rcov,137\noexpand\pgfPT@espaco(1+)\noexpand\pgfPT@virgula85\noexpand\pgfPT@espaco(3+)/Rion,890.1/Ei,2.54/eneg,222.75/eaff,+1\noexpand\pgfPT@virgula+3/O,1337.33/Tmelt,1064.18/TmeltC,3243/Tboil,2970/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep1/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+1/eConfign,[Xe]::6s+1\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10/eConfignl,19300/d,25.418/Cp,318/kT,fcc/ls,407.83/lsa,/lsb,/lsc,/lsca,4000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,100/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxx{Hg/CS,200.59/Ar,200.59/Arstar,0/radio,171/R,133/Rcov,119\noexpand\pgfPT@espaco(1+)\noexpand\pgfPT@virgula102\noexpand\pgfPT@espaco(2+)/Rion,1007.1/Ei,2/eneg,0/eaff,+1\noexpand\pgfPT@virgula+2/O,234.32/Tmelt,-38.83/TmeltC,629.88/Tboil,356.73/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10/eConfignl,13534/d,27.983/Cp,8.3/kT,rho/ls,300.9/lsa,/lsb,/lsc,/lsca,1500\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,3/DiscC,1/spectra,liquido/cor}%
-\def\pgfPT@data@lxxxi{Tl/CS,204.38/Ar,[204.38\noexpand\pgfPT@virgula204.39]/Arstar,0/radio,156/R,144/Rcov,150\noexpand\pgfPT@espaco(1+)\noexpand\pgfPT@virgula88.5\noexpand\pgfPT@espaco(3+)/Rion,589.4/Ei,1.62/eneg,30.88/eaff,+1\noexpand\pgfPT@virgula+3/O,577/Tmelt,304/TmeltC,1746/Tboil,1473/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep3/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+1/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+1/eConfignl,11850/d,26.32/Cp,46.1/kT,hcp/ls,345.66/lsa,/lsb,552.48/lsc,1.6/lsca,1861/DiscY,21/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxxii{Pb/CS,207.2/Ar,207.2/Arstar,0/radio,154/R,144/Rcov,119\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula77.5\noexpand\pgfPT@espaco(4+)/Rion,715.6/Ei,1.87/eneg,34.42/eaff,+2\noexpand\pgfPT@virgula+4/O,600.61/Tmelt,327.46/TmeltC,2022/Tboil,1749/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep4/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+2/eConfignl,11340/d,26.65/Cp,35.3/kT,fcc/ls,495.02/lsa,/lsb,/lsc,/lsca,3800\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,3/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxxiii{Bi/CS,208.98/Ar,208.98/Arstar,0/radio,143/R,151/Rcov,103\noexpand\pgfPT@espaco(3+)/Rion,703/Ei,2.02/eneg,90.92/eaff,+3/O,544.7/Tmelt,271.5/TmeltC,1837/Tboil,1564/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep5/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+3/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+3/eConfignl,9780/d,25.52/Cp,7.97/kT,mono/ls,667.4/lsa,611.7/lsb,330.4/lsc,0.5/lsca,1400/DiscY,12/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxxiv{Po/CS,[209]/Ar,/Arstar,1/radio,135/R,145/Rcov,223\noexpand\pgfPT@espaco(2-)\noexpand\pgfPT@virgula94\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula67\noexpand\pgfPT@espaco(6+)/Rion,812.1/Ei,2/eneg,136/eaff,\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+5\noexpand\pgfPT@virgula+6/O,527/Tmelt,254/TmeltC,1235/Tboil,962/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep6/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+4/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+4/eConfignl,9196/d,26.4/Cp,0/kT,sc/ls,335.9/lsa,/lsb,/lsc,/lsca,1898/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxxv{At/CS,[210]/Ar,/Arstar,1/radio,127/R,147/Rcov,62\noexpand\pgfPT@espaco(7+)/Rion,899.003/Ei,2.2/eneg,233.09/eaff,\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+5\noexpand\pgfPT@virgula+7/O,575/Tmelt,302/TmeltC,503/Tboil,230/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep7/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+5/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+5/eConfignl,---/d,---/Cp,1.7/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1940/DiscY,22/DiscC,0/spectra,solido/cor}%
-\def\pgfPT@data@lxxxvi{Rn/CS,[222]/Ar,/Arstar,1/radio,120/R,142/Rcov,---/Rion,1037/Ei,2.2/eneg,0/eaff,+2\noexpand\pgfPT@virgula+6/O,202/Tmelt,-71/TmeltC,211.5/Tboil,-61.7/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+6/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+6/eConfignl,9.73/d,20.786/Cp,0.00361/kT,fcc/ls,---/lsa,/lsb,/lsc,/lsca,1899/DiscY,8/DiscC,1/spectra,gasoso/cor}%
-\def\pgfPT@data@lxxxvii{Fr/CS,[223]/Ar,/Arstar,1/radio,---/R,---/Rcov,180\noexpand\pgfPT@espaco(1+)/Rion,380/Ei,0.7/eneg,46.89/eaff,+1/O,281/Tmelt,8/TmeltC,890/Tboil,620/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Rn]::7s+1/eConfign,[Rn]::7s+1/eConfignl,---/d,31.8/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1939/DiscY,5/DiscC,0/spectra,solido/cor}%
-\def\pgfPT@data@lxxxviii{Ra/CS,[226]/Ar,/Arstar,1/radio,---/R,201/Rcov,148\noexpand\pgfPT@espaco(2+)/Rion,509.3/Ei,0.9/eneg,9.65/eaff,+2/O,973/Tmelt,700/TmeltC,2010/Tboil,1737/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::7s+2/eConfign,[Rn]::7s+2/eConfignl,5500/d,---/Cp,18.6/kT,bcc/ls,514.8/lsa,/lsb,/lsc,/lsca,1898/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@lxxxix{Ac/CS,[227]/Ar,/Arstar,1/radio,---/R,186/Rcov,106.5\noexpand\pgfPT@espaco(3+)/Rion,499/Ei,1.1/eneg,33.77/eaff,+3/O,1323/Tmelt,1050/TmeltC,3471/Tboil,3198/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula6d+1/eConfignl,10000/d,27.2/Cp,12/kT,fcc/ls,587/lsa,/lsb,/lsc,/lsca,1902/DiscY,5/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xc{Th/CS,232.04/Ar,232.04/Arstar,1/radio,---/R,175/Rcov,/Rion,587/Ei,1.3/eneg,58.63/eaff,+4/O,2115/Tmelt,1842/TmeltC,5061/Tboil,4788/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Rn]::6d+2\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula6d+2/eConfignl,11700/d,26.23/Cp,54/kT,fcc/ls,508.42/lsa,/lsb,/lsc,/lsca,1829/DiscY,18/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xci{Pa/CS,231.04/Ar,231.04/Arstar,1/radio,---/R,169/Rcov,90\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula78\noexpand\pgfPT@espaco(5+)/Rion,568/Ei,1.5/eneg,53.03/eaff,+5/O,1841/Tmelt,1568/TmeltC,4273/Tboil,4000/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep20\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+2\noexpand\pgfPT@virgula6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+2\noexpand\pgfPT@virgula6d+1/eConfignl,15370/d,---/Cp,47/kT,tetr/ls,392.5/lsa,/lsb,323.8/lsc,0.82/lsca,1913/DiscY,10/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xcii{U/CS,238.03/Ar,238.03/Arstar,1/radio,---/R,170/Rcov,76\noexpand\pgfPT@espaco(5+)/Rion,597.6/Ei,1.38/eneg,30.39/eaff,+4\noexpand\pgfPT@virgula+6/O,1405.3/Tmelt,1132.2/TmeltC,4404/Tboil,4131/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep21\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+3\noexpand\pgfPT@virgula6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+3\noexpand\pgfPT@virgula6d+1/eConfignl,19100/d,27.665/Cp,27.5/kT,bcort/ls,285.37/lsa,586.95/lsb,495.48/lsc,1.74/lsca,1789/DiscY,8/DiscC,1/spectra,solido/cor}%
-\def\pgfPT@data@xciii{Np/CS,[237]/Ar,/Arstar,1/radio,---/R,171/Rcov,110\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula87\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula71\noexpand\pgfPT@espaco(7+)/Rion,604.5/Ei,1.36/eneg,45.85/eaff,+5/O,917/Tmelt,644/TmeltC,4273/Tboil,4000/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep22\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+4\noexpand\pgfPT@virgula6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+4\noexpand\pgfPT@virgula6d+1/eConfignl,20200/d,29.46/Cp,6.3/kT,bcort/ls,666.3/lsa,472.3/lsb,488.7/lsc,0.73/lsca,1940/DiscY,22/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@xciv{Pu/CS,[244]/Ar,/Arstar,1/radio,---/R,172/Rcov,100\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula74\noexpand\pgfPT@espaco(5+)\noexpand\pgfPT@virgula71\noexpand\pgfPT@espaco(6+)/Rion,584.7/Ei,1.28/eneg,0/eaff,+4/O,912.5/Tmelt,639.4/TmeltC,3501/Tboil,3228/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep24\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+6\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+6/eConfignl,19816/d,35.5/Cp,6.74/kT,mono/ls,618.3/lsa,482.2/lsb,1096.3/lsc,1.77/lsca,1940/DiscY,22/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@xcv{Am/CS,[243]/Ar,/Arstar,1/radio,---/R,166/Rcov,126\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula97.5\noexpand\pgfPT@espaco(3+)/Rion,578/Ei,1.13/eneg,9.93/eaff,+3/O,1449/Tmelt,1176/TmeltC,2880/Tboil,2607/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep25\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+7\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+7/eConfignl,12000/d,62.7/Cp,10/kT,hex/ls,346.81/lsa,/lsb,1124.1/lsc,3.24/lsca,1944/DiscY,22/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@xcvi{Cm/CS,[247]/Ar,/Arstar,1/radio,---/R,166/Rcov,97\noexpand\pgfPT@espaco(3+)/Rion,581/Ei,1.28/eneg,27.17/eaff,+3/O,1613/Tmelt,1340/TmeltC,3383/Tboil,3110/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep25\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+7\noexpand\pgfPT@virgula6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+7\noexpand\pgfPT@virgula6d+1/eConfignl,13510/d,---/Cp,---/kT,hex/ls,349.6/lsa,/lsb,1133.1/lsc,3.24/lsca,1944/DiscY,22/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@xcvii{Bk/CS,[247]/Ar,/Arstar,1/radio,---/R,---/Rcov,96\noexpand\pgfPT@espaco(3+)/Rion,601/Ei,1.3/eneg,0/eaff,+3/O,1323/Tmelt,1050/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep27\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+9\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+9/eConfignl,14780/d,---/Cp,10/kT,hex/ls,341.6/lsa,/lsb,1106.9/lsc,3.24/lsca,1949/DiscY,22/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@xcviii{Cf/CS,[251]/Ar,/Arstar,1/radio,---/R,---/Rcov,95\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula82.1\noexpand\pgfPT@espaco(4+)/Rion,608/Ei,1.3/eneg,0/eaff,+3/O,1173/Tmelt,900/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep28\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+10\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+10/eConfignl,15100/d,---/Cp,---/kT,hex/ls,338/lsa,/lsb,1102.5/lsc,3.26/lsca,1950/DiscY,22/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@xcix{Es/CS,[252]/Ar,/Arstar,1/radio,---/R,---/Rcov,83.5\noexpand\pgfPT@espaco(3+)/Rion,619/Ei,1.3/eneg,0/eaff,+3/O,1133/Tmelt,860/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep29\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+11\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+11/eConfignl,8840/d,---/Cp,---/kT,fcc/ls,575/lsa,/lsb,/lsc,/lsca,1952/DiscY,22/DiscC,1/spectra,sintetico/cor}%
-\def\pgfPT@data@c{Fm/CS,[257]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,627/Ei,1.3/eneg,33.96/eaff,+3/O,1800/Tmelt,1527/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep30\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+12\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+12/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1952/DiscY,22/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@ci{Md/CS,[258]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,635/Ei,1.3/eneg,93.91/eaff,+3/O,1100/Tmelt,827/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep31\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+13\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+13/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1955/DiscY,22/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cii{No/CS,[259]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,642/Ei,1.3/eneg,0/eaff,+2/O,1100/Tmelt,827/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1966/DiscY,24/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@ciii{Lr/CS,[266]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,470/Ei,1.3/eneg,0/eaff,+3/O,1900/Tmelt,1627/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep3/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+1/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula7p+1/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1961/DiscY,22/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@civ{Rf/CS,[267]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-580/Ei,---/eneg,---/eaff,+4/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+2\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+2/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1969/DiscY,16/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cv{Db/CS,[268]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-665/Ei,---/eneg,---/eaff,+5/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep11\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+3\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+3/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1970/DiscY,16/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cvi{Sg/CS,[269]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-757/Ei,---/eneg,---/eaff,+6/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep12\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+4\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+4/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1974/DiscY,22/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cvii{Bh/CS,[270]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-740/Ei,---/eneg,---/eaff,+7/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+5\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+5/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1981/DiscY,8/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cviii{Hs/CS,[270]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-730/Ei,---/eneg,---/eaff,+8/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep14\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+6\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+6/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1984/DiscY,8/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cix{Mt/CS,[278]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-800/Ei,---/eneg,---/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep15\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+7\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+7/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1982/DiscY,8/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cx{Ds/CS,[281]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-960/Ei,---/eneg,---/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep16\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+8\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+8/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1994/DiscY,8/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cxi{Rg/CS,[282]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-1020/Ei,---/eneg,151/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep17\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+9\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+9/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1994/DiscY,8/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cxii{Cn/CS,[285]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-1155/Ei,---/eneg,---/eaff,+2/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1996/DiscY,8/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cxiii{Nh/CS,[286]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-707.2/Ei,---/eneg,66.6/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep3/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+1/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+1/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2004/DiscY,16/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cxiv{Fl/CS,[289]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-832.2/Ei,---/eneg,---/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep4/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+2/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1998/DiscY,15/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cxv{Mc/CS,[290]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-538.3/Ei,---/eneg,35.3/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep5/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+3/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+3/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2003/DiscY,16/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cxvi{Lv/CS,[293]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-663.9/Ei,---/eneg,74.9/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep6/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+4/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+4/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2000/DiscY,15/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cxvii{Ts/CS,[294]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-736.9/Ei,---/eneg,165.9/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep7/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+5/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+5/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2009/DiscY,100/DiscC,0/spectra,sintetico/cor}%
-\def\pgfPT@data@cxviii{Og/CS,[294]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-860.1/Ei,---/eneg,5.4/eaff,---/O,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+6/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+6/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2002/DiscY,16/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@i{H/CS,1.008/Ar,[1.0078\noexpand\pgfPT@virgula1.0082]/Arstar,0/radio,53/R,32/Rcov,139.9\noexpand\pgfPT@espaco(1-)/Rion,1312/Ei,2.2/eneg,72.77/eaff,\noexpand\pgfPT@pm1/O,\noexpand\pgfPT@pm I/ORoman,13.99/Tmelt,-259.16/TmeltC,20.271/Tboil,-252.879/TboilC,1/eDist,::1s+1/eConfign,::1s+1/eConfignl,0.08988/d,28.836/Cp,0.1805/kT,hex/ls,470/lsa,470/lsb,340/lsc,0.72/lsca,1766/DiscY,21/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@ii{He/CS,4.0026/Ar,4.0026/Arstar,0/radio,31/R,46/Rcov,---/Rion,2372.3/Ei,---/eneg,0/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,4.222/Tboil,-268.928/TboilC,2/eDist,::1s+2/eConfign,::1s+2/eConfignl,0.1786/d,20.786/Cp,0.1513/kT,fcc/ls,424.4/lsa,/lsb,/lsc,/lsca,1895/DiscY,19/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@iii{Li/CS,6.94/Ar,[6.938\noexpand\pgfPT@virgula6.997]/Arstar,0/radio,167/R,133/Rcov,76\noexpand\pgfPT@espaco(1+)/Rion,520.2/Ei,0.98/eneg,59.63/eaff,+1/O,+I/ORoman,453.65/Tmelt,180.5/TmeltC,1603/Tboil,1330/TboilC,2\noexpand\pgfPTeDistsep1/eDist,[He]::2s+1/eConfign,[He]::2s+1/eConfignl,534/d,24.86/Cp,84.8/kT,bcc/ls,350.93/lsa,/lsb,/lsc,/lsca,1817/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@iv{Be/CS,9.0122/Ar,9.0122/Arstar,0/radio,112/R,10/Rcov,45\noexpand\pgfPT@espaco(2+)/Rion,899.5/Ei,1.57/eneg,0/eaff,+2/O,+II/ORoman,1560/Tmelt,1287/TmeltC,2742/Tboil,2469/TboilC,2\noexpand\pgfPTeDistsep2/eDist,[He]::2s+2/eConfign,[He]::2s+2/eConfignl,1850/d,16.443/Cp,200/kT,hcp/ls,228.56/lsa,/lsb,358.32/lsc,1.57/lsca,1798/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@v{B/CS,10.81/Ar,[10.806\noexpand\pgfPT@virgula10.821]/Arstar,0/radio,87/R,85/Rcov,27\noexpand\pgfPT@espaco(3+)/Rion,800.6/Ei,2.04/eneg,26.99/eaff,+3/O,+III/ORoman,2349/Tmelt,2076/TmeltC,4200/Tboil,3927/TboilC,2\noexpand\pgfPTeDistsep3/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+1/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+1/eConfignl,2340/d,11.087/Cp,27.4/kT,rho/ls,505.66/lsa,/lsb,/lsc,/lsca,1808/DiscY,7/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@vi{C/CS,12.011/Ar,[12.009\noexpand\pgfPT@virgula12.012]/Arstar,0/radio,67/R,75/Rcov,16\noexpand\pgfPT@espaco(4+)/Rion,1086.5/Ei,2.55/eneg,121.78/eaff,0\noexpand\pgfPT@virgula\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula\noexpand\pgfPT@pm4/O,0\noexpand\pgfPT@virgula\noexpand\pgfPT@pm I\noexpand\pgfPT@virgula\noexpand\pgfPT@pm II\noexpand\pgfPT@virgula\noexpand\pgfPT@pm III\noexpand\pgfPT@virgula\noexpand\pgfPT@pm IV/ORoman,3823/Tmelt,3550/TmeltC,4300/Tboil,4027/TboilC,2\noexpand\pgfPTeDistsep4/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+2/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+2/eConfignl,2267/d,8.517/Cp,140/kT,hex/ls,246.12/lsa,/lsb,670.79/lsc,2.73/lsca,3750\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,12/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@vii{N/CS,14.007/Ar,[14.006\noexpand\pgfPT@virgula14.008]/Arstar,0/radio,56/R,71/Rcov,146\noexpand\pgfPT@espaco(3-)\noexpand\pgfPT@virgula16\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula13\noexpand\pgfPT@espaco(5+)/Rion,1402.3/Ei,3.04/eneg,0/eaff,\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+5/O,\noexpand\pgfPT@pm III\noexpand\pgfPT@virgula+IV\noexpand\pgfPT@virgula+V/ORoman,63.15/Tmelt,-210/TmeltC,77.355/Tboil,-195.795/TboilC,2\noexpand\pgfPTeDistsep5/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+3/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+3/eConfignl,1.251/d,29.124/Cp,0.02583/kT,hex/ls,386.1/lsa,386.1/lsb,626.5/lsc,1.62/lsca,1772/DiscY,21/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@viii{O/CS,15.999/Ar,[15.999\noexpand\pgfPT@virgula16.000]/Arstar,0/radio,48/R,63/Rcov,140\noexpand\pgfPT@espaco(2-)/Rion,1313.9/Ei,3.44/eneg,140.98/eaff,--2/O,--II/ORoman,54.36/Tmelt,-218.79/TmeltC,90.188/Tboil,-182.962/TboilC,2\noexpand\pgfPTeDistsep6/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+4/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+4/eConfignl,1.429/d,29.378/Cp,0.02658/kT,mono/ls,540.3/lsa,342.9/lsb,508.6/lsc,0.94/lsca,1771/DiscY,19/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@ix{F/CS,18.998/Ar,18.998/Arstar,0/radio,42/R,64/Rcov,133\noexpand\pgfPT@espaco(1-)/Rion,1681/Ei,3.98/eneg,328.16/eaff,--1/O,--I/ORoman,53.48/Tmelt,-219.67/TmeltC,85.04/Tboil,-188.11/TboilC,2\noexpand\pgfPTeDistsep7/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+5/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+5/eConfignl,1.7/d,31.304/Cp,0.0277/kT,mono/ls,550/lsa,328/lsb,728/lsc,1.32/lsca,1886/DiscY,5/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@x{Ne/CS,20.18/Ar,20.18/Arstar,0/radio,38/R,67/Rcov,---/Rion,2080.7/Ei,---/eneg,0/eaff,---/O,---/ORoman,24.56/Tmelt,-248.59/TmeltC,27.104/Tboil,-246.046/TboilC,2\noexpand\pgfPTeDistsep8/eDist,[He]::2s+2\noexpand\pgfPT@virgula2p+6/eConfign,[He]::2s+2\noexpand\pgfPT@virgula2p+6/eConfignl,0.9002/d,20.786/Cp,0.0491/kT,fcc/ls,442.9/lsa,/lsb,/lsc,/lsca,1898/DiscY,21/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@xi{Na/CS,22.99/Ar,22.99/Arstar,0/radio,190/R,155/Rcov,102\noexpand\pgfPT@espaco(1+)/Rion,495.8/Ei,0.93/eneg,52.87/eaff,+1/O,+I/ORoman,370.944/Tmelt,97.794/TmeltC,1156.09/Tboil,882.94/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Ne]::3s+1/eConfign,[Ne]::3s+1/eConfignl,968/d,28.23/Cp,142/kT,bcc/ls,429.06/lsa,/lsb,/lsc,/lsca,1807/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xii{Mg/CS,24.305/Ar,[24.304\noexpand\pgfPT@virgula24.307]/Arstar,0/radio,145/R,139/Rcov,72\noexpand\pgfPT@espaco(2+)/Rion,737.7/Ei,1.31/eneg,0/eaff,+2/O,+II/ORoman,923/Tmelt,650/TmeltC,1363/Tboil,1090/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Ne]::3s+2/eConfign,[Ne]::3s+2/eConfignl,1738/d,24.869/Cp,156/kT,hcp/ls,320.94/lsa,/lsb,521.05/lsc,1.62/lsca,1755/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xiii{Al/CS,26.982/Ar,26.982/Arstar,0/radio,118/R,126/Rcov,53.5\noexpand\pgfPT@espaco(3+)/Rion,577.5/Ei,1.61/eneg,41.76/eaff,+3/O,+III/ORoman,933.47/Tmelt,660.32/TmeltC,2743/Tboil,2470/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep3/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+1/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+1/eConfignl,2700/d,24.2/Cp,237/kT,fcc/ls,404.95/lsa,/lsb,/lsc,/lsca,1824/DiscY,2/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xiv{Si/CS,28.085/Ar,[28.084\noexpand\pgfPT@virgula28.086]/Arstar,0/radio,111/R,116/Rcov,40\noexpand\pgfPT@espaco(4+)/Rion,786.5/Ei,1.9/eneg,134.07/eaff,\noexpand\pgfPT@pm4/O,\noexpand\pgfPT@pm IV/ORoman,1687/Tmelt,1414/TmeltC,3538/Tboil,3265/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep4/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+2/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+2/eConfignl,2330/d,19.789/Cp,149/kT,dia/ls,543.095/lsa,/lsb,/lsc,/lsca,1823/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xv{P/CS,30.974/Ar,30.974/Arstar,0/radio,98/R,111/Rcov,212\noexpand\pgfPT@espaco(3-)\noexpand\pgfPT@virgula44\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula38\noexpand\pgfPT@espaco(5+)/Rion,1011.8/Ei,2.19/eneg,72.04/eaff,\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula+5/O,\noexpand\pgfPT@pm III\noexpand\pgfPT@virgula+V/ORoman,317.3/Tmelt,44.15/TmeltC,550/Tboil,277/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep5/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+3/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+3/eConfignl,1823/d,23.824/Cp,0.236/kT,tric/ls,1145/lsa,550.3/lsb,1126.1/lsc,0.98/lsca,1669/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xvi{S/CS,32.06/Ar,[32.059\noexpand\pgfPT@virgula32.076]/Arstar,0/radio,88/R,103/Rcov,184\noexpand\pgfPT@espaco(2-)\noexpand\pgfPT@virgula37\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula29\noexpand\pgfPT@espaco(6+)/Rion,999.6/Ei,2.58/eneg,200.41/eaff,\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+6/O,\noexpand\pgfPT@pm II\noexpand\pgfPT@virgula+IV\noexpand\pgfPT@virgula+VI/ORoman,388.36/Tmelt,115.21/TmeltC,717.8/Tboil,444.6/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep6/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+4/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+4/eConfignl,1960/d,22.75/Cp,0.205/kT,fcort/ls,1046.5/lsa,1286.6/lsb,2448.6/lsc,2.34/lsca,500\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,12/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xvii{Cl/CS,35.45/Ar,[35.446\noexpand\pgfPT@virgula35.457]/Arstar,0/radio,79/R,99/Rcov,181\noexpand\pgfPT@espaco(1-)\noexpand\pgfPT@virgula12\noexpand\pgfPT@espaco(5+)\noexpand\pgfPT@virgula27\noexpand\pgfPT@espaco(7+)/Rion,1251.2/Ei,3.16/eneg,348.58/eaff,\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+5\noexpand\pgfPT@virgula+7/O,\noexpand\pgfPT@pm I\noexpand\pgfPT@virgula+III\noexpand\pgfPT@virgula+V\noexpand\pgfPT@virgula+VII/ORoman,171.6/Tmelt,-101.5/TmeltC,239.11/Tboil,-34.04/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep7/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+5/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+5/eConfignl,3.2/d,33.949/Cp,0.0089/kT,bcort/ls,622.35/lsa,445.61/lsb,817.85/lsc,1.31/lsca,1774/DiscY,18/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@xviii{Ar/CS,39.95/Ar,[39.792\noexpand\pgfPT@virgula39.963]/Arstar,0/radio,71/R,96/Rcov,---/Rion,1520.6/Ei,---/eneg,0/eaff,0/O,0/ORoman,83.81/Tmelt,-189.34/TmeltC,87.302/Tboil,-185.848/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep8/eDist,[Ne]::3s+2\noexpand\pgfPT@virgula3p+6/eConfign,[Ne]::3s+2\noexpand\pgfPT@virgula3p+6/eConfignl,1.784/d,20.786/Cp,0.01772/kT,fcc/ls,525.6/lsa,/lsb,/lsc,/lsca,1894/DiscY,21/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@xix{K/CS,39.098/Ar,39.098/Arstar,0/radio,243/R,196/Rcov,138\noexpand\pgfPT@espaco(1+)/Rion,418.8/Ei,0.82/eneg,48.38/eaff,+1/O,+I/ORoman,336.7/Tmelt,63.5/TmeltC,1032/Tboil,759/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Ar]::4s+1/eConfign,[Ar]::4s+1/eConfignl,890/d,29.6/Cp,102.5/kT,bcc/ls,532.8/lsa,/lsb,/lsc,/lsca,1807/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xx{Ca/CS,40.078/Ar,40.078(4) /Arstar,0/radio,194/R,171/Rcov,100\noexpand\pgfPT@espaco(2+)/Rion,589.8/Ei,1/eneg,2.37/eaff,+2/O,+II/ORoman,1115/Tmelt,842/TmeltC,1757/Tboil,1484/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Ar]::4s+2/eConfign,[Ar]::4s+2/eConfignl,1550/d,25.929/Cp,201/kT,fcc/ls,558.84/lsa,/lsb,/lsc,/lsca,1808/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxi{Sc/CS,44.956/Ar,44.956/Arstar,0/radio,184/R,148/Rcov,74.5\noexpand\pgfPT@espaco(3+)/Rion,633.1/Ei,1.36/eneg,18/eaff,+3/O,+III/ORoman,1814/Tmelt,1541/TmeltC,3109/Tboil,2836/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+1\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+1/eConfignl,2985/d,25.52/Cp,15.8/kT,hcp/ls,330.9/lsa,/lsb,527.33/lsc,1.59/lsca,1879/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxii{Ti/CS,47.867/Ar,47.867/Arstar,0/radio,176/R,136/Rcov,86\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula67\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula60.5\noexpand\pgfPT@espaco(4+)/Rion,658.8/Ei,1.54/eneg,7.29/eaff,+2\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+4/O,+II\noexpand\pgfPT@virgula+III\noexpand\pgfPT@virgula+IV/ORoman,1941/Tmelt,1668/TmeltC,3560/Tboil,3287/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+2\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+2/eConfignl,4506/d,25.06/Cp,21.9/kT,hcp/ls,295.03/lsa,/lsb,468.31/lsc,1.59/lsca,1791/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxiii{V/CS,50.942/Ar,50.942/Arstar,0/radio,171/R,134/Rcov,79\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula64\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula58\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula54\noexpand\pgfPT@espaco(5+)/Rion,650.9/Ei,1.63/eneg,50.91/eaff,+2\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+5/O,+II\noexpand\pgfPT@virgula+III\noexpand\pgfPT@virgula+IV\noexpand\pgfPT@virgula+V/ORoman,2183/Tmelt,1910/TmeltC,3680/Tboil,3407/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep11\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+3\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+3/eConfignl,6110/d,24.89/Cp,30.7/kT,bcc/ls,302.31/lsa,/lsb,/lsc,/lsca,1830/DiscY,23/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxiv{Cr/CS,51.996/Ar,51.996/Arstar,0/radio,166/R,122/Rcov,73\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula61.5\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula44\noexpand\pgfPT@espaco(6+)/Rion,652.9/Ei,1.66/eneg,65.21/eaff,+2\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+6/O,+II\noexpand\pgfPT@virgula+III\noexpand\pgfPT@virgula+VI/ORoman,2180/Tmelt,1907/TmeltC,2755/Tboil,2482/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep1/eDist,[Ar]::3d+5\noexpand\pgfPT@virgula4s+1/eConfign,[Ar]::4s+1\noexpand\pgfPT@virgula3d+5/eConfignl,7150/d,23.35/Cp,93.9/kT,bcc/ls,288.46/lsa,/lsb,/lsc,/lsca,1797/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxv{Mn/CS,54.938/Ar,54.938/Arstar,0/radio,161/R,119/Rcov,67\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula58\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula53\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula25.5\noexpand\pgfPT@espaco(6+)\noexpand\pgfPT@virgula46\noexpand\pgfPT@espaco(7+)/Rion,717.3/Ei,1.55/eneg,0/eaff,+2\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+6\noexpand\pgfPT@virgula+7/O,+II\noexpand\pgfPT@virgula+III\noexpand\pgfPT@virgula+IV\noexpand\pgfPT@virgula+VI\noexpand\pgfPT@virgula+VII/ORoman,1519/Tmelt,1246/TmeltC,2334/Tboil,2061/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+5\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+5/eConfignl,7210/d,26.32/Cp,7.81/kT,bcc/ls,891.39/lsa,/lsb,/lsc,/lsca,1774/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxvi{Fe/CS,55.845/Ar,55.845(2)/Arstar,0/radio,156/R,116/Rcov,61\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula55\noexpand\pgfPT@espaco(3+)/Rion,762.5/Ei,1.83/eneg,14.79/eaff,+2\noexpand\pgfPT@virgula+3/O,+II\noexpand\pgfPT@virgula+III/ORoman,1811/Tmelt,1538/TmeltC,3134/Tboil,2861/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep14\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+6\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+6/eConfignl,7860/d,25.1/Cp,80.4/kT,bcc/ls,286.64/lsa,/lsb,/lsc,/lsca,2000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,3/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxvii{Co/CS,58.933/Ar,58.933/Arstar,0/radio,152/R,111/Rcov,65\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula54.5\noexpand\pgfPT@espaco(3+)/Rion,760.4/Ei,1.88/eneg,63.9/eaff,+2\noexpand\pgfPT@virgula+3/O,+II\noexpand\pgfPT@virgula+III/ORoman,1768/Tmelt,1495/TmeltC,3200/Tboil,2927/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep15\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+7\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+7/eConfignl,8900/d,24.81/Cp,100/kT,hcp/ls,250.71/lsa,/lsb,406.95/lsc,1.62/lsca,1735/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxviii{Ni/CS,58.693/Ar,58.693/Arstar,0/radio,149/R,110/Rcov,69\noexpand\pgfPT@espaco(2+)/Rion,737.1/Ei,1.91/eneg,111.65/eaff,+2/O,+II/ORoman,1728/Tmelt,1455/TmeltC,3003/Tboil,2730/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep16\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+8\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+8/eConfignl,8908/d,26.07/Cp,90.9/kT,fcc/ls,352.4/lsa,/lsb,/lsc,/lsca,1751/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxix{Cu/CS,63.546/Ar,63.546(3)/Arstar,0/radio,145/R,112/Rcov,77\noexpand\pgfPT@espaco(1+)\noexpand\pgfPT@virgula73\noexpand\pgfPT@espaco(2+)/Rion,745.5/Ei,1.9/eneg,119.24/eaff,+1\noexpand\pgfPT@virgula+2/O,+I\noexpand\pgfPT@virgula+II/ORoman,1357.77/Tmelt,1084.62/TmeltC,2835/Tboil,2562/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep1/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+1/eConfign,[Ar]::4s+1\noexpand\pgfPT@virgula3d+10/eConfignl,8960/d,24.44/Cp,401/kT,fcc/ls,361.47/lsa,/lsb,/lsc,/lsca,8000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,12/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxx{Zn/CS,65.38/Ar,65.38(2)/Arstar,0/radio,142/R,118/Rcov,74\noexpand\pgfPT@espaco(2+)/Rion,906.4/Ei,1.65/eneg,0/eaff,+2/O,+II/ORoman,692.68/Tmelt,419.53/TmeltC,1180/Tboil,907/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep2/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10/eConfignl,7140/d,25.39/Cp,116/kT,hcp/ls,266.49/lsa,/lsb,494.68/lsc,1.86/lsca,1746/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxxi{Ga/CS,69.723/Ar,69.723/Arstar,0/radio,136/R,124/Rcov,62\noexpand\pgfPT@espaco(3+)/Rion,578.8/Ei,1.81/eneg,29.06/eaff,+3/O,+III/ORoman,302.9146/Tmelt,29.7646/TmeltC,2673/Tboil,2400/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep3/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+1/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+1/eConfignl,5910/d,25.86/Cp,40.6/kT,bcort/ls,452.58/lsa,451.86/lsb,765.7/lsc,1.69/lsca,1875/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxxii{Ge/CS,72.63/Ar,72.630(8)/Arstar,0/radio,125/R,121/Rcov,73\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula53\noexpand\pgfPT@espaco(4+)/Rion,762/Ei,2.01/eneg,118.94/eaff,+2\noexpand\pgfPT@virgula\noexpand\pgfPT@pm4/O,+II\noexpand\pgfPT@virgula\noexpand\pgfPT@pm IV/ORoman,1211.4/Tmelt,938.25/TmeltC,3106/Tboil,2833/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep4/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+2/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+2/eConfignl,5323/d,23.222/Cp,60.2/kT,dia/ls,565.791/lsa,/lsb,/lsc,/lsca,1886/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxxiii{As/CS,74.922/Ar,74.922/Arstar,0/radio,114/R,121/Rcov,58\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula46\noexpand\pgfPT@espaco(5+)/Rion,947/Ei,2.18/eneg,77.65/eaff,\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula+5/O,\noexpand\pgfPT@pm III\noexpand\pgfPT@virgula+V/ORoman,1090/Tmelt,817/TmeltC,887/Tboil,614/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep5/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+3/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+3/eConfignl,5727/d,24.64/Cp,50.2/kT,rho/ls,375.98/lsa,375.98/lsb,1054.75/lsc,2.81/lsca,1250/DiscY,12/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxxiv{Se/CS,78.971/Ar,78.971(8)/Arstar,0/radio,103/R,116/Rcov,198\noexpand\pgfPT@espaco(2-)\noexpand\pgfPT@virgula50\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula42\noexpand\pgfPT@espaco(6+)/Rion,941/Ei,2.55/eneg,194.96/eaff,\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+6/O,\noexpand\pgfPT@pm II\noexpand\pgfPT@virgula+IV\noexpand\pgfPT@virgula+VI/ORoman,494/Tmelt,221/TmeltC,958/Tboil,685/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep6/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+4/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+4/eConfignl,4810/d,25.363/Cp,0.519/kT,mono/ls,905.4/lsa,908.3/lsb,1160.1/lsc,1.28/lsca,1817/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxxv{Br/CS,79.904/Ar,[79.901\noexpand\pgfPT@virgula79.907]/Arstar,0/radio,94/R,114/Rcov,196\noexpand\pgfPT@espaco(1-)\noexpand\pgfPT@virgula59\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula31\noexpand\pgfPT@espaco(5+)/Rion,1139.9/Ei,2.96/eneg,324.54/eaff,\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+5/O,\noexpand\pgfPT@pm I\noexpand\pgfPT@virgula+III\noexpand\pgfPT@virgula+V/ORoman,265.8/Tmelt,-7.3/TmeltC,332/Tboil,58.8/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep7/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+5/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+5/eConfignl,3102.8/d,75.69/Cp,0.122/kT,bcort/ls,672.65/lsa,464.51/lsb,870.23/lsc,1.29/lsca,1825/DiscY,5/DiscC,1/spectra,liquido/cor}%
+\def\pgfPT@data@xxxvi{Kr/CS,83.798/Ar,83.798(2)/Arstar,0/radio,88/R,117/Rcov,---/Rion,1350.8/Ei,3/eneg,0/eaff,0/O,0/ORoman,115.78/Tmelt,-157.37/TmeltC,119.735/Tboil,-153.415/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8/eDist,[Ar]::3d+10\noexpand\pgfPT@virgula4s+2\noexpand\pgfPT@virgula4p+6/eConfign,[Ar]::4s+2\noexpand\pgfPT@virgula3d+10\noexpand\pgfPT@virgula4p+6/eConfignl,3.749/d,20.786/Cp,0.00943/kT,fcc/ls,570.6/lsa,/lsb,/lsc,/lsca,1898/DiscY,21/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@xxxvii{Rb/CS,85.468/Ar,85.468/Arstar,0/radio,265/R,210/Rcov,152\noexpand\pgfPT@espaco(1+)/Rion,403/Ei,0.82/eneg,46.88/eaff,+1/O,+I/ORoman,312.45/Tmelt,39.3/TmeltC,961/Tboil,688/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Kr]::5s+1/eConfign,[Kr]::5s+1/eConfignl,1532/d,31.06/Cp,58.2/kT,bcc/ls,558.5/lsa,/lsb,/lsc,/lsca,1861/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxxviii{Sr/CS,87.62/Ar,87.62/Arstar,0/radio,219/R,185/Rcov,118\noexpand\pgfPT@espaco(2+)/Rion,549.5/Ei,0.95/eneg,5.02/eaff,+2/O,+II/ORoman,1050/Tmelt,777/TmeltC,1650/Tboil,1382/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Kr]::5s+2/eConfign,[Kr]::5s+2/eConfignl,2640/d,26.4/Cp,35.4/kT,fcc/ls,608.49/lsa,/lsb,/lsc,/lsca,1787/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xxxix{Y/CS,88.906/Ar,88.906/Arstar,0/radio,212/R,163/Rcov,90\noexpand\pgfPT@espaco(3+)/Rion,600/Ei,1.22/eneg,29.6/eaff,+3/O,+III/ORoman,1799/Tmelt,1526/TmeltC,3203/Tboil,2930/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Kr]::4d+1\noexpand\pgfPT@virgula5s+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+1/eConfignl,4472/d,26.53/Cp,17.2/kT,hcp/ls,364.74/lsa,/lsb,573.06/lsc,1.57/lsca,1794/DiscY,4/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xl{Zr/CS,91.224/Ar,91.224(2)/Arstar,0/radio,206/R,154/Rcov,72\noexpand\pgfPT@espaco(4+)/Rion,640.1/Ei,1.33/eneg,41.81/eaff,+4/O,+IV/ORoman,2128/Tmelt,1855/TmeltC,4650/Tboil,4377/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Kr]::4d+2\noexpand\pgfPT@virgula5s+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+2/eConfignl,6520/d,25.36/Cp,22.6/kT,hcp/ls,323.2/lsa,/lsb,514.7/lsc,1.59/lsca,1789/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xli{Nb/CS,92.906/Ar,92.906/Arstar,0/radio,198/R,147/Rcov,64\noexpand\pgfPT@espaco(5+)/Rion,652.1/Ei,1.6/eneg,88.52/eaff,+5/O,+V/ORoman,2750/Tmelt,2477/TmeltC,5017/Tboil,4744/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep12\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+4\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+4/eConfignl,8570/d,24.6/Cp,53.7/kT,bcc/ls,330.04/lsa,/lsb,/lsc,/lsca,1801/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xlii{Mo/CS,95.95/Ar,95.95/Arstar,0/radio,190/R,138/Rcov,65\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula59\noexpand\pgfPT@espaco(6+)/Rion,684.3/Ei,2.16/eneg,72.1/eaff,+4\noexpand\pgfPT@virgula+6/O,+IV\noexpand\pgfPT@virgula+VI/ORoman,2896/Tmelt,2623/TmeltC,4912/Tboil,4639/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+5\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+5/eConfignl,10280/d,24.06/Cp,138/kT,bcc/ls,314.69/lsa,/lsb,/lsc,/lsca,1781/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xliii{Tc/CS,[98]/Ar,/Arstar,1/radio,183/R,128/Rcov,64.5\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula56\noexpand\pgfPT@espaco(7+)/Rion,702/Ei,1.9/eneg,53/eaff,+4\noexpand\pgfPT@virgula+7/O,+IV\noexpand\pgfPT@virgula+VII/ORoman,2430/Tmelt,2157/TmeltC,4538/Tboil,4265/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep2/eDist,[Kr]::4d+5\noexpand\pgfPT@virgula5s+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+5/eConfignl,11000/d,24.27/Cp,50.6/kT,hcp/ls,273.5/lsa,/lsb,438.8/lsc,1.6/lsca,1937/DiscY,11/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@xliv{Ru/CS,101.07/Ar,101.07/Arstar,0/radio,178/R,125/Rcov,68\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula62\noexpand\pgfPT@espaco(4+)/Rion,710.2/Ei,2.2/eneg,100.96/eaff,+3\noexpand\pgfPT@virgula+4/O,+III\noexpand\pgfPT@virgula+IV/ORoman,2607/Tmelt,2334/TmeltC,4423/Tboil,4150/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep15\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+7\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+7/eConfignl,12450/d,24.06/Cp,117/kT,hcp/ls,270.55/lsa,/lsb,428.16/lsc,1.58/lsca,1844/DiscY,15/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xlv{Rh/CS,102.91/Ar,102.91/Arstar,0/radio,173/R,125/Rcov,66.5\noexpand\pgfPT@espaco(3+)/Rion,719.7/Ei,2.28/eneg,110.27/eaff,+3/O,+III/ORoman,2237/Tmelt,1964/TmeltC,3968/Tboil,3695/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep16\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+8\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+8/eConfignl,12410/d,24.98/Cp,150/kT,fcc/ls,380.34/lsa,/lsb,/lsc,/lsca,1804/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xlvi{Pd/CS,106.42/Ar,106.42/Arstar,0/radio,169/R,120/Rcov,86\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula61.5\noexpand\pgfPT@espaco(4+)/Rion,804.4/Ei,2.2/eneg,54.24/eaff,0\noexpand\pgfPT@virgula+2\noexpand\pgfPT@virgula+4/O,0\noexpand\pgfPT@virgula+II\noexpand\pgfPT@virgula+IV/ORoman,1828.05/Tmelt,1554.9/TmeltC,3236/Tboil,2963/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18/eDist,[Kr]::4d+10/eConfign,[Kr]::4d+10/eConfignl,12023/d,25.98/Cp,71.8/kT,fcc/ls,389.02/lsa,/lsb,/lsc,/lsca,1802/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xlvii{Ag/CS,107.87/Ar,107.87/Arstar,0/radio,165/R,128/Rcov,115\noexpand\pgfPT@espaco(1+)/Rion,731/Ei,1.93/eneg,125.86/eaff,+1/O,+I/ORoman,1234.93/Tmelt,961.78/TmeltC,2483/Tboil,2210/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep1/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+1/eConfign,[Kr]::5s+1\noexpand\pgfPT@virgula4d+10/eConfignl,10490/d,25.35/Cp,429/kT,fcc/ls,408.57/lsa,/lsb,/lsc,/lsca,3000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,0/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xlviii{Cd/CS,112.41/Ar,112.41/Arstar,0/radio,161/R,136/Rcov,95\noexpand\pgfPT@espaco(2+)/Rion,867.8/Ei,1.69/eneg,0/eaff,+2/O,+II/ORoman,594.22/Tmelt,321.07/TmeltC,1040/Tboil,767/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep2/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10/eConfignl,8650/d,26.02/Cp,96.6/kT,hcp/ls,297.88/lsa,/lsb,561.67/lsc,1.89/lsca,1817/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xlix{In/CS,114.82/Ar,114.82/Arstar,0/radio,156/R,142/Rcov,80\noexpand\pgfPT@espaco(3+)/Rion,558.3/Ei,1.78/eneg,37.04/eaff,+3/O,+III/ORoman,429.75/Tmelt,156.6/TmeltC,2345/Tboil,2072/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep3/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+1/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+1/eConfignl,7310/d,26.74/Cp,81.8/kT,tetr/ls,325.17/lsa,/lsb,494.59/lsc,1.52/lsca,1863/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@l{Sn/CS,118.71/Ar,118.71/Arstar,0/radio,145/R,140/Rcov,118\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula69\noexpand\pgfPT@espaco(4+)/Rion,708.6/Ei,1.96/eneg,107.3/eaff,+2\noexpand\pgfPT@virgula\noexpand\pgfPT@pm4/O,+II\noexpand\pgfPT@virgula\noexpand\pgfPT@pm IV/ORoman,505.08/Tmelt,231.93/TmeltC,2875/Tboil,2602/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep4/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+2/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+2/eConfignl,7265/d,25.77/Cp,66.8/kT,ctetr/ls,583.1/lsa,/lsb,318.1/lsc,0.55/lsca,3000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,0/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@li{Sb/CS,121.76/Ar,121.76/Arstar,0/radio,133/R,140/Rcov,76\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula60\noexpand\pgfPT@espaco(5+)/Rion,834/Ei,2.05/eneg,101.06/eaff,\noexpand\pgfPT@pm3\noexpand\pgfPT@virgula+5/O,\noexpand\pgfPT@pm III\noexpand\pgfPT@virgula+V/ORoman,903.78/Tmelt,630.63/TmeltC,1908/Tboil,1635/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep5/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+3/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+3/eConfignl,6697/d,25.23/Cp,24.4/kT,rho/ls,430.7/lsa,/lsb,1127.3/lsc,2.62/lsca,815/DiscY,12/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lii{Te/CS,127.6/Ar,127.60(3)/Arstar,0/radio,123/R,136/Rcov,221\noexpand\pgfPT@espaco(2-)\noexpand\pgfPT@virgula97\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula56\noexpand\pgfPT@espaco(6+)/Rion,869.3/Ei,2.1/eneg,190.16/eaff,\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+6/O,\noexpand\pgfPT@pm II\noexpand\pgfPT@virgula+IV\noexpand\pgfPT@virgula+VI/ORoman,722.66/Tmelt,449.51/TmeltC,1261/Tboil,988/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep6/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+4/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+4/eConfignl,6240/d,25.73/Cp,3/kT,rho/ls,445.72/lsa,/lsb,592.9/lsc,1.33/lsca,1782/DiscY,14/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@liii{I/CS,126.9/Ar,126.9/Arstar,0/radio,115/R,133/Rcov,220\noexpand\pgfPT@espaco(1-)\noexpand\pgfPT@virgula95\noexpand\pgfPT@espaco(5+)\noexpand\pgfPT@virgula53\noexpand\pgfPT@espaco(7+)/Rion,1008.4/Ei,2.66/eneg,295.15/eaff,\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+5\noexpand\pgfPT@virgula+7/O,\noexpand\pgfPT@pm I\noexpand\pgfPT@virgula+III\noexpand\pgfPT@virgula+V\noexpand\pgfPT@virgula+VII/ORoman,386.85/Tmelt,113.7/TmeltC,457.4/Tboil,184.3/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep7/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+5/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+5/eConfignl,4933/d,54.44/Cp,0.449/kT,bcort/ls,726.97/lsa,479.03/lsb,979.42/lsc,1.35/lsca,1811/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@liv{Xe/CS,131.29/Ar,131.29/Arstar,0/radio,108/R,131/Rcov,---/Rion,1170.4/Ei,2.6/eneg,0/eaff,0/O,0/ORoman,161.4/Tmelt,-111.75/TmeltC,165.051/Tboil,-108.099/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8/eDist,[Kr]::4d+10\noexpand\pgfPT@virgula5s+2\noexpand\pgfPT@virgula5p+6/eConfign,[Kr]::5s+2\noexpand\pgfPT@virgula4d+10\noexpand\pgfPT@virgula5p+6/eConfignl,5.894/d,20.786/Cp,0.00565/kT,fcc/ls,620.23/lsa,/lsb,/lsc,/lsca,1898/DiscY,21/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@lv{Cs/CS,132.91/Ar,132.91/Arstar,0/radio,298/R,232/Rcov,167\noexpand\pgfPT@espaco(1+)/Rion,375.7/Ei,0.79/eneg,45.51/eaff,+1/O,+I/ORoman,301.7/Tmelt,28.5/TmeltC,944/Tboil,671/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Xe]::6s+1/eConfign,[Xe]::6s+1/eConfignl,1930/d,32.21/Cp,35.9/kT,bcc/ls,614.1/lsa,/lsb,/lsc,/lsca,1860/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lvi{Ba/CS,137.33/Ar,137.33/Arstar,0/radio,253/R,196/Rcov,135\noexpand\pgfPT@espaco(2+)/Rion,502.9/Ei,0.89/eneg,13.95/eaff,+2/O,+II/ORoman,1000/Tmelt,727/TmeltC,1910/Tboil,1637/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::6s+2/eConfign,[Xe]::6s+2/eConfignl,3510/d,28.07/Cp,18.4/kT,bcc/ls,501.9/lsa,/lsb,/lsc,/lsca,1808/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lvii{La/CS,138.91/Ar,138.91/Arstar,0/radio,226/R,180/Rcov,103.2\noexpand\pgfPT@espaco(3+)/Rion,538.1/Ei,1.1/eneg,53.8/eaff,+3/O,+III/ORoman,1193/Tmelt,920/TmeltC,3737/Tboil,3464/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Xe]::5d+1\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula5d+1/eConfignl,6162/d,27.11/Cp,13.4/kT,hex/ls,377.2/lsa,/lsb,1214.4/lsc,3.22/lsca,1838/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lviii{Ce/CS,140.12/Ar,140.12/Arstar,0/radio,210/R,163/Rcov,101\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula87\noexpand\pgfPT@espaco(4+)/Rion,534.4/Ei,1.12/eneg,55/eaff,+3\noexpand\pgfPT@virgula+4/O,+III\noexpand\pgfPT@virgula+IV/ORoman,1068/Tmelt,795/TmeltC,3716/Tboil,3443/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep19\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+1\noexpand\pgfPT@virgula5d+1\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+1\noexpand\pgfPT@virgula5d+1/eConfignl,6770/d,26.94/Cp,11.3/kT,hex/ls,362/lsa,/lsb,599/lsc,1.65/lsca,1803/DiscY,9/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lix{Pr/CS,140.91/Ar,140.91/Arstar,0/radio,247/R,17/Rcov,99\noexpand\pgfPT@espaco(3+)/Rion,527/Ei,1.13/eneg,10.54/eaff,+3/O,+III/ORoman,1208/Tmelt,935/TmeltC,3403/Tboil,3130/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep21\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+3\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+3/eConfignl,6770/d,27.2/Cp,12.5/kT,hex/ls,367.21/lsa,/lsb,1183.26/lsc,3.22/lsca,1885/DiscY,1/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lx{Nd/CS,144.24/Ar,144.24/Arstar,0/radio,206/R,17/Rcov,98.3\noexpand\pgfPT@espaco(3+)/Rion,533.1/Ei,1.14/eneg,9.41/eaff,+3/O,+III/ORoman,1297/Tmelt,1024/TmeltC,3347/Tboil,3074/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep22\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+4\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+4/eConfignl,7010/d,27.45/Cp,16.5/kT,hex/ls,365.82/lsa,/lsb,1179.66/lsc,3.22/lsca,1885/DiscY,1/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxi{Pm/CS,[145]/Ar,/Arstar,1/radio,205/R,173/Rcov,97\noexpand\pgfPT@espaco(3+)/Rion,540/Ei,1.13/eneg,12.45/eaff,+3/O,+III/ORoman,1315/Tmelt,1042/TmeltC,3273/Tboil,3000/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep23\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+5\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+5/eConfignl,7260/d,---/Cp,17.9/kT,hex/ls,365/lsa,/lsb,1165/lsc,3.19/lsca,1945/DiscY,22/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@lxii{Sm/CS,150.36/Ar,150.36(2)/Arstar,0/radio,238/R,172/Rcov,95.8\noexpand\pgfPT@espaco(3+)/Rion,544.5/Ei,1.17/eneg,15.63/eaff,+3/O,+III/ORoman,1345/Tmelt,1072/TmeltC,2173/Tboil,1900/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep24\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+6\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+6/eConfignl,7520/d,29.54/Cp,13.3/kT,rho/ls,362.1/lsa,/lsb,2625/lsc,7.25/lsca,1879/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxiii{Eu/CS,151.96/Ar,151.96/Arstar,0/radio,231/R,168/Rcov,117\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula94.7\noexpand\pgfPT@espaco(3+)/Rion,547.1/Ei,1.2/eneg,11.2/eaff,+2\noexpand\pgfPT@virgula+3/O,+II\noexpand\pgfPT@virgula+III/ORoman,1099/Tmelt,826/TmeltC,1802/Tboil,1529/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep25\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+7\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+7/eConfignl,5244/d,27.66/Cp,13.9/kT,bcc/ls,458.1/lsa,/lsb,/lsc,/lsca,1901/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxiv{Gd/CS,157.25/Ar,157.25(3)/Arstar,0/radio,233/R,169/Rcov,93.5\noexpand\pgfPT@espaco(3+)/Rion,593.4/Ei,1.2/eneg,13.22/eaff,+3/O,+III/ORoman,1585/Tmelt,1312/TmeltC,3273/Tboil,3000/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep25\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+7\noexpand\pgfPT@virgula5d+1\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+7\noexpand\pgfPT@virgula5d+1/eConfignl,7900/d,37.03/Cp,10.6/kT,hcp/ls,363.6/lsa,/lsb,578.26/lsc,1.59/lsca,1880/DiscY,20/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxv{Tb/CS,158.93/Ar,158.93/Arstar,0/radio,225/R,168/Rcov,92.3\noexpand\pgfPT@espaco(3+)/Rion,565.8/Ei,1.2/eneg,12.67/eaff,+3/O,+III/ORoman,1629/Tmelt,1356/TmeltC,3396/Tboil,3123/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep27\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+9\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+9/eConfignl,8230/d,28.91/Cp,11.1/kT,hcp/ls,360.1/lsa,/lsb,569.36/lsc,1.58/lsca,1843/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxvi{Dy/CS,162.5/Ar,162.5/Arstar,0/radio,228/R,167/Rcov,91.2\noexpand\pgfPT@espaco(3+)/Rion,573/Ei,1.22/eneg,33.96/eaff,+3/O,+III/ORoman,1680/Tmelt,1407/TmeltC,2840/Tboil,2567/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep28\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+10\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+10/eConfignl,8540/d,27.7/Cp,10.7/kT,hcp/ls,359.3/lsa,/lsb,565.37/lsc,1.57/lsca,1886/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxvii{Ho/CS,164.93/Ar,164.93/Arstar,0/radio,226/R,166/Rcov,90.1\noexpand\pgfPT@espaco(3+)/Rion,581/Ei,1.23/eneg,32.61/eaff,+3/O,+III/ORoman,1734/Tmelt,1461/TmeltC,2873/Tboil,2600/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep29\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+11\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+11/eConfignl,8790/d,27.15/Cp,16.2/kT,hcp/ls,357.73/lsa,/lsb,561.58/lsc,1.57/lsca,1878/DiscY,20/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxviii{Er/CS,167.26/Ar,167.26/Arstar,0/radio,226/R,165/Rcov,89\noexpand\pgfPT@espaco(3+)/Rion,589.3/Ei,1.24/eneg,30.1/eaff,+3/O,+III/ORoman,1802/Tmelt,1529/TmeltC,3141/Tboil,2868/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep30\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+12\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+12/eConfignl,9066/d,28.12/Cp,14.5/kT,hcp/ls,355.88/lsa,/lsb,558.74/lsc,1.57/lsca,1843/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxix{Tm/CS,168.93/Ar,168.93/Arstar,0/radio,222/R,164/Rcov,88\noexpand\pgfPT@espaco(3+)/Rion,596.7/Ei,1.25/eneg,99/eaff,+3/O,+III/ORoman,1818/Tmelt,1545/TmeltC,2223/Tboil,1950/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep31\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+13\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+13/eConfignl,9320/d,27.03/Cp,16.9/kT,hcp/ls,353.75/lsa,/lsb,555.46/lsc,1.57/lsca,1879/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxx{Yb/CS,173.05/Ar,173.05/Arstar,0/radio,222/R,170/Rcov,86.8\noexpand\pgfPT@espaco(3+)/Rion,603.4/Ei,1.1/eneg,0/eaff,+3/O,+III/ORoman,1097/Tmelt,824/TmeltC,1703/Tboil,1430/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14/eConfignl,6900/d,26.74/Cp,38.5/kT,fcc/ls,548.47/lsa,/lsb,/lsc,/lsca,1878/DiscY,20/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxi{Lu/CS,174.97/Ar,174.97/Arstar,0/radio,217/R,162/Rcov,86.1\noexpand\pgfPT@espaco(3+)/Rion,523.5/Ei,1.27/eneg,23.04/eaff,+3/O,+III/ORoman,1925/Tmelt,1652/TmeltC,3675/Tboil,3402/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+1\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+1/eConfignl,9841/d,26.86/Cp,16.4/kT,hcp/ls,350.31/lsa,/lsb,555.09/lsc,1.58/lsca,1906/DiscY,6/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxii{Hf/CS,178.49/Ar,178.49(2)/Arstar,0/radio,208/R,152/Rcov,71\noexpand\pgfPT@espaco(4+)/Rion,658.5/Ei,1.3/eneg,17.18/eaff,+4/O,+IV/ORoman,2506/Tmelt,2233/TmeltC,4876/Tboil,4603/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+2\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+2/eConfignl,13310/d,25.73/Cp,23/kT,hcp/ls,319.64/lsa,/lsb,505.11/lsc,1.58/lsca,1922/DiscY,2/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxiii{Ta/CS,180.95/Ar,180.95/Arstar,0/radio,200/R,146/Rcov,64\noexpand\pgfPT@espaco(5+)/Rion,761/Ei,1.5/eneg,31/eaff,+5/O,+V/ORoman,3290/Tmelt,3017/TmeltC,5731/Tboil,5458/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep11\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+3\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+3/eConfignl,16690/d,25.36/Cp,57.5/kT,bcc/ls,330.26/lsa,/lsb,/lsc,/lsca,1802/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxiv{W/CS,183.84/Ar,183.84/Arstar,0/radio,193/R,137/Rcov,66\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula60\noexpand\pgfPT@espaco(6+)/Rion,770/Ei,2.36/eneg,78.76/eaff,+4\noexpand\pgfPT@virgula+6/O,+IV\noexpand\pgfPT@virgula+VI/ORoman,3695/Tmelt,3422/TmeltC,6203/Tboil,5930/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep12\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+4\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+4/eConfignl,19250/d,24.27/Cp,173/kT,bcc/ls,316.52/lsa,/lsb,/lsc,/lsca,1783/DiscY,17/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxv{Re/CS,186.21/Ar,186.21/Arstar,0/radio,188/R,131/Rcov,63\noexpand\pgfPT@espaco(4+)/Rion,760/Ei,1.9/eneg,5.83/eaff,+4/O,+IV/ORoman,3459/Tmelt,3186/TmeltC,5869/Tboil,5596/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+5\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+5/eConfignl,21020/d,25.48/Cp,48/kT,hcp/ls,276.1/lsa,/lsb,445.8/lsc,1.62/lsca,1925/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxvi{Os/CS,190.23/Ar,190.23(3)/Arstar,0/radio,185/R,129/Rcov,63\noexpand\pgfPT@espaco(4+)/Rion,840/Ei,2.2/eneg,103.99/eaff,+4/O,+IV/ORoman,3306/Tmelt,3033/TmeltC,5285/Tboil,5012/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep14\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+6\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+6/eConfignl,22590/d,24.7/Cp,87.6/kT,hcp/ls,273.43/lsa,/lsb,431.73/lsc,1.58/lsca,1803/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxvii{Ir/CS,192.22/Ar,192.22/Arstar,0/radio,180/R,122/Rcov,68\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula62.5\noexpand\pgfPT@espaco(4+)/Rion,880/Ei,2.2/eneg,150.91/eaff,+3\noexpand\pgfPT@virgula+4/O,+III\noexpand\pgfPT@virgula+IV/ORoman,2719/Tmelt,2446/TmeltC,4403/Tboil,4130/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep15\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+7\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+7/eConfignl,22560/d,25.1/Cp,147/kT,fcc/ls,383.92/lsa,/lsb,/lsc,/lsca,1803/DiscY,7/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxviii{Pt/CS,195.08/Ar,195.08/Arstar,0/radio,177/R,123/Rcov,80\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula62.5\noexpand\pgfPT@espaco(4+)/Rion,870/Ei,2.28/eneg,205.04/eaff,+2\noexpand\pgfPT@virgula+4/O,+II\noexpand\pgfPT@virgula+IV/ORoman,2041.4/Tmelt,1768.3/TmeltC,4098/Tboil,3825/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep17\noexpand\pgfPTeDistsep1/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+9\noexpand\pgfPT@virgula6s+1/eConfign,[Xe]::6s+1\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+9/eConfignl,21450/d,25.86/Cp,71.6/kT,fcc/ls,392.35/lsa,/lsb,/lsc,/lsca,1735/DiscY,13/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxix{Au/CS,196.97/Ar,196.97/Arstar,0/radio,174/R,124/Rcov,137\noexpand\pgfPT@espaco(1+)\noexpand\pgfPT@virgula85\noexpand\pgfPT@espaco(3+)/Rion,890.1/Ei,2.54/eneg,222.75/eaff,+1\noexpand\pgfPT@virgula+3/O,+I\noexpand\pgfPT@virgula+III/ORoman,1337.33/Tmelt,1064.18/TmeltC,3243/Tboil,2970/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep1/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+1/eConfign,[Xe]::6s+1\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10/eConfignl,19300/d,25.418/Cp,318/kT,fcc/ls,407.83/lsa,/lsb,/lsc,/lsca,4000\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,100/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxx{Hg/CS,200.59/Ar,200.59/Arstar,0/radio,171/R,133/Rcov,119\noexpand\pgfPT@espaco(1+)\noexpand\pgfPT@virgula102\noexpand\pgfPT@espaco(2+)/Rion,1007.1/Ei,2/eneg,0/eaff,+1\noexpand\pgfPT@virgula+2/O,+I\noexpand\pgfPT@virgula+II/ORoman,234.32/Tmelt,-38.83/TmeltC,629.88/Tboil,356.73/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep2/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10/eConfignl,13534/d,27.983/Cp,8.3/kT,rho/ls,300.9/lsa,/lsb,/lsc,/lsca,1500\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,3/DiscC,1/spectra,liquido/cor}%
+\def\pgfPT@data@lxxxi{Tl/CS,204.38/Ar,[204.38\noexpand\pgfPT@virgula204.39]/Arstar,0/radio,156/R,144/Rcov,150\noexpand\pgfPT@espaco(1+)\noexpand\pgfPT@virgula88.5\noexpand\pgfPT@espaco(3+)/Rion,589.4/Ei,1.62/eneg,30.88/eaff,+1\noexpand\pgfPT@virgula+3/O,+I\noexpand\pgfPT@virgula+III/ORoman,577/Tmelt,304/TmeltC,1746/Tboil,1473/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep3/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+1/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+1/eConfignl,11850/d,26.32/Cp,46.1/kT,hcp/ls,345.66/lsa,/lsb,552.48/lsc,1.6/lsca,1861/DiscY,21/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxxii{Pb/CS,207.2/Ar,207.2/Arstar,0/radio,154/R,144/Rcov,119\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula77.5\noexpand\pgfPT@espaco(4+)/Rion,715.6/Ei,1.87/eneg,34.42/eaff,+2\noexpand\pgfPT@virgula+4/O,+II\noexpand\pgfPT@virgula+IV/ORoman,600.61/Tmelt,327.46/TmeltC,2022/Tboil,1749/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep4/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+2/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+2/eConfignl,11340/d,26.65/Cp,35.3/kT,fcc/ls,495.02/lsa,/lsb,/lsc,/lsca,3800\noexpand\pgfPT@scaletxt{\pgfPTDiscYBCscale}{\noexpand\pgfPT@espaco\noexpand\pgfPT@BClabel}/DiscY,3/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxxiii{Bi/CS,208.98/Ar,208.98/Arstar,0/radio,143/R,151/Rcov,103\noexpand\pgfPT@espaco(3+)/Rion,703/Ei,2.02/eneg,90.92/eaff,+3/O,+III/ORoman,544.7/Tmelt,271.5/TmeltC,1837/Tboil,1564/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep5/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+3/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+3/eConfignl,9780/d,25.52/Cp,7.97/kT,mono/ls,667.4/lsa,611.7/lsb,330.4/lsc,0.5/lsca,1400/DiscY,12/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxxiv{Po/CS,[209]/Ar,/Arstar,1/radio,135/R,145/Rcov,223\noexpand\pgfPT@espaco(2-)\noexpand\pgfPT@virgula94\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula67\noexpand\pgfPT@espaco(6+)/Rion,812.1/Ei,2/eneg,136/eaff,\noexpand\pgfPT@pm2\noexpand\pgfPT@virgula+4\noexpand\pgfPT@virgula+5\noexpand\pgfPT@virgula+6/O,\noexpand\pgfPT@pm II\noexpand\pgfPT@virgula+IV\noexpand\pgfPT@virgula+V\noexpand\pgfPT@virgula+VI/ORoman,527/Tmelt,254/TmeltC,1235/Tboil,962/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep6/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+4/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+4/eConfignl,9196/d,26.4/Cp,0/kT,sc/ls,335.9/lsa,/lsb,/lsc,/lsca,1898/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxxv{At/CS,[210]/Ar,/Arstar,1/radio,127/R,147/Rcov,62\noexpand\pgfPT@espaco(7+)/Rion,899.003/Ei,2.2/eneg,233.09/eaff,\noexpand\pgfPT@pm1\noexpand\pgfPT@virgula+3\noexpand\pgfPT@virgula+5\noexpand\pgfPT@virgula+7/O,\noexpand\pgfPT@pm I\noexpand\pgfPT@virgula+III\noexpand\pgfPT@virgula+V\noexpand\pgfPT@virgula+VII/ORoman,575/Tmelt,302/TmeltC,503/Tboil,230/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep7/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+5/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+5/eConfignl,---/d,---/Cp,1.7/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1940/DiscY,22/DiscC,0/spectra,solido/cor}%
+\def\pgfPT@data@lxxxvi{Rn/CS,[222]/Ar,/Arstar,1/radio,120/R,142/Rcov,---/Rion,1037/Ei,2.2/eneg,0/eaff,+2\noexpand\pgfPT@virgula+6/O,+II\noexpand\pgfPT@virgula+VI/ORoman,202/Tmelt,-71/TmeltC,211.5/Tboil,-61.7/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8/eDist,[Xe]::4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6s+2\noexpand\pgfPT@virgula6p+6/eConfign,[Xe]::6s+2\noexpand\pgfPT@virgula4f+14\noexpand\pgfPT@virgula5d+10\noexpand\pgfPT@virgula6p+6/eConfignl,9.73/d,20.786/Cp,0.00361/kT,fcc/ls,---/lsa,/lsb,/lsc,/lsca,1899/DiscY,8/DiscC,1/spectra,gasoso/cor}%
+\def\pgfPT@data@lxxxvii{Fr/CS,[223]/Ar,/Arstar,1/radio,---/R,---/Rcov,180\noexpand\pgfPT@espaco(1+)/Rion,380/Ei,0.7/eneg,46.89/eaff,+1/O,+I/ORoman,281/Tmelt,8/TmeltC,890/Tboil,620/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep1/eDist,[Rn]::7s+1/eConfign,[Rn]::7s+1/eConfignl,---/d,31.8/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1939/DiscY,5/DiscC,0/spectra,solido/cor}%
+\def\pgfPT@data@lxxxviii{Ra/CS,[226]/Ar,/Arstar,1/radio,---/R,201/Rcov,148\noexpand\pgfPT@espaco(2+)/Rion,509.3/Ei,0.9/eneg,9.65/eaff,+2/O,+II/ORoman,973/Tmelt,700/TmeltC,2010/Tboil,1737/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::7s+2/eConfign,[Rn]::7s+2/eConfignl,5500/d,---/Cp,18.6/kT,bcc/ls,514.8/lsa,/lsb,/lsc,/lsca,1898/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@lxxxix{Ac/CS,[227]/Ar,/Arstar,1/radio,---/R,186/Rcov,106.5\noexpand\pgfPT@espaco(3+)/Rion,499/Ei,1.1/eneg,33.77/eaff,+3/O,+III/ORoman,1323/Tmelt,1050/TmeltC,3471/Tboil,3198/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula6d+1/eConfignl,10000/d,27.2/Cp,12/kT,fcc/ls,587/lsa,/lsb,/lsc,/lsca,1902/DiscY,5/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xc{Th/CS,232.04/Ar,232.04/Arstar,1/radio,---/R,175/Rcov,/Rion,587/Ei,1.3/eneg,58.63/eaff,+4/O,+IV/ORoman,2115/Tmelt,1842/TmeltC,5061/Tboil,4788/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Rn]::6d+2\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula6d+2/eConfignl,11700/d,26.23/Cp,54/kT,fcc/ls,508.42/lsa,/lsb,/lsc,/lsca,1829/DiscY,18/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xci{Pa/CS,231.04/Ar,231.04/Arstar,1/radio,---/R,169/Rcov,90\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula78\noexpand\pgfPT@espaco(5+)/Rion,568/Ei,1.5/eneg,53.03/eaff,+5/O,+V/ORoman,1841/Tmelt,1568/TmeltC,4273/Tboil,4000/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep20\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+2\noexpand\pgfPT@virgula6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+2\noexpand\pgfPT@virgula6d+1/eConfignl,15370/d,---/Cp,47/kT,tetr/ls,392.5/lsa,/lsb,323.8/lsc,0.82/lsca,1913/DiscY,10/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xcii{U/CS,238.03/Ar,238.03/Arstar,1/radio,---/R,170/Rcov,76\noexpand\pgfPT@espaco(5+)/Rion,597.6/Ei,1.38/eneg,30.39/eaff,+4\noexpand\pgfPT@virgula+6/O,+IV\noexpand\pgfPT@virgula+VI/ORoman,1405.3/Tmelt,1132.2/TmeltC,4404/Tboil,4131/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep21\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+3\noexpand\pgfPT@virgula6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+3\noexpand\pgfPT@virgula6d+1/eConfignl,19100/d,27.665/Cp,27.5/kT,bcort/ls,285.37/lsa,586.95/lsb,495.48/lsc,1.74/lsca,1789/DiscY,8/DiscC,1/spectra,solido/cor}%
+\def\pgfPT@data@xciii{Np/CS,[237]/Ar,/Arstar,1/radio,---/R,171/Rcov,110\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula87\noexpand\pgfPT@espaco(4+)\noexpand\pgfPT@virgula71\noexpand\pgfPT@espaco(7+)/Rion,604.5/Ei,1.36/eneg,45.85/eaff,+5/O,+V/ORoman,917/Tmelt,644/TmeltC,4273/Tboil,4000/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep22\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+4\noexpand\pgfPT@virgula6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+4\noexpand\pgfPT@virgula6d+1/eConfignl,20200/d,29.46/Cp,6.3/kT,bcort/ls,666.3/lsa,472.3/lsb,488.7/lsc,0.73/lsca,1940/DiscY,22/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@xciv{Pu/CS,[244]/Ar,/Arstar,1/radio,---/R,172/Rcov,100\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula74\noexpand\pgfPT@espaco(5+)\noexpand\pgfPT@virgula71\noexpand\pgfPT@espaco(6+)/Rion,584.7/Ei,1.28/eneg,0/eaff,+4/O,+IV/ORoman,912.5/Tmelt,639.4/TmeltC,3501/Tboil,3228/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep24\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+6\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+6/eConfignl,19816/d,35.5/Cp,6.74/kT,mono/ls,618.3/lsa,482.2/lsb,1096.3/lsc,1.77/lsca,1940/DiscY,22/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@xcv{Am/CS,[243]/Ar,/Arstar,1/radio,---/R,166/Rcov,126\noexpand\pgfPT@espaco(2+)\noexpand\pgfPT@virgula97.5\noexpand\pgfPT@espaco(3+)/Rion,578/Ei,1.13/eneg,9.93/eaff,+3/O,+III/ORoman,1449/Tmelt,1176/TmeltC,2880/Tboil,2607/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep25\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+7\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+7/eConfignl,12000/d,62.7/Cp,10/kT,hex/ls,346.81/lsa,/lsb,1124.1/lsc,3.24/lsca,1944/DiscY,22/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@xcvi{Cm/CS,[247]/Ar,/Arstar,1/radio,---/R,166/Rcov,97\noexpand\pgfPT@espaco(3+)/Rion,581/Ei,1.28/eneg,27.17/eaff,+3/O,+III/ORoman,1613/Tmelt,1340/TmeltC,3383/Tboil,3110/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep25\noexpand\pgfPTeDistsep9\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+7\noexpand\pgfPT@virgula6d+1\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+7\noexpand\pgfPT@virgula6d+1/eConfignl,13510/d,---/Cp,---/kT,hex/ls,349.6/lsa,/lsb,1133.1/lsc,3.24/lsca,1944/DiscY,22/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@xcvii{Bk/CS,[247]/Ar,/Arstar,1/radio,---/R,---/Rcov,96\noexpand\pgfPT@espaco(3+)/Rion,601/Ei,1.3/eneg,0/eaff,+3/O,+III/ORoman,1323/Tmelt,1050/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep27\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+9\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+9/eConfignl,14780/d,---/Cp,10/kT,hex/ls,341.6/lsa,/lsb,1106.9/lsc,3.24/lsca,1949/DiscY,22/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@xcviii{Cf/CS,[251]/Ar,/Arstar,1/radio,---/R,---/Rcov,95\noexpand\pgfPT@espaco(3+)\noexpand\pgfPT@virgula82.1\noexpand\pgfPT@espaco(4+)/Rion,608/Ei,1.3/eneg,0/eaff,+3/O,+III/ORoman,1173/Tmelt,900/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep28\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+10\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+10/eConfignl,15100/d,---/Cp,---/kT,hex/ls,338/lsa,/lsb,1102.5/lsc,3.26/lsca,1950/DiscY,22/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@xcix{Es/CS,[252]/Ar,/Arstar,1/radio,---/R,---/Rcov,83.5\noexpand\pgfPT@espaco(3+)/Rion,619/Ei,1.3/eneg,0/eaff,+3/O,+III/ORoman,1133/Tmelt,860/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep29\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+11\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+11/eConfignl,8840/d,---/Cp,---/kT,fcc/ls,575/lsa,/lsb,/lsc,/lsca,1952/DiscY,22/DiscC,1/spectra,sintetico/cor}%
+\def\pgfPT@data@c{Fm/CS,[257]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,627/Ei,1.3/eneg,33.96/eaff,+3/O,+III/ORoman,1800/Tmelt,1527/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep30\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+12\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+12/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1952/DiscY,22/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@ci{Md/CS,[258]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,635/Ei,1.3/eneg,93.91/eaff,+3/O,+III/ORoman,1100/Tmelt,827/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep31\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+13\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+13/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1955/DiscY,22/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cii{No/CS,[259]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,642/Ei,1.3/eneg,0/eaff,+2/O,+II/ORoman,1100/Tmelt,827/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1966/DiscY,24/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@ciii{Lr/CS,[266]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,470/Ei,1.3/eneg,0/eaff,+3/O,+III/ORoman,1900/Tmelt,1627/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep3/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+1/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula7p+1/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1961/DiscY,22/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@civ{Rf/CS,[267]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-580/Ei,---/eneg,---/eaff,+4/O,+IV/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep10\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+2\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+2/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1969/DiscY,16/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cv{Db/CS,[268]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-665/Ei,---/eneg,---/eaff,+5/O,+V/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep11\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+3\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+3/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1970/DiscY,16/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cvi{Sg/CS,[269]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-757/Ei,---/eneg,---/eaff,+6/O,+VI/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep12\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+4\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+4/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1974/DiscY,22/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cvii{Bh/CS,[270]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-740/Ei,---/eneg,---/eaff,+7/O,+VII/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep13\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+5\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+5/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1981/DiscY,8/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cviii{Hs/CS,[270]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-730/Ei,---/eneg,---/eaff,+8/O,+VIII/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep14\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+6\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+6/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1984/DiscY,8/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cix{Mt/CS,[278]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-800/Ei,---/eneg,---/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep15\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+7\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+7/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1982/DiscY,8/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cx{Ds/CS,[281]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-960/Ei,---/eneg,---/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep16\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+8\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+8/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1994/DiscY,8/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cxi{Rg/CS,[282]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-1020/Ei,---/eneg,151/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep17\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+9\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+9/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1994/DiscY,8/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cxii{Cn/CS,[285]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-1155/Ei,---/eneg,---/eaff,+2/O,+II/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep2/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1996/DiscY,8/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cxiii{Nh/CS,[286]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-707.2/Ei,---/eneg,66.6/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep3/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+1/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+1/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2004/DiscY,16/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cxiv{Fl/CS,[289]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-832.2/Ei,---/eneg,---/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep4/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+2/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+2/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,1998/DiscY,15/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cxv{Mc/CS,[290]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-538.3/Ei,---/eneg,35.3/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep5/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+3/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+3/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2003/DiscY,16/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cxvi{Lv/CS,[293]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-663.9/Ei,---/eneg,74.9/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep6/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+4/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+4/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2000/DiscY,15/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cxvii{Ts/CS,[294]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-736.9/Ei,---/eneg,165.9/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep7/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+5/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+5/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2009/DiscY,100/DiscC,0/spectra,sintetico/cor}%
+\def\pgfPT@data@cxviii{Og/CS,[294]/Ar,/Arstar,1/radio,---/R,---/Rcov,---/Rion,-860.1/Ei,---/eneg,5.4/eaff,---/O,---/ORoman,---/Tmelt,---/TmeltC,---/Tboil,---/TboilC,2\noexpand\pgfPTeDistsep8\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep32\noexpand\pgfPTeDistsep18\noexpand\pgfPTeDistsep8/eDist,[Rn]::5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7s+2\noexpand\pgfPT@virgula7p+6/eConfign,[Rn]::7s+2\noexpand\pgfPT@virgula5f+14\noexpand\pgfPT@virgula6d+10\noexpand\pgfPT@virgula7p+6/eConfignl,---/d,---/Cp,---/kT,---/ls,---/lsa,/lsb,/lsc,/lsca,2002/DiscY,16/DiscC,0/spectra,sintetico/cor}%
\endinput
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex b/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex
index 8c09f620e1..4b835ce7e2 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex
@@ -86,6 +86,9 @@ show group numbers/.is if=pgfPTgrlabels,%
show legend pins/.is if=pgfPTlegendapins,%
show legend/.is if=pgfPTlegenda,%
legend acronyms/.is if=pgfPTlegacro,%
+legend acronyms font size/.get=\pgfPTlegendacrofontsize,% new in v2.1.5
+legend acronyms font size/.store in=\pgfPTlegendacrofontsize,%
+legend acronyms font size/.default=\pgfPT@doc@fsize,%
legend back color/.get=\pgfPTlegendbackcolor,%
legend back color/.store in=\pgfPTlegendbackcolor,%
legend back color/.default=white,%
@@ -119,7 +122,7 @@ title/.code=\pgfPT@titlestyle{#1},%
title/.default={f=\Large\bfseries,c=black}%
}%
% setting key with default value -----------------------------------------------------------------
-\pgfkeys{/pgfPerTable/.cd,show title,show period numbers,show group numbers,show legend,legend acronyms,legend back color,%
+\pgfkeys{/pgfPerTable/.cd,show title,show period numbers,show group numbers,show legend,legend acronyms,legend acronyms font size,legend back color,%
show legend pins,show extra legend,legend radio color,legend CS color,legend Z color,show blocks=false,show families=false,%
show MNM line,show periodic variations=false,show label LaAc,title font,title color}%
% mixed styles
@@ -189,6 +192,12 @@ group label color/.default=blue!50!black,%
label LaAc font/.get=\pgfPTlabLaAcfont,%
label LaAc font/.store in=\pgfPTlabLaAcfont,%
label LaAc font/.default=\footnotesize\itshape,%
+group numbers/.get=\pgfPTgrnum,% new in v2.1.1
+group numbers/.store in=\pgfPTgrnum,%
+group numbers/.default=arabic,%
+Roman label color/.get=\pgfPTRomanlabgrcolor,% new in v2.1.1
+Roman label color/.store in=\pgfPTRomanlabgrcolor,%
+Roman label color/.default=blue!70!white,%
LaAc/.code=\pgfPT@LaAcstyle{#1},%
LaAc/.default={s=true,f=\footnotesize\itshape},%
per/.code=\pgfPT@perstyle{#1},%
@@ -199,7 +208,30 @@ per+gr/.code=\pgfPT@pergrstyle{#1},%
per+gr/.default={pc=red!50!black,gc=blue!50!black,f=\small\bfseries}%
}%
% setting keys with default values ---------------------------------------------------------------
-\pgfkeys{/pgfPerTable/.cd,label font,period label color,group label color,label LaAc font}%
+\pgfkeys{/pgfPerTable/.cd,label font,period label color,group label color,label LaAc font,group numbers,Roman label color}%
+% Groups in 'old' Roman numerals
+% CAS (USA) ; old IUPAC (Europe) ->
+\newif\ifpgfPT@grRoman@CAS\newif\ifpgfPT@grRoman\newif\ifpgfPT@grarabic%
+\def\pgfPT@gr@numbers#1{\edef\@pgfPT@grnum@atual{#1}\relax%
+\edef\@pgfPT@grnum@CAS{CAS}\edef\@pgfPT@grnum@IUPAC{IUPAC}%
+\edef\@pgfPT@grnum@CASarabic{CAS*}\edef\@pgfPT@grnum@IUPACarabic{IUPAC*}%
+\pgfPT@grRoman@CASfalse\pgfPT@grRomanfalse\pgfPT@grarabicfalse%
+\ifx\@pgfPT@grnum@atual\@pgfPT@grnum@CAS\relax\pgfPT@grRoman@CAStrue\pgfPT@grRomantrue\else%
+\ifx\@pgfPT@grnum@atual\@pgfPT@grnum@IUPAC\relax\pgfPT@grRomantrue\else%
+\ifx\@pgfPT@grnum@atual\@pgfPT@grnum@CASarabic\relax\pgfPT@grRoman@CAStrue\pgfPT@grRomantrue\pgfPT@grarabictrue\else%
+\ifx\@pgfPT@grnum@atual\@pgfPT@grnum@IUPACarabic\relax\pgfPT@grRomantrue\pgfPT@grarabictrue\fi\fi\fi\fi%
+}%
+\def\pgfPT@gr@Roman#1{\edef\@pgfPT@Z@atual{#1}\relax%
+\ifpgfPT@grRoman@CAS% CAS
+\ifcase\@pgfPT@Z@atual\relax\or I\hspace{.1ex}A\or II\hspace{.1ex}A\or III\hspace{.1ex}B\or IV\hspace{.1ex}B\or V\hspace{.1ex}B\or VI\hspace{.1ex}B\or VII\hspace{.1ex}B\or%
+\tikz{\path (0,0);\draw[line width=.2ex] (.1*\pgfPTcellwd,-.55ex) -- (.1*\pgfPTcellwd,0) -- (1.2*\pgfPTcellwd,0);}\or VIII\hspace{.1ex}B\or\tikz[xscale=-1]{\path (0,0);\draw[line width=.2ex] (.1*\pgfPTcellwd,-.55ex) -- (.1*\pgfPTcellwd,0) -- (1.2*\pgfPTcellwd,0);}%
+\or I\hspace{.1ex}B\or II\hspace{.1ex}B\or III\hspace{.1ex}A\or IV\hspace{.1ex}A\or V\hspace{.1ex}A\or VI\hspace{.1ex}A\or VII\hspace{.1ex}A\or VIII\hspace{.1ex}A\fi%
+\else% old IUPAC
+\ifcase\@pgfPT@Z@atual\relax\or I\hspace{.1ex}A\or II\hspace{.1ex}A\or III\hspace{.1ex}A\or IV\hspace{.1ex}A\or V\hspace{.1ex}A\or VI\hspace{.1ex}A\or VII\hspace{.1ex}A\or
+\tikz{\path (0,0);\draw[line width=.2ex] (.1*\pgfPTcellwd,-.55ex) -- (.1*\pgfPTcellwd,0) -- (1.2*\pgfPTcellwd,0);}\or VIII\hspace{.1ex}A\or\tikz[xscale=-1]{\path (0,0);\draw[line width=.2ex] (.1*\pgfPTcellwd,-.55ex) -- (.1*\pgfPTcellwd,0) -- (1.2*\pgfPTcellwd,0);}%
+\or I\hspace{.1ex}B\or II\hspace{.1ex}B\or III\hspace{.1ex}B\or IV\hspace{.1ex}B\or V\hspace{.1ex}B\or VI\hspace{.1ex}B\or VII\hspace{.1ex}B\or0\fi%
+\fi%
+}%
% end !! PGF keys: labels of periods and groups ------------------------------------------------
%
% defining PGF keys: the cells of the periodic table to be drawn -------------------------------
@@ -313,6 +345,20 @@ CS/.default={r=fill and outline,c=black,w=.05,f=\small\bfseries,s=solido,l=liqui
\pgfkeys{/pgfPerTable/.cd,CS font,CS render mode,CS outline color,CS outline width}%
% end !! PGF keys: style for the chemical symbol of the element --------------------------------
%
+% --------------------------------------------------------------------------------------------------
+% defining PGF keys: decimal separator to use in numerical values ----------------------------
+% new in v2.1.5
+\pgfkeys{/pgfPerTable/.cd,%
+decimal separator/.get=\pgfPTdecimalseparator,%
+decimal separator/.store in=\pgfPTdecimalseparator,%
+decimal separator/.default=.,%
+comma separator/.style={decimal separator={,}},%
+dot separator/.style={decimal separator=.}%
+}%
+% setting key with default value ------------------------------------------------------------------
+\pgfkeys{/pgfPerTable/.cd,decimal separator}%
+% end !! PGF keys: decimal separator to use in numerical values -------------------------------
+%
% setting the style for the atomic number box -----------------------------------------------------
\newif\ifpgfZuseboxwidth%
\pgfkeys{/pgfPerTable/.cd,%
@@ -347,7 +393,7 @@ name color/.store in=\pgfPTnamecolor,%
name color/.default=black,%
name font/.get=\pgfPTnamefont,%
name font/.store in=\pgfPTnamefont,%
-name font/.default=\fontseries{l}\selectfont\tiny,%
+name font/.default=\tiny,% \fontseries{l}\selectfont (removed @ v2.1.2)
name align/.get=\pgfPTnamealign,% new v1.0.0
name align/.store in=\pgfPTnamealign,% left|center|right
name align/.default=center%
@@ -444,16 +490,18 @@ eaff font/.default=\tiny\bfseries%
% setting keys with default values -----------------------------------------------------------------
\pgfkeys{/pgfPerTable/.cd,eaff color,eaff font}%
% end !!
+\newif\ifpgfPTORoman% new in v2.1.1
\pgfkeys{/pgfPerTable/.cd,%
O color/.get=\pgfPTOcolor,%
O color/.store in=\pgfPTOcolor,%
O color/.default=black,%
O font/.get=\pgfPTOfont,%
O font/.store in=\pgfPTOfont,%
-O font/.default=\tiny\bfseries%
+O font/.default=\tiny\bfseries,%
+O Roman/.is if=pgfPTORoman% new in v2.1.1
}%
% setting keys with default values -----------------------------------------------------------------
-\pgfkeys{/pgfPerTable/.cd,O color,O font}%
+\pgfkeys{/pgfPerTable/.cd,O color,O font,O Roman=false}%
% end !!
\pgfkeys{/pgfPerTable/.cd,%
Tmelt color/.get=\pgfPTTmeltcolor,%
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgfPT.formatNumbers.tex b/graphics/pgf/contrib/pgf-periodictable/pgfPT.formatNumbers.tex
index 1220d5c229..4a0ff1a907 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgfPT.formatNumbers.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/pgfPT.formatNumbers.tex
@@ -20,8 +20,15 @@
% \pgfPT@formatnumber{decimal places}{number}
\def\pgfPT@formatnumber#1#2{%
\ifx#2\@empty\relax\else%
-\ifnum#1=-1\relax#2% print the number as-is
-\else%
+%\ifnum#1=-1\relax#2% print the number as-is
+\ifnum#1=-1\relax% print the number as-is -> changed in v2.1.5
+\ifx\pgfPTdecimalseparator\pgfPT@dot\relax#2\else% replace . by user decimal separator
+\pgfPT@counta=0\pgfPT@countb=0\pgfPT@countc=0\pgfPT@countd=0\pgfPT@tempfalse\pgfPT@foundfalse%
+\edef\pgfPT@digits@todot{}\edef\pgfPT@digits@afterdot{}\pgfPT@has@minus{#2}%
+\expandafter\pgfPT@numberdecompose\pgfPT@thenum\relax\relax%
+\ifpgfPT@found\expandafter\pgfPT@replaceDot#2\relax\else#2\fi%
+\fi% end replacing . by user decimal separator
+\else% format number to the #1 decimal places
\pgfPT@counta=0\pgfPT@countb=0\pgfPT@countc=0\pgfPT@countd=0\pgfPT@tempfalse\pgfPT@foundfalse%
\edef\pgfPT@digits@todot{}\edef\pgfPT@digits@afterdot{}%
\pgfPT@has@minus{#2}%
@@ -36,7 +43,8 @@
\pgfPT@counte=#1%
\pgfPT@temptrue\expandafter\pgfPT@str@insertdot\pgfPT@digits@toround\relax%
\fi%
-{\pgfPT@num@sign\pgfPT@digits@todot\ifnum#1>0\relax\ifpgfPT@found.\fi\fi\pgfPT@digits@afterdot}%
+%{\pgfPT@num@sign\pgfPT@digits@todot\ifnum#1>0\relax\ifpgfPT@found.\fi\fi\pgfPT@digits@afterdot}%
+{\pgfPT@num@sign\pgfPT@digits@todot\ifnum#1>0\relax\ifpgfPT@found\pgfPTdecimalseparator\fi\fi\pgfPT@digits@afterdot}% changed 1n v2.1.5
\fi\fi%
}%
% --------------------------------------------------------------------------------------------------
@@ -206,4 +214,16 @@
\ifx\pgfPT@tmp\pgfPT@relax\relax\else\@pgfPT@str@len#2 \relax\fi%
}%
% --------------------------------------------------------------------------------------------------
+\def\pgfPT@replaceDot#1.#2\relax{#1\pgfPTdecimalseparator#2}% new in v2.15
+% --------------------------------------------------------------------------------------------------
+\def\pgfPT@formatArstar#1\relax{% new in v2.15
+\setbox0=\hbox{#1}\ifdim\wd0=0pt\relax\relax% no value for Arstar
+\else\expandafter\@pgfPT@formatArstar#1\relax\fi}%
+\def\@pgfPT@formatArstar#1#2\relax{\edef\@pgfPT@sb{[}\edef\@pgfPT@test{#1}%
+\ifx\@pgfPT@sb\@pgfPT@test\relax% Arstar is [value1,value2]
+\def\@pgfPT@Arstarreplacedot[##1.##2,##3.##4]\relax{[##1\pgfPTdecimalseparator##2;##3\pgfPTdecimalseparator##4]}%
+\expandafter\@pgfPT@Arstarreplacedot#1#2\relax\relax%
+\else% Arstar is a number
+\expandafter\pgfPT@replaceDot#1#2\relax\relax%
+\fi}%
\endinput%
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgfPT.names.tex b/graphics/pgf/contrib/pgf-periodictable/pgfPT.names.tex
index 2c321dcd34..b171210b3e 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgfPT.names.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/pgfPT.names.tex
@@ -27,7 +27,7 @@
\def\pgfPT@nomes@iii{l\'{i}tio/pt,lithium/en,lithium/fr,Lithium/de,litio/it,litio/es,l\'{i}tio/br,\pgfPT@user@CSname@Li/user}%
\def\pgfPT@nomes@iv{ber\'{i}lio/pt,beryllium/en,b\'{e}ryllium/fr,Beryllium/de,berillio/it,berilio/es,ber\'{i}lio/br,\pgfPT@user@CSname@Be/user}%
\def\pgfPT@nomes@v{boro/pt,boron/en,bore/fr,Bor/de,boro/it,boro/es,boro/br,\pgfPT@user@CSname@B/user}%
-\def\pgfPT@nomes@vi{carbono/pt,carbon/en,carbone/fr,Kohlenstoff/de,carbonio/it,carb\'{o}n/es,carbono/br,\pgfPT@user@CSname@C/user}%
+\def\pgfPT@nomes@vi{carbono/pt,carbon/en,carbone/fr,Kohlenstoff/de,carbonio/it,carbono/es,carbono/br,\pgfPT@user@CSname@C/user}%
\def\pgfPT@nomes@vii{azoto/pt,nitrogen/en,azote/fr,Stickstoff/de,azoto/it,nitr\'{o}geno/es,nitrog\^{e}nio/br,\pgfPT@user@CSname@N/user}%
\def\pgfPT@nomes@viii{oxig\'{e}nio/pt,oxygen/en,oxyg\`{e}ne/fr,Sauerstoff/de,ossigeno/it,ox\'{i}geno/es,oxig\^{e}nio/br,\pgfPT@user@CSname@O/user}%
\def\pgfPT@nomes@ix{fl\'{u}or/pt,fluorine/en,fluor/fr,Fluor/de,fluoro/it,fl\'{u}or/es,fl\'{u}or/br,\pgfPT@user@CSname@F/user}%
@@ -47,7 +47,7 @@
\def\pgfPT@nomes@xxiii{van\'{a}dio/pt,vanadium/en,vanadium/fr,Vanadium/de,vanadio/it,vanadio/es,van\'{a}dio/br,\pgfPT@user@CSname@V/user}%
\def\pgfPT@nomes@xxiv{cr\'{o}mio/pt,chromium/en,chrome/fr,Chrom/de,cromo/it,cromo/es,cr\^{o}mio/br,\pgfPT@user@CSname@Cr/user}%
\def\pgfPT@nomes@xxv{mangan\'{e}sio/pt,manganese/en,mangan\`{e}se/fr,Mangan/de,manganese/it,manganeso/es,mangan\^{e}s/br,\pgfPT@user@CSname@Mn/user}%
-\def\pgfPT@nomes@xxvi{ferro/pt,iron/en,fer/fr,Eisen/de,ferro/it,planchar/es,ferro/br,\pgfPT@user@CSname@Fe/user}%
+\def\pgfPT@nomes@xxvi{ferro/pt,iron/en,fer/fr,Eisen/de,ferro/it,hierro/es,ferro/br,\pgfPT@user@CSname@Fe/user}%
\def\pgfPT@nomes@xxvii{cobalto/pt,cobalt/en,cobalt/fr,Kobalt/de,cobalto/it,cobalto/es,cobalto/br,\pgfPT@user@CSname@Co/user}%
\def\pgfPT@nomes@xxviii{n\'{i}quel/pt,nickel/en,nickel/fr,Nickel/de,nichel/it,n\'{i}quel/es,n\'{i}quel/br,\pgfPT@user@CSname@Ni/user}%
\def\pgfPT@nomes@xxix{cobre/pt,copper/en,cuivre/fr,Kupfer/de,rame/it,cobre/es,cobre/br,\pgfPT@user@CSname@Cu/user}%
@@ -82,7 +82,7 @@
\def\pgfPT@nomes@lviii{c\'{e}rio/pt,cerium/en,c\'{e}rium/fr,Cer/de,cerio/it,cerio/es,c\'{e}rio/br,\pgfPT@user@CSname@Ce/user}%
\def\pgfPT@nomes@lix{praseod\'{i}mio/pt,praseodymium/en,pras\'{e}odyme/fr,Praseodym/de,praseodimio/it,praseodimio/es,praseod\'{i}mio/br,\pgfPT@user@CSname@Pr/user}%
\def\pgfPT@nomes@lx{neod\'{i}mio/pt,neodymium/en,n\'{e}odyme/fr,Neodym/de,neodimio/it,neodimio/es,neod\'{i}mio/br,\pgfPT@user@CSname@Nd/user}%
-\def\pgfPT@nomes@lxi{prom\'{e}cio/pt,promethium/en,prom\'{e}thium/fr,Promethium/de,prometeo/it,prometeo/es,prom\'{e}cio/br,\pgfPT@user@CSname@Pm/user}%
+\def\pgfPT@nomes@lxi{prom\'{e}cio/pt,promethium/en,prom\'{e}thium/fr,Promethium/de,prometeo/it,prometio/es,prom\'{e}cio/br,\pgfPT@user@CSname@Pm/user}%
\def\pgfPT@nomes@lxii{sam\'{a}rio/pt,samarium/en,samarium/fr,Samarium/de,samario/it,samario/es,sam\'{a}rio/br,\pgfPT@user@CSname@Sm/user}%
\def\pgfPT@nomes@lxiii{eur\'{o}pio/pt,europium/en,europium/fr,Europium/de,europium/it,europio/es,eur\'{o}pio/br,\pgfPT@user@CSname@Eu/user}%
\def\pgfPT@nomes@lxiv{gadol\'{i}nio/pt,gadolinium/en,gadolinium/fr,Gadolinium/de,gadolinio/it,gadolinio/es,gadol\'{i}nio/br,\pgfPT@user@CSname@Gd/user}%
@@ -121,23 +121,23 @@
\def\pgfPT@nomes@xcvii{berqu\'{e}lio/pt,berkelium/en,berkelium/fr,Berkelium/de,berkelium/it,berkelio/es,berqu\'{e}lio/br,\pgfPT@user@CSname@Bk/user}%
\def\pgfPT@nomes@xcviii{calif\'{o}rnio/pt,californium/en,californium/fr,Californium/de,californio/it,californio/es,calif\'{o}rnio/br,\pgfPT@user@CSname@Cf/user}%
\def\pgfPT@nomes@xcix{einst\'{e}nio/pt,einsteinium/en,einsteinium/fr,Einsteinium/de,einsteinio/it,einstenio/es,einst\^{e}nio/br,\pgfPT@user@CSname@Es/user}%
-\def\pgfPT@nomes@c{f\'{e}rmio/pt,fermium/en,fermium/fr,Rermium/de,fermium/it,fermio/es,f\'{e}rmio/br,\pgfPT@user@CSname@Fm/user}%
+\def\pgfPT@nomes@c{f\'{e}rmio/pt,fermium/en,fermium/fr,Fermium/de,fermium/it,fermio/es,f\'{e}rmio/br,\pgfPT@user@CSname@Fm/user}%
\def\pgfPT@nomes@ci{mendel\'{e}vio/pt,mendelevium/en,mendelevium/fr,Mendelevium/de,mendelevio/it,mendelevio/es,mendel\'{e}vio/br,\pgfPT@user@CSname@Md/user}%
\def\pgfPT@nomes@cii{nob\'{e}lio/pt,nobelium/en,nobelium/fr,Nobelium/de,nobelium/it,nobelio/es,nob\'{e}lio/br,\pgfPT@user@CSname@No/user}%
-\def\pgfPT@nomes@ciii{laur\^{e}ncio/pt,lawrencium/en,lawrencium/fr,Lawrencium/de,laurenzio/it,lawrencium/es,laur\^{e}ncio/br,\pgfPT@user@CSname@Lr/user}%
+\def\pgfPT@nomes@ciii{laur\^{e}ncio/pt,lawrencium/en,lawrencium/fr,Lawrencium/de,laurenzio/it,lawrencio/es,laur\^{e}ncio/br,\pgfPT@user@CSname@Lr/user}%
\def\pgfPT@nomes@civ{rutherf\'{o}rdio/pt,rutherfordium/en,rutherfordium/fr,Rutherfordium/de,rutherfordium/it,rutherfordio/es,rutherf\'{o}rdio/br,\pgfPT@user@CSname@Rf/user}%
-\def\pgfPT@nomes@cv{d\'{u}bnio/pt,dubnium/en,dubnium/fr,Dubnium/de,dubnio/it,dubnium/es,d\'{u}bnio/br,\pgfPT@user@CSname@Db/user}%
+\def\pgfPT@nomes@cv{d\'{u}bnio/pt,dubnium/en,dubnium/fr,Dubnium/de,dubnio/it,dubnio/es,d\'{u}bnio/br,\pgfPT@user@CSname@Db/user}%
\def\pgfPT@nomes@cvi{seab\'{o}rgio/pt,seaborgium/en,seaborgium/fr,Seaborgium/de,seaborgio/it,seaborgio/es,seab\'{o}rgio/br,\pgfPT@user@CSname@Sg/user}%
-\def\pgfPT@nomes@cvii{b\'{o}rio/pt,bohrium/en,bohrium/fr,Bohrium/de,bohrio/it,bohrium/es,b\'{o}hrio/br,\pgfPT@user@CSname@Bh/user}%
-\def\pgfPT@nomes@cviii{h\'{a}ssio/pt,hassium/en,hassium/fr,Hassium/de,hassio/it,hassium/es,h\'{a}ssio/br,\pgfPT@user@CSname@Hs/user}%
+\def\pgfPT@nomes@cvii{b\'{o}rio/pt,bohrium/en,bohrium/fr,Bohrium/de,bohrio/it,bohrio/es,b\'{o}hrio/br,\pgfPT@user@CSname@Bh/user}%
+\def\pgfPT@nomes@cviii{h\'{a}ssio/pt,hassium/en,hassium/fr,Hassium/de,hassio/it,hasio/es,h\'{a}ssio/br,\pgfPT@user@CSname@Hs/user}%
\def\pgfPT@nomes@cix{meitn\'{e}rio/pt,meitnerium/en,meitnerium/fr,Meitnerium/de,meitnerio/it,meitnerio/es,meitn\'{e}rio/br,\pgfPT@user@CSname@Mt/user}%
-\def\pgfPT@nomes@cx{darmst\'{a}dio/pt,darmstadtium/en,darmstadtium/fr,Darmstadtium/de,darmstadtium/it,darmstadtium/es,darmst\'{a}dtio/br,\pgfPT@user@CSname@Ds/user}%
+\def\pgfPT@nomes@cx{darmst\'{a}dio/pt,darmstadtium/en,darmstadtium/fr,Darmstadtium/de,darmstadtium/it,darmstatio/es,darmst\'{a}dtio/br,\pgfPT@user@CSname@Ds/user}%
\def\pgfPT@nomes@cxi{roentg\'{e}nio/pt,roentgenium/en,roentgenium/fr,R\"{o}ntgenium/de,roentgenio/it,roentgenio/es,roentg\^{e}nio/br,\pgfPT@user@CSname@Rg/user}%
\def\pgfPT@nomes@cxii{copern\'{i}cio/pt,copernicium/en,copernicium/fr,Copernicium/de,copernicium/it,copernicio/es,copern\'{i}cio/br,\pgfPT@user@CSname@Cn/user}%
\def\pgfPT@nomes@cxiii{nip\'{o}nio/pt,nihonium/en,nihonium/fr,Nihonium/de,nihonium/it,nihonio/es,nip\^{o}nio/br,\pgfPT@user@CSname@Nh/user}%
\def\pgfPT@nomes@cxiv{fler\'{o}vio/pt,flerovium/en,flerovium/fr,Flerovium/de,flerovio/it,flerovio/es,fler\'{o}vio/br,\pgfPT@user@CSname@Fl/user}%
\def\pgfPT@nomes@cxv{mosc\'{o}vio/pt,moscovium/en,moscovium/fr,Moscovium/de,moscovium/it,moscovio/es,mosc\'{o}vio/br,\pgfPT@user@CSname@Mc/user}%
-\def\pgfPT@nomes@cxvi{liverm\'{o}rio/pt,livermorium/en,livermorium/fr,Livermorium/de,livermorio/it,livermorium/es,liverm\'{o}rio/br,\pgfPT@user@CSname@Lv/user}%
+\def\pgfPT@nomes@cxvi{liverm\'{o}rio/pt,livermorium/en,livermorium/fr,Livermorium/de,livermorio/it,livermorio/es,liverm\'{o}rio/br,\pgfPT@user@CSname@Lv/user}%
\def\pgfPT@nomes@cxvii{tenesso/pt,tennessine/en,tennessine/fr,Tenness/de,tennessine/it,teneso/es,tenesso/br,\pgfPT@user@CSname@Ts/user}%
\def\pgfPT@nomes@cxviii{ogan\'{e}sson/pt,oganesson/en,oganesson/fr,Oganesson/de,oganesson/it,oganes\'{o}n/es,oganess\^{o}nio/br,\pgfPT@user@CSname@Og/user}%
\endinput%
diff --git a/graphics/pgf/contrib/pgf-periodictable/translations/pgfPT.lang.zh.tex b/graphics/pgf/contrib/pgf-periodictable/translations/pgfPT.lang.zh.tex
new file mode 100644
index 0000000000..afbb70e089
--- /dev/null
+++ b/graphics/pgf/contrib/pgf-periodictable/translations/pgfPT.lang.zh.tex
@@ -0,0 +1,269 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% --------------------------------------------------------------------------------------------------
+% subfile of pgf-PeriodicTable package ----------------------------------------------------------
+% --------------------------------------------------------------------------------------------------
+%
+% Translation file for Chinese
+% Author: Fan Hongtao @2024/10/03
+%
+% --------------------------------------------------------------------------------------------------
+% This is file lang.zh.tex
+% Version: 1
+% Revision: 0
+% Date: 2024/10/03
+% Provides translation of data used
+% in pgf-PeriodicTable files
+% Language: Chinese
+% ISO 639-1 code: zh
+% ----------------------------
+\def\pgfPT@user@labels@titulo{元素周期表}%
+% ----------------------------
+\def\pgfPT@user@labels@La{镧系元素}%
+\def\pgfPT@user@labels@Ac{锕系元素}%
+% ----------------------------
+\def\pgfPT@user@labels@solido{固态}%
+\def\pgfPT@user@labels@liquido{液态}%
+\def\pgfPT@user@labels@gasoso{气态}%
+\def\pgfPT@user@labels@sintetico{人造}%
+% ----------------------------
+% labels for legend
+\def\pgfPT@user@labels@Z{原子序数}%
+\def\pgfPT@user@labels@name{元素名称}%
+\def\pgfPT@user@labels@CS{元素符号}%
+\def\pgfPT@user@labels@Ar@m{相对原子质量}%
+\def\pgfPT@user@labels@Arstar@m{标准相对原子质量}%
+\def\pgfPT@user@labels@Ar@w{原子量}%
+\def\pgfPT@user@labels@Arstar@w{原子量}%
+\def\pgfPT@user@labels@radio{放射性}%
+\def\pgfPT@user@labels@R{原子半径}%
+\def\pgfPT@user@labels@Rcov{共价半径}%
+\def\pgfPT@user@labels@Rion{离子半径}%
+\def\pgfPT@user@labels@Ei{电离能}%
+\def\pgfPT@user@labels@eneg{电负性}%
+\def\pgfPT@user@labels@eaff{电亲和性}%
+\def\pgfPT@user@labels@O{氧化态}%
+\def\pgfPT@user@labels@Tmelt{熔点}%
+\def\pgfPT@user@labels@TmeltC{熔点}%
+\def\pgfPT@user@labels@Tboil{沸点}%
+\def\pgfPT@user@labels@TboilC{沸点}%
+\def\pgfPT@user@labels@eDist{电子分布}%
+\def\pgfPT@user@labels@eConfig{电子构型}%
+\def\pgfPT@user@labels@d{密度}%
+\def\pgfPT@user@labels@Cp{比热容}%
+\def\pgfPT@user@labels@kT{导热系数}%
+\def\pgfPT@user@labels@ls{晶格结构}%
+\def\pgfPT@user@labels@lsa{晶格常数: a}%
+\def\pgfPT@user@labels@lsb{晶格常数: b}%
+\def\pgfPT@user@labels@lsc{晶格常数: c}%
+\def\pgfPT@user@labels@lsca{晶格c/a比}%
+\def\pgfPT@user@labels@DiscY{发现年份}%
+% Before Christ acronym:
+\def\pgfPT@user@labels@BC{公元前}%
+\def\pgfPT@user@labels@DiscC{发现国}%
+\def\pgfPT@user@labels@spectra{发射光谱}%
+% ----------------------------
+% acronym to use in legend
+% for 'Name'
+\def\pgfPT@user@acr@name{N}%
+% for 'Chemical Symbol'
+\def\pgfPT@user@acr@CS{CS}%
+% for 'Radioactive'
+\def\pgfPT@user@acr@radio{Ra}%
+% for 'Melting Point'
+\def\pgfPT@user@acr@Tmelt{MP}%
+% for 'Boiling Point'
+\def\pgfPT@user@acr@Tboil{BP}%
+% for 'Electron Distribution'
+\def\pgfPT@user@acr@eDist{ed}%
+% for 'Electronic Configuration'
+\def\pgfPT@user@acr@eConfign{ec}%
+% for 'Lattice Structure'
+\def\pgfPT@user@acr@ls{ls}%
+% for 'Lattice constant: a'
+\def\pgfPT@user@acr@lsa{ls a}%
+% for 'Lattice constant: b'
+\def\pgfPT@user@acr@lsb{ls b}%
+% for 'Lattice constant: c'
+\def\pgfPT@user@acr@lsc{ls c}%
+% for 'Lattice c/a ratio'
+\def\pgfPT@user@acr@lsca{ls ca}%
+% for 'Year of Discovery'
+\def\pgfPT@user@acr@DiscY{yd}%
+% for 'Country of Discovery'
+\def\pgfPT@user@acr@DiscC{cd}%
+% for 'Emission Spectrum'
+\def\pgfPT@user@acr@spectra{es}%
+% ----------------------------
+% blocks
+\def\pgfPT@user@labels@blocos{S区元素}%
+\def\pgfPT@user@labels@blocop{P区元素}%
+\def\pgfPT@user@labels@blocod{D区元素}%
+\def\pgfPT@user@labels@blocof{F区元素}%
+% ----------------------------
+\def\pgfPT@user@labels@blocor{代表性元素}%
+\def\pgfPT@user@labels@blocot{过渡金属}%
+\def\pgfPT@user@labels@blocoi{内部过渡金属}%
+% ----------------------------
+% periodic variations
+\def\pgfPT@user@labels@Raum{原子半径沿群增加}%
+\def\pgfPT@user@labels@Rdim{原子半径随着时间的推移而减小}%
+\def\pgfPT@user@labels@Eiaum{电离能随着时间的推移而增加}%
+\def\pgfPT@user@labels@Eidim{电离能沿群方向降低}%
+\def\pgfPT@user@labels@eaffaum{电子亲和力随着时间的推移而增加}%
+\def\pgfPT@user@labels@eaffdim{电子亲和力沿基团方向降低}%
+% ----------------------------
+% lattice structure:
+\def\pgfPT@user@labels@ls@bcc{体心立方}%
+\def\pgfPT@user@labels@ls@bcort{底心正交}%
+\def\pgfPT@user@labels@ls@ctetr{体心四方}%
+\def\pgfPT@user@labels@ls@dia{菱形}%
+\def\pgfPT@user@labels@ls@fcc{面心立方}%
+\def\pgfPT@user@labels@ls@fcort{面心正交}%
+\def\pgfPT@user@labels@ls@hcp{密排六方}%
+\def\pgfPT@user@labels@ls@hex{六方}%
+\def\pgfPT@user@labels@ls@mono{单斜}%
+\def\pgfPT@user@labels@ls@rho{菱面}%
+\def\pgfPT@user@labels@ls@sc{简单立方}%
+\def\pgfPT@user@labels@ls@tric{简单三斜}%
+\def\pgfPT@user@labels@ls@tetr{四方}%
+% ----------------------------
+% element names
+\def\pgfPT@user@CSname@H{氢}%
+\def\pgfPT@user@CSname@He{氦}%
+\def\pgfPT@user@CSname@Li{锂}%
+\def\pgfPT@user@CSname@Be{铍}%
+\def\pgfPT@user@CSname@B{硼}%
+\def\pgfPT@user@CSname@C{碳}%
+\def\pgfPT@user@CSname@N{氮}%
+\def\pgfPT@user@CSname@O{氧}%
+\def\pgfPT@user@CSname@F{氟}%
+\def\pgfPT@user@CSname@Ne{氖}%
+\def\pgfPT@user@CSname@Na{钠}%
+\def\pgfPT@user@CSname@Mg{镁}%
+\def\pgfPT@user@CSname@Al{铝}%
+\def\pgfPT@user@CSname@Si{硅}%
+\def\pgfPT@user@CSname@P{磷}%
+\def\pgfPT@user@CSname@S{硫}%
+\def\pgfPT@user@CSname@Cl{氯}%
+\def\pgfPT@user@CSname@Ar{氩}%
+\def\pgfPT@user@CSname@K{钾}%
+\def\pgfPT@user@CSname@Ca{钙}%
+\def\pgfPT@user@CSname@Sc{钪}%
+\def\pgfPT@user@CSname@Ti{钛}%
+\def\pgfPT@user@CSname@V{钒}%
+\def\pgfPT@user@CSname@Cr{铬}%
+\def\pgfPT@user@CSname@Mn{锰}%
+\def\pgfPT@user@CSname@Fe{铁}%
+\def\pgfPT@user@CSname@Co{钴}%
+\def\pgfPT@user@CSname@Ni{镍}%
+\def\pgfPT@user@CSname@Cu{铜}%
+\def\pgfPT@user@CSname@Zn{锌}%
+\def\pgfPT@user@CSname@Ga{镓}%
+\def\pgfPT@user@CSname@Ge{锗}%
+\def\pgfPT@user@CSname@As{砷}%
+\def\pgfPT@user@CSname@Se{硒}%
+\def\pgfPT@user@CSname@Br{溴}%
+\def\pgfPT@user@CSname@Kr{氪}%
+\def\pgfPT@user@CSname@Rb{铷}%
+\def\pgfPT@user@CSname@Sr{锶}%
+\def\pgfPT@user@CSname@Y{钇}%
+\def\pgfPT@user@CSname@Zr{锆}%
+\def\pgfPT@user@CSname@Nb{铌}%
+\def\pgfPT@user@CSname@Mo{钼}%
+\def\pgfPT@user@CSname@Tc{锝}%
+\def\pgfPT@user@CSname@Ru{钌}%
+\def\pgfPT@user@CSname@Rh{铑}%
+\def\pgfPT@user@CSname@Pd{钯}%
+\def\pgfPT@user@CSname@Ag{银}%
+\def\pgfPT@user@CSname@Cd{镉}%
+\def\pgfPT@user@CSname@In{铟}%
+\def\pgfPT@user@CSname@Sn{锡}%
+\def\pgfPT@user@CSname@Sb{锑}%
+\def\pgfPT@user@CSname@Te{碲}%
+\def\pgfPT@user@CSname@I{碘}%
+\def\pgfPT@user@CSname@Xe{氙}%
+\def\pgfPT@user@CSname@Cs{铯}%
+\def\pgfPT@user@CSname@Ba{钡}%
+\def\pgfPT@user@CSname@La{镧}%
+\def\pgfPT@user@CSname@Ce{铈}%
+\def\pgfPT@user@CSname@Pr{镨}%
+\def\pgfPT@user@CSname@Nd{钕}%
+\def\pgfPT@user@CSname@Pm{钷}%
+\def\pgfPT@user@CSname@Sm{钐}%
+\def\pgfPT@user@CSname@Eu{铕}%
+\def\pgfPT@user@CSname@Gd{钆}%
+\def\pgfPT@user@CSname@Tb{铽}%
+\def\pgfPT@user@CSname@Dy{镝}%
+\def\pgfPT@user@CSname@Ho{钬}%
+\def\pgfPT@user@CSname@Er{铒}%
+\def\pgfPT@user@CSname@Tm{铥}%
+\def\pgfPT@user@CSname@Yb{镱}%
+\def\pgfPT@user@CSname@Lu{镥}%
+\def\pgfPT@user@CSname@Hf{铪}%
+\def\pgfPT@user@CSname@Ta{钽}%
+\def\pgfPT@user@CSname@W{钨}%
+\def\pgfPT@user@CSname@Re{铼}%
+\def\pgfPT@user@CSname@Os{锇}%
+\def\pgfPT@user@CSname@Ir{铱}%
+\def\pgfPT@user@CSname@Pt{铂}%
+\def\pgfPT@user@CSname@Au{金}%
+\def\pgfPT@user@CSname@Hg{汞}%
+\def\pgfPT@user@CSname@Tl{铊}%
+\def\pgfPT@user@CSname@Pb{铅}%
+\def\pgfPT@user@CSname@Bi{铋}%
+\def\pgfPT@user@CSname@Po{钋}%
+\def\pgfPT@user@CSname@At{砹}%
+\def\pgfPT@user@CSname@Rn{氡}%
+\def\pgfPT@user@CSname@Fr{钫}%
+\def\pgfPT@user@CSname@Ra{镭}%
+\def\pgfPT@user@CSname@Ac{锕}%
+\def\pgfPT@user@CSname@Th{钍}%
+\def\pgfPT@user@CSname@Pa{镤}%
+\def\pgfPT@user@CSname@U{铀}%
+\def\pgfPT@user@CSname@Np{镎}%
+\def\pgfPT@user@CSname@Pu{钚}%
+\def\pgfPT@user@CSname@Am{镅}%
+\def\pgfPT@user@CSname@Cm{锔}%
+\def\pgfPT@user@CSname@Bk{锫}%
+\def\pgfPT@user@CSname@Cf{锎}%
+\def\pgfPT@user@CSname@Es{锿}%
+\def\pgfPT@user@CSname@Fm{镄}%
+\def\pgfPT@user@CSname@Md{钔}%
+\def\pgfPT@user@CSname@No{锘}%
+\def\pgfPT@user@CSname@Lr{铹}%
+\def\pgfPT@user@CSname@Rf{{\setmainfont{\pgfPT@fontzhSSB}𬬻}}%
+\def\pgfPT@user@CSname@Db{{\setmainfont{\pgfPT@fontzhSSB}𬭊}}%
+\def\pgfPT@user@CSname@Sg{{\setmainfont{\pgfPT@fontzhSSB}𬭳}}%
+\def\pgfPT@user@CSname@Bh{{\setmainfont{\pgfPT@fontzhSSB}𬭛}}%
+\def\pgfPT@user@CSname@Hs{{\setmainfont{\pgfPT@fontzhSSB}𬭶}}%
+\def\pgfPT@user@CSname@Mt{{\setmainfont{\pgfPT@fontzhSS}鿏}}%
+\def\pgfPT@user@CSname@Ds{{\setmainfont{\pgfPT@fontzhSSB}𫟼}}%
+\def\pgfPT@user@CSname@Rg{{\setmainfont{\pgfPT@fontzhSSB}𬬭}}%
+\def\pgfPT@user@CSname@Cn{{\setmainfont{\pgfPT@fontzhSS}鿔}}%
+\def\pgfPT@user@CSname@Nh{{\setmainfont{\pgfPT@fontzhSS}鿭}}%
+\def\pgfPT@user@CSname@Fl{{\setmainfont{\pgfPT@fontzhSSB}𫓧}}%
+\def\pgfPT@user@CSname@Mc{镆}%
+\def\pgfPT@user@CSname@Lv{{\setmainfont{\pgfPT@fontzhSSLv}𫟷}}%
+\def\pgfPT@user@CSname@Ts{{\setmainfont{\pgfPT@fontzhSS}鿬}}%
+\def\pgfPT@user@CSname@Og{{\setmainfont{\pgfPT@fontzhSS}鿫}}%
+% ----------------------------
+% Country (or Region) names
+\def\pgfPT@user@country@AM{小亚细亚}%
+\def\pgfPT@user@country@au{奥地利}%
+\def\pgfPT@user@country@dn{丹麦}%
+\def\pgfPT@user@country@eg{埃及}%
+\def\pgfPT@user@country@fl{芬兰}%
+\def\pgfPT@user@country@fr{法国}%
+\def\pgfPT@user@country@de{德国}%
+\def\pgfPT@user@country@it{意大利}%
+\def\pgfPT@user@country@ME{中东}%
+\def\pgfPT@user@country@pe{秘鲁}%
+\def\pgfPT@user@country@ro{罗马尼亚}%
+\def\pgfPT@user@country@ru{俄罗斯}%
+\def\pgfPT@user@country@es{西班牙}%
+\def\pgfPT@user@country@sw{瑞典}%
+\def\pgfPT@user@country@ch{瑞士}%
+\def\pgfPT@user@country@uk{英国}%
+\def\pgfPT@user@country@us{美国}%
+\def\pgfPT@user@country@mx{墨西哥}%
+\endinput%
diff --git a/graphics/pgf/contrib/pgf-spectra/README b/graphics/pgf/contrib/pgf-spectra/README
index 3f4fef79e2..12c4c6b8ad 100644
--- a/graphics/pgf/contrib/pgf-spectra/README
+++ b/graphics/pgf/contrib/pgf-spectra/README
@@ -1,4 +1,4 @@
-This is pgf-spectra, version 3.0.1 (27/04/2023).
+This is pgf-spectra, version 3.0.1a (07/07/2024).
This package provides the \pgfspectra[<options>] command which draws continuous and emission or absorption spectra for 98 elements and their ions.
It was developed mainly for the writing of my own documentation and exams sheets supporting directly PDF output format.
@@ -7,7 +7,7 @@ It also allows the user to draw a spectrum with their own personal data.
The lines data extends from Extreme UV to Near IR (from 10 to 4000 nanometers).
It is possible to redshift the lines of a spectrum, by directly entering the redshift value or the velocity and the angle to compute the redshift value.
Spectral lines data can be presented in a table or exported to a file.
-This package also provides color conversion (correlated color temperature), shadings for use with TikZ and/or PGFPLOTS, color maps for use with PGFPLOTS,
+This package also provides color conversion (correlated color temperature), shadings for use with TikZ and/or PGFPLOTS, color maps for use with PGFPLOTS,
displaying the spectral lines in a table and exporting the lines data files.
____________________________________________________________
@@ -18,13 +18,24 @@ ____________________________________________________________
** Licence: released under the LaTeX Project Public License v1.3 or later, see http://www.latex-project.org/lppl.txt
____________________________________________________________
+*** v3.0.1a (07/07/2024) ***
+Removed lines data outside the range 10nm - 4000nm (H, He, Be, C, Si, Kr, Sn, I) in LSE data file, which generate a package warning, e.g.
+«Package pgf-spectra Warning: invalid wavelength (4051.1602nm). The wavelength must be lesser or equal to 4000nm (NIR)... on input line 27».
+Fixed chemical symbol label width producing incorrect alignment on consecutive lines for the spectrum of some elements, e.g.
+-------------------------------------------------------
+\pgfspectraStyle[axis,begin=400,end=700,axis step=20,axis ticks=9,axis color=lightgray, axis font color=black,label,width=.88\textwidth,height=0.7cm]
+\noindent\pgfspectra[element=Cl]
+
+\noindent\pgfspectra[element=Rn]
+-------------------------------------------------------
+
*** v3.0.1 (27/04/2023) ***
-Fixed a small bug dealing with the 'axis label'/'axis label text' background color, which occurred when setting a visible background with the 'back' key, e.g.,
+Fixed a small bug dealing with the 'axis label'/'axis label text' background color, which occurred when setting a visible background with the 'back' key, e.g.,
\pgfspectra[element=H,axis label text={wavenumber in nanometer},back=visible50]
*** v3.0.0 (25/04/2023) ***
-In the \pgfspectra command, syntax for the key 'lines' has been updated: it is now possible to specify a continuous range using 'start wavelength to end
+In the \pgfspectra command, syntax for the key 'lines' has been updated: it is now possible to specify a continuous range using 'start wavelength to end
wavelength', for instance, 'lines={380 to 500}' or 'lines={380 to 500,633}' or 'lines={633,555,380 to 500}'.
New keys for \pgfspectra:
- axis label
@@ -45,12 +56,12 @@ ____________________________________________________________
Previous versions
*** v2.2.0 (21/02/2023) ***
-LSE data renormalized to lower values within TeX capabilities. This prevents 'Dimension too large' errors and subsequent errors in spectrum drawing when
+LSE data renormalized to lower values within TeX capabilities. This prevents 'Dimension too large' errors and subsequent errors in spectrum drawing when
using the 'relative intensity' key.
-Added maximum intensities in IR, visible an UV ranges for both data sources (NIST and LSE). Now, when using the 'relative intensity' key, the interval of
-wavelengths is detected and the respective maximum intensity is used. For example, if the spectrum is within the visible range, say between 400 and 700
-nanometers, the maximum visible intensity will be used. The same is true for ranges only in IR or UV ranges. But, if the spectrum to be drawn is in more
-than one region - for example, from 300 to 1000 or from 400 to 1000 or from 300 to 700 nanometers - the maximum intensity that will be used is defined
+Added maximum intensities in IR, visible an UV ranges for both data sources (NIST and LSE). Now, when using the 'relative intensity' key, the interval of
+wavelengths is detected and the respective maximum intensity is used. For example, if the spectrum is within the visible range, say between 400 and 700
+nanometers, the maximum visible intensity will be used. The same is true for ranges only in IR or UV ranges. But, if the spectrum to be drawn is in more
+than one region - for example, from 300 to 1000 or from 400 to 1000 or from 300 to 700 nanometers - the maximum intensity that will be used is defined
as the maximum intensity of all data.
Fixed some typos in the manual.
diff --git a/graphics/pgf/contrib/pgf-spectra/pgf-spectra.data.LSE.tex b/graphics/pgf/contrib/pgf-spectra/pgf-spectra.data.LSE.tex
index 53303b35f6..9bb4004bfb 100644
--- a/graphics/pgf/contrib/pgf-spectra/pgf-spectra.data.LSE.tex
+++ b/graphics/pgf/contrib/pgf-spectra/pgf-spectra.data.LSE.tex
@@ -31,12 +31,12 @@
% (see Es, Bk...)
%
\protected\def\pgfspectra@elt@data#1{\relax\ignorespaces\global\pgfspectra@datanotfoundtrue\relax%
-\pgfspectra@elt@search{#1}{H}{[92.6226 15 0],[93.0748 20 0],[93.7803 30 0],[94.9743 50 0],[97.2537 100 0],[102.5722 300 0],[121.5668 1000 0],[121.5674 500 0],[383.5384 5 0],[388.9049 6 0],[397.0072 8 0],[410.174 15 0],[434.047 30 0],[486.133 80 0],[656.272 120 0],[656.2852 180 0],[954.597 5 0],[1004.94 7 0],[1093.81 12 0],[1281.81 20 0],[1875.1 40 0],[2165.5301 5 0],[2625.15 8 0],[4051.1602 15 0],[4652.5102 4 0],[7457.8 6 0],[12368.5 3 0]}{ALLx1000x1000x0x0x0x0x0}{UVx1000x1000x0x0x0x0x0}{VISx180x180x0x0x0x0x0}{IVx40x40x0x0x0x0x0}%
-\pgfspectra@elt@search{#1}{He}{[23.1454 15 1],[23.2584 20 1],[23.4347 30 1],[23.7331 50 1],[24.3027 100 1],[25.6317 300 1],[30.378 1000 1],[30.3786 500 1],[32.0293 10 0],[50.55 2 0],[50.5684 3 0],[50.5912 4 0],[50.62 5 0],[50.657 7 0],[50.7058 10 0],[50.7718 15 0],[50.8643 20 0],[50.9998 25 0],[51.2098 35 0],[51.5616 50 0],[52.2213 100 0],[53.703 400 0],[58.4334 1000 0],[59.1412 50 0],[95.87 5 1],[97.211 6 1],[99.236 8 1],[102.527 15 1],[108.494 30 1],[121.509 35 1],[121.517 50 1],[164.034 120 1],[164.047 180 1],[238.54 7 1],[251.12 9 1],[257.76 50 0],[272.319 1 0],[273.33 12 1],[276.38 2 0],[281.82 10 0],[282.908 4 0],[294.511 10 0],[301.37 40 0],[318.774 20 0],[320.296 3 1],[320.31 15 1],[335.455 1 0],[344.759 2 0],[358.727 1 0],[361.364 3 0],[363.423 2 0],[370.5 3 0],[373.286 1 0],[381.9607 10 0],[381.976 1 0],[388.865 500 0],[396.4729 20 0],[400.927 1 0],[402.6191 50 0],[402.636 5 0],[412.082 12 0],[412.099 2 0],[414.376 3 0],[438.7929 10 0],[443.755 3 0],[447.1479 200 0],[447.168 25 0],[468.54 6 1],[468.57 30 1],[471.3146 30 0],[471.338 4 0],[492.1931 20 0],[501.5678 100 0],[504.774 10 0],[541.152 5 1],[587.562 500 0],[587.597 100 0],[656.01 8 1],[667.815 100 0],[686.748 3 0],[706.519 200 0],[706.571 30 0],[728.135 50 0],[781.615 1 0],[836.169 2 0],[906.327 2 0],[921.034 2 0],[946.361 10 0],[951.66 4 0],[952.617 3 0],[952.927 1 0],[960.342 1 0],[970.26 3 0],[1002.773 6 0],[1003.116 2 0],[1012.36 15 1],[1013.85 1 0],[1031.123 10 0],[1031.154 2 0],[1066.765 3 0],[1082.909 300 0],[1083.025 1000 0],[1083.034 2000 0],[1091.305 9 0],[1091.71 3 0],[1162.64 4 1],[1196.912 30 0],[1252.752 20 0],[1278.499 50 0],[1279.057 20 0],[1284.596 7 0],[1296.845 10 0],[1298.489 2 0],[1508.364 12 0],[1700.2471 200 0],[1855.5551 1 0],[1863.6801 6 1],[1868.534 500 0],[1869.723 200 0],[1908.9381 100 0],[1954.308 20 0],[2058.1301 1000 0],[2112.007 80 0],[2112.143 10 0],[2113.2029 20 0],[3090.85 3 1],[4047.8898 4 0]}{ALLx2000x2000x1000x0x0x0x0}{UVx1000x1000x1000x0x0x0x0}{VISx500x500x30x0x0x0x0}{IVx2000x2000x15x0x0x0x0}%
+\pgfspectra@elt@search{#1}{H}{[92.6226 15 0],[93.0748 20 0],[93.7803 30 0],[94.9743 50 0],[97.2537 100 0],[102.5722 300 0],[121.5668 1000 0],[121.5674 500 0],[383.5384 5 0],[388.9049 6 0],[397.0072 8 0],[410.174 15 0],[434.047 30 0],[486.133 80 0],[656.272 120 0],[656.2852 180 0],[954.597 5 0],[1004.94 7 0],[1093.81 12 0],[1281.81 20 0],[1875.1 40 0],[2165.5301 5 0],[2625.15 8 0]}{ALLx1000x1000x0x0x0x0x0}{UVx1000x1000x0x0x0x0x0}{VISx180x180x0x0x0x0x0}{IVx40x40x0x0x0x0x0}%,[4051.1602 15 0],[4652.5102 4 0],[7457.8 6 0],[12368.5 3 0]
+\pgfspectra@elt@search{#1}{He}{[23.1454 15 1],[23.2584 20 1],[23.4347 30 1],[23.7331 50 1],[24.3027 100 1],[25.6317 300 1],[30.378 1000 1],[30.3786 500 1],[32.0293 10 0],[50.55 2 0],[50.5684 3 0],[50.5912 4 0],[50.62 5 0],[50.657 7 0],[50.7058 10 0],[50.7718 15 0],[50.8643 20 0],[50.9998 25 0],[51.2098 35 0],[51.5616 50 0],[52.2213 100 0],[53.703 400 0],[58.4334 1000 0],[59.1412 50 0],[95.87 5 1],[97.211 6 1],[99.236 8 1],[102.527 15 1],[108.494 30 1],[121.509 35 1],[121.517 50 1],[164.034 120 1],[164.047 180 1],[238.54 7 1],[251.12 9 1],[257.76 50 0],[272.319 1 0],[273.33 12 1],[276.38 2 0],[281.82 10 0],[282.908 4 0],[294.511 10 0],[301.37 40 0],[318.774 20 0],[320.296 3 1],[320.31 15 1],[335.455 1 0],[344.759 2 0],[358.727 1 0],[361.364 3 0],[363.423 2 0],[370.5 3 0],[373.286 1 0],[381.9607 10 0],[381.976 1 0],[388.865 500 0],[396.4729 20 0],[400.927 1 0],[402.6191 50 0],[402.636 5 0],[412.082 12 0],[412.099 2 0],[414.376 3 0],[438.7929 10 0],[443.755 3 0],[447.1479 200 0],[447.168 25 0],[468.54 6 1],[468.57 30 1],[471.3146 30 0],[471.338 4 0],[492.1931 20 0],[501.5678 100 0],[504.774 10 0],[541.152 5 1],[587.562 500 0],[587.597 100 0],[656.01 8 1],[667.815 100 0],[686.748 3 0],[706.519 200 0],[706.571 30 0],[728.135 50 0],[781.615 1 0],[836.169 2 0],[906.327 2 0],[921.034 2 0],[946.361 10 0],[951.66 4 0],[952.617 3 0],[952.927 1 0],[960.342 1 0],[970.26 3 0],[1002.773 6 0],[1003.116 2 0],[1012.36 15 1],[1013.85 1 0],[1031.123 10 0],[1031.154 2 0],[1066.765 3 0],[1082.909 300 0],[1083.025 1000 0],[1083.034 2000 0],[1091.305 9 0],[1091.71 3 0],[1162.64 4 1],[1196.912 30 0],[1252.752 20 0],[1278.499 50 0],[1279.057 20 0],[1284.596 7 0],[1296.845 10 0],[1298.489 2 0],[1508.364 12 0],[1700.2471 200 0],[1855.5551 1 0],[1863.6801 6 1],[1868.534 500 0],[1869.723 200 0],[1908.9381 100 0],[1954.308 20 0],[2058.1301 1000 0],[2112.007 80 0],[2112.143 10 0],[2113.2029 20 0],[3090.85 3 1]}{ALLx2000x2000x1000x0x0x0x0}{UVx1000x1000x1000x0x0x0x0}{VISx500x500x30x0x0x0x0}{IVx2000x2000x15x0x0x0x0}%,[4047.8898 4 0]
\pgfspectra@elt@search{#1}{Li}{[149.293 3 1],[149.297 5 1],[149.304 1 1],[165.308 3 1],[165.313 5 1],[165.321 1 1],[233.688 3 1],[233.691 5 1],[233.7 2 1],[239.439 1 0],[242.543 3 0],[247.506 10 0],[255.17 24 1],[256.231 15 0],[265.729 2 1],[265.73 3 1],[272.824 0 1],[272.829 5 1],[272.832 2 1],[273.047 3 1],[273.055 1 1],[274.12 5 0],[293.402 2 1],[293.407 2 1],[293.412 5 1],[293.425 1 1],[302.912 3 1],[302.914 3 1],[315.531 3 1],[315.533 4 1],[319.626 1 1],[319.633 9 1],[319.636 4 1],[319.933 5 1],[319.943 2 1],[323.266 17 0],[371.4 1 1],[371.416 5 1],[371.427 6 1],[371.429 8 1],[371.44 7 1],[371.441 10 1],[371.451 1 1],[371.458 0 1],[371.87 3 0],[379.472 6 0],[391.53 20 0],[391.535 20 0],[398.548 10 0],[398.554 10 0],[413.256 40 0],[413.262 40 0],[427.307 20 0],[427.313 20 0],[432.542 5 1],[432.547 5 1],[432.554 1 1],[460.283 13 0],[460.289 13 0],[467.151 0 1],[467.165 6 1],[467.17 2 1],[467.806 3 1],[467.829 1 1],[488.132 4 1],[488.139 4 1],[488.149 1 1],[497.166 8 0],[497.175 8 0],[548.355 600 1],[548.565 600 1],[610.354 320 0],[610.365 320 0],[670.776 3600 0],[670.791 3600 0],[812.623 48 0],[812.645 48 0]}{ALLx3600x3600x600x0x0x0x0}{UVx24x17x24x0x0x0x0}{VISx3600x3600x600x0x0x0x0}{IVx48x48x0x0x0x0x0}%
-\pgfspectra@elt@search{#1}{Be}{[7.61 1 2],[7.648 2 2],[7.853 3 2],[7.866 4 2],[7.892 1 2],[8.189 5 2],[8.238 10 2],[8.32 20 2],[8.476 30 2],[8.831 50 2],[10.025 100 2],[50.999 3 2],[54.931 2 2],[58.208 6 2],[66.132 4 2],[67.559 8 2],[72.559 4 2],[72.571 5 1],[74.358 5 1],[74.623 7 2],[76.775 2 2],[77.537 8 1],[84.206 20 1],[92.525 2 1],[94.356 10 1],[97.327 10 1],[102.693 8 1],[103.632 5 1],[104.823 15 1],[111.469 1 2],[114.303 20 1],[119.719 60 1],[121.312 2 2],[121.432 1 2],[136.225 2 2],[140.152 1 2],[142.126 10 2],[142.286 5 2],[143.517 1 2],[144.077 2 2],[151.23 20 1],[151.243 60 1],[166.149 100 0],[175.469 2 2],[177.612 15 1],[177.634 20 1],[191.703 3 2],[192.967 5 0],[194.368 10 0],[195.497 60 2],[196.459 50 0],[198.513 5 0],[199.801 60 0],[205.59 50 0],[205.601 100 0],[207.694 75 2],[208.038 60 2],[211.856 25 2],[212.227 15 2],[212.557 10 0],[212.568 20 0],[212.72 15 2],[213.725 5 2],[214.5 25 0],[217.499 55 0],[217.51 55 0],[219.157 5 2],[234.861 950 0],[235.066 20 0],[235.071 60 0],[235.083 200 0],[241.334 2 1],[241.346 16 1],[245.384 20 1],[249.454 35 0],[249.458 35 0],[249.473 100 0],[250.743 16 1],[261.799 5 1],[261.813 20 1],[265.045 100 0],[265.055 60 0],[265.062 200 0],[265.069 60 0],[265.076 100 0],[269.746 5 1],[269.758 20 1],[272.888 20 1],[273.805 30 0],[289.813 20 0],[289.819 10 0],[289.825 20 0],[298.606 30 0],[298.642 10 0],[301.933 60 0],[301.949 30 0],[301.953 30 0],[301.96 20 0],[304.652 10 1],[304.669 30 1],[311.081 10 0],[311.092 10 0],[311.099 20 0],[313.042 480 1],[313.107 320 1],[319.381 20 0],[319.71 20 1],[319.715 30 1],[320.86 20 0],[322.963 60 0],[323.352 2 1],[324.162 10 1],[324.183 30 1],[326.902 15 0],[327.458 100 1],[327.467 30 1],[328.291 30 0],[332.101 30 0],[332.109 30 0],[332.134 220 0],[334.543 20 0],[336.763 60 0],[345.137 5 0],[345.518 300 0],[347.656 20 0],[351.554 300 0],[355.5 10 0],[372.036 100 2],[373.63 100 0],[381.345 700 0],[386.513 40 0],[386.542 80 0],[386.551 1 0],[386.572 6 0],[386.603 100 0],[424.914 90 2],[425.305 100 0],[425.376 60 0],[436.066 300 1],[436.099 500 1],[440.794 400 0],[448.552 2 2],[448.73 100 2],[449.509 1 2],[449.78 140 2],[457.266 12 0],[467.333 700 1],[467.342 1000 1],[470.937 6 0],[482.816 200 1],[484.916 40 0],[485.822 2 1],[508.775 80 0],[521.812 8 1],[521.833 20 1],[525.586 3 1],[527.028 64 1],[527.081 500 1],[540.304 20 1],[541.021 20 1],[614.201 140 2],[622.911 10 0],[627.943 16 1],[627.973 30 1],[647.354 30 0],[654.789 60 1],[655.836 60 1],[656.452 30 0],[663.644 2 1],[675.672 1 1],[675.713 2 1],[678.656 30 0],[688.422 1 0],[688.444 6 0],[698.275 100 0],[715.44 6 0],[715.465 40 0],[720.913 100 0],[740.12 3 1],[740.143 2 1],[755.19 10 0],[761.868 10 0],[761.888 20 0],[809.006 60 0],[815.899 5 0],[815.924 10 0],[825.407 4 0],[828.707 10 0],[854.736 30 0],[854.767 60 0],[880.137 300 0],[888.218 6 0],[919.045 40 0],[924.392 20 0],[934.389 1 1],[939.274 40 0],[947.643 2 1],[947.703 16 1],[984.732 20 0],[989.563 10 0],[989.596 20 0],[993.978 80 0],[1009.552 16 1],[1009.573 20 1],[1011.992 60 1],[1033.103 80 0],[1106.646 30 0],[1117.373 1 1],[1149.639 120 0],[1162.516 2 1],[1166.025 2 1],[1209.536 100 1],[1209.818 30 1],[1464.392 100 0],[1464.475 60 0],[1615.772 200 0],[1785.5381 80 0],[1785.6631 120 0],[1814.3539 100 0],[3177.5051 160 0],[3177.8699 200 0]}{ALLx1000x950x1000x140x0x0x0}{UVx950x950x480x100x0x0x0}{VISx1000x700x1000x140x0x0x0}{IVx300x300x100x0x0x0x0}%
-\pgfspectra@elt@search{#1}{B}{[4.859 30 4],[5.268 10 3],[6.031 30 3],[34.4 160 3],[38.5 450 3],[41.18 40 2],[41.87 285 3],[51.077 20 2],[51.085 40 2],[51.824 150 2],[51.827 75 2],[67.7 110 2],[67.714 160 2],[69.395 70 1],[73.136 40 1],[73.144 40 1],[75.848 40 2],[75.867 70 2],[88.254 110 1],[88.268 110 1],[98.467 40 1],[108.188 110 1],[108.207 110 1],[111.22 70 3],[116.89 450 3],[117.09 70 3],[123.016 110 1],[136.246 220 1],[160.046 70 0],[160.073 120 0],[162.358 160 1],[162.377 110 1],[162.402 220 1],[162.416 70 1],[162.434 160 1],[166.304 100 0],[166.687 150 0],[166.729 200 0],[181.786 150 0],[181.837 200 0],[182.591 300 0],[182.641 300 0],[184.281 110 1],[195.383 20 2],[206.578 550 2],[206.638 250 0],[206.665 250 0],[206.693 100 0],[206.719 300 0],[206.723 450 2],[207.709 160 2],[208.891 500 0],[208.957 500 0],[222.03 70 1],[223.409 40 2],[223.459 70 2],[232.303 40 1],[232.867 40 1],[239.32 40 1],[239.505 220 1],[245.969 40 1],[245.99 40 1],[249.677 1000 0],[249.773 1000 0],[252.47 70 3],[253.03 160 3],[282.168 450 3],[282.457 70 3],[282.585 285 3],[291.808 160 1],[303.226 110 1],[317.933 70 1],[332.318 110 1],[332.36 110 1],[345.129 450 1],[412.193 285 1],[419.479 110 1],[424.298 40 2],[424.361 70 2],[447.21 110 1],[447.285 110 1],[448.705 220 2],[449.773 360 2],[478.421 70 1],[494.038 110 1],[608.044 110 1],[628.547 70 1],[703.02 70 1],[703.19 40 1],[783.525 110 2],[784.141 70 2],[866.722 20 0],[866.857 70 0],[1166.004 800 0],[1166.247 570 0],[1562.908 125 0],[1624.038 200 0],[1624.467 250 0],[1899.433 235 0]}{ALLx1000x1000x450x550x450x30x0}{UVx1000x1000x450x550x450x30x0}{VISx360x0x285x360x0x0x0}{IVx800x800x0x110x0x0x0}%
-\pgfspectra@elt@search{#1}{C}{[3.4973 110 4],[4.0268 450 4],[22.719 110 4],[24.491 250 3],[24.866 160 4],[24.874 160 4],[28.914 200 3],[28.923 250 3],[31.242 570 3],[31.246 500 3],[37.169 250 2],[37.175 250 2],[37.178 150 2],[38.403 650 3],[38.418 700 3],[38.6203 500 2],[41.952 400 3],[41.971 500 3],[45.0734 200 2],[45.946 400 2],[45.952 500 2],[45.963 570 2],[51.1522 250 2],[53.5288 250 2],[53.808 300 2],[53.8149 350 2],[53.8312 400 2],[57.4281 350 2],[59.5022 9 1],[68.7053 30 1],[68.7345 50 1],[85.8092 10 1],[85.8559 20 1],[90.3624 30 1],[90.3962 60 1],[90.4142 150 1],[90.448 30 1],[97.703 800 2],[100.986 9 1],[101.008 10 1],[101.037 10 1],[103.6337 80 1],[103.7018 150 1],[115.791 150 0],[115.8019 150 0],[115.8035 150 0],[117.493 370 2],[117.526 350 2],[117.559 330 2],[117.571 500 2],[117.599 350 2],[117.637 370 2],[118.8992 150 0],[118.9447 150 0],[118.9631 200 0],[119.3009 300 0],[119.3031 300 0],[119.324 300 0],[119.3264 300 0],[119.3393 100 0],[119.3649 150 0],[119.3679 150 0],[119.4064 100 0],[119.4488 100 0],[126.1552 100 0],[127.7245 250 0],[127.7282 250 0],[127.7513 300 0],[127.755 300 0],[128.0333 200 0],[131.1363 100 0],[132.3951 9 1],[132.9578 120 0],[132.96 120 0],[133.4532 150 1],[133.5708 300 1],[135.4288 100 0],[135.584 150 0],[136.4164 120 0],[145.9032 100 0],[146.3336 200 0],[146.7402 120 0],[148.1764 150 0],[154.8202 1000 3],[155.0774 900 3],[156.031 150 0],[156.0683 400 0],[156.0708 400 0],[156.1341 100 0],[156.1438 400 0],[165.6266 150 0],[165.6928 120 0],[165.7008 300 0],[165.738 120 0],[165.7907 120 0],[165.8122 150 0],[175.1823 500 0],[193.0905 1000 0],[216.294 250 2],[227.091 40 4],[227.725 5 4],[227.792 20 4],[229.687 800 2],[247.856 800 0],[250.912 250 1],[251.206 350 1],[252.441 200 3],[252.998 300 3],[257.483 250 1],[269.775 150 2],[272.485 110 2],[272.53 150 2],[272.59 150 2],[274.128 350 1],[274.649 250 1],[283.671 1000 1],[283.76 800 1],[298.211 200 2],[299.262 800 1],[387.619 350 1],[387.641 350 1],[387.666 350 1],[391.898 570 1],[392.069 800 1],[405.606 150 2],[406.794 200 2],[406.891 250 2],[407.026 250 2],[407.452 250 1],[407.585 350 1],[416.286 150 2],[418.69 250 2],[426.7 800 1],[426.726 1000 1],[432.556 200 2],[464.742 600 2],[465.025 520 2],[465.147 375 2],[465.83 200 3],[466.586 200 2],[477.175 200 0],[493.205 200 0],[494.388 5 4],[494.456 5 4],[505.217 200 0],[513.294 350 1],[513.328 350 1],[514.349 350 1],[514.516 570 1],[515.109 400 1],[538.034 300 0],[564.807 250 1],[566.247 350 1],[569.592 450 2],[580.133 250 3],[581.198 200 3],[582.642 150 2],[588.977 570 1],[589.159 350 1],[600.113 200 0],[600.603 250 0],[600.718 110 0],[601.068 150 0],[601.322 300 0],[601.484 250 0],[657.805 800 1],[658.288 570 1],[658.761 200 0],[674.438 150 2],[678.39 250 1],[703.725 150 2],[711.318 250 0],[711.519 250 0],[711.563 250 1],[711.699 200 0],[711.99 350 1],[723.132 800 1],[723.642 1000 1],[761.265 150 2],[772.62 90 3],[786.089 200 0],[805.862 200 0],[819.648 300 2],[833.299 150 2],[833.515 520 0],[850.032 300 2],[906.143 250 0],[906.247 200 0],[907.828 200 0],[908.851 250 0],[909.483 450 0],[911.18 300 0],[940.573 800 0],[960.303 150 0],[962.08 250 0],[965.844 300 0],[1068.308 200 0],[1069.125 300 0],[1161.929 12 0],[1162.883 23 0],[1165.885 13 0],[1165.968 47 0],[1166.963 24 0],[1174.822 85 0],[1175.332 142 0],[1175.476 114 0],[1177.754 11 0],[1189.291 17 0],[1189.575 30 0],[1261.41 26 0],[1350.227 20 0],[1439.965 38 0],[1440.325 16 0],[1442.012 61 0],[1442.903 12 0],[1444.224 13 0],[1655.966 12 0],[1689.0381 50 0],[1733.8561 10 0],[1744.86 11 0],[1813.9801 13 0],[1972.199 23 0]}{ALLx1000x1000x1000x800x1000x450x0}{UVx1000x1000x1000x800x1000x450x0}{VISx1000x300x1000x600x250x5x0}{IVx800x800x0x300x0x0x0}%
+\pgfspectra@elt@search{#1}{Be}{[10.025 100 2],[50.999 3 2],[54.931 2 2],[58.208 6 2],[66.132 4 2],[67.559 8 2],[72.559 4 2],[72.571 5 1],[74.358 5 1],[74.623 7 2],[76.775 2 2],[77.537 8 1],[84.206 20 1],[92.525 2 1],[94.356 10 1],[97.327 10 1],[102.693 8 1],[103.632 5 1],[104.823 15 1],[111.469 1 2],[114.303 20 1],[119.719 60 1],[121.312 2 2],[121.432 1 2],[136.225 2 2],[140.152 1 2],[142.126 10 2],[142.286 5 2],[143.517 1 2],[144.077 2 2],[151.23 20 1],[151.243 60 1],[166.149 100 0],[175.469 2 2],[177.612 15 1],[177.634 20 1],[191.703 3 2],[192.967 5 0],[194.368 10 0],[195.497 60 2],[196.459 50 0],[198.513 5 0],[199.801 60 0],[205.59 50 0],[205.601 100 0],[207.694 75 2],[208.038 60 2],[211.856 25 2],[212.227 15 2],[212.557 10 0],[212.568 20 0],[212.72 15 2],[213.725 5 2],[214.5 25 0],[217.499 55 0],[217.51 55 0],[219.157 5 2],[234.861 950 0],[235.066 20 0],[235.071 60 0],[235.083 200 0],[241.334 2 1],[241.346 16 1],[245.384 20 1],[249.454 35 0],[249.458 35 0],[249.473 100 0],[250.743 16 1],[261.799 5 1],[261.813 20 1],[265.045 100 0],[265.055 60 0],[265.062 200 0],[265.069 60 0],[265.076 100 0],[269.746 5 1],[269.758 20 1],[272.888 20 1],[273.805 30 0],[289.813 20 0],[289.819 10 0],[289.825 20 0],[298.606 30 0],[298.642 10 0],[301.933 60 0],[301.949 30 0],[301.953 30 0],[301.96 20 0],[304.652 10 1],[304.669 30 1],[311.081 10 0],[311.092 10 0],[311.099 20 0],[313.042 480 1],[313.107 320 1],[319.381 20 0],[319.71 20 1],[319.715 30 1],[320.86 20 0],[322.963 60 0],[323.352 2 1],[324.162 10 1],[324.183 30 1],[326.902 15 0],[327.458 100 1],[327.467 30 1],[328.291 30 0],[332.101 30 0],[332.109 30 0],[332.134 220 0],[334.543 20 0],[336.763 60 0],[345.137 5 0],[345.518 300 0],[347.656 20 0],[351.554 300 0],[355.5 10 0],[372.036 100 2],[373.63 100 0],[381.345 700 0],[386.513 40 0],[386.542 80 0],[386.551 1 0],[386.572 6 0],[386.603 100 0],[424.914 90 2],[425.305 100 0],[425.376 60 0],[436.066 300 1],[436.099 500 1],[440.794 400 0],[448.552 2 2],[448.73 100 2],[449.509 1 2],[449.78 140 2],[457.266 12 0],[467.333 700 1],[467.342 1000 1],[470.937 6 0],[482.816 200 1],[484.916 40 0],[485.822 2 1],[508.775 80 0],[521.812 8 1],[521.833 20 1],[525.586 3 1],[527.028 64 1],[527.081 500 1],[540.304 20 1],[541.021 20 1],[614.201 140 2],[622.911 10 0],[627.943 16 1],[627.973 30 1],[647.354 30 0],[654.789 60 1],[655.836 60 1],[656.452 30 0],[663.644 2 1],[675.672 1 1],[675.713 2 1],[678.656 30 0],[688.422 1 0],[688.444 6 0],[698.275 100 0],[715.44 6 0],[715.465 40 0],[720.913 100 0],[740.12 3 1],[740.143 2 1],[755.19 10 0],[761.868 10 0],[761.888 20 0],[809.006 60 0],[815.899 5 0],[815.924 10 0],[825.407 4 0],[828.707 10 0],[854.736 30 0],[854.767 60 0],[880.137 300 0],[888.218 6 0],[919.045 40 0],[924.392 20 0],[934.389 1 1],[939.274 40 0],[947.643 2 1],[947.703 16 1],[984.732 20 0],[989.563 10 0],[989.596 20 0],[993.978 80 0],[1009.552 16 1],[1009.573 20 1],[1011.992 60 1],[1033.103 80 0],[1106.646 30 0],[1117.373 1 1],[1149.639 120 0],[1162.516 2 1],[1166.025 2 1],[1209.536 100 1],[1209.818 30 1],[1464.392 100 0],[1464.475 60 0],[1615.772 200 0],[1785.5381 80 0],[1785.6631 120 0],[1814.3539 100 0],[3177.5051 160 0],[3177.8699 200 0]}{ALLx1000x950x1000x140x0x0x0}{UVx950x950x480x100x0x0x0}{VISx1000x700x1000x140x0x0x0}{IVx300x300x100x0x0x0x0}%[7.61 1 2],[7.648 2 2],[7.853 3 2],[7.866 4 2],[7.892 1 2],[8.189 5 2],[8.238 10 2],[8.32 20 2],[8.476 30 2],[8.831 50 2],
+\pgfspectra@elt@search{#1}{B}{[34.4 160 3],[38.5 450 3],[41.18 40 2],[41.87 285 3],[51.077 20 2],[51.085 40 2],[51.824 150 2],[51.827 75 2],[67.7 110 2],[67.714 160 2],[69.395 70 1],[73.136 40 1],[73.144 40 1],[75.848 40 2],[75.867 70 2],[88.254 110 1],[88.268 110 1],[98.467 40 1],[108.188 110 1],[108.207 110 1],[111.22 70 3],[116.89 450 3],[117.09 70 3],[123.016 110 1],[136.246 220 1],[160.046 70 0],[160.073 120 0],[162.358 160 1],[162.377 110 1],[162.402 220 1],[162.416 70 1],[162.434 160 1],[166.304 100 0],[166.687 150 0],[166.729 200 0],[181.786 150 0],[181.837 200 0],[182.591 300 0],[182.641 300 0],[184.281 110 1],[195.383 20 2],[206.578 550 2],[206.638 250 0],[206.665 250 0],[206.693 100 0],[206.719 300 0],[206.723 450 2],[207.709 160 2],[208.891 500 0],[208.957 500 0],[222.03 70 1],[223.409 40 2],[223.459 70 2],[232.303 40 1],[232.867 40 1],[239.32 40 1],[239.505 220 1],[245.969 40 1],[245.99 40 1],[249.677 1000 0],[249.773 1000 0],[252.47 70 3],[253.03 160 3],[282.168 450 3],[282.457 70 3],[282.585 285 3],[291.808 160 1],[303.226 110 1],[317.933 70 1],[332.318 110 1],[332.36 110 1],[345.129 450 1],[412.193 285 1],[419.479 110 1],[424.298 40 2],[424.361 70 2],[447.21 110 1],[447.285 110 1],[448.705 220 2],[449.773 360 2],[478.421 70 1],[494.038 110 1],[608.044 110 1],[628.547 70 1],[703.02 70 1],[703.19 40 1],[783.525 110 2],[784.141 70 2],[866.722 20 0],[866.857 70 0],[1166.004 800 0],[1166.247 570 0],[1562.908 125 0],[1624.038 200 0],[1624.467 250 0],[1899.433 235 0]}{ALLx1000x1000x450x550x450x30x0}{UVx1000x1000x450x550x450x30x0}{VISx360x0x285x360x0x0x0}{IVx800x800x0x110x0x0x0}%[4.859 30 4],[5.268 10 3],[6.031 30 3],
+\pgfspectra@elt@search{#1}{C}{[22.719 110 4],[24.491 250 3],[24.866 160 4],[24.874 160 4],[28.914 200 3],[28.923 250 3],[31.242 570 3],[31.246 500 3],[37.169 250 2],[37.175 250 2],[37.178 150 2],[38.403 650 3],[38.418 700 3],[38.6203 500 2],[41.952 400 3],[41.971 500 3],[45.0734 200 2],[45.946 400 2],[45.952 500 2],[45.963 570 2],[51.1522 250 2],[53.5288 250 2],[53.808 300 2],[53.8149 350 2],[53.8312 400 2],[57.4281 350 2],[59.5022 9 1],[68.7053 30 1],[68.7345 50 1],[85.8092 10 1],[85.8559 20 1],[90.3624 30 1],[90.3962 60 1],[90.4142 150 1],[90.448 30 1],[97.703 800 2],[100.986 9 1],[101.008 10 1],[101.037 10 1],[103.6337 80 1],[103.7018 150 1],[115.791 150 0],[115.8019 150 0],[115.8035 150 0],[117.493 370 2],[117.526 350 2],[117.559 330 2],[117.571 500 2],[117.599 350 2],[117.637 370 2],[118.8992 150 0],[118.9447 150 0],[118.9631 200 0],[119.3009 300 0],[119.3031 300 0],[119.324 300 0],[119.3264 300 0],[119.3393 100 0],[119.3649 150 0],[119.3679 150 0],[119.4064 100 0],[119.4488 100 0],[126.1552 100 0],[127.7245 250 0],[127.7282 250 0],[127.7513 300 0],[127.755 300 0],[128.0333 200 0],[131.1363 100 0],[132.3951 9 1],[132.9578 120 0],[132.96 120 0],[133.4532 150 1],[133.5708 300 1],[135.4288 100 0],[135.584 150 0],[136.4164 120 0],[145.9032 100 0],[146.3336 200 0],[146.7402 120 0],[148.1764 150 0],[154.8202 1000 3],[155.0774 900 3],[156.031 150 0],[156.0683 400 0],[156.0708 400 0],[156.1341 100 0],[156.1438 400 0],[165.6266 150 0],[165.6928 120 0],[165.7008 300 0],[165.738 120 0],[165.7907 120 0],[165.8122 150 0],[175.1823 500 0],[193.0905 1000 0],[216.294 250 2],[227.091 40 4],[227.725 5 4],[227.792 20 4],[229.687 800 2],[247.856 800 0],[250.912 250 1],[251.206 350 1],[252.441 200 3],[252.998 300 3],[257.483 250 1],[269.775 150 2],[272.485 110 2],[272.53 150 2],[272.59 150 2],[274.128 350 1],[274.649 250 1],[283.671 1000 1],[283.76 800 1],[298.211 200 2],[299.262 800 1],[387.619 350 1],[387.641 350 1],[387.666 350 1],[391.898 570 1],[392.069 800 1],[405.606 150 2],[406.794 200 2],[406.891 250 2],[407.026 250 2],[407.452 250 1],[407.585 350 1],[416.286 150 2],[418.69 250 2],[426.7 800 1],[426.726 1000 1],[432.556 200 2],[464.742 600 2],[465.025 520 2],[465.147 375 2],[465.83 200 3],[466.586 200 2],[477.175 200 0],[493.205 200 0],[494.388 5 4],[494.456 5 4],[505.217 200 0],[513.294 350 1],[513.328 350 1],[514.349 350 1],[514.516 570 1],[515.109 400 1],[538.034 300 0],[564.807 250 1],[566.247 350 1],[569.592 450 2],[580.133 250 3],[581.198 200 3],[582.642 150 2],[588.977 570 1],[589.159 350 1],[600.113 200 0],[600.603 250 0],[600.718 110 0],[601.068 150 0],[601.322 300 0],[601.484 250 0],[657.805 800 1],[658.288 570 1],[658.761 200 0],[674.438 150 2],[678.39 250 1],[703.725 150 2],[711.318 250 0],[711.519 250 0],[711.563 250 1],[711.699 200 0],[711.99 350 1],[723.132 800 1],[723.642 1000 1],[761.265 150 2],[772.62 90 3],[786.089 200 0],[805.862 200 0],[819.648 300 2],[833.299 150 2],[833.515 520 0],[850.032 300 2],[906.143 250 0],[906.247 200 0],[907.828 200 0],[908.851 250 0],[909.483 450 0],[911.18 300 0],[940.573 800 0],[960.303 150 0],[962.08 250 0],[965.844 300 0],[1068.308 200 0],[1069.125 300 0],[1161.929 12 0],[1162.883 23 0],[1165.885 13 0],[1165.968 47 0],[1166.963 24 0],[1174.822 85 0],[1175.332 142 0],[1175.476 114 0],[1177.754 11 0],[1189.291 17 0],[1189.575 30 0],[1261.41 26 0],[1350.227 20 0],[1439.965 38 0],[1440.325 16 0],[1442.012 61 0],[1442.903 12 0],[1444.224 13 0],[1655.966 12 0],[1689.0381 50 0],[1733.8561 10 0],[1744.86 11 0],[1813.9801 13 0],[1972.199 23 0]}{ALLx1000x1000x1000x800x1000x450x0}{UVx1000x1000x1000x800x1000x450x0}{VISx1000x300x1000x600x250x5x0}{IVx800x800x0x300x0x0x0}%[3.4973 110 4],[4.0268 450 4],
\pgfspectra@elt@search{#1}{N}{[16.6947 52 4],[18.175 400 3],[18.6069 52 4],[18.6153 62 4],[19.17 400 3],[19.29 400 3],[19.687 500 3],[19.723 500 3],[20.26 500 3],[20.594 500 3],[20.597 500 3],[20.603 500 3],[20.9303 90 4],[21.72 500 3],[21.79 500 3],[22.34 500 3],[22.512 800 3],[22.521 800 3],[23.412 600 3],[23.42 600 3],[23.425 600 3],[23.607 550 3],[23.799 500 3],[23.87 500 3],[23.88 600 3],[23.962 500 3],[24.72 900 3],[24.7561 90 4],[24.7706 120 4],[24.843 500 3],[24.846 500 3],[24.848 500 3],[25.795 500 2],[25.85 650 2],[25.919 700 2],[26.009 800 2],[26.045 600 3],[26.128 800 2],[26.291 500 2],[26.523 500 2],[26.527 500 2],[26.6196 150 4],[26.6379 200 4],[26.87 500 2],[27.099 650 3],[28.342 250 3],[28.348 300 3],[28.358 350 3],[28.556 600 3],[29.77 600 3],[29.782 700 3],[30.032 650 3],[30.3123 90 3],[30.328 500 3],[31.4715 150 2],[31.485 200 2],[31.4877 90 2],[31.5053 150 3],[32.2503 120 3],[32.257 150 3],[32.2724 200 3],[32.3175 120 3],[32.326 600 2],[33.505 300 3],[33.835 500 2],[34.02 500 2],[35.193 500 3],[35.198 500 2],[35.306 700 3],[36.2833 120 2],[36.2881 150 2],[36.2946 150 2],[36.2985 90 2],[37.4204 300 2],[37.4441 350 2],[38.748 500 2],[42.077 500 3],[45.1869 250 2],[45.2226 300 2],[46.374 650 3],[64.4634 285 1],[64.4837 360 1],[64.5178 450 1],[64.75 140 0],[66.0286 360 1],[67.1016 170 1],[67.1386 285 1],[67.163 150 1],[67.1773 160 1],[67.2001 170 1],[68.4996 500 2],[68.5513 570 2],[68.5816 650 2],[68.6335 500 2],[69.27 350 0],[71.3518 90 4],[71.386 150 4],[74.6984 285 1],[74.8195 150 4],[74.8291 200 4],[76.3336 500 2],[76.4359 570 2],[76.5148 570 3],[77.1544 250 2],[77.1901 300 2],[77.2385 350 2],[77.2891 200 2],[77.2975 150 2],[77.5965 650 1],[88.567 90 0],[90.9697 90 0],[91.0278 80 0],[91.0645 40 0],[91.5612 450 1],[91.5962 450 1],[91.6012 550 1],[91.6701 650 1],[92.1992 520 3],[92.1992 520 3],[92.2519 500 3],[92.2519 500 3],[92.3057 480 3],[92.4283 520 3],[95.3415 90 0],[95.3655 100 0],[95.397 130 0],[95.5335 1000 3],[96.399 130 0],[96.4626 115 0],[96.5041 70 0],[97.9842 650 2],[97.9919 700 2],[98.979 900 2],[99.1514 700 2],[99.1579 1000 2],[103.616 150 3],[106.7614 90 0],[106.8612 60 0],[107.871 90 3],[108.399 450 1],[108.458 600 1],[108.5546 430 1],[108.5701 650 1],[109.7237 175 0],[109.8095 115 0],[109.826 115 0],[110.036 105 0],[110.0465 40 0],[110.1291 90 0],[113.4165 360 0],[113.4415 385 0],[113.498 410 0],[114.365 105 0],[116.3884 130 0],[116.4206 60 0],[116.4325 105 0],[116.7448 270 0],[116.8334 105 0],[116.8417 60 0],[116.8536 195 0],[117.651 230 0],[117.663 105 0],[117.7695 195 0],[118.3031 500 2],[118.455 570 2],[118.801 90 3],[119.955 410 0],[120.0223 385 0],[120.071 360 0],[122.5026 175 0],[122.537 160 0],[122.841 130 0],[122.879 160 0],[123.8821 1000 4],[124.2804 900 4],[124.3179 360 0],[124.3306 315 0],[131.054 290 0],[131.095 250 0],[131.9 230 0],[131.968 315 0],[132.657 115 0],[132.792 115 0],[138.7371 150 2],[141.194 360 0],[149.2625 700 0],[149.282 490 0],[149.4675 640 0],[154.9336 90 4],[161.633 200 4],[161.969 350 4],[171.855 1000 3],[172.9945 250 2],[174.2729 775 0],[174.5252 700 0],[174.7848 570 2],[175.1218 350 2],[175.1657 650 2],[180.4486 150 2],[180.5669 200 2],[184.642 150 2],[186.037 90 4],[188.506 350 2],[188.522 400 2],[190.799 200 2],[191.955 150 2],[191.977 150 2],[192.065 300 2],[192.084 150 2],[192.13 200 2],[206.401 200 2],[206.442 250 2],[206.868 120 2],[207.109 90 2],[208.034 90 3],[209.553 160 1],[209.62 70 1],[209.686 110 1],[211.759 90 2],[212.15 90 2],[213.018 110 1],[214.278 160 1],[214.731 90 2],[218.82 200 2],[218.838 150 2],[220.609 160 1],[228.669 160 1],[228.844 110 1],[231.649 220 1],[231.669 160 1],[231.705 285 1],[231.809 90 3],[246.127 160 1],[247.769 150 3],[249.683 110 1],[249.697 70 1],[252.022 110 1],[252.079 160 1],[252.223 220 1],[259.094 110 1],[264.565 250 3],[264.618 300 3],[264.696 350 3],[268.218 250 2],[268.92 90 2],[270.984 160 1],[279.922 110 1],[282.364 110 1],[285.916 60 4],[288.527 160 1],[297.452 90 4],[298.078 150 4],[298.131 250 4],[299.843 60 4],[300.683 220 1],[307.825 90 3],[336.734 120 2],[343.715 360 1],[346.337 90 3],[347.871 570 3],[348.299 500 3],[348.496 400 3],[374.754 90 3],[375.467 90 2],[377.105 120 2],[383.837 285 1],[391.9 360 1],[393.852 90 2],[395.585 450 1],[399.5 1000 1],[399.863 150 2],[400.358 200 2],[403.508 360 1],[404.131 550 1],[404.353 360 1],[405.776 150 3],[409.733 250 2],[409.994 140 0],[410.343 200 2],[410.995 185 0],[417.616 285 1],[419.576 120 2],[420.01 150 2],[422.774 285 1],[423.691 285 1],[423.705 220 1],[424.178 450 1],[433.291 90 2],[434.568 120 2],[437.911 300 2],[443.274 285 1],[444.703 650 1],[451.091 90 2],[451.486 120 2],[453.041 360 1],[460.148 550 1],[460.373 350 4],[460.633 90 3],[460.716 450 1],[461.387 360 1],[461.998 250 4],[462.139 450 1],[463.054 870 1],[463.414 90 2],[464.064 120 2],[464.308 550 1],[478.813 285 1],[480.329 450 1],[484.738 180 0],[485.882 90 2],[486.715 150 2],[489.511 285 1],[491.494 160 0],[493.512 210 0],[494.456 200 4],[495.023 160 0],[496.398 350 0],[498.737 285 1],[499.436 450 1],[500.148 650 1],[500.27 360 1],[500.515 870 1],[500.732 550 1],[501.062 450 1],[501.639 360 1],[502.566 360 1],[504.51 550 1],[528.12 185 0],[529.268 140 0],[531.435 90 2],[532.082 200 2],[532.718 150 2],[549.567 450 1],[553.536 285 1],[566.663 650 1],[567.602 550 1],[567.956 870 1],[568.621 450 1],[571.077 450 1],[574.73 285 1],[575.25 700 0],[576.475 240 0],[582.954 265 0],[585.404 235 0],[592.781 360 1],[593.178 550 1],[594.024 285 1],[594.165 650 1],[595.239 285 1],[599.943 160 0],[600.847 210 0],[616.776 285 1],[637.962 360 1],[638.077 150 3],[641.165 185 0],[642.064 210 0],[642.302 210 0],[642.832 210 0],[643.768 185 0],[644.094 235 0],[645.411 90 2],[645.79 185 0],[646.702 120 2],[646.844 300 0],[648.171 265 0],[648.205 750 1],[648.27 360 0],[648.375 300 0],[648.48 325 0],[649.122 160 0],[649.954 210 0],[650.631 185 0],[661.056 750 1],[662.254 185 0],[663.694 185 0],[664.496 235 0],[664.65 185 0],[665.346 235 0],[665.651 210 0],[672.262 185 0],[739.864 210 0],[740.612 160 0],[740.624 265 0],[742.364 685 0],[744.229 785 0],[746.831 900 0],[760.88 185 0],[761.846 60 4],[776.224 450 1],[818.487 400 0],[818.802 400 0],[820.036 250 0],[821.072 300 0],[821.634 570 0],[822.314 400 0],[824.239 400 0],[843.874 550 1],[856.774 500 0],[859.4 570 0],[862.924 650 0],[865.589 500 0],[867.608 220 1],[868.028 700 0],[868.34 650 0],[868.615 500 0],[868.743 110 1],[869.9 110 1],[870.325 500 0],[871.054 160 1],[871.17 570 0],[871.883 500 0],[872.889 250 0],[874.736 200 0],[938.68 500 0],[939.279 570 0],[946.068 250 0],[986.333 200 0],[986.541 160 1],[986.821 110 1],[988.739 160 1],[989.109 220 1],[996.186 160 1],[996.934 220 1],[1002.327 285 1],[1003.545 220 1],[1006.515 220 1],[1007.012 160 1],[1010.513 250 0],[1010.889 300 0],[1011.248 350 0],[1011.464 400 0],[1012.627 110 1],[1053.957 250 0],[1207.451 200 0],[1218.682 380 0],[1228.897 225 0],[1232.876 290 0],[1238.165 310 0],[1243.84 180 0],[1246.125 510 0],[1246.962 920 0],[1342.961 500 0],[1358.133 840 0],[1358.773 180 0],[1360.227 180 0],[1362.418 290 0],[1475.707 250 0],[1486.887 100 0],[1496.66 160 0],[1558.227 180 0],[1751.658 120 0],[1758.4859 100 0],[1787.826 100 0]}{ALLx1000x920x1000x1000x1000x1000x0}{UVx1000x775x650x1000x1000x1000x0}{VISx1000x900x1000x300x150x350x0}{IVx920x920x550x0x0x0x0}%
\pgfspectra@elt@search{#1}{O}{[12.4616 80 4],[13.5523 110 4],[13.8109 80 4],[13.9029 110 4],[15.1447 80 4],[15.1477 110 4],[15.1546 150 4],[16.4574 80 4],[16.4657 110 4],[16.4709 80 4],[16.6235 80 4],[16.799 150 4],[17.0219 110 4],[17.2169 450 4],[18.5745 250 4],[19.2751 375 4],[19.2799 450 4],[19.2906 520 4],[19.3003 80 4],[19.4593 200 4],[19.586 150 3],[19.601 200 3],[20.2161 80 4],[20.2224 80 4],[20.2283 80 4],[20.2334 80 4],[20.2393 150 4],[20.378 110 4],[20.382 150 4],[20.385 100 4],[20.389 200 4],[20.394 100 4],[20.718 110 3],[20.724 150 3],[20.7794 300 4],[21.504 150 4],[21.5103 200 4],[21.5245 250 4],[21.6018 250 4],[22.0352 520 4],[22.7372 80 4],[22.7469 80 4],[22.7511 150 4],[22.7549 80 4],[22.7634 80 4],[22.7689 80 4],[23.1823 150 4],[23.346 140 3],[23.35 150 3],[23.352 110 3],[23.356 200 3],[23.36 110 3],[23.836 90 3],[23.857 180 3],[24.8459 110 4],[25.256 110 3],[25.295 110 3],[25.308 150 3],[26.039 300 3],[26.056 250 3],[26.434 80 2],[26.448 110 2],[26.697 110 2],[26.698 150 2],[26.703 150 2],[27.738 150 2],[27.963 300 3],[27.994 375 3],[28.571 110 3],[28.584 150 3],[28.6448 110 4],[29.562 80 2],[29.566 110 2],[29.572 120 2],[30.341 150 2],[30.346 150 2],[30.352 140 2],[30.362 160 2],[30.369 160 2],[30.38 250 2],[30.56 200 2],[30.566 250 2],[30.57 190 2],[30.577 300 2],[30.584 190 2],[30.662 200 3],[30.688 150 3],[32.0979 450 2],[32.845 300 2],[32.874 250 2],[34.531 300 2],[35.514 110 2],[35.533 90 2],[35.547 80 2],[35.902 200 2],[35.922 190 2],[35.938 150 2],[37.38 210 2],[37.4 200 2],[37.408 300 2],[37.416 190 2],[37.433 200 2],[37.444 210 2],[39.5558 450 2],[43.498 300 2],[50.7391 800 2],[50.7683 900 2],[50.8182 1000 2],[52.5795 1000 2],[53.783 250 1],[53.826 300 1],[53.909 220 1],[53.955 200 1],[53.985 150 1],[55.333 700 3],[55.4075 775 3],[55.4514 850 3],[55.5261 700 3],[59.7818 700 2],[59.9598 1000 2],[60.8398 580 3],[60.97 110 2],[60.9829 640 3],[61.004 160 2],[61.075 200 2],[61.085 100 2],[61.6952 270 3],[61.7005 150 3],[61.7036 200 3],[62.4617 520 3],[62.513 580 3],[62.5852 640 3],[62.973 1000 4],[64.4148 150 1],[67.295 200 1],[67.377 150 1],[68.1272 230 4],[68.5544 70 0],[70.2332 800 2],[70.2822 800 2],[70.2899 900 2],[70.385 1000 2],[71.8484 900 1],[71.8562 600 1],[74.4794 70 0],[75.8678 700 4],[75.9441 640 4],[76.0228 580 4],[76.0445 775 4],[76.1128 640 4],[76.2003 700 4],[77.0793 70 0],[77.1056 90 0],[77.4518 520 4],[77.5321 70 0],[77.9734 200 3],[77.9821 315 3],[77.9912 360 3],[77.9997 200 3],[78.7711 640 3],[79.0109 520 3],[79.0199 700 3],[79.1973 70 0],[79.666 300 1],[80.22 200 3],[80.2255 160 3],[80.4267 90 0],[80.4848 70 0],[80.5295 70 0],[80.581 80 0],[83.2762 240 1],[83.2927 600 2],[83.3332 450 1],[83.3742 780 2],[83.4467 600 1],[83.5096 600 2],[83.5292 800 2],[87.7879 40 0],[92.1296 130 3],[92.1366 160 3],[92.2008 80 0],[92.3367 200 3],[92.3433 130 3],[93.5193 90 0],[94.8686 40 0],[97.1738 90 0],[97.6448 40 0],[98.8773 160 0],[99.0204 40 0],[102.5762 250 0],[102.7431 90 0],[103.923 160 0],[104.0942 60 0],[115.2152 40 0],[130.2168 900 0],[130.4858 600 0],[130.6029 300 0],[133.8612 200 3],[134.2992 130 3],[134.3512 230 3],[137.1292 640 4],[147.689 160 2],[150.672 160 4],[159.001 285 2],[159.133 160 2],[164.368 315 4],[170.7996 160 4],[176.012 220 2],[176.042 110 2],[176.322 220 2],[176.448 220 2],[176.778 750 2],[176.824 550 2],[177.167 360 2],[177.3 110 2],[177.385 110 2],[177.916 220 2],[178.103 160 2],[178.485 160 2],[178.966 220 2],[184.826 110 2],[185.662 110 2],[187.278 285 2],[187.287 285 2],[187.494 285 2],[192.004 160 2],[192.075 110 2],[192.152 110 2],[192.349 220 2],[192.382 110 2],[192.694 110 2],[201.327 360 2],[202.696 160 2],[204.567 220 2],[205.274 160 2],[228.342 30 1],[228.489 30 1],[229.332 110 1],[230.035 200 1],[231.305 30 1],[231.612 30 1],[231.679 30 1],[231.968 50 1],[232.215 30 1],[233.931 30 1],[239.044 200 2],[239.433 80 2],[241.16 110 1],[242.284 80 2],[242.555 80 1],[243.356 250 1],[243.606 80 1],[243.883 80 2],[244.426 80 1],[244.555 300 1],[244.9372 200 3],[245.004 200 3],[245.499 200 2],[249.344 200 3],[249.377 200 3],[250.773 200 3],[250.919 230 3],[251.72 200 3],[255.806 200 2],[268.753 80 2],[269.549 110 2],[273.334 300 1],[274.746 110 1],[278.101 1000 4],[278.699 920 4],[278.985 775 4],[283.626 160 3],[292.145 160 3],[294.133 200 4],[294.165 210 4],[295.968 80 2],[297.229 265 0],[298.378 250 2],[301.763 80 2],[302.345 80 2],[304.302 80 2],[304.713 200 2],[305.93 110 2],[306.342 460 3],[307.161 410 3],[312.171 80 2],[312.262 160 1],[312.944 220 1],[313.286 110 2],[313.482 450 1],[313.844 285 1],[314.466 160 4],[320.966 160 3],[323.857 80 2],[326.098 200 2],[326.546 300 2],[326.731 80 2],[327.098 220 1],[327.352 220 1],[327.769 220 1],[328.759 360 1],[330.515 160 1],[330.66 160 1],[331.23 80 2],[334.074 110 2],[334.808 230 3],[334.911 270 3],[335.427 160 3],[337.54 200 3],[337.72 220 1],[337.806 130 3],[338.12 360 3],[338.552 360 3],[339.025 285 1],[339.679 270 3],[340.352 360 3],[340.738 220 1],[340.966 230 3],[340.984 160 1],[341.169 410 3],[341.364 230 3],[344.41 80 2],[345.512 80 2],[347.081 285 1],[348.983 200 3],[349.224 160 3],[356.039 230 3],[356.333 270 3],[369.87 80 2],[370.275 80 2],[370.337 80 2],[370.724 110 2],[371.275 220 1],[371.508 110 2],[372.593 315 3],[372.733 285 1],[372.903 360 3],[373.685 410 3],[373.992 160 1],[374.4 110 2],[374.489 230 3],[374.949 360 1],[375.467 150 2],[375.721 80 2],[375.987 250 2],[379.126 110 2],[380.314 160 1],[382.341 120 0],[391.196 450 1],[391.929 160 1],[394.729 185 0],[394.748 160 0],[394.759 140 0],[395.437 220 1],[395.461 100 0],[396.159 200 2],[397.326 450 1],[398.22 220 1],[406.99 160 1],[407.216 285 1],[407.587 450 1],[408.391 80 1],[408.714 50 1],[408.927 150 1],[409.724 110 1],[410.5 220 1],[411.922 285 1],[412.399 100 4],[413.281 160 1],[414.606 50 1],[415.33 220 1],[418.546 285 1],[418.979 450 1],[423.327 80 0],[425.374 50 1],[425.398 50 1],[427.547 50 1],[430.378 50 1],[431.714 285 1],[433.686 160 1],[434.556 220 1],[434.943 285 1],[436.69 220 1],[436.825 100 0],[439.595 220 1],[441.491 450 1],[441.698 285 1],[444.821 160 1],[445.238 160 1],[446.545 50 1],[446.628 50 1],[446.783 50 1],[446.941 50 1],[459.097 360 1],[459.617 285 1],[460.939 80 1],[463.885 160 1],[464.181 360 1],[464.914 450 1],[465.084 160 1],[466.164 360 1],[467.623 285 1],[469.921 220 1],[470.536 285 1],[492.46 160 1],[493.027 230 4],[494.306 220 1],[532.91 135 0],[532.968 160 0],[533.074 190 0],[543.518 90 0],[543.578 110 0],[543.686 135 0],[557.734 120 0],[559.237 110 2],[559.791 130 4],[595.839 160 0],[595.858 190 0],[599.528 80 0],[604.623 160 0],[604.644 190 0],[604.649 110 0],[610.627 100 0],[615.598 400 0],[615.677 450 0],[615.818 490 0],[625.683 80 0],[626.155 100 0],[636.634 100 0],[637.432 100 0],[645.36 320 0],[645.444 360 0],[645.598 400 0],[650.024 130 4],[660.491 80 0],[665.383 100 0],[700.192 360 0],[700.223 450 0],[715.67 210 0],[725.415 400 0],[725.445 450 0],[725.453 320 0],[747.644 210 0],[747.724 100 0],[747.908 120 0],[748.067 120 0],[770.675 100 0],[777.194 870 0],[777.417 810 0],[777.539 750 0],[788.627 80 0],[794.315 100 0],[794.717 100 0],[794.755 235 0],[795.08 210 0],[795.216 185 0],[798.194 110 0],[798.24 135 0],[798.698 190 0],[798.733 135 0],[799.507 250 0],[822.182 400 0],[822.765 265 0],[823.002 265 0],[823.3 325 0],[823.535 120 0],[842.616 120 0],[844.625 810 0],[844.636 1000 0],[844.676 935 0],[882.043 325 0],[905.701 160 0],[911.829 120 0],[913.471 80 0],[915.014 80 0],[915.148 80 0],[915.601 235 0],[926.081 450 0],[926.084 490 0],[926.094 450 0],[926.258 400 0],[926.267 540 0],[926.277 590 0],[926.594 490 0],[926.601 640 0],[939.919 185 0],[948.116 120 0],[948.288 120 0],[948.743 235 0],[949.271 140 0],[949.797 265 0],[949.93 160 0],[950.559 235 0],[952.196 210 0],[952.336 120 0],[952.396 120 0],[952.828 100 0],[962.213 100 0],[962.529 120 0],[967.738 160 0],[969.466 80 0],[969.491 65 0],[974.15 235 0],[976.065 235 0],[990.905 120 0],[993.698 140 0],[994.041 120 0],[999.531 160 0],[1042.118 120 0],[1128.634 590 0],[1128.691 640 0],[1128.702 490 0],[1128.732 490 0],[1129.51 490 0],[1129.768 540 0],[1130.238 590 0],[1135.869 265 0],[1246.402 490 0],[1257.004 450 0],[1299.077 120 0],[1307.691 160 0],[1316.389 700 0],[1316.485 750 0],[1316.511 640 0],[1621.206 160 0],[1796.6699 120 0],[1802.1211 590 0],[1804.148 120 0],[1804.2189 120 0],[1804.623 120 0],[1822.923 140 0],[1824.3631 540 0],[2617.3561 140 0]}{ALLx1000x1000x900x1000x850x1000x0}{UVx1000x900x900x1000x850x1000x0}{VISx870x870x450x200x0x230x0}{IVx1000x1000x0x0x0x0x0}%
\pgfspectra@elt@search{#1}{F}{[13.454 8 4],[14.795 8 4],[14.8 10 4],[15.251 8 4],[15.854 8 4],[16.227 8 4],[16.35 8 4],[16.356 10 4],[16.598 18 4],[16.618 20 4],[16.979 6 3],[16.984 6 3],[17.107 6 3],[17.47 8 4],[17.637 8 3],[17.843 10 4],[17.859 8 4],[18.152 8 3],[18.157 8 3],[18.298 8 4],[18.672 8 4],[18.679 8 4],[18.684 10 4],[18.697 8 4],[18.701 8 4],[18.724 6 3],[19.057 12 4],[19.084 14 4],[19.197 8 4],[19.639 10 3],[19.645 12 3],[19.976 10 3],[19.98 10 3],[19.985 10 3],[19.993 10 3],[20 10 3],[20.009 14 3],[20.101 12 3],[20.106 14 3],[20.11 12 3],[20.116 16 3],[20.122 12 3],[20.555 8 4],[20.825 18 3],[21.385 14 3],[21.406 14 3],[22.077 14 3],[22.694 12 3],[22.71 10 3],[23.012 10 2],[23.322 12 3],[23.339 10 3],[23.986 14 3],[24.002 14 3],[24.008 18 3],[24.015 14 3],[24.028 14 3],[24.037 14 3],[25.103 20 3],[25.572 10 2],[25.577 12 2],[25.586 14 2],[26.171 14 2],[26.175 12 2],[26.381 16 2],[27.023 12 3],[27.969 14 2],[31.522 16 2],[31.554 14 2],[31.575 12 2],[37.53 6 1],[38.09 6 1],[40.704 8 1],[41.965 28 3],[42.005 30 3],[42.073 32 3],[42.951 20 2],[43.015 22 2],[43.022 16 2],[43.076 30 3],[43.091 10 1],[43.155 8 1],[43.564 8 1],[45.718 14 1],[46.429 18 2],[46.437 20 4],[46.511 20 2],[46.537 22 4],[46.598 24 4],[46.699 20 4],[47.195 8 1],[47.2 12 1],[47.271 10 1],[47.302 8 1],[48.46 18 1],[49.057 26 3],[49.1 32 3],[49.738 10 3],[49.783 12 3],[49.88 14 3],[50.616 18 4],[50.808 20 4],[50.839 24 2],[51.364 10 1],[51.397 14 4],[51.408 12 4],[51.494 14 1],[52.459 16 4],[52.529 18 4],[52.63 20 4],[54.685 14 1],[54.787 12 1],[54.832 10 1],[54.852 8 1],[56.769 24 2],[56.775 22 2],[57.064 28 3],[57.13 28 3],[57.139 30 3],[57.266 32 3],[60.567 18 1],[60.629 16 1],[60.68 20 1],[60.692 14 1],[60.747 16 1],[60.806 18 1],[63.014 16 2],[63.02 18 2],[64.767 14 4],[64.777 20 4],[64.787 22 4],[64.797 14 4],[65.403 26 4],[65.612 24 2],[65.687 26 2],[65.723 22 4],[65.733 28 4],[65.833 28 2],[67.612 28 3],[67.715 26 3],[67.722 30 3],[67.899 26 3],[67.921 32 3],[75.704 12 4],[78.039 3 0],[78.052 2 0],[78.238 2 0],[79.188 2.4 0],[79.254 2 0],[79.442 2 0],[80.696 30 0],[80.96 25 0],[95.187 100 0],[95.483 200 0],[95.555 150 0],[95.852 100 0],[97.24 4 0],[97.39 70 0],[97.622 20 0],[97.651 8 0],[97.775 20 0],[108.231 12 4],[108.839 14 4],[112.976 8 1],[121.903 16 2],[126.687 16 2],[126.771 18 2],[129.754 14 2],[132.706 8 1],[132.811 10 1],[133.359 8 1],[134.36 10 1],[134.404 8 1],[135.992 14 2],[140.061 10 1],[140.714 8 1],[149.309 12 1],[149.324 10 1],[149.331 8 1],[149.893 22 2],[150.201 24 2],[150.418 22 2],[150.479 28 2],[150.63 26 2],[150.677 22 2],[155.302 20 2],[155.759 22 2],[156.373 20 2],[156.554 20 2],[162.34 20 2],[165.076 20 2],[167.039 26 2],[167.74 28 2],[170.213 8 1],[171.699 20 2],[174.475 8 1],[174.555 10 1],[174.739 12 1],[177.009 24 2],[177.067 30 2],[177.293 22 2],[177.336 28 2],[179.165 32 2],[180.303 22 2],[180.47 20 2],[180.59 34 2],[183.93 22 2],[183.997 24 2],[184.014 22 2],[190.076 16 2],[202.744 20 2],[203.032 24 2],[217.144 8 3],[221.717 24 2],[222.918 2 4],[225.272 4 4],[229.829 10 3],[245.063 4 4],[245.158 8 3],[245.207 24 2],[245.692 10 3],[246.133 2 4],[246.485 26 2],[247.029 26 2],[247.873 24 2],[248.437 30 2],[254.277 24 2],[255.611 20 1],[258.004 24 2],[258.381 26 2],[259.323 24 2],[259.553 26 2],[259.928 28 2],[262.501 26 2],[262.97 28 2],[265.644 24 2],[269.398 2 4],[270.23 2 4],[270.396 2 4],[270.717 4 4],[275.555 26 2],[275.963 32 2],[278.815 24 2],[281.145 32 2],[282.074 8 3],[282.613 10 3],[283.399 28 2],[283.563 30 2],[286.033 30 2],[286.286 24 2],[287.14 20 1],[288.758 28 2],[288.945 30 2],[290.53 24 2],[291.329 28 2],[291.634 32 2],[293.249 28 2],[299.428 28 2],[299.721 24 2],[299.753 26 2],[299.947 24 2],[303.925 26 2],[303.975 24 2],[304.28 32 2],[304.914 30 2],[305.999 24 1],[311.362 28 2],[311.57 32 2],[312.154 36 2],[312.479 28 2],[313.423 28 2],[314.699 28 2],[315.349 28 1],[317.417 36 2],[317.476 34 2],[320.276 34 1],[321.4 24 2],[326.408 28 1],[341.465 28 1],[341.645 30 1],[341.68 28 1],[341.7 32 1],[347.296 32 1],[347.331 30 1],[347.478 34 1],[350.139 38 1],[350.145 40 1],[350.157 40 1],[350.284 36 1],[350.296 40 1],[350.311 42 1],[350.537 34 1],[350.552 40 1],[350.563 44 1],[352.289 32 1],[353.687 30 1],[354.177 32 1],[359.052 32 1],[359.41 1.2 0],[359.869 34 1],[360.139 36 1],[360.284 38 1],[366.817 2.4 0],[370.453 36 1],[371.035 32 1],[373.957 32 1],[380.583 28 1],[384.709 54 1],[384.999 52 1],[385.167 50 1],[389.848 1 0],[389.883 38 1],[390.193 36 1],[390.382 34 1],[393.069 1.6 0],[393.426 1 0],[394.856 1 0],[397.204 30 1],[397.267 32 1],[397.478 34 1],[402.473 48 1],[402.501 44 1],[402.549 46 1],[408.391 32 1],[410.307 38 1],[410.322 34 1],[410.351 40 1],[410.371 36 1],[410.387 34 1],[410.916 34 1],[411.654 32 1],[411.921 30 1],[420.715 28 1],[422.516 34 1],[424.412 30 1],[424.623 40 1],[424.639 38 1],[424.659 36 1],[424.677 34 1],[424.684 32 1],[427.536 34 1],[427.753 32 1],[427.893 32 1],[429.917 40 1],[442.03 28 2],[442.735 24 2],[443.232 24 2],[444.653 32 1],[444.672 34 1],[444.719 36 1],[447.999 28 2],[473.438 28 1],[485.939 34 1],[493.326 32 1],[496.065 1.2 0],[500.2 28 1],[501.254 30 2],[511.099 32 2],[517.325 30 1],[523.041 3 0],[527.901 2.4 0],[554.052 3.6 0],[555.243 2.4 0],[557.733 2 0],[558.927 32 1],[562.406 4 0],[562.693 2.4 0],[565.915 3 0],[566.753 8 0],[567.167 18 0],[568.914 3.6 0],[570.082 5 0],[570.731 5 0],[575.317 28 2],[576.12 24 2],[595.015 2.4 0],[595.919 5 0],[596.528 14 0],[599.443 10 0],[601.583 30 0],[603.804 16 0],[604.754 180 0],[608.011 20 0],[609.182 30 2],[612.55 28 2],[614.976 160 0],[621.087 80 0],[623.357 26 2],[623.965 2600 0],[624.79 28 1],[634.851 2000 0],[636.305 28 2],[641.365 1600 0],[656.969 90 0],[658.039 60 0],[665.041 80 0],[669.048 360 0],[670.828 80 0],[677.398 1400 0],[679.553 300 0],[683.426 1800 0],[685.603 10000 0],[687.022 1600 0],[690.248 3000 0],[690.982 1200 0],[696.635 800 0],[703.747 9000 0],[712.789 6000 0],[717.99 26 1],[720.236 3000 0],[721.179 26 1],[730.903 200 0],[731.102 3000 0],[731.43 140 0],[733.196 1000 0],[733.677 24 2],[735.494 26 2],[739.869 2000 0],[742.565 800 0],[748.272 440 0],[748.916 500 0],[751.492 180 0],[755.224 1000 0],[757.338 1000 0],[760.717 1400 0],[775.47 3600 0],[780.021 3000 0],[787.918 60 0],[789.859 100 0],[793.631 70 0],[795.632 60 0],[801.601 16 1],[804.093 200 0],[807.552 180 0],[807.752 70 0],[812.656 70 0],[812.926 120 0],[815.951 60 0],[817.934 120 0],[819.124 60 0],[820.863 70 0],[821.473 500 0],[823.077 600 0],[823.219 100 0],[827.462 300 0],[829.858 400 0],[830.24 120 0],[880.758 180 0],[890.092 200 0],[891.278 60 0],[902.549 70 0],[904.21 80 0],[917.868 70 0],[943.367 40 0],[950.53 5 0],[966.204 2.4 0],[973.434 5 0],[982.211 3 0],[990.265 2.4 0],[1004.798 16 1],[1028.545 3 0],[1086.231 4 0]}{ALLx10000x10000x54x36x32x28x0}{UVx200x200x44x36x32x28x0}{VISx10000x10000x54x32x0x0x0}{IVx3000x3000x16x0x0x0x0}%
@@ -44,7 +44,7 @@
\pgfspectra@elt@search{#1}{Na}{[10.628 100 4],[10.63 100 4],[10.64 100 4],[10.649 100 4],[10.793 200 4],[10.802 200 4],[11.082 200 4],[11.088 200 4],[11.151 100 4],[11.201 300 4],[11.47 100 4],[11.474 100 4],[11.799 400 4],[12.004 100 4],[12.518 400 4],[12.522 400 4],[12.529 500 4],[12.543 300 4],[12.546 300 4],[12.59 200 4],[12.621 100 4],[12.656 200 4],[12.661 100 4],[12.744 400 4],[12.747 400 4],[12.803 400 4],[12.805 400 4],[13.068 200 4],[13.135 300 4],[13.141 200 4],[13.164 300 4],[13.316 500 4],[13.339 400 4],[13.427 200 4],[13.579 300 4],[13.585 300 4],[13.6551 4 3],[13.6854 4 3],[13.881 200 4],[13.892 300 4],[13.9961 4 3],[14.2232 7 3],[14.2359 6 3],[14.6064 8 3],[14.6302 7 3],[14.864 400 4],[14.886 300 4],[15.0298 9 3],[15.0543 7 3],[15.064 7 3],[15.0687 8 3],[15.113 400 4],[15.1299 7 3],[15.5083 7 3],[15.524 7 3],[15.5448 7 3],[15.551 8 3],[15.6537 8 3],[15.721 300 4],[16.2448 12 3],[16.319 10 3],[16.362 300 4],[16.8411 12 3],[16.8546 10 3],[18.395 5 2],[18.935 5 2],[19.0445 10 3],[19.38 5 2],[19.404 5 2],[19.417 5 2],[19.429 5 2],[19.468 6 2],[19.553 6 2],[19.9772 10 3],[20.215 6 2],[20.219 6 2],[20.249 8 2],[20.271 5 2],[20.272 7 2],[20.276 8 2],[20.306 8 2],[20.328 8 2],[20.333 8 2],[20.549 10 3],[20.73 10 2],[21.534 10 2],[21.586 12 2],[21.612 12 2],[22.987 15 2],[23.059 12 2],[25.052 50 2],[25.137 30 2],[26.69 25 2],[26.765 70 2],[26.787 50 2],[26.863 50 2],[27.208 20 2],[27.245 20 2],[30.015 160 1],[30.02 160 1],[30.132 90 1],[30.144 100 1],[30.245 60 1],[30.715 800 4],[30.826 1000 4],[31.9644 10 3],[33.255 800 4],[33.391 900 4],[36.032 800 4],[36.037 800 4],[36.076 10 3],[37.208 300 1],[37.638 350 1],[37.814 100 2],[38.01 70 2],[40.072 1000 4],[40.8684 12 3],[40.9614 10 3],[41.0372 15 3],[41.1334 10 3],[41.2242 13 3],[44.505 500 4],[44.519 600 4],[45.99 600 4],[46.105 850 4],[46.326 1000 4],[129.397 60 1],[132.774 50 1],[133.676 7 2],[133.736 7 2],[134.067 8 2],[134.239 9 2],[134.273 10 2],[134.754 45 1],[135.528 11 2],[136.19 12 2],[137.234 11 2],[137.469 90 1],[140.468 90 1],[142.089 10 2],[144.419 10 2],[144.931 12 2],[149.521 45 1],[149.601 40 1],[149.773 45 1],[150.641 80 1],[150.691 60 1],[151.31 70 1],[151.963 60 1],[156.287 11 2],[156.529 10 2],[158.05 10 3],[158.218 11 3],[158.233 10 3],[158.398 11 3],[158.414 12 3],[158.699 10 3],[158.705 12 3],[159.818 10 2],[161.395 10 3],[161.592 11 3],[161.857 12 3],[165.547 11 3],[165.792 60 1],[168.894 11 2],[169.929 10 2],[170.197 15 3],[170.241 10 3],[171.112 10 2],[172.827 11 2],[173.111 10 2],[175.548 10 2],[177.657 90 1],[177.824 40 1],[178.304 60 1],[178.719 80 1],[178.885 45 1],[179.841 80 1],[180.126 45 1],[180.707 15 2],[180.709 90 1],[180.838 60 1],[181.077 10 2],[181.167 11 2],[181.681 10 2],[182.17 50 1],[183.387 45 1],[183.522 10 2],[183.522 80 1],[183.789 45 1],[183.894 10 2],[184.182 60 1],[184.436 11 2],[184.502 70 1],[184.753 12 2],[184.759 10 2],[184.956 15 2],[185.015 45 1],[185.038 12 2],[185.119 70 1],[185.317 80 1],[185.592 10 2],[185.671 10 2],[186.121 10 2],[186.645 45 1],[187.337 45 1],[187.508 60 1],[188.066 10 2],[188.191 160 1],[188.509 50 1],[188.574 45 1],[188.739 10 2],[188.747 20 2],[189.075 15 2],[190.016 15 2],[191.845 10 2],[192.396 11 2],[192.626 14 2],[192.724 12 2],[193.274 12 2],[193.389 13 2],[194.352 10 2],[194.643 12 2],[195.091 12 2],[195.124 14 2],[196.076 12 3],[196.508 11 3],[196.76 10 3],[197.716 10 2],[198.557 13 2],[199.568 10 2],[200.421 10 2],[200.522 11 2],[200.847 11 2],[201.187 15 2],[201.417 11 2],[201.703 12 2],[201.839 10 3],[202.856 12 2],[203.113 12 2],[203.59 11 2],[204.166 12 2],[204.329 12 2],[204.482 10 2],[204.544 10 2],[205.148 11 2],[206.036 10 2],[206.66 15 2],[208.291 13 2],[210.633 12 3],[211.453 10 3],[214.072 15 2],[214.454 14 2],[215.576 10 3],[220.283 15 2],[222.593 15 2],[222.853 80 1],[223.033 30 2],[223.219 16 2],[224.67 20 2],[225.147 14 2],[227.842 15 2],[228.566 13 2],[230.358 80 1],[230.999 15 2],[231.565 300 1],[238.699 18 2],[239.328 130 1],[239.403 17 2],[240.101 100 1],[240.659 15 2],[242.099 300 1],[242.473 300 1],[243.914 200 1],[244.15 250 1],[244.872 200 1],[245.218 200 1],[245.931 25 2],[246.885 18 2],[247.473 20 2],[249.315 1000 1],[249.703 25 2],[250.284 300 1],[250.63 450 1],[251.026 17 2],[251.546 600 1],[253.025 15 2],[253.154 600 1],[254.28 14 2],[258.631 550 1],[259.496 600 1],[261.181 850 1],[262.741 300 1],[263.181 300 1],[264.853 160 1],[265.131 200 1],[265.981 200 1],[266.1 850 1],[266.346 200 1],[266.646 350 1],[267.183 1000 1],[267.404 200 1],[267.809 850 1],[280.871 650 1],[280.952 850 1],[281.829 350 1],[282.987 600 1],[283.956 800 1],[284.172 1000 1],[285.281 16 0],[285.301 15 0],[285.651 650 1],[285.949 800 1],[286.102 350 1],[287.128 750 1],[287.295 650 1],[288.115 900 1],[288.626 850 1],[289.395 700 1],[290.114 900 1],[290.472 800 1],[290.492 1100 1],[291.752 1100 1],[291.905 1100 1],[291.985 1200 1],[292.095 1300 1],[292.349 1000 1],[293.088 750 1],[293.408 850 1],[293.774 950 1],[294.266 450 1],[294.57 800 1],[294.75 950 1],[295.124 1200 1],[295.24 1100 1],[296.012 850 1],[296.574 450 1],[297.073 500 1],[297.424 600 1],[297.499 750 1],[297.713 1000 1],[297.966 1100 1],[298.063 1100 1],[298.419 1300 1],[300.415 550 1],[300.744 750 1],[300.914 750 1],[300.948 450 1],[301.54 600 1],[301.734 450 1],[302.907 400 1],[303.708 400 1],[304.56 400 1],[305.367 550 1],[305.535 550 1],[305.616 550 1],[305.738 550 1],[305.795 550 1],[305.872 550 1],[306.025 700 1],[306.135 800 1],[306.438 500 1],[306.622 500 1],[306.654 500 1],[307.433 550 1],[307.832 550 1],[308.025 550 1],[308.706 550 1],[308.826 450 1],[309.204 550 1],[309.273 550 1],[309.445 650 1],[309.555 650 1],[310.358 500 1],[310.44 500 1],[311.145 450 1],[311.369 500 1],[312.294 400 1],[312.442 1700 1],[312.521 600 1],[312.938 600 1],[313.548 2500 1],[313.786 1700 1],[314.571 950 1],[314.928 2000 1],[316.374 2000 1],[317.509 700 1],[317.906 1000 1],[318.979 1700 1],[321.219 1600 1],[323.493 700 1],[325.796 1500 1],[326.021 650 1],[327.422 950 1],[328.56 1700 1],[330.135 1700 1],[330.237 19 0],[330.298 18 0],[330.496 1500 1],[331.804 1000 1],[332.769 950 1],[342.686 6 0],[353.305 1500 1],[363.127 1200 1],[371.107 850 1],[408.137 200 1],[411.37 300 1],[412.308 250 1],[423.326 250 1],[423.899 2 0],[424.037 200 1],[424.09 250 1],[424.208 3 0],[427.364 4 0],[427.679 5 0],[428.784 2 0],[429.101 3 0],[429.248 250 1],[429.286 250 1],[430.881 250 1],[430.904 250 1],[432.091 250 1],[432.14 6 0],[432.462 7 0],[433.729 250 1],[434.149 4 0],[434.411 250 1],[434.474 5 0],[436.86 200 1],[437.522 200 1],[438.749 200 1],[439.003 8 0],[439.281 250 1],[439.334 9 0],[440.512 200 1],[441.989 6 0],[442.325 7 0],[444.67 200 1],[444.741 200 1],[445.474 200 1],[445.523 200 1],[445.721 200 1],[447.463 200 1],[447.88 200 1],[448.167 200 1],[449.015 200 1],[449.087 200 1],[449.418 10 0],[449.766 11 0],[449.962 200 1],[450.697 200 1],[451.921 200 1],[452.498 200 1],[453.332 200 1],[454.163 7 0],[454.519 8 0],[455.153 200 1],[459.092 160 1],[472.223 160 1],[473.11 160 1],[473.25 100 1],[474.167 160 1],[476.879 160 1],[478.879 100 1],[481.475 50 1],[483.526 50 1],[514.311 60 1],[519.165 100 1],[520.333 50 1],[520.855 80 1],[539.063 60 1],[540.046 70 1],[541.455 90 1],[568.2633 5 0],[568.8204 9 0],[588.995 32 0],[589.5924 16 0],[617.525 60 1],[619.926 70 1],[623.468 70 1],[626.001 80 1],[627.474 80 1],[631.08 60 1],[635.283 60 1],[635.805 60 1],[636.115 70 1],[636.641 70 1],[637.891 60 1],[647.529 50 1],[651.421 90 1],[652.468 80 1],[653.07 130 1],[654.404 130 1],[654.575 130 1],[655.243 80 1],[780.978 4 0],[781.024 3 0],[818.3256 5 0],[819.4824 9 0],[864.992 7 0],[865.089 6 0],[915.388 4 0],[946.594 6 0],[996.128 7 0],[1057.228 3 0],[1074.644 10 0],[1074.929 9 0],[1083.487 8 0],[1138.145 11 0],[1140.378 12 0],[1476.748 115 0],[2205.6439 30 0],[2208.367 27 0],[2334.841 24 0],[2337.9131 24 0]}{ALLx2500x115x2500x100x15x1000x0}{UVx2500x19x2500x100x15x1000x0}{VISx300x32x300x0x0x0x0}{IVx115x115x0x0x0x0x0}%
\pgfspectra@elt@search{#1}{Mg}{[11.816 40 3],[11.881 80 3],[12.359 70 3],[12.465 240 3],[12.986 300 3],[13.281 300 3],[14.695 400 3],[14.741 300 3],[14.754 300 3],[17.08 15 2],[17.139 15 2],[18.007 350 3],[18.062 400 3],[18.08 400 3],[18.134 350 3],[18.224 15 2],[18.297 12 2],[18.651 20 2],[18.72 20 2],[18.853 10 2],[23.173 100 2],[23.426 80 2],[25.158 5 4],[27.658 35 4],[31.23 10 4],[32.099 4000 3],[32.331 3000 3],[35.109 20 4],[35.22 18 4],[35.309 30 4],[35.33 15 4],[35.422 18 4],[35.533 20 4],[80.041 40 3],[85.729 150 3],[86.674 30 3],[91.903 50 3],[92.978 30 3],[94.67 8 1],[94.677 9 1],[100.876 40 3],[102.596 14 1],[102.611 12 1],[102.641 30 3],[103.741 250 3],[104.437 80 3],[105.576 60 3],[121.099 300 3],[123.994 25 1],[124.04 20 1],[124.851 6 1],[124.993 8 1],[127.124 8 1],[127.194 9 1],[127.272 8 1],[127.343 11 1],[127.483 10 2],[128.07 11 2],[130.671 11 1],[130.788 12 1],[130.828 12 1],[130.944 14 1],[134.219 300 3],[134.657 800 3],[134.668 300 3],[135.205 600 3],[136.545 14 1],[136.726 15 1],[136.77 15 1],[136.942 18 1],[138.446 900 3],[138.577 500 3],[138.753 800 3],[139.127 12 2],[139.339 15 2],[140.468 300 3],[140.936 1000 3],[143.114 10 2],[143.753 500 3],[143.764 1000 3],[144.742 300 3],[145.954 300 3],[145.962 400 3],[147.6 20 1],[147.801 25 1],[148.089 20 1],[148.151 400 3],[148.29 30 1],[149.045 350 3],[149.55 300 3],[157.271 16 2],[158.624 12 2],[160.711 300 3],[164.593 1 0],[165.116 1 0],[165.831 2 0],[166.843 5 0],[168.302 500 3],[168.341 10 0],[168.709 13 2],[169.728 13 2],[169.881 400 3],[170.706 15 0],[172.204 10 2],[173.484 40 1],[173.762 50 1],[173.884 22 2],[174.756 12 2],[174.78 20 0],[174.893 18 2],[175.065 40 1],[175.346 50 1],[177.298 15 2],[178.325 20 2],[179.458 14 2],[180.066 15 2],[182.793 30 0],[184.417 300 3],[185.819 13 2],[187.949 12 2],[190.85 10 2],[192.39 12 2],[193.067 13 2],[193.784 11 2],[202.582 9 0],[203.955 15 2],[205.549 15 2],[206.49 25 2],[208.59 15 2],[209.196 20 2],[209.793 13 2],[211.277 15 2],[213.406 16 2],[217.77 20 2],[232.958 3 1],[239.515 20 2],[244.957 6 1],[246.775 15 2],[249.054 10 2],[251.84 12 3],[252.919 10 2],[253.479 4 3],[255.723 1 0],[256.094 1 0],[256.226 1 0],[256.494 1 0],[257.091 1 0],[257.225 1 0],[257.494 2 0],[257.789 1 0],[258.059 1 0],[258.422 1 0],[258.556 2 0],[258.828 3 0],[259.189 1 0],[259.323 1 0],[259.597 2 0],[260.25 2 0],[260.385 4 0],[260.662 5 0],[261.336 1 0],[261.473 2 0],[261.751 3 0],[262.866 3 0],[263.005 6 0],[263.287 8 0],[264.48 2 0],[264.621 3 0],[264.906 4 0],[266.076 8 1],[266.082 8 1],[266.812 6 0],[266.955 8 0],[267.246 10 0],[269.372 3 0],[269.518 5 0],[269.814 6 0],[273.199 8 0],[273.349 10 0],[273.653 12 0],[276.522 5 0],[276.834 7 0],[277.669 38 0],[277.827 32 0],[277.983 90 0],[278.129 8 0],[278.142 32 0],[278.297 36 0],[279.079 13 1],[279.553 1000 1],[279.806 16 1],[280.27 600 1],[280.976 3 0],[281.111 2 0],[281.178 1 0],[284.672 12 0],[284.675 12 0],[284.834 14 0],[284.842 14 0],[285.165 16 0],[285.166 16 0],[285.213 6000 0],[290.292 2 0],[290.636 4 0],[291.545 3 0],[291.545 3 0],[292.875 2 1],[293.654 3 1],[293.674 10 0],[293.674 10 0],[293.847 12 0],[293.847 12 0],[294.2 2 0],[294.2 13 0],[296.787 1 1],[297.17 1 1],[309.108 20 0],[309.299 22 0],[309.69 14 0],[310.471 9 1],[310.481 8 1],[316.898 6 1],[317.271 6 1],[317.578 7 1],[319.762 2 0],[329.905 12 2],[330.639 13 2],[332.993 17 0],[333.215 6 0],[333.59 12 2],[333.668 9 0],[334.258 11 2],[336.141 12 2],[338.124 10 2],[338.29 11 2],[338.737 11 2],[353.504 7 1],[353.886 8 1],[354.952 7 1],[355.337 8 1],[370.674 10 2],[382.93 140 0],[383.23 300 0],[383.829 500 0],[384.824 8 1],[384.891 1 0],[385.04 7 1],[385.396 2 0],[385.496 1 0],[385.886 2 0],[387.831 3 0],[389.191 2 0],[389.33 2 0],[389.557 3 0],[390.386 4 0],[393.84 6 0],[398.421 1 0],[398.675 8 0],[405.469 2 0],[405.75 10 0],[407.506 3 0],[408.183 2 0],[416.51 4 0],[416.727 15 0],[435.191 20 0],[435.453 6 0],[438.038 6 0],[438.464 9 1],[439.059 10 1],[442.8 8 1],[443.399 9 1],[443.649 5 1],[443.66 4 1],[448.116 14 1],[448.133 13 1],[453.429 6 1],[457.11 28 0],[462.13 3 0],[470.299 7 0],[473.003 10 0],[473.959 6 1],[473.971 5 1],[485.11 7 1],[491.6 10 2],[516.733 75 0],[517.268 220 0],[518.361 400 0],[526.421 8 1],[526.437 7 1],[534.598 1 0],[540.154 9 1],[550.96 2 0],[552.841 6 0],[571.109 30 0],[578.531 5 0],[578.556 4 0],[583.982 10 2],[591.643 7 1],[591.816 6 1],[625.675 15 2],[631.872 10 0],[631.924 9 0],[631.949 7 0],[634.674 10 1],[634.696 9 1],[654.597 11 1],[662.044 5 1],[662.057 6 1],[663.083 2 0],[678.145 7 1],[678.785 8 1],[681.286 7 1],[681.927 8 1],[689.49 4 0],[696.54 6 0],[706.041 8 0],[719.317 10 0],[729.106 10 0],[738.7 5 0],[738.769 12 0],[758.076 4 1],[765.76 20 0],[765.915 19 0],[765.99 17 0],[769.016 8 0],[769.155 15 0],[772.261 1 0],[774.634 1 0],[775.93 1 0],[778.65 5 1],[779.098 4 1],[781.114 3 0],[787.705 12 1],[788.167 2 0],[789.637 13 1],[793.081 7 0],[804.773 3 0],[804.985 5 0],[805.423 7 0],[809.872 10 0],[811.522 9 1],[812.043 8 1],[815.464 1 0],[815.913 2 0],[820.984 10 0],[821.303 20 0],[821.399 10 1],[822.292 7 1],[823.319 7 1],[823.464 11 1],[830.331 7 0],[830.56 9 0],[831.026 10 0],[834.612 15 0],[846.648 2 0],[846.884 5 0],[847.369 7 0],[871.018 10 0],[871.269 12 0],[871.783 13 0],[873.499 10 1],[873.602 17 0],[874.566 11 1],[880.676 14 0],[882.432 10 1],[883.508 11 1],[892.357 20 0],[898.903 7 0],[899.169 9 0],[899.716 10 0],[921.825 14 1],[924.427 13 1],[924.65 12 0],[925.578 30 0],[932.754 10 1],[934.054 10 1],[941.496 25 0],[942.981 17 0],[943.276 19 0],[943.878 20 0],[950.245 8 0],[950.311 7 0],[950.343 5 0],[963.189 12 1],[963.243 11 1],[995.32 15 0],[998.32 15 0],[998.647 17 0],[999.321 18 0],[1009.216 14 1],[1039.176 5 1],[1039.223 6 1],[1081.108 35 0],[1091.423 11 1],[1091.527 7 1],[1095.178 10 1],[1095.332 25 0],[1095.73 27 0],[1096.545 28 0],[1103.21 15 0],[1103.366 14 0],[1125.593 5 1],[1125.635 4 1],[1182.818 45 0],[1208.366 30 0],[1487.762 28 0],[1502.499 35 0],[1504.024 30 0],[1504.77 25 0],[1574.071 6 0],[1574.899 8 0],[1576.584 10 0],[1710.866 30 0],[2639.29 5 0]}{ALLx6000x6000x1000x100x4000x35x0}{UVx6000x6000x1000x100x4000x35x0}{VISx500x500x14x15x0x0x0}{IVx45x45x14x0x0x0x0}%
\pgfspectra@elt@search{#1}{Al}{[10.38 300 4],[10.388 400 4],[10.407 250 4],[10.418 250 4],[10.795 600 4],[10.806 300 4],[10.811 300 4],[11.85 250 4],[12.403 400 3],[12.553 900 4],[12.607 800 4],[12.973 700 3],[13.041 800 4],[13.085 1000 4],[13.1 900 4],[13.144 900 4],[13.263 500 4],[16.007 800 3],[16.169 700 3],[27.869 1000 4],[28.139 900 4],[48.6884 70 2],[48.6912 30 2],[51.1138 250 2],[51.1191 150 2],[56.0317 500 2],[56.0433 200 2],[67.0068 100 2],[67.1118 200 2],[69.5829 500 2],[69.6217 400 2],[72.5683 200 2],[72.6915 300 2],[85.5034 400 2],[85.6746 500 2],[89.2024 400 2],[89.3887 50 2],[89.3897 450 2],[102.734 500 3],[104.217 800 3],[104.852 700 3],[105.89 500 3],[106.143 500 3],[106.489 600 3],[106.657 500 3],[106.826 250 4],[106.944 600 3],[108.867 500 4],[109.014 300 4],[110.574 400 3],[111.882 600 3],[112.561 500 3],[113.682 400 3],[115.03 300 4],[116.259 10 2],[116.262 5 2],[116.542 350 4],[116.848 250 4],[117.743 40 1],[119.1812 50 1],[119.85 400 3],[122.055 400 3],[123.719 900 3],[124.021 600 3],[124.086 700 3],[124.879 700 3],[125.762 900 3],[126.418 800 3],[127.276 1000 3],[128.77 500 4],[133.006 400 4],[133.79 400 3],[135.018 150 1],[135.052 400 4],[135.281 100 2],[135.282 5 2],[135.286 70 2],[136.335 400 4],[136.92 600 4],[137.37 300 4],[137.662 500 3],[137.967 600 2],[138.413 800 2],[138.879 500 3],[143.194 600 3],[144.182 700 3],[144.587 400 4],[144.751 800 3],[145.526 300 4],[145.796 600 3],[147.564 600 4],[148.605 300 4],[148.689 700 3],[149.479 800 3],[150.837 700 4],[151.907 400 3],[152.614 1000 4],[153.754 800 3],[153.912 500 4],[153.983 800 1],[155.019 500 3],[155.725 1000 3],[155.903 500 3],[156.416 700 3],[156.9385 100 1],[157.79 300 4],[158.204 900 3],[158.446 800 3],[158.928 400 3],[158.987 350 4],[159.6059 125 1],[160.5766 700 2],[160.665 400 3],[161.1814 100 2],[161.1874 800 2],[161.781 400 3],[162.5627 150 1],[162.754 600 3],[163.682 500 3],[163.906 800 3],[164.4235 100 1],[164.4809 100 1],[167.0787 1000 1],[168.625 100 1],[171.944 800 1],[172.1244 500 1],[172.1271 900 1],[172.4952 500 1],[172.4984 900 1],[176.0104 350 1],[176.1975 300 1],[176.3 290 0],[176.3869 500 1],[176.3952 700 1],[176.564 450 0],[176.5815 300 1],[176.638 450 0],[176.7731 400 1],[176.914 450 0],[181.856 1000 3],[182.8588 600 1],[183.2837 400 1],[183.4808 250 1],[185.4716 1000 2],[185.5929 300 1],[185.8026 700 1],[185.998 120 1],[186.2311 1000 1],[186.279 600 2],[188.116 700 3],[192.9978 200 1],[193.1048 150 1],[193.2377 200 1],[193.4503 400 1],[193.4713 150 1],[193.584 300 2],[193.5863 15 2],[193.5949 200 2],[193.6907 150 1],[193.9261 220 1],[199.0531 700 1],[201.6052 150 1],[201.6234 150 1],[201.6368 100 1],[207.4008 200 1],[209.4264 700 1],[209.4744 150 1],[209.4791 300 1],[209.5104 100 1],[209.5141 200 1],[215.07 60 0],[218.1 60 0],[226.91 400 0],[226.922 120 0],[231.249 60 0],[231.353 70 0],[231.748 90 0],[231.906 60 0],[232.156 140 0],[236.705 460 0],[236.761 110 0],[236.811 110 0],[236.93 180 0],[237.022 140 0],[237.073 70 0],[237.207 160 0],[237.312 850 0],[237.335 170 0],[237.357 110 0],[237.84 60 0],[239.9 110 2],[251.33 60 0],[251.587 400 3],[256.798 240 0],[257.51 480 0],[257.54 60 0],[263.155 80 1],[263.77 110 1],[265.248 150 0],[266.039 200 0],[266.917 160 1],[276.277 285 2],[276.287 220 2],[281.619 650 1],[283.796 90 0],[284.01 90 0],[290.693 450 2],[304.128 150 1],[305.007 360 0],[305.468 60 0],[305.714 450 0],[306.429 90 0],[306.614 60 0],[307.464 150 1],[308.2153 4500 0],[309.271 7200 0],[309.2839 1800 0],[320.82 500 3],[326.721 500 3],[328.513 600 3],[334.446 400 3],[334.852 360 2],[335.088 290 2],[342.892 150 1],[343.935 70 0],[344.364 150 0],[344.486 70 0],[345.822 70 0],[347.354 500 3],[347.981 60 0],[348.263 60 0],[349.223 900 3],[350.846 800 3],[351.128 500 3],[351.756 700 3],[352.703 400 3],[354.108 500 3],[358.656 450 1],[358.707 360 1],[358.745 290 1],[360.163 870 2],[360.193 550 2],[361.236 750 2],[365.106 220 1],[365.11 110 1],[365.498 150 1],[365.5 290 1],[370.211 450 2],[371.312 550 2],[390.068 450 1],[393.2 60 0],[394.4006 4500 0],[396.152 9000 0],[398.014 110 2],[399.586 110 1],[408.245 110 2],[408.861 150 2],[414.237 110 2],[414.992 650 2],[415.017 650 2],[422.681 290 1],[436.464 110 2],[447.989 650 2],[447.997 650 2],[451.256 760 2],[452.894 550 2],[452.919 870 2],[458.582 150 1],[458.819 110 1],[466.68 550 1],[470.115 110 2],[470.141 150 2],[489.876 110 1],[490.277 110 1],[490.41 110 2],[510.752 70 0],[515.101 110 2],[516.389 110 2],[528.021 150 1],[528.377 290 1],[528.585 150 1],[531.232 110 1],[531.607 220 1],[537.184 150 1],[555.706 180 0],[555.795 110 0],[559.323 450 1],[569.66 1200 2],[572.273 1000 2],[585.362 110 1],[597.194 220 1],[600.176 290 1],[600.188 220 1],[600.642 450 1],[605.521 110 2],[606.111 150 1],[606.843 290 1],[606.853 110 1],[607.323 450 1],[618.157 110 1],[618.168 150 1],[618.228 290 1],[618.245 220 1],[618.342 450 1],[620.152 450 1],[620.17 360 1],[622.618 290 1],[623.178 360 1],[624.336 450 1],[633.574 450 1],[669.602 360 0],[669.867 230 0],[708.397 60 0],[708.464 70 0],[736.157 110 0],[736.23 140 0],[760.616 60 0],[761.482 90 0],[763.537 220 2],[766.026 150 2],[768.197 220 2],[783.531 230 0],[783.613 290 0],[788.179 360 2],[788.252 150 2],[790.551 290 2],[799.305 60 0],[800.319 90 0],[806.597 70 0],[807.535 110 0],[824.359 290 2],[827.511 360 2],[864.07 290 1],[877.287 360 0],[877.39 450 0],[882.891 110 0],[884.128 180 0],[891.29 90 0],[892.356 140 0],[908.991 60 0],[913.995 70 0],[929.065 150 1],[929.075 110 1],[957.152 290 2],[960.599 360 2],[1007.629 150 1],[1076.836 110 0],[1078.204 140 0],[1087.298 110 0],[1089.173 230 0],[1125.319 450 0],[1125.488 570 0],[1312.341 570 0],[1315.076 450 0],[1671.8961 230 0],[1675.0561 300 0],[1676.3359 140 0],[2109.3039 300 0],[2116.375 360 0]}{ALLx9000x9000x1000x1200x1000x1000x0}{UVx7200x7200x1000x1000x1000x1000x0}{VISx9000x9000x550x1200x0x0x0}{IVx570x570x290x360x0x0x0}%
-\pgfspectra@elt@search{#1}{Si}{[7.861 1 4],[7.89 1 4],[8.081 2 4],[8.111 2 4],[8.518 10 4],[8.558 6 4],[9.045 4 4],[9.085 4 4],[9.644 15 4],[9.714 10 4],[9.821 2 4],[11.786 20 4],[11.897 20 4],[45.782 4 3],[45.816 3 3],[51.512 2 3],[51.635 3 3],[56.661 8 2],[64.576 2 3],[65.222 6 2],[65.333 8 2],[67.348 5 2],[74.994 5 3],[80.007 5 2],[80.51 10 1],[81.505 7 3],[81.813 8 3],[82.052 20 1],[82.341 9 2],[84.372 20 1],[84.577 40 1],[85.014 10 1],[88.34 5 2],[88.972 100 1],[89.2 200 1],[89.941 10 1],[90.174 20 1],[91.301 10 1],[91.385 20 1],[92.981 20 1],[93.909 7 2],[96.795 9 2],[98.987 100 1],[99.268 200 1],[99.352 10 2],[99.479 13 2],[99.739 16 2],[100.537 7 2],[102.07 25 1],[102.369 50 1],[103.116 7 2],[103.392 8 2],[103.705 7 2],[105.705 30 1],[105.75 15 1],[106.663 8 3],[108.322 6 2],[110.837 14 2],[110.997 16 2],[111.323 18 2],[112.249 8 3],[112.744 20 1],[112.791 40 1],[112.834 10 3],[114.055 6 2],[114.158 7 2],[114.228 6 2],[114.431 8 2],[114.496 6 2],[114.511 8 2],[114.518 7 2],[115.5 6 2],[115.596 6 2],[115.81 7 2],[116.026 6 2],[116.158 8 2],[117.437 5 2],[117.443 6 2],[117.8 8 2],[119.042 100 1],[119.328 200 1],[119.45 250 1],[119.739 100 1],[120.651 30 2],[120.653 30 2],[120.752 9 2],[121.046 10 2],[121.612 10 1],[122.391 20 1],[122.425 20 1],[122.497 10 1],[122.681 50 1],[122.689 20 1],[122.699 40 1],[122.76 100 1],[122.844 10 1],[122.862 25 1],[122.875 150 1],[122.939 200 1],[123.543 7 2],[123.592 10 1],[124.674 100 1],[124.843 150 1],[125.009 100 1],[125.043 150 1],[125.116 200 1],[125.528 10 0],[125.649 40 0],[125.88 50 0],[126.042 1000 1],[126.473 2000 1],[126.502 200 1],[128.035 6 2],[129.454 17 2],[129.673 14 2],[129.889 15 2],[129.896 18 2],[130.115 14 2],[130.332 16 2],[130.437 100 1],[130.559 50 1],[130.927 200 1],[130.946 20 1],[131.259 13 2],[134.147 8 2],[134.239 7 2],[134.339 6 2],[134.687 100 1],[134.854 100 1],[135.006 150 1],[135.052 20 1],[135.066 20 1],[135.264 100 1],[135.372 100 1],[136.16 8 2],[136.237 5 2],[136.347 7 2],[136.526 8 2],[136.705 7 2],[136.944 5 2],[137.303 5 2],[138.799 5 2],[139.376 15 3],[140.277 12 3],[140.907 10 1],[141.022 20 1],[141.697 10 1],[141.724 13 2],[143.369 6 2],[143.577 8 2],[143.617 7 2],[144.173 5 2],[144.72 6 2],[145.725 5 2],[147.465 15 1],[148.487 15 1],[148.502 90 1],[148.522 30 1],[148.551 100 1],[150.024 12 2],[150.119 10 2],[150.187 9 2],[150.606 6 2],[150.91 100 1],[151.207 50 1],[151.357 30 1],[151.691 60 1],[152.672 500 1],[153.345 1000 1],[156.245 10 1],[156.285 15 1],[156.377 10 1],[157.387 50 0],[157.482 50 0],[159.241 50 0],[159.455 150 0],[159.493 50 0],[159.795 30 0],[162.287 100 0],[162.571 30 0],[162.943 300 0],[162.992 200 0],[163.113 75 0],[163.398 50 0],[163.461 1 3],[165.335 30 0],[166.452 30 0],[166.637 50 0],[166.762 100 0],[166.852 100 0],[167.259 100 0],[167.332 7 2],[167.52 200 0],[168.268 30 0],[168.682 30 0],[168.929 50 0],[169.079 30 0],[169.329 50 0],[169.551 50 0],[169.62 200 0],[169.794 200 0],[170.042 50 0],[170.063 30 0],[170.286 30 0],[170.443 50 0],[171.083 10 1],[171.13 20 1],[172.253 6 3],[172.738 5 3],[174.388 30 0],[174.74 50 0],[175.311 30 0],[176.366 50 0],[176.503 40 0],[176.56 30 0],[176.606 30 0],[177.063 30 0],[177.092 100 0],[177.683 100 0],[178.323 50 0],[179.912 100 0],[180.8 150 1],[180.909 50 0],[181.407 500 0],[181.692 200 1],[181.745 10 1],[182.245 50 0],[183.651 200 0],[183.801 30 0],[184.115 100 0],[184.144 200 0],[184.255 9 2],[184.377 200 0],[184.551 300 0],[184.61 100 0],[184.747 400 0],[184.814 200 0],[184.874 100 0],[185.067 500 0],[185.179 30 0],[185.246 200 0],[185.315 50 0],[186.932 20 1],[187.023 15 1],[187.31 100 0],[187.484 500 0],[187.581 100 0],[188.185 200 0],[188.77 200 0],[189.325 200 0],[190.133 1000 0],[190.246 100 1],[190.466 50 0],[191.062 50 1],[194.167 50 1],[194.459 15 1],[194.933 10 1],[194.956 100 1],[195.497 100 0],[198.443 30 0],[199.185 50 0],[201.097 30 0],[205.483 50 0],[205.865 50 1],[205.901 50 1],[206.119 40 0],[206.552 30 0],[207.202 200 1],[207.27 200 1],[210.321 30 0],[211.463 30 0],[212.018 3 3],[212.412 100 0],[212.747 4 3],[213.399 10 1],[213.64 30 1],[213.656 50 1],[214.791 50 0],[217.689 5 2],[220.798 110 0],[221.089 115 0],[221.174 110 0],[221.667 120 0],[221.806 120 0],[221.891 50 0],[228.704 5 3],[229.103 35 0],[229.548 6 2],[229.687 10 2],[230.093 8 2],[230.306 55 0],[230.819 10 2],[232.856 2 3],[233.44 30 1],[233.461 30 1],[234.42 10 1],[234.954 10 1],[235.017 20 1],[235.309 20 1],[235.63 100 1],[235.718 30 1],[235.797 50 1],[236.02 10 1],[236.676 2 3],[236.697 30 1],[237.099 3 3],[237.426 20 1],[242.845 10 1],[243.515 300 0],[243.877 65 0],[244.336 65 0],[244.948 11 2],[245.212 70 0],[248.282 2 3],[248.32 6 2],[248.538 1 3],[250.69 425 0],[251.432 375 0],[251.6113 500 0],[251.751 7 3],[251.9202 350 0],[252.4108 425 0],[252.8509 450 0],[253.2381 110 0],[254.182 25 2],[254.609 10 2],[255.921 14 2],[256.3679 30 0],[256.8641 85 0],[257.7151 45 0],[263.1282 190 0],[264.079 11 2],[265.551 14 2],[267.219 1 3],[267.512 4 3],[267.525 4 3],[267.757 1 3],[268.221 10 1],[272.381 3 3],[281.711 9 2],[283.149 7 2],[283.962 5 2],[288.1579 1000 0],[288.751 10 1],[289.513 3 3],[290.428 300 1],[290.447 2 3],[290.569 500 1],[295.915 5 2],[297.0355 55 0],[297.152 1 3],[298.052 5 2],[298.7645 150 0],[300.6739 50 0],[301.309 5 2],[302.0004 75 0],[302.155 20 1],[303 100 1],[303.473 6 2],[303.729 8 2],[304.093 9 2],[304.157 20 1],[304.219 30 1],[304.369 100 1],[304.385 10 1],[304.393 7 2],[304.508 5 2],[304.577 10 1],[304.83 50 1],[305.318 150 1],[306.824 7 2],[308.624 25 2],[308.646 6 2],[309.342 20 2],[309.365 5 2],[309.683 16 2],[312.627 6 2],[314.737 7 2],[314.956 7 3],[316.161 8 2],[316.571 9 3],[318.513 16 2],[318.602 13 2],[318.897 150 1],[319.225 50 1],[319.309 150 1],[319.421 50 1],[319.469 50 1],[319.541 100 1],[319.65 14 2],[319.951 200 1],[320.249 20 1],[320.387 100 1],[321.003 200 1],[321.055 15 2],[321.466 75 1],[321.625 7 2],[321.799 15 1],[322.044 10 1],[322.301 20 1],[323.05 12 2],[323.395 14 2],[324.162 15 2],[324.419 1 3],[325.34 7 2],[325.374 5 2],[325.48 7 2],[325.866 12 2],[327.046 6 2],[327.626 10 2],[327.926 7 2],[333.314 300 1],[333.982 500 1],[348.691 15 2],[352.594 9 2],[356.967 8 2],[359.047 20 2],[362.254 8 2],[363.945 5 2],[364.512 6 2],[368.14 7 2],[368.215 5 2],[376.244 8 3],[377.315 6 3],[379.141 20 2],[379.611 25 2],[380.654 30 2],[384.246 7 2],[385.366 100 1],[385.602 500 1],[386.26 200 1],[390.5523 300 0],[392.447 20 2],[394.749 6 2],[395.574 10 1],[396.384 6 2],[397.746 10 1],[398.124 5 2],[399.177 15 1],[399.801 10 1],[403.139 1 3],[403.806 2 3],[407.545 20 1],[407.678 15 1],[408.885 10 3],[410.186 5 2],[410.242 8 2],[410.2936 70 0],[411.55 5 2],[411.61 9 3],[412.807 300 1],[413.089 500 1],[418.335 10 1],[419.072 100 1],[419.813 50 1],[421.241 7 3],[431.41 3 3],[432.818 5 3],[433.85 9 2],[434.14 8 2],[437.763 8 2],[440.373 2 3],[440.59 6 2],[440.672 8 2],[441.165 1 3],[449.405 6 2],[455.262 30 2],[455.4 8 2],[456.782 25 2],[457.476 20 2],[461.127 1 3],[461.966 7 2],[462.142 100 1],[462.172 150 1],[462.862 3 3],[463.124 9 3],[463.828 7 2],[465.432 10 3],[465.692 3 3],[466.587 8 2],[466.714 1 3],[467.33 2 3],[468.302 9 2],[468.38 7 2],[471.665 16 2],[473.052 7 2],[478.2991 50 0],[479.2212 35 0],[479.2324 80 0],[480.043 8 2],[481.333 15 2],[481.972 16 2],[482.897 18 2],[488.32 15 1],[490.699 20 1],[493.28 20 1],[494.745 1 3],[494.7607 30 0],[495.011 3 3],[500.6061 40 0],[504.103 1000 1],[505.598 1000 1],[509.142 10 2],[511.376 7 2],[511.412 8 2],[518.19 100 1],[518.525 100 1],[519.286 200 1],[519.726 5 2],[520.241 500 1],[529.519 30 1],[530.497 2 3],[530.949 1 3],[540.534 100 1],[541.724 15 1],[542.892 15 1],[543.289 15 1],[543.862 100 1],[544.726 20 1],[545.146 6 2],[545.449 15 1],[545.645 100 1],[546.643 500 1],[546.687 500 1],[546.921 100 1],[547.305 7 2],[549.323 40 0],[549.645 200 1],[551.7535 35 0],[554.074 100 1],[557.666 150 1],[562.2221 30 0],[563.297 100 1],[563.948 200 1],[564.5611 90 0],[566.066 150 1],[566.5554 80 0],[566.956 1000 1],[568.144 30 1],[568.4484 120 0],[568.881 300 1],[569.0425 100 0],[570.1105 90 0],[570.137 200 1],[570.46 7 2],[570.637 100 1],[570.8397 160 0],[571.629 8 2],[573.973 20 2],[574.7667 45 0],[575.3625 45 0],[575.422 45 0],[576.2977 45 0],[577.2145 70 0],[578.0384 70 0],[578.573 30 1],[579.3071 90 0],[579.49 30 1],[579.7859 100 0],[580.047 150 1],[580.674 200 1],[582.78 30 1],[584.613 50 1],[586.748 10 1],[586.84 300 1],[587.3764 40 0],[589.879 10 2],[591.522 150 1],[594.8545 200 0],[595.756 500 1],[597.893 500 1],[606.745 10 1],[608.006 20 1],[608.667 10 1],[612.5021 90 0],[613.1574 85 0],[613.185 90 0],[614.2487 100 0],[614.5015 100 0],[615.5134 160 0],[623.732 160 0],[623.8287 40 0],[624.3813 125 0],[624.4468 125 0],[625.4188 180 0],[631.446 7 2],[633.1954 45 0],[634.71 1000 1],[637.136 1000 1],[652.436 6 2],[652.6609 45 0],[652.7199 45 0],[655.5462 45 0],[666.052 50 1],[666.5 15 1],[666.756 5 3],[667.188 100 1],[669.938 20 1],[670.121 7 3],[671.704 50 1],[672.1853 100 0],[674.164 30 0],[675.028 20 1],[681.845 30 1],[682.982 50 1],[683.156 6 2],[684.8568 30 0],[685.165 7 2],[697.6523 80 0],[699.836 3 3],[700.3567 180 0],[700.5883 180 0],[701.728 30 0],[701.7646 90 0],[703.4903 250 0],[704.794 6 3],[706.841 4 3],[716.469 70 0],[716.5545 200 0],[718.489 70 0],[719.358 65 0],[719.39 30 0],[722.6206 100 0],[723.5326 100 0],[723.582 60 0],[725.0625 180 0],[727.5294 160 0],[728.281 40 0],[728.9173 400 0],[729.026 55 0],[737.3 35 0],[740.5774 375 0],[740.9082 200 0],[741.535 40 0],[741.5946 275 0],[742.3497 425 0],[742.46 85 0],[746.189 5 2],[746.262 8 2],[746.632 9 2],[761.236 12 2],[763.05 2 3],[765.456 4 3],[767.875 4 3],[768.0267 100 0],[771.879 5 3],[772.382 6 3],[772.564 2 3],[773.047 1 3],[774.271 40 0],[775.291 1 3],[780.0008 30 0],[784.88 400 1],[784.972 500 1],[784.9967 30 0],[791.8386 90 0],[793.2349 120 0],[794.4001 140 0],[797.0306 35 0],[803.5619 35 0],[809.3241 70 0],[810.286 9 2],[810.345 11 2],[819.043 7 2],[819.116 6 2],[819.168 8 2],[823.0642 35 0],[824.061 1 3],[826.257 9 2],[826.564 5 2],[826.932 8 2],[827.138 5 2],[827.194 6 2],[844.3982 40 0],[850.1547 40 0],[850.2221 60 0],[853.6165 40 0],[855.678 120 0],[864.8462 50 0],[872.8011 40 0],[874.2451 75 0],[875.2009 100 0],[879.0389 35 0],[895.725 2 3],[901.816 1 3],[941.272 100 1],[941.3506 100 0],[1037.1269 30 0],[1058.5141 120 0],[1060.3431 120 0],[1066.0975 120 0],[1069.4251 30 0],[1072.7408 30 0],[1074.9384 60 0],[1078.455 30 0],[1078.6856 80 0],[1082.7091 140 0],[1084.3854 60 0],[1086.879 30 0],[1086.9541 130 0],[1088.2802 30 0],[1088.5336 30 0],[1097.9308 80 0],[1098.2061 30 0],[1101.7965 80 0],[1118.76 13 0],[1128.984 12 0],[1161.109 12 0],[1198.419 370 0],[1199.157 220 0],[1203.151 440 0],[1210.353 150 0],[1227.068 120 0],[1317.69 11 0],[1588.839 190 0],[1596.004 40 0],[1606.003 95 0],[1609.48 20 0],[1616.371 60 0],[1621.568 11 0],[1638.155 16 0],[1668.077 29 0],[1732.7289 28 0],[1872.29 26 0],[1938.5939 15 0],[1943.2971 48 0],[1949.3381 13 0],[1972.25 110 0],[1992.8881 31 0],[2091.7131 12 0],[2135.424 21 0],[2206.2711 12 0]}{ALLx2000x1000x2000x30x15x20x0}{UVx2000x1000x2000x30x15x20x0}{VISx1000x425x1000x30x10x0x0}{IVx500x440x500x11x2x0x0}%
+\pgfspectra@elt@search{#1}{Si}{[11.786 20 4],[11.897 20 4],[45.782 4 3],[45.816 3 3],[51.512 2 3],[51.635 3 3],[56.661 8 2],[64.576 2 3],[65.222 6 2],[65.333 8 2],[67.348 5 2],[74.994 5 3],[80.007 5 2],[80.51 10 1],[81.505 7 3],[81.813 8 3],[82.052 20 1],[82.341 9 2],[84.372 20 1],[84.577 40 1],[85.014 10 1],[88.34 5 2],[88.972 100 1],[89.2 200 1],[89.941 10 1],[90.174 20 1],[91.301 10 1],[91.385 20 1],[92.981 20 1],[93.909 7 2],[96.795 9 2],[98.987 100 1],[99.268 200 1],[99.352 10 2],[99.479 13 2],[99.739 16 2],[100.537 7 2],[102.07 25 1],[102.369 50 1],[103.116 7 2],[103.392 8 2],[103.705 7 2],[105.705 30 1],[105.75 15 1],[106.663 8 3],[108.322 6 2],[110.837 14 2],[110.997 16 2],[111.323 18 2],[112.249 8 3],[112.744 20 1],[112.791 40 1],[112.834 10 3],[114.055 6 2],[114.158 7 2],[114.228 6 2],[114.431 8 2],[114.496 6 2],[114.511 8 2],[114.518 7 2],[115.5 6 2],[115.596 6 2],[115.81 7 2],[116.026 6 2],[116.158 8 2],[117.437 5 2],[117.443 6 2],[117.8 8 2],[119.042 100 1],[119.328 200 1],[119.45 250 1],[119.739 100 1],[120.651 30 2],[120.653 30 2],[120.752 9 2],[121.046 10 2],[121.612 10 1],[122.391 20 1],[122.425 20 1],[122.497 10 1],[122.681 50 1],[122.689 20 1],[122.699 40 1],[122.76 100 1],[122.844 10 1],[122.862 25 1],[122.875 150 1],[122.939 200 1],[123.543 7 2],[123.592 10 1],[124.674 100 1],[124.843 150 1],[125.009 100 1],[125.043 150 1],[125.116 200 1],[125.528 10 0],[125.649 40 0],[125.88 50 0],[126.042 1000 1],[126.473 2000 1],[126.502 200 1],[128.035 6 2],[129.454 17 2],[129.673 14 2],[129.889 15 2],[129.896 18 2],[130.115 14 2],[130.332 16 2],[130.437 100 1],[130.559 50 1],[130.927 200 1],[130.946 20 1],[131.259 13 2],[134.147 8 2],[134.239 7 2],[134.339 6 2],[134.687 100 1],[134.854 100 1],[135.006 150 1],[135.052 20 1],[135.066 20 1],[135.264 100 1],[135.372 100 1],[136.16 8 2],[136.237 5 2],[136.347 7 2],[136.526 8 2],[136.705 7 2],[136.944 5 2],[137.303 5 2],[138.799 5 2],[139.376 15 3],[140.277 12 3],[140.907 10 1],[141.022 20 1],[141.697 10 1],[141.724 13 2],[143.369 6 2],[143.577 8 2],[143.617 7 2],[144.173 5 2],[144.72 6 2],[145.725 5 2],[147.465 15 1],[148.487 15 1],[148.502 90 1],[148.522 30 1],[148.551 100 1],[150.024 12 2],[150.119 10 2],[150.187 9 2],[150.606 6 2],[150.91 100 1],[151.207 50 1],[151.357 30 1],[151.691 60 1],[152.672 500 1],[153.345 1000 1],[156.245 10 1],[156.285 15 1],[156.377 10 1],[157.387 50 0],[157.482 50 0],[159.241 50 0],[159.455 150 0],[159.493 50 0],[159.795 30 0],[162.287 100 0],[162.571 30 0],[162.943 300 0],[162.992 200 0],[163.113 75 0],[163.398 50 0],[163.461 1 3],[165.335 30 0],[166.452 30 0],[166.637 50 0],[166.762 100 0],[166.852 100 0],[167.259 100 0],[167.332 7 2],[167.52 200 0],[168.268 30 0],[168.682 30 0],[168.929 50 0],[169.079 30 0],[169.329 50 0],[169.551 50 0],[169.62 200 0],[169.794 200 0],[170.042 50 0],[170.063 30 0],[170.286 30 0],[170.443 50 0],[171.083 10 1],[171.13 20 1],[172.253 6 3],[172.738 5 3],[174.388 30 0],[174.74 50 0],[175.311 30 0],[176.366 50 0],[176.503 40 0],[176.56 30 0],[176.606 30 0],[177.063 30 0],[177.092 100 0],[177.683 100 0],[178.323 50 0],[179.912 100 0],[180.8 150 1],[180.909 50 0],[181.407 500 0],[181.692 200 1],[181.745 10 1],[182.245 50 0],[183.651 200 0],[183.801 30 0],[184.115 100 0],[184.144 200 0],[184.255 9 2],[184.377 200 0],[184.551 300 0],[184.61 100 0],[184.747 400 0],[184.814 200 0],[184.874 100 0],[185.067 500 0],[185.179 30 0],[185.246 200 0],[185.315 50 0],[186.932 20 1],[187.023 15 1],[187.31 100 0],[187.484 500 0],[187.581 100 0],[188.185 200 0],[188.77 200 0],[189.325 200 0],[190.133 1000 0],[190.246 100 1],[190.466 50 0],[191.062 50 1],[194.167 50 1],[194.459 15 1],[194.933 10 1],[194.956 100 1],[195.497 100 0],[198.443 30 0],[199.185 50 0],[201.097 30 0],[205.483 50 0],[205.865 50 1],[205.901 50 1],[206.119 40 0],[206.552 30 0],[207.202 200 1],[207.27 200 1],[210.321 30 0],[211.463 30 0],[212.018 3 3],[212.412 100 0],[212.747 4 3],[213.399 10 1],[213.64 30 1],[213.656 50 1],[214.791 50 0],[217.689 5 2],[220.798 110 0],[221.089 115 0],[221.174 110 0],[221.667 120 0],[221.806 120 0],[221.891 50 0],[228.704 5 3],[229.103 35 0],[229.548 6 2],[229.687 10 2],[230.093 8 2],[230.306 55 0],[230.819 10 2],[232.856 2 3],[233.44 30 1],[233.461 30 1],[234.42 10 1],[234.954 10 1],[235.017 20 1],[235.309 20 1],[235.63 100 1],[235.718 30 1],[235.797 50 1],[236.02 10 1],[236.676 2 3],[236.697 30 1],[237.099 3 3],[237.426 20 1],[242.845 10 1],[243.515 300 0],[243.877 65 0],[244.336 65 0],[244.948 11 2],[245.212 70 0],[248.282 2 3],[248.32 6 2],[248.538 1 3],[250.69 425 0],[251.432 375 0],[251.6113 500 0],[251.751 7 3],[251.9202 350 0],[252.4108 425 0],[252.8509 450 0],[253.2381 110 0],[254.182 25 2],[254.609 10 2],[255.921 14 2],[256.3679 30 0],[256.8641 85 0],[257.7151 45 0],[263.1282 190 0],[264.079 11 2],[265.551 14 2],[267.219 1 3],[267.512 4 3],[267.525 4 3],[267.757 1 3],[268.221 10 1],[272.381 3 3],[281.711 9 2],[283.149 7 2],[283.962 5 2],[288.1579 1000 0],[288.751 10 1],[289.513 3 3],[290.428 300 1],[290.447 2 3],[290.569 500 1],[295.915 5 2],[297.0355 55 0],[297.152 1 3],[298.052 5 2],[298.7645 150 0],[300.6739 50 0],[301.309 5 2],[302.0004 75 0],[302.155 20 1],[303 100 1],[303.473 6 2],[303.729 8 2],[304.093 9 2],[304.157 20 1],[304.219 30 1],[304.369 100 1],[304.385 10 1],[304.393 7 2],[304.508 5 2],[304.577 10 1],[304.83 50 1],[305.318 150 1],[306.824 7 2],[308.624 25 2],[308.646 6 2],[309.342 20 2],[309.365 5 2],[309.683 16 2],[312.627 6 2],[314.737 7 2],[314.956 7 3],[316.161 8 2],[316.571 9 3],[318.513 16 2],[318.602 13 2],[318.897 150 1],[319.225 50 1],[319.309 150 1],[319.421 50 1],[319.469 50 1],[319.541 100 1],[319.65 14 2],[319.951 200 1],[320.249 20 1],[320.387 100 1],[321.003 200 1],[321.055 15 2],[321.466 75 1],[321.625 7 2],[321.799 15 1],[322.044 10 1],[322.301 20 1],[323.05 12 2],[323.395 14 2],[324.162 15 2],[324.419 1 3],[325.34 7 2],[325.374 5 2],[325.48 7 2],[325.866 12 2],[327.046 6 2],[327.626 10 2],[327.926 7 2],[333.314 300 1],[333.982 500 1],[348.691 15 2],[352.594 9 2],[356.967 8 2],[359.047 20 2],[362.254 8 2],[363.945 5 2],[364.512 6 2],[368.14 7 2],[368.215 5 2],[376.244 8 3],[377.315 6 3],[379.141 20 2],[379.611 25 2],[380.654 30 2],[384.246 7 2],[385.366 100 1],[385.602 500 1],[386.26 200 1],[390.5523 300 0],[392.447 20 2],[394.749 6 2],[395.574 10 1],[396.384 6 2],[397.746 10 1],[398.124 5 2],[399.177 15 1],[399.801 10 1],[403.139 1 3],[403.806 2 3],[407.545 20 1],[407.678 15 1],[408.885 10 3],[410.186 5 2],[410.242 8 2],[410.2936 70 0],[411.55 5 2],[411.61 9 3],[412.807 300 1],[413.089 500 1],[418.335 10 1],[419.072 100 1],[419.813 50 1],[421.241 7 3],[431.41 3 3],[432.818 5 3],[433.85 9 2],[434.14 8 2],[437.763 8 2],[440.373 2 3],[440.59 6 2],[440.672 8 2],[441.165 1 3],[449.405 6 2],[455.262 30 2],[455.4 8 2],[456.782 25 2],[457.476 20 2],[461.127 1 3],[461.966 7 2],[462.142 100 1],[462.172 150 1],[462.862 3 3],[463.124 9 3],[463.828 7 2],[465.432 10 3],[465.692 3 3],[466.587 8 2],[466.714 1 3],[467.33 2 3],[468.302 9 2],[468.38 7 2],[471.665 16 2],[473.052 7 2],[478.2991 50 0],[479.2212 35 0],[479.2324 80 0],[480.043 8 2],[481.333 15 2],[481.972 16 2],[482.897 18 2],[488.32 15 1],[490.699 20 1],[493.28 20 1],[494.745 1 3],[494.7607 30 0],[495.011 3 3],[500.6061 40 0],[504.103 1000 1],[505.598 1000 1],[509.142 10 2],[511.376 7 2],[511.412 8 2],[518.19 100 1],[518.525 100 1],[519.286 200 1],[519.726 5 2],[520.241 500 1],[529.519 30 1],[530.497 2 3],[530.949 1 3],[540.534 100 1],[541.724 15 1],[542.892 15 1],[543.289 15 1],[543.862 100 1],[544.726 20 1],[545.146 6 2],[545.449 15 1],[545.645 100 1],[546.643 500 1],[546.687 500 1],[546.921 100 1],[547.305 7 2],[549.323 40 0],[549.645 200 1],[551.7535 35 0],[554.074 100 1],[557.666 150 1],[562.2221 30 0],[563.297 100 1],[563.948 200 1],[564.5611 90 0],[566.066 150 1],[566.5554 80 0],[566.956 1000 1],[568.144 30 1],[568.4484 120 0],[568.881 300 1],[569.0425 100 0],[570.1105 90 0],[570.137 200 1],[570.46 7 2],[570.637 100 1],[570.8397 160 0],[571.629 8 2],[573.973 20 2],[574.7667 45 0],[575.3625 45 0],[575.422 45 0],[576.2977 45 0],[577.2145 70 0],[578.0384 70 0],[578.573 30 1],[579.3071 90 0],[579.49 30 1],[579.7859 100 0],[580.047 150 1],[580.674 200 1],[582.78 30 1],[584.613 50 1],[586.748 10 1],[586.84 300 1],[587.3764 40 0],[589.879 10 2],[591.522 150 1],[594.8545 200 0],[595.756 500 1],[597.893 500 1],[606.745 10 1],[608.006 20 1],[608.667 10 1],[612.5021 90 0],[613.1574 85 0],[613.185 90 0],[614.2487 100 0],[614.5015 100 0],[615.5134 160 0],[623.732 160 0],[623.8287 40 0],[624.3813 125 0],[624.4468 125 0],[625.4188 180 0],[631.446 7 2],[633.1954 45 0],[634.71 1000 1],[637.136 1000 1],[652.436 6 2],[652.6609 45 0],[652.7199 45 0],[655.5462 45 0],[666.052 50 1],[666.5 15 1],[666.756 5 3],[667.188 100 1],[669.938 20 1],[670.121 7 3],[671.704 50 1],[672.1853 100 0],[674.164 30 0],[675.028 20 1],[681.845 30 1],[682.982 50 1],[683.156 6 2],[684.8568 30 0],[685.165 7 2],[697.6523 80 0],[699.836 3 3],[700.3567 180 0],[700.5883 180 0],[701.728 30 0],[701.7646 90 0],[703.4903 250 0],[704.794 6 3],[706.841 4 3],[716.469 70 0],[716.5545 200 0],[718.489 70 0],[719.358 65 0],[719.39 30 0],[722.6206 100 0],[723.5326 100 0],[723.582 60 0],[725.0625 180 0],[727.5294 160 0],[728.281 40 0],[728.9173 400 0],[729.026 55 0],[737.3 35 0],[740.5774 375 0],[740.9082 200 0],[741.535 40 0],[741.5946 275 0],[742.3497 425 0],[742.46 85 0],[746.189 5 2],[746.262 8 2],[746.632 9 2],[761.236 12 2],[763.05 2 3],[765.456 4 3],[767.875 4 3],[768.0267 100 0],[771.879 5 3],[772.382 6 3],[772.564 2 3],[773.047 1 3],[774.271 40 0],[775.291 1 3],[780.0008 30 0],[784.88 400 1],[784.972 500 1],[784.9967 30 0],[791.8386 90 0],[793.2349 120 0],[794.4001 140 0],[797.0306 35 0],[803.5619 35 0],[809.3241 70 0],[810.286 9 2],[810.345 11 2],[819.043 7 2],[819.116 6 2],[819.168 8 2],[823.0642 35 0],[824.061 1 3],[826.257 9 2],[826.564 5 2],[826.932 8 2],[827.138 5 2],[827.194 6 2],[844.3982 40 0],[850.1547 40 0],[850.2221 60 0],[853.6165 40 0],[855.678 120 0],[864.8462 50 0],[872.8011 40 0],[874.2451 75 0],[875.2009 100 0],[879.0389 35 0],[895.725 2 3],[901.816 1 3],[941.272 100 1],[941.3506 100 0],[1037.1269 30 0],[1058.5141 120 0],[1060.3431 120 0],[1066.0975 120 0],[1069.4251 30 0],[1072.7408 30 0],[1074.9384 60 0],[1078.455 30 0],[1078.6856 80 0],[1082.7091 140 0],[1084.3854 60 0],[1086.879 30 0],[1086.9541 130 0],[1088.2802 30 0],[1088.5336 30 0],[1097.9308 80 0],[1098.2061 30 0],[1101.7965 80 0],[1118.76 13 0],[1128.984 12 0],[1161.109 12 0],[1198.419 370 0],[1199.157 220 0],[1203.151 440 0],[1210.353 150 0],[1227.068 120 0],[1317.69 11 0],[1588.839 190 0],[1596.004 40 0],[1606.003 95 0],[1609.48 20 0],[1616.371 60 0],[1621.568 11 0],[1638.155 16 0],[1668.077 29 0],[1732.7289 28 0],[1872.29 26 0],[1938.5939 15 0],[1943.2971 48 0],[1949.3381 13 0],[1972.25 110 0],[1992.8881 31 0],[2091.7131 12 0],[2135.424 21 0],[2206.2711 12 0]}{ALLx2000x1000x2000x30x15x20x0}{UVx2000x1000x2000x30x15x20x0}{VISx1000x425x1000x30x10x0x0}{IVx500x440x500x11x2x0x0}%[7.861 1 4],[7.89 1 4],[8.081 2 4],[8.111 2 4],[8.518 10 4],[8.558 6 4],[9.045 4 4],[9.085 4 4],[9.644 15 4],[9.714 10 4],[9.821 2 4],
\pgfspectra@elt@search{#1}{P}{[25.559 80 4],[25.567 50 4],[28.2301 90 3],[30.4996 90 3],[31.058 110 4],[31.134 150 4],[32.847 300 4],[32.878 250 4],[34.723 150 4],[34.82 200 4],[35.9293 120 3],[35.9899 150 3],[36.1514 120 3],[36.1629 150 3],[37.1299 120 3],[37.1504 150 3],[37.2001 200 3],[37.856 110 4],[38.8318 500 3],[38.95 250 4],[39.07 300 4],[41.003 150 4],[41.4604 120 3],[41.4999 200 3],[41.5805 250 3],[44.4245 250 3],[44.5158 300 3],[47.1146 90 2],[47.56 375 4],[48.4278 90 2],[49.818 120 2],[53.463 110 4],[53.499 80 4],[54.257 520 4],[54.492 600 4],[56.8038 250 3],[56.9853 200 2],[58.1831 200 2],[62.9008 350 3],[62.9914 400 3],[63.1779 500 3],[64.8482 350 3],[67.39 450 4],[75.651 300 3],[77.6353 300 3],[81.024 10 1],[82.3179 650 3],[82.473 700 3],[82.7932 800 3],[84.4646 200 2],[84.5038 150 2],[84.5664 250 2],[84.7019 250 3],[84.7669 300 2],[84.8016 200 2],[84.8465 120 2],[84.8639 150 2],[84.9799 350 3],[85.0392 200 3],[85.2686 250 2],[85.5624 350 2],[85.9406 200 2],[85.9652 500 2],[85.9729 250 2],[86.544 10 1],[86.545 450 4],[87.139 600 4],[87.7476 700 3],[91.3971 300 2],[91.712 300 2],[91.8665 350 2],[92.1849 250 2],[95.0655 1000 3],[99.762 250 4],[99.7999 200 2],[100.038 150 4],[100.3598 250 2],[102.5563 570 3],[102.8096 500 3],[103.0517 570 3],[103.3111 500 3],[103.5517 500 3],[111.798 900 4],[111.8551 570 3],[112.801 700 4],[120.6422 200 3],[124.982 20 1],[130.187 20 1],[130.447 20 1],[130.468 15 1],[130.548 35 1],[130.987 25 1],[131.07 60 1],[133.4808 500 2],[133.5705 200 3],[134.4327 650 2],[134.4845 300 2],[136.6695 500 3],[137.2674 400 3],[137.349 20 0],[137.706 20 0],[137.7282 350 3],[137.793 20 0],[137.94 25 0],[137.962 150 4],[138.0463 250 2],[138.1089 150 2],[138.147 25 0],[138.505 250 4],[143.013 50 0],[144.783 375 4],[145.289 30 1],[148.4507 500 3],[148.7788 400 3],[148.9098 300 3],[149.136 50 0],[149.299 40 0],[150.2228 350 2],[150.4663 250 2],[153.251 80 1],[153.59 120 1],[153.639 80 1],[154.229 120 1],[154.843 60 0],[161.05 450 4],[161.8632 150 2],[161.8907 200 2],[167.107 70 0],[167.168 180 0],[167.248 90 0],[167.461 230 0],[167.971 300 0],[168.599 120 0],[169.406 100 0],[170.641 60 0],[177.499 250 0],[178.287 200 0],[178.768 180 0],[184.719 100 0],[185.122 80 0],[185.891 150 0],[185.943 150 0],[186.2762 250 3],[186.2893 120 3],[186.358 200 3],[188.8523 650 3],[191.0183 200 3],[198.5682 120 3],[198.5851 150 3],[198.6114 200 3],[198.7022 150 3],[202.348 100 0],[203.347 150 0],[213.547 100 0],[213.618 200 0],[214.914 200 0],[215.294 100 0],[215.408 150 0],[218.029 200 4],[218.642 150 4],[242.44 375 4],[244.093 450 4],[244.124 200 4],[247.7823 200 3],[247.807 150 3],[247.8256 250 3],[248.419 100 1],[253.399 500 0],[253.561 700 0],[255.325 600 0],[255.49 500 0],[260.5506 250 3],[260.606 150 1],[261.1147 200 2],[262.618 100 1],[263.2713 300 2],[263.676 90 1],[264.4295 400 3],[268.0133 200 2],[272.4764 300 3],[272.877 400 3],[272.912 200 3],[273.9309 500 3],[273.9872 250 3],[274.0223 200 3],[289.5241 250 2],[296.1 300 4],[296.1242 200 3],[297.855 450 4],[317.509 700 4],[318.6186 250 2],[320.404 520 4],[321.9307 300 2],[323.3536 150 2],[323.3602 400 2],[330.892 150 1],[334.7736 650 3],[336.4467 570 3],[337.1122 400 3],[341.3543 200 3],[341.934 125 1],[342.5 100 1],[355.6546 200 2],[357.7526 200 2],[373.3393 200 3],[390.4812 200 2],[391.4314 250 2],[395.7641 300 2],[397.8307 350 2],[405.744 200 2],[405.9312 400 2],[408.0084 300 2],[408.318 150 4],[409.495 110 4],[417.848 100 1],[422.2195 500 2],[424.672 350 2],[424.9656 300 3],[428.86 200 1],[438.535 200 1],[442.071 400 1],[442.8171 200 2],[445.246 100 1],[446.3 150 1],[446.3668 200 2],[446.798 120 1],[447.526 200 1],[447.9776 250 2],[449.924 200 1],[453.081 120 1],[454.0288 250 3],[454.1112 250 3],[454.8056 150 3],[454.8449 200 3],[455.483 120 1],[455.807 120 1],[458.171 120 1],[458.804 500 1],[458.986 500 1],[460.208 600 1],[462.67 300 1],[465.831 300 1],[486.442 200 1],[492.72 150 1],[494.353 500 1],[495.439 300 1],[496.971 300 1],[515.672 110 4],[519.141 150 1],[523.5499 150 3],[525.352 300 1],[529.613 400 1],[531.607 250 1],[534.475 300 1],[537.82 250 1],[538.688 300 1],[540.972 200 1],[542.591 400 1],[545.074 400 1],[545.831 100 0],[546.12 125 1],[547.775 200 0],[548.355 200 1],[549.973 200 1],[550.719 200 1],[554.114 200 1],[558.327 200 1],[558.834 250 1],[572.771 100 1],[598.9774 150 3],[602.418 500 1],[603.404 400 1],[604.312 500 1],[605.55 250 1],[605.786 100 1],[608.3409 150 2],[608.782 350 1],[609.768 150 0],[614.2605 150 3],[616.559 350 1],[619.901 180 0],[623.229 100 1],[636.727 200 1],[640.9204 150 2],[643.532 250 1],[643.631 130 1],[645.999 600 1],[648.444 150 2],[648.6381 150 2],[650.346 600 1],[650.797 600 1],[671.328 150 1],[671.3939 150 3],[671.5906 120 3],[671.742 120 0],[699.269 150 2],[716.545 100 0],[717.512 150 0],[717.666 120 0],[744.3657 200 3],[750.576 100 0],[784.563 250 1],[811.3528 150 2],[827.807 120 0],[836.784 150 0],[853.146 100 0],[861.385 100 0],[863.762 150 0],[874.154 250 0],[887.217 50 0],[952.578 30 0],[959.354 25 0],[973.474 20 0],[975.073 25 0],[979.679 50 0],[1008.422 25 0],[1052.945 6 0],[1058.152 8 0]}{ALLx1000x700x600x650x1000x900x0}{UVx1000x700x150x650x1000x900x0}{VISx600x200x600x500x300x150x0}{IVx250x250x250x150x0x0x0}%
\pgfspectra@elt@search{#1}{S}{[43.74 5 4],[43.82 5 4],[43.96 5 4],[51.93 20 3],[52.01 20 3],[52.08 40 3],[52.2 20 3],[52.25 20 3],[55.12 20 3],[65.25 40 3],[65.3 40 3],[65.36 70 3],[65.4 40 3],[65.56 70 3],[65.59 20 3],[65.73 110 3],[65.83 40 4],[65.98 70 4],[66.09 40 3],[66.14 160 3],[66.32 110 4],[66.37 40 3],[66.48 40 3],[66.61 70 3],[67.62 5 4],[67.73 5 4],[67.81 20 4],[68.03 40 4],[68.09 110 4],[68.16 40 4],[68.62 5 4],[68.69 5 4],[68.98 5 4],[69.17 5 4],[69.35 20 4],[72.95 70 2],[73.242 110 2],[73.52 70 2],[73.85 70 2],[74.49 110 3],[74.84 110 3],[75.02 110 3],[75.38 110 3],[78.65 285 4],[78.9 70 2],[79.67 70 2],[79.83 40 3],[80.05 70 3],[80.4 70 3],[80.97 70 3],[81.6 110 3],[82.49 70 2],[83.63 70 2],[84.92 160 4],[85.22 110 4],[85.48 220 4],[85.79 110 4],[86.05 110 4],[88.36 20 4],[88.45 20 4],[88.58 5 4],[90.09 20 4],[90.28 5 4],[90.59 20 4],[90.69 40 1],[91.05 40 1],[91.27 40 1],[93.74 40 1],[93.77 40 1],[99.6 20 1],[100.05 20 1],[101.44 20 1],[101.95 20 1],[106.27 160 3],[107.3 160 3],[107.35 70 3],[107.71 285 2],[109.66 20 1],[110.23 40 1],[110.84 20 3],[111.09 20 3],[113.1 20 1],[113.16 20 1],[119.4 70 2],[120.1 70 2],[123.41 40 1],[125.05 40 1],[125.38 110 1],[125.95 110 1],[127.0782 275 0],[127.7216 250 0],[129.5653 280 0],[130.2337 275 0],[130.2863 235 0],[130.311 235 0],[130.343 245 0],[130.5883 260 0],[131.0194 265 0],[131.6542 355 0],[131.6618 290 0],[132.3515 375 0],[132.6643 355 0],[138.1552 775 0],[138.551 710 0],[138.8435 960 0],[138.9154 640 0],[139.2588 775 0],[139.6112 1000 0],[140.9337 300 0],[142.503 510 0],[143.328 425 0],[143.6968 300 0],[144.8229 300 0],[147.2972 425 0],[147.3995 550 0],[147.438 300 0],[148.1665 355 0],[148.3039 485 0],[148.3233 300 0],[148.5622 330 0],[148.715 390 0],[162.4 20 3],[162.92 20 3],[166.6688 680 0],[168.753 640 0],[180.7311 710 0],[182.0343 680 0],[182.6245 640 0],[190.0286 710 0],[191.4698 550 0],[238.7 20 3],[239.89 40 3],[246.05 110 2],[248.96 110 2],[249.62 160 2],[249.91 160 2],[250.82 220 2],[262.91 20 1],[263.69 70 2],[266.54 220 2],[267 40 1],[268.05 70 2],[269.18 110 2],[270.28 110 2],[271.89 220 2],[272.14 110 2],[272.68 220 2],[273.11 220 2],[274.1 110 2],[275.69 285 2],[277.52 110 2],[278.55 160 2],[279.74 70 2],[284.77 40 1],[285.6 70 2],[286.35 110 2],[290.43 160 2],[296.48 70 2],[298.6 160 2],[309.75 110 3],[311.77 40 3],[323.42 70 2],[332.49 70 2],[349.73 110 2],[363.2 160 2],[366.2 70 2],[370.94 110 2],[371.78 160 2],[383.83 160 2],[386.76 285 0],[390.2 285 0],[392.86 160 2],[393.33 360 1],[412.08 450 0],[414.23 280 1],[414.51 360 1],[415.31 450 1],[416.27 450 1],[425.36 360 2],[428.5 110 2],[433.27 70 2],[469.41 450 0],[469.54 285 0],[469.62 160 0],[471.62 280 1],[481.55 450 1],[492.41 360 1],[492.53 450 1],[499.35 285 0],[542.86 360 1],[543.28 650 1],[545.38 1000 1],[547.36 1000 1],[550.97 1000 1],[556.49 280 1],[560.61 1000 1],[564 450 1],[564.03 450 1],[564.7 280 1],[565.99 650 1],[566.47 450 1],[570.61 160 0],[581.92 450 1],[605.27 450 0],[628.64 280 1],[628.71 450 1],[630.55 450 1],[631.27 450 1],[638.49 280 1],[639.73 280 1],[639.8 280 1],[641.37 360 1],[674.36 160 0],[674.88 285 0],[675.72 450 0],[757.9 450 0],[762.98 450 0],[768.61 285 0],[769.67 450 0],[792.4 1000 0],[792.88 160 0],[793.03 285 0],[793.17 450 0],[796.74 450 0],[796.74 450 1],[831.47 450 0],[831.47 450 1],[858.56 450 0],[868.05 285 0],[869.47 450 0],[887.45 360 0],[888.25 110 0],[888.42 220 0],[903.59 160 0],[921.29 450 0],[922.81 450 0],[923.75 450 0],[941.35 285 0],[942.19 285 0],[943.71 285 0],[964.99 650 0],[967.23 450 0],[968.08 450 0],[969.37 450 0],[969.73 285 0],[973.97 285 0],[974.19 110 0],[993.23 285 0],[994.98 285 0],[995.89 285 0],[1045.55 285 0],[1045.68 70 0],[1045.95 285 0]}{ALLx1000x1000x1000x360x160x285x0}{UVx1000x1000x110x285x160x285x0}{VISx1000x450x1000x360x0x0x0}{IVx1000x1000x450x0x0x0x0}%
\pgfspectra@elt@search{#1}{Cl}{[28.733 30 4],[31.962 30 3],[33.184 20 3],[37.378 30 4],[39.015 40 4],[39.243 50 4],[40.627 10 2],[41.137 40 2],[41.181 40 2],[43.783 40 3],[46.486 40 3],[48.617 80 3],[53.473 80 3],[53.567 70 3],[53.615 60 3],[53.653 30 4],[53.701 40 4],[53.746 30 4],[53.761 90 3],[53.803 50 4],[53.812 60 3],[53.868 40 4],[54.223 80 4],[54.23 60 4],[54.287 40 4],[54.511 100 4],[54.633 60 4],[54.763 100 4],[54.922 50 3],[55.002 40 3],[55.202 70 3],[55.33 60 3],[55.462 70 3],[55.623 60 2],[55.661 70 2],[55.712 70 2],[55.9305 35 1],[56.153 70 2],[56.168 70 2],[56.174 70 2],[57.1904 40 1],[57.4406 80 1],[58.624 50 1],[60.15 50 3],[60.459 50 3],[60.635 50 2],[60.89 40 3],[61.207 40 3],[61.8057 70 1],[61.9982 60 1],[62.0298 80 1],[62.128 40 2],[62.6735 70 1],[63.319 40 4],[63.532 40 4],[63.5881 80 1],[63.6626 100 1],[65.0894 100 1],[65.37 40 3],[65.9811 100 1],[66.1841 130 1],[66.3074 200 1],[67.038 30 2],[67.313 30 2],[68.192 40 4],[68.2053 150 1],[68.317 40 4],[68.7656 150 1],[68.893 40 4],[69.3594 150 1],[72.5271 200 1],[72.8951 250 1],[74.521 40 3],[77.7562 200 1],[78.758 500 1],[78.874 500 1],[79.3342 500 1],[83.143 40 3],[83.484 50 3],[83.497 50 3],[83.9297 600 1],[83.9599 800 1],[84.081 40 3],[84.093 60 3],[84.141 700 1],[85.1691 500 1],[88.313 40 4],[88.8026 200 1],[89.3549 200 1],[89.434 40 4],[89.491 10 4],[93.628 10 2],[96.1499 200 1],[96.992 3 0],[97.321 50 3],[97.756 60 3],[97.79 40 3],[97.8284 4 0],[98.495 70 3],[98.575 40 3],[99.8372 2.5 0],[99.8432 2.5 0],[100.2346 7.5 0],[100.528 50 2],[100.878 60 2],[101.3664 15 0],[101.502 70 2],[102.5553 9 0],[106.3831 600 1],[106.7945 300 1],[107.1036 900 1],[107.1767 600 1],[107.523 500 1],[107.908 500 1],[108.4667 20 0],[108.5171 20 0],[108.5304 25 0],[108.806 40 0],[109.0271 35 0],[109.0982 25 0],[109.2437 25 0],[109.4769 40 0],[109.5148 35 0],[109.5662 35 0],[109.5797 40 0],[109.681 25 0],[109.7369 30 0],[109.8068 20 0],[109.9523 20 0],[110.7528 50 0],[113.9214 80 1],[116.7148 80 0],[117.9293 300 0],[118.8774 120 0],[120.1353 90 0],[133.5726 300 0],[134.724 1000 0],[135.1657 500 0],[136.3447 1200 0],[137.3116 250 0],[137.9528 2000 0],[138.9693 2500 0],[138.9957 2000 0],[139.6527 1200 0],[144.147 50 1],[152.8569 50 1],[153.721 30 3],[153.93 20 3],[154.2942 50 1],[154.519 20 3],[154.915 20 3],[155.8144 50 1],[156.505 50 1],[162.286 20 3],[182.25 60 2],[182.84 50 2],[185.7488 50 1],[190.161 50 2],[198.361 50 2],[199.737 45 1],[200.684 40 2],[203.2116 45 1],[208.8583 35 1],[209.1458 35 1],[225.307 70 2],[226.895 50 2],[227.834 50 2],[228.393 70 2],[232.35 60 2],[233.645 50 2],[234.064 60 2],[235.967 60 2],[237.037 60 2],[241.642 70 2],[242.779 17 1],[243.407 36 1],[244.714 60 2],[244.858 60 2],[248.691 50 2],[249.853 34 1],[250.274 47 1],[253.248 50 2],[254.696 26 1],[254.988 50 1],[256.484 46 1],[258.067 60 2],[260.331 32 1],[260.359 50 2],[263.267 50 2],[263.318 50 2],[265.872 95 1],[266.554 60 2],[267.695 75 1],[268.804 120 1],[270.136 40 3],[271.037 70 2],[272.403 50 3],[275.123 50 3],[277.064 40 3],[278.247 70 3],[283.54 40 3],[291.205 41 1],[296.556 60 2],[299.665 95 1],[300.606 50 1],[305.796 95 1],[306.313 50 3],[307.132 130 1],[307.668 60 3],[309.219 140 1],[310.446 60 2],[312.372 120 1],[313.934 80 2],[316.787 20 3],[319.145 90 2],[328.98 70 2],[331.543 190 1],[332.057 70 2],[332.906 80 2],[332.91 120 1],[334.042 90 2],[335.335 250 1],[339.289 80 2],[339.345 80 2],[353.003 90 2],[356.068 80 2],[360.21 90 2],[361.285 80 2],[362.269 70 2],[365.695 70 2],[367.028 70 2],[368.205 70 2],[370.545 60 2],[370.734 60 2],[372.045 80 2],[372.654 2 0],[374.881 80 2],[374.996 120 1],[377.935 50 2],[378.117 100 1],[379.876 150 1],[380.518 190 1],[380.946 130 1],[382.02 170 1],[382.759 280 1],[383.335 450 1],[384.32 250 1],[384.537 310 1],[384.565 390 1],[384.58 150 1],[385.099 1000 1],[385.137 790 1],[385.165 120 1],[386.083 2500 1],[386.099 440 1],[386.137 100 1],[391.387 150 1],[391.663 110 1],[392.587 50 2],[394.482 2 0],[399.15 70 2],[401.85 60 2],[405.907 60 2],[410.423 50 2],[410.479 2 0],[410.683 50 2],[413.25 1000 1],[420.967 6.5 0],[422.642 5 0],[426.458 6 0],[436.327 10 0],[436.95 10 0],[437.091 40 2],[437.293 500 1],[437.99 10 0],[438.975 10 0],[439.04 9 0],[440.303 9 0],[443.849 10 0],[447.53 9 0],[448.991 150 1],[452.619 10 0],[460.098 8 0],[460.821 50 2],[462.3938 4 0],[465.404 5 0],[466.1208 8 0],[469.1523 4.5 0],[470.314 30 2],[472.1255 4 0],[474.0729 4.5 0],[476.865 430 1],[478.132 1300 1],[479.455 9900 1],[481.006 2900 1],[481.947 1600 1],[486.375 10 2],[489.677 8100 1],[490.478 4700 1],[491.773 2600 1],[497.164 1 2],[499.548 1000 1],[507.826 2600 1],[509.9789 3 0],[521.794 5600 1],[522.136 2300 1],[539.212 1500 1],[542.323 9900 1],[542.351 1000 1],[544.337 1900 1],[544.421 1000 1],[545.702 560 1],[553.2162 4 0],[579.6305 5 0],[579.9914 4.5 0],[585.6742 3 0],[594.858 10 0],[601.9812 5 0],[608.261 3.5 0],[609.469 190 1],[611.443 16 0],[614.0245 20 0],[619.4757 16 0],[639.866 16 0],[643.4833 15 0],[653.143 15 0],[666.167 140 1],[667.843 15 0],[668.602 130 1],[671.341 120 1],[684.029 15 0],[693.2903 30 0],[698.1886 30 0],[708.6814 60 0],[725.662 750 0],[741.411 500 0],[746.237 55 0],[748.947 55 0],[749.2118 70 0],[754.7072 1100 0],[767.242 230 0],[770.2828 45 0],[771.7581 700 0],[774.497 1000 0],[776.916 220 0],[777.109 65 0],[782.136 220 0],[783.075 170 0],[787.822 300 0],[789.334 22 0],[789.931 230 0],[791.508 180 0],[792.4645 300 0],[793.389 210 0],[793.5012 170 0],[795.252 65 0],[797.472 150 0],[797.697 130 0],[798.06 60 0],[799.785 290 0],[801.561 220 0],[802.333 110 0],[805.107 40 0],[808.451 170 0],[808.556 220 0],[808.667 300 0],[808.773 130 0],[809.467 25 0],[819.442 250 0],[819.913 220 0],[820.021 220 0],[820.378 80 0],[821.204 1800 0],[822.045 300 0],[822.174 2000 0],[833.331 1800 0],[836.071 100 1],[836.184 56 1],[837.594 9990 0],[838.267 18 1],[839.202 10 1],[840.6199 40 0],[842.825 1500 0],[846.734 220 0],[855.044 220 0],[857.524 2000 0],[857.802 75 0],[858.597 7500 0],[862.854 45 0],[864.171 30 0],[868.626 350 0],[891.292 220 0],[894.806 300 0],[903.8982 200 0],[904.543 250 0],[906.9656 100 0],[907.317 200 0],[912.115 750 0],[919.1731 300 0],[919.7596 50 0],[928.886 400 0],[939.3862 150 0],[945.21 350 0],[948.6964 50 0],[958.4801 100 0],[959.222 350 0],[963.2509 25 0],[970.2439 100 0],[974.4426 25 0],[980.7057 20 0],[987.597 40 0],[1039.2549 33.1 0],[1043.283 3.8 1],[1050.662 1 1],[1050.912 1.4 1],[1051.246 1.9 1],[1051.417 2.5 1],[1080.147 0.9 1],[1088.542 0.5 1],[1095.571 0.1 1],[1112.305 30 0],[1139.262 23.1 0],[1140.969 26.9 0],[1143.633 100 0],[1172.056 18 0],[1186.676 19.5 0],[1202.17 17.2 0],[1324.38 35 0],[1329.6 31 0],[1334.68 55 0],[1382.17 52.5 0],[1436.97 14.8 0],[1493.17 29.4 0],[1510.8 26.9 0],[1546.51 38.1 0],[1546.76 16.9 0],[1552.03 109.4 0],[1573.01 148.7 0],[1581.84 19.3 0],[1586.97 278 0],[1588.33 27.7 0],[1592.89 34.2 0],[1596 73.5 0],[1597.05 28.3 0],[1607.76 12.9 0],[1619.85 25.9 0],[1937.0301 22.7 0],[1975.5301 71.7 0],[1976.6801 18.5 0],[2019.94 22.7 0],[2037.01 8.5 0],[2447 10 0]}{ALLx9990x9990x9900x90x90x100x0}{UVx2500x2500x900x90x90x100x0}{VISx9900x1100x9900x70x0x0x0}{IVx9990x9990x100x0x0x0x0}%
@@ -66,7 +66,7 @@
\pgfspectra@elt@search{#1}{As}{[60.07 25 4],[61.6 40 4],[71.55 120 4],[73.48 150 4],[73.72 60 4],[76.124 165 1],[80.283 165 1],[84.99 185 2],[86.63 185 2],[87.17 510 2],[88.9 325 2],[92.75 325 2],[93.72 325 2],[95.36 325 2],[96.38 325 2],[98.77 250 4],[102.196 340 1],[102.95 250 4],[105.16 40 4],[105.66 60 4],[108.235 340 1],[113.94 500 1],[114.931 615 1],[117.22 120 2],[118.151 555 1],[118.987 555 1],[119.638 615 1],[119.656 615 1],[120.744 340 1],[120.93 185 2],[121.117 800 1],[121.81 800 1],[122.315 340 1],[124.131 760 1],[124.308 965 1],[124.567 870 1],[125.858 800 1],[126.377 965 1],[126.634 800 1],[126.759 800 1],[128.099 715 1],[128.754 715 1],[130.57 715 1],[130.774 340 1],[133.315 760 1],[134.155 965 1],[135.593 760 1],[136.977 965 1],[137.365 800 1],[137.507 1000 1],[137.578 760 1],[139.464 800 1],[140.031 800 1],[144.859 500 1],[155.888 500 1],[157.099 500 1],[159.36 100 0],[166.055 500 1],[175.86 100 0],[180.615 170 0],[186.034 340 1],[189.042 1000 0],[191.294 500 1],[193.759 800 0],[197.262 585 0],[199.035 170 0],[199.113 100 0],[199.543 100 0],[200.334 230 0],[200.919 100 0],[201.332 100 0],[211.299 100 0],[214.408 100 0],[216.552 135 0],[225.31 150 3],[226.32 200 3],[228.812 350 0],[230.1 200 3],[234.984 350 0],[237.077 100 0],[238.118 135 0],[241.75 250 3],[244.61 150 3],[245.4 250 3],[245.653 170 0],[246.14 200 3],[260.2 340 1],[278.022 170 0],[283.0359 300 1],[283.1164 300 1],[286.044 100 0],[288.4406 300 1],[292.63 80 2],[295.9572 615 1],[298.2 185 2],[300.3819 300 1],[310.88 150 3],[311.6516 300 1],[384.26 340 1],[392.26 325 2],[403.72 185 2],[419.0082 715 1],[419.74 615 1],[424.2982 615 1],[431.5657 500 1],[432.3867 500 1],[433.664 500 1],[435.2145 500 1],[435.2864 425 1],[437.117 375 1],[442.7106 615 1],[443.1562 615 1],[445.8469 715 1],[446.1075 340 1],[446.6348 715 1],[447.446 500 1],[449.423 800 1],[450.7659 850 1],[453.974 615 1],[454.3483 715 1],[460.2427 615 1],[462.9787 340 1],[470.7586 340 1],[473.067 340 1],[488.8557 340 1],[506.898 100 0],[510.558 340 1],[510.755 500 1],[512.134 100 0],[514.163 100 0],[523.138 425 1],[533.123 500 1],[540.813 100 0],[545.132 135 0],[549.7727 340 1],[555.809 425 1],[565.132 425 1],[611.007 425 1],[617.027 500 1],[651.174 300 1],[709.227 300 1],[710.272 300 1],[799.053 340 1],[817.451 300 1],[842.891 100 0],[856.471 100 0],[865.414 100 0],[882.173 135 0],[886.966 100 0],[926.728 135 0],[930.061 200 0],[959.795 230 0],[962.67 290 0],[983.376 230 0],[988.605 100 0],[990.055 140 0],[991.571 170 0],[992.305 290 0],[1001.063 100 0],[1002.404 290 0],[1045.309 100 0],[1057.502 100 0],[1061.407 170 0]}{ALLx1000x1000x1000x510x250x250x0}{UVx1000x1000x1000x510x250x250x0}{VISx850x135x850x325x0x0x0}{IVx340x290x340x0x0x0x0}%
\pgfspectra@elt@search{#1}{Se}{[59.6 285 4],[60.1 285 4],[60.87 220 4],[61.3 360 4],[61.43 285 4],[63.6 285 3],[65.27 360 3],[65.42 285 3],[67.01 450 3],[67.19 285 3],[70.92 220 2],[70.94 220 2],[72.06 220 2],[72.28 220 3],[72.43 360 2],[72.64 285 2],[73.46 285 3],[73.72 220 2],[74.19 220 2],[74.64 450 3],[75.9 285 3],[75.91 450 4],[77.65 285 3],[77.73 285 2],[78.58 285 4],[79.08 220 2],[80.38 285 3],[80.43 285 4],[80.87 360 4],[81.48 220 4],[82.07 220 4],[82.85 285 1],[83.03 360 4],[83.27 360 1],[83.95 450 4],[84.3 360 2],[84.58 360 4],[87.92 220 2],[90.66 285 1],[91.29 360 1],[95.37 285 2],[95.44 220 2],[95.47 220 2],[95.96 360 3],[97.41 160 2],[97.48 360 2],[99.67 450 3],[101.34 360 1],[101.4 360 1],[103.36 450 1],[104.96 450 1],[105.74 360 1],[107.98 285 2],[109.47 360 4],[109.78 285 1],[109.91 360 2],[111.92 450 2],[114.19 360 1],[115.1 220 4],[115.6 220 1],[115.69 285 1],[116.85 285 1],[119.23 450 1],[120.57 220 1],[122.76 450 4],[123.49 220 1],[129.1 285 1],[130.72 220 3],[130.89 285 1],[131.44 285 3],[140.54 100 0],[140.64 100 0],[140.66 100 0],[143.53 120 0],[143.58 120 0],[144.48 100 0],[144.68 100 0],[144.7 100 0],[144.92 150 0],[145.63 120 0],[150.09 150 0],[153.04 250 0],[153.13 150 0],[153.18 200 0],[154.71 120 0],[156.03 120 0],[157.53 150 0],[157.76 150 0],[157.79 150 0],[157.95 150 0],[158 200 0],[158.75 150 0],[159.32 150 0],[160.65 250 0],[161.07 100 0],[161.13 100 0],[161.74 200 0],[162.12 150 0],[162.27 100 0],[162.62 120 0],[164.34 150 0],[167.12 250 0],[167.53 250 0],[169.07 250 0],[179.33 250 0],[179.53 300 0],[185.52 300 0],[185.88 250 0],[189.86 400 0],[191.38 350 0],[191.92 300 0],[196.09 500 0],[199.51 150 0],[203.98 500 0],[205.75 285 2],[207.48 500 0],[209 220 3],[213.66 285 3],[216.42 500 0],[216.52 160 3],[216.66 160 3],[233.28 150 0],[241.35 600 0],[254.8 300 0],[266.55 360 3],[272.43 285 3],[276.72 285 2],[277.38 220 2],[295.16 160 3],[303.87 220 1],[304.13 220 1],[337.98 285 2],[338.72 450 2],[341.39 450 2],[342.84 285 2],[345.78 450 2],[354.36 360 2],[357.02 285 2],[363.76 450 2],[371.17 360 2],[373.87 450 2],[374.3 285 2],[380.09 450 2],[404.67 360 2],[407.02 285 1],[408.32 220 2],[416.91 450 2],[417.53 360 1],[418.09 450 1],[432.87 120 0],[433.03 100 0],[438.29 285 1],[444.6 285 1],[444.92 220 1],[446.76 285 1],[463.79 220 2],[473.08 500 0],[473.9 400 0],[474.22 300 0],[484.06 285 1],[484.5 360 1],[522.75 450 1],[530.54 360 1],[536.55 100 0],[536.99 120 0],[537.41 110 0],[552.24 285 1],[556.69 285 1],[586.63 285 1],[605.6 450 1],[630.38 285 2],[632.56 200 0],[644.42 360 1],[649.05 285 1],[653.5 285 1],[683.13 150 0],[699.069 120 0],[699.1792 100 0],[701.0809 200 0],[701.3875 150 0],[706.2065 300 0],[757.51 200 0],[758.34 250 0],[759.22 150 0],[760.68 120 0],[800.1 300 0],[803.64 200 0],[806.09 120 0],[806.53 120 0],[808.11 120 0],[809.32 150 0],[809.47 150 0],[814.93 180 0],[815.2 150 0],[815.77 200 0],[816.31 180 0],[818.29 150 0],[818.5 100 0],[819.46 120 0],[844.047 150 0],[845.038 150 0],[874.233 150 0],[891.886 300 0],[896.969 100 0],[900.197 200 0],[903.861 200 0],[908.314 80 0],[908.879 120 0],[914.083 80 0],[918.188 60 0],[927.112 60 0],[943.25 100 0],[982.558 60 0],[1021.725 200 0],[1030.745 377 0],[1032.726 900 0],[1038.636 640 0],[1065.03 124 0],[1193.456 125 0],[1194.687 275 0],[1194.792 100 0],[1195.227 105 0],[1195.264 170 0],[1196.604 100 0],[1197.293 205 0],[1197.307 115 0],[1481.793 315 0],[1491.747 410 0],[1515.144 500 0],[1546.906 115 0],[1547.1 320 0],[1552.097 265 0],[1561.84 395 0],[1562.038 115 0],[1665.9439 360 0],[1681.3779 505 0],[1681.776 165 0],[1686.6539 205 0],[1697.2711 115 0],[2137.424 235 0],[2144.2561 680 0],[2147.348 415 0],[2171.6359 270 0],[2173.06 240 0],[2313.366 105 0],[2338.885 150 0],[2362.817 110 0],[2414.818 265 0],[2415.923 170 0],[2420.4439 185 0],[2438.599 375 0],[2441.367 160 0],[2447.117 225 0],[2501.751 255 0],[2512.743 510 0]}{ALLx900x900x450x450x450x450x0}{UVx600x600x450x450x450x450x0}{VISx500x500x450x450x0x0x0}{IVx900x900x0x0x0x0x0}%
\pgfspectra@elt@search{#1}{Br}{[37.973 70 3],[40.037 70 3],[46.837 60 4],[48.211 80 4],[53.197 90 4],[54.543 100 3],[54.79 100 4],[54.977 70 4],[55.976 100 3],[56.919 100 3],[57.659 100 3],[58.51 100 3],[58.671 100 3],[59.751 100 3],[60.009 100 3],[60.127 100 3],[60.703 100 3],[61.11 45 2],[61.785 100 3],[61.987 100 3],[62.04 30 2],[62.103 80 4],[63.014 100 3],[63.222 80 4],[64.223 100 3],[64.544 70 4],[65.264 40 4],[65.754 80 4],[66.153 100 3],[66.554 50 2],[67.719 50 2],[67.78 30 2],[67.962 80 4],[68.351 100 3],[68.768 45 2],[69.02 40 2],[69.699 35 2],[69.772 100 3],[71.168 30 1],[71.539 100 3],[72.7 30 2],[73.1 100 3],[73.64 30 2],[76.963 25 2],[80.012 100 3],[81.295 70 4],[81.366 100 3],[81.548 25 1],[81.779 25 2],[85.081 100 4],[85.527 15 4],[85.619 35 1],[88.923 100 1],[89.664 50 1],[90.599 50 1],[92.256 30 1],[94.897 100 1],[94.9 35 2],[96.04 40 2],[98.49 45 2],[98.493 50 1],[101.21 50 1],[101.554 100 1],[103.702 50 1],[104.16 60 4],[104.9 100 1],[106.476 45 1],[106.915 100 4],[107.187 50 1],[108.054 50 4],[110.15 25 0],[111.213 90 4],[113.459 30 0],[113.629 25 0],[114.356 100 4],[117.723 25 0],[117.89 40 0],[118.928 100 0],[118.938 25 0],[118.95 100 0],[119.837 50 0],[120.976 80 0],[121.073 100 0],[121.601 75 0],[122.113 100 0],[122.187 90 0],[122.324 100 0],[122.441 120 0],[122.69 120 0],[122.805 75 0],[123.243 750 0],[124.39 120 0],[124.959 80 0],[125.166 150 0],[125.58 100 0],[125.92 150 0],[126.166 120 0],[126.62 120 0],[127.482 90 3],[127.948 100 0],[128.626 100 0],[130.991 300 0],[131.35 25 2],[131.674 300 0],[131.737 100 0],[131.77 200 0],[138.46 1200 0],[140.29 25 2],[142.975 15 4],[144.26 40 4],[144.99 300 0],[147.035 15 4],[148.845 5000 0],[153.174 3000 0],[154.065 2500 0],[157.484 3000 0],[157.639 2000 0],[158.231 2500 0],[163.34 7500 0],[170.351 100 3],[213.379 100 3],[214.502 100 3],[225.721 100 3],[227.273 100 3],[228.517 35 1],[228.76 35 1],[229.344 40 2],[230.74 100 3],[231.329 30 2],[231.73 50 1],[233.693 40 1],[238.645 35 1],[238.67 50 1],[238.869 30 1],[238.896 45 1],[238.969 50 1],[239.221 35 1],[239.242 40 1],[240.816 100 3],[241.158 100 3],[246.239 30 2],[248.26 30 2],[248.85 30 1],[249.114 70 3],[249.522 30 1],[249.925 35 2],[252.17 45 1],[252.949 35 2],[254.148 40 1],[255.109 35 2],[255.692 40 1],[257.083 35 2],[257.317 30 2],[258.119 100 3],[258.499 40 2],[258.914 50 2],[259.448 30 2],[259.598 40 2],[260.62 45 2],[260.815 35 2],[261.313 50 2],[261.626 35 2],[262.652 50 2],[262.923 35 2],[263.96 35 2],[266.14 60 3],[267.153 35 2],[269.017 35 1],[271.377 40 1],[273.583 35 2],[274.652 35 1],[277.05 30 2],[278.528 30 2],[280.416 30 2],[280.755 30 1],[282.087 70 3],[284.288 100 3],[289.34 40 1],[290.771 110 3],[291.718 40 1],[292.696 40 2],[293.622 30 2],[296.721 40 1],[296.9 35 2],[297.226 50 1],[298.186 30 1],[298.587 30 1],[298.653 30 1],[299.404 40 2],[301.648 30 1],[302.076 50 2],[303.363 30 2],[303.645 35 2],[304.118 50 3],[307.442 50 2],[309.194 35 2],[311.729 35 2],[314.781 30 2],[317.408 40 2],[332.108 30 2],[333.307 45 2],[334.964 50 2],[338.056 50 3],[338.525 30 2],[342.382 35 1],[344.736 45 2],[348.758 40 2],[350.647 30 2],[351.736 45 2],[354.016 50 2],[355.108 30 2],[356.243 50 2],[360.071 45 2],[360.68 30 1],[369.353 25 2],[371.43 35 1],[381.565 120 0],[382.026 45 2],[383.469 35 1],[387.121 30 1],[389.163 40 1],[390.124 30 1],[390.395 20 2],[391.42 30 1],[391.438 50 1],[391.951 35 1],[392.409 40 1],[392.955 30 1],[393.969 35 1],[395.061 35 1],[398.038 50 1],[399.236 150 0],[402.404 30 1],[413.566 30 1],[414.02 30 1],[417.963 40 1],[419.345 30 1],[422.389 100 1],[423.689 30 1],[429.139 30 1],[436.514 200 0],[436.56 100 1],[442.514 150 0],[444.174 1000 0],[447.261 1000 0],[447.772 2000 0],[449.042 100 0],[450.655 35 2],[451.344 300 0],[451.974 20 2],[452.559 1500 0],[452.96 30 1],[454.292 50 1],[457.574 300 0],[460.136 30 1],[461.458 250 0],[462.27 35 1],[464.202 30 1],[465.198 30 1],[467.87 50 1],[469.317 40 1],[470.485 50 1],[471.976 35 1],[472.036 40 1],[472.82 30 1],[473.541 30 1],[474.264 40 1],[475.228 250 0],[476.6 35 1],[477.94 40 1],[478.031 400 0],[478.519 160 0],[478.55 50 1],[480.233 30 1],[481.67 50 1],[481.846 30 1],[484.481 35 1],[484.875 35 1],[492.112 40 1],[492.879 40 1],[493.066 45 1],[494.551 30 1],[497.976 400 0],[503.874 30 1],[505.464 30 1],[516.438 40 1],[517.587 15 2],[518.001 30 1],[518.235 50 1],[519.39 30 1],[523.823 50 1],[527.268 30 1],[530.41 35 1],[533.057 40 1],[533.205 50 1],[539.548 120 0],[542.278 40 1],[542.499 35 1],[543.507 30 1],[544.68 10 2],[546.622 120 0],[547.847 35 1],[548.879 30 1],[549.506 30 1],[550.669 50 1],[558.994 35 1],[571.871 30 1],[583.078 30 1],[585.208 180 0],[594.048 160 0],[612.214 240 0],[614.86 4000 0],[616.174 30 1],[617.739 200 0],[633.548 150 0],[635.073 6000 0],[635.294 40 1],[641.032 250 0],[648.356 180 0],[651.462 100 0],[654.457 2000 0],[654.809 150 0],[655.98 5000 0],[657.131 100 0],[657.914 180 0],[658.217 2000 0],[662.047 150 0],[663.162 5000 0],[668.228 2000 0],[669.213 1000 0],[672.828 800 0],[676.006 200 0],[677.948 200 0],[678.674 220 0],[679.004 650 0],[679.148 160 0],[686.115 180 0],[700.519 1000 0],[719.28 10 2],[726.045 200 0],[734.851 1000 0],[751.296 4000 0],[759.161 160 0],[759.507 180 0],[761.641 200 0],[767.31 10 2],[780.302 3000 0],[782.723 120 0],[788.145 250 0],[788.157 250 0],[792.581 250 0],[793.868 3000 0],[794.794 300 0],[795.018 300 0],[797.844 800 0],[797.857 1000 0],[798.994 3000 0],[802.635 200 0],[802.654 250 0],[813.152 3000 0],[815.265 100 0],[815.375 1000 0],[815.4 2500 0],[824.686 500 0],[826.496 1500 0],[827.244 7500 0],[833.47 2000 0],[834.37 1000 0],[838.404 120 0],[844.655 4000 0],[847.745 400 0],[851.338 150 0],[855.773 100 0],[856.628 100 0],[863.866 2000 0],[869.853 400 0],[879.347 1000 0],[881.996 1500 0],[882.522 2500 0],[888.898 400 0],[889.762 3000 0],[893.24 600 0],[894.939 180 0],[896.4 900 0],[902.442 35 1],[916.606 3000 0],[917.363 1500 0],[917.816 2000 0],[926.542 4000 0],[932.086 1500 0],[943.404 30 1],[979.348 600 0],[989.64 1000 0],[1014.008 300 0],[1023.774 600 0],[1029.962 100 0],[1037.765 150 0],[1045.796 3000 0],[1074.214 100 0],[1075.592 300 0],[1321.717 170 0],[1435.457 180 0],[1488.87 125 0],[1673.1189 180 0],[1856.8311 120 0],[1973.3619 350 0],[2028.173 100 0],[2062.467 100 0],[2178.724 120 0],[2286.565 400 0],[2351.315 100 0],[2834.65 50 0],[3038.085 50 0],[3163.0131 60 0],[3269.39 12 0],[3418.1871 15 0],[3834.575 15 0],[3996.4359 12 0]}{ALLx7500x7500x100x50x110x100x0}{UVx7500x7500x100x50x110x100x0}{VISx6000x6000x100x45x0x0x0}{IVx7500x7500x35x0x0x0x0}%
-\pgfspectra@elt@search{#1}{Kr}{[46.735 30 2],[47.216 150 4],[48.439 100 4],[49.625 250 4],[50.077 120 4],[50.72 200 4],[54.086 30 2],[54.804 60 4],[56.564 30 2],[56.916 30 2],[57.198 30 2],[57.983 30 2],[58.514 30 2],[58.596 30 2],[59.37 30 2],[59.41 30 2],[59.641 30 2],[60.017 40 2],[60.367 30 2],[60.586 50 2],[60.647 35 2],[61.112 50 2],[61.672 35 2],[62.145 40 2],[62.28 45 2],[62.502 50 2],[62.576 30 2],[62.859 45 2],[63.004 50 2],[63.309 35 2],[63.787 120 4],[63.998 50 2],[64.641 60 2],[65.12 50 2],[65.972 50 2],[66.486 30 2],[67.234 40 2],[67.285 35 2],[67.657 35 2],[68.013 35 2],[68.368 35 2],[68.625 45 2],[68.798 45 2],[69.193 45 2],[69.561 50 2],[69.805 30 2],[70.836 50 2],[70.885 600 4],[71.4 50 2],[72.204 100 2],[72.94 60 1],[74.67 30 2],[76.118 200 1],[76.398 100 1],[76.62 60 1],[77.103 200 1],[77.369 60 1],[78.21 200 1],[78.372 100 1],[78.597 60 2],[80.576 7 3],[81.682 18 3],[81.815 60 1],[83.038 60 1],[83.766 50 2],[84.204 22 3],[84.406 100 1],[85.473 50 2],[86.258 60 2],[86.482 60 1],[86.887 60 1],[87.084 40 2],[87.608 50 2],[88.414 200 1],[88.63 1000 1],[89.101 400 1],[89.781 75 2],[91.139 200 1],[91.743 2000 1],[94.544 50 0],[94.654 50 0],[95.106 20 0],[95.34 50 0],[96.337 50 0],[96.497 2000 1],[98.729 50 2],[100.106 100 0],[100.355 100 0],[103.002 100 0],[115.874 30 2],[116.487 200 0],[123.584 650 0],[163.882 6 2],[191.409 6 2],[223.734 3 3],[229.126 6 3],[232.93 3 3],[233.675 4 3],[234.827 4 3],[235.85 3 3],[238.805 3 3],[239.394 40 2],[241.69 4 3],[242.804 3 3],[244.268 5 3],[245.17 4 3],[245.974 6 3],[246.477 100 1],[247.406 5 3],[249.248 60 1],[249.401 40 2],[251.7 4 3],[251.802 5 3],[251.938 6 3],[252.45 5 3],[254.6 5 3],[254.7 6 3],[255.808 4 3],[256.325 30 2],[258.69 3 3],[260.617 5 3],[260.95 10 3],[261.53 8 3],[262.111 7 3],[263.976 60 2],[268.032 30 2],[268.119 40 2],[271.24 80 1],[273.055 3 3],[274.818 8 3],[277.47 6 3],[282.96 3 3],[283.3 100 1],[283.608 3 3],[284.1 30 2],[285.116 30 2],[285.3 5 3],[285.93 3 3],[287.061 50 2],[289.218 100 2],[290.917 30 2],[295.256 50 2],[299.222 60 2],[302.23 50 2],[302.445 80 2],[304.693 50 2],[305.672 30 2],[306.313 60 2],[309.716 40 2],[311.225 60 2],[312.061 30 2],[312.439 100 2],[314.135 60 2],[314.201 3 3],[318.911 100 2],[319.121 80 2],[322.499 6 3],[323.952 40 2],[324.044 40 2],[324.569 300 2],[326.17 3 3],[326.481 150 2],[326.848 100 2],[327.165 30 2],[328.589 30 2],[330.475 30 2],[331.147 50 2],[332.575 200 2],[333.076 60 2],[334.248 50 2],[335.193 100 2],[337.496 40 2],[343.946 100 2],[347.465 70 2],[348.859 100 2],[350.742 200 2],[356.423 100 2],[360.788 100 1],[363.1889 200 1],[364.134 30 2],[365.3928 250 1],[366.5324 80 0],[366.901 150 1],[367.9559 100 0],[368.6182 80 1],[369.065 30 2],[371.802 300 1],[371.8595 200 1],[372.135 150 1],[374.1638 200 1],[374.48 150 1],[375.4245 80 1],[377.8089 500 1],[378.3095 500 1],[380.93 3 3],[386.058 5 3],[386.87 40 2],[387.544 150 1],[390.6177 150 1],[392.0081 200 1],[393.429 5 3],[399.484 100 1],[399.7793 100 1],[405.7037 300 1],[406.5128 300 1],[406.737 50 2],[408.8337 500 1],[409.8729 250 1],[410.9248 100 1],[413.133 40 2],[414.5122 250 1],[415.446 40 2],[425.058 150 1],[427.3969 1000 0],[428.2967 100 0],[429.2923 600 1],[430.049 200 1],[431.781 500 1],[431.8551 400 0],[431.9579 1000 0],[432.298 150 1],[435.1359 100 0],[435.5477 3000 1],[436.2641 500 0],[436.969 200 1],[437.6121 800 0],[438.654 300 1],[439.9965 200 0],[442.5189 100 0],[443.1685 500 1],[443.6812 600 1],[445.3917 600 0],[446.3689 800 0],[447.5014 800 1],[448.988 400 1],[450.2353 600 0],[452.314 400 1],[455.661 200 1],[457.7209 800 1],[458.2978 300 1],[459.28 150 1],[461.5292 500 1],[461.9166 1000 1],[463.3885 800 1],[465.8876 2000 1],[468.0406 500 1],[469.1301 100 1],[469.436 200 1],[473.9002 3000 1],[476.2435 300 1],[476.5744 1000 1],[481.176 300 1],[482.518 300 1],[483.2077 800 1],[484.6612 700 1],[485.72 150 1],[494.559 300 1],[501.645 20 2],[502.24 200 1],[508.652 250 1],[512.573 400 1],[520.832 500 1],[530.866 200 1],[533.341 500 1],[546.817 200 1],[550.143 10 2],[556.2224 500 0],[557.0288 2000 0],[558.0386 80 0],[564.9561 100 0],[568.189 400 1],[569.035 200 1],[583.2855 100 0],[587.0914 3000 0],[599.222 200 1],[599.3849 60 0],[603.717 10 2],[605.6125 60 0],[607.838 10 2],[631.022 10 2],[642.018 300 1],[642.1026 100 0],[645.6288 200 0],[657.007 150 1],[669.9228 60 0],[690.4678 100 0],[721.313 250 1],[722.4104 100 0],[728.7258 80 0],[728.978 400 1],[740.702 400 1],[742.5541 60 0],[743.578 200 1],[748.6862 100 0],[752.446 300 1],[758.7411 1000 0],[760.1544 2000 0],[764.116 150 1],[768.5244 1000 0],[769.4538 1200 0],[773.569 250 1],[774.6827 150 0],[785.4821 800 0],[791.3423 200 0],[792.8597 180 0],[793.322 200 1],[797.362 120 1],[798.2401 100 0],[805.9503 1500 0],[810.4364 4000 0],[811.2899 6000 0],[813.2967 60 0],[819.0054 3000 0],[820.272 200 1],[821.8365 80 0],[826.324 3000 0],[827.2353 100 0],[828.105 1500 0],[829.8107 5000 0],[841.243 100 0],[850.887 3000 0],[876.411 150 0],[877.6748 6000 0],[892.8692 2000 0],[923.848 500 1],[929.382 500 1],[932.099 200 1],[936.195 300 1],[936.2082 100 0],[940.282 200 1],[947.093 200 1],[957.752 500 1],[960.58 500 1],[961.961 400 1],[966.334 200 1],[971.16 200 1],[975.1758 2000 0],[980.314 500 1],[985.6314 500 0],[1022.146 1000 1],[1118.7108 100 0],[1125.7711 200 0],[1125.9126 150 0],[1145.7481 500 0],[1179.2425 150 0],[1181.9377 1500 0],[1199.7105 600 0],[1207.7224 160 0],[1286.1892 100 0],[1317.7412 1100 0],[1362.2415 1000 0],[1363.422 2400 0],[1365.8394 800 0],[1371.1036 200 0],[1373.8851 600 0],[1397.4027 150 0],[1404.5657 550 0],[1410.4298 140 0],[1440.222 180 0],[1442.6793 2000 0],[1451.784 100 0],[1473.4436 1600 0],[1476.2672 550 0],[1476.5472 450 0],[1496.1894 400 0],[1500.5307 120 0],[1520.9526 140 0],[1523.9615 1700 0],[1532.648 130 0],[1533.4958 1500 0],[1537.2037 700 0],[1547.4026 200 0],[1568.102 180 0],[1582.009 120 0],[1672.6514 200 0],[1678.5129 2000 0],[1685.3488 1000 0],[1689.0441 2400 0],[1689.6754 1600 0],[1693.5807 1800 0],[1709.8771 600 0],[1736.7605 700 0],[1740.4443 120 0],[1761.6854 150 0],[1784.2736 650 0],[1800.2229 700 0],[1816.7314 2600 0],[1839.9785 100 0],[1858.0896 150 0],[1869.6295 300 0],[1878.5461 170 0],[1879.7703 200 0],[2020.9879 140 0],[2042.3965 300 0],[2044.6971 140 0],[2116.5471 600 0],[2190.2514 1800 0],[2248.5775 120 0],[2334.0416 180 0],[2426.0506 120 0],[2429.2221 180 0],[2523.382 600 0],[2861.0551 180 0],[2865.5721 1000 0],[2876.9711 150 0],[2882.249 140 0],[2923.6689 300 0],[3066.3539 300 0],[3097.916 300 0],[3930.0602 500 0],[3948.652 1100 0],[3955.725 220 0],[3957.2602 100 0],[3958.8398 1400 0],[3958.9602 1100 0],[3995.4801 500 0],[3996.6602 300 0],[4030.6102 1300 0],[4068.516 250 0]}{ALLx6000x6000x3000x300x22x600x0}{UVx2000x650x2000x300x22x600x0}{VISx3000x3000x3000x50x5x0x0}{IVx6000x6000x1000x0x0x0x0}%
+\pgfspectra@elt@search{#1}{Kr}{[46.735 30 2],[47.216 150 4],[48.439 100 4],[49.625 250 4],[50.077 120 4],[50.72 200 4],[54.086 30 2],[54.804 60 4],[56.564 30 2],[56.916 30 2],[57.198 30 2],[57.983 30 2],[58.514 30 2],[58.596 30 2],[59.37 30 2],[59.41 30 2],[59.641 30 2],[60.017 40 2],[60.367 30 2],[60.586 50 2],[60.647 35 2],[61.112 50 2],[61.672 35 2],[62.145 40 2],[62.28 45 2],[62.502 50 2],[62.576 30 2],[62.859 45 2],[63.004 50 2],[63.309 35 2],[63.787 120 4],[63.998 50 2],[64.641 60 2],[65.12 50 2],[65.972 50 2],[66.486 30 2],[67.234 40 2],[67.285 35 2],[67.657 35 2],[68.013 35 2],[68.368 35 2],[68.625 45 2],[68.798 45 2],[69.193 45 2],[69.561 50 2],[69.805 30 2],[70.836 50 2],[70.885 600 4],[71.4 50 2],[72.204 100 2],[72.94 60 1],[74.67 30 2],[76.118 200 1],[76.398 100 1],[76.62 60 1],[77.103 200 1],[77.369 60 1],[78.21 200 1],[78.372 100 1],[78.597 60 2],[80.576 7 3],[81.682 18 3],[81.815 60 1],[83.038 60 1],[83.766 50 2],[84.204 22 3],[84.406 100 1],[85.473 50 2],[86.258 60 2],[86.482 60 1],[86.887 60 1],[87.084 40 2],[87.608 50 2],[88.414 200 1],[88.63 1000 1],[89.101 400 1],[89.781 75 2],[91.139 200 1],[91.743 2000 1],[94.544 50 0],[94.654 50 0],[95.106 20 0],[95.34 50 0],[96.337 50 0],[96.497 2000 1],[98.729 50 2],[100.106 100 0],[100.355 100 0],[103.002 100 0],[115.874 30 2],[116.487 200 0],[123.584 650 0],[163.882 6 2],[191.409 6 2],[223.734 3 3],[229.126 6 3],[232.93 3 3],[233.675 4 3],[234.827 4 3],[235.85 3 3],[238.805 3 3],[239.394 40 2],[241.69 4 3],[242.804 3 3],[244.268 5 3],[245.17 4 3],[245.974 6 3],[246.477 100 1],[247.406 5 3],[249.248 60 1],[249.401 40 2],[251.7 4 3],[251.802 5 3],[251.938 6 3],[252.45 5 3],[254.6 5 3],[254.7 6 3],[255.808 4 3],[256.325 30 2],[258.69 3 3],[260.617 5 3],[260.95 10 3],[261.53 8 3],[262.111 7 3],[263.976 60 2],[268.032 30 2],[268.119 40 2],[271.24 80 1],[273.055 3 3],[274.818 8 3],[277.47 6 3],[282.96 3 3],[283.3 100 1],[283.608 3 3],[284.1 30 2],[285.116 30 2],[285.3 5 3],[285.93 3 3],[287.061 50 2],[289.218 100 2],[290.917 30 2],[295.256 50 2],[299.222 60 2],[302.23 50 2],[302.445 80 2],[304.693 50 2],[305.672 30 2],[306.313 60 2],[309.716 40 2],[311.225 60 2],[312.061 30 2],[312.439 100 2],[314.135 60 2],[314.201 3 3],[318.911 100 2],[319.121 80 2],[322.499 6 3],[323.952 40 2],[324.044 40 2],[324.569 300 2],[326.17 3 3],[326.481 150 2],[326.848 100 2],[327.165 30 2],[328.589 30 2],[330.475 30 2],[331.147 50 2],[332.575 200 2],[333.076 60 2],[334.248 50 2],[335.193 100 2],[337.496 40 2],[343.946 100 2],[347.465 70 2],[348.859 100 2],[350.742 200 2],[356.423 100 2],[360.788 100 1],[363.1889 200 1],[364.134 30 2],[365.3928 250 1],[366.5324 80 0],[366.901 150 1],[367.9559 100 0],[368.6182 80 1],[369.065 30 2],[371.802 300 1],[371.8595 200 1],[372.135 150 1],[374.1638 200 1],[374.48 150 1],[375.4245 80 1],[377.8089 500 1],[378.3095 500 1],[380.93 3 3],[386.058 5 3],[386.87 40 2],[387.544 150 1],[390.6177 150 1],[392.0081 200 1],[393.429 5 3],[399.484 100 1],[399.7793 100 1],[405.7037 300 1],[406.5128 300 1],[406.737 50 2],[408.8337 500 1],[409.8729 250 1],[410.9248 100 1],[413.133 40 2],[414.5122 250 1],[415.446 40 2],[425.058 150 1],[427.3969 1000 0],[428.2967 100 0],[429.2923 600 1],[430.049 200 1],[431.781 500 1],[431.8551 400 0],[431.9579 1000 0],[432.298 150 1],[435.1359 100 0],[435.5477 3000 1],[436.2641 500 0],[436.969 200 1],[437.6121 800 0],[438.654 300 1],[439.9965 200 0],[442.5189 100 0],[443.1685 500 1],[443.6812 600 1],[445.3917 600 0],[446.3689 800 0],[447.5014 800 1],[448.988 400 1],[450.2353 600 0],[452.314 400 1],[455.661 200 1],[457.7209 800 1],[458.2978 300 1],[459.28 150 1],[461.5292 500 1],[461.9166 1000 1],[463.3885 800 1],[465.8876 2000 1],[468.0406 500 1],[469.1301 100 1],[469.436 200 1],[473.9002 3000 1],[476.2435 300 1],[476.5744 1000 1],[481.176 300 1],[482.518 300 1],[483.2077 800 1],[484.6612 700 1],[485.72 150 1],[494.559 300 1],[501.645 20 2],[502.24 200 1],[508.652 250 1],[512.573 400 1],[520.832 500 1],[530.866 200 1],[533.341 500 1],[546.817 200 1],[550.143 10 2],[556.2224 500 0],[557.0288 2000 0],[558.0386 80 0],[564.9561 100 0],[568.189 400 1],[569.035 200 1],[583.2855 100 0],[587.0914 3000 0],[599.222 200 1],[599.3849 60 0],[603.717 10 2],[605.6125 60 0],[607.838 10 2],[631.022 10 2],[642.018 300 1],[642.1026 100 0],[645.6288 200 0],[657.007 150 1],[669.9228 60 0],[690.4678 100 0],[721.313 250 1],[722.4104 100 0],[728.7258 80 0],[728.978 400 1],[740.702 400 1],[742.5541 60 0],[743.578 200 1],[748.6862 100 0],[752.446 300 1],[758.7411 1000 0],[760.1544 2000 0],[764.116 150 1],[768.5244 1000 0],[769.4538 1200 0],[773.569 250 1],[774.6827 150 0],[785.4821 800 0],[791.3423 200 0],[792.8597 180 0],[793.322 200 1],[797.362 120 1],[798.2401 100 0],[805.9503 1500 0],[810.4364 4000 0],[811.2899 6000 0],[813.2967 60 0],[819.0054 3000 0],[820.272 200 1],[821.8365 80 0],[826.324 3000 0],[827.2353 100 0],[828.105 1500 0],[829.8107 5000 0],[841.243 100 0],[850.887 3000 0],[876.411 150 0],[877.6748 6000 0],[892.8692 2000 0],[923.848 500 1],[929.382 500 1],[932.099 200 1],[936.195 300 1],[936.2082 100 0],[940.282 200 1],[947.093 200 1],[957.752 500 1],[960.58 500 1],[961.961 400 1],[966.334 200 1],[971.16 200 1],[975.1758 2000 0],[980.314 500 1],[985.6314 500 0],[1022.146 1000 1],[1118.7108 100 0],[1125.7711 200 0],[1125.9126 150 0],[1145.7481 500 0],[1179.2425 150 0],[1181.9377 1500 0],[1199.7105 600 0],[1207.7224 160 0],[1286.1892 100 0],[1317.7412 1100 0],[1362.2415 1000 0],[1363.422 2400 0],[1365.8394 800 0],[1371.1036 200 0],[1373.8851 600 0],[1397.4027 150 0],[1404.5657 550 0],[1410.4298 140 0],[1440.222 180 0],[1442.6793 2000 0],[1451.784 100 0],[1473.4436 1600 0],[1476.2672 550 0],[1476.5472 450 0],[1496.1894 400 0],[1500.5307 120 0],[1520.9526 140 0],[1523.9615 1700 0],[1532.648 130 0],[1533.4958 1500 0],[1537.2037 700 0],[1547.4026 200 0],[1568.102 180 0],[1582.009 120 0],[1672.6514 200 0],[1678.5129 2000 0],[1685.3488 1000 0],[1689.0441 2400 0],[1689.6754 1600 0],[1693.5807 1800 0],[1709.8771 600 0],[1736.7605 700 0],[1740.4443 120 0],[1761.6854 150 0],[1784.2736 650 0],[1800.2229 700 0],[1816.7314 2600 0],[1839.9785 100 0],[1858.0896 150 0],[1869.6295 300 0],[1878.5461 170 0],[1879.7703 200 0],[2020.9879 140 0],[2042.3965 300 0],[2044.6971 140 0],[2116.5471 600 0],[2190.2514 1800 0],[2248.5775 120 0],[2334.0416 180 0],[2426.0506 120 0],[2429.2221 180 0],[2523.382 600 0],[2861.0551 180 0],[2865.5721 1000 0],[2876.9711 150 0],[2882.249 140 0],[2923.6689 300 0],[3066.3539 300 0],[3097.916 300 0],[3930.0602 500 0],[3948.652 1100 0],[3955.725 220 0],[3957.2602 100 0],[3958.8398 1400 0],[3958.9602 1100 0],[3995.4801 500 0],[3996.6602 300 0]}{ALLx6000x6000x3000x300x22x600x0}{UVx2000x650x2000x300x22x600x0}{VISx3000x3000x3000x50x5x0x0}{IVx6000x6000x1000x0x0x0x0}%,[4030.6102 1300 0],[4068.516 250 0]
\pgfspectra@elt@search{#1}{Rb}{[46.585 3 2],[47.488 1 1],[48.1118 4 1],[48.243 3.5 2],[48.247 3 2],[48.283 50 2],[48.484 30 2],[48.966 50 2],[48.996 10 2],[49.348 60 2],[49.743 9 1],[49.782 5 2],[50.028 10 2],[50.833 3 2],[50.8434 2 1],[51.3266 15 1],[51.679 40 2],[53.0173 30 1],[53.364 80 2],[53.3801 7.5 1],[53.586 120 2],[54.2887 4 1],[55.5036 20 1],[55.619 120 2],[55.836 50 2],[56.477 70 2],[56.671 150 2],[57.282 100 2],[57.665 150 2],[57.963 250 2],[58.126 150 2],[58.234 50 2],[58.677 80 2],[58.9419 250 1],[59.142 10 2],[59.365 90 2],[59.494 100 2],[59.518 1 3],[59.588 130 2],[59.849 120 2],[60.209 45 2],[60.551 5 2],[60.728 50 2],[61.331 40 2],[61.967 50 2],[62.083 2 2],[62.224 10 2],[63.006 25 2],[64.3878 150 1],[64.567 50 2],[66.376 2.5 3],[67.481 2 2],[69.7049 300 1],[71.1187 600 1],[71.624 2.5 3],[73.341 2 3],[74.085 5 3],[74.1456 1000 1],[74.986 2 3],[75.375 2 3],[76.904 500 2],[77.154 1 3],[77.689 2.5 3],[81.528 250 2],[81.792 0.9 3],[85.018 1.5 3],[98.8 1 3],[160.412 100 1],[164.496 20 1],[170.752 20 1],[171.685 60 1],[176.05 500 1],[180.347 20 1],[180.968 50 1],[186.533 50 1],[188.942 50 1],[195.424 50 1],[195.654 30 1],[197.142 20 1],[198.319 50 1],[204.223 30 1],[205.221 30 1],[205.28 50 1],[206.892 200 1],[207.15 100 1],[207.595 1000 1],[209.029 100 1],[210.806 20 1],[211.65 30 1],[212.525 100 1],[212.982 40 1],[214.31 20 1],[214.383 3000 1],[215.321 10 2],[216.459 25 2],[219.036 20 1],[219.799 60 1],[219.826 60 1],[220.786 30 1],[221.708 1000 1],[222.379 20 1],[223.772 40 1],[225.065 50 1],[225.143 20 1],[225.419 80 1],[225.455 20 1],[226.354 20 1],[226.394 50 1],[226.8 10 2],[228.682 50 1],[229.171 500 1],[229.88 30 1],[230.012 15 2],[230.414 50 2],[230.445 15 2],[231.246 25 2],[233.301 25 1],[233.339 200 1],[233.707 20 2],[234.19 10 2],[234.537 20 2],[234.981 10 2],[235.311 35 1],[235.396 30 1],[235.697 40 1],[235.804 30 1],[236.427 30 1],[236.432 20 1],[236.515 20 1],[236.751 30 1],[237.321 20 1],[238.044 15 2],[238.129 10 2],[238.534 200 1],[240.594 25 1],[241.846 15 2],[243.417 40 1],[245.914 80 1],[247.22 5000 1],[248.456 30 1],[248.47 70 1],[249.638 200 1],[250.267 20 1],[251.418 25 1],[252.424 100 1],[256.186 30 2],[257.371 10 2],[257.707 10 2],[258.683 20 2],[259.456 20 1],[262.376 40 1],[263.175 100 2],[263.683 35 2],[264.558 40 1],[265.668 10 2],[268.41 100 1],[271.176 100 1],[271.386 10 2],[274.101 25 1],[279.886 50 2],[280.027 15 2],[280.758 50 2],[281.215 50 1],[283.851 35 1],[284.544 10 2],[286.977 15 2],[287.388 75 1],[290.369 50 2],[294.962 15 2],[295.101 10 2],[295.607 200 2],[296.745 50 2],[296.813 15 2],[297.074 50 2],[298.74 25 2],[302.361 35 2],[303.962 20 2],[304.148 20 2],[305.136 100 1],[307.07 25 2],[308.202 0.2 0],[308.684 50 2],[308.858 25 1],[309.849 10 2],[311.136 50 2],[311.257 1 0],[311.306 0.3 0],[311.482 25 2],[311.892 12 2],[314.89 500 1],[315.754 2.5 0],[315.826 0.5 0],[316.1 120 1],[316.934 10 2],[322.26 20 2],[322.798 5 0],[322.916 0.6 0],[327.099 200 1],[328.641 50 2],[332.149 150 1],[333.016 10 2],[334.055 120 1],[334.692 20 2],[334.872 6 0],[335.082 7.5 0],[335.389 75 1],[339.303 120 1],[341.558 75 1],[343.418 100 1],[343.926 25 2],[346.15 150 1],[349.268 10 2],[352.139 300 1],[353.155 300 1],[354.115 100 1],[358.705 10 0],[359.157 4 0],[360.06 500 1],[360.064 1000 1],[363.98 60 1],[364.626 40 1],[364.756 35 1],[366.274 100 1],[366.381 90 1],[366.672 35 1],[367.566 30 1],[369.958 250 1],[374.633 35 1],[379.681 350 1],[380.19 250 1],[382.666 100 1],[386.074 45 1],[390.729 25 1],[392.22 50 1],[392.644 250 1],[394.051 2500 1],[397.815 100 1],[402.949 170 1],[408.388 250 1],[410.428 200 1],[413.611 170 1],[419.308 350 1],[420.18 100 0],[421.553 50 0],[424.44 9000 1],[426.658 50 1],[427.025 25 1],[427.314 1500 1],[428.797 250 1],[429.397 150 1],[430.626 50 1],[434.696 100 1],[437.712 250 1],[444.01 30 1],[446.947 100 1],[449.392 40 1],[451.904 70 1],[453.034 300 1],[453.379 50 1],[454.074 40 1],[457.177 2000 1],[462.242 300 1],[463.189 35 1],[464.857 1000 1],[465.928 50 1],[473.045 100 1],[475.53 100 1],[475.782 40 1],[477.595 3000 1],[478.283 500 1],[485.534 30 1],[488.559 150 1],[508.7987 0.2 0],[513.2471 0.2 0],[515.0134 1 0],[515.208 1000 1],[516.458 30 1],[516.5023 0.1 0],[516.5142 0.2 0],[516.965 0.1 0],[519.5278 1.5 0],[523.3968 0.2 0],[526.0034 2 0],[526.0228 0.1 0],[527.051 20 1],[532.238 0.3 0],[536.2601 4 0],[539.0568 0.4 0],[543.1532 7.5 0],[543.183 0.3 0],[551.255 50 1],[552.278 500 1],[557.8788 0.6 0],[563.599 500 1],[564.7774 4 0],[565.375 2 0],[569.915 300 1],[572.4121 6 0],[572.4614 0.3 0],[573.964 20 1],[607.0755 7.5 0],[613.527 20 1],[615.9626 3 0],[619.908 100 1],[620.6309 7.5 0],[626.94 30 1],[629.8325 12 0],[629.9224 0.5 0],[645.833 1000 1],[655.562 100 1],[656.081 500 1],[677.507 300 1],[727.9997 10 0],[731.652 30 1],[740.8173 15 0],[761.8933 20 0],[775.7651 30 0],[775.9436 6 0],[780.027 9000 0],[792.526 0.5 0],[792.554 0.4 0],[794.76 4500 0],[827.141 4 0],[827.171 3 0],[860.396 200 1],[886.8512 4 0],[886.8852 3 0],[897.888 30 1],[902.177 30 1],[922.464 0.3 0],[923.425 0.2 0],[924.641 50 1],[933.887 30 1],[937.35 20 1],[939.136 30 1],[947.932 100 1],[949.372 70 1],[952.265 3 0],[952.305 0.5 0],[954.018 2 0],[961.299 30 1],[967.154 30 1],[968.905 200 1],[977.606 20 1],[993.476 20 1],[1007.5282 3.5 0],[1007.5708 3 0],[1323.517 10 0],[1344.281 2 0],[1344.357 3 0],[1366.501 7.5 0],[1475.241 100 0],[1528.843 80 0],[1528.948 15 0],[2252.965 2 0],[2293.2471 1 0],[2731.4311 0.4 0],[2790.5369 0.2 0]}{ALLx9000x9000x9000x500x5x0x0}{UVx5000x10x5000x500x5x0x0}{VISx9000x100x9000x0x0x0x0}{IVx9000x9000x200x0x0x0x0}%
\pgfspectra@elt@search{#1}{Sr}{[28.431 2.4 3],[29.109 2.4 3],[29.119 2.4 3],[29.322 2.4 3],[29.812 3 3],[30.012 3 3],[30.027 2.4 3],[30.167 2.4 3],[30.718 5 2],[31.611 10 2],[32.161 10 2],[33.067 25 2],[35.162 100 2],[35.88 15 2],[36.349 50 2],[37.121 30 2],[37.853 4 3],[39.244 15 3],[39.3 10 3],[39.49 9 3],[39.622 10 3],[39.992 8 3],[40.385 7 3],[40.694 7 3],[41.293 6 3],[41.307 8 3],[41.532 8 3],[41.978 6 3],[43.021 5 3],[43.065 6 3],[43.724 200 2],[44.273 5 3],[47.176 5 3],[48.42 5 3],[49.179 375 2],[50.704 250 2],[50.814 5 3],[51.438 750 2],[51.728 2 4],[53.419 5 3],[54.051 1.2 4],[56.275 500 2],[57.801 5 4],[62.493 6 4],[64.223 5 4],[64.921 10 4],[65.915 4 4],[66.094 5 4],[66.443 40 3],[66.993 1.8 4],[68.623 7 4],[71.035 20 3],[71.579 1.2 4],[74.782 2.4 4],[86.232 1.8 4],[96.837 4 2],[97.578 4 2],[99.298 5 2],[102.523 10 2],[104.491 7 2],[105.774 4 2],[106.02 5 2],[109.877 4 2],[112.549 7 2],[114.024 4 2],[116.827 4 2],[118.209 4 2],[118.921 4 3],[123.623 10 2],[124.414 6 3],[124.475 4 3],[124.487 4 3],[125.778 4 3],[126.862 4 3],[133.113 4 3],[134.79 6 3],[136.115 4 3],[140.867 5 3],[159.274 4 3],[167.703 5 3],[170.516 4 3],[172.423 4 3],[172.953 5 3],[173.212 4 3],[177.725 4 3],[194.058 4 2],[195.844 6 2],[196.692 6 2],[199.461 4 3],[206.863 5 2],[209.959 10 2],[210.438 4 3],[211.431 5 2],[211.79 4 3],[211.848 6 2],[211.952 10 2],[213.312 10 2],[214.28 6 2],[214.574 4 2],[215.284 280 1],[216.596 280 1],[217.891 6 2],[218.014 6 2],[219.088 10 2],[220.386 10 2],[221.799 4 3],[221.95 10 2],[222.005 10 2],[223.041 4 3],[224.049 4 3],[225.338 4 3],[226.703 10 2],[227.371 20 2],[227.787 10 2],[231.033 6 2],[231.495 10 2],[233.479 10 2],[234.013 20 2],[234.697 10 3],[235.734 4 3],[240.417 10 2],[241.052 6 2],[242.81 32 0],[243.893 4 3],[244.141 5 3],[245.403 10 2],[248.279 6 3],[248.357 5 3],[248.652 20 2],[250.057 3.6 3],[250.359 10 2],[250.802 4 3],[253.403 4 3],[254.802 3.6 3],[255.56 8 3],[256.947 24 0],[257.104 8 3],[257.158 5 3],[258.934 3 3],[259.91 6 2],[262.035 5 3],[262.116 4 3],[262.269 7 2],[264.216 4 3],[264.296 6 2],[264.851 6 2],[265.466 7 2],[272.247 8 2],[278.6 10 2],[282.142 10 2],[283.053 3 3],[287.486 6 2],[292.934 6 2],[293.183 40 0],[293.46 1.8 3],[298.3 6 2],[300.261 20 2],[301.232 40 2],[301.929 2 3],[302.173 20 2],[305.983 6 2],[306.143 10 2],[310.425 6 2],[318.261 10 2],[323.539 20 2],[326.652 1.8 3],[330.173 60 0],[330.272 6 2],[332.999 60 0],[335.125 80 0],[336.633 60 0],[338.071 130 1],[343.076 10 2],[346.446 190 1],[347.489 24 1],[356.643 1.8 3],[374.105 1.8 3],[387.426 6 2],[393.64 6 2],[393.672 6 2],[394.08 60 0],[395.875 6 2],[396.926 120 0],[397.004 60 0],[403.038 260 0],[403.238 60 0],[407.771 9200 1],[409.403 6 2],[409.702 6 2],[410.563 6 2],[416.18 40 1],[421.552 6400 1],[429.857 1.8 3],[430.545 68 1],[433.58 7 2],[443.804 70 0],[460.733 13000 0],[468.508 1.8 3],[472.228 640 0],[474.192 440 0],[478.432 280 0],[481.188 960 0],[483.208 720 0],[485.504 100 0],[486.87 120 0],[487.249 600 0],[487.606 120 0],[487.632 400 0],[489.198 200 0],[496.226 1600 0],[496.794 260 0],[507.109 6 2],[513.034 6 2],[515.607 160 0],[515.826 7 2],[522.22 280 0],[522.511 400 0],[522.927 400 0],[523.855 560 0],[525.69 960 0],[525.771 8 2],[526.221 6 2],[528.832 6 2],[532.982 70 0],[539.103 6 2],[544.348 8 2],[545.084 300 0],[546.39 6 2],[548.084 1400 0],[548.612 220 0],[550.417 700 0],[552.183 520 0],[553.481 400 0],[554.005 400 0],[554.336 50 0],[566.466 6 2],[568.972 6 2],[597.01 40 0],[634.575 50 0],[636.394 50 0],[636.996 70 0],[638.075 200 0],[638.65 180 0],[638.824 120 0],[640.847 1800 0],[644.668 50 0],[646.579 50 0],[650.4 1100 0],[654.679 200 0],[655.026 340 0],[661.726 600 0],[664.354 160 0],[679.105 360 0],[687.838 960 0],[689.259 240 0],[707.01 1100 0],[715.309 12 0],[716.724 50 0],[723.227 40 0],[730.941 500 0],[762.15 100 0],[767.306 80 0],[785 10 0],[786.69 6 0],[787.4 4 0],[842.28 40 0],[850.569 24 1],[868.891 40 1],[871.956 6 1],[917 8 0],[920.45 6 0],[928.39 4 0],[929.41 20 0],[930.66 3 0],[931.92 6 0],[938.045 12 0],[941.125 8 0],[944.895 80 0],[959.6 120 0],[962.47 60 0],[963.81 20 0],[964.77 20 1],[1003.666 60 1],[1032.731 200 1],[1087.27 1.4 1],[1091.488 40 1],[1098.4 2 0],[1122.457 2.6 1],[1124.125 140 0],[1201.476 20 1],[1223.62 4 0],[1244.59 12 1],[1247.96 4 0],[1249.5 8 0],[1265.22 3 0],[1297.47 15 1],[1312.38 20 1],[1352.28 3 0],[1714.09 3 0],[1717.05 6 0],[1744.74 10 0],[1762.6 0.8 1],[1774.3 6 0],[1975.96 3 0],[2026.14 46 0],[2070.0699 24 0],[2076.45 8 0],[2077.8699 3 0],[2602.36 6 0]}{ALLx13000x13000x9200x750x40x10x0}{UVx750x80x280x750x40x10x0}{VISx13000x13000x9200x8x1.8x0x0}{IVx200x140x200x0x0x0x0}%
\pgfspectra@elt@search{#1}{Y}{[21.18 0.3 3],[21.451 0.3 3],[21.597 0.6 3],[21.739 0.6 3],[22.171 1.2 3],[22.218 0.3 3],[22.298 0.6 3],[22.884 0.2 3],[22.894 2 3],[22.978 0.3 3],[23.517 0.3 3],[23.577 2.5 3],[24.212 0.1 3],[24.23 3 3],[24.414 0.3 3],[26.372 0.3 3],[26.464 15 3],[27.24 3 3],[27.303 15 3],[27.86 1 3],[28.918 0.5 4],[29.999 5 4],[31.289 0.3 4],[31.335 20 4],[32.047 4 4],[32.169 4 4],[32.558 15 4],[32.657 20 4],[32.834 17.5 4],[33.04 5 4],[33.309 90 4],[33.38 50 4],[33.512 10 4],[33.514 40 4],[33.662 50 4],[33.902 50 4],[34.002 20 4],[34.042 0.5 4],[34.459 50 4],[34.965 10 4],[34.975 0.2 4],[35.136 1 4],[35.398 10 4],[35.556 10 4],[35.586 90 3],[37.042 30 3],[37.205 30 4],[37.996 40 4],[38.682 50 3],[39.777 20 4],[40.345 30 4],[40.881 0.1 4],[40.931 20 4],[41.503 20 4],[41.818 10 4],[41.859 15 4],[41.979 5 4],[42.074 30 4],[42.503 60 3],[42.787 0.1 4],[43.075 5 4],[43.766 10 4],[44.162 0.3 4],[44.296 3 4],[45.197 0.2 4],[45.584 1.5 4],[45.784 8.5 4],[47.31 30 3],[58.498 400 4],[63.097 200 4],[64.368 0.1 2],[64.669 0.4 2],[65.387 0.6 2],[65.698 1 2],[66.874 2.5 2],[67.198 4 2],[69.172 10 2],[69.385 0.4 2],[69.52 20 2],[72.791 0.9 2],[72.847 0.4 2],[72.883 0.2 2],[72.973 2 2],[73.049 60 2],[73.27 1.5 2],[73.436 80 2],[77.078 1.5 2],[77.179 1 2],[80.426 2 2],[80.52 500 2],[80.618 7.5 2],[80.897 15 2],[80.992 700 2],[85.564 10 2],[85.782 6 2],[98.423 2.5 2],[98.796 1.5 2],[98.921 1500 2],[99.637 2500 2],[99.919 2 2],[100.056 15 2],[100.335 2.5 2],[100.658 100 2],[100.786 120 2],[107.752 12 2],[108.135 50 2],[108.463 7.5 2],[108.839 35 2],[109.525 25 2],[109.587 2.5 2],[110.321 15 2],[128.974 300 2],[130.696 250 2],[131.451 500 2],[131.61 150 2],[133.404 400 2],[154.908 0.8 2],[155.381 1.5 2],[163.514 3 2],[164.043 7.5 2],[177.98 20 2],[178.605 60 2],[204.193 1 2],[204.207 0.5 2],[206.058 150 2],[206.898 400 2],[212.798 1000 2],[219.116 1600 2],[220.076 800 2],[220.603 800 2],[224.306 35 1],[226.141 15 2],[226.157 8 2],[228.434 1000 2],[231.992 0.3 2],[232.731 1000 2],[235.42 5 0],[236.723 5000 2],[237.383 3 -1],[238.524 5 -1],[241.393 2.5 1],[241.464 4000 2],[242.22 56 1],[246.061 6 1],[249.042 2.5 0],[254.028 1.2 -1],[254.757 1.4 -1],[255.017 1 -1],[268.165 2 0],[269.421 6 0],[269.539 2.6 0],[271.03 10 2],[271.054 9 2],[272.3 9.5 0],[273.008 2.2 0],[273.485 2.2 1],[274.253 7 0],[276.01 14 0],[278.011 0.5 2],[278.521 3 1],[278.559 1.2 1],[279.12 1.2 0],[279.144 7 2],[280.011 3 1],[280.327 2 2],[280.7 10 2],[281.364 2.6 0],[281.704 9000 2],[281.886 1.8 0],[282.256 4.5 0],[282.537 2.2 1],[282.638 4.5 1],[285.443 7 1],[285.63 2.6 1],[285.787 1.1 1],[286.767 600 2],[288.648 9.5 0],[289.769 1.8 1],[289.882 1.4 1],[291.341 600 2],[291.774 150 2],[291.856 160 2],[291.905 16 0],[293.003 1.8 1],[294.053 1.5 2],[294.601 9900 2],[294.84 39 0],[294.848 2 2],[296.496 35 0],[297.042 600 2],[297.391 1.8 1],[297.459 48 0],[298.055 3 1],[298.426 75 0],[299.526 7 0],[299.694 14 0],[300.526 7 0],[301.393 140 2],[301.885 150 2],[301.895 5.5 0],[302.173 13 0],[302.228 9 0],[302.649 2.6 1],[303.659 3 1],[304.484 4.5 0],[304.537 19 0],[304.711 2.2 0],[305.522 6 1],[308.685 6 1],[309.17 5.5 0],[309.376 2.2 1],[309.588 9.5 1],[311.181 4.5 0],[311.204 5.5 1],[311.428 2.2 0],[312.877 6 1],[312.993 8 1],[313.517 9.5 1],[317.306 11 1],[317.941 22 1],[319.131 7 0],[319.562 230 1],[320.027 220 1],[320.332 220 1],[321.669 390 1],[324.228 620 1],[326.71 0.3 2],[327.68 2.5 2],[328.091 31 1],[330.847 1.9 1],[332.789 470 1],[334.038 5.5 0],[336.2 16 1],[338.859 8.5 0],[339.704 4.5 0],[341.247 8.5 0],[344.882 20 1],[345.095 7 0],[346.788 11 1],[348.573 17 0],[349.609 170 1],[352.153 8 0],[354.601 4.5 1],[354.901 390 1],[355.18 13 0],[355.269 54 0],[355.876 17 0],[357.143 19 0],[357.605 26 0],[358.452 330 1],[358.775 30 0],[358.969 10 0],[359.292 280 0],[360.073 1000 1],[360.192 620 1],[361.105 780 1],[362.094 430 0],[362.871 190 1],[363.312 780 1],[366.461 300 1],[366.849 4.5 1],[369.253 17 0],[371.03 1300 1],[371.812 6 0],[373.861 6 0],[374.755 120 1],[374.989 5 0],[377.433 1000 1],[377.656 140 1],[378.23 5 1],[378.87 740 1],[381.835 130 1],[383.288 400 1],[384.787 7 1],[386.696 50 2],[387.682 8 0],[387.828 48 1],[388.777 3 0],[390.074 300 2],[390.459 6 0],[391.458 400 2],[391.825 5 0],[393.011 6 0],[393.066 24 1],[395.036 440 1],[395.16 15 1],[395.509 6 0],[398.26 360 1],[398.75 4 0],[403.96 380 2],[403.983 94 0],[404.011 300 2],[404.764 240 0],[407.738 940 0],[408.122 9 0],[408.371 200 0],[410.238 990 0],[410.639 6 0],[411.081 8 0],[412.161 12 2],[412.492 32 1],[412.831 890 0],[414.285 750 0],[415.763 10 0],[416.752 240 0],[417.414 200 0],[417.754 800 1],[419.928 12 1],[420.47 38 1],[421.302 8 0],[421.354 4 0],[421.78 16 0],[422.063 28 0],[422.425 8 0],[423.573 60 1],[423.594 220 0],[425.12 30 0],[430.23 36 0],[430.963 280 1],[431.63 5 0],[433.078 11 0],[433.729 3 0],[434.465 6 0],[434.879 44 0],[435.233 6 0],[435.27 6 0],[435.773 12 0],[435.873 80 1],[436.603 12 0],[437.494 1200 1],[437.561 15 0],[437.933 8 0],[438.548 3 0],[438.774 10 0],[439.401 3 0],[439.467 3 0],[439.802 180 1],[442.259 89 1],[443.734 8 0],[444.366 10 0],[444.663 13 0],[446.527 2 0],[447.389 4 0],[447.572 17 0],[447.696 18 0],[447.745 16 0],[448.728 11 0],[448.747 30 0],[449.175 3 0],[449.242 2.5 0],[450.595 50 0],[451.358 5 0],[451.401 8 0],[452.205 4 0],[452.725 89 0],[452.78 44 0],[454.432 10 0],[455.937 10 0],[456.439 3 0],[457.356 6 0],[458.132 3.5 0],[458.177 3 0],[459.655 13 0],[460.48 9.5 0],[461.3 4 0],[464.37 200 0],[465.832 20 0],[465.889 7 0],[466.747 8.5 0],[467.082 6 0],[467.484 200 0],[467.835 6 0],[468.232 26 1],[468.977 8.5 0],[469.681 18 0],[470.885 3.5 0],[472.585 6 0],[472.853 17 0],[473.237 6 0],[473.762 200 2],[474.14 8.5 0],[475.279 16 0],[476.098 41 0],[478.018 1.7 0],[478.104 12 0],[478.658 16 1],[478.689 17 0],[479.93 18 0],[480.431 5 0],[480.481 7 0],[481.738 8.5 -1],[481.82 14 -1],[481.964 14 0],[482.213 12 0],[482.331 19 1],[483.915 6 0],[483.987 77 0],[484.568 55 0],[485.269 41 0],[485.425 12 0],[485.487 89 1],[485.67 5 0],[485.984 33 0],[487.965 5 0],[488.369 190 1],[488.628 5 0],[488.665 4 0],[489.344 9.5 0],[490.012 110 1],[490.611 10 0],[490.9 4.5 0],[492.187 15 0],[493.093 3.5 0],[495.066 4.5 0],[497.43 12 0],[498.213 12 1],[500.697 10 0],[507.021 7.5 0],[507.219 7.5 0],[508.742 110 1],[508.818 3 0],[510.288 750 2],[511.911 21 1],[512.04 130 2],[512.321 45 1],[513.52 18 0],[519.643 12 1],[520.041 96 1],[520.572 150 1],[523.81 1000 2],[524.081 18 0],[526.358 300 2],[528.982 6 1],[532.078 4.5 1],[538.062 7.5 0],[538.364 400 2],[540.278 22 1],[541.703 2.4 0],[542.437 9 0],[543.824 19 0],[546.646 71 0],[546.847 10 0],[547.339 9 1],[548.074 9 1],[549.317 6 0],[549.559 3.5 0],[549.741 24 1],[550.345 30 0],[550.99 25 1],[551.364 6 0],[552.163 12 0],[552.676 2.4 0],[552.754 74 0],[554.163 3.5 0],[554.45 12 0],[554.602 9 1],[555.643 7.5 0],[556.281 600 2],[556.727 60 2],[556.775 6 0],[557.224 400 2],[557.742 18 0],[558.108 2.4 0],[558.187 62 0],[559.096 2.1 0],[559.412 2.1 0],[559.548 40 2],[560.208 300 2],[560.633 12 0],[562.391 1.5 0],[563.013 56 0],[563.225 2.4 0],[563.289 2.1 0],[564.469 12 0],[564.847 12 0],[566.294 74 1],[567.527 9 0],[569.363 1.8 0],[570.673 16 0],[572.061 2.4 0],[572.889 7.5 1],[573.012 15 -1],[573.209 2.1 0],[574.385 9 0],[574.693 1.8 -1],[576.422 2.4 -1],[576.564 7.5 0],[577.395 3.5 0],[578.169 10 1],[580 1.5 -1],[581.858 1.5 -1],[582.187 3 0],[583.227 2.1 0],[583.807 0.9 -1],[585.883 1.5 -1],[587.183 1.5 0],[587.614 2.4 -1],[587.996 2.4 0],[589.394 2.4 -1],[590.296 3.5 0],[591.219 2.4 -1],[593.11 2.4 -1],[593.908 9 -1],[594.572 4.5 0],[595.002 2.4 0],[595.641 7.5 -1],[597.204 130 -1],[598.186 5 0],[598.764 100 -1],[600.36 74 -1],[600.465 12 -1],[600.919 12 0],[601.987 62 -1],[602.341 12 0],[603.66 50 -1],[605.381 42 -1],[607.278 13 -1],[608.8 5 0],[608.935 21 -1],[609.678 16 -1],[610.782 13 -1],[611.473 13 -1],[612.738 7.5 -1],[613.206 140 -1],[613.504 12 0],[613.843 15 0],[614.836 110 -1],[615.172 12 -1],[616.508 82 -1],[618.223 56 -1],[619.173 120 0],[619.982 59 -1],[621.796 45 -1],[622.259 30 0],[623.672 27 -1],[625.105 4.5 0],[627.501 12 -1],[629.546 6 -1],[631.62 2.4 -1],[633.81 2.4 -1],[635.948 1.5 -1],[636.987 1.5 -1],[640.201 7.5 0],[643.5 100 0],[643.718 2.4 0],[650.123 1.8 -1],[651.833 1.8 -1],[653.584 1.8 -1],[653.86 9 0],[655.384 1.2 -1],[655.739 7 0],[657.258 1.2 -1],[657.685 3.5 0],[658.487 2.3 0],[661.375 9.5 1],[662.249 1.4 0],[663.649 1.9 0],[665.061 4 0],[666.44 2.1 0],[668.758 15 0],[669.183 1.4 0],[669.475 0.7 0],[669.926 1.6 0],[670.071 7 0],[671.32 3.5 0],[673.599 4 0],[679.371 19 0],[679.541 7 1],[680.315 1.2 0],[681.516 2.1 0],[683.249 1.4 1],[684.524 4.5 0],[685.824 1.4 1],[688.722 2.9 0],[689.6 2.1 1],[690.826 0.9 0],[693.352 1.4 0],[695.031 2.4 0],[695.168 1 1],[695.804 1 0],[697.988 2.4 0],[700.897 1.3 0],[700.993 1 0],[703.518 1.9 0],[705.294 2.9 0],[705.428 1.3 0],[707.513 0.9 0],[712.792 1.1 0],[719.166 3.5 0],[719.593 1 0],[725.458 200 2],[726.417 3.5 1],[729.308 0.9 0],[733.062 0.9 0],[733.296 0.5 1],[734.646 5 0],[739.877 1.1 0],[745.03 2.9 1],[749.488 1.7 0],[753.671 0.7 0],[755.871 900 2],[756.313 3.5 0],[761.772 0.8 0],[762.294 1.9 0],[765.289 0.7 0],[768.949 0.5 0],[769.8 0.8 0],[771.989 1.9 0],[772.408 1.9 0],[778.842 1.3 0],[779.632 1.3 0],[780.252 0.6 0],[781.216 1.7 0],[785.552 2.9 0],[786.453 600 2],[788.19 11 1],[791.671 800 2],[798.941 40 2],[799.143 1000 2],[799.933 1 0],[817.141 800 2],[832.961 0.9 0],[834.443 2.4 0],[836.564 0.8 0],[845.036 1.7 0],[852.894 0.8 0],[864.509 400 2],[879.621 1000 2],[880.062 9.5 0],[883.585 1.9 1],[911.659 800 2]}{ALLx9900x990x1300x9900x90x400x140}{UVx9900x430x1300x9900x90x400x5}{VISx1200x990x1200x1000x0x0x140}{IVx1000x9.5x11x1000x0x0x0}%
@@ -80,10 +80,10 @@
\pgfspectra@elt@search{#1}{Ag}{[70.98 40 2],[71.385 40 2],[71.773 20 2],[71.853 40 2],[72.696 60 2],[73.004 70 2],[73.028 30 2],[73.083 5 1],[73.094 30 2],[73.657 40 2],[73.813 20 2],[74.098 40 2],[74.229 40 2],[74.83 40 2],[75.28 6 1],[75.573 30 2],[75.827 20 2],[76.719 40 2],[76.833 50 2],[76.961 30 2],[77.638 70 2],[78.291 40 2],[78.576 30 2],[78.908 40 2],[79.235 50 2],[79.654 40 2],[79.791 50 2],[79.941 80 2],[80.888 60 2],[81.612 30 2],[82.239 36 2],[83.811 40 2],[100.532 3 1],[106.549 2 1],[107.223 2.4 1],[107.422 50 1],[110.703 30 1],[111.246 30 1],[119.583 12 1],[122.333 10 1],[124.08 10 1],[124.687 10 1],[125.681 11 1],[125.755 11 1],[126.663 10 1],[127.367 14 1],[129.751 13 1],[131.12 17 1],[131.381 11 1],[131.461 10 1],[132.384 12 1],[134.209 12 1],[134.257 10 1],[134.662 14 1],[135.354 10 1],[136.45 30 1],[137.322 24 2],[137.476 24 2],[139.6 20 1],[140.493 22 2],[141.093 20 1],[141.39 24 2],[141.429 24 2],[141.972 18 1],[142.861 24 2],[143.26 19 1],[145.274 24 2],[145.641 40 2],[146.472 20 1],[146.623 10 1],[147.144 20 2],[148.901 60 2],[150.737 10 0],[151.508 30 2],[151.563 20 0],[152.423 20 2],[152.704 24 2],[154.114 30 2],[154.858 10 0],[155.089 30 2],[155.304 26 2],[155.516 20 1],[158.741 26 2],[158.928 24 2],[161.379 20 2],[161.914 26 2],[163.446 20 2],[164.45 20 1],[165.152 12 0],[165.21 10 0],[165.224 20 2],[165.36 26 2],[165.443 60 2],[165.618 140 2],[165.71 30 2],[166.154 20 2],[167.075 26 2],[167.614 30 2],[168.107 20 2],[168.282 24 1],[169.351 100 2],[170.506 40 2],[170.811 2 0],[170.886 30 2],[170.927 10 0],[171.768 26 2],[172.227 40 2],[172.676 30 2],[172.814 50 2],[173.644 25 1],[174.734 40 2],[174.964 24 2],[175.089 30 2],[175.103 150 2],[176.057 20 2],[176.262 30 2],[176.614 2 0],[176.87 30 2],[177.181 20 2],[178.385 20 2],[179.037 15 1],[179.17 20 2],[179.269 20 2],[179.39 30 2],[180.224 30 2],[180.226 30 2],[180.277 20 2],[180.823 60 2],[181.683 50 2],[182.245 30 2],[182.883 70 2],[183.233 50 2],[183.25 24 2],[183.431 20 2],[183.61 50 2],[183.864 30 2],[184.014 80 2],[184.696 20 2],[184.771 4 0],[184.993 24 2],[185.633 30 2],[185.891 24 2],[186.039 20 2],[186.064 20 2],[186.712 70 2],[186.81 30 2],[187.255 20 2],[187.345 80 2],[188.036 50 2],[188.957 60 2],[191.692 80 2],[191.708 120 2],[192.53 40 2],[194.632 30 2],[194.844 20 2],[195.762 140 2],[195.927 24 2],[196.086 20 2],[196.689 80 2],[196.738 20 1],[197.592 120 2],[197.703 100 2],[198.187 30 2],[198.702 40 2],[199.516 26 2],[200.024 120 2],[200.73 60 2],[201.149 40 2],[201.365 30 2],[201.596 30 1],[203.398 30 1],[204.133 30 2],[205.317 30 2],[205.383 30 2],[205.699 40 2],[206.117 40 0],[206.985 20 0],[208.104 40 2],[211.382 16 1],[214.56 12 1],[214.647 60 2],[214.919 30 2],[216.189 120 2],[216.621 30 2],[217 3 0],[218.676 10 1],[221.123 30 2],[222.953 12 1],[223.84 20 2],[224.643 20 1],[224.651 100 2],[224.874 15 1],[228.003 15 1],[228.65 20 2],[230.956 6 0],[231.004 140 2],[231.26 2 0],[231.705 14 1],[232.029 16 1],[232.468 14 1],[233.14 16 1],[235.792 14 1],[237.502 10 0],[238.685 20 2],[239.569 60 2],[241.141 15 1],[241.323 18 1],[243.781 20 1],[244.793 16 1],[246.962 20 2],[247.384 16 1],[250.663 12 1],[256.287 20 2],[257.563 10 0],[266.049 12 1],[272.177 12 0],[276.754 15 1],[282.439 20 0],[292.677 2 0],[293.842 4 0],[309.91 4 0],[313.002 6 0],[317.058 2 0],[318.07 18 1],[321.567 3 0],[322.515 2 0],[323.318 3 0],[326.735 20 1],[328.068 11000 0],[330.567 2 0],[338.289 5600 0],[340.378 2 0],[346.916 6 0],[347.582 14 1],[349.528 16 1],[350.192 4 0],[350.803 4 0],[351.338 3 0],[352.112 2 0],[354.261 10 0],[354.716 2 0],[355.701 2 0],[358.667 4 0],[362.349 2 0],[362.468 10 0],[368.246 15 1],[368.25 6 0],[368.334 16 1],[370.92 10 0],[372.742 2 0],[375.314 4 0],[381.094 40 0],[381.178 10 0],[384.074 20 0],[384.785 3 0],[390.741 10 0],[390.931 10 1],[391.44 10 0],[392.01 14 1],[392.801 2 0],[394.043 2 0],[394.297 2 0],[394.943 12 1],[398.158 20 0],[398.519 14 1],[399.215 2 0],[405.548 20 0],[408.343 2 0],[408.591 16 1],[418.548 20 1],[421.096 18 0],[421.282 20 0],[431.107 10 0],[439.623 4 0],[447.604 10 0],[455.6 4 0],[461.569 6 0],[462.004 16 1],[462.046 10 1],[466.848 12 0],[467.76 6 0],[478.84 20 1],[479.62 4 0],[484.782 6 0],[487.41 20 0],[488.821 4 0],[491.75 2 0],[493.575 2 0],[499.289 4 0],[502.735 16 1],[512.35 3 0],[520.908 200 0],[533.362 2 0],[546.55 200 0],[547.155 20 0],[547.538 4 0],[554.567 4 0],[555.958 2 0],[566.734 20 0],[608.378 2 0],[626.85 2 0],[662.108 4 0],[735.996 4 0],[768.778 64 0],[800.54 5 1],[825.47 3 1],[827.352 100 0],[832.44 4 1],[837.95 3 1],[840.38 5 1],[849.25 3 1],[864.57 6 0],[870.485 2 0],[874.76 2.4 1],[900.09 3 1],[1255.1 2 0],[1681.95 12 0],[1741.6699 4 0],[1830.79 3 0],[1838.2301 3 0]}{ALLx11000x11000x50x150x0x0x0}{UVx11000x11000x50x150x0x0x0}{VISx200x200x20x0x0x0x0}{IVx100x100x5x0x0x0x0}%
\pgfspectra@elt@search{#1}{Cd}{[42.701 50 3],[43.788 20 3],[44.785 50 3],[48.09 60 3],[48.949 10 3],[49.3 70 3],[49.513 70 3],[49.814 70 3],[49.853 70 3],[50.409 80 3],[50.42 70 3],[50.45 70 3],[50.631 80 3],[50.801 60 3],[50.895 50 3],[50.955 70 3],[50.981 25 3],[51.14 70 3],[51.3 80 3],[51.45 70 3],[51.942 60 3],[52.097 15 3],[52.441 80 3],[52.447 70 3],[52.477 50 3],[52.51 70 3],[52.519 60 3],[52.707 70 3],[53.079 50 3],[53.109 80 3],[53.151 80 3],[53.429 70 3],[53.677 70 3],[53.724 50 3],[54.09 60 3],[54.174 70 3],[54.26 80 3],[54.655 80 3],[54.801 40 3],[54.833 20 3],[54.89 15 3],[55.127 25 3],[55.29 20 3],[55.306 60 3],[55.405 80 3],[56.026 25 3],[56.416 10 3],[56.701 60 3],[67.739 8 2],[68.458 15 2],[72.07 10 2],[106.223 20 3],[111.816 150 3],[112.6 30 3],[113.408 20 3],[113.904 15 3],[115.464 20 3],[115.573 10 3],[116.465 100 3],[116.578 20 3],[116.73 40 3],[117.973 20 3],[118.307 15 3],[118.34 100 3],[119.413 40 3],[119.563 20 3],[119.647 30 3],[119.893 20 3],[121.538 15 3],[122.352 20 3],[124.606 20 3],[124.656 15 3],[124.994 15 3],[125.6 100 1],[126.647 30 3],[127.441 15 3],[128.563 20 3],[128.758 20 3],[129.643 150 1],[129.946 20 3],[130.436 40 3],[130.607 30 3],[131.689 15 3],[132.185 15 3],[132.555 20 3],[132.65 100 1],[134.097 30 3],[134.615 15 3],[135.478 30 3],[135.811 20 3],[136.255 30 3],[137.048 60 3],[137.091 150 1],[138.098 30 3],[138.36 5 2],[139.21 15 2],[139.678 10 2],[139.765 20 3],[140.368 30 3],[140.658 15 3],[141.628 25 2],[141.889 60 3],[142.029 5 2],[142.054 8 2],[142.983 15 3],[143.286 5 2],[144.608 20 2],[144.754 20 3],[144.755 25 2],[145.263 20 3],[145.574 30 2],[146.597 15 3],[146.614 8 2],[146.667 15 3],[147.197 5 2],[148.295 15 3],[149.179 20 3],[149.181 15 2],[151.101 5 2],[151.165 10 2],[151.313 5 2],[151.426 200 1],[152.355 10 2],[152.84 15 2],[152.93 30 2],[153.21 5 2],[154.517 50 2],[154.757 25 2],[155.007 10 2],[155.045 20 2],[155.089 15 2],[155.218 5 2],[155.648 5 2],[156.066 15 2],[156.603 5 2],[156.898 15 2],[157.02 20 3],[157.158 200 1],[158.239 10 2],[159.873 20 3],[160.042 20 3],[160.159 40 2],[160.487 20 2],[160.664 20 2],[160.728 10 2],[160.891 15 2],[160.961 10 2],[161.251 15 2],[162.287 15 3],[162.527 15 2],[162.854 25 2],[165.187 20 2],[165.563 25 2],[166.86 100 1],[167.815 30 2],[169.97 10 2],[170.247 50 1],[170.716 40 2],[172.193 10 2],[172.295 40 2],[172.441 50 1],[172.566 30 2],[173.9 25 2],[174.569 5 2],[174.767 40 2],[174.815 15 2],[176.882 30 2],[177.306 40 2],[178.584 100 1],[178.919 30 2],[179.34 75 2],[179.61 15 2],[180.057 5 2],[182.341 40 2],[182.77 100 1],[184.466 50 2],[185.113 40 2],[185.137 20 2],[185.585 40 2],[185.667 200 2],[187.408 150 2],[188.649 15 2],[190.348 15 2],[190.998 25 2],[191.057 15 2],[192.223 300 1],[193.959 10 2],[194.354 100 1],[196.554 40 1],[198.689 30 1],[198.881 15 2],[199.543 200 1],[200.06 20 2],[200.407 15 2],[200.749 100 1],[201.612 15 2],[203.245 50 1],[203.623 75 1],[203.983 40 2],[204.561 50 2],[206.125 10 2],[208.791 75 2],[209.6 150 1],[209.745 10 2],[210.047 5 2],[211.16 50 2],[214.441 1000 1],[215.506 50 1],[218.779 100 1],[218.813 5 2],[219.456 1000 1],[221.843 5 2],[222.443 5 2],[226.502 1000 1],[228.8022 1500 0],[231.277 1000 1],[232.107 200 1],[237.682 40 1],[241.824 7 2],[241.869 50 1],[242.636 10 2],[246.973 50 1],[248.793 40 1],[249.1 3 0],[249.558 40 1],[249.981 25 2],[250.891 10 0],[250.911 50 1],[251.622 30 1],[251.859 15 0],[252.5196 25 0],[254.4613 50 0],[255.198 50 1],[255.3465 25 0],[256.5789 3 0],[257.293 500 1],[258.0106 50 0],[258.487 3 0],[259.2026 30 0],[260.2048 25 0],[261.881 15 2],[262.8979 50 0],[263.056 5 2],[263.219 40 0],[263.942 75 0],[265.923 40 1],[266.0325 50 0],[266.82 25 1],[267.262 50 1],[267.754 100 0],[267.7748 25 0],[270.7 50 1],[271.2505 75 0],[273.382 50 0],[274.854 1000 1],[276.3894 100 0],[276.423 50 0],[276.699 20 2],[277.4958 50 0],[280.559 30 2],[282.319 30 1],[283.69 200 0],[285.646 25 1],[286.818 100 0],[288.0767 200 0],[288.1224 50 0],[291.467 200 1],[292.787 50 1],[292.927 200 1],[298.062 1000 0],[298.1362 200 0],[298.1845 50 0],[303.06 50 1],[303.572 10 2],[308.0822 150 0],[308.148 25 1],[308.2593 30 0],[309.234 100 1],[313.3167 200 0],[314.679 50 1],[325.033 150 1],[325.2524 300 0],[326.1055 300 0],[334.321 50 1],[338.549 50 1],[338.888 30 1],[340.3652 800 0],[341.749 50 1],[344.242 50 1],[346.443 100 1],[346.62 1000 0],[346.7655 800 0],[348.308 25 1],[349.544 150 1],[349.9952 25 0],[352.411 100 1],[353.569 100 1],[361.0508 1000 0],[361.2873 800 0],[361.4453 60 0],[364.9558 20 0],[398.1926 10 0],[402.912 100 1],[413.477 200 1],[414.149 50 1],[428.508 100 1],[430.6672 8 0],[441.241 100 1],[441.2989 3 0],[441.563 1000 1],[444.045 30 1],[466.2352 8 0],[467.8149 200 0],[474.469 30 1],[479.9912 300 0],[488.172 50 1],[502.55 50 1],[508.5822 1000 0],[515.466 6 0],[526.801 100 1],[527.16 100 1],[533.748 1000 1],[537.813 1000 1],[538.189 200 1],[584.33 40 1],[588.022 50 1],[609.9142 300 0],[611.149 100 0],[632.5166 100 0],[633.0013 30 0],[635.472 400 1],[635.998 500 1],[643.847 2000 0],[646.494 400 1],[656.765 25 1],[672.578 500 1],[675.919 100 1],[677.8116 30 0],[723.701 50 1],[728.438 100 1],[734.567 1000 0],[806.699 50 1],[820.0309 5 0],[929.2 20 0],[1165.5 15 0],[1449.1 35 0],[1571.2 80 0],[1912.5 55 0],[2437.8 25 0],[2545.5 35 0]}{ALLx2000x2000x1000x200x150x0x0}{UVx1500x1500x1000x200x150x0x0}{VISx2000x2000x1000x0x0x0x0}{IVx80x80x50x0x0x0x0}%
\pgfspectra@elt@search{#1}{In}{[36.867 3 4],[37.01 3 4],[37.282 5 4],[37.294 5 4],[37.495 1 4],[37.584 3 4],[37.607 3 4],[37.679 5 4],[37.861 8.5 4],[37.924 1.5 4],[38.027 4.5 4],[38.156 5.5 4],[38.214 4.5 4],[38.276 5.5 4],[38.305 5 4],[38.621 8.5 4],[38.67 5 4],[38.866 1.5 4],[38.891 7 4],[39.003 5.5 4],[39.092 5.5 4],[39.229 4.5 4],[39.246 4.5 4],[39.36 0.5 4],[39.389 12.5 4],[39.574 5.5 4],[39.773 1.5 4],[39.979 5 4],[40.005 4.5 4],[40.057 12.5 4],[40.239 12.5 4],[40.533 1.5 4],[40.728 4.5 4],[40.736 1.5 4],[40.795 4.5 4],[41.743 4.5 4],[41.845 1 4],[42.316 1 4],[67.733 4 3],[68.453 7.5 3],[68.531 3.5 2],[69.162 2.5 2],[72.064 4 3],[78.217 0.5 2],[88.224 5 2],[89.084 5 2],[91.587 5 2],[91.745 1 2],[92.683 2.5 2],[140.308 15 2],[143.485 15 2],[147.034 2 3],[148.77 10 2],[149.414 10 2],[151.262 2.5 3],[152.35 2.5 3],[152.478 5 2],[153.021 10 2],[153.203 3.5 3],[153.295 15 2],[156.892 4 3],[156.933 1.5 3],[160.15 6 3],[160.508 0.5 3],[160.659 3.5 3],[162.542 50 2],[162.848 5 3],[164.228 10 2],[164.8 1 0],[165.18 4 3],[165.562 5 3],[166.738 0.5 3],[167.064 2.5 3],[167.616 0.5 0],[167.807 6 3],[170.202 2 3],[170.253 10 2],[170.711 7.5 3],[171.154 2.5 0],[172.189 3.5 3],[174.123 1 0],[174.765 6 3],[174.81 5 3],[174.883 50 2],[175.849 0.5 0],[176.788 1 2],[176.877 5 3],[177.301 6 3],[178.915 4 3],[179.338 6 3],[181.071 0.5 2],[184.241 15 2],[184.467 6 3],[185.03 20 2],[185.11 4.5 3],[185.584 4.5 3],[185.664 7.5 3],[186.298 7.5 2],[187.408 7.5 3],[190.352 2.5 3],[193.958 2.5 3],[194.331 1.5 3],[200.473 3 3],[210.117 0.5 3],[210.389 5 1],[211.231 4 3],[215.408 15 2],[215.442 1 2],[216.688 5 1],[217.99 1 0],[218.24 1 0],[218.74 1 0],[219.084 1 0],[219.567 7.5 1],[219.741 1 0],[219.952 5 2],[220.224 1 0],[220.528 25 1],[221.114 1.5 0],[222.513 2 3],[223.07 2.5 0],[223.218 2.5 2],[224.166 1.5 0],[225.579 15 1],[225.999 5 0],[226.126 10 2],[226.626 2.5 2],[227.241 2.5 2],[227.284 2.5 2],[227.82 2.5 0],[228.164 20 1],[228.375 1 0],[229.833 1 0],[229.87 1 0],[230.09 5 2],[230.249 1 0],[230.605 50 1],[230.686 12.5 0],[230.932 1.5 0],[230.975 1 0],[231.321 45 1],[231.509 1 0],[232.34 15 1],[232.441 2.5 0],[232.492 1.5 0],[232.795 35 1],[233.276 1.5 0],[233.457 40 1],[234.019 5 0],[234.59 4 0],[234.656 2.5 0],[235.075 25 1],[235.87 2.5 0],[237.814 7.5 0],[237.9 5 0],[238.263 55 1],[238.954 20 0],[239.318 20 1],[239.918 5 0],[240.647 25 1],[240.876 25 1],[241.906 25 1],[241.92 25 1],[242.72 35 1],[242.986 10 0],[243.099 5 0],[243.273 25 1],[244.263 30 1],[244.79 50 1],[245.323 30 1],[246.008 30 0],[246.802 15 0],[248.615 35 1],[248.862 55 1],[248.895 45 1],[249.859 40 1],[249.96 50 1],[250.099 45 1],[250.816 30 1],[251.231 55 1],[252.137 50 0],[252.298 5 0],[252.741 50 2],[255.356 35 1],[255.444 80 1],[256.015 550 0],[256.513 35 1],[259.875 35 1],[260.176 100 0],[260.404 25 1],[265.47 45 1],[266.263 50 1],[266.865 70 1],[267.456 70 1],[268.312 40 1],[271.026 800 0],[271.394 150 0],[272.552 25 2],[272.615 40 2],[274.975 65 1],[275.388 350 0],[277.537 20 0],[279.876 30 1],[281.897 45 1],[283.692 90 0],[285.814 15 0],[286.568 40 1],[289.018 60 1],[293.263 550 0],[294.105 50 1],[295.701 10 0],[296.617 30 1],[298.28 50 2],[299.94 55 1],[300.808 50 2],[300.882 15 2],[303.936 4000 0],[305.115 4 0],[309.98 55 1],[310.18 90 1],[313.86 65 1],[314.275 40 1],[314.67 65 1],[315.577 75 1],[315.84 50 1],[317.63 45 1],[319.811 45 1],[325.609 6500 0],[325.856 1500 0],[329.355 15 2],[333.85 45 1],[335.091 4 2],[337.659 37.5 1],[340.428 50 1],[343.84 55 1],[356.232 2.5 2],[369.391 90 1],[370.813 47.5 1],[371.614 190 1],[371.83 60 1],[371.872 80 1],[372.34 80 1],[379.521 85 1],[379.921 115 1],[383.465 125 1],[384.218 100 1],[385.282 50 2],[388.978 50 1],[390.207 50 1],[392.212 30 1],[393.44 32.5 1],[396.235 125 1],[400.466 60 1],[401.392 70 1],[402.377 50 2],[403.232 75 2],[405.694 205 1],[406.23 25 2],[407.157 50 2],[407.293 50 2],[410.176 8500 0],[420.514 70 1],[421.304 50 1],[421.966 55 1],[425.268 50 2],[437.287 75 1],[450.078 75 1],[450.958 20 2],[451.131 9000 0],[454.901 55 1],[457.085 70 1],[457.802 90 1],[457.84 90 1],[461.608 70 1],[461.717 85 1],[462.014 125 1],[462.07 75 1],[462.73 85 1],[463.704 70 1],[463.816 190 1],[464.458 110 1],[465.562 180 1],[465.674 160 1],[468.111 95 1],[468.48 225 1],[487.837 1.5 0],[490.706 45 1],[492.493 35 1],[497.377 75 1],[510.936 40 1],[511.514 50 1],[511.74 70 1],[512.08 135 1],[512.175 100 1],[512.985 40 1],[517.542 120 1],[518.444 70 1],[524.877 100 2],[525.432 15 0],[526.274 6 0],[530.945 75 1],[541.141 40 1],[541.845 70 1],[543.67 110 1],[549.75 65 1],[550.708 70 1],[551.3 160 1],[552.328 125 1],[553.65 65 1],[555.545 95 1],[557.69 120 1],[563.67 100 1],[564.515 50 2],[570.85 80 1],[570.991 25 0],[572.18 50 1],[572.317 20 2],[572.768 25 0],[581.95 50 2],[585.315 105 1],[590.34 245 1],[591.54 130 1],[591.878 60 1],[606.29 65 1],[609.595 125 1],[610.866 105 1],[611.59 90 1],[612.87 115 1],[612.94 120 1],[613.21 160 1],[614 75 1],[614.323 45 1],[614.81 70 1],[614.95 95 1],[616.115 40 1],[616.245 90 1],[619.772 100 2],[622.428 50 1],[622.83 140 1],[623.11 70 1],[630.48 135 1],[636.23 145 1],[646.9 150 1],[654.12 105 1],[675.188 95 1],[676.59 90 1],[678.372 50 1],[684.744 4 0],[689.15 160 1],[690.013 2 0],[718.29 190 1],[725.5 90 1],[727.65 105 1],[730.34 90 1],[735.06 160 1],[763.27 50 1],[768.29 50 1],[774.07 105 1],[777.696 50 1],[778.9 90 1],[780.68 35 1],[781.45 35 1],[784.09 45 1],[805.078 10 0],[822.7 120 1],[823.866 15 0],[831.492 7.5 0],[843.455 25 1],[867.895 15 0],[868.263 10 0],[870.025 25 0],[881.35 50 1],[883.26 40 1],[889.447 20 0],[917.008 5 0],[919.77 60 1],[920.2 60 1],[921.3 110 1],[924.11 80 1],[934.983 20 0],[937.027 30 0],[942.799 10 0],[997.786 50 0],[1025.703 100 0],[1071.742 30 0],[1074.431 50 0],[1133.472 10 0],[1173.148 10 0],[1291.259 5 0],[1342.996 4.5 0],[1382.448 2.5 0],[1431.625 3 0],[1441.92 1.5 0],[1466.866 3 0],[1471.908 3.5 0],[1650.4311 1 0],[2229.1061 3 0],[2387.9131 3.5 0]}{ALLx9000x9000x245x100x7.5x12.5x0}{UVx6500x6500x190x50x7.5x12.5x0}{VISx9000x9000x245x100x0x0x0}{IVx120x100x120x0x0x0x0}%
-\pgfspectra@elt@search{#1}{Sn}{[1.6 7 1],[35.514 120 4],[36.101 150 4],[37.255 100 4],[60.523 50 3],[61.904 50 3],[62.873 50 3],[75.301 100 2],[76.062 50 2],[77.579 75 2],[78.468 50 2],[89.992 1 1],[90.822 50 3],[91.092 200 2],[91.74 2 1],[93.563 1 1],[94.583 3 1],[95.45 4 1],[95.625 500 3],[98.513 7 1],[99.721 4 1],[101.092 50 2],[101.626 2 1],[101.972 500 3],[104.078 4 1],[104.132 1 1],[104.449 1000 3],[104.884 50 2],[105.837 100 3],[105.859 50 3],[106.21 3 1],[107.341 1000 3],[108.75 200 3],[108.935 200 4],[109.692 300 3],[110.324 50 3],[110.819 8 1],[111.934 0 3],[112.068 200 3],[113.279 100 4],[113.929 1000 2],[115.833 1000 2],[115.905 4 1],[116.074 200 4],[116.109 200 2],[116.143 10 1],[116.158 100 2],[116.294 3 1],[117.626 100 4],[118.051 4 1],[118.062 100 2],[118.425 1000 2],[118.992 100 4],[118.999 200 2],[120.406 200 2],[120.572 100 4],[121.052 2000 2],[121.51 100 2],[121.814 100 2],[121.907 9 1],[122.37 13 1],[123.017 100 2],[123.138 100 2],[124.3 11 1],[124.363 500 2],[125.138 2000 4],[125.992 1000 2],[127.631 40 2],[128.381 100 4],[129.086 20 1],[129.436 200 4],[130.22 100 4],[130.597 1000 2],[131.455 1000 3],[131.659 20 1],[132.734 1000 2],[133.47 200 2],[134.605 200 2],[134.765 1000 2],[136.971 200 2],[138.674 1000 2],[140.052 25 1],[141.061 500 2],[143.752 1000 3],[144.977 200 2],[147.515 20 1],[148.922 9 1],[153.29 100 3],[157.036 1000 2],[167.429 50 2],[173.721 10 0],[175.146 15 0],[175.33 10 0],[175.8 7 1],[176.498 20 0],[177.34 20 0],[179.075 30 0],[180.46 80 0],[181.134 15 1],[181.171 500 2],[181.304 30 0],[181.574 40 0],[181.931 25 0],[182.3 120 0],[183.189 9 1],[184.875 50 0],[185.2 30 0],[186.032 200 0],[186.142 20 0],[186.552 20 0],[186.596 30 0],[187.329 15 0],[188.264 30 0],[188.605 80 0],[189.14 100 0],[189.729 20 0],[189.991 12 1],[190.93 50 0],[191.161 40 0],[191.352 20 0],[192.531 80 0],[192.677 20 0],[192.795 15 0],[192.89 40 0],[193.317 25 0],[194.186 500 2],[194.269 20 0],[195.215 150 0],[195.552 50 2],[196.021 15 0],[197.146 30 0],[197.76 50 0],[198.42 80 0],[199.188 15 0],[199.498 20 0],[200.805 25 0],[201.576 30 0],[202.698 30 0],[204.066 50 0],[204.09 20 0],[205.403 50 0],[205.831 70 0],[206.4 20 0],[206.858 80 0],[207.289 100 0],[207.308 100 0],[208.062 25 0],[209.158 30 0],[209.435 40 0],[209.639 200 0],[210.093 100 0],[211.393 100 0],[212.126 50 0],[214.073 25 0],[214.143 20 0],[214.846 15 0],[214.863 1 1],[214.873 40 0],[215.143 20 0],[215.154 30 1],[217.132 80 0],[219.449 150 0],[219.934 300 0],[220.965 400 0],[220.967 4 1],[221.105 40 0],[223.172 80 0],[224.605 400 0],[224.607 6 1],[225.117 60 0],[226.719 30 0],[226.891 400 0],[228.226 20 0],[228.668 200 0],[231.723 600 0],[233.48 300 0],[235.484 1000 0],[235.79 20 0],[236.034 3 1],[236.833 22 1],[238.072 60 0],[238.454 4 1],[240.815 100 0],[242.17 800 0],[242.949 1000 0],[243.352 1 1],[244.898 15 1],[245.524 60 0],[247.64 20 0],[248.339 300 0],[248.348 13 1],[248.699 10 1],[249.57 200 0],[252.261 5 1],[252.392 90 0],[253.117 80 0],[254.655 400 0],[255.801 40 0],[257.158 500 0],[259.442 200 0],[263.694 50 0],[266.124 200 0],[266.493 2 1],[270.651 700 0],[272.782 2 1],[276.178 20 0],[277.981 150 0],[278.503 80 0],[278.796 60 0],[281.259 60 0],[281.358 80 0],[282.552 2 1],[283.999 1400 0],[284.642 1 1],[285.062 200 0],[286.332 1000 0],[291.28 1 1],[291.354 200 0],[291.982 6 1],[299.1 3 1],[299.444 7 1],[300.914 700 0],[301.218 1 1],[302.394 8 1],[303.28 200 0],[303.412 850 0],[304.75 12 1],[309.469 6 1],[314.184 60 0],[317.505 550 0],[321.871 40 0],[326.234 550 0],[328.321 50 1],[333.062 110 0],[335.197 60 1],[340.748 2 1],[347.246 10 1],[353.757 7 1],[357.545 11 1],[358.239 3 1],[362.008 2 1],[362.054 6 1],[365.578 40 0],[371.523 6 1],[380.102 280 0],[384.144 4 1],[429.465 1 1],[452.474 40 0],[457.913 1 1],[458.029 1 1],[487.722 2 1],[494.431 3 1],[497.973 20 0],[507.114 2 1],[507.267 2 1],[517.454 20 0],[533.236 10 1],[556.195 20 1],[558.892 25 1],[559.62 2 1],[563.171 500 0],[575.359 15 0],[579.72 1 1],[579.918 15 1],[592.544 50 0],[597.03 100 0],[603.77 150 0],[605.486 200 -1],[606.9 250 0],[607.346 100 0],[607.748 6 1],[607.97 5 1],[614.971 400 0],[615.46 200 0],[617.15 150 0],[631.078 100 0],[635.435 40 0],[645.35 70 1],[676.145 8 1],[684.405 25 1],[719.14 20 1],[738.779 10 1],[739.86 20 0],[740.862 1 1],[768.53 30 0],[774.18 13 1],[775.497 100 0],[790.4 3 1],[803.05 100 0],[803.93 30 0],[811.409 200 0],[812.1 30 0],[834.935 30 0],[835.704 80 0],[842.272 300 0],[855.26 400 0],[868.17 50 0],[901.895 30 0],[941.086 50 0],[941.537 80 0],[961.64 150 0],[974.11 50 0],[974.28 100 0],[980.538 300 0],[985.052 500 0],[1045.647 25 0],[1080.758 11 0],[1089.4 54 0],[1119.185 70 0],[1127.766 56 0],[1133.697 17 0],[1145.459 200 0],[1161.626 200 0],[1167.077 76 0],[1169.445 25 0],[1173.978 258 0],[1182.518 96 0],[1183.582 106 0],[1193.299 254 0],[1200.95 48 0],[1231.324 111 0],[1233.56 33 0],[1253.087 42 0],[1253.65 42 0],[1278.82 37 0],[1288.85 89 0],[1298.17 187 0],[1300.03 20 0],[1301.85 187 0],[1308.15 68 0],[1346.02 378 0],[1360.82 144 0],[1501.82 13 0],[1546.42 30 0],[1700.05 20 0],[1780.75 10 0],[2062.2199 20 0],[2086.1699 40 0],[2168.6199 8 0],[2213.1699 4 0],[2299.7199 3 0],[2432.7199 4 0],[2473.8199 4 0]}{ALLx2000x1400x70x2000x1000x2000x200}{UVx2000x1400x60x2000x1000x2000x0}{VISx500x500x70x0x0x0x200}{IVx500x500x3x0x0x0x0}%
+\pgfspectra@elt@search{#1}{Sn}{[35.514 120 4],[36.101 150 4],[37.255 100 4],[60.523 50 3],[61.904 50 3],[62.873 50 3],[75.301 100 2],[76.062 50 2],[77.579 75 2],[78.468 50 2],[89.992 1 1],[90.822 50 3],[91.092 200 2],[91.74 2 1],[93.563 1 1],[94.583 3 1],[95.45 4 1],[95.625 500 3],[98.513 7 1],[99.721 4 1],[101.092 50 2],[101.626 2 1],[101.972 500 3],[104.078 4 1],[104.132 1 1],[104.449 1000 3],[104.884 50 2],[105.837 100 3],[105.859 50 3],[106.21 3 1],[107.341 1000 3],[108.75 200 3],[108.935 200 4],[109.692 300 3],[110.324 50 3],[110.819 8 1],[111.934 0 3],[112.068 200 3],[113.279 100 4],[113.929 1000 2],[115.833 1000 2],[115.905 4 1],[116.074 200 4],[116.109 200 2],[116.143 10 1],[116.158 100 2],[116.294 3 1],[117.626 100 4],[118.051 4 1],[118.062 100 2],[118.425 1000 2],[118.992 100 4],[118.999 200 2],[120.406 200 2],[120.572 100 4],[121.052 2000 2],[121.51 100 2],[121.814 100 2],[121.907 9 1],[122.37 13 1],[123.017 100 2],[123.138 100 2],[124.3 11 1],[124.363 500 2],[125.138 2000 4],[125.992 1000 2],[127.631 40 2],[128.381 100 4],[129.086 20 1],[129.436 200 4],[130.22 100 4],[130.597 1000 2],[131.455 1000 3],[131.659 20 1],[132.734 1000 2],[133.47 200 2],[134.605 200 2],[134.765 1000 2],[136.971 200 2],[138.674 1000 2],[140.052 25 1],[141.061 500 2],[143.752 1000 3],[144.977 200 2],[147.515 20 1],[148.922 9 1],[153.29 100 3],[157.036 1000 2],[167.429 50 2],[173.721 10 0],[175.146 15 0],[175.33 10 0],[175.8 7 1],[176.498 20 0],[177.34 20 0],[179.075 30 0],[180.46 80 0],[181.134 15 1],[181.171 500 2],[181.304 30 0],[181.574 40 0],[181.931 25 0],[182.3 120 0],[183.189 9 1],[184.875 50 0],[185.2 30 0],[186.032 200 0],[186.142 20 0],[186.552 20 0],[186.596 30 0],[187.329 15 0],[188.264 30 0],[188.605 80 0],[189.14 100 0],[189.729 20 0],[189.991 12 1],[190.93 50 0],[191.161 40 0],[191.352 20 0],[192.531 80 0],[192.677 20 0],[192.795 15 0],[192.89 40 0],[193.317 25 0],[194.186 500 2],[194.269 20 0],[195.215 150 0],[195.552 50 2],[196.021 15 0],[197.146 30 0],[197.76 50 0],[198.42 80 0],[199.188 15 0],[199.498 20 0],[200.805 25 0],[201.576 30 0],[202.698 30 0],[204.066 50 0],[204.09 20 0],[205.403 50 0],[205.831 70 0],[206.4 20 0],[206.858 80 0],[207.289 100 0],[207.308 100 0],[208.062 25 0],[209.158 30 0],[209.435 40 0],[209.639 200 0],[210.093 100 0],[211.393 100 0],[212.126 50 0],[214.073 25 0],[214.143 20 0],[214.846 15 0],[214.863 1 1],[214.873 40 0],[215.143 20 0],[215.154 30 1],[217.132 80 0],[219.449 150 0],[219.934 300 0],[220.965 400 0],[220.967 4 1],[221.105 40 0],[223.172 80 0],[224.605 400 0],[224.607 6 1],[225.117 60 0],[226.719 30 0],[226.891 400 0],[228.226 20 0],[228.668 200 0],[231.723 600 0],[233.48 300 0],[235.484 1000 0],[235.79 20 0],[236.034 3 1],[236.833 22 1],[238.072 60 0],[238.454 4 1],[240.815 100 0],[242.17 800 0],[242.949 1000 0],[243.352 1 1],[244.898 15 1],[245.524 60 0],[247.64 20 0],[248.339 300 0],[248.348 13 1],[248.699 10 1],[249.57 200 0],[252.261 5 1],[252.392 90 0],[253.117 80 0],[254.655 400 0],[255.801 40 0],[257.158 500 0],[259.442 200 0],[263.694 50 0],[266.124 200 0],[266.493 2 1],[270.651 700 0],[272.782 2 1],[276.178 20 0],[277.981 150 0],[278.503 80 0],[278.796 60 0],[281.259 60 0],[281.358 80 0],[282.552 2 1],[283.999 1400 0],[284.642 1 1],[285.062 200 0],[286.332 1000 0],[291.28 1 1],[291.354 200 0],[291.982 6 1],[299.1 3 1],[299.444 7 1],[300.914 700 0],[301.218 1 1],[302.394 8 1],[303.28 200 0],[303.412 850 0],[304.75 12 1],[309.469 6 1],[314.184 60 0],[317.505 550 0],[321.871 40 0],[326.234 550 0],[328.321 50 1],[333.062 110 0],[335.197 60 1],[340.748 2 1],[347.246 10 1],[353.757 7 1],[357.545 11 1],[358.239 3 1],[362.008 2 1],[362.054 6 1],[365.578 40 0],[371.523 6 1],[380.102 280 0],[384.144 4 1],[429.465 1 1],[452.474 40 0],[457.913 1 1],[458.029 1 1],[487.722 2 1],[494.431 3 1],[497.973 20 0],[507.114 2 1],[507.267 2 1],[517.454 20 0],[533.236 10 1],[556.195 20 1],[558.892 25 1],[559.62 2 1],[563.171 500 0],[575.359 15 0],[579.72 1 1],[579.918 15 1],[592.544 50 0],[597.03 100 0],[603.77 150 0],[605.486 200 -1],[606.9 250 0],[607.346 100 0],[607.748 6 1],[607.97 5 1],[614.971 400 0],[615.46 200 0],[617.15 150 0],[631.078 100 0],[635.435 40 0],[645.35 70 1],[676.145 8 1],[684.405 25 1],[719.14 20 1],[738.779 10 1],[739.86 20 0],[740.862 1 1],[768.53 30 0],[774.18 13 1],[775.497 100 0],[790.4 3 1],[803.05 100 0],[803.93 30 0],[811.409 200 0],[812.1 30 0],[834.935 30 0],[835.704 80 0],[842.272 300 0],[855.26 400 0],[868.17 50 0],[901.895 30 0],[941.086 50 0],[941.537 80 0],[961.64 150 0],[974.11 50 0],[974.28 100 0],[980.538 300 0],[985.052 500 0],[1045.647 25 0],[1080.758 11 0],[1089.4 54 0],[1119.185 70 0],[1127.766 56 0],[1133.697 17 0],[1145.459 200 0],[1161.626 200 0],[1167.077 76 0],[1169.445 25 0],[1173.978 258 0],[1182.518 96 0],[1183.582 106 0],[1193.299 254 0],[1200.95 48 0],[1231.324 111 0],[1233.56 33 0],[1253.087 42 0],[1253.65 42 0],[1278.82 37 0],[1288.85 89 0],[1298.17 187 0],[1300.03 20 0],[1301.85 187 0],[1308.15 68 0],[1346.02 378 0],[1360.82 144 0],[1501.82 13 0],[1546.42 30 0],[1700.05 20 0],[1780.75 10 0],[2062.2199 20 0],[2086.1699 40 0],[2168.6199 8 0],[2213.1699 4 0],[2299.7199 3 0],[2432.7199 4 0],[2473.8199 4 0]}{ALLx2000x1400x70x2000x1000x2000x200}{UVx2000x1400x60x2000x1000x2000x0}{VISx500x500x70x0x0x0x200}{IVx500x500x3x0x0x0x0}%[1.6 7 1],
\pgfspectra@elt@search{#1}{Sb}{[69.118 10 2],[69.12 1 1],[69.869 10 2],[69.922 3 4],[72.286 15 2],[72.481 8 2],[73.233 15 2],[74.606 1 4],[76.443 1 1],[81.485 1 1],[83.1 6 4],[84.939 1 1],[85.508 2 1],[87.684 4 1],[89.802 1 4],[92.107 4 1],[98.357 6 1],[99.962 15 2],[100.113 6 1],[100.943 6 1],[101.194 40 2],[105.221 6 1],[105.627 8 1],[105.658 10 2],[105.732 8 1],[106.59 40 2],[106.993 20 2],[107.043 20 2],[107.376 5 2],[107.381 6 1],[107.582 30 2],[107.81 5 2],[108.406 20 2],[109.834 10 2],[110.432 8 4],[113.543 10 2],[115.149 30 2],[115.774 40 2],[116.696 12 2],[120.52 50 2],[121.064 50 2],[122.6 12 4],[123.03 6 1],[127.498 8 1],[130.669 20 2],[132.74 8 1],[135.804 6 1],[137.958 8 2],[138.47 8 1],[140.418 20 2],[140.783 6 1],[142.957 10 2],[143.076 10 0],[143.649 8 1],[146.419 10 0],[148.657 20 0],[149.136 40 0],[150.57 12 4],[151.257 50 0],[152.447 12 4],[153.274 120 0],[153.506 80 0],[156.551 6 1],[157.611 8 1],[158.136 7 1],[159.996 80 0],[160.698 10 1],[161.28 200 0],[162.33 100 0],[165.12 50 0],[165.704 20 1],[166.26 100 0],[167.389 15 2],[169.885 50 0],[171.023 3 2],[171.184 15 2],[171.693 80 0],[171.745 150 0],[172.343 150 0],[172.533 15 2],[173.619 100 0],[173.643 8 1],[175.779 50 0],[176.23 12 2],[176.576 100 0],[178.087 100 0],[178.824 100 0],[180.018 150 0],[181.05 50 0],[181.42 80 0],[182.95 100 0],[183.932 12 2],[185.889 60 0],[186.817 50 0],[187.115 300 0],[188.256 150 0],[189.128 70 0],[189.939 70 0],[192.708 100 0],[194.613 10 2],[195.039 200 0],[196.43 80 0],[198.605 60 0],[199.06 6 1],[202.4 50 0],[202.949 60 0],[203.977 70 0],[204.957 150 0],[205.41 3 2],[206.343 50 0],[206.833 1000 0],[207.956 100 0],[209.185 2 2],[209.841 50 0],[211.848 80 0],[212.7 5 2],[212.739 100 0],[213.705 50 0],[213.969 100 0],[214.18 10 1],[214.183 50 0],[214.486 100 0],[215.891 50 0],[217.581 1500 0],[217.919 250 0],[217.925 6 1],[220.132 200 0],[220.845 300 0],[220.85 6 1],[222.073 150 0],[222.198 100 0],[222.493 120 0],[222.515 6 1],[226.251 300 0],[228.898 120 0],[229.344 150 0],[230.646 300 0],[231.147 2500 0],[231.589 150 0],[237.367 400 0],[238.364 300 0],[239.522 100 0],[242.213 150 0],[242.635 250 0],[244.551 400 0],[247.832 400 0],[248.044 150 0],[248.046 8 1],[250.771 5 2],[251.054 100 0],[252.852 2000 0],[252.854 15 1],[256.775 10 1],[257.406 150 0],[259.013 15 2],[259.805 1500 0],[259.809 500 0],[261.231 300 0],[261.42 1 2],[261.717 12 2],[261.763 1 2],[265.26 200 0],[265.655 12 1],[266.939 20 2],[267.064 300 0],[268.276 200 0],[269.225 120 0],[271.89 150 0],[276.995 400 0],[278.587 5 2],[279.027 20 2],[285.109 12 1],[285.111 100 0],[287.792 1000 0],[296.61 12 1],[298.096 15 1],[302.983 500 0],[303.401 12 1],[304.067 12 1],[323.252 600 0],[324.128 20 1],[326.751 700 0],[333.661 20 2],[338.309 12 1],[338.315 100 0],[349.846 15 1],[350.407 50 2],[351.906 15 2],[352.047 12 1],[353.345 15 2],[355.918 40 2],[356.625 40 2],[363.78 25 1],[363.783 250 0],[372.278 20 1],[372.279 200 0],[373.89 30 2],[385.022 20 1],[403.355 200 0],[403.356 20 1],[413.363 20 1],[414.054 15 1],[419.517 15 1],[421.907 20 1],[426.509 40 2],[431.432 20 1],[434.483 12 1],[435.216 50 2],[441.142 12 1],[444.648 12 1],[450.692 12 1],[451.45 15 1],[459.189 30 2],[459.69 30 1],[459.909 20 1],[460.477 15 1],[464.732 30 1],[467.574 20 1],[469.291 30 2],[471.126 40 1],[473.544 12 1],[475.781 20 1],[476.536 20 1],[476.691 12 1],[478.403 30 1],[480.201 20 1],[483.282 20 1],[487.724 20 1],[494.74 15 1],[504.456 15 1],[516.632 12 1],[517.655 15 1],[523.894 20 1],[524.771 1 2],[535.424 20 1],[546.408 15 1],[549.032 30 0],[555.61 40 0],[556.813 15 1],[560.219 30 0],[563.202 100 0],[563.975 30 1],[569.08 1 2],[571.73 1 2],[583.034 60 0],[584.55 3 2],[589.509 15 1],[600.521 100 1],[605.341 20 1],[607.98 30 1],[613.004 50 1],[615.494 20 1],[624.67 5 2],[628.76 3 2],[630.276 12 1],[661.149 20 0],[664.744 30 1],[668.801 15 1],[680.667 6 1],[764.828 30 0],[784.444 80 0],[792.465 200 0],[796.955 40 0],[841.169 60 0],[857.264 150 0],[861.955 100 0],[868.27 30 0],[913.221 30 0],[951.868 400 0],[986.678 30 0],[994.914 400 0],[1007.849 200 0],[1026.101 300 0],[1036.433 50 0],[1048.83 50 0],[1058.56 200 0],[1067.741 1000 0],[1074.194 800 0],[1079.411 80 0],[1083.973 600 0],[1086.858 200 0],[1087.955 400 0],[1101.279 300 0],[1107.995 40 0],[1108.498 30 0],[1110.484 50 0],[1110.852 50 0],[1118.961 30 0],[1126.623 150 0],[1186.337 30 0],[1195.77 1 0],[1211.606 5 0],[1227.66 2 0],[1246.675 2 0]}{ALLx2500x2500x100x50x0x12x0}{UVx2500x2500x25x50x0x12x0}{VISx200x200x100x50x0x0x0}{IVx1000x1000x0x0x0x0x0}%
\pgfspectra@elt@search{#1}{Te}{[79.96 3 1],[80.228 4 1],[94.262 3 1],[100.373 3 1],[100.78 3 1],[101.427 2.5 1],[102.279 2.5 1],[105.7 3 1],[105.951 4 1],[106.886 3 1],[107.766 4 1],[109.011 3 1],[114.404 3 1],[115.31 2.5 1],[116.142 5 1],[117.434 5 1],[117.579 6 1],[120.854 4.5 1],[121.3 2.5 1],[122.098 4.5 1],[125.362 4.5 1],[127.052 4.5 1],[127.476 3.5 1],[130.653 4 1],[132.492 5 1],[133.642 3.5 1],[134.52 3.5 1],[136.324 4.5 1],[136.673 4 1],[137.48 5 1],[139.522 3 1],[143.952 3 1],[146.525 3 1],[148.956 3.5 1],[160.799 4 1],[160.841 5 1],[161.315 5 1],[163.891 3 1],[165.54 2.5 0],[168.85 2.5 0],[170 3 0],[170.158 3 1],[170.8 2.5 0],[175.1 3 0],[175.94 2.5 0],[177.5 2.5 0],[179.57 3 0],[179.63 3 0],[182.24 5 0],[182.55 3 0],[185.06 3 0],[185.21 3 0],[185.38 3 0],[185.72 4 0],[186.04 3 0],[196.288 1.5 1],[199.483 3.5 0],[200.02 3 0],[200.202 13000 0],[207.09 4 0],[208.116 3250 0],[214.281 9000 0],[214.725 1600 0],[215.985 180 0],[220.874 4.5 0],[225.549 5 0],[225.902 250 0],[226.552 5 0],[237.306 10 1],[238.326 600 0],[238.578 750 0],[238.782 10 1],[240.163 5 1],[243.647 5 1],[243.869 25 1],[253.072 60 0],[256.782 10 1],[257.496 5 1],[257.61 2.5 1],[257.924 3.5 1],[259.112 5 1],[259.285 5 1],[260.572 5 1],[262.192 2.5 1],[262.486 5 1],[262.796 10 1],[264.189 10 1],[264.848 10 1],[264.966 50 1],[265.77 20 1],[266.11 40 1],[267.713 55 0],[271.158 10 1],[276.965 3 0],[284.117 5 1],[284.615 5 1],[285.829 50 1],[286.1 10 1],[286.882 20 1],[289.541 75 1],[291.989 15 1],[294.211 25 1],[294.668 25 1],[296.729 35 1],[297.367 10 1],[297.59 25 1],[299.704 7.5 1],[301.202 7.5 1],[301.758 25 1],[302.331 10 1],[304.7 35 1],[305.246 10 1],[306.316 5 1],[307.356 7.5 1],[310.444 4 1],[313.258 5 1],[316.066 10 1],[317.514 50 0],[318.983 5 1],[321.121 2.5 1],[325.68 30 1],[326.877 15 1],[328.263 15 1],[332.192 20 1],[332.311 20 1],[332.922 30 1],[335.21 30 1],[336.279 30 1],[337.41 12.5 1],[340.679 75 1],[341.963 10 1],[344.225 25 1],[345.512 20 1],[345.688 10 1],[348.032 10 1],[348.367 20 1],[348.611 10 1],[352.111 25 1],[355.219 25 1],[361.178 50 1],[361.757 25 1],[364.446 20 1],[367.926 10 1],[372.566 15 1],[379.722 20 1],[380.092 10 1],[390.567 10 1],[391.854 10 1],[393.149 15 1],[394.798 10 1],[396.922 20 1],[397.594 12.5 1],[398.177 10 1],[400.652 25 1],[401.169 10 1],[402.973 15 1],[404.717 20 1],[404.888 15 1],[407.348 7.5 1],[410.104 15 1],[412.732 35 1],[416.355 15 1],[416.977 50 1],[417.929 15 1],[421.131 12.5 1],[422.573 40 1],[424.647 15 1],[425.115 10 1],[426.111 50 1],[426.436 15 1],[427.343 30 1],[428.585 40 1],[432.09 20 1],[436.128 15 1],[436.4 75 1],[437.712 15 1],[438.51 37.5 1],[439.6 30 1],[447.863 85 1],[453.707 40 1],[455.778 50 1],[463.062 35 1],[464.112 50 1],[465.437 90 1],[468.691 100 1],[469.638 50 1],[470.653 50 1],[476.605 50 1],[477.156 35 1],[478.487 50 1],[482.714 50 1],[483.128 75 1],[484.29 75 1],[486.512 65 1],[486.624 100 1],[488.522 40 1],[490.444 40 1],[496.188 30 1],[500.082 30 1],[508.3 4 0],[514.87 3.5 0],[544.984 25 1],[548.795 25 1],[557.635 75 1],[564.926 75 1],[566.62 50 1],[570.812 100 1],[573.35 3.5 0],[575.585 75 1],[578.91 4 0],[593.615 25 1],[597.468 50 1],[627.35 4 0],[634.97 4 0],[636.713 25 1],[640.59 4 0],[645.67 3.5 0],[661.34 4 0],[664.858 5 1],[666.02 4 0],[669 4 0],[679 5 0],[683.76 10 0],[685.47 10 0],[701.606 5 1],[703.913 5 1],[719.11 7.5 0],[723.662 5 1],[726.35 10 0],[728.09 4 0],[728.926 5 1],[744.539 5 1],[746.098 6 1],[746.875 7.5 1],[748.126 5 1],[755.68 5 0],[768.861 3 1],[775.91 7.5 0],[781.879 4 1],[786.161 4 1],[792.169 7.5 1],[794.314 7.5 1],[795.034 5 1],[797.29 10 0],[805.615 3 1],[806.14 15 0],[808.25 5 0],[812.244 5 1],[813.039 4 1],[815.447 4 1],[818.644 10 1],[819.094 3 1],[825.15 5 0],[827.353 7.5 1],[827.66 5 0],[829.11 5 0],[835.58 7.5 0],[837.212 5 1],[846.98 3.5 0],[849.22 4 0],[850.08 4 0],[852.14 6 0],[853.568 5 1],[857.578 6 1],[860.463 5 1],[862.168 4 1],[863.21 3.5 0],[867.295 7.5 1],[870.109 6 0],[873.381 5 1],[875.818 102.5 0],[883.152 6 0],[885.115 9 0],[889.792 3 1],[900.437 40.5 0],[904.339 9 0],[919.68 6 0],[920.678 7.5 0],[920.764 8.5 0],[946.9 6 0],[972.274 2830 0],[978.554 92.5 0],[984.23 54.5 0],[986.892 266 0],[990.261 59 0],[995.63 344.5 0],[995.993 18.5 0],[997.713 162.5 0],[997.931 68 0],[998.585 22.5 0],[1005.141 2975 0],[1009.101 2048.5 0],[1009.957 52 0],[1010.605 139.5 0],[1011.808 190.5 0],[1015.106 148 0],[1030.056 198.5 0],[1032.305 102.5 0],[1049.357 372.5 0],[1050.986 98.5 0],[1091.834 940 0],[1100.78 149 0],[1108.956 5100 0],[1116.374 254 0],[1148.723 3310 0],[1197.896 140 0],[1256.624 94 0],[1258.919 194.5 0],[1280.55 80.5 0],[1310.418 200 0],[1324.775 790 0],[1331.663 241.5 0],[1403.709 108.5 0],[1407.253 72 0],[1433.574 217 0],[1441.746 110 0],[1451.351 525 0],[1455.468 64.5 0],[1545.245 740 0],[1554.623 1215 0],[1640.39 1880 0],[1730.3539 980 0],[1829.159 1390 0],[1877.7301 197 0],[1962.352 134.5 0],[2014.7539 119.5 0],[2104.373 510 0],[2160.25 232 0],[2179.9641 18.5 0],[2255.5289 37 0],[2275.566 24 0],[2329.4939 13.5 0],[2397.8699 8.5 0],[2405.9039 12.5 0],[2642.8619 6.5 0],[2653.917 19 0],[2655.374 7.5 0],[2717.926 3.5 0]}{ALLx13000x13000x100x0x0x0x0}{UVx13000x13000x75x0x0x0x0}{VISx100x10x100x0x0x0x0}{IVx5100x5100x10x0x0x0x0}%
-\pgfspectra@elt@search{#1}{I}{[36.378 3 4],[38.074 3.6 4],[56.553 4.5 4],[60.186 0.5 3],[60.757 5 4],[61.246 0.6 3],[61.517 0.4 3],[65.422 0.4 3],[65.456 0.4 3],[65.58 0.2 1],[65.9 0.6 1],[66.398 0.8 1],[66.452 0.8 1],[66.506 0.8 1],[66.57 15 1],[66.681 0.6 2],[70.511 0.8 2],[71.955 100 1],[72.298 100 1],[78.464 0.7 2],[78.48 0.7 2],[79.552 0.8 2],[79.816 100 1],[83.41 120 1],[84.78 60 1],[86.597 0.5 2],[87.349 150 1],[87.594 100 1],[87.984 200 1],[88.188 150 1],[89.1 100 1],[89.317 100 1],[91.928 0.7 3],[92.038 0.5 2],[96.117 0.6 2],[100.057 120 1],[100.335 100 1],[101.858 400 1],[103.466 1000 1],[105.474 150 1],[106.634 200 1],[107.521 300 1],[107.858 0.6 2],[109.42 0.8 2],[110.5 500 1],[111.116 250 1],[111.722 150 1],[112.525 350 1],[113.15 200 1],[113.975 120 1],[113.98 1000 1],[115.467 150 1],[115.987 100 1],[116.056 1000 1],[116.648 2000 1],[116.705 150 1],[117.584 500 1],[117.865 1000 1],[118.734 1500 1],[119.085 1000 1],[119.529 1.5 0],[119.888 500 1],[120.022 700 1],[121.841 20 0],[122.089 2000 1],[122.405 60 0],[122.408 60 0],[122.889 50 0],[123.406 2000 1],[124.466 0.4 2],[125.134 60 0],[125.235 0.8 2],[125.915 250 0],[125.951 300 0],[126.127 80 0],[126.757 60 0],[126.76 60 0],[127.526 150 0],[128.94 300 0],[130.034 1000 0],[130.298 300 0],[130.693 0.5 2],[131.395 300 0],[131.754 300 0],[133.019 200 0],[133.652 2000 1],[135.51 500 0],[135.797 300 0],[136.097 500 0],[136.111 300 0],[136.771 250 0],[136.822 250 0],[138.323 400 0],[139.075 300 0],[139.29 200 0],[140.001 200 0],[142.549 800 0],[144.626 500 0],[145.318 500 0],[145.739 500 0],[145.747 500 0],[145.798 1000 0],[145.879 250 0],[145.915 400 0],[146.583 250 0],[148.592 100 0],[149.289 500 0],[150.704 500 0],[151.468 500 0],[151.805 1500 0],[152.645 250 0],[159.358 500 0],[161.76 500 0],[164.078 250 0],[170.207 1500 0],[178.276 1200 0],[179.909 500 0],[183.038 7500 0],[184.445 1500 0],[206.163 200 0],[222.443 0.1 2],[223.812 0.1 2],[224.93 0.5 3],[224.931 0.3 2],[230.938 0.2 2],[234.084 0.4 3],[234.085 0.3 2],[235.043 0.3 2],[235.346 0.2 2],[236.113 0.7 3],[236.774 0.4 2],[236.775 0.5 3],[237.145 0.2 2],[237.245 0.3 2],[237.245 0.6 3],[237.646 0.7 3],[237.647 0.4 2],[238.528 0.4 3],[238.711 0.8 3],[238.712 0.4 2],[239.2 0.6 3],[239.201 0.3 2],[240.305 0.4 3],[240.306 0.2 2],[240.363 0.2 2],[240.801 10 1],[241.485 0.2 2],[241.845 0.2 3],[241.849 0.2 2],[241.885 0.2 2],[241.918 10 1],[242.389 0.3 3],[242.391 0.2 2],[242.61 0.9 3],[242.612 0.5 2],[243.485 0.6 3],[243.488 0.3 2],[246.25 0.2 2],[246.668 0.3 3],[246.669 0.3 2],[246.696 0.3 3],[246.699 0.3 2],[247.535 0.8 3],[247.536 0.6 2],[248.551 0.4 3],[248.924 0.5 3],[248.927 0.4 2],[249.32 0.4 3],[249.321 0.2 2],[249.427 0.2 2],[249.474 10 1],[249.516 0.3 2],[249.607 0.2 2],[250.138 0.2 3],[250.141 0.3 2],[251.374 0.3 3],[251.682 0.2 2],[251.974 0.8 3],[251.975 0.6 2],[252.172 0.4 2],[252.172 0.6 3],[253.198 0.4 3],[253.199 0.3 2],[253.36 10 1],[253.427 20 1],[253.754 0.5 3],[253.756 0.2 2],[254.567 0.8 3],[254.571 0.7 2],[256.624 100 1],[258.279 200 1],[259.346 30 1],[264.077 0.4 2],[264.077 0.4 3],[264.211 0.4 2],[264.211 0.5 3],[265.223 0.8 3],[265.225 0.6 2],[268.898 20 1],[273.012 50 1],[276.515 2 1],[280.859 20 1],[281.845 0.3 3],[281.848 0.2 2],[283.944 0.2 2],[286.467 0.4 2],[286.468 0.6 3],[287.863 150 1],[288.515 0.4 2],[291.097 0.4 3],[291.098 0.3 2],[291.733 0.5 3],[291.735 0.3 2],[293.111 0.2 2],[299.387 100 1],[300.568 0.2 2],[306.917 0.4 3],[306.923 0.3 2],[307.875 500 1],[315.388 0.3 2],[316.103 20 1],[317.011 0.4 3],[317.014 0.3 2],[317.507 100 1],[318.164 0.4 3],[318.166 0.3 2],[321.012 0.4 3],[321.014 0.3 2],[321.348 0.6 3],[321.349 0.4 2],[322.49 0.6 3],[322.493 0.4 2],[330.047 0.2 2],[335.553 30 1],[342.499 25 1],[347.953 0.2 2],[349.741 30 1],[352.69 50 1],[354.69 0.4 3],[354.692 0.3 2],[361.381 0.3 2],[374.214 20 1],[375.44 0.2 2],[375.455 0.2 2],[396.316 0.3 2],[407.714 0.3 2],[410.223 20 0],[412.921 20 0],[413.415 10 0],[432.184 50 0],[445.286 30 1],[459.977 20 1],[463.245 30 1],[466.648 50 1],[467.553 100 1],[476.331 25 0],[486.232 100 0],[491.694 20 0],[498.692 100 1],[506.537 40 1],[511.929 1000 0],[514.973 20 1],[516.12 300 1],[517.619 30 1],[521.627 60 1],[522.897 50 1],[523.457 100 0],[524.571 300 1],[526.936 50 1],[529.978 40 1],[532.28 40 1],[533.822 1000 1],[534.515 500 1],[536.986 100 1],[540.542 80 1],[540.736 80 1],[542.706 60 0],[543.583 300 1],[543.8 100 1],[546.462 200 1],[549.15 80 1],[549.694 100 1],[550.472 100 1],[552.206 60 1],[559.852 60 1],[560.032 100 1],[561.289 150 1],[562.569 1000 1],[567.808 100 1],[569.091 200 1],[570.205 50 1],[571.053 400 1],[573.827 100 1],[576.072 100 1],[576.433 100 0],[577.483 50 1],[578.702 50 1],[589.403 200 0],[595.025 500 1],[598.486 30 0],[602.408 200 0],[606.893 50 1],[607.498 200 1],[608.243 100 0],[612.749 200 1],[619.188 80 0],[620.486 100 1],[621.31 50 0],[624.448 80 0],[625.749 90 1],[629.398 100 0],[631.313 50 0],[633.037 80 0],[633.35 40 0],[633.785 200 0],[633.944 100 0],[635.916 50 0],[656.649 100 0],[658.375 200 0],[658.527 100 0],[661.966 500 0],[666.111 50 0],[666.596 60 1],[669.729 50 0],[671.883 30 1],[673.203 40 0],[681.257 400 1],[695.878 100 1],[698.978 50 0],[708.521 20 1],[712.005 50 0],[712.205 120 0],[714.206 200 0],[716.479 100 0],[719.166 40 0],[722.73 70 0],[723.678 100 0],[723.784 50 0],[735.135 50 1],[740.206 500 0],[741.05 100 0],[741.648 50 0],[746.899 500 0],[749.052 50 0],[755.418 200 0],[755.665 50 0],[770.02 200 0],[779.898 50 1],[789.798 60 0],[796.948 50 0],[800.363 100 0],[804.374 9900 0],[806.57 30 0],[809.076 100 0],[816.938 80 0],[822.257 50 0],[824.005 400 0],[839.33 1000 0],[841.46 15 1],[848.611 100 0],[866.495 150 0],[870.08 50 0],[874.822 25 0],[885.324 100 0],[885.38 200 0],[885.75 300 0],[889.85 100 0],[896.469 40 0],[899.313 40 0],[902.24 500 0],[905.833 1500 0],[909.886 100 0],[911.391 1200 0],[912.803 60 0],[919.53 3 1],[922.774 60 0],[933.505 100 0],[942.671 400 0],[942.715 300 0],[948.033 1 1],[959.822 200 0],[964.961 200 0],[965.306 300 0],[973.173 500 0],[1000.305 50 0],[1013.116 75 0],[1023.882 100 0],[1037.52 40 0],[1039.174 40 0],[1040.549 0.6 1],[1046.654 500 0],[1108.468 0.1 1],[1123.656 40 0],[1155.846 35 0],[1177.834 32 0],[1199.686 45 0],[1203.369 30 0],[1230.458 15 0],[1314.916 6 0],[1395.827 14 0],[1428.702 20 0],[1446 10 0],[1503.257 22.5 0],[1552.865 10.5 0],[1603.733 15 0],[1827.5711 1.5 0],[1834.852 2 0],[1898.241 1.5 0],[1907.017 3.5 0],[1910.5119 11 0],[1937.002 5 0],[2064.8689 1 0],[2218.3029 22 0],[2222.6529 15 0],[2230.9211 3 0],[2442.082 3.2 0],[2736.542 1.2 0],[2757.3051 0.9 0],[3036.193 1 0],[3038.3881 0.8 0],[3429.573 1 0],[3451.3109 0.9 0],[4022.8539 0.3 0],[4163.3801 0.2 0]}{ALLx9900x9900x2000x0.8x0.9x5x0}{UVx7500x7500x2000x0.8x0.9x5x0}{VISx1000x1000x1000x0.3x0x0x0}{IVx9900x9900x15x0x0x0x0}%
+\pgfspectra@elt@search{#1}{I}{[36.378 3 4],[38.074 3.6 4],[56.553 4.5 4],[60.186 0.5 3],[60.757 5 4],[61.246 0.6 3],[61.517 0.4 3],[65.422 0.4 3],[65.456 0.4 3],[65.58 0.2 1],[65.9 0.6 1],[66.398 0.8 1],[66.452 0.8 1],[66.506 0.8 1],[66.57 15 1],[66.681 0.6 2],[70.511 0.8 2],[71.955 100 1],[72.298 100 1],[78.464 0.7 2],[78.48 0.7 2],[79.552 0.8 2],[79.816 100 1],[83.41 120 1],[84.78 60 1],[86.597 0.5 2],[87.349 150 1],[87.594 100 1],[87.984 200 1],[88.188 150 1],[89.1 100 1],[89.317 100 1],[91.928 0.7 3],[92.038 0.5 2],[96.117 0.6 2],[100.057 120 1],[100.335 100 1],[101.858 400 1],[103.466 1000 1],[105.474 150 1],[106.634 200 1],[107.521 300 1],[107.858 0.6 2],[109.42 0.8 2],[110.5 500 1],[111.116 250 1],[111.722 150 1],[112.525 350 1],[113.15 200 1],[113.975 120 1],[113.98 1000 1],[115.467 150 1],[115.987 100 1],[116.056 1000 1],[116.648 2000 1],[116.705 150 1],[117.584 500 1],[117.865 1000 1],[118.734 1500 1],[119.085 1000 1],[119.529 1.5 0],[119.888 500 1],[120.022 700 1],[121.841 20 0],[122.089 2000 1],[122.405 60 0],[122.408 60 0],[122.889 50 0],[123.406 2000 1],[124.466 0.4 2],[125.134 60 0],[125.235 0.8 2],[125.915 250 0],[125.951 300 0],[126.127 80 0],[126.757 60 0],[126.76 60 0],[127.526 150 0],[128.94 300 0],[130.034 1000 0],[130.298 300 0],[130.693 0.5 2],[131.395 300 0],[131.754 300 0],[133.019 200 0],[133.652 2000 1],[135.51 500 0],[135.797 300 0],[136.097 500 0],[136.111 300 0],[136.771 250 0],[136.822 250 0],[138.323 400 0],[139.075 300 0],[139.29 200 0],[140.001 200 0],[142.549 800 0],[144.626 500 0],[145.318 500 0],[145.739 500 0],[145.747 500 0],[145.798 1000 0],[145.879 250 0],[145.915 400 0],[146.583 250 0],[148.592 100 0],[149.289 500 0],[150.704 500 0],[151.468 500 0],[151.805 1500 0],[152.645 250 0],[159.358 500 0],[161.76 500 0],[164.078 250 0],[170.207 1500 0],[178.276 1200 0],[179.909 500 0],[183.038 7500 0],[184.445 1500 0],[206.163 200 0],[222.443 0.1 2],[223.812 0.1 2],[224.93 0.5 3],[224.931 0.3 2],[230.938 0.2 2],[234.084 0.4 3],[234.085 0.3 2],[235.043 0.3 2],[235.346 0.2 2],[236.113 0.7 3],[236.774 0.4 2],[236.775 0.5 3],[237.145 0.2 2],[237.245 0.3 2],[237.245 0.6 3],[237.646 0.7 3],[237.647 0.4 2],[238.528 0.4 3],[238.711 0.8 3],[238.712 0.4 2],[239.2 0.6 3],[239.201 0.3 2],[240.305 0.4 3],[240.306 0.2 2],[240.363 0.2 2],[240.801 10 1],[241.485 0.2 2],[241.845 0.2 3],[241.849 0.2 2],[241.885 0.2 2],[241.918 10 1],[242.389 0.3 3],[242.391 0.2 2],[242.61 0.9 3],[242.612 0.5 2],[243.485 0.6 3],[243.488 0.3 2],[246.25 0.2 2],[246.668 0.3 3],[246.669 0.3 2],[246.696 0.3 3],[246.699 0.3 2],[247.535 0.8 3],[247.536 0.6 2],[248.551 0.4 3],[248.924 0.5 3],[248.927 0.4 2],[249.32 0.4 3],[249.321 0.2 2],[249.427 0.2 2],[249.474 10 1],[249.516 0.3 2],[249.607 0.2 2],[250.138 0.2 3],[250.141 0.3 2],[251.374 0.3 3],[251.682 0.2 2],[251.974 0.8 3],[251.975 0.6 2],[252.172 0.4 2],[252.172 0.6 3],[253.198 0.4 3],[253.199 0.3 2],[253.36 10 1],[253.427 20 1],[253.754 0.5 3],[253.756 0.2 2],[254.567 0.8 3],[254.571 0.7 2],[256.624 100 1],[258.279 200 1],[259.346 30 1],[264.077 0.4 2],[264.077 0.4 3],[264.211 0.4 2],[264.211 0.5 3],[265.223 0.8 3],[265.225 0.6 2],[268.898 20 1],[273.012 50 1],[276.515 2 1],[280.859 20 1],[281.845 0.3 3],[281.848 0.2 2],[283.944 0.2 2],[286.467 0.4 2],[286.468 0.6 3],[287.863 150 1],[288.515 0.4 2],[291.097 0.4 3],[291.098 0.3 2],[291.733 0.5 3],[291.735 0.3 2],[293.111 0.2 2],[299.387 100 1],[300.568 0.2 2],[306.917 0.4 3],[306.923 0.3 2],[307.875 500 1],[315.388 0.3 2],[316.103 20 1],[317.011 0.4 3],[317.014 0.3 2],[317.507 100 1],[318.164 0.4 3],[318.166 0.3 2],[321.012 0.4 3],[321.014 0.3 2],[321.348 0.6 3],[321.349 0.4 2],[322.49 0.6 3],[322.493 0.4 2],[330.047 0.2 2],[335.553 30 1],[342.499 25 1],[347.953 0.2 2],[349.741 30 1],[352.69 50 1],[354.69 0.4 3],[354.692 0.3 2],[361.381 0.3 2],[374.214 20 1],[375.44 0.2 2],[375.455 0.2 2],[396.316 0.3 2],[407.714 0.3 2],[410.223 20 0],[412.921 20 0],[413.415 10 0],[432.184 50 0],[445.286 30 1],[459.977 20 1],[463.245 30 1],[466.648 50 1],[467.553 100 1],[476.331 25 0],[486.232 100 0],[491.694 20 0],[498.692 100 1],[506.537 40 1],[511.929 1000 0],[514.973 20 1],[516.12 300 1],[517.619 30 1],[521.627 60 1],[522.897 50 1],[523.457 100 0],[524.571 300 1],[526.936 50 1],[529.978 40 1],[532.28 40 1],[533.822 1000 1],[534.515 500 1],[536.986 100 1],[540.542 80 1],[540.736 80 1],[542.706 60 0],[543.583 300 1],[543.8 100 1],[546.462 200 1],[549.15 80 1],[549.694 100 1],[550.472 100 1],[552.206 60 1],[559.852 60 1],[560.032 100 1],[561.289 150 1],[562.569 1000 1],[567.808 100 1],[569.091 200 1],[570.205 50 1],[571.053 400 1],[573.827 100 1],[576.072 100 1],[576.433 100 0],[577.483 50 1],[578.702 50 1],[589.403 200 0],[595.025 500 1],[598.486 30 0],[602.408 200 0],[606.893 50 1],[607.498 200 1],[608.243 100 0],[612.749 200 1],[619.188 80 0],[620.486 100 1],[621.31 50 0],[624.448 80 0],[625.749 90 1],[629.398 100 0],[631.313 50 0],[633.037 80 0],[633.35 40 0],[633.785 200 0],[633.944 100 0],[635.916 50 0],[656.649 100 0],[658.375 200 0],[658.527 100 0],[661.966 500 0],[666.111 50 0],[666.596 60 1],[669.729 50 0],[671.883 30 1],[673.203 40 0],[681.257 400 1],[695.878 100 1],[698.978 50 0],[708.521 20 1],[712.005 50 0],[712.205 120 0],[714.206 200 0],[716.479 100 0],[719.166 40 0],[722.73 70 0],[723.678 100 0],[723.784 50 0],[735.135 50 1],[740.206 500 0],[741.05 100 0],[741.648 50 0],[746.899 500 0],[749.052 50 0],[755.418 200 0],[755.665 50 0],[770.02 200 0],[779.898 50 1],[789.798 60 0],[796.948 50 0],[800.363 100 0],[804.374 9900 0],[806.57 30 0],[809.076 100 0],[816.938 80 0],[822.257 50 0],[824.005 400 0],[839.33 1000 0],[841.46 15 1],[848.611 100 0],[866.495 150 0],[870.08 50 0],[874.822 25 0],[885.324 100 0],[885.38 200 0],[885.75 300 0],[889.85 100 0],[896.469 40 0],[899.313 40 0],[902.24 500 0],[905.833 1500 0],[909.886 100 0],[911.391 1200 0],[912.803 60 0],[919.53 3 1],[922.774 60 0],[933.505 100 0],[942.671 400 0],[942.715 300 0],[948.033 1 1],[959.822 200 0],[964.961 200 0],[965.306 300 0],[973.173 500 0],[1000.305 50 0],[1013.116 75 0],[1023.882 100 0],[1037.52 40 0],[1039.174 40 0],[1040.549 0.6 1],[1046.654 500 0],[1108.468 0.1 1],[1123.656 40 0],[1155.846 35 0],[1177.834 32 0],[1199.686 45 0],[1203.369 30 0],[1230.458 15 0],[1314.916 6 0],[1395.827 14 0],[1428.702 20 0],[1446 10 0],[1503.257 22.5 0],[1552.865 10.5 0],[1603.733 15 0],[1827.5711 1.5 0],[1834.852 2 0],[1898.241 1.5 0],[1907.017 3.5 0],[1910.5119 11 0],[1937.002 5 0],[2064.8689 1 0],[2218.3029 22 0],[2222.6529 15 0],[2230.9211 3 0],[2442.082 3.2 0],[2736.542 1.2 0],[2757.3051 0.9 0],[3036.193 1 0],[3038.3881 0.8 0],[3429.573 1 0],[3451.3109 0.9 0]}{ALLx9900x9900x2000x0.8x0.9x5x0}{UVx7500x7500x2000x0.8x0.9x5x0}{VISx1000x1000x1000x0.3x0x0x0}{IVx9900x9900x15x0x0x0x0}%,[4022.8539 0.3 0],[4163.3801 0.2 0]
\pgfspectra@elt@search{#1}{Xe}{[65.78 8 2],[66.01 8 2],[67.38 9 2],[67.4 9 2],[67.66 9 2],[69.4 10 2],[69.85 20 2],[70.51 12 2],[72.12 10 2],[73.1 15 2],[73.33 10 2],[74.041 350 1],[74.26 15 2],[75.6 10 2],[76.15 10 2],[76.91 10 2],[77.91 25 2],[79.29 15 2],[79.61 12 2],[80.2 15 2],[80.307 350 1],[82.32 25 2],[82.49 30 2],[85.3 25 2],[88.08 600 1],[88.554 350 1],[88.93 15 2],[89.4 20 2],[89.6 20 2],[92.587 600 1],[93.54 250 1],[96.55 10 2],[97.277 800 1],[97.668 700 1],[100.34 35 2],[101.77 35 2],[103.244 500 1],[103.768 700 1],[104.131 1100 1],[104.78 10 2],[104.827 1000 1],[105.192 1200 1],[106.64 12 2],[107.448 2000 1],[108.386 600 1],[110.043 1200 1],[113.03 30 2],[115.847 600 1],[116.963 250 1],[118.305 800 1],[119.204 250 0],[123.21 25 2],[124.476 600 1],[125.02 250 0],[129.559 1000 0],[146.961 600 0],[266.898 80 2],[271.733 100 2],[281.445 30 2],[281.591 40 2],[282.745 30 2],[284.765 40 2],[286.24 30 2],[286.473 200 1],[287.11 80 2],[287.124 60 2],[287.17 30 2],[289.522 150 1],[289.662 30 2],[290.66 50 2],[291.189 40 2],[291.236 80 2],[294.02 40 2],[294.52 60 2],[294.75 40 2],[294.81 40 2],[297.047 80 2],[297.932 400 1],[299.287 40 2],[300.425 30 2],[301.743 100 1],[302.381 100 2],[308.35 40 2],[309.11 50 2],[310.646 30 2],[312.887 300 1],[313.83 100 2],[315.082 80 2],[318.52 40 2],[324.286 100 2],[326.898 80 2],[328.782 30 2],[330.155 80 2],[333.16 40 2],[335.8 30 2],[336.672 200 1],[338.412 80 2],[340.007 2 0],[341.837 2 0],[342 2 0],[344.266 3 0],[344.42 60 2],[345.42 70 2],[345.87 100 2],[346.126 100 1],[346.822 40 2],[346.981 4 0],[347.236 4 0],[350.674 5 0],[352.283 80 2],[354.23 50 2],[354.986 10 0],[355.21 50 2],[355.404 10 0],[356.14 40 2],[357.97 100 2],[358.36 80 2],[359.54 100 2],[360.606 100 2],[360.7 40 2],[361.032 15 0],[361.306 8 0],[361.59 100 2],[362.31 40 2],[362.408 600 2],[363.306 6 0],[366.991 10 0],[367.667 50 2],[368.59 40 0],[369.349 40 0],[377.63 40 2],[378.102 300 2],[384.15 100 2],[387.78 200 2],[388.05 60 2],[390.791 100 1],[392.255 500 2],[395.059 300 2],[403.759 100 1],[405.007 200 2],[405.746 200 1],[406.04 60 2],[409.889 100 1],[410.91 100 2],[414.57 100 2],[415.804 200 1],[418.01 1000 1],[419.315 500 1],[420.848 300 1],[420.947 100 1],[421.372 300 1],[421.56 100 1],[422.3 300 1],[423.825 400 1],[424.538 500 1],[425.157 100 1],[428.59 30 2],[429.64 500 1],[431.051 500 1],[433.052 1000 1],[436.92 200 1],[437.378 100 1],[439.32 500 1],[439.577 500 1],[440.688 200 1],[441.607 150 1],[443.42 50 2],[444.813 500 1],[446.21 100 2],[446.219 1000 1],[448.086 500 1],[452.186 100 1],[456.91 100 2],[457.01 100 2],[464.14 100 2],[467.37 30 2],[468.357 60 2],[472.36 30 2],[473.4152 600 0],[475.73 100 2],[479.2619 150 0],[480.702 500 0],[482.971 400 0],[484.329 300 0],[486.95 40 2],[491.651 500 0],[492.3152 500 0],[497.171 200 1],[497.271 400 1],[498.877 300 1],[499.117 100 1],[502.828 200 0],[504.492 200 1],[508.062 1000 1],[512.242 300 1],[512.57 100 1],[517.882 100 1],[518.804 300 1],[519.137 400 1],[519.21 100 1],[523.9 60 2],[526.044 500 1],[526.195 500 1],[529.222 2000 1],[530.927 300 1],[531.387 1000 1],[533.933 2000 1],[536.32 200 1],[536.71 30 2],[536.807 200 1],[537.239 500 1],[539.28 100 0],[540.1 50 2],[541.915 3000 1],[543.896 800 1],[544.545 300 1],[545.045 200 1],[546.039 400 1],[547.261 1000 1],[549.486 100 1],[552.44 40 2],[552.553 200 1],[553.107 600 1],[556.662 100 0],[561.667 300 1],[565.938 300 1],[566.756 600 1],[567.091 150 1],[569.575 100 0],[569.961 200 1],[571.61 200 1],[572.691 500 1],[575.103 500 1],[575.865 300 1],[577.639 300 1],[581.596 100 1],[582.389 300 0],[582.48 150 0],[587.502 100 0],[589.329 300 1],[589.499 100 0],[590.513 200 1],[593.417 100 0],[594.553 500 1],[597.113 300 1],[597.646 2000 1],[600.892 200 1],[603.62 1000 1],[605.115 2000 1],[609.35 600 1],[609.759 1500 1],[610.143 400 1],[611.508 100 1],[614.645 100 1],[617.83 150 0],[617.966 120 0],[618.242 300 0],[619.407 500 1],[619.826 100 0],[620.597 60 2],[622.002 100 1],[622.17 25 2],[623.82 60 2],[625.905 60 2],[627.082 500 1],[627.754 400 1],[628.441 100 1],[628.601 100 0],[630.086 250 1],[631.806 500 0],[634.396 400 1],[635.635 600 1],[637.528 200 1],[639.799 100 1],[646.97 300 0],[647.284 150 0],[648.776 120 0],[649.872 100 0],[650.418 200 0],[651.283 300 1],[652.865 200 1],[653.316 100 0],[659.501 1000 1],[659.556 100 0],[659.725 400 1],[659.884 100 1],[666.892 150 0],[669.432 300 1],[672.801 200 0],[678.871 150 1],[679.037 100 1],[680.574 1000 1],[682.732 200 0],[687.211 100 0],[688.216 300 0],[691.022 80 1],[692.553 100 0],[694.211 800 1],[697.618 100 0],[699.088 2000 1],[708.215 150 1],[711.96 500 0],[714.75 50 1],[714.903 200 1],[716.483 500 1],[728.434 100 1],[730.18 200 1],[733.93 200 1],[738.6 100 0],[739.379 150 0],[754.845 300 1],[758.468 200 0],[761.857 80 1],[764.202 500 0],[764.391 100 0],[767.066 200 1],[778.704 60 1],[780.265 100 0],[788.132 100 0],[788.74 300 0],[796.734 500 0],[802.967 100 0],[805.726 200 0],[806.134 150 0],[810.198 100 0],[815.18 150 1],[817.102 100 0],[820.634 700 0],[823.1635 10000 0],[826.652 500 0],[828.0116 7000 0],[834.682 2000 0],[834.724 100 1],[840.919 2000 0],[851.519 50 1],[857.601 200 0],[860.423 50 1],[864.854 250 0],[869.22 100 0],[869.686 200 0],[871.619 50 1],[873.939 300 0],[875.82 100 0],[881.941 5000 0],[886.232 300 0],[890.873 200 0],[893.083 200 0],[895.225 1000 0],[898.105 100 0],[898.757 200 0],[904.545 400 0],[916.265 500 0],[916.752 100 0],[937.476 100 0],[951.338 200 0],[959.135 50 1],[968.532 150 0],[969.868 50 1],[971.816 100 0],[979.97 2000 0],[992.319 3000 0],[1083.837 100 0],[1174.201 90 0],[1223.524 375 0],[1225.776 100 0],[1259.02 300 0],[1262.3391 2500 0],[1354.415 250 0],[1365.7055 2000 0],[1414.2444 1250 0],[1424.096 800 0],[1436.499 375 0],[1466.081 140 0],[1473.2806 3000 0],[1509.972 100 0],[1541.8394 2500 0],[1555.713 150 0],[1597.954 250 0],[1603.99 100 0],[1605.328 1000 0],[1655.449 125 0],[1672.815 1500 0],[1732.577 1500 0],[1878.8131 350 0],[2018.7189 150 0],[2026.2242 3000 0],[2147.009 250 0],[2319.333 1250 0],[2327.9539 110 0],[2482.4711 1800 0],[2514.584 175 0],[2626.908 2000 0],[2651.0859 2500 0],[2838.1539 250 0],[2858.225 750 0],[2938.441 300 0],[2944.8061 150 0],[2964.958 100 0],[2981.3619 100 0],[3025.3141 600 0],[3047.5461 1500 0],[3050.4119 100 0],[3079.418 500 0],[3106.923 6000 0],[3133.601 125 0],[3160.791 550 0],[3229.308 100 0],[3273.926 1800 0],[3366.6691 3500 0],[3401.4672 150 0],[3433.527 450 0],[3474.4 170 0],[3507.025 5000 0],[3524.6922 110 0],[3620.9211 250 0],[3623.1738 150 0],[3650.8359 450 0],[3678.8828 850 0],[3868.598 140 0],[3873.782 175 0],[3893.9602 270 0],[3995.5141 120 0]}{ALLx10000x10000x3000x600x0x0x0}{UVx2000x1000x2000x600x0x0x0}{VISx3000x600x3000x500x0x0x0}{IVx10000x10000x150x0x0x0x0}%
\pgfspectra@elt@search{#1}{Cs}{[55.691 15 2],[58.415 50 2],[58.44 10 2],[59.1044 5 1],[60.301 240 2],[60.7291 1 1],[60.785 120 2],[60.794 160 2],[61.2786 0.8 1],[61.401 2000 2],[62.115 300 2],[63.586 120 2],[63.767 60 2],[63.817 400 2],[63.9356 40 1],[65.7112 2 1],[65.794 5 2],[66.382 90 2],[66.46 90 2],[66.625 500 2],[66.8386 10 1],[67.306 360 2],[67.96 80 2],[68.755 160 2],[69.16 1000 2],[69.943 160 2],[70.34 30 3],[70.389 700 2],[71.025 200 2],[71.8138 300 1],[72.179 4000 2],[72.22 4000 2],[73.156 1000 2],[73.195 60 2],[73.666 200 2],[74.029 2400 2],[74.223 30 2],[74.994 200 2],[75.038 300 2],[75.518 300 2],[75.882 240 2],[75.99 1.2 2],[77.361 1.4 3],[78.773 60 2],[80.195 15 2],[80.8761 300 1],[81.3837 300 1],[81.402 40 2],[81.735 3 2],[82.034 160 2],[82.364 0.8 3],[82.48 30 3],[82.599 40 2],[83.039 1500 2],[83.739 20 2],[84.337 0.8 2],[84.792 50 2],[86.183 3 3],[87.484 40 3],[89.692 30 3],[90.127 700 1],[92.035 3000 2],[92.166 100 2],[92.302 20 3],[92.6657 800 1],[93.267 5 2],[98.614 40 3],[99.514 10 3],[105.479 5000 2],[106.891 30 3],[117.865 26 1],[119.155 16 1],[202.505 5 1],[203.515 12 1],[207.743 16 1],[208.005 16 1],[208.871 16 1],[209.197 16 1],[209.95 3 1],[211.265 5 1],[214.675 20 1],[217.96 26 1],[218.214 5 1],[218.947 26 1],[221.315 5 1],[222.051 20 1],[222.888 26 1],[225.458 50 1],[225.782 40 1],[225.835 5 1],[226.761 70 1],[227.383 70 1],[228.668 5 1],[230.771 5 1],[231.568 8 1],[232.107 26 1],[234.313 16 1],[235.444 26 1],[235.785 5 1],[236.481 26 1],[239.286 50 1],[241.489 16 1],[243.271 5 1],[244.324 5 1],[247.607 26 1],[248.041 8 1],[251.572 26 1],[252.366 3 1],[253.908 26 1],[253.917 5 1],[255.065 12 1],[255.117 26 1],[256.817 26 1],[256.869 50 1],[257.303 200 1],[257.454 26 1],[257.674 26 1],[259.009 26 1],[260.944 50 1],[261.627 26 1],[262.795 5 1],[263.714 16 1],[264.469 5 1],[264.807 26 1],[265.171 40 1],[266.024 5 1],[266.979 26 1],[267.117 3 1],[267.324 8 1],[268.66 26 1],[268.941 5 1],[270.119 3 1],[272.421 26 1],[273.007 5 1],[273.388 5 1],[274.823 50 1],[274.984 16 1],[275.781 12 1],[276.197 16 1],[276.61 5 1],[277.699 50 1],[278.824 26 1],[278.98 26 1],[279.332 5 1],[279.45 26 1],[279.941 26 1],[281.694 100 1],[282.027 5 1],[282.904 5 1],[282.942 5 1],[284.619 26 1],[285.242 16 1],[286.637 16 1],[288.119 50 1],[288.374 5 1],[289.975 16 1],[291.465 16 1],[293.109 100 1],[294.095 100 1],[294.225 16 1],[294.98 6 1],[296.838 4 1],[297.085 5 1],[300.127 20 1],[301.204 16 1],[302.037 3 1],[306.098 3 1],[306.66 20 1],[308.087 5 1],[309.231 20 1],[318.094 16 1],[326.592 160 1],[326.713 160 1],[327.163 100 1],[332.943 20 1],[336.856 160 1],[355.98 20 1],[356.511 20 1],[365.107 3 1],[368.01 3 1],[368.764 3 1],[369.948 20 1],[373.254 3 1],[373.434 20 1],[375.14 3 1],[378.542 70 1],[380.51 100 1],[387.016 3 1],[387.6143 30 0],[388.8608 16 0],[389.698 200 1],[390.693 70 1],[392.558 100 1],[395.95 70 1],[396.519 100 1],[397.8 30 1],[404.718 70 1],[405.396 40 1],[406.796 100 1],[406.877 100 1],[407.336 14 1],[411.929 12 1],[412.121 100 1],[413.2 20 1],[415.127 70 1],[415.861 70 1],[419.32 12 1],[421.313 100 1],[422.112 40 1],[423.219 100 1],[423.441 70 1],[424.197 20 1],[427.174 20 1],[427.71 400 1],[428.835 200 1],[429.2 40 1],[430.064 100 1],[430.794 10 1],[432.758 10 1],[433.024 70 1],[436.328 400 1],[437.302 100 1],[438.443 80 1],[438.876 20 1],[439.691 40 1],[439.95 70 1],[440.385 70 1],[440.525 200 1],[441.021 70 1],[442.405 20 1],[443.571 70 1],[444.4 20 1],[445.344 40 1],[445.768 40 1],[445.918 40 1],[449.366 20 1],[450.152 200 1],[450.671 40 1],[450.683 20 1],[451.55 20 1],[452.285 30 1],[452.672 200 1],[453.894 160 1],[455.5276 80 0],[456.698 30 1],[457.179 30 1],[459.3169 40 0],[460.376 500 1],[460.999 20 1],[461.613 30 1],[462.309 70 1],[464.651 100 1],[465.654 30 1],[467.028 70 1],[469.561 20 1],[470.179 100 1],[473.298 70 1],[473.966 70 1],[474.913 20 1],[476.362 100 1],[478.636 40 1],[483.016 160 1],[487.002 160 1],[495.284 160 1],[497.259 100 1],[504.38 160 1],[505.27 100 1],[505.987 100 1],[508.177 20 1],[509.66 80 1],[522.7 300 1],[524.937 160 1],[527.404 80 1],[530.661 70 1],[534.916 70 1],[537.097 160 1],[541.969 100 1],[546.5944 1 0],[550.2884 1 0],[556.302 200 1],[563.5212 2.2 0],[566.4018 6 0],[574.5724 1.6 0],[581.418 70 1],[583.116 100 1],[583.8835 1 0],[584.5141 6 0],[592.565 100 1],[601.049 16 0],[603.4089 6 0],[612.862 80 1],[621.31 24 0],[621.7599 3 0],[635.4555 10 0],[641.954 20 1],[643.1969 3 0],[647.2623 3 0],[649.553 40 1],[653.644 40 1],[658.602 6 0],[658.651 40 0],[662.866 7 0],[672.3284 40 0],[682.4652 20 0],[687.0455 20 0],[695.552 80 1],[697.3297 40 0],[698.3491 7 0],[722.8536 40 0],[727.99 12 0],[727.9957 40 0],[760.8903 30 0],[794.3882 60 0],[799.068 12 0],[801.5724 20 0],[805.335 12 0],[807.892 12 0],[807.9033 70 0],[852.1122 200 0],[876.1415 40 0],[894.346 120 0],[917.2322 70 0],[920.8538 20 0],[1002.4359 70 0],[1012.3414 20 0],[1012.3602 80 0],[1358.831 28 0],[1360.257 3 0],[1375.883 3 0],[1469.493 70 0],[1792.3619 2.4 0],[1792.4211 1.8 0],[1916.2529 5 0],[1916.3199 4 0],[2131.1461 10 0],[2131.2289 9 0],[2576.349 20 0],[2576.4699 18 0],[3942.1219 40 0],[3942.4078 36 0]}{ALLx5000x200x800x5000x40x0x0}{UVx5000x0x800x5000x40x0x0}{VISx500x80x500x0x0x0x0}{IVx200x200x0x0x0x0x0}%
\pgfspectra@elt@search{#1}{Ba}{[40.382 1 2],[40.712 0.4 2],[42.012 1.4 2],[42.384 0.8 2],[44.895 1.8 2],[45.696 1.6 2],[55.548 2.8 2],[58.757 2.8 2],[64.727 3.6 2],[65.336 1.8 2],[74.312 3 2],[79.489 8000 3],[92.374 10000 3],[109.741 2.4 2],[111.367 3 2],[111.601 2.2 2],[113.305 2.8 2],[115.176 2.4 2],[117.062 2.4 2],[120.729 2.6 2],[121.892 2.2 2],[122.455 2.4 2],[128.853 2.4 2],[129.918 2.2 2],[130.74 2.2 2],[130.887 2.4 2],[131.572 2.4 2],[133.401 2.4 2],[135.471 2.2 2],[136.953 2.2 2],[141.661 2.2 2],[147.885 2.4 2],[148.672 40 1],[150.401 80 1],[151.068 2.4 2],[151.422 2.4 2],[155.438 60 1],[156.561 2.4 2],[156.612 2.4 2],[157.273 40 1],[157.455 2.4 2],[159.68 2.4 2],[161.095 2.4 2],[161.578 2.4 2],[167.451 20 1],[169.437 80 1],[171.153 2.4 2],[186.174 2.4 2],[188.392 2.4 2],[190.415 20 1],[192.47 100 1],[197.476 2.2 2],[199.954 60 1],[200.13 2 2],[200.84 3 2],[202.245 2.6 2],[202.395 80 1],[203.884 2 2],[207.043 2.4 2],[207.168 2.4 2],[207.6 2 2],[208.135 2.4 2],[213.487 2 2],[215.637 3.2 2],[216.076 2 2],[221.47 100 1],[223.033 4 2],[224.561 160 1],[225.473 200 1],[228.068 6 2],[230.424 280 1],[232.351 7 2],[233.11 12 2],[233.527 400 1],[234.758 38 1],[247.673 5 2],[250.507 5 2],[251.228 8 2],[252.383 8 2],[252.851 12 1],[253.092 5 2],[255.954 10 2],[257.048 5 2],[259.664 1.6 0],[263.478 20 1],[268.189 8 2],[270.263 1.6 0],[274.578 6 2],[277.136 3.6 1],[278.528 3 0],[293.895 5 2],[296.005 5 2],[296.248 6 2],[301.422 4 2],[304.342 6 2],[307.158 20 0],[307.914 8 2],[310.392 6 2],[310.821 2 0],[311.922 6 2],[313.26 1.6 0],[313.572 1.6 0],[313.77 2 0],[315.27 6 2],[315.534 2 0],[315.567 2 0],[315.805 2.4 0],[315.854 2.4 0],[316.56 5 0],[317.369 3 0],[318.316 6 0],[318.396 3 0],[319.391 2 0],[319.517 5 2],[320.37 5 0],[322.163 6 0],[322.219 8 0],[323.504 5 2],[326.196 10 0],[326.234 12 0],[328.15 8 0],[328.165 5 2],[328.177 3 0],[328.679 4 2],[332.28 10 0],[335.68 16 0],[336.818 10 2],[336.968 6 2],[337.708 12 0],[337.739 4 0],[342.032 14 0],[342.101 5 0],[342.148 6 0],[346.374 8 0],[350.111 40 0],[352.497 16 0],[353.135 6 0],[354.466 16 0],[354.768 4 0],[355.245 20 1],[356.773 40 1],[357.628 20 1],[357.762 6 0],[357.967 16 0],[359.657 40 1],[363.064 8 0],[363.683 8 0],[364.918 5 2],[368.847 4 0],[373.575 80 1],[381.669 40 1],[384.28 40 1],[385.476 20 1],[388.933 4 0],[389.178 280 1],[389.265 4 0],[390.991 8 0],[391.473 100 1],[392.685 5 2],[393.572 10 0],[393.787 4 0],[393.967 40 1],[394.951 100 1],[399.306 5 2],[399.34 16 0],[399.566 6 0],[403.626 60 1],[405.371 3.6 2],[408.377 40 1],[408.486 6 0],[413.066 300 1],[413.243 4 0],[416.6 40 1],[421.604 100 1],[426.795 160 1],[428.31 20 0],[428.78 60 1],[429.76 40 1],[430.932 160 1],[432.3 4 0],[432.573 120 1],[432.674 40 1],[432.962 60 1],[435.033 16 0],[440.254 12 0],[440.523 80 1],[443.189 8 0],[448.898 12 0],[449.364 10 0],[450.592 8 0],[450.963 40 1],[452.317 12 0],[452.493 26 1],[455.403 13000 1],[457.385 8 0],[457.964 16 0],[459.975 6 0],[461.992 4 0],[462.833 5 0],[464.41 60 1],[467.362 6 0],[469.162 7 0],[469.744 3 2],[470.043 4 0],[470.894 160 1],[472.644 8 0],[484.346 160 1],[484.714 60 1],[485.084 40 1],[487.765 6 0],[489.997 80 1],[490.29 3 0],[493.409 4000 1],[494.735 1.6 0],[495.715 200 1],[499.781 60 1],[501.3 200 1],[504.955 2 2],[509.754 2 2],[510.225 2.4 2],[513.454 2 2],[515.994 4 0],[526.703 4 0],[536.135 160 1],[539.16 200 1],[542.105 40 1],[542.455 20 0],[542.879 40 1],[548.03 60 1],[551.905 40 0],[553.548 200 0],[562.04 4 0],[568.018 2 0],[577.762 80 0],[578.418 160 1],[580.023 20 0],[580.569 4 0],[582.628 30 0],[585.368 560 1],[590.764 3 0],[597.17 20 0],[598.125 160 1],[599.709 20 0],[599.8 2 2],[599.985 60 1],[601.947 20 0],[606.312 40 0],[610.199 2.6 2],[611.078 60 0],[613.583 80 1],[614.172 4000 1],[634.168 30 0],[637.711 2 2],[637.891 100 1],[638.376 2 2],[645.085 18 0],[648.291 30 0],[649.69 2400 1],[649.876 60 0],[652.617 1.6 2],[652.731 30 0],[659.533 600 0],[665.41 30 0],[667.527 300 0],[669.384 360 0],[676.962 200 1],[686.569 120 0],[686.785 60 0],[687.409 200 1],[705.994 1200 0],[709.549 1.6 2],[712.033 480 0],[719.524 120 0],[722.884 120 0],[728.03 600 0],[739.241 240 0],[741.753 60 0],[745.978 180 0],[748.808 120 0],[763.69 90 0],[764.291 120 0],[767.209 360 0],[778.048 240 0],[783.957 36 0],[790.575 300 0],[791.134 120 0],[821.024 180 0],[830.869 1.6 2],[855.997 360 0],[871.074 20 1],[873.771 20 1],[879.976 60 0],[886.098 60 0],[891.499 90 0],[921.969 60 0],[930.808 60 0],[932.458 60 0],[937.006 300 0],[945.592 60 0],[952.176 1.6 2],[958.937 90 0],[960.888 180 0],[964.572 60 0],[983.037 300 0],[1000.108 180 0],[1003.21 120 0],[1023.323 240 0],[1047.126 60 0],[1079.125 24 0],[1101.269 36 0],[1111.442 30 0],[1130.304 48 0],[1169.745 24 0],[1320.73 24 0],[1381.05 24 0],[1407.79 24 0],[1500.04 24 0],[2071.2 24 0],[2551.5699 30 0],[2922.39 30 0]}{ALLx13000x1200x13000x12x10000x0x0}{UVx10000x40x400x12x10000x0x0}{VISx13000x1200x13000x5x0x0x0}{IVx360x360x20x1.6x0x0x0}%
@@ -115,7 +115,7 @@
\pgfspectra@elt@search{#1}{Pb}{[36.74 0.2 4],[37.253 0.2 4],[38.787 0.2 4],[39.438 0.2 4],[42.464 0.5 4],[43.103 0.3 4],[43.66 0.3 4],[43.847 0.2 4],[43.891 0.6 4],[45.345 0.4 4],[46.17 0.3 4],[47.536 0.8 3],[47.835 0.7 3],[49.62 0.3 4],[49.638 1 3],[49.994 1.2 3],[51.507 0.9 3],[52.978 1.4 3],[57.016 2 3],[57.39 0.8 3],[58.452 0.8 3],[64.85 1 3],[65.61 0.9 3],[69.442 0.4 4],[69.62 0.8 4],[70.373 2 4],[70.629 0.4 4],[70.766 0.6 4],[73.085 0.5 4],[74.946 1.2 4],[75.252 1 4],[75.58 1 4],[76.109 1 3],[76.276 0.6 4],[76.587 1 4],[76.745 1.8 4],[76.949 1.8 4],[77.142 1.4 4],[78.279 1.4 4],[78.705 1 4],[79.702 1.5 4],[79.98 0.5 4],[80.207 1.8 3],[80.282 1.2 3],[80.963 1.8 4],[81.232 0.5 4],[81.259 1 3],[81.41 0.8 4],[82.009 0.8 4],[82.207 0.8 3],[82.552 0.5 4],[82.741 1 3],[82.932 0.8 4],[83.26 1.2 3],[84.099 0.8 3],[84.288 0.8 3],[84.594 1.2 3],[84.604 0.2 1],[84.988 0.2 1],[85.198 0.5 4],[85.557 0.3 1],[85.764 1.8 3],[85.902 0.8 3],[86.233 1.6 3],[86.3 0.3 1],[86.397 2 4],[86.71 1 4],[87.044 1.4 3],[87.371 0.6 1],[87.796 0.2 1],[87.996 1.2 3],[88.035 0.7 3],[88.05 0.6 4],[88.39 1.8 4],[88.496 1.4 3],[88.499 1.4 3],[88.837 1.4 4],[88.968 0.8 1],[89.072 1.6 3],[89.44 1.4 4],[89.608 1.2 4],[89.63 0.3 1],[90.851 1.2 3],[91.509 0.8 4],[91.571 1.4 4],[91.79 1.2 3],[91.809 1.2 4],[92.028 1.2 4],[92.066 1.2 4],[92.212 1 3],[92.249 1.2 3],[92.452 0.7 3],[92.644 0.5 1],[92.764 1 3],[93.22 1.4 3],[93.7 0.8 3],[94.074 0.6 4],[94.62 0.8 4],[95.093 0.6 4],[95.285 0.7 3],[95.435 1.2 4],[95.495 0.4 4],[95.528 1 4],[95.876 0.2 1],[96.021 0.2 1],[96.101 0.1 2],[96.438 0.4 4],[96.536 0.3 1],[96.723 1 1],[97.256 0.9 1],[98.217 0.8 1],[98.671 1 1],[98.914 0.6 4],[99.589 1 1],[100.181 0.6 1],[100.542 0.8 4],[101.244 0.8 3],[101.661 1 1],[102.861 1.4 3],[103.05 0.3 2],[103.205 2 3],[104.124 1.6 3],[104.414 1.8 3],[104.89 1.2 2],[104.982 1 1],[105.077 1 1],[105.126 1 4],[105.653 1.5 3],[105.926 0.4 4],[106.066 1 1],[106.558 0.9 1],[106.92 0.4 2],[107.209 1.2 3],[107.47 0.3 2],[107.988 0.7 3],[108.081 1.8 3],[108.417 2 3],[108.886 1 4],[108.994 0.6 3],[109.652 0.9 4],[109.947 0.7 3],[110.394 1 1],[110.479 0.6 4],[110.843 1 1],[110.984 1 1],[111.53 0.6 3],[111.608 2 3],[111.867 0.4 2],[111.957 1 1],[112.133 0.4 4],[112.136 1 1],[113.314 1 1],[113.75 1 4],[113.784 1.8 3],[114.277 0.8 3],[114.493 1.4 3],[114.591 0.4 1],[115.236 0.4 4],[115.788 1.2 4],[116.7 0.4 2],[118.543 1.4 4],[118.995 2 3],[120.363 1 1],[123.12 1 1],[123.35 1.1 4],[124.847 1 4],[125.06 0.4 2],[126.69 0.1 2],[126.755 0.8 3],[129.082 0.8 3],[129.11 1 3],[131.305 2 3],[132.392 0.8 3],[133.165 1 1],[133.52 1 1],[134.306 1.2 3],[134.837 1 1],[138.894 1.6 3],[139.702 0.6 3],[140.026 1.8 3],[140.434 1 3],[143.396 1 1],[144.935 0.3 1],[151.076 0.7 3],[151.242 1 1],[153.571 1.4 3],[155.31 2 2],[161.01 0.1 2],[163.575 0.8 4],[167.153 1 1],[168.215 1 1],[171.123 0.4 2],[172.675 2 1],[174 0.2 0],[176.664 0.2 0],[179.467 0.2 0],[179.667 1 1],[179.839 0.8 3],[180.287 0.2 4],[181.297 0.5 0],[182.205 1 1],[184.3 0.2 4],[186.876 0.4 0],[188.867 0.2 4],[189.319 0.8 3],[189.702 0.2 4],[190.477 1 0],[191.433 0.2 4],[191.974 0.4 4],[192.1471 0.7 1],[195.796 0.5 4],[195.934 1.2 3],[197.244 0.4 0],[197.316 1.6 3],[197.788 0.2 0],[199.16 0.2 0],[199.231 0.2 0],[199.858 0.2 4],[199.883 1 4],[202.202 0.5 0],[204.258 1 3],[204.934 1.2 3],[205.088 0.5 0],[205.328 0.8 0],[207.845 0.8 4],[207.922 1.2 3],[211.1758 0.6 0],[211.5066 1 0],[214.255 1 4],[215.196 0.8 3],[215.401 1.5 3],[216.797 1 4],[217 50 0],[217.558 0.7 0],[217.746 1.2 3],[218.7888 0.7 0],[218.9603 0.8 0],[220.3534 1 1],[223.7425 2 0],[224.686 2 0],[224.689 2.5 0],[225.901 2 4],[227.666 1 4],[230.149 0.8 4],[233.2418 15 0],[235.953 1.6 3],[238.8797 18 0],[239.3792 55 0],[239.9597 14 0],[240.194 32 0],[241.1734 32 0],[241.761 1.6 3],[242.481 1.5 4],[244.3829 15 0],[244.6181 16 0],[247.6378 13 0],[252.669 0.8 1],[257.66 0.8 1],[257.726 8 0],[260.838 0.2 1],[261.3655 50 0],[261.4175 90 0],[262.8262 16 0],[263.4256 0.4 1],[265.7094 1 0],[266.3154 70 0],[269.7541 1 0],[280.1995 2500 0],[282.258 10 0],[282.3189 1400 0],[283.3053 3500 0],[284.0557 0.6 1],[286.424 0.4 3],[286.45 0.4 3],[287.3311 1400 0],[288.73 0.3 1],[291.4442 0.3 1],[294.743 0.2 1],[294.853 0.3 1],[296.646 1.5 0],[297.2991 1.5 0],[297.814 0.4 3],[298.0157 1.5 0],[298.6876 0.4 1],[301.639 1 1],[304.385 1 2],[305.256 0.4 3],[308.908 0.4 2],[310.274 0.4 2],[311.8894 15 0],[313.781 1 2],[317.65 1 2],[322.0528 60 0],[322.117 0.4 3],[322.9613 10 0],[324.0186 40 0],[324.284 0.5 2],[326.2355 20 0],[353.017 0.1 2],[357.2729 3500 0],[358.987 0.7 2],[363.9568 5000 0],[367.1491 2000 0],[368.3462 7000 0],[368.931 0.7 2],[370.602 0.3 2],[371.3982 1 1],[372.869 0.5 2],[373.9935 2500 0],[385.408 1.2 2],[395.192 0.8 2],[396.248 0.4 3],[401.9632 1500 0],[403.116 0.3 2],[404.98 0.4 3],[405.7807 9500 0],[406.2136 1400 0],[409.454 0.3 2],[411.076 0.5 1],[411.335 0.4 1],[412.811 0.2 2],[415.282 1 1],[415.7814 1 0],[416.8033 1000 0],[424.214 0.9 1],[424.492 2 1],[427.266 0.8 2],[429.382 0.7 1],[429.665 0.6 1],[434.0413 20 0],[435.274 1 1],[438.646 2 1],[449.615 1 3],[449.934 0.6 2],[453.46 1.6 3],[457.121 0.7 2],[457.9051 1 1],[458.227 1 1],[459.645 0.1 2],[460.54 0.8 3],[476.112 0.6 2],[479.859 0.4 2],[480.936 0.4 4],[482.686 0.1 2],[485.506 0.2 2],[500.5416 100 0],[500.6572 10 0],[504.258 5 1],[506.512 0.3 2],[507.058 1 1],[507.453 1 1],[507.635 1 0],[508.9484 5 0],[509.001 2 0],[510.7242 1 0],[511.164 1 1],[519.156 0.4 2],[520.1437 200 0],[536.764 1 1],[537.2099 1 1],[552.397 0.5 2],[554.425 1 1],[560.885 2 1],[569.2346 4 0],[577.941 0.3 2],[585.796 0.6 2],[589.5624 20 0],[591.454 0.2 3],[600.1862 200 0],[600.958 0.9 1],[601.1667 50 0],[604.117 0.8 1],[605.9356 50 0],[607.574 4 1],[608.1409 4 1],[611.052 5 0],[615.989 1 1],[623.5266 10 0],[665.099 0.5 4],[666.02 5 1],[675.32 0.4 4],[689.211 1 0],[712.894 0.5 0],[719.36 2 1],[722.8965 2000 0],[730.468 0.5 0],[733.015 0.8 0],[734.6676 1 0],[755.897 1 1],[763.256 1 1],[773.296 0.4 1],[780.9259 2 0],[781.797 0.5 0],[782.901 0.6 0],[789.6737 0.5 0],[815.691 0.2 1],[816.8001 1 0],[819.1886 0.6 0],[821.7711 0.5 0],[825.561 0.8 0],[827.269 4 0],[833.554 0.6 1],[839.568 1 1],[840.9384 2 0],[847.8492 1 0],[853.217 0.8 0],[854.495 0.7 1],[870.99 0.7 1],[871.939 0.5 1],[872.281 0.5 0],[885.7457 1 0],[905.082 1 1],[906.343 1 1],[924.528 0.2 1],[929.3476 0.8 0],[938.435 0.5 0],[938.589 0.5 0],[943.805 1.5 0],[960.4297 1.5 0],[960.873 0.6 0],[967.4351 1.5 0],[1029.0458 20 0],[1043.432 0.5 0],[1049.8965 10 0],[1064.9249 5 0],[1075.941 0.5 0],[1075.974 0.7 0],[1088.6688 1.5 0],[1096.953 4 0],[1105.922 0.6 0],[1133.308 0.3 0],[1147.949 0.2 1],[1148.876 0.2 0],[1162.791 0.5 1],[1256.137 0.1 0]}{ALLx9500x9500x5x2x2x2x0}{UVx7000x7000x2x2x2x2x0}{VISx9500x9500x5x1.2x1.6x0.5x0}{IVx20x20x1x0x0x0x0}%
\pgfspectra@elt@search{#1}{Bi}{[35.577 1 4],[36.952 1 4],[42.07 6 3],[42.978 1 4],[43.12 6 3],[43.563 1 4],[48.839 2 4],[49.272 1 4],[56.362 3 4],[59.073 1 2],[67.076 5 2],[67.887 2 4],[68.688 6 4],[70.654 1 4],[73.071 5 4],[73.817 10 4],[77.516 4 2],[79.05 6 3],[79.06 6 3],[79.25 8 3],[80.365 6 2],[82.03 10 3],[82.29 9 3],[82.49 12 3],[84.986 6 4],[85.568 5 4],[86.445 15 4],[87.26 15 3],[87.68 8 3],[88.017 6 4],[91.67 9 3],[92.093 7 2],[92.39 12 3],[92.548 6 2],[92.981 6 4],[94.33 15 3],[96.76 9 3],[96.88 8 3],[98.98 8 3],[103.999 25 2],[104.576 50 2],[105.181 30 2],[105.888 15 1],[108.547 20 1],[109.92 10 1],[110.34 24 3],[112.88 7 3],[113.86 6 3],[113.901 20 2],[113.946 15 4],[113.98 6 3],[114.591 15 2],[114.97 7 3],[116.319 8 1],[116.706 8 1],[122.464 50 2],[122.543 10 1],[123.278 15 1],[124.105 10 1],[126.535 10 1],[128.373 15 1],[130.618 10 1],[131.7 60 3],[132.546 20 1],[132.684 40 2],[132.947 20 1],[134.612 60 2],[135.007 20 1],[137.261 25 1],[137.602 15 1],[139.392 20 1],[142.333 35 2],[142.352 35 2],[143.683 45 1],[144.794 25 1],[145.511 50 1],[146.1 60 2],[146.214 25 1],[148.693 35 1],[150.25 20 1],[152.057 40 1],[153.317 40 1],[153.677 30 1],[153.806 35 1],[156.367 20 1],[157.37 40 1],[159.179 60 1],[160.158 25 1],[160.64 60 2],[160.97 40 1],[161.138 40 1],[165.281 20 1],[169.15 20 2],[174.929 20 1],[177.711 80 1],[178.747 60 1],[179.193 70 1],[182.38 70 1],[183.432 20 2],[186.39 10 2],[190.241 100 1],[191 30 3],[191.212 10 2],[195.453 9000 0],[196.013 7000 0],[198.826 10 2],[198.935 25 1],[202.075 20 2],[202.115 20 2],[202.121 7000 0],[206.17 9000 0],[206.89 45 1],[207.322 10 2],[207.337 14 2],[209.3 30 3],[210.342 15 2],[211.026 4600 0],[213.363 2500 0],[214.34 15 1],[214.346 15 1],[218.69 60 1],[221.355 30 2],[221.4 40 1],[222.825 360 0],[223.061 1700 0],[227.658 340 0],[231.1 100 3],[232.6 100 3],[236.812 16 1],[236.825 12 1],[237.6 100 3],[240.088 190 0],[241.46 75 2],[243.76 10 2],[250.1 10 1],[251.569 25 0],[252.449 70 0],[254.45 20 1],[262.791 700 0],[262.9 100 3],[267.7 100 3],[269.3 12 1],[269.676 280 0],[271.33 20 1],[273.05 140 0],[276.7 100 3],[277.2 100 3],[278.052 360 0],[278.6 100 3],[280.342 15 1],[280.37 11 1],[280.53 12 1],[280.962 140 0],[284.2 100 3],[284.74 30 2],[285.56 80 2],[289.798 4000 0],[292.4 100 3],[293.3 100 3],[293.6 100 3],[293.67 15 1],[293.83 3200 0],[295.04 20 1],[296.34 12 1],[298.903 2800 0],[299.334 700 0],[301.2 100 3],[302.464 2400 0],[303.487 60 0],[304.2 100 3],[306.772 9000 0],[307.666 140 0],[311.5 35 2],[323.9 100 3],[339.721 550 0],[343.083 10 1],[343.123 12 1],[345.1 40 2],[347.38 40 2],[348.55 35 2],[351.085 500 0],[354.08 15 2],[359.611 380 0],[361.34 45 2],[364.3 100 3],[365.42 12 1],[368.2 100 3],[369.532 50 2],[369.568 50 2],[373.4 100 3],[379.25 70 1],[381.11 12 1],[381.58 20 1],[384.58 10 1],[386.39 30 1],[386.8 100 3],[407.91 40 1],[409.72 10 1],[412.153 140 0],[412.186 140 0],[422.46 12 2],[425.94 75 1],[427.2 25 1],[430.17 70 1],[432.78 25 2],[433.98 12 1],[434.05 25 1],[434.2 30 3],[437.94 12 1],[447.68 25 1],[456.084 30 2],[456.154 30 2],[470.53 60 1],[472.252 600 0],[473.03 30 1],[474.97 20 1],[479.74 40 2],[490.82 12 1],[491.66 10 1],[496.97 12 1],[499.36 20 1],[507.93 45 2],[509.16 10 1],[512.43 50 1],[514.43 60 1],[520.15 20 1],[520.92 75 1],[527.03 40 1],[534.7 30 3],[539.78 10 1],[555.235 10 0],[559.941 3 0],[565.52 20 1],[571.92 40 1],[574.255 6 0],[581.83 12 1],[586.02 20 1],[597.3 20 1],[605.91 15 1],[612.8 15 1],[613.482 6 0],[647.573 3 0],[647.624 3 0],[649.77 15 1],[657.72 10 1],[660.02 40 1],[662.34 12 2],[680.86 50 1],[699.112 4 0],[703.3 12 1],[703.615 2 0],[738.1 10 1],[738.1 10 2],[750.233 2 0],[755.1 12 2],[759.8 25 2],[763.7 10 1],[763.7 10 2],[775 10 1],[783.87 3 0],[784.033 2 0],[796.5 20 1],[800.8 40 2],[805 12 1],[807 50 2],[810 20 2],[832.8 15 1],[838.8 15 1],[853.2 30 1],[854.454 2 0],[857.974 1 0],[865.3 25 1],[867.1 15 2],[875.488 2 0],[876.154 3 0],[886.3 25 1],[890.781 2 0],[893.4 20 2],[965.704 2000 0],[982.778 40 0],[1010.45 20 0],[1013.88 15 0],[1030.06 20 0],[1053.619 20 0],[1107.244 50 0],[1155.16 15 0],[1171.037 1500 0],[1199.949 40 0],[1216.508 200 0],[1237.464 10 0],[1269.004 200 0],[1281.78 100 0],[1433.05 200 0],[1600.15 50 0],[2255.16 60 0]}{ALLx9000x9000x100x80x100x15x0}{UVx9000x9000x100x80x100x15x0}{VISx600x600x75x45x100x0x0}{IVx2000x2000x30x50x0x0x0}%
\pgfspectra@elt@search{#1}{Po}{[213.902 250 0],[220.38 300 -1],[222.067 300 0],[222.213 200 0],[228.422 200 -1],[234.461 250 0],[242.172 250 0],[242.609 300 0],[245.008 1500 0],[248.394 700 0],[249.053 700 0],[250.218 200 -1],[253.495 300 0],[255.733 300 0],[255.801 1500 0],[256.231 400 -1],[257.88 300 -1],[258.764 400 0],[263.701 200 -1],[264.536 300 0],[266.333 700 -1],[267.167 200 0],[276.192 600 0],[280.026 400 0],[282.411 250 0],[286.601 300 0],[291.931 400 0],[295.892 600 0],[300.321 2500 0],[306.931 450 0],[311.595 200 -1],[318.902 400 0],[324.024 600 0],[328.638 250 0],[332.86 600 0],[348.979 300 -1],[349.365 200 -1],[358.833 400 -1],[367.136 200 -1],[386.193 500 0],[405.198 200 -1],[417.052 1200 0],[423.613 250 -1],[441.558 200 -1],[449.321 800 0],[461.144 350 0],[486.712 200 -1],[487.624 400 0],[494.681 450 -1],[532.323 350 0],[574.485 300 0],[796.262 600 0],[843.387 300 0],[861.826 500 0],[922.787 250 -1]}{ALLx2500x2500x0x0x0x0x700}{UVx2500x2500x0x0x0x0x700}{VISx1200x1200x0x0x0x0x450}{IVx600x600x0x0x0x0x250}%
-\pgfspectra@elt@search{#1}{At}{[216.225 8 0],[224.401 10 0]}{ALLx10x10x0x0x0x0x0x0}{UVx10x10x0x0x0x0x0x0}{VISx0x0x0x0x0x0x0}{IVx0x0x0x0x0x0x0}
+\pgfspectra@elt@search{#1}{At}{[216.225 8 0],[224.401 10 0]}{ALLx10x10x0x0x0x0x0x0}{UVx10x10x0x0x0x0x0x0}{VISx0x0x0x0x0x0x0}{IVx0x0x0x0x0x0x0}%
\pgfspectra@elt@search{#1}{Rn}{[351.46 5 0],[373.989 10 0],[375.365 20 0],[391.72 10 0],[394.172 10 0],[395.236 10 0],[422.606 10 0],[430.776 80 0],[433.578 7 0],[434.96 100 0],[443.505 40 0],[445.925 50 0],[450.848 50 0],[457.772 50 0],[460.938 50 0],[472.176 30 0],[572.258 6 0],[606.192 10 0],[620.075 6 0],[638.045 6 0],[655.749 10 0],[660.643 10 0],[662.723 15 0],[666.96 6 0],[670.428 8 0],[675.181 20 0],[680.679 6 0],[683.695 8 0],[683.757 8 0],[689.116 10 0],[699.89 10 0],[705.542 200 0],[726.811 100 0],[729.1 20 0],[732.098 6 0],[741.904 10 0],[745 300 0],[747.089 8 0],[748.313 8 0],[751.413 8 0],[751.692 8 0],[752.393 6 0],[759.755 6 0],[760.128 8 0],[765.748 10 0],[773.843 10 0],[774.664 20 0],[780.982 100 0],[804.9 20 0],[809.951 100 0],[817.384 6 0],[827.096 100 0],[831.451 8 0],[834.974 6 0],[838.105 10 0],[848.748 10 0],[849.489 10 0],[852.095 20 0],[860.007 100 0],[863.976 10 0],[867.583 15 0],[880.775 10 0],[932.702 50 0],[994.857 6 0],[1010.613 5 0]}{ALLx300x300x0x0x0x0x0}{UVx20x20x0x0x0x0x0}{VISx300x300x0x0x0x0x0}{IVx100x100x0x0x0x0x0}%
\pgfspectra@elt@search{#1}{Ra}{[236.973 8 1],[246.055 8 1],[247.55 10 1],[258.661 8 1],[264.373 10 1],[270.896 20 1],[279.521 10 1],[281.376 30 1],[303.344 10 1],[310.18 5 0],[364.955 100 1],[381.442 200 1],[419.409 8 1],[424.472 8 1],[434.064 100 1],[443.627 20 1],[453.311 30 1],[464.129 8 0],[468.228 100 1],[469.928 8 0],[482.591 100 0],[485.607 10 0],[485.941 10 1],[492.753 10 1],[509.756 10 0],[520.593 10 0],[528.328 10 0],[532.029 10 0],[539.98 10 0],[540.023 20 0],[540.681 20 0],[548.213 8 0],[550.198 10 0],[555.357 10 0],[555.585 20 0],[561.666 10 0],[566.081 50 0],[581.363 20 1],[620.03 30 0],[633.69 10 0],[644.62 20 0],[648.732 20 0],[659.334 10 1],[671.932 10 1],[698.022 20 0],[711.85 20 0],[714.121 50 0],[722.516 20 0],[731.027 10 0],[783.812 20 0],[801.97 50 1],[817.731 6 0],[833.507 5 0],[993.221 5 0]}{ALLx200x100x200x0x0x0x0}{UVx100x5x100x0x0x0x0}{VISx200x100x200x0x0x0x0}{IVx50x20x50x0x0x0x0}%
\pgfspectra@elt@search{#1}{Ac}{[206.2 20 3],[210 8 1],[250.212 30 3],[255.808 100 3],[262.644 1000 2],[268.29 50 2],[271.25 20 1],[272.623 10 1],[276.018 10 1],[278.156 10 1],[279.083 5 3],[279.39 50 3],[279.759 20 1],[280.676 20 1],[283.347 8 1],[284.716 150 1],[289.52 8 1],[289.682 30 1],[292.302 30 1],[295.255 2000 2],[299.417 200 1],[304.33 500 1],[306.936 200 1],[307.807 100 1],[308.604 100 1],[308.737 100 1],[311.283 200 1],[312.016 100 1],[315.309 500 1],[315.441 600 1],[316.481 200 1],[322.47 20 3],[323.059 300 1],[323.77 150 1],[326.091 500 1],[331.801 100 1],[338.353 200 1],[339.278 2000 2],[341.384 200 1],[341.777 500 1],[348.116 500 1],[348.759 3000 2],[348.953 200 1],[352.924 100 1],[353.463 100 1],[355.499 200 1],[356.559 1000 1],[369.488 100 1],[375.667 300 1],[379.982 200 1],[386.312 2000 1],[391.447 100 1],[406.16 400 1],[408.844 3000 1],[416.84 3000 1],[417.998 100 0],[418.312 20 0],[419.44 20 0],[420.969 300 1],[435.913 300 1],[438.453 20 0],[438.641 1000 1],[439.671 20 0],[441.309 2000 2],[446.273 20 0],[450.72 1000 1],[456.987 3000 2],[460.545 500 1],[471.658 10 0],[472.016 400 1],[481.222 300 1],[494.518 100 1],[495.823 100 1],[496.087 100 1],[519.321 8 2],[544.638 150 1],[573.205 300 1],[575.897 400 1],[591.085 1000 1],[616.475 600 1],[616.783 200 1],[624.283 400 1],[635.986 20 0],[669.127 20 0],[729.04 6 0],[786.61 6 0]}{ALLx3000x100x3000x3000x100x0x0}{UVx3000x0x1000x3000x100x0x0}{VISx3000x100x3000x3000x0x0x0}{IVx6x6x0x0x0x0x0}%
diff --git a/graphics/pgf/contrib/pgf-spectra/pgf-spectra.sty b/graphics/pgf/contrib/pgf-spectra/pgf-spectra.sty
index 308c9bcc78..2135d34667 100644
--- a/graphics/pgf/contrib/pgf-spectra/pgf-spectra.sty
+++ b/graphics/pgf/contrib/pgf-spectra/pgf-spectra.sty
@@ -7,9 +7,10 @@
% Hugo Gomes @ 21/02/2023 (v2.2.0)
% Hugo Gomes @ 25/04/2023 (v3.0.0)
% Hugo Gomes @ 27/04/2023 (v3.0.1)
+% Hugo Gomes @ 07/07/2024 (v3.0.1a)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{pgf-spectra}[27/04/2023 pgf-spectra v3.0.1]%
+\ProvidesPackage{pgf-spectra}[07/07/2024 pgf-spectra v3.0.1a]%
\RequirePackage{tikz}%
\DeclareOption{LSE}{\input{pgf-spectra.data.LSE.tex}\xdef\pgfspectra@DATASET{1}}%
\DeclareOption{NIST}{\input{pgf-spectra.data.NIST.tex}\xdef\pgfspectra@DATASET{0}}%
@@ -640,15 +641,15 @@ precision=1,unit={}% NEW v3.0.0 (for data library)
\fi%
}%
\def\pgfspectra@utils@put@label{\ignorespaces%
- \ifx\pgfspectra@elt@chemsym\undefined\def\pgfspectra@elt@chemsym{}\fi%
+ \ifx\pgfspectra@elt@chemsym\undefined\def\pgfspectra@elt@chemsym{}\else\fi%
\pgfspectra@get@label@position%
\ifnum\pgfspectra@begin>\pgfspectra@end%
\ifcase\pgfspectra@label@position%
%west
\ifpgfspectra@drawaxis%\ifpgfspectra@axislabel%
- \node[\pgfspectra@labelfontcolor,font=\pgfspectra@labelfont,left,minimum width=2em,align=right] at (-2.5*\@pgfspectra@axis@height-\pgfspectra@width,0.5*\pgfspectra@height-1.25*\@pgfspectra@axis@height) {\pgfspectra@labelbtext\pgfspectra@elt@chemsym\pgfspectra@labelatext};%
+ \node[\pgfspectra@labelfontcolor,font=\pgfspectra@labelfont,left,minimum width=2.1em,align=right] at (-2.5*\@pgfspectra@axis@height-\pgfspectra@width,0.5*\pgfspectra@height-1.25*\@pgfspectra@axis@height) {\pgfspectra@labelbtext\pgfspectra@elt@chemsym\pgfspectra@labelatext};%
\else%
- \node[\pgfspectra@labelfontcolor,font=\pgfspectra@labelfont,left,minimum width=2em,align=right] at (-\pgfspectra@width,0.5*\pgfspectra@height) {\pgfspectra@labelbtext\pgfspectra@elt@chemsym\pgfspectra@labelatext};%
+ \node[\pgfspectra@labelfontcolor,font=\pgfspectra@labelfont,left,minimum width=2.1em,align=right] at (-\pgfspectra@width,0.5*\pgfspectra@height) {\pgfspectra@labelbtext\pgfspectra@elt@chemsym\pgfspectra@labelatext};%
\fi%
\or%north west
\ifpgfspectra@drawaxis%
@@ -693,9 +694,9 @@ precision=1,unit={}% NEW v3.0.0 (for data library)
\ifcase\pgfspectra@label@position%
%west
\ifpgfspectra@drawaxis%
- \node[\pgfspectra@labelfontcolor,font=\pgfspectra@labelfont,left,minimum width=2em,align=right] at (-2.5*\@pgfspectra@axis@height,0.5*\pgfspectra@height-1.25*\@pgfspectra@axis@height) {\pgfspectra@labelbtext\pgfspectra@elt@chemsym\pgfspectra@labelatext};%
+ \node[\pgfspectra@labelfontcolor,font=\pgfspectra@labelfont,left,minimum width=2.1em,align=right] at (-2.5*\@pgfspectra@axis@height,0.5*\pgfspectra@height-1.25*\@pgfspectra@axis@height) {\pgfspectra@labelbtext\pgfspectra@elt@chemsym\pgfspectra@labelatext};%
\else%
- \node[\pgfspectra@labelfontcolor,font=\pgfspectra@labelfont,left,minimum width=2em,align=right] at (0,0.5*\pgfspectra@height) {\pgfspectra@labelbtext\pgfspectra@elt@chemsym\pgfspectra@labelatext};%
+ \node[\pgfspectra@labelfontcolor,font=\pgfspectra@labelfont,left,minimum width=2.1em,align=right] at (0,0.5*\pgfspectra@height) {\pgfspectra@labelbtext\pgfspectra@elt@chemsym\pgfspectra@labelatext};%
\fi%
\or%north west
\ifpgfspectra@drawaxis%
diff --git a/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.pdf b/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.pdf
index e003e00f80..a627994bbf 100644
--- a/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.pdf
+++ b/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.tex b/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.tex
index 1661670404..4ffb5d4c87 100644
--- a/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.tex
+++ b/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.tex
@@ -20,12 +20,12 @@
\setlength{\parindent}{0pt}
\setlength{\oddsidemargin}{0pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\version{3.0.1}%
+\def\version{3.0.1a}%
\def\inversion#1{#1}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[pdfstartview={ },colorlinks=true, linkcolor=black!50!green, citecolor=gray, urlcolor=teal, hyperindex, plainpages=false,bookmarksopenlevel=1,bookmarksopen=true]{hyperref}%
\hypersetup{%Start options on pdf
-pdftitle = {Manual for pgf-spectra (v\inversion{3.0.1})},%
+pdftitle = {Manual for pgf-spectra (v\inversion{3.0.1a})},%
pdfsubject = {Emission and absorption lines of the elements},%
pdfkeywords = {Draw the spectrum of elements in a simple way via pgf/TikZ environment. It's possible to draw a desired spectrum, continuous or discrete.},%
pdfauthor = {\textcopyright Hugo Gomes},%
@@ -80,7 +80,7 @@ pdfproducer = {pdfeTeX-1.\the\pdftexversion\pdftexrevision},
\end{titlepage}
\newpage%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pagestyle{empty}%
+\pagestyle{empty}\enlargethispage{\baselineskip}%
\pdfbookmark[1]{Table of contents}{pdfContents}%
\tableofcontents%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -97,6 +97,18 @@ pdfproducer = {pdfeTeX-1.\the\pdftexversion\pdftexrevision},
\vfill\vfill\vfill\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{What's new}
+\vspace{-32pt}\ \subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ In version 3.0.1a}%
+\addcontentsline{toc}{subsection}{In version 3.0.1a}%
+\begin{itemize}
+\item Removed lines data outside the range $10\,nm$ -- $4000\,nm$ (H, He, Be, C, Si, Kr, Sn, I) in LSE data file, which generate a package warning, e.g.
+\texttt{Package pgf-spectra Warning: invalid wavelength (4051.1602nm). The wavelength must be lesser or\\ equal to 4000nm (NIR)... on input line 27}.
+\item Fixed chemical symbol label width producing incorrect alignment on consecutive lines for the spectrum of some elements, e.g.
+\\ \makebox[\linewidth][s]{\hrulefill}
+\\ \txtspecstyle[axis,begin=400,end=700,axis step=20,axis ticks=9,\\ axis color=lightgray,axis font color=black,label,width=.88\string\textwidth,height=0.7cm]
+\\ \bs{noindent}\bs{pgfspectra}\lp\red{element=Cl}\rp
+\\ \bs{noindent}\bs{pgfspectra}\lp\red{element=Rn}\rp
+\\ \makebox[\linewidth][s]{\hrulefill}
+\end{itemize}
\vspace{-32pt}\ \subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ In version 3.0.1}%
\addcontentsline{toc}{subsection}{In version 3.0.1}%
\begin{itemize}
@@ -242,7 +254,7 @@ with the following specific keys% \pgfspectraplotshade[options]{name}
\\ [10pt]According to the information on the page the listed lines are based on "Line Spectra of the Ele\-ments", Joseph Reader and Charles H. Corliss CRC Handbook of Chemistry and Physics. This book refers that The table contains the outstanding spectral lines of neutral ($I$) and singly ionized ($II$) atoms of the elements from hydrogen through plutonium ($Z=1-94$); selected strong lines from doubly ionized ($III$), triply ionized ($IV$), and quadruply ionized ($V$) atoms are also included.
\\ [6pt]\makebox[66pt][s]{}\begin{minipage}{\linewidth-66pt}\color{black!70}\small Note: pst-spectra documentation refers "\textit{Line Spectra of the Elements from the Astronomical Data Center of NASA}" as the source material, but I'm assuming the original source is "\textit{Line Spectra of the Ele\-ments}"\textit{, Joseph Reader and Charles H. Corliss CRC Handbook of Chemistry and Physics}, obtained from \href{http://cdsarc.u-strasbg.fr/viz-bin/Cat?VI/16}{http://cdsarc.u-strasbg.fr/viz-bin/Cat?VI/16}.\end{minipage}
\\ [12pt]\tikz{\node[text width=\linewidth-4mm,draw=purple,rounded corners=2pt,fill=black!10!purple!10,inner sep=2mm,text justified] {To use this data set load the package \pack{} with the option \verb|LSE| (acronym to Line Spectra of the Elements):%
- \\ [6pt]\large\color{purple}\verb|\usepackage[LSE]{pgf-spectra}|\\ [6pt]\small\color{orange}\hfill Number of lines provided: 46065 (see file pgf-spectraDataLSE.pdf)};}
+ \\ [6pt]\large\color{purple}\verb|\usepackage[LSE]{pgf-spectra}|\\ [6pt]\small\color{orange}\hfill Number of lines provided: 46031 (see file pgf-spectraDataLSE.pdf)};}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Data based on NIST}
\tikz{\node[text width=\linewidth-4mm,draw=teal,rounded corners=2pt,fill=black!10,inner sep=2mm,text centered] {This set was obtained from \href{https://physics.nist.gov/PhysRefData/Handbook/Tables/findinglist.htm}{https://physics.nist.gov/PhysRefData/Handbook/Tables/findinglist.htm}};}
@@ -2318,7 +2330,7 @@ colorbar horizontal,colormap access=map]
\\ \header
\\ [-1pt]\linhaimpar{\hyperlink{optionlib:backcolor}{back color}}{background color of the table header, of the \textit{element(s)} column, of the table border lines and of the lines between rows}{color}{black!10}{any named color or user defined color}%
\\ [-1pt]\linhapar{\hyperlink{optionlib:databackcolor}{data back color}}{the background color of each data row}{color}{white}{any named color or user defined color}%
-\\ [-1pt]\linhaimpar{\hyperlink{optionlib:elementscolumnwidth}{elements column width}}{the width of the \textit{element(s)} column}{length}{2.5em}{up to maximum \TeX\ dimension (16384pt)}%
+\\ [-1pt]\linhaimpar{\hyperlink{optionlib:elementscolumnwidth}{elements column\vskip0pt width}}{the width of the \textit{element(s)} column}{length}{2.5em}{up to maximum \TeX\ dimension (16384pt)}%
\\ [-1pt]\linhapar{\hyperlink{optionlib:textcolor}{text color}}{the color of all text in the table}{color}{black}{any named color or user defined color}%
\\ [-1pt]\linhaimpar{\hyperlink{optionlib:title}{title}}{the title in the table header}{text}{<REDSHIFTED>\\ SPECTRAL LINES OF ELEMENT(S) \ldots}{}%
\\ [-1pt]\linhapar{\hyperlink{optionlib:width}{width}}{the total width of the table}{length}{\textbackslash linewidth}{up to maximum \TeX\ dimension (16384pt)}%
diff --git a/graphics/pgf/contrib/pgfgantt/README b/graphics/pgf/contrib/pgfgantt/README
index b46f25054c..017c065fc6 100644
--- a/graphics/pgf/contrib/pgfgantt/README
+++ b/graphics/pgf/contrib/pgfgantt/README
@@ -1,19 +1,22 @@
-The pgfgantt package v5.0
+The pgfgantt package v5.0a
------------------------------------------------------------------------------
This package is 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).
The pgfgantt package provides the ganttchart environment, which
draws a Gantt chart within a TikZ picture. The user may add various
-elements to the chart, for example, titles, bars, groups, milestones and different
-links between these elements. The appearance of the chart elements
+elements to the chart, for example, titles, bars, groups, milestones and
+different links between these elements. The appearance of the chart elements
is highly customizable, and even new chart elements may be defined.
-The package makes use of pgf/TikZ (http://tug.ctan.org/pkg/pgf).
+The package requires pgf/TikZ (https://ctan.org/pkg/pgf).
Installation: Run pgfgantt.ins through LaTeX and follow the instructions.
+This package is unmaintained. If you want to volunteer to take over
+the maintenance, contact me at https://wolfgang.esser-skala.at/contact/ .
+
--
-Wolfgang Skala
-10th January 2018
+Wolfgang Esser-Skala
+2024-06-19
diff --git a/graphics/pgf/contrib/pgfgantt/pgfgantt-doc.pdf b/graphics/pgf/contrib/pgfgantt/pgfgantt-doc.pdf
new file mode 100644
index 0000000000..62c09d84c7
--- /dev/null
+++ b/graphics/pgf/contrib/pgfgantt/pgfgantt-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfgantt/pgfgantt.dtx b/graphics/pgf/contrib/pgfgantt/pgfgantt.dtx
index 7bb4d52138..e734668f59 100644
--- a/graphics/pgf/contrib/pgfgantt/pgfgantt.dtx
+++ b/graphics/pgf/contrib/pgfgantt/pgfgantt.dtx
@@ -1,19 +1,19 @@
% \iffalse meta-comment
%
-% Copyright (C) 2018 by Wolfgang Skala
+% Copyright (C) 2024 by Wolfgang Esser-Skala
%
% 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
+% 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.
%
% \fi
%
% \iffalse
-%<pgfgantt>\ProvidesPackage{pgfgantt}[2018/01/10 v5.0 Draw Gantt diagrams with TikZ]
+%<pgfgantt>\ProvidesPackage{pgfgantt}[2024/06/19 v5.0a Draw Gantt diagrams with TikZ]
%<pgfgantt>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%
%<*driver>
@@ -181,30 +181,10 @@
\ignorespaces}
\let\endoption\endmacro
\let\endintmacro\endmacro
-\renewenvironment{theglossary}{\glossary@prologue\GlossaryParms\let\item\@idxitem\ignorespaces}{}
\makeatother
\AtBeginDocument{\lstMakeShortInline|}
-\begingroup
- \makeatletter
- \def\x\begingroup#1\@nil{%
- \endgroup
- \def\DoNotIndex{%
- \begingroup
- \@makeother\#%
- \@makeother\$%
- \@makeother\%%
- \@makeother\^%
- \@makeother\_%
- \@makeother\~%
- \@makeother\ %
- \@makeother\&%
- #1%
- }%
- }%
-\expandafter\x\DoNotIndex\@nil
-
\usepackage[
hyperfootnotes=false,
bookmarksnumbered,%
@@ -237,27 +217,13 @@
\def\TikZ{Ti\textit{k}Z}
\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
-\def\GlossaryParms{%
- \def\pfill##1{}
- \parindent 0pt
- \parskip 0pt plus 1pt
- \small\raggedright
- \def\@idxitem{\par\hangindent 30pt}%
- \def\subitem{\@idxitem\hspace*{15pt}}%
- \def\subsubitem{\@idxitem\hspace*{25pt}}%
- \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}%
-}
-
\usepackage{pgfgantt}
\usetikzlibrary{shadows,shadings,decorations.pathmorphing,shapes.misc}
\EnableCrossrefs
\CodelineIndex
-\RecordChanges
\IndexPrologue{\clearpage\section{Index}\markboth{Index}{Index}Bold numbers refer to the page where the corresponding entry is described; italic numbers refer to the code line of the definition; upright numbers refer to the code lines where the entry is used.}
-\GlossaryPrologue{\clearpage\section{Change History}\markboth{Change history}{Change history}}
-
\setkomafont{title}{\rmfamily\bfseries}
\addtokomafont{sectioning}{\rmfamily}
@@ -270,34 +236,15 @@
%</driver>
% \fi
%
-% \CheckSum{2245}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
-%
% \GetFileInfo{pgfgantt.sty}
%
% \DoNotIndex{\@auxout,\@empty,\@firstoftwo,\@ifundefined,\@namedef,\@nameuse,\@tempa,\@tempb,\@tempc,\@tempcnta,\@tempcntb,\@tempdima,\advance,\anchor,\backgroundpath,\begin,\begingroup,\bfseries,\breakforeach,\clip,\csname,\def,\divide,\draw,\edef,\else,\end,\endcsname,\endgroup,\expandafter,\fi,\foreach,\global,\i,\ifcase,\ifdate,\ifdim,\ifnum,\ifx,\inheritanchor,\inheritanchorborder,\inheritbackgroundpath,\inheritsavedanchors,\itshape,\kernel@ifnextchar,\let,\multiply,\newcommand,\newcount,\newenvironment,\newif,\node,\normalcolor,\normalfont,\normalsize,\northeast,\outernortheast,\PackageError,\PackageWarning,\path,\pgf@process,\pgf@x,\pgf@y,\pgf@xa,\pgf@xb,\pgf@xc,\pgf@ya,\pgf@yb,\pgf@yc,\pgfcalendar,\pgfcalendarbeginjulian,\pgfcalendarcurrentday,\pgfcalendarcurrentjulian,\pgfcalendarcurrentmonth,\pgfcalendarcurrentweekday,\pgfcalendarcurrentyear,\pgfcalendardatetojulian,\pgfcalendarendiso,\pgfcalendarifdateday,\pgfcalendarifdatemonth,\pgfcalendarifdateyear,\pgfcalendarjuliantodate,\pgfcalendarmatchestrue,\pgfdeclareshape,\pgfextractx,\pgfkeys,\pgfkeyscurrentname,\pgfkeyssetvalue,\pgfkeysvalueof,\pgfmathparse,\pgfmathprintnumber,\pgfmathresult,\pgfmathsetlength,\pgfmathsetmacro,\pgfpathclose,\pgfpathlineto,\pgfpathmoveto,\pgfpoint,\pgfpointadd,\pgfpointanchor,\pgfpointdiff,\pgfpointscale,\pgfqkeys,\protected@write,\relax,\RequirePackage,\savedanchor,\scriptsize,\setcounter,\small,\southwest,\stepcounter,\string,\strut,\t,\the,\tikz@align@newline,\usetikzlibrary,\value,\x,\xdef}
%
-%
+%
% \title{Drawing Gantt Charts in \LaTeX\\with \TikZ}
% \subtitle{The \texttt{pgfgantt} Package}
-% \author{Wolfgang Skala\thanks{Department of Biosciences, University of Salzburg, Austria; \texttt{Wolfgang.Skala@sbg.ac.at}}}
-% \date{\fileversion\\\filedate}
+% \author{\texorpdfstring{Wolfgang Esser-Skala\thanks{Computational Systems Biology Group, Department of Biosciences and Medical Biology, University of Salzburg, Austria; \texttt{Wolfgang.Esser-Skala@plus.ac.at}}}{Wolfgang Esser-Skala}}
+% \date{\fileversion\\\filedate}
% \maketitle
%
% \begin{abstract}
@@ -305,72 +252,13 @@
% \end{abstract}
%
% \clearpage\tableofcontents
-% \changes{v5.0}{2018/01/10}{\cs{gantttitlecalendar} now recognizes the \texttt{decade} key.}
-% \changes{v5.0}{2018/01/10}{Key \texttt{compress calendar} has been replaced by \texttt{time slot unit} to allow an additional level of compression (year).}
-% \changes{v5.0}{2018/01/10}{The command \cs{ganttvrule} allows to draw general vertical rules (similar to the today rule). The keys \texttt{vrule}, \texttt{vrule offset}, \texttt{vrule label font} and \texttt{vrule label text} configure those rules.}
-% \changes{v5.0}{2018/01/10}{The key \texttt{expand chart} was added, which specifies that a chart should expand horizontally to a given dimension.}
-% \changes{v5.0}{2018/01/10}{The key \texttt{title label text} was added to allow fine-tuning of title label formatting.}
-% \changes{v5.0}{2018/01/10}{Made \pack{pgfgantt} robust to \pack{amsgen}'s redefinition of \cs{@ifstar}.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{link label anchor} was renamed to \texttt{link label node}.}
-% \changes{v4.0}{2013/06/01}{\cs{newganttchartelement} defines completely new chart elements.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{progress label anchor} was replaced by \texttt{bar}/\texttt{group}/\texttt{milestone progress label node}.}
-% \changes{v4.0}{2013/06/01}{The keys \texttt{bar}/\texttt{group}/\texttt{milestone progress label anchor} were added.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{progress label font} was replaced by the keys \texttt{bar}/\texttt{group}/\texttt{milestone progress label font}.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{incomplete} was removed.}
-% \changes{v4.0}{2013/06/01}{The keys \texttt{group right}/\texttt{left peak} and \texttt{group peaks} were replaced by \texttt{group right}/\texttt{left peak tip position}, \texttt{group peaks tip position}, \texttt{group right}/\texttt{left peak width}, \texttt{group peaks width}, \texttt{group right}/\texttt{left peak height} and \texttt{group peaks height}.}
-% \changes{v4.0}{2013/06/01}{Chart elements are now nodes, so the corresponding styles must specify a node shape.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{time slot modifier} was renamed to \texttt{chart element start border}.}
-% \changes{v4.0}{2013/06/01}{The keys \texttt{bar}/\texttt{group}/\texttt{milestone label inline anchor} were renamed to \texttt{bar}/\texttt{group}/\texttt{milestone inline label node}.}
-% \changes{v4.0}{2013/06/01}{The keys \texttt{bar}/\texttt{group}/\texttt{milestone label shape anchor} were renamed to \texttt{bar}/\texttt{group}/\texttt{milestone inline label anchor}.}
-% \changes{v4.0}{2013/06/01}{The keys \texttt{bar}/\texttt{group}/\texttt{milestone label anchor} were renamed to \texttt{bar}/\texttt{group}/\texttt{milestone label node}.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{title label anchor} was renamed to \texttt{title label node}.}
-% \changes{v4.0}{2013/06/01}{\cs{gantttitlecalendar} prints a title calendar.}
-% \changes{v4.0}{2013/06/01}{The keys \texttt{calendar week text} and \texttt{compress calendar} were added.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{newline shortcut} determines whether the shortcut for line breaks is defined in the chart. In this case, \cs{ganttalignnewline} allows line breaks in the node text.}
-% \changes{v4.0}{2013/06/01}{The keys \texttt{today offset}, \texttt{today label font} and \texttt{today label node} were added.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{today} accepts a time slot specifier.}
-% \changes{v4.0}{2013/06/01}{The canvas is now a node with shape \texttt{rectangle} by default.}
-% \changes{v4.0}{2013/06/01}{\cs{newgantttimeslotformat} allows the user to define custom time slot formats.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{time slot format/start date} specifies the internal date representation of digit 1 in the \texttt{simple} time slot format.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{time slot format/base century} provides the century for autocompletion of two-digit years.}
-% \changes{v4.0}{2013/06/01}{The key \texttt{time slot format} changes the format of time slot specifiers.}
-% \changes{v4.0}{2013/06/01}{The \texttt{ganttchart} environment now requires two mandatory arguments.}
-%
-% \changes{v3.0}{2012/01/25}{\cs{setganttlinklabel} specifies the label for all links of a certain type. The \texttt{link label} key locally overrides any label set by this command.}
-% \changes{v3.0}{2012/01/25}{The \texttt{chart element} shape supports four additional anchors (\texttt{on left}, \texttt{on top}, \texttt{on right} and \texttt{on bottom}).}
-% \changes{v3.0}{2012/01/25}{\cs{@gtt@get} has been renamed to \cs{ganttvalueof} to provide a convenient access for link type authors.}
-% \changes{v3.0}{2012/01/25}{\cs{@gtt@keydef} and \cs{@gtt@stylekeydef} have been rewritten to support \texttt{pgfkey}'s abilities to store key values.}
-% \changes{v3.0}{2012/01/25}{New auxiliary macros for \cs{newganttlinkstyle}: \cs{xLeft}, \cs{xRight}, \cs{yUpper}, \cs{yLower}, \cs{ganttsetstartanchor}, \cs{ganttsetendanchor} and \cs{ganttlinklabel}.}
-% \changes{v3.0}{2012/01/25}{Completely rewrote the code for links (again). Definition of new link types is now possible (via \cs{newganttlinktype} and \cs{newganttlinktypealias}).}
-% \changes{v3.0}{2012/01/25}{The \texttt{bar/group/milestone label shape anchor} keys allow for a fine-tuned placement of chart element labels.}
-% \changes{v3.0}{2012/01/25}{All style keys (\texttt{canvas}, \texttt{bar} etc.) only support the common \TikZ\ style key syntax.}
-% \changes{v2.1}{2011/11/10}{The \texttt{inline} key moves labels close to their respective chart elements.}
-% \changes{v2.1}{2011/11/10}{Added three keys (\texttt{bar/group/milestone label inline anchor}) for placing inline labels.}
-% \changes{v2.1}{2011/11/10}{The \texttt{ganttchart} environment may be used outside a \texttt{tikzpicture}.}
-% \changes{v2.0}{2011/10/10}{The syntax of \cs{ganttlink} was completely changed. The command now takes one optional and \textit{two} mandatory arguments. The latter specify the name of the chart elements to be linked. Consequently, the keys \texttt{b-b}, \texttt{b-m}, \texttt{m-b} and \texttt{m-m} were removed. The keys \texttt{s-s}, \texttt{s-f}, \texttt{f-s} and \texttt{f-f} are now values for the \texttt{link type} key.}
-% \changes{v2.0}{2011/10/10}{The optional argument of \cs{ganttnewline} now also accepts a style.}
-% \changes{v2.0}{2011/10/10}{Removed the \texttt{hgrid shift} and \texttt{last line height} keys.}
-% \changes{v2.0}{2011/10/10}{Removed the \texttt{vgrid lines list} key, as its behaviour can be simulated by an appropriate \meta{style list} for \texttt{vgrid}.}
-% \changes{v2.0}{2011/10/10}{Added style lists for the horizontal and vertical grid.}
-% \changes{v2.0}{2011/10/10}{Removed the \texttt{vgrid style} key.}
-% \changes{v2.0}{2011/10/10}{Completely rewrote the calculation of coordinates.}
-% \changes{v2.0}{2011/10/10}{The \texttt{x unit}, \texttt{y unit title} and \texttt{y unit chart} keys specify the width of time slots and the height of title or chart lines, respectively. Thus, one can draw titles whose height differs from the rest of the chart. Furthermore, the $x$- and $y$-dimensions of the chart are independent of the dimensions of the surrounding \texttt{tikzpicture}.}
-% \changes{v1.1}{2011/04/18}{\texttt{link tolerance} decides whether a five- or a three-part link is drawn.}
-% \changes{v1.1}{2011/04/18}{\texttt{milestone label text} configures the text of a milestone label.}
-% \changes{v1.1}{2011/04/18}{\texttt{bar label text} configures the text of a bar label.}
-% \changes{v1.1}{2011/04/18}{The \texttt{time slot modifier} key has been added. If set to zero, all $x$-coordinates are interpreted as given, without regarding them as time slots.}
-% \changes{v1.1}{2011/04/18}{The \texttt{vgrid lines list} key determines the number of vertical grid lines drawn.}
-% \changes{v1.1}{2011/04/18}{The introduction clarifies what I mean by ``a current \textsc{pgf} installation''.}
-% \changes{v1.1}{2011/04/18}{\texttt{group label text} configures the text of a group label.}
-% \changes{v1.0}{2011/03/01}{Initial release}
-%
%
% \clearpage\section{Introduction}
%
-% The \pack{pgfgantt} package allows you to draw Gantt charts in \LaTeX. Thus, you can describe simple project schedules without having to include images produced by external programs. Similar to Martin Kumm's \pack{gantt} package\footnote{\url{http://www.martin-kumm.de/tex_gantt_package.php}} (which inspired \pack{pgfgantt}'s fundamental aspects), \pack{pgfgantt} bases upon \textsc{pgf} and its \TikZ\ frontend\footnote{\url{http://ctan.org/tex-archive/graphics/pgf/}}. Besides, it provides a comprehensive (and portable) alternative to \pack{pst-gantt}\footnote{\url{http://ctan.org/tex-archive/graphics/pstricks/contrib/pst-gantt/}}.
+% The \pack{pgfgantt} package allows you to draw Gantt charts in \LaTeX. Thus, you can describe simple project schedules without having to include images produced by external programs. Similar to Martin Kumm's \pack{gantt} package\footnote{\url{https://www.martin-kumm.de/tex_gantt_package.php}} (which inspired \pack{pgfgantt}'s fundamental aspects), \pack{pgfgantt} bases upon \textsc{pgf} and its \TikZ\ frontend\footnote{\url{https://ctan.org/pkg/pgf/}}. Besides, it provides a comprehensive (and portable) alternative to \pack{pst-gantt}\footnote{\url{https://ctan.org/pkg/pst-gantt/}}.
%
% \paragraph{Requirements} \pack{pgfgantt} requires a \textit{current} \textsc{pgf} installation. Note that the version number must at least be 2.10, dated October 25th, 2010. Furthermore, \pack{pgfgantt}~\fileversion\ and above is not fully downwards compatible.
-%
+%
% \paragraph{Suggestions} Please report any suggestions and improvements at the project's GitHub page (\url{https://github.com/skafdasschaf/latex-pgfgantt}).
%
% \paragraph{Acknowledgements} I would like to thank the following people for their ideas concerning new features:
@@ -425,7 +313,7 @@
% \end{ganttchart}
% \end{center}
%
-%
+%
% \subsection{Specifying Keys}
%
% \textit{Keys} (sometimes called \textit{options}) modify the output from \pack{pgfgantt}'s commands. You may specify a key in two ways: (1) Pass it to the optional argument present in each command, e.\,g.
@@ -439,7 +327,7 @@
% Since \pack{pgfgantt} uses the \pack{pgfkeys} package for key management, all its keys reside in the |/pgfgantt/| path. However, if you set your keys by one of the methods explained above, this path is automatically prepended to each key.
%
% \subsection{The Canvas}
-%
+%
% Let us have a look at the basic anatomy of a Gantt chart and define some common terms. Each \textit{chart} consists of several \textit{lines}, which may contain one or more \textit{title elements} (at the top) or \textit{chart elements} (such as bars, groups and milestones). From left to right, the chart is divided into an integer number of \textit{time slots} that represent the basic $x$-unit.
%
% The \DescribeEnv{ganttchart}|ganttchart| environment draws a single Gantt chart:
@@ -449,7 +337,7 @@
% \end{ganttchart}
% \end{texcode}
% The environment has one optional argument, which specifies the \meta{options} for the chart, and two mandatory arguments, which indicate the start and end time slot specifier. Although you will often put a |ganttchart| into a |tikzpicture| environment, you may actually use this environment on its own. \pack{pgfgantt} checks whether a chart is surrounded by a |tikzpicture| and adds this environment if necessary.
-%
+%
% \begin{key}{time slot format}{\meta{format}}{simple}
% Sets the \meta{format} of time slot specifiers. A \textbf{time slot specifier} (abbreviated ``tss'') denotes a certain time slot along the horizontal axis. \pack{pgfgantt} defines a range of formats:
% \begin{itemize}
@@ -469,23 +357,23 @@
% \textit{Examples:} \texttt{2013-03-14}, \texttt{13/03/14}, \texttt{2013.3.14}
% \end{itemize}
% \end{key}
-%
+%
% \noindent Two subkeys of \opt{time slot format} let you configure \pack{pgfgantt}'s behavior regarding automatic completion of abbreviated dates:
-%
+%
% \begin{key}{time slot format/base century}{\meta{year}}{2000}
% Sets the century for auto-completion of two-digit years (used by the time slot formats \texttt{little-endian}, \texttt{middle-endian} and \texttt{big-endian}). Consequently, default settings convert a year like \texttt{13} to \texttt{2013}.
% \end{key}
-%
+%
% \begin{key}{time slot format/start date}{\meta{ISO-standard date}}{2000-01-01}
% Numbers denoting time slots in the \texttt{simple} format are internally converted to a date, where \texttt{1} is converted to \meta{ISO-standard date}, \texttt{2} to $\meta{ISO-standard date} + 1$ etc.
% \end{key}
-%
+%
% \bigskip\noindent Advanced users may add their own time slot \DescribeMacro{\newgantttimeslotformat}formats:
% \begin{texcode}
% \newgantttimeslotformat`\marg{name}\marg{converter code}'
% \end{texcode}
% Defines a new time slot format called \meta{name}. The \meta{converter code} must convert the time slot specifier stored in |#1| to its corresponding Julian day number (see section~57 of the \TikZ\ manual) and assign this number to the count register |#2|. The \meta{converter code} is executed within a \TeX\ group, so you may use temporary macros like |\@tempa|, counts like |\@tempcnta| etc.
-%
+%
% For example, we would like to create a format called \texttt{stardate}, where dates are given as ``\meta{year}\texttt{.}\meta{day of year}''. Thus, we will enter 24th February 2259 as ``\texttt{2259.55}''. To this end, we write the following code:
% \par\bigskip\noindent
% \begin{texcode}[numbers=left]
@@ -498,10 +386,10 @@
% \advance#2 by-1\relax%
% \advance#2 by\stardateday\relax%
% }
-%
+%
% \begin{ganttchart}[
% hgrid,
-% vgrid,
+% vgrid,
% time slot format=stardate
% ]{2259.55}{2259.67}
% \gantttitlecalendar{year, month=name, day} \\
@@ -517,18 +405,18 @@
% \advance#2 by-1\relax%
% \advance#2 by\stardateday\relax%
% }
-%
+%
% \begin{ganttchart}[
% hgrid,
-% vgrid,
+% vgrid,
% time slot format=stardate
% ]{2259.55}{2259.67}
% \gantttitlecalendar{year, month=name, day} \\
% \end{ganttchart}
% \end{center}
-%
+%
% \noindent The macro |\decomposestardate| (lines 2--4) has two delimited arguments: The first one is delimited by a period and the second one by |\relax|. The call in line 5 decomposes the tss stored in |#1| and saves the day in |\stardateday| and the year in |\stardateyear|. |\pgfcalendardatetojulian| (section~57.1.1 of the \TikZ\ manual) calculates the Julian date of the first day of |\stardateyear| and stores it in |#2| (line 6). We then subtract 1 from |#2| (line 7) and add the |\stardateday| (line 8).
-%
+%
% \begin{key}[./style=]{canvas}{\meta{style}}{shape=rectangle, draw, fill=white}
% The \opt{canvas} key changes the appearance of the canvas. \meta{style} is a list of \TikZ\ keys suitable for the \meta{options} of a \TikZ\ node (such as |shape=rectangle|, |fill| or |draw|; see chapter~16 of the \TikZ\ manual). By default, the canvas is a white rectangle with a black frame.
% \par\bigskip\noindent
@@ -617,9 +505,9 @@
% \opt{hgrid} draws a horizontal grid which starts immediately below the last title element. The key can be specified in four different ways: Firstly, \opt{hgrid}|=false| eliminates the horizontal grid. You may omit this declaration, since it is the default. Secondly, both \opt{hgrid} and \opt{hgrid}|=true| activate the horizontal grid, which is then drawn in the default style |dotted|. Finally, \opt{hgrid}|=|\meta{style list} draws the horizontal grid in the given \meta{style list} (see below).
%
% \opt{hgrid style} changes the style of single horizontal grid lines that are drawn with |\ganttnewline[grid]| (see section~\ref{ssc:LineBreaks}).
-%
+%
% The \opt{vgrid} key governs the vertical grid; otherwise, use it exactly like \opt{hgrid}.
-%
+%
% \textit{Style lists} allow you to draw the grid lines in different styles. Each style list consists of several \textit{style list items} separated by a comma. A style list item has the general syntax |*{|\meta{n}|}{|\meta{style}|}| and orders the package to repeat the \meta{style} \meta{n}-times. (This syntax is reminiscent of column specifications in a |tabular| environment.) Thus, the list |*2{red}, *1{green}, *{10}{blue, dashed}| instructs \pack{pgfgantt} to draw first two red vertical grid lines, then a green one and finally ten dashed blue lines. If any grid lines remain to be drawn at the end of the list, the package starts again at the beginning of the list.
% \par\bigskip\noindent
% \begin{texcode}
@@ -642,7 +530,7 @@
% \ganttbar{}{9}{20}
% \end{ganttchart}
% \end{center}
-%
+%
% In most situations, you can omit the multiplier |*1|. Hence, the following style lists are equal:\\
% |{*1{red}, *1{blue, dashed}}|\\
% |{{red}, {blue, dashed}}|\\
@@ -653,7 +541,7 @@
% \begin{minipage}[t]{.45\textwidth}
% \begin{texcode}
% % wrong code
-%
+%
% \begin{ganttchart}[
% hgrid=true,
% vgrid={{red, dotted}}
@@ -667,7 +555,7 @@
% \begin{minipage}[t]{.45\textwidth}
% \begin{texcode}
% % correct code
-%
+%
% \begin{ganttchart}[
% hgrid=true,
% vgrid={*1{red, dotted}}
@@ -717,7 +605,7 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
+%
% \begin{key}{today}{\meta{tss}}{none}
% \keyline{today offset}{\meta{number}}{1}
% \keyline[/.style=]{today rule}{\meta{style}}{dashed, line width=1pt}
@@ -787,13 +675,13 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
-%
+%
+%
% \subsection{Line Breaks between Chart Elements}
% \label{ssc:LineBreaks}
%
% \pack{pgfgantt} does not automatically begin a new line after finishing a \DescribeMacro{\ganttnewline}chart element. Instead, you must insert an explicit line break with |\ganttnewline|.
-%
+%
% \begin{key}{newline shortcut}{\meta{boolean}}{true}
% If true, \DescribeMacro{\\}|\\| is defined as a shortcut for |\ganttnewline| within a |ganttchart| environment, so that the syntax is reminiscent of \LaTeX's |tabular| enviroment.
% \par\bigskip\noindent
@@ -868,7 +756,7 @@
% }{1}{3}
% \end{ganttchart}
% \end{center}
-%
+%
% Even if you prefer a canvas without a horizontal grid, you may nevertheless want to separate certain lines by a grid rule. For this purpose, specify the optional argument |[grid]| for |\ganttnewline| (or |\\|), which draws a grid rule in \opt{hgrid style} between the current and the new line. Alternatively, directly give the desired style as optional argument.
% \par\bigskip\noindent
% \begin{texcode}
@@ -921,7 +809,7 @@
% \gantttitlelist`\oarg{options}\marg{pgffor list}\marg{length of each element}'
% \end{texcode}
% This macro generates one title element for each element of the \meta{pgffor list}. The second mandatory argument specifies the \meta{length of each element}. Refer to section~56 of the \TikZ\ manual for the detailed syntax for the \meta{pgffor list}.
-%
+%
% A simple application is to draw twelve title elements that contain the numbers from 1 to 12. The \meta{pgffor list} is |1,...,12|.
% \par\bigskip\noindent
% \begin{texcode}
@@ -942,9 +830,9 @@
% \begin{texcode}
% \gantttitle{1}{1} \gantttitle{2}{1} `\dots' \gantttitle{12}{1} \\
% \end{texcode}
-%
+%
% As an advanced example, we will draw seven title elements containing the names of the weekdays (``Mon'' to ``Sun''). To this end, we introduce an additional key:
-%
+%
% \begin{key}{title list options}{\meta{pgffor options}}{var=\string\x, evaluate=\string\x}
% Changes the \meta{pgffor options} of the |\foreach| command called by |\gantttitlelist| (see section~56 of the \TikZ\ manual). The macro that yields the labels to be printed by |\gantttitlelist| must be called |\x|.
% \par\bigskip\noindent\shorthandoff{"}
@@ -971,7 +859,7 @@
% \end{ganttchart}
% \end{center}\shorthandon{"}
% \end{key}
-%
+%
% \bigskip While you actually may build any chart title with the two commands described previously, \DescribeMacro{\gantttitlecalendar}|\gantttitlecalendar| saves a lot of time when you wish to create elaborate calendars:
% \begin{texcode}
% \gantttitlecalendar`\oarg{options}\marg{calendar lines}'
@@ -999,7 +887,7 @@
% \bottomrule
% \end{tabular}
% \end{center}
-%
+%
% The \meta{number} for the \texttt{week} line type is the number of the first week in the calendar.
% \par\bigskip\noindent
% \begin{texcode}
@@ -1024,16 +912,16 @@
% \ganttbar{}{2013-01-14}{2013-01-17}
% \end{ganttchart}\hspace*{-51.4pt}
% \end{center}
-%
+%
% You can easily add new output formats for \texttt{month} and \texttt{weekday}. The predefined ones use the macros described in section~57.1.3 of the \TikZ\ manual. For example, |weekday=name| calls |\pgfcalendarweekdayname|. Thus, new macros called |\pgfcalendarmonth|\textcolor{RoyalBlue}{\meta{output format}} or |\pgfcalendarweekday|\textcolor{RoyalBlue}{\meta{output format}} will provide additional \meta{output format}s for |month| and |weekday|, respectively.
-%
+%
% A weekday output format called |letter|, which displays a weekday as single letter, might be implemented as follows:
% \par\bigskip\noindent
% \begin{texcode}
% \def\pgfcalendarweekdayletter#1{%
% \ifcase#1M\or T\or W\or T\or F\or S\or S\fi%
% }
-%
+%
% \begin{ganttchart}[
% hgrid,
% vgrid,
@@ -1050,7 +938,7 @@
% \def\pgfcalendarweekdayletter#1{%
% \ifcase#1M\or T\or W\or T\or F\or S\or S\fi%
% }
-%
+%
% \begin{ganttchart}[
% hgrid,
% vgrid,
@@ -1063,7 +951,7 @@
% }
% \end{ganttchart}
% \end{center}
-%
+%
% \begin{key}{calendar week text}{\meta{format}}{Week\string~\string\currentweek}
% Changes the text displayed in a week title element. In \meta{format}, four additional macros are available: \DescribeMacro{\currentweek}|\currentweek| is the current week number; \DescribeMacro{\startyear}|\startyear|, \DescribeMacro{\startmonth}|\startmonth| and \DescribeMacro{\startday}|\startday| expand to the year, month and day of the current week's Monday.
% \par\bigskip\noindent
@@ -1100,7 +988,7 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
+%
% \begin{key}{time slot unit}{\texttt{day}\space\textbar\space\texttt{month}\space\textbar\space\texttt{year}}{day}
% By default, one \textit{calendar day} is one time slot wide. With \opt{time slot unit}\texttt{=month}, one \textit{month} corresponds to one time slot. Consequently, in such calendars only |year| and |month| are sensible line types for |\gantttitlecalendar|, and the time slot format \texttt{isodate-yearmonth} is especially suited.
% \par\bigskip\noindent
@@ -1226,7 +1114,7 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
+%
% \begin{key}{title left shift}{\meta{factor}}{0}
% \keyline{title right shift}{\meta{factor}}{0}
% \keyline{title top shift}{\meta{factor}}{0}
@@ -1394,7 +1282,7 @@
%
%
% \subsection{Predefined Chart Elements}
-%
+%
% \pack{pgfgantt} predefines three chart elements:
% \begin{enumerate}
% \item \DescribeMacro{\ganttbar}\textit{Bars} indicate the duration of a task or one of its parts.
@@ -1411,7 +1299,7 @@
% \end{texcode}
% \end{enumerate}
% Each of these macros draws a \meta{label}ed chart element from the \meta{start tss} to the \meta{end tss} (or at the given \meta{tss} in case of |\ganttmilestone|).
-%
+%
% \par\bigskip\noindent
% \begin{texcode}
% \begin{ganttchart}[vgrid, hgrid]{1}{12}
@@ -1443,7 +1331,7 @@
% \begin{minipage}[t]{.49\textwidth}
% \begin{texcode}
% % Short version
-%
+%
% \begin{ganttchart}[
% vgrid,
% hgrid
@@ -1459,7 +1347,7 @@
% \begin{minipage}[t]{.47\textwidth}
% \begin{texcode}
% % Long version
-%
+%
% \begin{ganttchart}[
% vgrid,
% hgrid
@@ -1475,7 +1363,7 @@
% \end{ganttchart}
% \end{texcode}
% \end{minipage}
-%
+%
% \begin{center}
% \begin{ganttchart}[
% vgrid,
@@ -1488,7 +1376,7 @@
% \ganttlinkedbar{Task 3}{7}{11}
% \end{ganttchart}
% \end{center}
-%
+%
% \begin{key}{chart element start border}{\texttt{left}\space\textbar\space\texttt{right}}{left}
% Determines which border of the start time slot a chart element touches. \texttt{left} is the behavior usually expected, while \texttt{right} strictly interprets the start time slot as an $x$-coordinate.
% \par\bigskip\noindent
@@ -1511,10 +1399,10 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
-%
+%
+%
% \subsubsection{Options: Chart Element Appearance}
-%
+%
% The following options are similar for all predefined (and user-defined) chart elements:
%
% \begin{key}[/.style=]{bar}{\meta{style}}{shape=ganttbar, inner sep=0pt, draw, fill=white}
@@ -1558,9 +1446,9 @@
% \end{center}
% \end{key}
%
-%
+%
% \subsubsection{Options: Label Formatting}
-%
+%
% \begin{key}{bar label text}{\meta{text}}{\string\strut\#1}
% \keyline{group label text}{\meta{text}}{\string\strut\#1}
% \keyline{milestone label text}{\meta{text}}{\string\strut\#1}
@@ -1611,7 +1499,7 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
+%
% \begin{key}{inline}{\meta{boolean}}{false}
% \keyline{bar inline label anchor}{\meta{anchor}}{center}
% \keyline{group inline label anchor}{\meta{anchor}}{center}
@@ -1650,10 +1538,10 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
-%
+%
+%
% \subsubsection{Options: Chart Element Positioning}
-%
+%
% \begin{key}{bar left shift}{\meta{factor}}{0}
% \keyline{bar right shift}{\meta{factor}}{0}
% \keyline{bar top shift}{\meta{factor}}{.3}
@@ -1667,7 +1555,7 @@
% \keyline{milestone top shift}{\meta{factor}}{.3}
% \keyline{milestone height}{\meta{factor}}{.4}
% Shift the coordinates of a chart element's borders (\opt{\dots\ shift}) and change its height (\opt{\dots\ height}).
-%
+%
% \begin{center}
% \begin{tikzpicture}[x=.5cm, y=1cm]
% \begin{ganttchart}[vgrid, hgrid]{1}{8}
@@ -1701,7 +1589,7 @@
% \draw[-latex,teal] (8,-4.2) node[right] {End time slot (6)} -- (6,-3.8);
% \end{tikzpicture}
% \end{center}
-%
+%
% The three following figures illustrate the distances modified by these keys. The first figure shows a Gantt chart with a bar, two lines and one time slot.
% \begin{center}
% \begin{tikzpicture}[x=8cm, y=2cm]
@@ -1809,7 +1697,7 @@
% -- (.4,-.85);
% \end{tikzpicture}
% \end{center}
-%
+%
% \begin{key}{group right peak tip position}{\meta{fraction}}{0.5}
% \keyline{group right peak width}{\meta{factor}}{0.4}
% \keyline{group right peak height}{\meta{factor}}{0.1}
@@ -1820,7 +1708,7 @@
% \keyline{group peaks width}{\meta{factor}}{\textrm{(none)}}
% \keyline{group peaks height}{\meta{factor}}{\textrm{(none)}}
% Change the appearance of the peaks at both ends of a group. By default, both the left and right peak are 0.4~units wide and 0.1~units high, their tips lie between the peak sides. The \opt{group peaks \dots} keys set the dimensions for both peaks simultaneously. The figure below exemplifies the keys that apply to the left peak.
-%
+%
% \begin{center}
% \begin{tikzpicture}[x=8cm, y=2cm]
% \small
@@ -1845,7 +1733,7 @@
% \end{tikzpicture}
% \end{center}
% \end{key}
-%
+%
% For example, you might devise the following layout: Bars are small and rounded; they do not touch the borders of their start and end time slots. Groups stay within the start and end time slot, and the peaks are more acute.
% \par\bigskip\noindent
% \begin{texcode}
@@ -1887,12 +1775,12 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
-%
+%
+%
% \subsubsection{Options: Progress}
-%
+%
% The \textit{progress} of a chart element illustrates the extent to which this element has been completed.
-%
+%
% \begin{key}{progress}{\texttt{none}\space\textbar\space\texttt{today}\space\textbar\space\meta{number}}{none}
% Indicates that a chart element is \meta{number} percent complete. The value \texttt{none} turns progress calculations off.
% \par\bigskip\noindent
@@ -1950,7 +1838,7 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
+%
% \begin{key}[/.style=]{bar incomplete}{\meta{style}}{/pgfgantt/bar, fill=black!25}
% \keyline[/.style=]{group incomplete}{\meta{style}}{/pgfgantt/group, fill=black!25}
% \keyline[/.style=]{milestone incomplete}{\meta{style}}{/pgfgantt/milestone, fill=black!25}
@@ -1993,7 +1881,7 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
+%
% \begin{key}{progress label text}{\meta{text}}{\string\pgfmathprintnumber[precision=0, verbatim]\{\#1\}\string\% complete}
% \keyline{bar progress label anchor}{\meta{anchor}}{east}
% \keyline{bar progress label font}{\meta{font commands}}{\string\scriptsize}
@@ -2047,16 +1935,16 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
-%
+%
+%
% \subsubsection{New Node Shapes}
% \label{sss:NewNodeShapes}
-%
+%
% \pack{pgfgantt} defines three new node shapes:
-%
+%
% \bigskip\noindent
% (1) The \texttt{ganttbar} node shape derives from shape \texttt{rectangle} (section~48.2 of the \TikZ\ manual). It provides four additional anchors: \texttt{on top}, \texttt{on bottom}, \texttt{on left} and \texttt{on right}. The \meta{fraction} set by the following keys indicates a position between the left and right (for \texttt{on top} and \texttt{on bottom}) or upper and lower border (for \texttt{on left} and \texttt{on right}), similarly to the \opt{/tikz/pos} key.
-%
+%
% \begin{key}{on top fraction}{\meta{fraction}}{0.5}
% \keyline{on bottom fraction}{\meta{fraction}}{0.5}
% \keyline{on left fraction}{\meta{fraction}}{0.5}
@@ -2097,7 +1985,7 @@
% \end{tikzpicture}
% \end{center}
% \end{key}
-%
+%
% \bigskip\noindent
% (2) The \texttt{ganttgroup} node shape also derives from shape \texttt{rectangle}. It provides the additional anchors \texttt{on top}, \texttt{on bottom}, \texttt{on left}, \texttt{on right} (same as above), \texttt{left peak} and \texttt{right peak}.
% \begin{center}
@@ -2138,7 +2026,7 @@
% node [\placement] {\scriptsize\texttt{(s.\anchor)}};
% \end{tikzpicture}
% \end{center}
-%
+%
% \bigskip\noindent
% (3) The \texttt{ganttmilestone} node shape derives from shape \texttt{diamond} (section~48.3 of the \TikZ\ manual), but does not consider any aspect ratio. It provides the additional anchors \texttt{on top}, \texttt{on bottom}, \texttt{on left} and \texttt{on right} (same as above).
% \begin{center}
@@ -2172,19 +2060,19 @@
% node [\placement] {\scriptsize\texttt{(s.\anchor)}};
% \end{tikzpicture}
% \end{center}
-%
-%
+%
+%
% \subsection{Defining Custom Chart Elements}
-%
+%
% You may define completely new chart elements with
% \begin{texcode}
% \newganttchartelement`\marg{name}\marg{new default key values}'
% \newganttchartelement*`\marg{name}\marg{new default key values}'
% \end{texcode}
% \DescribeMacro{\newganttchartelement}|\newganttchartelement| (unstarred) defines a new chart element |\gantt|\textcolor{RoyalBlue}{\meta{name}} and the corresponding |\ganttlinked|\textcolor{RoyalBlue}{\meta{name}}. These chart element macros take one optional argument \meta{options} and \textit{three} mandatory arguments \meta{label}, \meta{start tss} and \meta{end tss} (like |\ganttbar|).
-%
+%
% Chart element macros defined by the starred form, \DescribeMacro{\newganttchartelement*}|\newganttchartelement*|, take the same single optional argument, but \textit{two} mandatory arguments \meta{label} and \meta{tss} (like |\ganttmilestone|).
-%
+%
% For each new chart element, |\newganttchartelement| also introduces a set of nine value-storing keys and five style keys and assigns default values to them:
% \begin{center}
% \begin{tabular}{l >{\ttfamily}l}
@@ -2212,13 +2100,13 @@
% \end{tabular}\hspace*{-120pt}
% \end{center}
% Consequently, a new chart element will look like the standard |\ganttbar| unless you introduce some \meta{new default key values}.
-%
+%
% Let us define a new chart element called ``foobar'', which is basically a fancy-colored and -shaped bar:
% \par\bigskip\noindent
% \begin{texcode}
% \definecolor{foobarblue}{RGB}{0,153,255}
% \definecolor{foobaryellow}{RGB}{234,187,0}
-%
+%
% \newganttchartelement{foobar}{
% foobar/.style={
% shape=rounded rectangle,
@@ -2237,7 +2125,7 @@
% foobar left shift=-.1,
% foobar right shift=.1
% }
-%
+%
% \begin{ganttchart}[
% vgrid,
% progress=today,
@@ -2253,7 +2141,7 @@
% \begin{center}
% \definecolor{foobarblue}{RGB}{0,153,255}
% \definecolor{foobaryellow}{RGB}{234,187,0}
-%
+%
% \newganttchartelement{foobar}{
% foobar/.style={
% shape=rounded rectangle,
@@ -2272,7 +2160,7 @@
% foobar left shift=-.1,
% foobar right shift=.1
% }
-%
+%
% \begin{ganttchart}[
% vgrid,
% progress=today,
@@ -2285,7 +2173,7 @@
% \ganttlinkedfoobar{Foobar 3}{9}{12}
% \end{ganttchart}
% \end{center}
-%
+%
%
% \subsection{Links}
% \label{ssc:Links}
@@ -2294,7 +2182,7 @@
% \begin{texcode}
% \ganttlink`\oarg{options}\marg{start element name}\marg{end element name}'
% \end{texcode}
-%
+%
% \begin{key}{name}{\meta{name}}{\textrm{(empty)}}
% The \DescribeMacro{\ganttlink}|\ganttlink| macro connects two elements, which are specified by their \meta{name}s. By default, chart elements are named automatically: The first one receives the name \texttt{elem0}, the second one is called \texttt{elem1} and so on. However, the \opt{name} key allows you to assign a name to each chart element.
% \par\bigskip\noindent
@@ -2348,7 +2236,7 @@
% \end{ganttchart}
% \end{center}
% \end{key}
-%
+%
% \begin{key}[/.style=]{link}{\meta{style}}{-latex, rounded corners=1pt}
% Sets the appearance of the link.
% \par\bigskip\noindent
@@ -2490,7 +2378,7 @@
% \DescribeMacro{\newganttlinktype}It defines a new link \meta{type} which is drawn by the given \meta{TikZ code}. When you write this code, you do not have to know the final absolute coordinates of each link type instance. On the contrary, several commands that are only available in the second argument of |\newganttlinktype| help you to design generic link types:
% \begin{itemize}
% \item First, you have to choose the border points of the chart elements the link will connect. For this purpose, \DescribeMacro{\ganttsetstartanchor}|\ganttsetstartanchor{|\meta{anchor}|}| and \DescribeMacro{\ganttsetendanchor}|\ganttsetendanchor{|\meta{anchor}|}| select an \meta{anchor} of the start and end element, respectively. See the figures in section~\ref{sss:NewNodeShapes} for possible \meta{anchor}s of the default chart element shapes. You may specify a certain \meta{fraction} for anchors like \texttt{on top} by |\ganttsetstartanchor{on top=|\meta{fraction}|}|.
-%
+%
% \pack{pgfgantt} sets the default anchors to |\ganttsetstartanchor{east}| and |\ganttsetendanchor{west}|, so you even may omit these two commands.
% \item The two macro pairs \DescribeMacro{\xLeft}|\xLeft|/\DescribeMacro{\yUpper}|\yUpper| and \DescribeMacro{\xRight}|\xRight|/\DescribeMacro{\yLower}|\yLower| provide the $x$- and $y$-coordinates of the link start and end points, respectively.
% \begin{center}\makeatletter
@@ -2509,7 +2397,7 @@
% \end{itemize}
% \end{enumerate}
% \end{key}
-%
+%
% \begin{texcode}
% \newganttlinktypealias`\marg{new type}\marg{existing type}'
% \end{texcode}
@@ -2524,7 +2412,7 @@
% \newganttlinktypealias{sta-to-sta}{s-s}
% \newganttlinktypealias{fin-to-fin}{f-f}
% \setganttlinklabel{fin-to-fin}{f2f}
-%
+%
% \begin{ganttchart}[vgrid, hgrid]{1}{12}
% \gantttitle{Title}{12} \\
% \ganttbar{Task 1}{2}{3} \\
@@ -2538,7 +2426,7 @@
% \newganttlinktypealias{sta-to-sta}{s-s}
% \newganttlinktypealias{fin-to-fin}{f-f}
% \setganttlinklabel{fin-to-fin}{f2f}
-%
+%
% \begin{ganttchart}[vgrid, hgrid]{1}{12}
% \gantttitle{Title}{12} \\
% \ganttbar{Task 1}{2}{3} \\
@@ -2552,7 +2440,7 @@
% \par\bigskip\noindent
% \begin{texcode}
% \usetikzlibrary{decorations.pathmorphing}
-%
+%
% \newganttlinktype{zigzag}{
% \ganttsetstartanchor{on right=1}
% \ganttsetendanchor{on left=0}
@@ -2560,7 +2448,7 @@
% (\xLeft, \yUpper) --
% (\xRight, \yLower);
% }
-%
+%
% \begin{ganttchart}[vgrid, hgrid]{1}{12}
% \gantttitle{Title}{12} \\
% \ganttbar{Task 1}{2}{3} \\
@@ -2612,7 +2500,7 @@
% (\xRight, \yLower);
% }
% \setganttlinklabel{drur}{a fancy link}
-%
+%
% \begin{ganttchart}[
% vgrid,
% hgrid,
@@ -2648,7 +2536,7 @@
% (\xRight, \yLower);
% }
% \setganttlinklabel{drur}{a fancy link}
-%
+%
% \begin{ganttchart}[
% vgrid,
% hgrid,
@@ -2663,7 +2551,7 @@
% \end{ganttchart}
% \end{center}
% (Please remove the comments if you copy the code above -- they will confuse \TikZ\ and generate tons of errors.)
-%
+%
% \begin{key}{link label}{\meta{label}}{\textrm{(empty)}}
% \keyline{link label font}{\meta{font commands}}{\string\scriptsize\string\itshape}
% \keyline[/.style=]{link label node}{\meta{options}}{anchor=west, font=\string\ganttvalueof\{link label font\}}
@@ -2812,9 +2700,9 @@
% \ganttlink[link mid=.159]{pp}{T2A}
% \end{ganttchart}
% \end{center}
-%
+%
% \bigskip
-% The second example demonstrates that \pack{pgfgantt} is really flexible: Even an appearance quite different from the standard layout is possible. (More precisely, the code below tries to reproduce the Gantt chart from the English Wikipedia site, see \url{http://en.wikipedia.org/wiki/Gantt_chart}.)
+% The second example demonstrates that \pack{pgfgantt} is really flexible: Even an appearance quite different from the standard layout is possible. (More precisely, the code below tries to reproduce the Gantt chart from the English Wikipedia site, see \url{https://en.wikipedia.org/wiki/Gantt_chart}.)
% \par\bigskip\noindent
% \begin{texcode}
% \definecolor{barblue}{RGB}{153,204,254}
@@ -2967,8 +2855,8 @@
% \end{ganttchart}
% \end{center}
%
-%
-% \StopEventually{\PrintIndex\PrintChanges}
+%
+% \StopEventually{\PrintIndex}
% \lstDeleteShortInline|
% \MakeShortVerb{\|}
% \clearpage\section{Implementation}
@@ -3050,7 +2938,7 @@
%
%
% \subsection{The Horizontal and Vertical Grid}
-%
+%
% \begin{intmacro}{\gtt@currentline}
% \begin{intmacro}{\gtt@lasttitleline}
% \begin{intmacro}{\gtt@currgrid}
@@ -3202,7 +3090,7 @@
%
%
% \subsection{Time Slot Formats}
-%
+%
% \begin{intmacro}{\gtt@smugglecount}
% |\gtt@smugglecount|\marg{count} smuggles the local value of a count register over the end of a \TeX\ group.
% \begin{macrocode}
@@ -3390,11 +3278,11 @@
% \end{macrocode}
% \end{intmacro}
% \end{option}
-%
-%
+%
+%
% \subsection{The Main Environment}
% \label{ssc:ImplMain}
-%
+%
% \begin{option}{x unit}
% \begin{option}{y unit title}
% \begin{option}{y unit chart}
@@ -4222,10 +4110,10 @@
}
% \end{macrocode}
-%
-%
+%
+%
% \subsection{Chart Elements}
-%
+%
% \begin{option}{progress}
% \begin{intmacro}{\gtt@progress}
% \begin{option}{progress label text}
@@ -4606,7 +4494,7 @@
% \end{option}
% \end{macro}
% \end{macro}
-% \clearpage
+% \clearpage
% \begin{macro}{\ganttgroup}
% \begin{macro}{\ganttlinkedgroup}
% \begin{option}{group}
@@ -4772,10 +4660,10 @@
% \end{option}
% \end{macro}
% \end{macro}
-%
-%
+%
+%
% \subsection{Node Shapes}
-%
+%
% \begin{option}{on top fraction}
% \begin{option}{on bottom fraction}
% \begin{option}{on left fraction}
@@ -5067,11 +4955,11 @@
}
% \end{macrocode}
-%
+%
%
% \subsection{Links}
% \label{ssc:ImplLinks}
-%
+%
% \begin{option}{link}
% \begin{option}{link type}
% \begin{option}{link label}
@@ -5302,7 +5190,7 @@
% \end{macrocode}
% \end{intmacro}
% \begin{intmacro}{\@gtt@link@anchor}
-% We need the following keys for setting the start and end anchor of a link: Whenever a key |/pgfgantt/link anchor/|\meta{anchor} is undefined, \pack{pgfgantt} stores \meta{anchor} in |\@gtt@link@anchor|.
+% We need the following keys for setting the start and end anchor of a link: Whenever a key |/pgfgantt/link anchor/|\meta{anchor} is undefined, \pack{pgfgantt} stores \meta{anchor} in |\@gtt@link@anchor|.
% \begin{macrocode}
\ganttset{%
link anchor/.unknown/.code={%
diff --git a/graphics/pgf/contrib/pgfgantt/pgfgantt.ins b/graphics/pgf/contrib/pgfgantt/pgfgantt.ins
index 6e4aa0dd2b..2c6c6a4c03 100644
--- a/graphics/pgf/contrib/pgfgantt/pgfgantt.ins
+++ b/graphics/pgf/contrib/pgfgantt/pgfgantt.ins
@@ -1,6 +1,6 @@
%% pgfgantt.ins
%%
-%% Copyright (C) 2083 by Wolfgang Skala
+%% Copyright (C) 2024 by Wolfgang Esser-Skala
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -10,9 +10,7 @@
%% 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 Wolfgang Skala.
+%% This work has the LPPL maintenance status `unmaintained'.
%%
%% This work consists of the files pgfgantt.dtx and pgfgantt.ins
%% and the derived file pgfgantt.sty.
@@ -24,7 +22,7 @@
\preamble
-Copyright (C) 2018 by Wolfgang Skala
+Copyright (C) 2024 by Wolfgang Esser-Skala
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
@@ -51,11 +49,10 @@ version 2008/05/04 or later.
\Msg{*}
\Msg{* pdflatex pgfgantt.dtx}
\Msg{* makeindex -s gind.ist -o pgfgantt.ind pgfgantt.idx}
-\Msg{* makeindex -s gglo.ist -o pgfgantt.gls pgfgantt.glo}
\Msg{* pdflatex pgfgantt.dtx (2x)}
\Msg{*}
\Msg{* Happy TeXing!}
\Msg{*}
\Msg{****************************************************}
-\endbatchfile \ No newline at end of file
+\endbatchfile
diff --git a/graphics/pgf/contrib/pgfgantt/pgfgantt.pdf b/graphics/pgf/contrib/pgfgantt/pgfgantt.pdf
deleted file mode 100644
index 5536734a4c..0000000000
--- a/graphics/pgf/contrib/pgfgantt/pgfgantt.pdf
+++ /dev/null
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/README.md b/graphics/pgf/contrib/pgfornament-han/README.md
index 893666ec52..61d023c759 100644
--- a/graphics/pgf/contrib/pgfornament-han/README.md
+++ b/graphics/pgf/contrib/pgfornament-han/README.md
@@ -1,17 +1,17 @@
-# pgfornament-han 2023/10/29
-A pgfornament library for Chinese traditional motifs and patterns.
+# pgfornament-han 2024/10/22
+A pgfornament library for Chinese traditional motifs and patterns. We also provide three beamer themes namely XiaoShan, HeavenlyClouds and TianQing based on these motifs. With some modifications, these themes can also be used to create posters using the `beamerposter` package; sample .tex files are provided.
-以 pgfornament 宏包的机制,实现绘制汉风图纹。在此基础上设计了三款beamer主题:「萧山」(XiaoShan)、「神马浮云」(Heavenly Clouds)、「天青」(TianQing)。
+以 pgfornament 宏包的机制,实现绘制汉风图纹。在此基础上设计了三款beamer主题:「萧山」(XiaoShan)、「神马浮云」(HeavenlyClouds)、「天青」(TianQing),并可略加修改应用在海报设计上。详情请参考范例 .tex 文档。
-# Maintainers 宏包维护
+## Maintainers 宏包维护
LianTze Lim 林莲枝 (liantze@gmail.com)
-# Contributors 开发人员
+## Contributors 开发人员
Chennan Zhang (23637935@qq.com) drew the motifs using a CAD application,
re-drew them in `TikZ`, and granted permission for these to be turned into
a library suitable for use with the `pgfornament` package by LianTze Lim.
所有图纹均由张晨南以 CAD 设计、以TikZ绘制,再由林莲枝转为适用 pgfornament 机制的宏包代码。
-# License
+## License 许可协议
[LaTeX Project Public License (LPPL 1.3c)](https://www.latex-project.org/lppl/lppl-1-3c/)
diff --git a/graphics/pgf/contrib/pgfornament-han/beamerthemeHeavenlyClouds.sty b/graphics/pgf/contrib/pgfornament-han/beamerthemeHeavenlyClouds.sty
index 00bc63cd78..afee91585d 100644
--- a/graphics/pgf/contrib/pgfornament-han/beamerthemeHeavenlyClouds.sty
+++ b/graphics/pgf/contrib/pgfornament-han/beamerthemeHeavenlyClouds.sty
@@ -1,4 +1,4 @@
-% beamerthemeHeavenlyClouds.sty v1.1.1 2023/10/29
+% beamerthemeHeavenlyClouds.sty v1.2 2024/10/15
% by LianTze Lim (liantze@gmail.com)
\ProvidesPackage{beamerthemeHeavenlyClouds}
@@ -24,6 +24,7 @@
\renewcommand{\CJKrmdefault}{zhfs}
\setbeamerfont{frametitle}{shape=\itshape,family=\lishu,series=\bfseries,size=\LARGE}
+\setbeamerfont{framesubtitle}{shape=\itshape,family=\lishu,series=\bfseries,size=\normalsize}
% \setbeamercolor{frametitle}{fg=茜色}
\setbeamerfont{title}{family=\lishu,series=\bfseries,size=\huge}
@@ -66,7 +67,8 @@
}
\appto{\maketitle}{\end{minipage}}
-
+\newcommand{\addheight}{\parbox{0pt}{\rule{0pt}{1.3\ccwd}}}
+% \setbeamerfont{block title}{series=\addheight}
% \setbeamerfont{block title}{series=\centering}
% \addtobeamertemplate{block alerted begin}{}{\centering}
% \addtobeamertemplate{block example begin}{}{\centering}
@@ -95,25 +97,27 @@
}%
}
+\newlength{\ShenmaMarkerWidth}
+\setlength{\ShenmaMarkerWidth}{2.5em}
\AddToHook{begindocument/before}{%
\newbox{\clouds@shenma}
\savebox{\clouds@shenma}{%
\usebeamercolor[fg]{headline}%
\tikzset{pgfornamentstyle/.style={line width=0pt}}%
- \pgfornamenthan[width=2.5em]{78}%
+ \pgfornamenthan[width=\ShenmaMarkerWidth]{78}%
}
}
\newcommand{\shenmaprogressmarker}{%
\renewcommand{\clouds@progressmarker}{%
- \clip (-1.3em,4em) rectangle (\paperwidth,0pt);
+ \clip (-1.3em,\dimexpr\ht\clouds@shenma + 4em\relax) rectangle (\paperwidth,0pt);
\node[anchor=south,inner sep=1pt] at (\clouds@progressinheadfoot,1.25em)
{\usebox{\clouds@shenma}};
}
}%
-\AtBeginDocument{%
+\AddToHook{begindocument/before}{%
\shenmaprogressmarker
\newbox{\clouds@title@deco}
\savebox{\clouds@title@deco}{%
@@ -130,6 +134,9 @@
\parbox{\dimexpr\clouds@frametitle@actualwidth-5em}{\centering\insertframetitle}%
\hfill\raisebox{0.5ex}{\usebox{\clouds@title@deco}}%
\end{minipage}\par%
+ % 2024-10-08 add frame subtitle
+ \smallskip%
+ {\centering\usebeamerfont{framesubtitle}\mbox{}\insertframesubtitle\par}%
}
\newbox{\clouds@smallhuiwen}
@@ -151,9 +158,8 @@
\begin{tikzpicture}[decoration={markings, mark=between positions 0 and 1 step 2.5em
with { \node[transform shape]{\usebox{\clouds@smallhuiwen}}; }} ]
\path [postaction={decorate}] (0,0) -- (\paperwidth,0);
- \draw[headline.fg!50,line width=0.6pt] (-1.25em,1.25em) -- (\paperwidth,1.25em);
+ \draw[headline.fg!50,line width=0.2ex] (-1.25em,1.25em) -- (\paperwidth,1.25em);
\clouds@progressmarker
- % \fill[headline.fg] (\clouds@progressinheadfoot,1.25em) circle (2pt); %<-- TODO
\end{tikzpicture}
}
}
@@ -194,13 +200,17 @@
\pgfmathsetmacro{\myx}{rnd * 0.8}
\pgfmathsetmacro{\myy}{rnd * 0.8}
\pgfmathtruncatemacro{\myorn}{random(0,1) + #1}
+ \begingroup
+ \ifodd \myorn \tikzset{pgfornamentstyle/.append style={line width=1pt]}} \fi
\node at (\myx * \paperwidth, \myy * \paperheight) {\pgfornamenthan[
color=normal text.bg!\myintensity!white,symmetry=\myflip,scale=\myscale]{\myorn}};
+ \endgroup
}
+\newcommand{\BackgroundOrns}{\randorn{66}\randorn{68}\randorn{66}\randorn{70}\randorn{68}}
\setbeamertemplate{background}{%
\begin{tikzpicture}
\clip (0,0) rectangle (\paperwidth,\paperheight);
- \randorn{66}\randorn{68}\randorn{66}\randorn{70}\randorn{68}
+ \BackgroundOrns%
\end{tikzpicture}
}
diff --git a/graphics/pgf/contrib/pgfornament-han/beamerthemeTianQing.sty b/graphics/pgf/contrib/pgfornament-han/beamerthemeTianQing.sty
index 7d4bdfea49..b612979423 100644
--- a/graphics/pgf/contrib/pgfornament-han/beamerthemeTianQing.sty
+++ b/graphics/pgf/contrib/pgfornament-han/beamerthemeTianQing.sty
@@ -1,4 +1,4 @@
-% beamerthemeXiaoshan.sty v1.01 2023/10/29
+% beamerthemeXiaoshan.sty v1.02 2024/09/19
% by LianTze Lim (liantze@gmail.com)
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthemeTianQing}
@@ -35,12 +35,20 @@
\setbeamerfont{section name}{family=\kaishu,size=\Large}
\setbeamerfont{section title}{family=\kaishu,size=\huge}
\setbeamerfont{section in toc}{family=\kaishu,size=\large}
+\setbeamerfont{block title}{family=\kaishu\romankai,series=\bfseries}
\setbeamercolor{alerted text}{fg=樱桃色}
\setbeamercolor{example text}{fg=绿沉}
\setbeamercolor{block title}{fg=宝蓝}
\setbeamercolor{mini frame}{bg=天青色}
+\newlength{\TQTopDecoWidth}
+\newlength{\TQBottomDecoWidth}
+\setlength{\TQTopDecoWidth}{.5\paperheight}
+\setlength{\TQBottomDecoWidth}{.2\paperheight}
+\newcommand{\TQTopDecoOpacity}{.2}
+\newcommand{\TQBottomDecoOpacity}{.9}
+
\AddToHook{begindocument/before}{%
\newsavebox{\bulletboxone}
\savebox{\bulletboxone}{\usebeamercolor[fg]{structure}\tikz\node[line width=0pt,inner sep=0pt,outer sep=0pt]{\pgfornamenthan[height=1ex]{43}};}
@@ -55,12 +63,12 @@
\savebox{\topcornermotif}{%
\usebeamercolor{deco outline}%
\usebeamercolor{top deco}%
- \tikzset{pgfornamentstyle/.style={rotate=30,color=top deco.fg,draw=deco outline.fg,opacity=.2,inner sep=0pt,ultra thick}}\pgfornamenthan[width=.5\paperheight]{64}}
+ \tikzset{pgfornamentstyle/.style={rotate=30,color=top deco.fg,draw=deco outline.fg,opacity=\TQTopDecoOpacity,inner sep=0pt,ultra thick}}\pgfornamenthan[width=\TQTopDecoWidth]{64}}
\newsavebox{\bottomcornermotif}
\savebox{\bottomcornermotif}{%
\usebeamercolor{structure}%
- \tikzset{pgfornamentstyle/.style={color=structure.fg,opacity=.9,inner sep=0pt,very thick}}\pgfornamenthan[width=.2\paperheight,symmetry=v]{74}}%
+ \tikzset{pgfornamentstyle/.style={color=structure.fg,opacity=\TQBottomDecoOpacity,inner sep=0pt,very thick}}\pgfornamenthan[width=\TQBottomDecoWidth,symmetry=v]{74}}%
}
\setbeamertemplate{itemize item}{\raisebox{.08\ccwd}{\usebox{\bulletboxone}}}
@@ -108,7 +116,7 @@
coltitle = alerted text.fg!70!black,
colback = alerted text.bg,
halign title = flush center,
- fonttitle=\kaishu\romankai\bfseries,
+ fonttitle=\usebeamerfont{block title alerted},
title = #2,
#1
}
@@ -128,7 +136,7 @@
coltitle = example text.fg!70!black,
colback = example text.bg,
halign title = flush center,
- fonttitle=\kaishu\romankai\bfseries,
+ fonttitle=\usebeamerfont{block title example},
title = #2,
#1
}
@@ -150,7 +158,7 @@
coltitle = block title.fg!70!black,
colback = block title.bg,
halign title = flush center,
- fonttitle=\kaishu\romankai\bfseries,
+ fonttitle=\usebeamerfont{block title},
title = #2,
#1
}
diff --git a/graphics/pgf/contrib/pgfornament-han/beamerthemeXiaoshan.sty b/graphics/pgf/contrib/pgfornament-han/beamerthemeXiaoshan.sty
index 52daf7b8ad..03800a5a50 100644
--- a/graphics/pgf/contrib/pgfornament-han/beamerthemeXiaoshan.sty
+++ b/graphics/pgf/contrib/pgfornament-han/beamerthemeXiaoshan.sty
@@ -1,4 +1,4 @@
-% beamerthemeXiaoshan.sty v1.1 2023/04/23
+% beamerthemeXiaoshan.sty v1.2 2024/10/19
% by LianTze Lim (liantze@gmail.com)
\ProvidesPackage{beamerthemeXiaoshan}
@@ -48,8 +48,9 @@
\linespread{1.0}%
\inserttitle%
\hspace*{2em}\par%
-\vspace*{0.5em}
}
+% Frankly I have no idea if this is the right way to shove in a framesubtitle for metropolis
+\apptocmd{\metropolis@frametitlestrut@end}{\ifx\insertframesubtitle\@empty\else\par\usebeamerfont{framesubtitle}\insertframesubtitle\par\vskip1.5ex\fi}{}{}
\setbeamertemplate{subtitle}{
\raggedleft%
diff --git a/graphics/pgf/contrib/pgfornament-han/heavenlyclouds-sample.pdf b/graphics/pgf/contrib/pgfornament-han/heavenlyclouds-sample.pdf
deleted file mode 100644
index e8a3837826..0000000000
--- a/graphics/pgf/contrib/pgfornament-han/heavenlyclouds-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.pdf b/graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.pdf
index e2abf948f9..45926eaca9 100644
--- a/graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.pdf
+++ b/graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.tex b/graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.tex
index a5c6be5f1c..ffb8e95018 100644
--- a/graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.tex
+++ b/graphics/pgf/contrib/pgfornament-han/pgfornament-han-doc.tex
@@ -1,10 +1,8 @@
-% !TEX option = --shell-escape
-% !TEX program = xelatex
\documentclass[fontset=fandol]{ctexart}
-
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
+\usepackage{multicol}
\usepackage{ragged2e}
\usepackage[svgnames]{xcolor}
\usepackage{pgfornament-han}
@@ -100,10 +98,11 @@
\fancypagestyle{plain}{\pagestyle{fancy}}
\usepackage[colorlinks]{hyperref}
+\usepackage{cleveref}
\title{汉风图纹 \texttt{pgfornament-han}}
\author{林莲枝、张晨南}
-\date{2023/10/29\\\url{https://github.com/liantze/pgfornament-han}}
+\date{2024/10/22\\\url{https://github.com/liantze/pgfornament-han}}
\begin{document}
@@ -111,7 +110,7 @@
\begin{abstract}
利用 \texttt{pgfornament} 宏包可以在 \LaTeX{} 文件里便捷地画出十分典雅漂亮的、欧式风格的花纹。(详情请自行访问 \url{http://ctan.org/pkg/pgfornament})
- \texttt{pgfornament-han} 宏包的用意,正是为了尝试用 \texttt{pgfornament} 的已有机制,提供一些汉风的传统图纹。所有图纹均由\emph{张晨南}以 CAD 程式定稿、TikZ 绘制,再由\emph{林莲枝}转为适合 \texttt{pgfornament} 机制使用的宏包代码。
+ \texttt{pgfornament-han} 宏包的用意,正是为了尝试用 \texttt{pgfornament} 的已有机制,提供一些汉风的传统图纹。所有图纹均由\emph{张晨南}以 CAD 程式定稿、TikZ 绘制,再由\emph{林莲枝}转为适合 \texttt{pgfornament} 机制使用的宏包代码。我们也基于这些图纹尝试设计了一些beamer幻灯片及海报主题,详见附录\ref{app:beamer-xiaoshan}、\ref{app:beamer-heavenlyclouds}、\ref{app:beamer-tianqing}。
\end{abstract}
\part{基本用法}
@@ -515,9 +514,10 @@
\appendix
\setlength{\parindent}{2\ccwd}\justifying
\ctexset{section/name={附录}}
-\phantomsection\addcontentsline{toc}{part}{附录}
+\phantomsection\label{appendix-start}\addcontentsline{toc}{part}{附录}
\section{传统中国颜色 \texttt{cncolours.sty}}
+\label{app:cncolours}
\begingroup
@@ -1955,12 +1955,13 @@
\clearpage
\section{萧山 Beamer 主题 Xiaoshan Beamer Theme \texttt{beamerthemeXiaoshan.sty}}
+\label{app:beamer-xiaoshan}
-这个Beamer主题是以 \href{https://ctan.org/pkg/beamertheme-metropolis}{Metropolis} 为基础,用 \texttt{cncolours.sty} 调了一下颜色,加入少许汉风纹样。
+这个Beamer主题是以 \href{https://ctan.org/pkg/beamertheme-metropolis}{Metropolis} 为基础,用 \texttt{cncolours.sty} 调了一下颜色,加入少许汉风纹样。请参考\texttt{xiaoshan-beamer-sample.tex}示范文档。
\bigskip
-\begin{tcblisting}{listing side comment,title={使用范例},pdf comment={xiaoshan-sample.pdf}}
+\begin{tcblisting}{listing side comment,title={使用范例},pdf comment={samples/xiaoshan-beamer-sample.pdf}}
\documentclass[linespread=1.2,aspectratio=1610]{ctexbeamer}
\usetheme{Xiaoshan}
@@ -1990,15 +1991,45 @@
可以自行查阅\href{https://ctan.org/pkg/beamertheme-metropolis}{Metropolis}的详细宏包手册,有很多可客制化的机制,包括各种元素的配色。
+这些设置(以及beamer本身自带的设置参数)经过一些适当更改,也可以配合\texttt{beamerposter}宏包制作学术海报。请参考 \texttt{xiaoshan-poster-sample.tex} 示范文档。
+
+\begin{tcblisting}{listing side comment,title={海报范例},image comment={width=\hsize}{samples/xiaoshan-poster-sample.pdf}}
+\documentclass[t]{ctexbeamer}
+\usepackage[size=a4,orientation=portrait,
+scale=1.4]{beamerposter}
+\usetheme{Xiaoshan}
+
+\setbeamertemplate{frame numbering}[none]
+\setbeamerfont{frametitle}{series=\mdseries\huge}
+% ...以及其它适当改动,
+% 详见tianqing-poster.tex
+
+\title{当萧山beamer主题拿来做海报}
+\author{作者甲、作者乙、作者丙}
+\begin{document}
+\begin{frame}
+\frametitle{\insertshorttitle}
+\framesubtitle{\insertshortauthor}
+\begin{block}{萧山城市图景}
+ \begin{itemize}
+ \item 长忆萧然山下县,去秋为客日招邀。
+ \item ...
+ \end{itemize}
+\end{block}
+\end{frame}
+\end{document}
+\end{tcblisting}
+
\clearpage
\section{神马浮云 Beamer 主题 Heavenly Clouds Beamer Theme \texttt{beamerthemeHeavenlyClouds.sty}}
+\label{app:beamer-heavenlyclouds}
-这个Beamer主题是我一次病中摸鱼摸出来的,脑洞略大。每一页的背景的云彩纹样,位置、大小、深浅都是随机的,所以如果内容页数比较多,编译时运算可能会比较花时间,请自行斟酌使用此主题。
+这个Beamer主题是我一次病中摸鱼摸出来的,脑洞略大。请参考\texttt{heavenlyclouds-beamer-sample.tex}示范文档。每一页的背景的云彩纹样,位置、大小、深浅都是随机的,所以如果内容页数比较多,编译时运算可能会比较花时间,请自行斟酌使用此主题。
\bigskip
-\begin{tcblisting}{listing side comment,title={使用范例},pdf comment={heavenlyclouds-sample.pdf}}
+\begin{tcblisting}{listing side comment,title={使用范例},pdf comment={samples/heavenlyclouds-beamer-sample.pdf}}
\documentclass[aspectratio=1610,linespread=1.2]{ctexbeamer}
\usetheme{HeavenlyClouds}
@@ -2063,17 +2094,51 @@
\end{minted}
\end{itemize}
+这些设置(以及beamer本身自带的设置参数)经过一些适当更改,也可以配合\texttt{beamerposter}宏包制作学术海报。请参考 \texttt{heavenlyclouds-poster-sample.tex} 示范文档。
+
+\begin{tcblisting}{listing side comment,title={海报范例},image comment={width=\hsize}{samples/heavenlyclouds-poster-sample.pdf}}
+\documentclass[t,linespread=1.3]{ctexbeamer}
+\usepackage[size=a4,orientation=portrait,
+scale=1.5]{beamerposter}
+
+\usetheme{HeavenlyClouds}
+
+\setbeamerfont{frametitle}{size=\Huge}
+\setbeamerfont{framesubtitle}{size=\Large}
+\setbeamerfont{headline}{size=\small}
+\setbeamerfont{footline}{size=\small}
+% ...以及其它适当改动,
+% 详见heavenlyclouds-poster-sample.tex
+
+\title{当神马浮云beamer主题拿来做海报}
+\author{作者甲、作者乙、作者丙}
+\begin{document}
+\begin{frame}
+\frametitle{\insertshorttitle}
+\framesubtitle{\insertshortauthor}
+\begin{block}{套马的汉子你威武雄壮}
+ \begin{itemize}
+ \item 飞驰的骏马像疾风一样
+ \item ...
+ \end{itemize}
+\end{block}
+\end{frame}
+\end{document}
+\end{tcblisting}
+
\clearpage
+
\section{天青 Beamer 主题 Tian Qing Beamer Theme \texttt{beamerthemeTianqing.sty}}
+\label{app:beamer-tianqing}
-几年前看到一个很喜欢的舞台演出,根据个人印象做的一个Beamer主题。本来想取名「青花瓷」的。不过始终没能力重现出来那种感觉啦,眼高手低,惭愧。
+几年前看到一个\href{https://www.bilibili.com/video/BV1my4y1B7Vx/?p=156}{很喜欢的舞台演出},根据个人印象做的一个Beamer主题。本来想取名「青花瓷」的。不过始终没能力重现出来那种感觉啦,眼高手低,惭愧。请参考\texttt{tianqing-beamer-sample.tex}示范文档。
(话说拿这个模板去做科研学术性报告,真的不会被导师丢出来吗。)
\bigskip
-\begin{tcblisting}{listing side comment,title={使用范例},pdf comment={tianqing-sample.pdf}}
+\begin{tcblisting}{listing side comment,title={使用范例},pdf comment={samples/tianqing-beamer-sample.pdf}}
\documentclass[aspectratio=1610,linespread=1.2]{ctexbeamer}
\usetheme{TianQing}
@@ -2102,7 +2167,8 @@
\mintinline{latex}|\setCJKfamilyfont{zhkai}{Xingkai SC}|
-一些可以自己更改的颜色:
+\begin{multicols}{2}
+\noindent 一些可以自己更改的颜色:
\begin{minted}{latex}
\setbeamercolor{structure}{fg=墨色}
\setbeamercolor{section page}{fg=紫檀}
@@ -2112,5 +2178,43 @@
\setbeamercolor{example text}{fg=鸦青}
\setbeamercolor{block title}{fg=绀青}
\end{minted}
+\columnbreak
+\noindent 其它一些可以自己更改的设置:
+\begin{minted}{latex}
+\setlength{\TQTopDecoWidth}{0.7\paperwidth}
+\setlength{\TQBottomDecoWidth}{0.2\paperwidth}
+\renewcommand{\TQTopDecoOpacity}{0.3}
+\renewcommand{\TQBottomDecoOpacity}{0.45}
+\end{minted}
+\end{multicols}
+
+这些设置(以及beamer本身自带的设置参数)经过一些适当更改,也可以配合\texttt{beamerposter}宏包制作学术海报。请参考 \texttt{tianqing-poster-sample.tex} 示范文档。
+
+\begin{tcblisting}{listing side comment,title={海报范例},image comment={width=\hsize}{samples/tianqing-poster-sample.pdf}}
+ \documentclass[t,linespread=1.2]{ctexbeamer}
+ \usepackage[size=a4,orientation=portrait,
+ scale=1.4]{beamerposter}
+ \usetheme{TianQing}
+
+ \setbeamerfont{block title}{size=\Large}
+ \setlength{\TQBottomDecoWidth}{0.2\paperwidth}
+ % ...以及其它适当改动,
+ % 详见tianqing-poster-sample.tex
+
+ \title{当天青beamer主题拿来做海报}
+ \author{作者甲、作者乙、作者丙}
+ \begin{document}
+ \begin{frame}
+ \frametitle{\insertshorttitle}
+ \framesubtitle{\insertshortauthor}
+ \begin{block}{天青色等烟雨}
+ \begin{itemize}
+ \item 炊烟袅袅升起, 隔江千万里。
+ \item ...
+ \end{itemize}
+ \end{block}
+ \end{frame}
+ \end{document}
+ \end{tcblisting}
\end{document}
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/Cloud_types_en.pdf b/graphics/pgf/contrib/pgfornament-han/samples/Cloud_types_en.pdf
new file mode 100644
index 0000000000..9d7a641dd4
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/Cloud_types_en.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/SiO2.jpg b/graphics/pgf/contrib/pgfornament-han/samples/SiO2.jpg
new file mode 100644
index 0000000000..f62d8acf57
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/SiO2.jpg
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/hangzhou-arch.jpg b/graphics/pgf/contrib/pgfornament-han/samples/hangzhou-arch.jpg
new file mode 100644
index 0000000000..2303d312c1
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/hangzhou-arch.jpg
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-beamer-sample.pdf b/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-beamer-sample.pdf
new file mode 100644
index 0000000000..6dbaf406ad
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-beamer-sample.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/heavenlyclouds-sample.tex b/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-beamer-sample.tex
index d39932feaa..cdfd80c848 100644
--- a/graphics/pgf/contrib/pgfornament-han/heavenlyclouds-sample.tex
+++ b/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-beamer-sample.tex
@@ -1,10 +1,10 @@
-% !TEX program=xelatex
\documentclass[aspectratio=1610,linespread=1.2]{ctexbeamer}
\usetheme{HeavenlyClouds}
% Mac 或 Linux 上请自己设定 \lishu!!
% \providecommand{\lishu}{\CJKfontspec{Libian SC}[BoldFont=Baoli SC,Scale=1.2]}
+% \providecommand{\lishu}{\CJKfontspec{鸿雷板书简体-正式版.otf}[Path=fonts/]}
\author{林莲枝}
\title{神马浮云\\Beamer主题}
@@ -15,13 +15,7 @@
% \alttitlecircle %% 试试取消注释,有惊喜
% \simpleprogressmarker %% 神马太过引人注目的话,可以用简单圆点取代。
-
-% \setbeamercolor{structure}{fg=绀青}
-% \setbeamercolor{headline}{fg=群青}
-% \setbeamercolor{page number in head/foot}{fg=藏青}
-% \setbeamercolor{normal text}{bg=淡青}
-% \setbeamercolor{alerted text}{fg=正黄}
-% \setbeamercolor{example text}{fg=绿沉}
+% \setlength{\ShenmaMarkerWidth}{4em} % 可以改变神马的大小
\begin{document}
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-poster-sample.pdf b/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-poster-sample.pdf
new file mode 100644
index 0000000000..595feef6b6
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-poster-sample.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-poster-sample.tex b/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-poster-sample.tex
new file mode 100644
index 0000000000..f28769dde4
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/heavenlyclouds-poster-sample.tex
@@ -0,0 +1,128 @@
+\documentclass[t,linespread=1.3]{ctexbeamer}
+
+\usepackage[size=a4,orientation=portrait,scale=1.5]{beamerposter}
+
+\usetheme{HeavenlyClouds}
+% Mac 或 Linux 上请自己设定 \lishu!!
+% \providecommand{\lishu}{\CJKfontspec{Libian SC}[BoldFont=Baoli SC,Scale=1.2]}
+% \providecommand{\lishu}{\CJKfontspec{鸿雷板书简体-正式版.otf}[Path=fonts/]}
+% 如果实在没有,就用楷书蒙混过关一下……
+% \providecommand{\lishu}{\kaishu}
+% 当然也可以替换别的仿宋字体,自己喜欢哈自己喜欢
+% \setCJKfamilyfont{zhfs}{ZhuqueFangsong-Regular.ttf}[Path=fonts/]
+
+\usepackage[style=gb7714-2015]{biblatex}
+\addbibresource{sample-refs.bib}
+\usepackage{graphicx}
+\usepackage{ccicons}
+
+% 幻灯片->海报需要的一些改动
+\setbeamerfont{frametitle}{size=\Huge}
+\setbeamerfont{framesubtitle}{size=\Large}
+\setbeamerfont{block title}{size=\large}
+\setbeamerfont{headline}{size=\small}
+\setbeamerfont{footline}{size=\small}
+\AddToHook{begindocument/before}{%
+ \addtobeamertemplate{frametitle}{\vskip-1.5ex}{}
+}
+
+% 让神马放大一些
+\setlength{\ShenmaMarkerWidth}{3.5em}
+% patch for default scaling, make clouds larger
+\patchcmd{\randorn}{rnd * 0.4 + 0.1}{rnd * 0.8 + 0.3}{}{}
+% patch for default opacity, make clouds more prominent on poster
+\patchcmd{\randorn}{rnd * 20 + 65}{rnd * 45 + 40}{}{}
+% when in portrait mode, allow clouds to be higher up
+\patchcmd{\randorn}{\pgfmathsetmacro{\myy}{rnd * 0.8}}{\pgfmathsetmacro{\myy}{rnd * 0.95}}{}{}
+% and further to the right too; probably more important in landscape form
+\patchcmd{\randorn}{\pgfmathsetmacro{\myx}{rnd * 0.8}}{\pgfmathsetmacro{\myx}{rnd * 0.95}}{}{}
+% let there be more clouds in the background
+\renewcommand{\BackgroundOrns}{%
+ \randorn{66}\randorn{68}\randorn{66}\randorn{70}\randorn{68}%
+ \randorn{70}\randorn{68}\randorn{70}\randorn{70}%
+}
+
+\title{当神马浮云beamer主题拿来做海报}
+\author{作者甲、作者乙、作者丙}
+
+\begin{document}
+\begin{frame}[fragile]
+% ……简单又粗暴的,解决footline里神马的位置的方法,嗯。
+\gdef\inserttotalframenumber{10}
+\gdef\insertframenumber{3}
+
+
+% ……懒得折腾了,\frametitle挺好看的,就这样吧【躺平ing
+\frametitle{\insertshorttitle}
+\framesubtitle{\insertshortauthor}
+
+\begin{block}{此主题脑洞略大}
+
+ \begin{itemize}
+ \item 背景的云彩纹样,位置、大小、深浅都是随机的。刷一次不喜欢效果的话就再刷一次碰一下运气吧。
+ \item 若觉得进度条上的神马太过引人注(侧)目,可以用 \verb|\simpleprogressmarker| 简单圆点取代。(默认是\verb|\shenmaprogressmarker|)。……但是这是海报啊海报,只用圆点可能真的太没存在感了。
+ \end{itemize}
+
+\end{block}
+
+\begin{columns}[T]
+\column{.45\textwidth}
+
+\begin{exampleblock}{算了我也不知道在写什么,do you?}
+ Now solve $x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a}$. 对各位同学来说应该挑战不大。
+\end{exampleblock}
+
+\begin{alertblock}{算了我也不知道在写什么,do you?}
+ \[ x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a} \]
+\end{alertblock}
+
+\begin{block}{算了我也不知道在写什么,do you?}
+ \[ x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a} \]
+\end{block}
+
+% 个人觉得这个主题,多栏之间需要有个间隔。但是高度需要自己调整。
+\column{.01\textwidth}
+\textcolor{structure!80}{\rule{.1mm}{.27\textheight}}
+
+\column{.45\textwidth}
+
+\begin{block}{套马的汉子你威武雄壮}
+
+ \begin{itemize}
+ \item 飞驰的骏马像疾风一样
+ \item 一望无际的原野随你去流浪
+ \item 你的心海和大地一样宽广
+ \end{itemize}
+
+ \begin{enumerate}
+ \item 你是我天边最美的云彩
+ \item 让我用心把你留下来
+ \end{enumerate}
+\end{block}
+
+\begin{proof}
+ 显而易见,$1+1=2$.
+\end{proof}
+
+\begin{theorem}
+ 有一件很美好的事情将要发生,它终会发生。
+\end{theorem}
+
+\end{columns}
+
+\begin{block}{云的分类}
+This is just a sample sentence with a sample citation\cite{BurroughsCrowder2007}.
+
+\smallskip
+\includegraphics[width=.6\textwidth]{Cloud_types_en}\par
+Valentin de Bruyn / Coton. This illustration has been created for Coton, the cloud identification guide for mobile. \ccbysa\ 3.0 via Wikimedia Commons. \url{https://commons.wikimedia.org/wiki/File:Cloud_types_en.svg}
+\end{block}
+
+\vfill
+
+\begin{block}{\refname}
+\printbibliography[heading=none]
+\end{block}
+
+\end{frame}
+\end{document}
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/sample-refs.bib b/graphics/pgf/contrib/pgfornament-han/samples/sample-refs.bib
new file mode 100644
index 0000000000..8875337216
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/sample-refs.bib
@@ -0,0 +1,35 @@
+@article{ShaoShen2022,
+ author = {邵松雪 and 沈海云},
+ title = {青花瓷选美记},
+ journal = {大学化学},
+ year = {2022},
+ volume = {37},
+ number = {9},
+ pages = {2110061},
+ doi = {10.3866/PKU.DXHX202110061}
+}
+
+@book{BurroughsCrowder2007,
+ author = {Burroughs, William James and Crowder, Bob},
+ year = {2007},
+ title = {Weather},
+ publisher = {Fog City Press, San Francisco}
+}`
+
+@article{ChenCai2021,
+ author = {陈力新 and 蔡磊},
+ title = {国土空间治理背景下全域控制性详细规划编制探析——以杭州市萧山区进化镇为例},
+ journal = {浙江建筑},
+ year = {2021},
+ volume = {1},
+ pages = {1--4,9}
+}
+
+@article{ZhuEtal2021,
+ author = {朱鸿寅 and 洪玲笑 and 黄胜兰 and 马俊},
+ title = {绿色亚运村,生态未来城——杭州亚运村绿色生态城区实践},
+ journal = {建筑节能},
+ year = {2021},
+ number = {6},
+ pages= {10--13}
+}
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/tianqing-beamer-sample.pdf b/graphics/pgf/contrib/pgfornament-han/samples/tianqing-beamer-sample.pdf
new file mode 100644
index 0000000000..8af1fcf099
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/tianqing-beamer-sample.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/tianqing-sample.tex b/graphics/pgf/contrib/pgfornament-han/samples/tianqing-beamer-sample.tex
index 70c1b3d938..c26c27850b 100644
--- a/graphics/pgf/contrib/pgfornament-han/tianqing-sample.tex
+++ b/graphics/pgf/contrib/pgfornament-han/samples/tianqing-beamer-sample.tex
@@ -1,4 +1,3 @@
-% !TEX program=xelatex
\documentclass[aspectratio=1610,linespread=1.2]{ctexbeamer}
\usetheme{TianQing}
% 可以把zhkai更改成自己喜欢的美术字体、书法字体等
@@ -12,9 +11,13 @@
% \setbeamercolor{section page deco}{fg=紫檀}
% \setbeamercolor{top deco}{fg=老银}
% \setbeamercolor{normal text}{bg=铅白}
-% \setbeamercolor{alerted text}{fg=玄色}
-% \setbeamercolor{example text}{fg=鸦青}
-% \setbeamercolor{block title}{fg=绀青}
+% \setbeamercolor{alerted text}{fg=栗色}
+% \setbeamercolor{example text}{fg=苍青}
+% \setbeamercolor{block title}{fg=靛青}
+% \setlength{\TQTopDecoWidth}{0.7\paperwidth}
+% \setlength{\TQBottomDecoWidth}{0.2\paperwidth}
+% \renewcommand{\TQTopDecoOpacity}{0.3}
+% \renewcommand{\TQBottomDecoOpacity}{0.45}
\begin{document}
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/tianqing-poster-sample.pdf b/graphics/pgf/contrib/pgfornament-han/samples/tianqing-poster-sample.pdf
new file mode 100644
index 0000000000..8e7dc0c514
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/tianqing-poster-sample.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/tianqing-poster-sample.tex b/graphics/pgf/contrib/pgfornament-han/samples/tianqing-poster-sample.tex
new file mode 100644
index 0000000000..0ef1f20b74
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/tianqing-poster-sample.tex
@@ -0,0 +1,131 @@
+\documentclass[t,linespread=1.2]{ctexbeamer}
+
+\usepackage[size=a4,orientation=portrait,scale=1.4]{beamerposter}
+
+\usetheme{TianQing}
+% 可以把zhkai,zhfs更改成自己喜欢的美术字体、书法字体等
+% \setCJKfamilyfont{zhkai}{STXingkai} % Win有
+% \setCJKfamilyfont{zhkai}{Xingkai SC} % Mac有
+% \setCJKfamilyfont{zhkai}{鸿雷板书简体-正式版.otf}[Path=fonts/] % 自行下载
+% \setCJKfamilyfont{zhfs}{ZhuqueFangsong-Regular.ttf}[Path=fonts/] % 自行下载
+
+\usepackage[style=gb7714-2015]{biblatex}
+\addbibresource{sample-refs.bib}
+\usepackage{chemformula}
+\usepackage{qrcode}
+\usepackage{graphicx}
+
+% 幻灯片->海报需要的一些改动
+\setbeamerfont{frametitle}{size=\Huge}
+\setbeamerfont{framesubtitle}{size=\large}
+\setbeamerfont{block title}{size=\Large}
+% 。左上角、右下角的装饰可以酌情调整大小……不然右下真的有点太大
+% (或者要故意保留原大小来充版面也不是不可以哈哈哈
+% \setlength{\TQTopDecoWidth}{0.5\paperwidth}
+\setlength{\TQBottomDecoWidth}{0.2\paperwidth}
+% \renewcommand{\TQTopDecoOpacity}{0.3}
+% \renewcommand{\TQBottomDecoOpacity}{0.45}
+
+\title{当天青beamer主题拿来做海报}
+\author{作者甲、作者乙、作者丙}
+
+\begin{document}
+
+\begin{frame}
+
+% ……懒得折腾了,\frametitle挺好看的,就这样吧【躺平ing
+\frametitle{\insertshorttitle}
+\framesubtitle{\insertshortauthor}
+
+\begin{block}{天青色等烟雨}
+ \begin{itemize}
+ \item 炊烟袅袅升起, 隔江千万里。
+ \begin{itemize}
+ \item 在瓶底书刻隶仿前朝的飘逸
+ \begin{itemize}
+ \item 就当我为遇见你伏笔
+ \end{itemize}
+ \end{itemize}
+ \end{itemize}
+
+ \begin{enumerate}
+ \item 本来这个beamer主题样式,想取名“青花瓷”的。不过始终没能力重现出来那种感觉啦,就算了。
+ \item 话说拿这个模板去做科研学术性报告,真的不会被导师丢出来吗。
+ \end{enumerate}
+\end{block}
+
+\begin{columns}[T]
+ \column{.47\textwidth}
+
+ \begin{exampleblock}{算了我也不知道在写什么,do you?}
+ Now solve $x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a}$. 对各位同学来说应该挑战不大。
+ \end{exampleblock}
+
+ \begin{alertblock}{算了我也不知道在写什么,do you?}
+ \[ x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a} \]
+ \end{alertblock}
+
+ \begin{block}{算了我也不知道在写什么,do you?}
+ \[ x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a} \]
+ \end{block}
+
+ \begin{proof}
+ 显而易见,$1+1=2$.
+ \end{proof}
+
+ \begin{theorem}
+ 有一件很美好的事情将要发生,它终会发生。
+ \end{theorem}
+
+ \column{.47\textwidth}
+
+ \begin{block}{青花瓷}
+ \begin{itemize}
+ \item 炊烟袅袅升起, 隔江千万里。
+ \begin{itemize}
+ \item 在瓶底书刻隶仿前朝的飘逸
+ \begin{itemize}
+ \item 就当我为遇见你伏笔
+ \end{itemize}
+ \end{itemize}
+ \end{itemize}
+
+ \begin{enumerate}
+ \item 本来这个beamer主题样式,想取名“青花瓷”的。不过始终没能力重现出来那种感觉啦,就算了。
+ \item 话说拿这个模板去做科研学术性报告,真的不会被导师丢出来吗。
+ \item \begin{minipage}[t]{.8\hsize}(其实我当初设计这个beamer主题的印象不完全源自原曲,更多是来自这个片段)\end{minipage}\quad
+ \raisebox{-.5em}{\structure{\qrcode[height=2\ccwd]{https://www.bilibili.com/video/BV1my4y1B7Vx/?p=156}}}
+ \end{enumerate}
+ \end{block}
+
+ 有时不用blocks也挺好的。
+ \begin{enumerate}
+ \item 雨纷纷 旧故里草木深
+ \item 我听闻 你始终一个人
+ \begin{enumerate}
+ \item 斑驳的城门 盘踞着老树根
+ \begin{enumerate}
+ \item 石板上回荡的是 再等
+ \item 石板上回荡的是 再等
+ \end{enumerate}
+ \end{enumerate}
+ \end{enumerate}
+\end{columns}
+
+\begin{block}{\ch{SiO2}与\ch{Al2O3}受热变化过程 \cite{ShaoShen2022}}
+ \Large\centering
+\ch{!(高岭石)( Al2O3*2 SiO2*2 H2O ) ->[脱水] !(偏高岭石)( Al2O3 * 2 SiO2 ) ->[加热] !(硅铝尖晶石)( 2 Al2O3 * 3 SiO2 ) ->[加热] !(莫来石)( 3 Al2O3 * 2 SiO2 )}
+\end{block}
+
+\begin{block}{二氧化硅结构及存在形态\cite{ShaoShen2022}}
+\centering
+\includegraphics[width=.8\textwidth]{SiO2}\par
+(1) 二氧化硅(SiO2)结构;(2) 结晶二氧化硅;(3) 无定形二氧化硅
+\end{block}
+
+\begin{block}[width=.9\textwidth]{\refname}
+\printbibliography[heading=none]
+\end{block}
+
+\end{frame}
+\end{document}
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-beamer-sample.pdf b/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-beamer-sample.pdf
new file mode 100644
index 0000000000..b00952c2f9
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-beamer-sample.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/xiaoshan-sample.tex b/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-beamer-sample.tex
index 366b5a537a..389a2b781c 100644
--- a/graphics/pgf/contrib/pgfornament-han/xiaoshan-sample.tex
+++ b/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-beamer-sample.tex
@@ -1,4 +1,3 @@
-% !TEX program = xelatex
\documentclass[linespread=1.2,aspectratio=1610]{ctexbeamer}
\usetheme{Xiaoshan}
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-poster-sample.pdf b/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-poster-sample.pdf
new file mode 100644
index 0000000000..41bfa11853
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-poster-sample.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-poster-sample.tex b/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-poster-sample.tex
new file mode 100644
index 0000000000..6e4bbbd95c
--- /dev/null
+++ b/graphics/pgf/contrib/pgfornament-han/samples/xiaoshan-poster-sample.tex
@@ -0,0 +1,111 @@
+\documentclass[t]{ctexbeamer}
+
+\usepackage[size=a4,orientation=portrait,scale=1.4]{beamerposter}
+
+\usetheme{Xiaoshan}
+\setmonofont{Inconsolata}
+\usepackage[style=gb7714-2015]{biblatex}
+\addbibresource{sample-refs.bib}
+\usepackage{graphicx}
+
+% 幻灯片->海报需要的一些改动
+\linespread{1.2} % metropolis从\documentclass选项设置不到linespread的
+\setbeamertemplate{frame numbering}[none]
+\setbeamerfont{frametitle}{series=\mdseries\huge}
+% frankly idk why the additional space is needed on the poster
+\makeatletter
+\setbeamerfont{framesubtitle}{size=\large\hskip0.25\metropolis@frametitle@padding}
+\makeatother
+\addtobeamertemplate{block begin}{\large}{\normalsize}
+\setbeamerfont{block title}{size=\large}
+\addtobeamertemplate{block example begin}{\large}{\normalsize}
+\setbeamerfont{block title example}{size=\large}
+\addtobeamertemplate{block alerted begin}{\large}{\normalsize}
+\setbeamerfont{block title alerted}{size=\large}
+\setbeamercolor{bibliography entry note}{fg=block body.fg}
+
+% adjust itemize/enumerate list indents if necessary
+\setlength{\leftmargini}{1em}
+
+
+\urlstyle{tt}
+
+\title{当萧山beamer主题拿来做海报}
+\author{作者甲、作者乙、作者丙}
+
+\begin{document}
+
+\begin{frame}
+
+% ……懒得折腾了,\frametitle挺好看的,就这样吧【躺平ing
+\frametitle{\insertshorttitle}
+\framesubtitle{\insertshortauthor}
+
+\begin{block}{萧山城市图景}
+\begin{itemize}
+\item 绿地宋都·杭州世纪中心是杭州目前规划的最高地标建筑,位于钱江世纪城奥体板块核心位置。
+\item 萧山城市规划的一些相关思考\cite{ChenCai2021,ZhuEtal2021}
+\item \textbf{《次韵萧山友人》王祎:}
+长忆萧然山下县,去秋为客日招邀。
+夕阳玄度飞轮塔,晓雨文通梦笔桥。
+搜检虫鱼穷《尔雅》,咏歌草木续《离骚》。
+旧游回首成凋谢,莫遣音书似路遥。
+\end{itemize}
+
+\end{block}
+
+\smallskip
+
+\begin{columns}[T]
+\column{.45\textwidth}
+
+\begin{exampleblock}{算了我也不知道在写什么,do you?}
+ Now solve $x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a}$. 对各位同学来说应该挑战不大。
+\end{exampleblock}
+
+\begin{alertblock}{算了我也不知道在写什么,do you?}
+ \[ x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a} \]
+\end{alertblock}
+
+\begin{block}{算了我也不知道在写什么,do you?}
+ \[ x = \frac{-b \pm \sqrt{b^2 -4ac}}{2a} \]
+\end{block}
+
+% 个人觉得这个主题,多栏之间需要有个间隔。但是高度需要自己调整。
+\column{.01\textwidth}
+\textcolor{structure!80}{\rule{.1mm}{.22\textheight}}
+
+\column{.45\textwidth}
+\begin{proof}
+ 显而易见,$1+1=2$.
+\end{proof}
+
+\begin{theorem}
+ 有一件很美好的事情将要发生,它终会发生。
+\end{theorem}
+
+\begin{block}{萧山城市图景}
+\begin{itemize}
+\item 绿地宋都·杭州世纪中心是杭州目前规划的最高地标建筑,位于钱江世纪城奥体板块核心位置。
+\item 萧山城市规划的一些相关思考\cite{ChenCai2021,ZhuEtal2021}
+\end{itemize}
+\end{block}
+
+\end{columns}
+
+\begin{block}{杭州市萧山奥体绿地宋都·杭州世纪中心}
+\smallskip
+\centering
+\includegraphics[width=\textwidth,clip,trim=0pt 2cm 0pt 8cm,]{hangzhou-arch.jpg}\\
+图来自 \url{https://www.sohu.com/a/717899399_220260}
+\end{block}
+
+
+\begin{block}{\refname}
+\renewcommand*{\bibfont}{\small\linespread{1}\selectfont}
+\setlength{\biblabelsep}{0.25em}
+\printbibliography[heading=none]
+\end{block}
+
+\end{frame}
+\end{document}
diff --git a/graphics/pgf/contrib/pgfornament-han/tianqing-sample.pdf b/graphics/pgf/contrib/pgfornament-han/tianqing-sample.pdf
deleted file mode 100644
index 174e0865d0..0000000000
--- a/graphics/pgf/contrib/pgfornament-han/tianqing-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/graphics/pgf/contrib/pgfornament-han/xiaoshan-sample.pdf b/graphics/pgf/contrib/pgfornament-han/xiaoshan-sample.pdf
deleted file mode 100644
index 938436b852..0000000000
--- a/graphics/pgf/contrib/pgfornament-han/xiaoshan-sample.pdf
+++ /dev/null
Binary files differ
diff --git a/graphics/pgf/contrib/pgfplotsthemebeamer/DEPENDS.txt b/graphics/pgf/contrib/pgfplotsthemebeamer/DEPENDS.txt
new file mode 100644
index 0000000000..1c4fa2d593
--- /dev/null
+++ b/graphics/pgf/contrib/pgfplotsthemebeamer/DEPENDS.txt
@@ -0,0 +1,3 @@
+hard beamer
+hard tools
+hard pgfplots \ No newline at end of file
diff --git a/graphics/pgf/contrib/pgfplotsthemebeamer/README.md b/graphics/pgf/contrib/pgfplotsthemebeamer/README.md
new file mode 100644
index 0000000000..47c815caaf
--- /dev/null
+++ b/graphics/pgf/contrib/pgfplotsthemebeamer/README.md
@@ -0,0 +1,39 @@
+# pgfplotsthemebeamer
+
+[![License](https://img.shields.io/github/license/samcarter/pgfplotsthemebeamer.svg?color=blue)](http://www.latex-project.org/lppl.txt)
+[![GitHub tag](https://img.shields.io/github/tag/samcarter/pgfplotsthemebeamer.svg?label=current%20version&color=blue)](https://github.com/samcarter/pgfplotsthemebeamer/releases/latest)
+[![CTAN](https://img.shields.io/ctan/v/pgfplotsthemebeamer.svg?color=blue)](https://ctan.org/pkg/pgfplotsthemebeamer)
+
+A package for using colours from the current beamer theme in pgfplots diagrams.
+
+This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt .
+
+The project repository, including a bug tracker, can be found at https://github.com/samcarter/pgfplotsthemebeamer/issues .
+
+### Usage
+
+```latex
+\documentclass{beamer}
+
+\usetheme{moloch}% just as an example for a colour theme
+\usepackage{pgfplotsthemebeamer}
+
+\begin{document}
+
+\begin{frame}[plain]
+\centering
+\begin{tikzpicture}
+ \begin{axis}[
+ beamercolors
+ ]
+ \addplot {x}; \addplot {x-1}; \addplot {x-2};
+ \addplot {x-3}; \addplot {x-4}; \addplot {x-5};
+ \addplot {x-6}; \addplot {x-7}; \addplot {x-8};
+ \end{axis}
+\end{tikzpicture}
+\end{frame}
+
+\end{document}
+```
+
+For more details, please consult the [package documentation](https://github.com/samcarter/pgfplotsthemebeamer/blob/main/DOCUMENTATION.pdf).
diff --git a/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc-settings.sty b/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc-settings.sty
new file mode 100644
index 0000000000..cd57229fcf
--- /dev/null
+++ b/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc-settings.sty
@@ -0,0 +1,200 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Personal helper theme for package documentations
+% Copyright samcarter
+%
+% This file may be distributed and/or modified
+% under the LaTeX Project Public License 1.3c or later
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Usage:
+% ln ~/Life/latex/beamertheme-sam/themesam.sty package-doc-settings.sty
+% \usepackage[
+% themecolor=samdblue
+% ]{\jobname-settings}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Colours
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{xcolor}
+\definecolor{samyellow}{RGB}{246,193,65}
+\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
+\definecolor{samlila}{RGB}{101,67,159}% Rainbow beamer theme
+\definecolor{samdblue}{RGB}{0,51,134}% beamer theme
+\definecolor{samlblue}{RGB}{22,89,155}% TikZducks
+\definecolor{samteal}{RGB}{25,143,157}% Tcolorbox beamer theme
+\definecolor{samlgreen}{RGB}{68,170,153}% Jigsaw
+\definecolor{samdgreen}{RGB}{78,178,125}
+\definecolor{samlgray}{RGB}{160,160,185}
+\definecolor{samdgray}{RGB}{60,60,85}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Package options
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{xkeyval}
+\DeclareOptionX{themecolor}[samdblue]{\colorlet{themecolor}{#1}}
+\DeclareOptionX{listingcolor}[samlblue]{\colorlet{listingcolor}{#1}}
+\ExecuteOptionsX{themecolor,listingcolor}
+\ProcessOptionsX
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Packages
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@ifclassloaded{beamer}{}{%
+ \RequirePackage[english]{babel}
+ \RequirePackage[paper=a4paper,margin=2.9cm]{geometry}
+ \RequirePackage{scrlayer-scrpage}
+ \let\hrulefillx\hrulefill
+ \RequirePackage[bitstream-charter]{mathdesign}
+ \let\hrulefill\hrulefillx
+ \RequirePackage[hang,flushmargin,bottom]{footmisc}
+ \RequirePackage{footnotehyper}
+ \makesavenoteenv{tcolorbox}
+ \RequirePackage[all]{nowidow}
+ \RequirePackage[colorlinks=true,breaklinks=true,allcolors=themecolor,hyperfootnotes=false]{hyperref}
+}
+\RequirePackage[T1]{fontenc}
+\RequirePackage{xspace}
+\RequirePackage{inconsolata}% mono font with bold, but italic is missing
+% \RequirePackage[scale=0.85]{cascadia-code}
+% \AddToHook{cmd/ttfamily/before}{\fontseries{sl}}
+\RequirePackage{iexec}
+\usepackage{synthslant}% to fake slented comments in inconsolata
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Listings
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage[
+ cachedir=$TMPDIR/minted/
+]{minted}
+
+% smuggling custom pygmentize style in cache folder
+% (a real pygmentise style would need installtion in some python folder)
+\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%
+ \let\PYG@bc=\relax \let\PYG@ff=\relax}
+\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
+\def\PYG@toks#1+{\ifx\relax#1\empty\else%
+ \PYG@tok{#1}\expandafter\PYG@toks\fi}
+\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
+ \PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
+\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
+
+% optional arguments
+\expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor{black}{##1}}}
+
+% macros
+\expandafter\def\csname PYG@tok@k\endcsname{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}
+% curly brakets
+\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}{\textsynthslant{##1}}}}
+
+\def\PYGZbs{\char`\\}
+\def\PYGZus{\char`\_}
+\def\PYGZob{\char`\{}
+\def\PYGZcb{\char`\}}
+\def\PYGZca{\char`\^}
+\def\PYGZam{\char`\&}
+\def\PYGZlt{\char`\<}
+\def\PYGZgt{\char`\>}
+\def\PYGZsh{\char`\#}
+\def\PYGZpc{\char`\%}
+\def\PYGZdl{\char`\$}
+\def\PYGZhy{\char`\-}
+\def\PYGZsq{\char`\'}
+\def\PYGZdq{\char`\"}
+\def\PYGZti{\char`\~}
+% for compatibility with earlier versions
+\def\PYGZat{@}
+\def\PYGZlb{[}
+\def\PYGZrb{]}
+\makeatother
+\end{filecontents*}
+
+\iexec{mkdir -p $TMPDIR/minted && mv sam.pygstyle $TMPDIR/minted/.}
+
+\usemintedstyle{sam}
+\setminted{
+ breaksymbolleft={},
+ tabsize=2,
+ breaklines=true,
+}
+\newminted[samcode]{latex}{}
+\newmintinline[saminline]{latex}{}
+
+% use non-bold and all coloured for inline code in articles
+\ifdefined\insertaspectratio\else
+ \patchcmd{\minted@inputpyg@inline}{\minted@input}{\color{listingcolor}\renewcommand\textcolor[3][]{##3}\renewcommand\bfseries{}\minted@input}{}{}
+\fi
+
+\RequirePackage[most]{tcolorbox}
+\tcbuselibrary{minted}
+\tcbset{%
+ colframe=themecolor,
+ fonttitle=\bfseries,
+ sidebyside,
+ center lower,
+ righthand width=5.7cm,
+ bottom=2pt,
+ top=2pt,
+ left=3pt,
+ right=3pt,
+ sidebyside gap=10pt,
+ lower separated=false,
+ listing engine=minted,
+ minted language=latex,
+ colback=themecolor!10,
+ sharp corners,
+ boxrule=0pt,
+ before title={\strut}
+}
+
+% avoid page breaks right in front of the tcolorbox
+\@ifclassloaded{beamer}{}{
+ \tcbuselibrary{hooks}
+ \tcbset{before pre={\nopagebreak[4]}}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% document settings
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@ifclassloaded{scrartcl}{%
+ \KOMAoptions{parskip=half}
+ \addtokomafont{sectioning}{\color{themecolor}}
+ \addtokomafont{date}{\normalsize}
+ \addtokomafont{author}{\normalsize}
+ \setlength{\footnotemargin}{0.7em}
+}{}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Custom macros
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\providecommand*{\CTAN}{\textsc{CTAN}\xspace}
+\providecommand*{\TikZ}{Ti\emph{k}Z\xspace}
+\providecommand*{\miktex}{MiK\TeX\xspace}
+\providecommand*{\texlive}{\TeX{}Live\xspace}
+\providecommand*{\tikzbrick}{Ti\emph{k}Zbrick\xspace}
+\providecommand*{\tikzducks}{Ti\emph{k}Zducks\xspace}
+\providecommand*{\tikzlings}{Ti\emph{k}Zlings\xspace}
+\providecommand*{\tikzmarmots}{Ti\emph{k}Zmarmots\xspace}
+\providecommand*{\ConTeXt}{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.pdf b/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.pdf
new file mode 100644
index 0000000000..a312a05245
--- /dev/null
+++ b/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.tex b/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.tex
new file mode 100644
index 0000000000..3beb6c99b6
--- /dev/null
+++ b/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer-doc.tex
@@ -0,0 +1,119 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Documentation for the pgfplotsthemebeamer package
+% Using colours from the current beamer theme in pgfplots
+% Maintained by samcarter
+%
+% Project repository and bug tracker:
+% https://github.com/samcarter/pgfplotstheme-beamer
+%
+% Released under the LaTeX Project Public License v1.3c or later
+% See http://www.latex-project.org/lppl.txt
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% !TeX program = txs:///arara
+% arara: latexmk: {
+% arara: --> engine: pdflatex,
+% arara: --> options: [
+% arara: --> '-shell-escape',
+% arara: --> '-synctex=1',
+% arara: --> '-interaction=nonstopmode',
+% arara: --> ]
+% arara: --> }
+\documentclass{scrartcl}
+
+% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\title{The pgfplotsthemebeamer package}
+\subtitle{Using colours from the current beamer theme in pgfplots}
+\author{%
+ \texorpdfstring{
+ \texttt{samcarter}\\
+ \url{https://github.com/samcarter/pgfplotsthemebeamer}\\
+ \url{https://ctan.org/pkg/pgfplotsthemebeamer}
+ }{samcarter}}
+\date{Version v0.2 \textendash{} 2024/08/02}
+
+\usepackage[
+ themecolor=samorange
+]{\jobname-settings}
+
+% customisation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\prefix}{./include}
+\tcbset{
+ compilable listing/.style={listing file={\prefix/\jobname-listing-\thetcblistingcount.tex}},
+ run pdflatex/.style={run@system@command={cd\space \prefix;\space pdflatex}{\jobname-listing-\thetcblistingcount.tex}},%
+}
+
+\begin{document}
+\maketitle
+
+\section{Introduction}
+\label{intro}
+
+Beamer themes often use carefully composed colour schemes. The \saminline|pgfplotsthemebeamer| package allows to reuse these colours in diagrams created with \saminline|pfgplots|. This ensures a consistent colour scheme throughout the presentation and avoids unsightly colour clashes.
+
+The package is included in \TeX{}Live
+%and MiK\TeX\
+and available from \textsc{CTAN} (\url{https://www.ctan.org/pkg/pgfplotsthemebeamer}).
+The development version of this package is located at \url{https://github.com/samcarter/pgfplotsthemebeamer}. 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}.
+
+\section{Usage}
+
+The basic usage is fairly simple. After loading the \saminline|pgfplotsthemebeamer| package, plots can use the \saminline|beamercolor| option to use the colours from the current beamer theme in the diagram:
+\begin{tcolorbox}[title={Usage}]
+\begin{samcode}
+\usepackage{pgfplotsthemebeamer}
+
+\begin{axis}[
+ beamercolors
+]
+...
+\end{axis}
+\end{samcode}
+\end{tcolorbox}
+The graphs will be coloured in the beamer colours \saminline|structure|, \saminline|alerted text| and \saminline|example text|. In most beamer themes, these three colours form an easily distinguishable set of colours.
+
+Users who would like to use the \saminline|beamercolors| scheme for all \saminline|pgfplots| diagrams in the presentation, can load the package with the \saminline|all| option, which will make this colour scheme the default.
+\begin{tcolorbox}[title={Usage}]
+\begin{samcode}
+\usepackage[all]{pgfplotsthemebeamer}
+\end{samcode}
+\end{tcolorbox}
+
+\section{Full example}
+\begin{tcblisting}{
+ listing only,
+ freeze pdf,
+ compilable listing,
+ run pdflatex,
+ title={Basic example},
+ righthand width=0pt
+}
+\documentclass{beamer}
+
+\usetheme{moloch}% just as an example for a colour theme
+\usepackage{pgfplotsthemebeamer}
+
+\begin{document}
+
+\begin{frame}[plain]
+\centering
+\begin{tikzpicture}
+ \begin{axis}[
+ beamercolors
+ ]
+ \addplot {x}; \addplot {x-1}; \addplot {x-2}; \addplot {x-3}; \addplot {x-4}; \addplot {x-5}; \addplot {x-6}; \addplot {x-7}; \addplot {x-8};
+ \end{axis}
+\end{tikzpicture}
+\end{frame}
+
+\end{document}
+\end{tcblisting}
+\vfill
+\centering
+\setlength{\fboxsep}{0pt}%
+\fbox{\includegraphics[width=.75\textwidth]{pgfplotsthemebeamer-doc-listing-1.pdf}}%
+
+\end{document}
diff --git a/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer.sty b/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer.sty
new file mode 100644
index 0000000000..23006e89c5
--- /dev/null
+++ b/graphics/pgf/contrib/pgfplotsthemebeamer/pgfplotsthemebeamer.sty
@@ -0,0 +1,37 @@
+% !TeX root = ./testing/test.tex
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The pgfplotsthemebeamer package
+% Using colours from the current beamer theme in pgfplots
+% Maintained by samcarter
+%
+% Project repository and bug tracker:
+% https://github.com/samcarter/pgfplotstheme-beamer
+%
+% Released under the LaTeX Project Public License v1.3c or later
+% See http://www.latex-project.org/lppl.txt
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{pgfplotsthemebeamer}[2024/08/02 version v0.2 PGFplots colours based the colours of the current beamer theme]
+
+% error if used with a class other than beamer
+\IfClassLoadedF{beamer}{%
+ \PackageError{pgfplotsthemebeamer}{This pgfplots theme needs to be used in conjunction with the beamer class}{}
+}
+
+% setting up colours
+\RequirePackage{pgfplots}
+\pgfplotsset{
+ beamercolors/.style={
+ cycle multi list={
+ mark=*\\mark=x\\mark=square*\\mark=o\\mark=+\\mark=square\\\nextlist
+ structure.fg\\alerted text.fg\\example text.fg\\
+ }
+ }
+}
+
+% making beamercolors default if package is loaded with `all` option
+\DeclareOption{all}{
+ \pgfplotsset{beamercolors}
+}
+\ProcessOptions\relax
diff --git a/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.pdf b/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.pdf
index 160751afc2..ecb80966c2 100644
--- a/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.pdf
+++ b/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.tex b/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.tex
index ae34054bba..ca2ce649d4 100644
--- a/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.tex
+++ b/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-en.tex
@@ -45,9 +45,9 @@
\usepackage[margin=1.5cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.4}
-\def\TPdate{16/04/2024}
-
+\def\TPversion{0.1.6}
+\def\TPdate{04/01/2025}
+\usepackage{minted2}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
\NewTCBListing{PresentationCode}{ O{blue} m }{%
@@ -453,6 +453,33 @@ In the following example, the \textit{symbols} to print can't be used for the \t
\pagebreak
+\subsection{Symbols within list(s)}
+
+List of symbols can be given within list(s), picked randomly.
+
+\begin{PresentationCode}{}
+\begin{filecontents*}[overwrite]{testlist.csv}
+A,B,C,A
+A,B,B,C
+B,A,C,B
+C,A,B,C
+\end{filecontents*}
+
+\textbf{Notice : }
+
+Multiples of 5 : red\\
+Multiples of 3 : green\\
+Multiples of 2 : blue
+
+\PixlArtTikz[Codes=ABC,Symbols={5§25§35,3§9§21§27,2§4§8§14§16},Symb,Style=\large\sffamily,Unit=0.85]{testlist.csv}
+\hspace{5mm}
+\PixlArtTikz[Codes=ABC,Symbols={5§25§35,3§9§21§27,2§4§8§14§16},Symb,Style=\large\sffamily,Unit=0.85]{testlist.csv}
+\hspace{5mm}
+\PixlArtTikz[Codes=ABC,Colors={red,green,blue},Correction,Style=\large\sffamily,Unit=0.85]{testlist.csv}
+\end{PresentationCode}
+
+\pagebreak
+
\subsection{Starred macro}
The starred macro \texttt{\textbackslash PixlArtTikz*} is to be used within an already created environment. It can be useful for adding code after the PixelArt.
@@ -877,10 +904,43 @@ In this paragraph, we use the data \texttt{PAsorciere}, which corresponds to the
\end{tabular}
\end{PresentationCode}
+\pagebreak
+
+\section{With datatool}
+
+\subsection{Macros}
+
+\begin{PresentationCode}{listing only}
+%reading of csv
+\readdtcsv{file.csv}{readname}
+
+%full pixelart (french keys for the moment...)
+\dtpixlarttikz[keys]{readname}
+
+%cut pixelart (french keys for the moment...)
+\dtpixlarttikzblock[clés]{readname}{LxC or L+C}{numblock}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+%reading of csv (koala)
+\readdtcsv{PAkoala.csv}{DTkoala}
+
+%full pixelart
+\dtpixlarttikz[Correction,Unite=0.125,Codes=ABCDEFGHI,Couleurs={\listcoulkoala},Decoupage=8x8]{DTkoala}
+
+%cut pixelart (french keys for the moment...)
+\dtpixlarttikzblock[Unite=0.125,Correction,Codes=ABCDEFGHI,Couleurs={\listcoulkoala}]%
+ {DTkoala}{8x8}{1/1}
+\end{PresentationCode}
+
\newpage
\part{History}
+\verb|v0.1.6|~:~~~~Styles for lines + \textsf{datatool} for alternative version
+
+\verb|v0.1.5|~:~~~~Symbols can be given with list(s) + Enhancements of internal code
+
\verb|v0.1.4|~:~~~~Anamorphic cylinder PixelArts
\verb|v0.1.3|~:~~~~Cut PixelArts within several PixelArts
diff --git a/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.pdf b/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.pdf
index dba701f59d..29070143dc 100644
--- a/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.pdf
+++ b/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.tex b/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.tex
index 94e9f30b37..794d20bd36 100644
--- a/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.tex
+++ b/graphics/pgf/contrib/pixelarttikz/doc/PixelArtTikz-doc-fr.tex
@@ -44,9 +44,10 @@
\usepackage[margin=1.5cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.4}
-\def\TPdate{16 avril 2024}
+\def\TPversion{0.1.6}
+\def\TPdate{4 janvier 2025}
+\usepackage{minted2}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
\NewTCBListing{PresentationCode}{ O{blue} m }{%
@@ -206,12 +207,12 @@ Avant toute chose, quelques petites infos sur les données au format \textsf{csv
Le fichier \textsf{csv} peut être déclaré directement dans le fichier \textsf{tex}, grâce à l'environnement \textsf{filecontents} (intégré en natif sur les dernières versions de \LaTeX) :
\begin{PresentationCode}{listing only}
- \begin{filecontents*}{nomfichier.csv}
- A,B,C,D
- A,B,D,C
- B,A,C,D
- B,A,D,C
- \end{filecontents*}
+\begin{filecontents*}{nomfichier.csv}
+ A,B,C,D
+ A,B,D,C
+ B,A,C,D
+ B,A,D,C
+\end{filecontents*}
\end{PresentationCode}
À la compilation, le fichier \textsf{nomfichier.csv} sera créé automatiquement, et l'option \Cle{[overwrite]} permet (logiquement) de propager les modifications au fichier \textsf{csv}.
@@ -237,6 +238,8 @@ L'option \Cle{[csvii]} permet de passer l'appel au package en version \hologo{La
%\RequirePackage[legacy]{csvsimple}
\end{PresentationCode}
+À noter qu'une version alternative \textit{simple}, avec le package \textsf{datatool}, est également disponible.
+
\subsection{Packages utilisés}
Le package est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}.
@@ -504,6 +507,35 @@ Dans l'exemple suivant, les \textit{symboles} à afficher ne peuvent pas servir
\pagebreak
+\subsection{Symboles dans une liste}
+
+À noter qu'il est possible de donner comme symboles des listes dans lesquelles seront choisies aléatoirement les symboles.
+
+\begin{PresentationCode}{}
+%codes à afficher, avec utiliser des symboles "alétaoires" dans une liste
+
+\begin{filecontents*}[overwrite]{testlist.csv}
+A,B,C,A
+A,B,B,C
+B,A,C,B
+C,A,B,C
+\end{filecontents*}
+
+\textbf{Notice : }
+
+Multiples de 5 : Rouge\\
+Multiples de 3 : Vert\\
+Multiples de 2 : Bleu
+
+\PixelArtTikz[Codes=ABC,Symboles={5§25§35,3§9§21§27,2§4§8§14§16},Symb,Style=\large\sffamily,Unite=0.85]{testlist.csv}
+\hspace{5mm}
+\PixelArtTikz[Codes=ABC,Symboles={5§25§35,3§9§21§27,2§4§8§14§16},Symb,Style=\large\sffamily,Unite=0.85]{testlist.csv}
+\hspace{5mm}
+\PixelArtTikz[Codes=ABC,Couleurs={red,green,blue},Correction,Style=\large\sffamily,Unite=0.85]{testlist.csv}
+\end{PresentationCode}
+
+\pagebreak
+
\subsection{Commande étoilée}
La commande \textit{étoilée} \texttt{\textbackslash PixelArtTikz*} permet d'intégrer le PixelArt dans un environnement créé par l'utilisateur. Cela permet par exemple de pouvoir rajouter du code en parallèle du PixelArt.
@@ -1110,8 +1142,49 @@ Il est également possible de créer le tableau \textit{manuellement}, avec une
\pagebreak
+\section{Avec le package datatool}
+
+\subsection{Commandes}
+
+Le package \textsf{datatool}, chargé par \textsf{PixelArtTikz}, permet de représenter un PixelArt (sans environnement).
+
+Les clés sont les mêmes que pour la version \textsf{csvsimple}, mais il est nécessaire de \textit{traiter} le ficher \textsf{csv} en amont des tracés.
+
+\begin{PresentationCode}{listing only}
+%lecture du fichier csv
+\readdtcsv{fichier.csv}{nomlecture}
+
+%traitement du PixelArt complet
+\dtpixlarttikz[clés]{nomlecture}
+
+%traitement du PixelArt en mode découpage
+\dtpixlarttikzblock[clés]{nomlecture}{LxC ou L+C}{numbloc}
+\end{PresentationCode}
+
+À noter que la commande est autonome, ne permet pas d'ajouts éventuels, mais est compatible avec le traitement par découpage (mais sans création automatique des blocs de découpage avec présentation).
+
+\subsection{Exemple}
+
+\begin{PresentationCode}{}
+%lecture du fichier csv (koala)
+\readdtcsv{PAkoala.csv}{DTkoala}
+
+%traitement du PixelArt complet
+\dtpixlarttikz[Correction,Unite=0.125,Codes=ABCDEFGHI,Couleurs={\listcoulkoala},Decoupage=8x8]{DTkoala}
+
+%traitement du PixelArt en mode découpage
+\dtpixlarttikzblock[Unite=0.125,Correction,Codes=ABCDEFGHI,Couleurs={\listcoulkoala}]%
+ {DTkoala}{8x8}{1/1}
+\end{PresentationCode}
+
+\pagebreak
+
\part{Historique}
+\verb|v0.1.6|~:~~~~Ajout d'un style pour les traits + utilisation de \textsf{datatool} (plus rapide ?)
+
+\verb|v0.1.5|~:~~~~Symboles sous forme de liste(s) (éléments tirés aléatoirement) + Amélioration du traitement
+
\verb|v0.1.4|~:~~~~PixelArts avec anamorphose cylindrique
\verb|v0.1.3|~:~~~~Possibilité de créer des PixelArts collaboratifs
diff --git a/graphics/pgf/contrib/pixelarttikz/doc/testlist.csv b/graphics/pgf/contrib/pixelarttikz/doc/testlist.csv
new file mode 100644
index 0000000000..ab1d24e697
--- /dev/null
+++ b/graphics/pgf/contrib/pixelarttikz/doc/testlist.csv
@@ -0,0 +1,4 @@
+A,B,C,A
+A,B,B,C
+B,A,C,B
+C,A,B,C
diff --git a/graphics/pgf/contrib/pixelarttikz/tex/PixelArtTikz.sty b/graphics/pgf/contrib/pixelarttikz/tex/PixelArtTikz.sty
index 711b0e919a..bcd4f6c79a 100644
--- a/graphics/pgf/contrib/pixelarttikz/tex/PixelArtTikz.sty
+++ b/graphics/pgf/contrib/pixelarttikz/tex/PixelArtTikz.sty
@@ -1,8 +1,10 @@
% Author.........: C. Pierquet
-% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{PixelArtTikz}[2024/04/16 v0.1.4 PixelArts with csv and TikZ]
+\ProvidesPackage{PixelArtTikz}[2025/01/04 v0.1.6 PixelArts with csv and TikZ]
+% 0.1.6 Ajout d'un style pour les traits + utilisation de datatool (plus rapide ?)
+% 0.1.5 Amélioration du code interne + possibilité de créer des grilles avec des symboles choisis dans une liste
% 0.1.4 Cylinder anamorphic pixelart
% 0.1.3 Split PA into grid
% 0.1.2 Mini pixerlart
@@ -23,8 +25,7 @@
\RequirePackage{xstring}
\RequirePackage{multicol}
\RequirePackage{listofitems}
-%librairies tikz
-%\usetikzlibrary{calc,shapes.geometric}
+\RequirePackage{ifthen}
%cvs
\if@csvii
\RequirePackage[legacy]{csvsimple}
@@ -33,6 +34,24 @@
\RequirePackage[l3]{csvsimple}
\fi
+%------Styles tikz
+\tikzset{pixlarttrait/.style={}}
+\tikzset{pixlarttraitdecoup/.style={thick,purple}}
+\tikzset{pixlartnoticedecoup/.style={font=\large\sffamily}}
+
+\NewDocumentCommand\TraiteListeSymbPixelArt{ m }{%
+ \IfSubStr{#1}{§}%
+ {%
+ \setsepchar{§}%
+ \readlist*\lstPAchoices{#1}%
+ \xdef\lstPAchoicesrand{\fpeval{randint(1,\lstPAchoiceslen)}}%
+ \lstPAchoices[\lstPAchoicesrand]%
+ }%
+ {%c'est normal
+ #1%
+ }%
+}
+
%------clés [fr] / keys [en]
\defKV[pixelarttkz]{%
Codes=\def\PATlettres{#1},%
@@ -60,36 +79,31 @@
\IfBooleanTF{#1}{}{\begin{tikzpicture}[x=\PATunit cm,y=\PATunit cm,#3]}
\ifboolKV[pixelarttkz]{Correction}%
{%
+ \readlist*\LCPA\PATcouleurs%
\csvloop{file=#4,no head,command={%
\foreach \l [count=\n] in \csvline {%
\StrDel{\l}{ }[\l]%
- \setsepchar{,}%
- \readlist*\LCPA\PATcouleurs%
\StrPosition{\PATlettres}{\l}[\pixcnt]%
- \xintifboolexpr{\pixcnt>0}%
- {%
- \itemtomacro\LCPA[\pixcnt]\pixcol%
- \ifboolKV[pixelarttkz]{BordCases}%
- {\draw[fill=\pixcol] ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) ;}%
- {\filldraw[\pixcol] ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) ;}%
- }%
- {}%
+ \ifnum\pixcnt>0%
+ \ifboolKV[pixelarttkz]{BordCases}%
+ {\draw[fill={\LCPA[\pixcnt]}] ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) ;}%
+ {\filldraw[{\LCPA[\pixcnt]}] ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) ;}%
+ \fi%
}%
}%
}%
}%
{%
\ifboolKV[pixelarttkz]{Symb}{%affichage du pixelart versions chiffres si besoin
+ \readlist*\LCNA\PATchiffres%
\csvloop{file=#4,no head,command={%
\foreach \l [count=\n] in \csvline {%
\StrDel{\l}{ }[\l]%
- \setsepchar{,}%
- \readlist*\LCNA\PATchiffres%
\StrPosition{\PATlettres}{\l}[\pixpos]%
\xintifboolexpr{\pixpos>0}%
{%
\itemtomacro\LCNA[\pixpos]\pixchf%
- \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\pixchf} ;%
+ \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
{}%
}%
@@ -120,8 +134,8 @@
\IfSubStr{\PATdecoup}{x}%
{%
\StrCut{\PATdecoup}{x}{\NbLigBloc}{\NbColBloc}%tracés des traits
- \foreach \i in {0,\NbLigBloc,...,\NbLigTot}{\draw[thick,purple] ({0.5-0.33},{-\i-0.5}) -- ({\thecsvcolumncount+0.5+0.33},{-\i-0.5}) ;}%
- \foreach \j in {0,\NbColBloc,...,\NbColTot}{\draw[thick,purple] ({\j+0.5},{-0.5+0.33}) -- ({\j+0.5},{-\thecsvinputline+0.5-0.33}) ;}%
+ \foreach \i in {0,\NbLigBloc,...,\NbLigTot}{\draw[pixlarttraitdecoup] ({0.5-0.33},{-\i-0.5}) -- ({\thecsvcolumncount+0.5+0.33},{-\i-0.5}) ;}%
+ \foreach \j in {0,\NbColBloc,...,\NbColTot}{\draw[pixlarttraitdecoup] ({\j+0.5},{-0.5+0.33}) -- ({\j+0.5},{-\thecsvinputline+0.5-0.33}) ;}%
}%
{}%
\IfSubStr{\PATdecoup}{+}%
@@ -129,8 +143,8 @@
\StrCut{\PATdecoup}{+}{\NbBlocLIG}{\NbBlocCOL}%
\def\NbLigBloc{\xintieval{(\NbLigTot-1)/\NbBlocLIG}}%
\def\NbColBloc{\xintieval{(\NbColTot)/\NbBlocCOL}}%
- \foreach \i in {0,\NbLigBloc,...,\NbLigTot}{\draw[thick,purple] ({0.5-0.33},{-\i-0.5}) -- ({\thecsvcolumncount+0.5+0.33},{-\i-0.5}) ;}%
- \foreach \j in {0,\NbColBloc,...,\NbColTot}{\draw[thick,purple] ({\j+0.5},{-0.5+0.33}) -- ({\j+0.5},{-\thecsvinputline+0.5-0.33}) ;}%
+ \foreach \i in {0,\NbLigBloc,...,\NbLigTot}{\draw[pixlarttraitdecoup] ({0.5-0.33},{-\i-0.5}) -- ({\thecsvcolumncount+0.5+0.33},{-\i-0.5}) ;}%
+ \foreach \j in {0,\NbColBloc,...,\NbColTot}{\draw[pixlarttraitdecoup] ({\j+0.5},{-0.5+0.33}) -- ({\j+0.5},{-\thecsvinputline+0.5-0.33}) ;}%
}%
{}%
}%
@@ -145,11 +159,10 @@
\begin{tikzpicture}[x=\PATunit cm,y=\PATunit cm,#2]
\ifboolKV[pixelarttkz]{Correction}%
{%
+ \readlist*\LCPA\PATcouleurs%
\csvloop{file=#3,no head,command={%
\foreach \l [count=\n] in \csvline {%
\StrDel{\l}{ }[\l]%
- \setsepchar{,}%
- \readlist*\LCPA\PATcouleursù
\StrPosition{\PATlettres}{\l}[\pixcnt]%
\xintifboolexpr{\pixcnt>0}%
{%
@@ -165,16 +178,15 @@
}%
{%
\ifboolKV[pixelarttkz]{Symb}{%affichage du pixelart versions chiffres si besoin
+ \readlist*\LCNA\PATchiffres%
\csvloop{file=#3,no head,command={%
\foreach \l [count=\n] in \csvline {%
\StrDel{\l}{ }[\l]%
- \setsepchar{,}%
- \readlist*\LCNA\PATchiffres%
\StrPosition{\PATlettres}{\l}[\pixpos]%
\xintifboolexpr{\pixpos>0}%
{%
\itemtomacro\LCNA[\pixpos]\pixchf%
- \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\pixchf} ;%
+ \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
{}%
}%
@@ -226,11 +238,10 @@
\IfBooleanTF{#1}{}{\begin{tikzpicture}[x=\PATunit cm,y=\PATunit cm,#3]}
\ifboolKV[pixelarttkzen]{Correction}%
{%
+ \readlist*\LCPA\PATcouleurs%
\csvloop{file=#4,no head,command={%
\foreach \l [count=\n] in \csvline {%
\StrDel{\l}{ }[\l]%
- \setsepchar{,}%
- \readlist*\LCPA\PATcouleurs%
\StrPosition{\PATlettres}{\l}[\pixcnt]%
\xintifboolexpr{\pixcnt>0}%
{%
@@ -246,16 +257,15 @@
}%
{%
\ifboolKV[pixelarttkzen]{Symb}{%affichage du pixelart versions chiffres si besoin
+ \readlist*\LCNA\PATchiffres%
\csvloop{file=#4,no head,command={%
\foreach \l [count=\n] in \csvline {%
\StrDel{\l}{ }[\l]%
- \setsepchar{,}%
- \readlist*\LCNA\PATchiffres%
\StrPosition{\PATlettres}{\l}[\pixpos]%
\xintifboolexpr{\pixpos>0}%
{%
\itemtomacro\LCNA[\pixpos]\pixchf%
- \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\pixchf} ;%
+ \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
{}%
}%
@@ -311,11 +321,10 @@
\begin{tikzpicture}[x=\PATunit cm,y=\PATunit cm,#2]
\ifboolKV[pixelarttkzen]{Correction}%
{%
+ \readlist*\LCPA\PATcouleurs%
\csvloop{file=#3,no head,command={%
\foreach \l [count=\n] in \csvline {%
\StrDel{\l}{ }[\l]%
- \setsepchar{,}%
- \readlist*\LCPA\PATcouleurs%
\StrPosition{\PATlettres}{\l}[\pixcnt]%
\xintifboolexpr{\pixcnt>0}%
{%
@@ -331,16 +340,15 @@
}%
{%
\ifboolKV[pixelarttkzen]{Symb}{%affichage du pixelart versions chiffres si besoin
+ \readlist*\LCNA\PATchiffres%
\csvloop{file=#3,no head,command={%
\foreach \l [count=\n] in \csvline {%
\StrDel{\l}{ }[\l]%
- \setsepchar{,}%
- \readlist*\LCNA\PATchiffres%
\StrPosition{\PATlettres}{\l}[\pixpos]%
\xintifboolexpr{\pixpos>0}%
{%
\itemtomacro\LCNA[\pixpos]\pixchf%
- \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\pixchf} ;%
+ \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
{}%
}%
@@ -472,17 +480,20 @@
\StrCut{#5}{/}{\NumBlocLig}{\NumBlocCol}%
\xdef\PAfirstline{\xinteval{\NbLigBloc*(\NumBlocLig-1)+1}}%
\xdef\PAlastline{\xinteval{\NbLigBloc*(\NumBlocLig-1)+\NbLigBloc}}%
+ \xdef\PAblocmin{\xinteval{(\NbColBloc*(\NumBlocCol-1)+1)}}%
+ \xdef\PAblocmax{\xinteval{(\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}}%
%affichage du corrigé / display of correction
\begin{tikzpicture}[x=\PATunit cm,y=\PATunit cm,#2]
\ifboolKV[pixelarttkz]{Correction}%
{%
+ \readlist*\LCPA\PATcouleurs%
\csvloop{file=#3,range=\PAfirstline-\PAlastline,no head,command={%
\foreach \l [count=\n] in \csvline {%
- \xintifboolexpr{ \n >= (\NbColBloc*(\NumBlocCol-1)+1) 'and' \n <= (\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}%
+ \xintifboolexpr{ \n >= \PAblocmin 'and' \n <= \PAblocmax}%
{%
\StrDel{\l}{ }[\l]%
\setsepchar{,}%
- \readlist*\LCPA\PATcouleurs%
+ %\readlist*\LCPA\PATcouleurs%
\StrPosition{\PATlettres}{\l}[\pixcnt]%
\xintifboolexpr{\pixcnt>0}%
{%
@@ -500,18 +511,19 @@
}%
{%
\ifboolKV[pixelarttkz]{Symb}{%affichage du pixelart versions chiffres si besoin
+ \readlist*\LCNA\PATchiffres%
\csvloop{file=#3,range=\PAfirstline-\PAlastline,no head,command={%
\foreach \l [count=\n] in \csvline {%
- \xintifboolexpr{ \n >= (\NbColBloc*(\NumBlocCol-1)+1) 'and' \n <= (\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}%
+ \xintifboolexpr{ \n >= \PAblocmin 'and' \n <= \PAblocmax}%
{%
\StrDel{\l}{ }[\l]%
\setsepchar{,}%
- \readlist*\LCNA\PATchiffres%
+ %\readlist*\LCNA\PATchiffres%
\StrPosition{\PATlettres}{\l}[\pixpos]%
\xintifboolexpr{\pixpos>0}%
{%
\itemtomacro\LCNA[\pixpos]\pixchf%
- \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\pixchf} ;%
+ \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
{}%
}%
@@ -523,7 +535,7 @@
{%affichage du pixelart versions lettres ou chiffres simples (<=9) / display of letters/symbols PixelArt
\csvloop{file=#3,range=\PAfirstline-\PAlastline,no head,command={%
\foreach \l [count=\n] in \csvline {%
- \xintifboolexpr{ \n >= (\NbColBloc*(\NumBlocCol-1)+1) 'and' \n <= (\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}%
+ \xintifboolexpr{ \n >= \PAblocmin 'and' \n <= \PAblocmax}%
{%
\StrDel{\l}{ }[\l]%
\IfSubStr{\PATlettres}{\l}%
@@ -593,7 +605,7 @@
\begin{tikzpicture}[scale=#2,transform shape]
\xintFor* ##1 in {\xintSeq{1}{\NbTotLig}}\do{%
\xintFor* ##2 in {\xintSeq{1}{\NbTotCol}}\do{%
- \draw[semithick] (##2,-##1) rectangle++(1,-1) node[midway] {\IfBooleanTF{#1}{##1.}{\StrChar{\PAalphabet}{##1}}##2} ;
+ \draw[semithick] (##2,-##1) rectangle++(1,-1) node[midway,pixlartnoticedecoup] {\IfBooleanTF{#1}{##1.}{\StrChar{\PAalphabet}{##1}}##2} ;
}%
}%
\end{tikzpicture}%
@@ -625,17 +637,20 @@
\StrCut{#5}{/}{\NumBlocLig}{\NumBlocCol}%
\xdef\PAfirstline{\xinteval{\NbLigBloc*(\NumBlocLig-1)+1}}%
\xdef\PAlastline{\xinteval{\NbLigBloc*(\NumBlocLig-1)+\NbLigBloc}}%
+ \xdef\PAblocmin{\xinteval{(\NbColBloc*(\NumBlocCol-1)+1)}}%
+ \xdef\PAblocmax{\xinteval{(\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}}%
%affichage du corrigé / display of correction
\begin{tikzpicture}[x=\PATunit cm,y=\PATunit cm,#2]
\ifboolKV[pixelarttkzen]{Correction}%
{%
+ \readlist*\LCPA\PATcouleurs%
\csvloop{file=#3,range=\PAfirstline-\PAlastline,no head,command={%
\foreach \l [count=\n] in \csvline {%
- \xintifboolexpr{ \n >= (\NbColBloc*(\NumBlocCol-1)+1) 'and' \n <= (\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}%
+ \xintifboolexpr{ \n >= \PAblocmin 'and' \n <= \PAblocmax}%
{%
\StrDel{\l}{ }[\l]%
\setsepchar{,}%
- \readlist*\LCPA\PATcouleurs%
+ %\readlist*\LCPA\PATcouleurs%
\StrPosition{\PATlettres}{\l}[\pixcnt]%
\xintifboolexpr{\pixcnt>0}%
{%
@@ -653,18 +668,19 @@
}%
{%
\ifboolKV[pixelarttkzen]{Symb}{%affichage du pixelart versions chiffres si besoin
+ \readlist*\LCNA\PATchiffres%
\csvloop{file=#3,range=\PAfirstline-\PAlastline,no head,command={%
\foreach \l [count=\n] in \csvline {%
- \xintifboolexpr{ \n >= (\NbColBloc*(\NumBlocCol-1)+1) 'and' \n <= (\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}%
+ \xintifboolexpr{ \n >= \PAblocmin 'and' \n <= \PAblocmax}%
{%
\StrDel{\l}{ }[\l]%
\setsepchar{,}%
- \readlist*\LCNA\PATchiffres%
+ %\readlist*\LCNA\PATchiffres%
\StrPosition{\PATlettres}{\l}[\pixpos]%
\xintifboolexpr{\pixpos>0}%
{%
\itemtomacro\LCNA[\pixpos]\pixchf%
- \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\pixchf} ;%
+ \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
{}%
}%
@@ -676,7 +692,7 @@
{%affichage du pixelart versions lettres ou chiffres simples (<=9) / display of letters/symbols PixelArt
\csvloop{file=#3,range=\PAfirstline-\PAlastline,no head,command={%
\foreach \l [count=\n] in \csvline {%
- \xintifboolexpr{ \n >= (\NbColBloc*(\NumBlocCol-1)+1) 'and' \n <= (\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}%
+ \xintifboolexpr{ \n >= \PAblocmin 'and' \n <= \PAblocmax}%
{%
\StrDel{\l}{ }[\l]%
\IfSubStr{\PATlettres}{\l}%
@@ -909,10 +925,10 @@
\itemtomacro\LCNA[\pixpos]\pixchf%
\ifboolKV[PixelArtCylinder]{Swap}%
{%
- \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\pixchf};%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
{%
- \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\pixchf};%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
}%
{%
@@ -1002,10 +1018,10 @@
\itemtomacro\LCNA[\pixpos]\pixchf%
\ifboolKV[PixlArtCylinder]{Swap}%
{%
- \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\pixchf};%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcyllarg+(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
{%
- \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\pixchf};%
+ \draw ({0.5*\CylindAng+(\nnnn-1)*\CylindAng}:{-\AAanamcylcenter-(\thecsvrow-0.5)*\CylindSect}) node[rotate={-90+0.5*\CylindAng+(\nnnn-1)*\CylindAng},font=\PATAAtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
}%
}%
{%
@@ -1033,5 +1049,199 @@
}%
}
+%-----With datatool, faster ?
+\RequirePackage{datatool}
+
+\NewDocumentCommand\readdtcsv{ m m }{%
+ \DTLsetseparator{|}%
+ \DTLloaddb[noheader,keys={cvsline}]{#2}{#1}%
+}
+
+\NewDocumentCommand\dtpixlarttikz{ O{} D<>{} m }{%commande autonome
+ \useKVdefault[pixelarttkz]%
+ \setKV[pixelarttkz]{#1}%
+ %affichage du corrigé / display of correction
+ \begin{tikzpicture}[x=\PATunit cm,y=\PATunit cm,#2]
+ \ifboolKV[pixelarttkz]{Correction}%
+ {%
+ \readlist*\LCPA\PATcouleurs%
+ \DTLforeach*{#3}{\csvline=cvsline}{%
+ \setsepchar{,}%
+ \readlist*\tmpcsvline\csvline%
+ \foreachitem\PAchar\in\tmpcsvline{%
+ \StrPosition{\PATlettres}{\PAchar}[\pixcnt]%
+ \ifnum\pixcnt>0%
+ \ifboolKV[pixelarttkz]{BordCases}%
+ {\draw[fill={\LCPA[\pixcnt]}] ({\PAcharcnt-0.5},{-\theDTLrowi+0.5}) rectangle++(1,-1) ;}%
+ {\filldraw[{\LCPA[\pixcnt]}] ({\PAcharcnt-0.5},{-\theDTLrowi+0.5}) rectangle++(1,-1) ;}%
+ \fi%
+ }
+ % \foreach \l [count=\n] in \csvline {%old vesion, with foreach ?
+ % \StrPosition{\PATlettres}{\l}[\pixcnt]%
+ % \ifnum\pixcnt>0%
+ % \ifboolKV[pixelarttkz]{BordCases}%
+ % {\draw[fill={\LCPA[\pixcnt]}] ({\n-0.5},{-\theDTLrowi+0.5}) rectangle ({\n+0.5},{-\theDTLrowi-0.5}) ;}%
+ % {\filldraw[{\LCPA[\pixcnt]}] ({\n-0.5},{-\theDTLrowi+0.5}) rectangle ({\n+0.5},{-\theDTLrowi-0.5}) ;}%
+ % \fi%
+ % }%
+ }%
+ }%
+ {%
+ \ifboolKV[pixelarttkz]{Symb}%
+ {%affichage du pixelart versions chiffres si besoin
+ \readlist*\LCNA\PATchiffres%
+ \DTLforeach*{#3}{\csvline=cvsline}{%
+ \setsepchar{,}%
+ \readlist*\tmpcsvline\csvline%
+ \foreachitem\PAchar\in\tmpcsvline{%
+ \StrPosition{\PATlettres}{\PAchar}[\pixpos]%
+ \xintifboolexpr{\pixpos>0}%
+ {%
+ \itemtomacro\LCNA[\pixpos]\pixchf%
+ \draw ({\PAcharcnt-0.5},{-\theDTLrowi+0.5}) rectangle++(1,-1) node[inner sep=0,midway,font=\PATtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
+ }%
+ {}%
+ }
+ }%
+ }%
+ {%affichage du pixelart versions lettres ou chiffres simples (<=9) / display of letters/symbols PixelArt
+ \DTLforeach*{#3}{\csvline=cvsline}{%
+ \setsepchar{,}%
+ \readlist*\tmpcsvline\csvline%
+ \foreachitem\PAchar\in\tmpcsvline{%
+ \IfSubStr{\PATlettres}{\PAchar}%
+ {%
+ \draw ({\PAcharcnt-0.5},{-\theDTLrowi+0.5}) rectangle++(1,-1) node[inner sep=0,midway,font=\PATtaille] {\PAchar};%
+ }%
+ {}%
+ }%
+ }%
+ }%
+ }%
+ %affichage des découpages éventuels
+ \IfStrEq{\PATdecoup}{}%
+ {}%
+ {%
+ \xdef\NbLigTot{\DTLrowcount{#3}}%
+ \DTLgetvalue{\myvalrowone}{#3}{1}{1}%
+ \StrCount{\myvalrowone}{,}[\NbColTot]%
+ \xdef\NbColTot{\inteval{\NbColTot+1}}%
+ \IfSubStr{\PATdecoup}{x}%
+ {%
+ \StrCut{\PATdecoup}{x}{\NbLigBloc}{\NbColBloc}%tracés des traits
+ \foreach \i in {0,\NbLigBloc,...,\NbLigTot}{\draw[pixlarttraitdecoup] ({0.5-0.33},{-\i-0.5}) -- ({\NbColTot+0.5+0.33},{-\i-0.5}) ;}%
+ \foreach \j in {0,\NbColBloc,...,\NbColTot}{\draw[pixlarttraitdecoup] ({\j+0.5},{-0.5+0.33}) -- ({\j+0.5},{-\NbLigTot-0.5-0.33}) ;}%
+ }%
+ {}%
+ \IfSubStr{\PATdecoup}{+}%
+ {%
+ \StrCut{\PATdecoup}{+}{\NbBlocLIG}{\NbBlocCOL}%
+ \def\NbLigBloc{\xintieval{(\NbLigTot-1)/\NbBlocLIG}}%
+ \def\NbColBloc{\xintieval{(\NbColTot)/\NbBlocCOL}}%
+ \foreach \i in {0,\NbLigBloc,...,\NbLigTot}{\draw[pixlarttraitdecoup] ({0.5-0.33},{-\i-0.5}) -- ({\NbColTot+0.5+0.33},{-\i-0.5}) ;}%
+ \foreach \j in {0,\NbColBloc,...,\NbColTot}{\draw[pixlarttraitdecoup] ({\j+0.5},{-0.5+0.33}) -- ({\j+0.5},{-\NbLigTot-0.5-0.33}) ;}%
+ }%
+ {}%
+ }%
+ \end{tikzpicture}%
+}
+
+\NewDocumentCommand\dtpixlarttikzblock{ O{} D<>{} m m m }{%commande individuelle avec loi & datatool...
+ %3=fichier
+ %4=taille blocs (LxC) ou nombre de blocs (L+C)
+ %5=numbloc
+ \useKVdefault[pixelarttkz]%
+ \setKV[pixelarttkz]{#1}%
+ \xdef\NbLigTot{\DTLrowcount{#3}}%
+ \DTLgetvalue{\myvalrowone}{#3}{1}{1}%
+ \StrCount{\myvalrowone}{,}[\NbColTot]%
+ \xdef\NbColTot{\inteval{\NbColTot+1}}%
+ \IfSubStr{#4}{x}%
+ {%
+ \StrCut{#4}{x}{\NbLigBloc}{\NbColBloc}%
+ }%
+ {}%
+ \IfSubStr{#4}{+}%
+ {%
+ \StrCut{#4}{+}{\NbBlocLIG}{\NbBlocCOL}%
+ \xdef\NbLigBloc{\xinteval{(\NbLigTot-1)/\NbBlocLIG}}%
+ \xdef\NbColBloc{\xinteval{(\NbColTot)/\NbBlocCOL}}%
+ }%
+ {}%
+ \StrCut{#5}{/}{\NumBlocLig}{\NumBlocCol}%
+ \xdef\PAfirstline{\xinteval{\NbLigBloc*(\NumBlocLig-1)+1}}%
+ \xdef\PAlastline{\xinteval{\NbLigBloc*(\NumBlocLig-1)+\NbLigBloc}}%
+ \xdef\PAblocmin{\xinteval{(\NbColBloc*(\NumBlocCol-1)+1)}}%
+ \xdef\PAblocmax{\xinteval{(\NbColBloc*(\NumBlocCol-1)+\NbColBloc)}}%
+ %affichage du corrigé / display of correction
+ \begin{tikzpicture}[x=\PATunit cm,y=\PATunit cm,#2]
+ \ifboolKV[pixelarttkz]{Correction}%
+ {%
+ \readlist*\LCPA\PATcouleurs%
+ \foreach \line in {\PAfirstline,...,\PAlastline}{%
+ \DTLgetvalue{\csvline}{#3}{\line}{1}%
+ \setsepchar{,}%
+ \readlist*\tmpcsvline\csvline%
+ \foreachitem\PAchar\in\tmpcsvline{%
+ \xintifboolexpr{ \PAcharcnt >= \PAblocmin 'and' \PAcharcnt <= \PAblocmax}%
+ {%
+ \StrPosition{\PATlettres}{\PAchar}[\pixcnt]%
+ \xintifboolexpr{\pixcnt>0}%
+ {%
+ \itemtomacro\LCPA[\pixcnt]\pixcol%
+ \ifboolKV[pixelarttkz]{BordCases}%
+ {\draw[fill=\pixcol] ({\PAcharcnt-0.5},{-\line+0.5}) rectangle++(1,-1) ;}%
+ {\filldraw[\pixcol] ({\PAcharcnt-0.5},{-\line+0.5}) rectangle++(1,-1) ;}%
+ }%
+ {}%
+ }%
+ {}%
+ }%
+ }%
+ }%
+ {%
+ \ifboolKV[pixelarttkz]{Symb}%
+ {%affichage du pixelart versions chiffres si besoin
+ \readlist*\LCNA\PATchiffres%
+ \foreach \line in {\PAfirstline,...,\PAlastline}{%
+ \DTLgetvalue{\csvline}{#3}{\line}{1}%
+ \setsepchar{,}%
+ \readlist*\tmpcsvline\csvline%
+ \foreachitem\PAchar\in\tmpcsvline{%
+ \xintifboolexpr{ \PAcharcnt >= \PAblocmin 'and' \PAcharcnt <= \PAblocmax}%
+ {%
+ \StrPosition{\PATlettres}{\PAchar}[\pixpos]%
+ \xintifboolexpr{\pixpos>0}%
+ {%
+ \itemtomacro\LCNA[\pixpos]\pixchf%
+ \draw ({\PAcharcnt-0.5},{-\line+0.5}) rectangle++(1,-1) node[inner sep=0,midway,font=\PATtaille] {\TraiteListeSymbPixelArt{\pixchf}} ;%
+ }%
+ {}%
+ }%
+ {}%
+ }%
+ }%
+ }%
+ {%affichage du pixelart versions lettres ou chiffres simples (<=9) / display of letters/symbols PixelArt
+ \foreach \line in {\PAfirstline,...,\PAlastline}{%
+ \DTLgetvalue{\csvline}{#3}{\line}{1}%
+ \setsepchar{,}%
+ \readlist*\tmpcsvline\csvline%
+ \foreachitem\PAchar\in\tmpcsvline{%
+ \xintifboolexpr{ \PAcharcnt >= \PAblocmin 'and' \PAcharcnt <= \PAblocmax}%
+ {%
+ \IfSubStr{\PATlettres}{\PAchar}%
+ {%
+ \draw ({\PAcharcnt-0.5},{-\line+0.5}) rectangle++(1,-1) node[inner sep=0,midway,font=\PATtaille] {\PAchar};%
+ }%
+ {}%
+ }%
+ {}%
+ }%
+ }%
+ }%
+ }%
+ \end{tikzpicture}%
+}
\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/README.md b/graphics/pgf/contrib/pmdraw/README.md
new file mode 100644
index 0000000000..2d62b23d91
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/README.md
@@ -0,0 +1,74 @@
+pmdraw
+======
+
+*README V1.7 2025-01-28*
+
+<!--
+
+*------------------------------*
+|4````````````````````````````4|
+|`````____````____`````````````|
+|````|MFMF\ /MFMF|````````````|
+|````|MF|MF\/MF|MF|````````````|
+|````|MF|\MFMF/|MF|_______`````|
+|````|MF|``````|MFMFMFMFMF|````|
+|````|MF|``````|MF|````````````|
+|````|MF|``````|MF|___`````````|
+|``````````````|MFMFMF|````````|
+|``````````````|MF|````````````|
+|``````````````|MF|````````````|
+|``````````````|MF|````````````|
+|0````````````````````````````3|
+*------------------------------*
+-->
+
+The `pmdraw` package allows you to draw elements of the diagram monoids, commonly referred to as diagrams. The package provides a lot of
+flexibility to draw most diagrams and can be customised as needed.
+
+The package makes use of the `tikz` and `keyval` packages.
+
+
+Usage
+-----
+
+The usage of the package requires some basic understanding of
+partition diagrams as well as the interface used. Please read the
+manual for a complete explanation.
+
+
+Contact
+-------
+
+If you discover a bug, please be so kind and send me a minimum working
+example of the bug in action and I will work on fixing it. My details
+are <matthias.ypg37@slmail.me>.
+
+
+Author
+-------
+
+- Matthias Fresacher
+
+
+License
+-------
+
+Copyright 2023-10-16 (original release) & 2024, Matthias Fresacher
+
+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 found via
+<http://www.latex-project.org/lppl.txt>.
+
+This work has the LPPL maintenance status `maintained`.
+
+The Current Maintainer of this work is Matthias Fresacher.
+
+
+Contents
+-------
+
+This work consists of the files `pmdraw.sty`, `pmdraw.tex` and the
+examples in the folder `examples`, in addition to the derived file
+`pmdraw.pdf`. \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-1.tex b/graphics/pgf/contrib/pmdraw/examples/example-1.tex
new file mode 100644
index 0000000000..402c418a15
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-1.tex
@@ -0,0 +1,36 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |4````````````````````````````8|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |1````````````````````````````8|
+% *------------------------------*
+
+\pmdBrick[ % Options
+ degree=5,
+ levels top=4,
+ levels bottom=3
+]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ [level=2]{2}{4}
+ [level=3]{2}{5}
+ [level=4]{1}{5}
+}{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ [level=2]{2}{4}
+ [level=3]{2}{5}
+}{ % Transversal edges
+ \pmdEmpty
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-10.tex b/graphics/pgf/contrib/pmdraw/examples/example-10.tex
new file mode 100644
index 0000000000..01d1502f32
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-10.tex
@@ -0,0 +1,37 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |6````````````````````````````8|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |2````````````````````````````8|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=17
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ [height=1.75]{11}{1}
+ [height=1.5]{12}{2}
+ [height=1.25]{13}{3}
+ [height=1]{14}{4}
+ [height=0.75]{15}{5}
+ [height=0.5]{16}{6}
+ [height=0.25]{17}{7}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-11.tex b/graphics/pgf/contrib/pmdraw/examples/example-11.tex
new file mode 100644
index 0000000000..9729320f40
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-11.tex
@@ -0,0 +1,37 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |4````````````````````````````8|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |8````````````````````````````3|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=14
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ [height=1.75]{11}{1}
+ [height=1.25]{12}{2}
+ [height=0.75]{13}{3}
+ [height=0.25]{14}{4}
+ [height=0.5]{1}{11}
+ [height=1]{2}{12}
+ [height=1.5]{3}{13}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-12.tex b/graphics/pgf/contrib/pmdraw/examples/example-12.tex
new file mode 100644
index 0000000000..f21946849f
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-12.tex
@@ -0,0 +1,101 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |6````````````````````````````7|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |2````````````````````````````4|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=16,
+ row sep=3, % Must be before levels key
+ levels=3,
+ vertices options={
+ \fill[red] (#1,#2) circle (.5);
+ },
+ edges upper={very thick},
+ edges transversal={red,very thick},
+ brace={
+ left=1,
+ right=4,
+ label={4},
+ options={
+ \draw [
+ red,
+ very thick,
+ decorate,
+ decoration={calligraphic brace,mirror,amplitude=6pt}
+ ] (#1-0.17,-0.5) -- (#2+0.17,-0.5) node[pos=0.5,below=6pt]{\(#3\)};
+ }
+ }
+ ]{ % Upper non transversal edges
+ {4}{5}
+ [ % Options
+ options={
+ \draw[blue] (#1,3) arc (180:270:\pmdraw{edgeHeight}); % Draw left arch
+ \draw[blue] (#1+\pmdraw{edgeHeight},3-\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},3-\pmdraw{edgeHeight}); % Draw straight line
+ \draw[blue] (#2-\pmdraw{edgeHeight},3-\pmdraw{edgeHeight}) arc (270:360:\pmdraw{edgeHeight}); % Draw right arc
+ }
+ ]{4}{6}
+ [level=2]{4}{7}
+ [level=3]{4}{8}
+ }{ % Lower non transversal edges
+ {4}{5}
+ [
+ options={
+ \draw[green] (#1,0) arc (180:90:\pmdraw{edgeHeight}); % Draw left arch
+ \draw[green] (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}); % Draw straight line
+ \draw[green] (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) arc (90:0:\pmdraw{edgeHeight}); % Draw right arc
+ }
+ ]{4}{6}
+ [level=2]{4}{7}
+ [level=3]{4}{8}
+ }
+ { % Transversal edges
+ [height=1.75]{11}{1}
+ [height=1.25]{12}{2}
+ [height=0.75]{13}{3}
+ [height=0.25]{14}{4}
+ [height=0.5]{1}{11}
+ [height=1]{2}{12}
+ [height=1.5]{3}{13}
+ [
+ options={
+ \draw[dashed] (#1, 3) -- (#2, 0); % Draw straight line
+ }
+ ]{16}{16}
+ {15}{15}
+ }
+ }
+ { % Brick 2
+ [ % Options
+ degree=14,
+ row sep=3, % Must be before levels key
+ levels=3
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ [height=1.75]{11}{1}
+ [height=1.25]{12}{2}
+ [height=0.75]{13}{3}
+ [height=0.25]{14}{4}
+ [height=0.5]{1}{11}
+ [height=1]{2}{12}
+ [height=1.5]{3}{13}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-13.tex b/graphics/pgf/contrib/pmdraw/examples/example-13.tex
new file mode 100644
index 0000000000..c3a189e202
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-13.tex
@@ -0,0 +1,126 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |8````````````````````````````7|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |2````````````````````````````8|
+% *------------------------------*
+
+\pmdProduct
+[ % Options
+ row sep=3,
+ diagram sep=2,
+ dots options={
+ \draw (#1,#2) node[red] {\(\dots\dots\)};
+ }
+]{ % Added edges
+ {1}{3}
+ {7}{11}
+ {18}{21}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ {7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2
+ ]{ % Upper non transversal edges
+ [level=2]{3}{16}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ blank top=3,
+ degree top=5,
+ blank bottom=4,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {5}{6}
+ {7}{8}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ [height=1.5]{7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2
+ ]{ % Upper non transversal edges
+ [level=2]{3}{16}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ blank top=3,
+ degree top=5,
+ blank bottom=4,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {5}{6}
+ {7}{8}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-14.tex b/graphics/pgf/contrib/pmdraw/examples/example-14.tex
new file mode 100644
index 0000000000..0ad77f546d
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-14.tex
@@ -0,0 +1,76 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |6````````````````````````````2|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |4````````````````````````````1|
+% *------------------------------*
+
+\pmdDiagram
+[ % Options
+ row sep=3,
+ diagram sep=2,
+ dots options={
+ \draw (#1,#2) node[red] {\(\mid\)};
+ }
+]{
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ {7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2
+ ]{ % Upper non transversal edges
+ [level=2]{3}{16}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ blank top=-1,
+ degree top=9,
+ blank bottom=4,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {0}{1}
+ {2}{3}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {5}{6}
+ {7}{8}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-15.tex b/graphics/pgf/contrib/pmdraw/examples/example-15.tex
new file mode 100644
index 0000000000..672965eb13
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-15.tex
@@ -0,0 +1,76 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |3````````````````````````````7|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |1````````````````````````````6|
+% *------------------------------*
+
+\pmdDiagram
+[ % Options
+ row sep=3,
+ diagram sep=2,
+ dots options={
+ \draw (#1,#2) node {};
+ }
+]{
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ {7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2
+ ]{ % Upper non transversal edges
+ [level=2]{3}{16}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ blank top=-1,
+ degree top=9,
+ blank bottom=4,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {0}{1}
+ {2}{3}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {5}{6}
+ {7}{8}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-16.tex b/graphics/pgf/contrib/pmdraw/examples/example-16.tex
new file mode 100644
index 0000000000..efacb4d246
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-16.tex
@@ -0,0 +1,127 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |3````````````````````````````0|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |1````````````````````````````9|
+% *------------------------------*
+
+\pmdProduct
+[ % options
+ row sep=3,
+ diagram sep=2,
+ dots options={
+ \draw (#1,#2) node[red] {\(\dots\dots\)};
+ },
+ edges added={dashed,blue}
+]{ % Added edges
+ {1}{3}
+ {7}{11}
+ {18}{21}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ {7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2
+ ]{ % Upper non transversal edges
+ [level=2]{3}{16}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ blank top=3,
+ degree top=5,
+ blank bottom=4,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {5}{6}
+ {7}{8}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ [height=1.5]{7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2
+ ]{ % Upper non transversal edges
+ [level=2]{3}{16}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ blank top=3,
+ degree top=5,
+ blank bottom=4,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {5}{6}
+ {7}{8}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-17.tex b/graphics/pgf/contrib/pmdraw/examples/example-17.tex
new file mode 100644
index 0000000000..97c6052f8a
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-17.tex
@@ -0,0 +1,70 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |9````````````````````````````0|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |7````````````````````````````0|
+% *------------------------------*
+
+\pmdDiagram[grid]{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace node=red,
+ edges transversal=blue,
+ brace={
+ left=1,
+ right=4,
+ label={p - 1}
+ }
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }
+ { % Brick 2
+ [ % Options
+ degree top=6,
+ degree bottom=5,
+ dots node=blue,
+ edges upper=red,
+ edges lower=green,
+ edges transversal=blue
+ ]{ % Upper non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ [height=1]{2}{10}
+ {1}{1}
+ }
+ }{ % Brick 3
+ [ % Options
+ degree top=2,
+ blank top=1,
+ degree bottom=3
+ ]{ % Upper non transversal edges
+ {2}{3}
+ }{ % Lower non transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-18.tex b/graphics/pgf/contrib/pmdraw/examples/example-18.tex
new file mode 100644
index 0000000000..2d1014a1cb
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-18.tex
@@ -0,0 +1,52 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |8````````````````````````````0|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |4````````````````````````````0|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=5,
+ levels top=1,
+ levels bottom=1,
+ labels,
+ labels top node={red,above=16pt}
+ ]{ % Upper non transversal edges
+ [height=1.1]{2}{5}
+ }{ % Lower non transversal edges
+ [height=0.3]{2}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2,
+ levels top=1,
+ levels bottom=1,
+ labels,
+ labels bottom options={
+ \draw (#1,#2) node[below=6pt] {\(#3''\)};
+ },
+ labels bottom start=6
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-19.tex b/graphics/pgf/contrib/pmdraw/examples/example-19.tex
new file mode 100644
index 0000000000..32c24bcf23
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-19.tex
@@ -0,0 +1,53 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |7````````````````````````````6|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |7````````````````````````````3|
+% *------------------------------*
+
+\pmdDiagram[grid]{
+ { % Brick 1
+ [ % Options
+ degree=5,
+ levels top=1,
+ levels bottom=1,
+ labels,
+ labels top node={red,above=16pt}
+ ]{ % Upper non transversal edges
+ [height=1.1]{2}{5}
+ }{ % Lower non transversal edges
+ [height=0.3]{2}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2,
+ levels top=1,
+ levels bottom=1,
+ labels,
+ labels bottom options={
+ \draw (#1,#2) node[below=6pt] {\(#3''\)};
+ },
+ labels bottom start=6,
+ labels top start=-4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-2.tex b/graphics/pgf/contrib/pmdraw/examples/example-2.tex
new file mode 100644
index 0000000000..c80de8e5a3
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-2.tex
@@ -0,0 +1,39 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |0````````````````````````````5|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |0````````````````````````````3|
+% *------------------------------*
+
+\pmdBrick[ % Options
+ blank top=2,
+ degree top=5,
+ blank bottom=1,
+ degree bottom=4,
+ levels top=4,
+ levels bottom=3
+]{ % Upper non transversal edges
+ {3}{4}
+ {5}{6}
+ [level=2]{4}{6}
+ [level=3]{4}{7}
+ [level=4]{3}{7}
+}{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ [level=2]{2}{4}
+ [level=3]{2}{5}
+}{ % Transversal edges
+ \pmdEmpty
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-20.tex b/graphics/pgf/contrib/pmdraw/examples/example-20.tex
new file mode 100644
index 0000000000..8d0bc25cb3
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-20.tex
@@ -0,0 +1,171 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |0````````````````````````````9|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |3````````````````````````````8|
+% *------------------------------*
+
+\usetikzlibrary{patterns}
+
+\newcommand{\blockStyles}{
+ \tikzstyle{typeI} = [
+ very thick,
+ rounded corners=5pt,
+ red,
+ preaction={fill, red!3}
+ ]
+ \tikzstyle{typeT} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 7.5pt off 2.5pt},
+ green,
+ preaction={fill, green!3}
+ ]
+ \tikzstyle{typeB} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt},
+ blue,
+ preaction={fill, blue!3}
+ ]
+ \tikzstyle{typeO} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
+ orange,
+ preaction={fill, orange!3}
+ ]
+ \tikzstyle{typeU} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
+ violet,
+ preaction={fill, violet!3}
+ ]
+ \tikzstyle{typeN} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 7.5pt off 2.5pt on 7.5pt off 2.5pt on 2.5pt off 2.5pt},
+ yellow,
+ preaction={fill, yellow!3}
+ ]
+}
+
+\pmdProduct[ % Options
+ decorate before={
+ \blockStyles
+ \draw[typeI] (0.6, 2.4) -- (1.4, 2.4) -- (1.4, 0.7) -- (3.4, 0.7) -- (3.4, -3.4) -- (2.6, -3.4) -- (2.6, -1.7) -- (0.6, -1.7) -- cycle;
+ \draw[typeT] (1.6, 1.3) rectangle (3.4, 2.4);
+ \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
+ }
+]{ % Added edges
+ {1}{3}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=3
+ ]{ % Upper non transversal edges
+ {2}{3}
+ }{ % Lower non transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree=3
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ {3}{3}
+ }
+ }
+}
+\hspace{5em}
+\pmdProduct[ % Options
+ decorate before={
+ \blockStyles
+ \draw[typeI] (0.6, 2.4) -- (1.4, 2.4) -- (1.4, 0.7) -- (10.4, 0.7) -- (10.4, -3.4) -- (9.6, -3.4) -- (9.6, -1.7) -- (0.6, -1.7) -- cycle;
+ \foreach \x in {0,2,7} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeT] (1.6, 1.3) rectangle (3.4, 2.4);
+ \end{scope}
+ }
+ \foreach \x in {0,2,4,7} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
+ \end{scope}
+ }
+ }
+]{ % Added edges
+ {1}{5}
+ {9}{10}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ blank top=2,
+ degree top=2,
+ blank bottom=2,
+ degree bottom=2
+ ]{ % Upper non transversal edges
+ {3}{4}
+ }{ % Lower non transversal edges
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree=6
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=3
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ {3}{3}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-21.tex b/graphics/pgf/contrib/pmdraw/examples/example-21.tex
new file mode 100644
index 0000000000..e4bd9556cc
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-21.tex
@@ -0,0 +1,183 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |8````````````````````````````7|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |7````````````````````````````3|
+% *------------------------------*
+
+\usetikzlibrary{patterns}
+
+\newcommand{\blockStyles}{
+ \tikzstyle{typeI} = [
+ very thick,
+ rounded corners=5pt,
+ red,
+ preaction={fill, red!3}
+ ]
+ \tikzstyle{typeT} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 7.5pt off 2.5pt},
+ green,
+ preaction={fill, green!3}
+ ]
+ \tikzstyle{typeB} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt},
+ blue,
+ preaction={fill, blue!3}
+ ]
+ \tikzstyle{typeO} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
+ orange,
+ preaction={fill, orange!3}
+ ]
+ \tikzstyle{typeU} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
+ violet,
+ preaction={fill, violet!3}
+ ]
+ \tikzstyle{typeN} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 7.5pt off 2.5pt on 7.5pt off 2.5pt on 2.5pt off 2.5pt},
+ yellow,
+ preaction={fill, yellow!3}
+ ]
+}
+
+\pmdProduct[ % Options
+ decorate before={
+ \blockStyles
+ \draw[typeO] (0.6, -1.9) rectangle (4.4, 0.7);
+ \foreach \x in {0,2} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
+ \draw[typeT] (0.6, 1.3) rectangle (2.4, 2.4);
+ \end{scope}
+ }
+ }
+]{ % Added edges
+ {1}{4}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree=4,
+ levels top=2
+ ]{ % Upper non transversal edges
+ [level=2]{1}{4}
+ {2}{3}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\hspace{5em}
+\pmdProduct[ % Options
+ decorate before={
+ \blockStyles
+ \draw[typeO] (0.6, -1.9) rectangle (11.4, 0.7);
+ \foreach \x in {0,2,4,7,9} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
+ \draw[typeT] (0.6, 1.3) rectangle (2.4, 2.4);
+ \end{scope}
+ }
+ }
+]{ % Added edges
+ {1}{5}
+ {9}{11}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=6
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree top=5,
+ levels top=2,
+ degree bottom=6
+ ]{ % Upper non transversal edges
+ [level=2]{1}{11}
+ {2}{3}
+ {4}{5}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }{ % Brick 2
+ [ % Options
+ blank top=1,
+ degree top=3,
+ degree bottom=4,
+ levels top=2
+ ]{ % Upper non transversal edges
+ {2}{3}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-22.tex b/graphics/pgf/contrib/pmdraw/examples/example-22.tex
new file mode 100644
index 0000000000..c7aa5c4cba
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-22.tex
@@ -0,0 +1,179 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |7````````````````````````````9|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |6````````````````````````````5|
+% *------------------------------*
+
+\usetikzlibrary{patterns}
+
+\newcommand{\blockStyles}{
+ \tikzstyle{typeI} = [
+ very thick,
+ rounded corners=5pt,
+ red,
+ preaction={fill, red!3}
+ ]
+ \tikzstyle{typeT} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 7.5pt off 2.5pt},
+ green,
+ preaction={fill, green!3}
+ ]
+ \tikzstyle{typeB} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt},
+ blue,
+ preaction={fill, blue!3}
+ ]
+ \tikzstyle{typeO} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
+ orange,
+ preaction={fill, orange!3}
+ ]
+ \tikzstyle{typeU} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
+ violet,
+ preaction={fill, violet!3}
+ ]
+ \tikzstyle{typeN} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 7.5pt off 2.5pt on 7.5pt off 2.5pt on 2.5pt off 2.5pt},
+ yellow,
+ preaction={fill, yellow!3}
+ ]
+}
+
+\pmdProduct[ % Options
+ decorate before={
+ \blockStyles
+ \draw[typeU] (0.6, 2.4) -- (1.4, 2.4) -- (1.4, 0.7) -- (3.6, 0.7) -- (3.6, 2.4) -- (4.4, 2.4) -- (4.4, -1.7) -- (0.6, -1.7) -- cycle;
+ \draw[typeT] (1.6, 1.3) rectangle (3.4, 2.4);
+ \foreach \x in {0,2} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
+ \end{scope}
+ }
+ }
+]{ % Added edges
+ {1}{4}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {2}{3}
+ }{ % Lower non transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ {1}{1}
+ {4}{4}
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\hspace{5em}
+\pmdProduct[ % Options
+ decorate before={
+ \blockStyles
+ \draw[typeU] (0.6, 2.4) -- (1.4, 2.4) -- (1.4, 0.7) -- (10.6, 0.7) -- (10.6, 2.4) -- (11.4, 2.4) -- (11.4, -1.7) -- (0.6, -1.7) -- cycle;
+ \foreach \x in {0,2,4,7,9} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
+ \end{scope}
+ }
+ \foreach \x in {1,3,8} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeT] (0.6, 1.3) rectangle (2.4, 2.4);
+ \end{scope}
+ }
+ }
+]{ % Added edges
+ {1}{5}
+ {9}{11}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ blank top=2,
+ blank bottom=2,
+ degree=3
+ ]{ % Upper non transversal edges
+ {3}{4}
+ }{ % Lower non transversal edges
+ {3}{4}
+ }{ % Transversal edges
+ {5}{5}
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree=6
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-23.tex b/graphics/pgf/contrib/pmdraw/examples/example-23.tex
new file mode 100644
index 0000000000..d2ae85c4e7
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-23.tex
@@ -0,0 +1,179 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |6````````````````````````````5|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |4````````````````````````````3|
+% *------------------------------*
+
+\usetikzlibrary{patterns}
+
+\newcommand{\blockStyles}{
+ \tikzstyle{typeI} = [
+ very thick,
+ rounded corners=5pt,
+ red,
+ preaction={fill, red!3}
+ ]
+ \tikzstyle{typeT} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 7.5pt off 2.5pt},
+ green,
+ preaction={fill, green!3}
+ ]
+ \tikzstyle{typeB} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt},
+ blue,
+ preaction={fill, blue!3}
+ ]
+ \tikzstyle{typeO} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
+ orange,
+ preaction={fill, orange!3}
+ ]
+ \tikzstyle{typeU} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 2.5pt off 2.5pt on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
+ violet,
+ preaction={fill, violet!3}
+ ]
+ \tikzstyle{typeN} = [
+ very thick,
+ rounded corners=5pt,
+ dash pattern={on 7.5pt off 2.5pt on 7.5pt off 2.5pt on 2.5pt off 2.5pt},
+ yellow,
+ preaction={fill, yellow!3}
+ ]
+}
+
+\pmdProduct[ % Options
+ decorate before={
+ \blockStyles
+ \draw[typeN] (0.6, -3.4) -- (1.4, -3.4) -- (1.4, -1.7) -- (3.6, -1.7) -- (3.6, -3.4) -- (4.4, -3.4) -- (4.4, 0.7) -- (0.6, 0.7) -- cycle;
+ \draw[typeB] (1.6, -3.4) rectangle (3.4, -2.3);
+ \foreach \x in {0,2} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeT] (0.6, 1.3) rectangle (2.4, 2.4);
+ \end{scope}
+ }
+ }
+]{ % Added edges
+ {1}{4}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {2}{3}
+ }{ % Lower non transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ {1}{1}
+ {4}{4}
+ }
+ }
+}
+\hspace{5em}
+\pmdProduct[ % Options
+ decorate before={
+ \blockStyles
+ \draw[typeN] (0.6, -3.4) -- (1.4, -3.4) -- (1.4, -1.7) -- (10.6, -1.7) -- (10.6, -3.4) -- (11.4, -3.4) -- (11.4, 0.7) -- (0.6, 0.7) -- cycle;
+ \foreach \x in {0,2,4,7,9} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeT] (0.6, 1.3) rectangle (2.4, 2.4);
+ \end{scope}
+ }
+ \foreach \x in {1,3,8} {
+ \begin{scope}[shift={(\x,0)}]
+ \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
+ \end{scope}
+ }
+ }
+]{ % Added edges
+ {1}{5}
+ {9}{11}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=6
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ blank top=2,
+ blank bottom=2,
+ degree=3
+ ]{ % Upper non transversal edges
+ {3}{4}
+ }{ % Lower non transversal edges
+ {3}{4}
+ }{ % Transversal edges
+ {5}{5}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-24.tex b/graphics/pgf/contrib/pmdraw/examples/example-24.tex
new file mode 100644
index 0000000000..7b93adc805
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-24.tex
@@ -0,0 +1,160 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |6```````````````````````````0|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |9````````````````````````````8|
+% *------------------------------*
+
+\pmdProduct[ % Options
+ decorate after={
+ \draw (1, 2) node[above=6pt] {\( x \)\strut};
+ \draw (2, 2) node[above=6pt] {\( y \)\strut};
+ }
+]{ % Added edges
+ {1}{3}
+}{ % Top diagram
+ { % Brick 1
+ [
+ degree=3
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [
+ degree=3
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\hspace{2em}
+\pmdProduct[ % Options
+ decorate after={
+ \draw (1, 2) node[above=6pt] {\( x \)};
+ \draw (1, 0) node[left=6pt] {\( y \)};
+ \draw (1, -1) node[left=6pt] {\( j''' \)};
+ \draw (1, -3) node[left=6pt] {\( z \)};
+ }
+]{ % Added edges
+ {1}{3}
+}{ % Top diagram
+ { % Brick 1
+ [
+ degree=3
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [
+ degree=3
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\hspace{2em}
+\pmdProduct[ % Options
+ decorate after={
+ \draw (1, 2) node[above=6pt] {\( x \)};
+ \draw (1, 0) node[left=6pt] {\( y \)};
+ \draw (1, -1) node[left=6pt] {\( j''' \)};
+ \draw (2, -1) node[below=4pt] {\( z \)};
+ \draw (2, 0) node[above right=0pt] {\( k'' \)};
+ \draw (2, 2) node[above=6pt] {\( w \)};
+ }
+]{ % Added edges
+ {1}{3}
+}{ % Top diagram
+ { % Brick 1
+ [
+ degree=3
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [
+ degree=3
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\hspace{2em}
+\pmdProduct[ % Options
+ decorate after={
+ \draw (1, 2) node[above=6pt] {\( x \)};
+ \draw (1, 0) node[left=6pt] {\( y \)};
+ \draw (1, -1) node[left=6pt] {\( j''' \)};
+ \draw (2, -1) node[below=4pt] {\( z \)};
+ \draw (2, 0) node[above=4pt] {\( k'' \)};
+ \draw (3, 0) node[above=4pt] {\( w \)};
+ }
+]{ % Added edges
+ {1}{4}
+}{ % Top diagram
+ { % Brick 1
+ [
+ degree=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [
+ degree=4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-25.tex b/graphics/pgf/contrib/pmdraw/examples/example-25.tex
new file mode 100644
index 0000000000..bea76db2f3
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-25.tex
@@ -0,0 +1,63 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |9````````````````````````````1|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |4````````````````````````````2|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=5,
+ brace={
+ left=4,
+ right=7,
+ label={p - 3}
+ }
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{1}
+ {4}{4}
+ {5}{5}
+ }
+ }
+ { % Brick 2
+ [ % Options
+ degree=5
+ ]{ % Upper non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 3
+ [ % Options
+ degree=2
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-3.tex b/graphics/pgf/contrib/pmdraw/examples/example-3.tex
new file mode 100644
index 0000000000..09a5256eac
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-3.tex
@@ -0,0 +1,53 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |6````````````````````````````2|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |9````````````````````````````4|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=5,
+ levels top=4,
+ levels bottom=3
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ [level=2]{2}{4}
+ [level=3]{2}{5}
+ [level=4]{1}{5}
+ [level=3]{5}{7}
+ }{ % Lower non transversal edges
+ {1}{2}
+ {3}{4}
+ [level=2]{2}{4}
+ [level=3]{2}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ {1}{2}
+ {3}{4}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-4.tex b/graphics/pgf/contrib/pmdraw/examples/example-4.tex
new file mode 100644
index 0000000000..bbbf5bd819
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-4.tex
@@ -0,0 +1,77 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |1````````````````````````````1|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |8````````````````````````````3|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4,
+ brace={
+ left=2,
+ right=7,
+ label={p}
+ }
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ {7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2,
+ brace={
+ left=4,
+ right=12,
+ label={q},
+ above
+ }
+ ]{ % Upper non transversal edges
+ [level=2]{3}{13}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ degree top=5,
+ blank bottom=1,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-5.tex b/graphics/pgf/contrib/pmdraw/examples/example-5.tex
new file mode 100644
index 0000000000..e7a9c63e96
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-5.tex
@@ -0,0 +1,118 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |1````````````````````````````2|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |2````````````````````````````8|
+% *------------------------------*
+
+\pmdProduct{ % Added edges
+ {1}{3}
+ {7}{11}
+ {15}{18}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ {7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2
+ ]{ % Upper non transversal edges
+ [level=2]{3}{13}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ degree top=5,
+ blank bottom=1,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree top=3,
+ degree bottom=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{4}
+ {7}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=7,
+ blank bottom=1,
+ degree bottom=5,
+ levels=2,
+ no dots
+ ]{ % Upper non transversal edges
+ [level=2]{3}{13}
+ {4}{5}
+ {6}{7}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ {1}{2}
+ }
+ }{ % Brick 3
+ [ % Options
+ degree top=5,
+ blank bottom=1,
+ degree bottom=4,
+ levels=2
+ ]{ % Upper non transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-6.tex b/graphics/pgf/contrib/pmdraw/examples/example-6.tex
new file mode 100644
index 0000000000..18a47a794c
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-6.tex
@@ -0,0 +1,55 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |4````````````````````````````5|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |1````````````````````````````9|
+% *------------------------------*
+
+\pmdProduct[ % Options
+ decorate after={
+ \draw[very thick,red,rounded corners=5pt] (0.6, -3.4) rectangle (1.4, 2.4);
+ }
+]{ % Added edges
+ {1}{4}
+}{ % Top Diagram
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ }
+ }
+}{ % Bottom Diagram
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-7.tex b/graphics/pgf/contrib/pmdraw/examples/example-7.tex
new file mode 100644
index 0000000000..171bf113a4
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-7.tex
@@ -0,0 +1,63 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |3````````````````````````````6|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |3````````````````````````````2|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={p}
+ }
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=5,
+ degree bottom=6
+ ]{ % Upper non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ [height=1]{10}{2}
+ {1}{1}
+ }
+ }{ % Brick 3
+ [ % Options
+ degree top=3,
+ blank bottom=1,
+ degree bottom=2
+ ]{ % Upper non transversal edges
+ {1}{2}
+ }{ % Lower non transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-8.tex b/graphics/pgf/contrib/pmdraw/examples/example-8.tex
new file mode 100644
index 0000000000..6ed2f2cf5c
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-8.tex
@@ -0,0 +1,63 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |0````````````````````````````7|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |7````````````````````````````9|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={p}
+ }
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=6,
+ degree bottom=5
+ ]{ % Upper non transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Lower non transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ [height=1]{2}{10}
+ {1}{1}
+ }
+ }{ % Brick 3
+ [ % Options
+ degree top=2,
+ blank top=1,
+ degree bottom=3
+ ]{ % Upper non transversal edges
+ {2}{3}
+ }{ % Lower non transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/examples/example-9.tex b/graphics/pgf/contrib/pmdraw/examples/example-9.tex
new file mode 100644
index 0000000000..8e7d87023f
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/examples/example-9.tex
@@ -0,0 +1,37 @@
+%!TEX root = ../pmdraw.tex
+
+% *------------------------------*
+% |1````````````````````````````1|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |7````````````````````````````4|
+% *------------------------------*
+
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=17
+ ]{ % Upper non transversal edges
+ \pmdEmpty
+ }{ % Lower non transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ [height=0.25]{1}{11}
+ [height=0.5]{2}{12}
+ [height=0.75]{3}{13}
+ [height=1]{4}{14}
+ [height=1.25]{5}{15}
+ [height=1.5]{6}{16}
+ [height=1.75]{7}{17}
+ }
+ }
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/pmdraw.pdf b/graphics/pgf/contrib/pmdraw/pmdraw.pdf
new file mode 100644
index 0000000000..638ede3542
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/pmdraw.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/pmdraw/pmdraw.sty b/graphics/pgf/contrib/pmdraw/pmdraw.sty
new file mode 100644
index 0000000000..bc4e6e82e0
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/pmdraw.sty
@@ -0,0 +1,2487 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pmdraw}[2025-01-28 v1.7 pmdraw]
+
+% *------------------------------*
+% |2````````````````````````````1|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |4````````````````````````````2|
+% *------------------------------*
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Required packages %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \RequirePackage{datetime}
+\RequirePackage{xkeyval}
+\RequirePackage{tikz}
+\usetikzlibrary{math,decorations.pathreplacing,calligraphy,backgrounds}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Internal control and option commands %
+% - loosely ordered alphabetically %
+% - includes default values where appropriate %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\pmdraw@braceLabel}{}% Label of brace
+
+\newcommand{\pmdraw@diagSep}{1}% Vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram
+
+\newcommand{\pmdraw@drawAedgesOptions}{}% Draw options for added edges in product diagram
+\newcommand{\pmdraw@drawAedgesOptionsDefault}{}% Default draw options for added edges in product diagram
+\newcommand{\pmdraw@drawAedges}[2]{% Draws added edges in product diagram from #1 vertex to #2 vertex, assumes #1<#2
+ \@ifclassloaded{beamer}{% If in beamer
+ \uncover<\pmdraw@edgesAddedUncover>{% Uncovers added edges
+ \foreach \x in {#1,...,#2} {% For each vertex in range
+ \ifnum\value{pmdraw@ifEdgesAdded}=0% If drawing added edges
+ \draw[dotted,thick,apply style/.expand once=\pmdraw@drawAedgesOptionsDefault,apply style/.expand once=\pmdraw@drawAedgesOptions] (\x,0) -- (\x,-\pmdraw@diagSep);% Draw concatenation edge
+ \else% If hiding top vertices
+ \phantom{%
+ \draw[dotted,thick,apply style/.expand once=\pmdraw@drawAedgesOptionsDefault,apply style/.expand once=\pmdraw@drawAedgesOptions] (\x,0) -- (\x,-\pmdraw@diagSep);% Draw concatenation edge
+ }%
+ \fi%
+ }%
+ }%
+ }{% If not in beamer
+ \foreach \x in {#1,...,#2} {% For each vertex in range
+ \ifnum\value{pmdraw@ifEdgesAdded}=0% If drawing added edges
+ \draw[dotted,thick,apply style/.expand once=\pmdraw@drawAedgesOptionsDefault,apply style/.expand once=\pmdraw@drawAedgesOptions] (\x,0) -- (\x,-\pmdraw@diagSep);% Draw concatenation edge
+ \else% If hiding top vertices
+ \phantom{%
+ \draw[dotted,thick,apply style/.expand once=\pmdraw@drawAedgesOptionsDefault,apply style/.expand once=\pmdraw@drawAedgesOptions] (\x,0) -- (\x,-\pmdraw@diagSep);% Draw concatenation edge
+ }%
+ \fi%
+ }%
+ }%
+ \pmdraw@AedgesLoop% Restart for loop
+}
+
+\newcommand{\pmdraw@drawBraceDrawOptions}{}% Draw options for brace
+\newcommand{\pmdraw@drawBraceNodeOptions}{}% Node options for brace
+\newcommand{\pmdraw@drawBraceDefault}[3]{% Draws brace a brace starting from #1 vertex to #2 vertex with label #3, assumes #1<#2 - DEFAULT
+ \ifnum\pmdraw@ifProdDiag=1% If drawing a product diagram or if placing brace above diagram
+ \draw[
+ very thick,
+ decorate,
+ decoration={calligraphic brace,amplitude=6pt},
+ apply style/.expand once=\pmdraw@drawBraceDrawOptions
+ ] (#1-0.17,\pmdraw@rowSep+0.5) -- (#2+0.17,\pmdraw@rowSep+0.5)
+ node[
+ pos=0.5,
+ above=6pt,
+ apply style/.expand once=\pmdraw@drawBraceNodeOptions
+ ] {\(#3\)};% Draw brace on top of diagram
+ \else% If not drawing a product diagram or if placing brace below diagram
+ \draw[
+ very thick,
+ decorate,
+ decoration={calligraphic brace,mirror,amplitude=6pt},
+ apply style/.expand once=\pmdraw@drawBraceDrawOptions
+ ] (#1-0.17,-0.5) -- (#2+0.17,-0.5)
+ node[
+ pos=0.5,
+ below=6pt,
+ apply style/.expand once=\pmdraw@drawBraceNodeOptions
+ ] {\(#3\)};% Draw brace on bottom of diagram
+ \fi%
+}
+\let\pmdraw@drawBrace\pmdraw@drawBraceDefault% Draws brace a brace starting from #1 vertex to #2 vertex with label #3, assumes #1<#2
+
+\newcommand{\pmdraw@drawDotsDrawOptions}{}% Draw options for dots between bricks
+\newcommand{\pmdraw@drawDotsNodeOptions}{}% Node options for dots between bricks
+\newcommand{\pmdraw@drawDotsDefault}[2]{% Draws dots between bricks at (#1,#2) - DEFAULT
+ \draw[apply style/.expand once=\pmdraw@drawDotsDrawOptions] (#1,#2) node[apply style/.expand once=\pmdraw@drawDotsNodeOptions] {\(\dots\)};%
+}
+\let\pmdraw@drawDots\pmdraw@drawDotsDefault% Draws dots between bricks at (#1,#2)
+
+\newcommand{\pmdraw@drawEdgeDrawOptions}{}% Draw options for edge
+
+\newcommand{\pmdraw@drawLabelBDrawOptions}{}% Draw options for label of a vertex in bottom row
+\newcommand{\pmdraw@drawLabelBNodeOptions}{}% Node options for label of a vertex in bottom row
+\newcommand{\pmdraw@drawLabelBottomDefault}[3]{% For bottom row, draws the label #3 for a vertex at (#1,#2) - DEFAULT
+ \draw[apply style/.expand once=\pmdraw@drawLabelBDrawOptions] (#1,#2) node[below=6pt,apply style/.expand once=\pmdraw@drawLabelBNodeOptions] {\(#3'\)};%
+}
+\let\pmdraw@drawLabelBottom\pmdraw@drawLabelBottomDefault% For bottom row, draws the label #3 for a vertex at (#1,#2)
+
+\newcommand{\pmdraw@drawLabelTDrawOptions}{}% Draw options for label of a vertex in top row
+\newcommand{\pmdraw@drawLabelTNodeOptions}{}% Node options for label of a vertex in top row
+\newcommand{\pmdraw@drawLabelTopDefault}[3]{% For top row, draws the label #3 for a vertex at (#1,#2) - DEFAULT
+ \draw[apply style/.expand once=\pmdraw@drawLabelTDrawOptions] (#1,#2) node[above=6pt,apply style/.expand once=\pmdraw@drawLabelTNodeOptions] {\(#3\)};%
+}
+\let\pmdraw@drawLabelTop\pmdraw@drawLabelTopDefault% For top row, draws the label #3 for a vertex at (#1,#2)
+
+\newcommand{\pmdraw@drawLedgesDrawOptions}{}% Draw options for lower non-transversal edges
+\newcommand{\pmdraw@drawLedgesDrawOptionsDefault}{}% Default draw options for lower non-transversal edges
+\newcommand{\pmdraw@drawLedgesDrawDefault}[2]{% Draws lower non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2 - DEFAULT
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1,0) arc (180:90:\pmdraw{edgeHeight});% Draw left arch
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawLedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight}) arc (90:0:\pmdraw{edgeHeight});% Draw right arc
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
+}
+\let\pmdraw@drawLedgesDraw\pmdraw@drawLedgesDrawDefault% Draws lower non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2
+
+\newcommand{\pmdraw@drawNoLabelBa}{-1}% 1st vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelBb}{-1}% 2nd vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelBc}{-1}% 3rd vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelBd}{-1}% 4th vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelBe}{-1}% 5th vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelBf}{-1}% 6th vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelBg}{-1}% 7th vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelBh}{-1}% 8th vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelBi}{-1}% 9th vertex to skip label in bottom row
+\newcommand{\pmdraw@drawNoLabelTa}{-1}% 1st vertex to skip label in top row
+\newcommand{\pmdraw@drawNoLabelTb}{-1}% 2nd vertex to skip label in top row
+\newcommand{\pmdraw@drawNoLabelTc}{-1}% 3rd vertex to skip label in top row
+\newcommand{\pmdraw@drawNoLabelTd}{-1}% 4th vertex to skip label in top row
+\newcommand{\pmdraw@drawNoLabelTe}{-1}% 5th vertex to skip label in top row
+\newcommand{\pmdraw@drawNoLabelTf}{-1}% 6th vertex to skip label in top row
+\newcommand{\pmdraw@drawNoLabelTg}{-1}% 7th vertex to skip label in top row
+\newcommand{\pmdraw@drawNoLabelTh}{-1}% 8th vertex to skip label in top row
+\newcommand{\pmdraw@drawNoLabelTi}{-1}% 9th vertex to skip label in top row
+
+\newcommand{\pmdraw@drawNoVertexBa}{-1}% 1st vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexBb}{-1}% 2nd vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexBc}{-1}% 3rd vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexBd}{-1}% 4th vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexBe}{-1}% 5th vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexBf}{-1}% 6th vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexBg}{-1}% 7th vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexBh}{-1}% 8th vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexBi}{-1}% 9th vertex to skip in bottom row
+\newcommand{\pmdraw@drawNoVertexTa}{-1}% 1st vertex to skip in top row
+\newcommand{\pmdraw@drawNoVertexTb}{-1}% 2nd vertex to skip in top row
+\newcommand{\pmdraw@drawNoVertexTc}{-1}% 3rd vertex to skip in top row
+\newcommand{\pmdraw@drawNoVertexTd}{-1}% 4th vertex to skip in top row
+\newcommand{\pmdraw@drawNoVertexTe}{-1}% 5th vertex to skip in top row
+\newcommand{\pmdraw@drawNoVertexTf}{-1}% 6th vertex to skip in top row
+\newcommand{\pmdraw@drawNoVertexTg}{-1}% 7th vertex to skip in top row
+\newcommand{\pmdraw@drawNoVertexTh}{-1}% 8th vertex to skip in top row
+\newcommand{\pmdraw@drawNoVertexTi}{-1}% 9th vertex to skip in top row
+
+\newcommand{\pmdraw@drawTedgesDrawOptions}{}% Draw options for transversal edges
+\newcommand{\pmdraw@drawTedgesDrawOptionsDefault}{}% Default draw options for transversal edges
+\newcommand{\pmdraw@drawTedgesDrawDefault}[2]{% Draws transversal edge from #1 vertex in top row to #2 vertex in bottom row - DEFAULT
+ \ifnum\pmdraw@ifTedgeHorizontal=0% If drawing a straight line edge
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1,\pmdraw@rowSep) -- (#2,0);% Draw straight line
+ \else% If transversal edge is drawn horizontally
+ \ifnum#1>#2% If edge goes from top right to bottom left
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2,0) arc (180:90:\pmdraw{Tlevel});% Draw bottom arch
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1-\pmdraw@rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1-\pmdraw@rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:360:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
+ \else% If edge goes from top left to bottom right
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2,0) arc (0:90:\pmdraw{Tlevel});% Draw bottom arch
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) -- (#1+\pmdraw@rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawTedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1+\pmdraw@rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) arc (270:180:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
+ \fi%
+ \renewcommand{\pmdraw@ifTedgeHorizontal}{0}% Reset flag to default
+ \fi%
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
+}
+\let\pmdraw@drawTedgesDraw\pmdraw@drawTedgesDrawDefault% Draws transversal edge from #1 vertex in top row to #2 vertex in bottom row
+
+\newcommand{\pmdraw@drawUedgesDrawOptions}{}% Draw options for upper non-transversal edges
+\newcommand{\pmdraw@drawUedgesDrawOptionsDefault}{}% Default draw options for upper non-transversal edges
+\newcommand{\pmdraw@drawUedgesDrawDefault}[2]{% Draws upper non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2 - DEFAULT
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1,\pmdraw@rowSep) arc (180:270:\pmdraw{edgeHeight});% Draw left arch
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#1+\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}) -- (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptionsDefault,apply style/.expand once=\pmdraw@drawUedgesDrawOptions,apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight}) arc (270:360:\pmdraw{edgeHeight});% Draw right arc
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
+}
+\let\pmdraw@drawUedgesDraw\pmdraw@drawUedgesDrawDefault% Draws upper non-transversal edge from #1 vertex to #2 vertex, assumes #1<#2
+
+\newcommand{\pmdraw@drawVertexOptions}{}% Draw options for vertices
+\newcommand{\pmdraw@drawVertexOptionsDefault}{}% Default draw options for vertices
+\newcommand{\pmdraw@drawVertexDefault}[2]{% Draws a vertex at (#1,#2) - Default
+ \fill[apply style/.expand once=\pmdraw@drawVertexOptionsDefault,apply style/.expand once=\pmdraw@drawVertexOptions] (#1,#2) circle (.17);%
+}
+\let\pmdraw@drawVertex\pmdraw@drawVertexDefault% Draws a vertex at (#1,#2)
+
+\newcommand{\pmdraw@edgeUncover}{1-}% Sets the uncover options of edge
+\newcommand{\pmdraw@edgesAddedUncover}{1-}% Sets the uncover options of added edges
+\newcommand{\pmdraw@edgesUncover}{1-}% Sets the uncover options of edges
+
+\newcommand{\pmdraw@hookAfterBrick}{}% Hook after drawing a brick
+\newcommand{\pmdraw@hookAfterDiagram}{}% Hook after drawing a diagram
+\newcommand{\pmdraw@hookBeforeBrick}{}% Hook before drawing a brick
+\newcommand{\pmdraw@hookBeforeDiagram}{}% Hook before drawing a diagram
+
+\newcommand{\pmdraw@ifDiagWDots}{0}% Boolean if drawing a diagram with dots
+\newcommand{\pmdraw@ifEdgesFirst}{0}% Boolean if drawing edges before vertices
+\newcommand{\pmdraw@ifGrid}{0}% Boolean if displaying helper grid
+\newcommand{\pmdraw@ifLabelsB}{0}% Boolean if displaying labels for vertices in bottom row
+\newcommand{\pmdraw@ifLabelsT}{0}% Boolean if displaying labels for vertices in top row
+\newcommand{\pmdraw@ifProdDiag}{0}% Boolean if drawing a product diagram
+\newcommand{\pmdraw@ifTedgesFirst}{0}% Boolean if drawing transversal edges before non-transversal edges
+\newcommand{\pmdraw@ifTedgeHorizontal}{0}% Boolean if transversal edge is drawn horizontally
+
+\newcommand{\pmdraw@NTedgesHeight}{-1000}% Height of non-transversal edges if manually set, a value of -1000 sets height automatically
+
+\newcommand{\pmdraw@reset}{% Resets user keys and other flags to default values after drawing diagram
+ \renewcommand{\pmdraw@diagSep}{1}% Resets vertical space between product diagrams
+ \renewcommand{\pmdraw@drawAedgesOptions}{}% Resets draw options for added edges in product diagram
+ \let\pmdraw@drawDots\pmdraw@drawDotsDefault% Resets drawing of dots between bricks
+ \renewcommand{\pmdraw@edgesAddedUncover}{1-}% Resets the uncover options of added edges
+ \renewcommand{\pmdraw@hookAfterDiagram}{}% Clears hook after drawing a diagram
+ \renewcommand{\pmdraw@hookBeforeDiagram}{}% Clears hook before drawing a diagram
+ \renewcommand{\pmdraw@ifGrid}{0}% Hides grid
+ \renewcommand{\pmdraw@ifDiagWDots}{0}% Reset if drawing a diagram with dots
+ \renewcommand{\pmdraw@rowSep}{2}% Resets vertical separation between rows of vertices in brick
+ \renewcommand{\pmdraw@tikz}{}% Resets tikz options
+ \renewcommand{\pmdraw@vertexSep}{0}% Resets vertical space between product diagrams
+ \setcounter{pmdraw@blankB}{0}% Resets number of blank vertices in bottom row to the left of brick
+ \setcounter{pmdraw@blankT}{0}% Resets number of blank vertices in top row to the left of brick
+ \setcounter{pmdraw@bottomShift}{0}% Resets shift on right end of bottom row of brick
+ \setcounter{pmdraw@topShift}{0}% Resets shift on right end of top row of brick
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \setcounter{pmdraw@ifEdgesAdded}{0}% Resets boolean if hiding added edges
+}
+
+\newcommand{\pmdraw@rowSep}{2}% Vertical separation between rows of vertices in brick
+
+\newcommand{\pmdraw@tikz}{}% Tikz options
+
+\newcommand{\pmdraw@verticesBottomUncover}{1-}% Sets the uncover options of bottom vertices
+\newcommand{\pmdraw@verticesTopUncover}{1-}% Sets the uncover options of top vertices
+
+\newcommand{\pmdraw@vertexSep}{0}% Vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram not for added edges
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Counters %
+% - loosely ordered alphabetically %
+% - includes default values where appropriate %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcounter{pmdraw@blankB}% Number of blank vertices in bottom row to the left of brick
+\newcounter{pmdraw@blankT}% Number of blank vertices in top row to the left of brick
+
+\newcounter{pmdraw@bottomTotal}% Size of bottom row of brick
+\newcounter{pmdraw@bottomShift}% Shift on right end of bottom row of brick
+
+\newcounter{pmdraw@braceL}% Left starting vertex of brace
+\newcounter{pmdraw@braceR}% Right terminating vertex of brace
+
+\newcounter{pmdraw@brickShift}% Shift required for bricks after dots in diagram with dots
+
+\newcounter{pmdraw@degreeB}% Degree (number of vertices) of bottom row of brick
+\newcounter{pmdraw@degreeT}% Degree (number of vertices) of top row of brick
+
+\newcounter{pmdraw@ifDiagWDotsFirst}% In drawing with dots, boolean if drawing first brick of diagram
+\setcounter{pmdraw@ifDiagWDotsFirst}{1}
+
+\newcounter{pmdraw@ifEdge}% Boolean if hiding edge
+\setcounter{pmdraw@ifEdge}{0}
+\newcounter{pmdraw@ifEdgesAdded}% Boolean if hiding added edges
+\setcounter{pmdraw@ifEdgesAdded}{0}
+\newcounter{pmdraw@ifEdges}% Boolean if hiding edges
+\setcounter{pmdraw@ifEdges}{0}
+
+\newcounter{pmdraw@ifVerticesBottom}% Boolean if hiding bottom row of vertices
+\setcounter{pmdraw@ifVerticesBottom}{0}
+\newcounter{pmdraw@ifVerticesTop}% Boolean if hiding top row of vertices
+\setcounter{pmdraw@ifVerticesTop}{0}
+
+\newcounter{pmdraw@labelStartB}% Starting value of labels of vertices in bottom row
+\setcounter{pmdraw@labelStartB}{1}
+\newcounter{pmdraw@labelStartT}% Starting value of labels of vertices in top row
+\setcounter{pmdraw@labelStartT}{1}
+
+\newcounter{pmdraw@NTlevel}% Level corresponding to a height for a non-transversal edge
+
+\newcounter{pmdraw@topTotal}% Size of top row of brick
+\newcounter{pmdraw@topShift}% Shift on right end of top row of brick
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Keys for bricks %
+% - ordered as per manual %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% To pass draw options to \draw command
+% Verbatim copy from:
+% https://tex.stackexchange.com/a/64237
+\tikzset{apply style/.code={\tikzset{#1}}}
+
+\define@key{pmdraw@brick}{degree}{% Sets degree (number of vertices per row) of diagram
+ \setcounter{pmdraw@degreeB}{#1}% Sets degree (number of vertices per row) for bottom row
+ \setcounter{pmdraw@degreeT}{#1}% Sets degree (number of vertices per row) for top row
+}
+\define@key{pmdraw@brickDefault}{degree}{% Sets default degree (number of vertices per row) of diagram
+ \setkeys{pmdraw@brick}{%
+ \savevalue{degree bottom}=#1%
+ }%
+ \setkeys{pmdraw@brick}{%
+ \savevalue{degree top}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{degree bottom}{% Sets degree (number of vertices per row) for bottom row
+ \setcounter{pmdraw@degreeB}{#1}%
+}
+\define@key{pmdraw@brickDefault}{degree bottom}{% Sets default degree (number of vertices per row) for bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{degree bottom}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{degree top}{% Sets degree (number of vertices per row) for top row
+ \setcounter{pmdraw@degreeT}{#1}%
+}
+\define@key{pmdraw@brickDefault}{degree top}{% Sets default degree (number of vertices per row) for top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{degree top}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{blank bottom}{% Sets the number of blank vertices on left of bottom row
+ \setcounter{pmdraw@blankB}{#1}%
+}
+\define@key{pmdraw@brickDefault}{blank bottom}{% Sets the default number of blank vertices on left of bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{blank bottom}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{blank top}{% Sets the number of blank vertices on left of top row
+ \setcounter{pmdraw@blankT}{#1}%
+}
+\define@key{pmdraw@brickDefault}{blank top}{% Sets the default number of blank vertices on left of top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{blank top}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{row sep}{% Sets vertical separation between rows of vertices in brick
+ \renewcommand{\pmdraw@rowSep}{#1}%
+}
+\define@key{pmdraw@brickDefault}{row sep}{% Sets default vertical separation between rows of vertices in brick
+ \setkeys{pmdraw@brick}{%
+ \savevalue{row sep}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{vertices}{% Sets the draw options of vertices
+ \renewcommand{\pmdraw@drawVertexOptions}{#1}%
+}
+\define@key{pmdraw@brick}{verticesDefault}{% Sets the default draw options of vertices
+ \renewcommand{\pmdraw@drawVertexOptionsDefault}{#1}%
+}
+\define@key{pmdraw@brickDefault}{vertices}{% Sets the default draw options of vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{verticesDefault}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 1}{% Sets 1st vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBa}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 1}{% Sets default 1st vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 1}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 2}{% Sets 2nd vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBb}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 2}{% Sets default 2nd vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 2}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 3}{% Sets 3rd vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBc}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 3}{% Sets default 3rd vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 3}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 4}{% Sets 4th vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBd}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 4}{% Sets default 4th vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 4}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 5}{% Sets 5th vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBe}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 5}{% Sets default 5th vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 5}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 6}{% Sets 6th vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBf}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 6}{% Sets default 6th vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 6}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 7}{% Sets 7th vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBg}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 7}{% Sets default 7th vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 7}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 8}{% Sets 8th vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBh}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 8}{% Sets default 8th vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 8}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex bottom 9}{% Sets 9th vertex to skip in bottom row
+ \renewcommand{\pmdraw@drawNoVertexBi}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex bottom 9}{% Sets default 9th vertex to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex bottom 9}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 1}{% Sets 1st vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTa}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 1}{% Sets default 1st vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 1}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 2}{% Sets 2nd vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTb}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 2}{% Sets default 2nd vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 2}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 3}{% Sets 3rd vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTc}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 3}{% Sets default 3rd vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 3}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 4}{% Sets 4th vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTd}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 4}{% Sets default 4th vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 4}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 5}{% Sets 5th vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTe}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 5}{% Sets default 5th vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 5}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 6}{% Sets 6th vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTf}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 6}{% Sets default 6th vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 6}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 7}{% Sets 7th vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTg}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 7}{% Sets default 7th vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 7}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 8}{% Sets 8th vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTh}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 8}{% Sets default 8th vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 8}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no vertex top 9}{% Sets 9th vertex to skip in top row
+ \renewcommand{\pmdraw@drawNoVertexTi}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no vertex top 9}{% Sets default 9th vertex to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no vertex top 9}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{vertices options}{% Sets the draw command of vertices
+ \renewcommand{\pmdraw@drawVertex}[2]{#1}%
+}
+
+\define@key{pmdraw@brick}{labels}[1]{% Draws labels for vertices
+ \renewcommand{\pmdraw@ifLabelsB}{#1}%
+ \renewcommand{\pmdraw@ifLabelsT}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels}[1]{% Sets the default drawing labels for vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{labels bottom}[1]{% Draws labels for bottom vertices
+ \renewcommand{\pmdraw@ifLabelsB}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels bottom}[1]{% Sets the default drawing labels for bottom vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels bottom}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{labels top}[1]{% Draws labels for top vertices
+ \renewcommand{\pmdraw@ifLabelsT}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels top}[1]{% Sets the default drawing labels for top vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels top}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{labels start}{% Sets starting number for vertex labels
+ \setcounter{pmdraw@labelStartT}{#1}%
+ \setcounter{pmdraw@labelStartB}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels start}{% Sets the default starting number for vertex labels
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels start}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{labels bottom start}{% Sets starting number for bottom vertex labels
+ \setcounter{pmdraw@labelStartB}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels bottom start}{% Sets the default starting number for bottom vertex labels
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels bottom start}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{labels top start}{% Sets starting number for top vertex labels
+ \setcounter{pmdraw@labelStartT}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels top start}{% Sets the default starting number for top vertex labels
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels top start}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{no label bottom 1}{% Sets 1st label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBa}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 1}{% Sets the default 1st label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 1}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label bottom 2}{% Sets 2nd label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBb}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 2}{% Sets the default 2nd label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 2}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label bottom 3}{% Sets 3rd label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBc}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 3}{% Sets the default 3rd label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 3}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label bottom 4}{% Sets 4th label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBd}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 4}{% Sets the default 4th label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 4}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label bottom 5}{% Sets 5th label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBe}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 5}{% Sets the default 5th label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 5}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label bottom 6}{% Sets 6th label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBf}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 6}{% Sets the default 6th label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 6}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label bottom 7}{% Sets 7th label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBg}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 7}{% Sets the default 7th label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 7}=#1%
+ }%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 8}{% Sets the default 8th label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 8}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label bottom 8}{% Sets 8th label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBh}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 8}{% Sets the default 8th label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 8}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label bottom 9}{% Sets 9th label to skip in bottom row
+ \renewcommand{\pmdraw@drawNoLabelBi}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label bottom 9}{% Sets the default 9th label to skip in bottom row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label bottom 9}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 1}{% Sets 1st label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTa}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 1}{% Sets the default 1st label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 1}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 2}{% Sets 2nd label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTb}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 2}{% Sets the default 2nd label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 2}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 3}{% Sets 3rd label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTc}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 3}{% Sets the default 3rd label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 3}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 4}{% Sets 4th label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTd}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 4}{% Sets the default 4th label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 4}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 5}{% Sets 5th label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTe}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 5}{% Sets the default 5th label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 5}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 6}{% Sets 6th label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTf}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 6}{% Sets the default 6th label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 6}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 7}{% Sets 7th label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTg}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 7}{% Sets the default 7th label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 7}=#1%
+ }%
+}
+\define@key{pmdraw@brickDefault}{no label top 8}{% Sets the default 8th label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 8}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 8}{% Sets 8th label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTh}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 8}{% Sets the default 8th label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 8}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{no label top 9}{% Sets 9th label to skip in top row
+ \renewcommand{\pmdraw@drawNoLabelTi}{#1}%
+}
+\define@key{pmdraw@brickDefault}{no label top 9}{% Sets the default 9th label to skip in top row
+ \setkeys{pmdraw@brick}{%
+ \savevalue{no label top 9}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{labels bottom draw}{% Sets the draw options for labels of bottom vertices
+ \renewcommand{\pmdraw@drawLabelBDrawOptions}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels bottom draw}{% Sets the default draw options for labels of bottom vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels bottom draw}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{labels bottom node}{% Sets the node options for labels of bottom vertices
+ \renewcommand{\pmdraw@drawLabelBNodeOptions}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels bottom node}{% Sets the default node options for labels of bottom vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels bottom node}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{labels top draw}{% Sets the draw options for labels of top vertices
+ \renewcommand{\pmdraw@drawLabelTDrawOptions}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels top draw}{% Sets the default draw options for labels of top vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels top draw}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{labels top node}{% Sets the node options for labels of top vertices
+ \renewcommand{\pmdraw@drawLabelTNodeOptions}{#1}%
+}
+\define@key{pmdraw@brickDefault}{labels top node}{% Sets the default node options for labels of top vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{labels top node}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{labels bottom options}{% Sets the draw command of labels of bottom vertices
+ \renewcommand{\pmdraw@drawLabelBottom}[3]{#1}%
+}
+\define@key{pmdraw@brick}{labels top options}{% Sets the draw command of labels of top vertices
+ \renewcommand{\pmdraw@drawLabelTop}[3]{#1}%
+}
+
+\define@key{pmdraw@brick}{no dots}[1]{% Does not draw dots in bricks
+ \setcounter{pmdraw@ifDiagWDotsFirst}{#1}%
+}
+
+\define@key{pmdraw@brick}{dots draw}{% Sets the draw options for drawing of dots
+ \renewcommand{\pmdraw@drawDotsDrawOptions}{#1}%
+}
+\define@key{pmdraw@brickDefault}{dots draw}{% Sets the default draw options for drawing of dots
+ \setkeys{pmdraw@brick}{%
+ \savevalue{dots draw}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{dots node}{% Sets the node options for drawing of dots
+ \renewcommand{\pmdraw@drawDotsNodeOptions}{#1}%
+}
+\define@key{pmdraw@brickDefault}{dots node}{% Sets the default node options for drawing of dots
+ \setkeys{pmdraw@brick}{%
+ \savevalue{dots node}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{vertices bottom phantom}[1]{% Does not draw bottom vertices
+ \setcounter{pmdraw@ifVerticesBottom}{#1}%
+}
+\define@key{pmdraw@brickDefault}{vertices bottom phantom}{% Sets the default to not draw bottom vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{vertices bottom phantom}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{vertices top phantom}[1]{% Does not draw top vertices
+ \setcounter{pmdraw@ifVerticesTop}{#1}%
+}
+\define@key{pmdraw@brickDefault}{vertices top phantom}{% Sets the default to not draw top vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{vertices top phantom}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{vertices bottom uncover}{% Sets the uncover options of bottom vertices
+ \renewcommand{\pmdraw@verticesBottomUncover}{#1}%
+}
+\define@key{pmdraw@brickDefault}{vertices bottom uncover}{% Sets the default uncover options of bottom vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{vertices bottom uncover}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{vertices top uncover}{% Sets the uncover options of top vertices
+ \renewcommand{\pmdraw@verticesTopUncover}{#1}%
+}
+\define@key{pmdraw@brickDefault}{vertices top uncover}{% Sets the default uncover options of top vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{vertices top uncover}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{levels}[1]{% Sets number of horizontal levels for non-transversal edges and evenly spaces them
+ \tikzmath{%
+ \pmdraw{edgeSepU} = (0.5*\pmdraw@rowSep)/(#1 + 1);% Calculates vertical separation between each edge
+ \pmdraw{edgeSepL} = \pmdraw{edgeSepU};% Calculates vertical separation between each edge
+ }%
+}
+\define@key{pmdraw@brickDefault}{levels}{% Sets the default number of horizontal levels for non-transversal edges and evenly spaces them
+ \setkeys{pmdraw@brick}{%
+ \savevalue{levels}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{levels bottom}{% Sets number of horizontal levels for lower non-transversal edges and evenly spaces them
+ \tikzmath{%
+ \pmdraw{edgeSepL} = (0.5*\pmdraw@rowSep)/(#1 + 1);% Calculates vertical separation between each edge
+ }%
+}
+\define@key{pmdraw@brickDefault}{levels bottom}{% Sets the default number of horizontal levels for lower non-transversal edges and evenly spaces them
+ \setkeys{pmdraw@brick}{%
+ \savevalue{levels bottom}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{levels top}{% Sets number of horizontal levels for upper non-transversal edges and evenly spaces them
+ \tikzmath{%
+ \pmdraw{edgeSepU} = (0.5*\pmdraw@rowSep)/(#1 + 1);% Calculates vertical separation between each edge
+ }%
+}
+\define@key{pmdraw@brickDefault}{levels top}{% Sets the default number of horizontal levels for upper non-transversal edges and evenly spaces them
+ \setkeys{pmdraw@brick}{%
+ \savevalue{levels top}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{levels sep}{% Sets vertical separation of horizontal levels for non-transversal edges
+ \tikzmath{%
+ \pmdraw{edgeSepU} = #1;%
+ \pmdraw{edgeSepL} = \pmdraw{edgeSepU};%
+ }%
+}
+\define@key{pmdraw@brickDefault}{levels sep}{% Sets the default vertical separation of horizontal levels for non-transversal edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{levels sep}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{levels sep bottom}{% Sets vertical separation of lower horizontal levels for non-transversal edges
+ \tikzmath{%
+ \pmdraw{edgeSepL} = #1;%
+ }%
+}
+\define@key{pmdraw@brickDefault}{levels sep bottom}{% Sets the default vertical separation of lower horizontal levels for non-transversal edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{levels sep bottom}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{levels sep top}{% Sets vertical separation of upper horizontal levels for non-transversal edges
+ \tikzmath{%
+ \pmdraw{edgeSepU} = #1;%
+ }%
+}
+\define@key{pmdraw@brickDefault}{levels sep top}{% Sets the default vertical separation of upper horizontal levels for non-transversal edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{levels sep top}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{edges}{% Sets the draw options of all edges
+ \renewcommand{\pmdraw@drawUedgesDrawOptions}{#1}%
+ \renewcommand{\pmdraw@drawLedgesDrawOptions}{#1}%
+ \renewcommand{\pmdraw@drawTedgesDrawOptions}{#1}%
+}
+\define@key{pmdraw@brick}{edgesDefault}{% Sets the default draw options of all edges
+ \renewcommand{\pmdraw@drawUedgesDrawOptionsDefault}{#1}%
+ \renewcommand{\pmdraw@drawLedgesDrawOptionsDefault}{#1}%
+ \renewcommand{\pmdraw@drawTedgesDrawOptionsDefault}{#1}%
+}
+\define@key{pmdraw@brickDefault}{edges}{% Sets the default draw options of all edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{edgesDefault}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{edges non-transversal}{% Sets the draw options of non-transversal edges
+ \renewcommand{\pmdraw@drawUedgesDrawOptions}{#1}%
+ \renewcommand{\pmdraw@drawLedgesDrawOptions}{#1}%
+}
+\define@key{pmdraw@brick}{edges non-transversalDefault}{% Sets the default draw options of non-transversal edges
+ \renewcommand{\pmdraw@drawUedgesDrawOptionsDefault}{#1}%
+ \renewcommand{\pmdraw@drawLedgesDrawOptionsDefault}{#1}%
+}
+\define@key{pmdraw@brickDefault}{edges non-transversal}{% Sets the default draw options of non-transversal edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{edges non-transversalDefault}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{edges upper}{% Sets the draw options of upper non-transversal edges
+ \renewcommand{\pmdraw@drawUedgesDrawOptions}{#1}%
+}
+\define@key{pmdraw@brick}{edges upperDefault}{% Sets the default draw options of upper non-transversal edges
+ \renewcommand{\pmdraw@drawUedgesDrawOptionsDefault}{#1}%
+}
+\define@key{pmdraw@brickDefault}{edges upper}{% Sets the default draw options of upper non-transversal edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{edges upperDefault}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{edges lower}{% Sets the draw options of lower non-transversal edges
+ \renewcommand{\pmdraw@drawLedgesDrawOptions}{#1}%
+}
+\define@key{pmdraw@brick}{edges lowerDefault}{% Sets the defaultdraw options of lower non-transversal edges
+ \renewcommand{\pmdraw@drawLedgesDrawOptionsDefault}{#1}%
+}
+\define@key{pmdraw@brickDefault}{edges lower}{% Sets the default draw options of lower non-transversal edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{edges lowerDefault}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{edges transversal}{% Sets the draw options of transversal edges
+ \renewcommand{\pmdraw@drawTedgesDrawOptions}{#1}%
+}
+\define@key{pmdraw@brick}{edges transversalDefault}{% Sets the default draw options of transversal edges
+ \renewcommand{\pmdraw@drawTedgesDrawOptionsDefault}{#1}%
+}
+\define@key{pmdraw@brickDefault}{edges transversal}{% Sets the default draw options of transversal edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{edges transversalDefault}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{edges first}[1]{% Draws edges before vertices
+ \renewcommand{\pmdraw@ifEdgesFirst}{#1}%
+}
+\define@key{pmdraw@brickDefault}{edges first}{% Sets the default to draw edges before vertices
+ \setkeys{pmdraw@brick}{%
+ \savevalue{edges first}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{transversals first}[1]{% Draws transversal edges before non-transversal edges
+ \renewcommand{\pmdraw@ifTedgesFirst}{#1}%
+}
+\define@key{pmdraw@brickDefault}{transversals first}{% Sets the default to draw transversal edges before non-transversal edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{transversals first}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{edges phantom}[1]{% Does not draw edges
+ \setcounter{pmdraw@ifEdges}{#1}%
+}
+\define@key{pmdraw@brickDefault}{edges phantom}{% Sets the default to not draw edge
+ \setkeys{pmdraw@brick}{%
+ \savevalue{edges phantom}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{edges uncover}{% Sets the uncover options of edges
+ \renewcommand{\pmdraw@edgesUncover}{#1}%
+}
+\define@key{pmdraw@brickDefault}{edges uncover}{% Sets the default uncover options of edges
+ \setkeys{pmdraw@brick}{%
+ \savevalue{edges uncover}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{brace}{% Draws a brace
+ \setkeys{pmdraw@brace}{% Sets default keys for brace
+ left=\usevalue{left},
+ right=\usevalue{right},
+ above=\usevalue{above}
+ }%
+ \setkeys{pmdraw@brace}{#1}% Processes details of brace
+ \pmdraw@drawBrace{\value{pmdraw@braceL}}{\value{pmdraw@braceR}}{\pmdraw@braceLabel}% Draws brace
+ \let\pmdraw@drawBrace\pmdraw@drawBraceDefault% Resets brace options if changed
+}
+\define@key{pmdraw@brickDefault}{brace}{% Sets the default brace
+ \setkeys{pmdraw@brick}{%
+ \savevalue{brace}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{brace draw}{% Sets the draw options for drawing of brace
+ \renewcommand{\pmdraw@drawBraceDrawOptions}{#1}%
+}
+\define@key{pmdraw@brickDefault}{brace draw}{% Sets the default draw options for drawing of brace
+ \setkeys{pmdraw@brick}{%
+ \savevalue{brace draw}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{brace node}{% Sets the node options for drawing of brace
+ \renewcommand{\pmdraw@drawBraceNodeOptions}{#1}%
+}
+\define@key{pmdraw@brickDefault}{brace node}{% Sets the default node options for drawing of brace
+ \setkeys{pmdraw@brick}{%
+ \savevalue{brace node}=#1%
+ }%
+}
+
+\define@key{pmdraw@brick}{decorate before}{% Hook for decorations before brick is drawn
+ \renewcommand{\pmdraw@hookBeforeBrick}{#1}%
+}
+\define@key{pmdraw@brickDefault}{decorate before}{% Sets the default hook for decorations before brick is drawn
+ \setkeys{pmdraw@brick}{%
+ \savevalue{decorate before}=#1%
+ }%
+}
+\define@key{pmdraw@brick}{decorate after}{% Hook for decorations after brick is drawn
+ \renewcommand{\pmdraw@hookAfterBrick}{#1}%
+}
+\define@key{pmdraw@brickDefault}{decorate after}{% Sets the default hook for decorations after brick is drawn
+ \setkeys{pmdraw@brick}{%
+ \savevalue{decorate after}=#1%
+ }%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Keys for edges %
+% - ordered as per manual %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\define@key{pmdraw@NTedges}{level}{% Sets level of non-transversal edge
+ \setcounter{pmdraw@NTlevel}{#1}%
+}
+\define@key{pmdraw@NTedgesDefault}{level}{% Sets the default level of non-transversal edge
+ \setkeys{pmdraw@NTedges}{%
+ \savevalue{level}=#1%
+ }%
+}
+
+\define@key{pmdraw@NTedges}{height}{% Sets manual height of non-transversal edge
+ \renewcommand{\pmdraw@NTedgesHeight}{#1}%
+}
+\define@key{pmdraw@NTedgesDefault}{height}{% Sets the default manual height of non-transversal edge
+ \setkeys{pmdraw@NTedges}{%
+ \savevalue{height}=#1%
+ }%
+}
+
+\define@key{pmdraw@NTedges}{edge draw}{% Sets the draw options for drawing of edge
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{#1}%
+}
+\define@key{pmdraw@NTedgesDefault}{edge draw}{% Sets the default draw options for drawing of edge
+ \setkeys{pmdraw@NTedges}{%
+ \savevalue{edge draw}=#1%
+ }%
+}
+
+\define@key{pmdraw@NTedges}{options}{% Sets the draw command of non-transversal edge
+ \renewcommand{\pmdraw@drawUedgesDraw}[2]{#1}%
+ \renewcommand{\pmdraw@drawLedgesDraw}[2]{#1}%
+}
+
+\define@key{pmdraw@NTedges}{phantom}[1]{% Does not draw edge
+ \setcounter{pmdraw@ifEdge}{#1}%
+}
+\define@key{pmdraw@NTedgesDefault}{phantom}{% Sets the default to not draw edge
+ \setkeys{pmdraw@NTedges}{%
+ \savevalue{phantom}=#1%
+ }%
+}
+
+\define@key{pmdraw@NTedges}{uncover}{% Sets the uncover options of edge
+ \renewcommand{\pmdraw@edgeUncover}{#1}%
+}
+\define@key{pmdraw@NTedgesDefault}{uncover}{% Sets the default uncover options of edge
+ \setkeys{pmdraw@NTedges}{%
+ \savevalue{uncover}=#1%
+ }%
+}
+
+\define@key{pmdraw@Tedges}{height}{% Sets manual height of transversal edge
+ \tikzmath{%
+ \pmdraw{Tlevel} = #1;%
+ }%
+ \renewcommand{\pmdraw@ifTedgeHorizontal}{1}% Flags manual height
+}
+\define@key{pmdraw@TedgesDefault}{height}{% Sets the default manual height of transversal edge
+ \setkeys{pmdraw@Tedges}{%
+ \savevalue{height}=#1%
+ }%
+}
+
+\define@key{pmdraw@Tedges}{edge draw}{% Sets the draw options for drawing of edge
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{#1}%
+}
+\define@key{pmdraw@TedgesDefault}{edge draw}{% Sets the default draw options for drawing of edge
+ \setkeys{pmdraw@Tedges}{%
+ \savevalue{edge draw}=#1%
+ }%
+}
+
+\define@key{pmdraw@Tedges}{options}{% Sets the draw command of transversal edge
+ \renewcommand{\pmdraw@drawTedgesDraw}[2]{#1}%
+}
+
+\define@key{pmdraw@Tedges}{phantom}[1]{% Does not draw edge
+ \setcounter{pmdraw@ifEdge}{#1}%
+}
+\define@key{pmdraw@TedgesDefault}{phantom}{% Sets the default to not draw edge
+ \setkeys{pmdraw@Tedges}{%
+ \savevalue{phantom}=#1%
+ }%
+}
+
+\define@key{pmdraw@Tedges}{uncover}{% Sets the uncover options of edge
+ \renewcommand{\pmdraw@edgeUncover}{#1}%
+}
+\define@key{pmdraw@TedgesDefault}{uncover}{% Sets the default uncover options of edge
+ \setkeys{pmdraw@Tedges}{%
+ \savevalue{uncover}=#1%
+ }%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Keys for brace %
+% - ordered as per manual %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\define@key{pmdraw@brace}{left}{% Sets starting position of brace
+ \setcounter{pmdraw@braceL}{#1}%
+}
+\define@key{pmdraw@braceDefault}{left}{% Sets the default starting position of brace
+ \setkeys{pmdraw@brace}{%
+ \savevalue{left}=#1%
+ }%
+}
+
+\define@key{pmdraw@brace}{right}{% Sets terminating position of brace
+ \setcounter{pmdraw@braceR}{#1}%
+}
+\define@key{pmdraw@braceDefault}{right}{% Sets the default terminating position of brace
+ \setkeys{pmdraw@brace}{%
+ \savevalue{right}=#1%
+ }%
+}
+
+\define@key{pmdraw@brace}{label}{% Sets label of brace
+ \renewcommand{\pmdraw@braceLabel}{#1}%
+}
+
+\define@key{pmdraw@brace}{above}[1]{% Set flag to draw brace above diagram
+ \renewcommand{\pmdraw@ifProdDiag}{#1}%
+}
+\define@key{pmdraw@braceDefault}{above}{% Sets the default flag to draw brace above diagram
+ \setkeys{pmdraw@brace}{%
+ \savevalue{above}=#1%
+ }%
+}
+
+\define@key{pmdraw@brace}{options}{% Sets the draw command of brace
+ \renewcommand{\pmdraw@drawBrace}[3]{#1}%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Keys for diagrams and product diagrams %
+% - ordered as per manual %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\define@key{pmdraw@diagram}{row sep}{% Sets vertical separation between rows of vertices in diagram
+ \renewcommand{\pmdraw@rowSep}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{row sep}{% Sets the default vertical separation between rows of vertices in diagram
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{row sep}=#1%
+ }%
+}
+
+\define@key{pmdraw@diagram}{tikz}{% Sets the tikz options
+ \renewcommand{\pmdraw@tikz}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{tikz}{% Sets the default tikz options
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{tikz}=#1%
+ }%
+}
+
+\define@key{pmdraw@diagram}{dots options}{% Sets the draw command of dots between bricks
+ \renewcommand{\pmdraw@drawDots}[2]{#1}%
+}
+
+
+\define@key{pmdraw@diagram}{grid}[1]{% Flag for drawing coordinate grid
+ \renewcommand{\pmdraw@ifGrid}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{grid}{% Sets the default flag for drawing coordinate grid
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{grid}=#1%
+ }%
+}
+
+\define@key{pmdraw@diagram}{decorate before}{% Hook before drawing diagrams
+ \renewcommand{\pmdraw@hookBeforeDiagram}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{decorate before}{% Sets the default hook before drawing diagrams
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{decorate before}=#1%
+ }%
+}
+\define@key{pmdraw@diagram}{decorate after}{% Hook after drawing diagrams
+ \renewcommand{\pmdraw@hookAfterDiagram}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{decorate after}{% Sets the default hook after drawing diagrams
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{decorate after}=#1%
+ }%
+}
+
+\define@key{pmdraw@diagram}{diagram sep}{% Sets vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram
+ \renewcommand{\pmdraw@diagSep}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{diagram sep}{% Sets the default vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{diagram sep}=#1%
+ }%
+}
+\define@key{pmdraw@diagram}{vertex sep}{% Sets vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram not for added edges
+ \renewcommand{\pmdraw@vertexSep}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{vertex sep}{% Sets the default vertical separation between bottom row of top diagram and top row of bottom diagram in product diagram not for added edges
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{vertex sep}=#1%
+ }%
+}
+
+\define@key{pmdraw@diagram}{edges added}{% Sets the draw options for drawing of added edges in product diagram
+ \renewcommand{\pmdraw@drawAedgesOptions}{#1}%
+}
+\define@key{pmdraw@diagram}{edges addedDefault}{% Sets the default draw options for drawing of added edges in product diagram
+ \renewcommand{\pmdraw@drawAedgesOptionsDefault}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{edges added}{% Sets the default draw options for drawing of added edges in product diagram
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{edges addedDefault}=#1%
+ }%
+}
+\define@key{pmdraw@diagram}{edges added phantom}[1]{% Does not draw added edges
+ \setcounter{pmdraw@ifEdgesAdded}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{edges added phantom}{% Sets the default to not draw added edges
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{edges added phantom}=#1%
+ }%
+}
+\define@key{pmdraw@diagram}{edges added uncover}{% Sets the uncover options of added edges
+ \renewcommand{\pmdraw@edgesAddedUncover}{#1}%
+}
+\define@key{pmdraw@diagramDefault}{edges added uncover}{% Sets the default uncover options of added edges
+ \setkeys{pmdraw@diagram}{%
+ \savevalue{edges added uncover}=#1%
+ }%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Keys for default key settings %
+% - ordered as per manual %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\define@key{pmdraw@default}{brick}{% Sets the default key options of brick keys
+ \setkeys{pmdraw@brickDefault}{#1}%
+}
+
+\define@key{pmdraw@default}{NTedges}{% Sets the default key options of non-transversal edge keys
+ \setkeys{pmdraw@NTedgesDefault}{#1}%
+}
+
+\define@key{pmdraw@default}{Tedges}{% Sets the default key options of transversal edge keys
+ \setkeys{pmdraw@TedgesDefault}{#1}%
+}
+
+\define@key{pmdraw@default}{brace}{% Sets the default key options of brace keys
+ \setkeys{pmdraw@braceDefault}{#1}%
+}
+
+\define@key{pmdraw@default}{diagram}{% Sets the default key options of diagram keys
+ \setkeys{pmdraw@diagramDefault}{#1}%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% User commands %
+% - loosely ordered alphabetically %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\pmdBrick}[4][]{% Draws brick
+ % #1 Options
+ % #2 Upper non-transversal edges, as list [<options>]{<left vertex>}{<right vertex>}, eg [level=1]{2}{3}
+ % #3 Lower non-transversal edges, as list [<options>]{<left vertex>}{<right vertex>}, eg [level=1]{2}{3}
+ % #4 Transversals, as list [<options>]{<upper vertex>}{<lower vertex>}, eg [level=1]{2}{3}
+ \pmdDiagram{{[#1]{#2}{#3}{#4}}}% Uses complete diagram method to draw brick
+}
+
+\newcommand{\pmdDiagram}[2][]{% Draws diagram
+ % #1 Options
+ % #2 List of bricks
+ \setkeys{pmdraw@diagram}{% Sets default key values for diagrams
+ row sep=\usevalue{row sep},
+ tikz=\usevalue{tikz},
+ grid=\usevalue{grid},
+ decorate before=\usevalue{decorate before},
+ decorate after=\usevalue{decorate after},
+ diagram sep=\usevalue{diagram sep},
+ vertex sep=\usevalue{vertex sep},
+ edges added phantom=\usevalue{edges added phantom},
+ edges added uncover=\usevalue{edges added uncover}
+ }%
+ \setkeys{pmdraw@diagram}{#1}% Processes options
+ \renewcommand{\pmdraw@ifDiagWDots}{1}% Flags that diagram has dots
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \ifmmode% If drawing diagram in a maths equation
+ \,% Add space
+ \ifnum\pmdraw@ifGrid=1% If displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=0.405cm,show grid=true,apply style/.expand once=\pmdraw@tikz]%
+ \else% If not displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=0.405cm,apply style/.expand once=\pmdraw@tikz]%
+ \fi%
+ \pmdraw@hookBeforeDiagram% Hook before drawing diagrams
+ \pmdraw@bricksLoop% Commences loop for each brick to be drawn
+ #2%
+ \pmdEmpty% Terminates loop
+ \pmdraw@hookAfterDiagram% Hook after drawing diagrams
+ \end{tikzpicture}%
+ \,% Add space
+ \else% If drawing diagram in normal text
+ \raisebox{0.5cm}{% Raise diagram so bottom row is on text baseline
+ \ifnum\pmdraw@ifGrid=1% If displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=0.405cm,show grid=true,apply style/.expand once=\pmdraw@tikz]%
+ \else% If not displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=0.405cm,apply style/.expand once=\pmdraw@tikz]%
+ \fi%
+ \pmdraw@hookBeforeDiagram% Hook before drawing diagrams
+ \pmdraw@bricksLoop% Commences loop for each brick to be drawn
+ #2%
+ \pmdEmpty% Terminates loop
+ \pmdraw@hookAfterDiagram% Hook after drawing diagrams
+ \end{tikzpicture}%
+ }%
+ \fi%
+ \pmdraw@reset% Resets user keys and other flags to default values
+}
+
+\newcommand{\pmdEmpty}{}% Indicates no edges, internally halts input loops, always is = {}
+
+\newcommand{\pmdProduct}[4][]{% Draws product diagram
+ % #1 Options
+ % #2 List of added edges
+ % #3 Top diagram as list of bricks
+ % #4 Bottom diagram as list of bricks
+ \setkeys{pmdraw@diagram}{% Sets default key values for diagrams
+ row sep=\usevalue{row sep},
+ tikz=\usevalue{tikz},
+ grid=\usevalue{grid},
+ decorate before=\usevalue{decorate before},
+ decorate after=\usevalue{decorate after},
+ diagram sep=\usevalue{diagram sep},
+ vertex sep=\usevalue{vertex sep},
+ edges added phantom=\usevalue{edges added phantom},
+ edges added uncover=\usevalue{edges added uncover}
+ }%
+ \setkeys{pmdraw@diagram}{#1}% Processes options
+ \ifmmode% If drawing diagram in a maths equation
+ \,% Add space
+ \ifnum\pmdraw@ifGrid=1% If displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-.3475cm,show grid=true,apply style/.expand once=\pmdraw@tikz]%
+ \else% If not displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-.3475cm,apply style/.expand once=\pmdraw@tikz]%
+ \fi%
+ \pmdraw@hookBeforeDiagram% Hook before drawing diagrams
+ \pmdraw@AedgesLoop% Commences loop for added edges to be drawn
+ #2%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifDiagWDots}{1}% Flags that diagram has dot
+ \renewcommand{\pmdraw@ifProdDiag}{1}% Flags that diagram is product
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \pmdraw@bricksLoop% Commences loop for each brick to be drawn
+ #3%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifProdDiag}{0}% Resets flag that diagram is product
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep-\pmdraw@vertexSep)}]% Shift coordinates to be underneath top diagram
+ \pmdraw@bricksLoop% Commences loop for each brick to be drawn
+ #4%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifDiagWDots}{0}% Reset if drawing a diagram with dots
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \end{scope}%
+ \pmdraw@hookAfterDiagram% Hook after drawing diagrams
+ \end{tikzpicture}%
+ \,% Add space
+ \else% If drawing diagram in normal text
+ \raisebox{2cm}{% Raise diagram so bottom row is on text baseline
+ \ifnum\pmdraw@ifGrid=1% If displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=0.405cm,show grid=true,apply style/.expand once=\pmdraw@tikz]%
+ \else% If not displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=0.405cm,apply style/.expand once=\pmdraw@tikz]%
+ \fi%
+ \pmdraw@hookBeforeDiagram% Hook before drawing diagrams
+ \pmdraw@AedgesLoop% Commences loop for added edges to be drawn
+ #2%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifDiagWDots}{1}% Flags that diagram has dot
+ \renewcommand{\pmdraw@ifProdDiag}{1}% Flags that diagram is product
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \pmdraw@bricksLoop% Commences loop for each brick to be drawn
+ #3%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifProdDiag}{0}% Resets flag that diagram is products
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep-\pmdraw@vertexSep)}]% Shift coordinates to be underneath top diagram
+ \pmdraw@bricksLoop% Commences loop for each brick to be drawn
+ #4%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifDiagWDots}{0}% Reset if drawing a diagram with dots
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \end{scope}%
+ \pmdraw@hookAfterDiagram% Hook after drawing diagrams diagram
+ \end{tikzpicture}%
+ }%
+ \fi%
+ \pmdraw@reset% Resets user keys and other flags to default values
+}
+
+\newcommand{\pmdProductTriple}[6][]{% Draws triple product diagram
+ % #1 Options
+ % #2 List of top added edges
+ % #3 List of bottom added edges
+ % #4 Top diagram as list of bricks
+ % #5 Middle diagram as list of bricks
+ % #6 Bottom diagram as list of bricks
+ \setkeys{pmdraw@diagram}{% Sets default key values for diagrams
+ row sep=\usevalue{row sep},
+ tikz=\usevalue{tikz},
+ grid=\usevalue{grid},
+ decorate before=\usevalue{decorate before},
+ decorate after=\usevalue{decorate after},
+ diagram sep=\usevalue{diagram sep},
+ vertex sep=\usevalue{vertex sep},
+ edges added phantom=\usevalue{edges added phantom},
+ edges added uncover=\usevalue{edges added uncover}
+ }%
+ \setkeys{pmdraw@diagram}{#1}% Processes options
+ \ifmmode% If drawing diagram in a maths equation
+ \,% Add space
+ \ifnum\pmdraw@ifGrid=1% If displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-1.0975cm,show grid=true,apply style/.expand once=\pmdraw@tikz]%
+ \else% If not displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-1.0975cm,apply style/.expand once=\pmdraw@tikz]%
+ \fi%
+ \pmdraw@hookBeforeDiagram% Hook before drawing diagrams
+ \pmdraw@AedgesLoop% Commences loop for top added edges to be drawn
+ #2%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifDiagWDots}{1}% Flags that diagram has dot
+ \renewcommand{\pmdraw@ifProdDiag}{1}% Flags that diagram is product
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \pmdraw@bricksLoop% Commences loop for each top brick to be drawn
+ #4%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifProdDiag}{0}% Resets flag that diagram is product
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep-\pmdraw@vertexSep)}]% Shift coordinates to be underneath top diagram
+ \pmdraw@AedgesLoop% Commences loop for bottom added edges to be drawn
+ #3%
+ \pmdEmpty% Terminates loop
+ \pmdraw@bricksLoop% Commences loop for each middle brick to be drawn
+ #5%
+ \pmdEmpty% Terminates loop
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep-\pmdraw@vertexSep)}]% Shift coordinates to be underneath middle diagram
+ \pmdraw@bricksLoop% Commences loop for each bottom brick to be drawn
+ #6%
+ \pmdEmpty% Terminates loop
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \end{scope}%
+ \end{scope}%
+ \renewcommand{\pmdraw@ifDiagWDots}{0}% Reset if drawing a diagram with dots
+ \pmdraw@hookAfterDiagram% Hook after drawing diagrams
+ \end{tikzpicture}%
+ \,% Add space
+ \else% If drawing diagram in normal text
+ \raisebox{2cm}{% Raise diagram so bottom row is on text baseline
+ \ifnum\pmdraw@ifGrid=1% If displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-1.095cm,show grid=true,apply style/.expand once=\pmdraw@tikz]%
+ \else% If not displaying helper grid
+ \begin{tikzpicture}[scale=.5,baseline=-1.095cm,apply style/.expand once=\pmdraw@tikz]%
+ \fi%
+ \pmdraw@hookBeforeDiagram% Hook before drawing diagrams
+ \pmdraw@AedgesLoop% Commences loop for added edges to be drawn
+ #2%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifDiagWDots}{1}% Flags that diagram has dot
+ \renewcommand{\pmdraw@ifProdDiag}{1}% Flags that diagram is product
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \pmdraw@bricksLoop% Commences loop for each brick to be drawn
+ #4%
+ \pmdEmpty% Terminates loop
+ \renewcommand{\pmdraw@ifProdDiag}{0}% Resets flag that diagram is product
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep-\pmdraw@vertexSep)}]% Shift coordinates to be underneath top diagram
+ \pmdraw@AedgesLoop% Commences loop for bottom added edges to be drawn
+ #3%
+ \pmdEmpty% Terminates loop
+ \pmdraw@bricksLoop% Commences loop for each middle brick to be drawn
+ #5%
+ \pmdEmpty% Terminates loop
+ \setcounter{pmdraw@ifDiagWDotsFirst}{1}% Reset if drawing first brick of diagram
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \begin{scope}[shift={(0,-\pmdraw@diagSep-\pmdraw@rowSep-\pmdraw@vertexSep)}]% Shift coordinates to be underneath middle diagram
+ \pmdraw@bricksLoop% Commences loop for each bottom brick to be drawn
+ #6%
+ \pmdEmpty% Terminates loop
+ \setcounter{pmdraw@brickShift}{0}% Reset shifting of individual bricks
+ \end{scope}%
+ \end{scope}%
+ \renewcommand{\pmdraw@ifDiagWDots}{0}% Reset if drawing a diagram with dots
+ \pmdraw@hookAfterDiagram% Hook after drawing diagrams
+ \end{tikzpicture}%
+ }%
+ \fi%
+ \pmdraw@reset% Resets user keys and other flags to default values
+}
+
+\newcommand{\pmdSetDefault}[1]{% Sets the entered styles as the default
+ \setkeys{pmdraw@default}{#1}%
+}
+
+\newcommand{\pmdSetToOriginalDefault}{% Sets the styles as the default of the package
+ \setkeys{pmdraw@default}{% Saves values
+ brick={% Sets default for brick keys
+ degree=0,
+ degree bottom=0,
+ degree top=0,
+ blank bottom=0,
+ blank top=0,
+ row sep=2,
+ no vertex bottom 1=-1,
+ no vertex bottom 2=-1,
+ no vertex bottom 3=-1,
+ no vertex bottom 4=-1,
+ no vertex bottom 5=-1,
+ no vertex bottom 6=-1,
+ no vertex bottom 7=-1,
+ no vertex bottom 8=-1,
+ no vertex bottom 9=-1,
+ no vertex top 1=-1,
+ no vertex top 2=-1,
+ no vertex top 3=-1,
+ no vertex top 4=-1,
+ no vertex top 5=-1,
+ no vertex top 6=-1,
+ no vertex top 7=-1,
+ no vertex top 8=-1,
+ no vertex top 9=-1,
+ labels=0,
+ labels bottom=0,
+ labels top=0,
+ labels start=1,
+ labels bottom start=1,
+ labels top start=1,
+ no label bottom 1=-1,
+ no label bottom 2=-1,
+ no label bottom 3=-1,
+ no label bottom 4=-1,
+ no label bottom 5=-1,
+ no label bottom 6=-1,
+ no label bottom 7=-1,
+ no label bottom 8=-1,
+ no label bottom 9=-1,
+ no label top 1=-1,
+ no label top 2=-1,
+ no label top 3=-1,
+ no label top 4=-1,
+ no label top 5=-1,
+ no label top 6=-1,
+ no label top 7=-1,
+ no label top 8=-1,
+ no label top 9=-1,
+ labels bottom draw={},
+ labels bottom node={},
+ labels top draw={},
+ labels top node={},
+ dots draw={},
+ dots node={},
+ vertices bottom phantom=0,
+ vertices top phantom=0,
+ vertices bottom uncover={1-},
+ vertices top uncover={1-},
+ levels=1,
+ levels bottom=1,
+ levels top=1,
+ levels sep=(0.5*\pmdraw@rowSep)/2,
+ levels sep bottom=(0.5*\pmdraw@rowSep)/2,
+ levels sep top=(0.5*\pmdraw@rowSep)/2,
+ edges first=0,
+ transversals first=0,
+ edges phantom=0,
+ edges uncover={1-},
+ brace draw={},
+ brace node={},
+ decorate before={},
+ decorate after={}
+ }
+ }
+ \setkeys{pmdraw@default}{% Saves values
+ NTedges={% Sets default for non-transversal edge keys
+ level=1,
+ height=-1000,
+ edge draw={},
+ phantom=0,
+ uncover={1-}
+ }
+ }
+ \setkeys{pmdraw@default}{% Saves values
+ Tedges={% Sets default for transversal edge keys
+ edge draw={},
+ phantom=0,
+ uncover={1-}
+ }
+ }
+ \setkeys{pmdraw@default}{% Saves values
+ brace={% Sets default for brace keys
+ left=0,
+ right=0,
+ above=0
+ }
+ }
+ \setkeys{pmdraw@default}{% Saves values
+ diagram={% Sets default for diagram keys
+ row sep=2,
+ tikz={},
+ grid=0,
+ decorate before={},
+ decorate after={},
+ diagram sep=1,
+ vertex sep=0,
+ edges added phantom=0,
+ edges added uncover={1-}
+ }
+ }
+ \renewcommand{\pmdraw@drawVertexOptionsDefault}{}% Resets default draw options for vertices
+ \renewcommand{\pmdraw@drawLedgesDrawOptionsDefault}{}% Resets default draw options for lower non-transversal edges
+ \renewcommand{\pmdraw@drawUedgesDrawOptionsDefault}{}% Resets default draw options for upper non-transversal edges
+ \renewcommand{\pmdraw@drawTedgesDrawOptionsDefault}{}% Resets Default draw options for transversal edges
+ \renewcommand{\pmdraw@drawAedgesOptionsDefault}{}% Resets default draw options for added edges in product diagram
+}
+\pmdSetToOriginalDefault% Sets original default values
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% For loop commands %
+% - loosely ordered alphabetically %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\pmdraw@AedgesLoop}{% Starts loop for added edges in product diagram
+ \@ifnextchar\pmdEmpty{}{% If not at end of list
+ \pmdraw@drawAedges% Draw each edge
+ }%
+}
+\newcommand{\pmdraw@bricksLoop}{% Starts loop to iterate over each brick in diagram
+ \@ifnextchar\pmdEmpty{}{% If not at end of list
+ \pmdraw@drawBrickInit% Draw each brick
+ }%
+}
+\newcommand{\pmdraw@LedgesLoop}{% Starts loop for lower non-transversal edges
+ \@ifnextchar\pmdEmpty{}{% If not at end of list
+ \pmdraw@drawLedges% Draw each edge
+ }%
+}
+\newcommand{\pmdraw@TedgesLoop}{% Starts loop for transversal edges
+ \@ifnextchar\pmdEmpty{}{% If not at end of list
+ \pmdraw@drawTedges% Draw each edge
+ }%
+}
+\newcommand{\pmdraw@UedgesLoop}{% Starts loop for upper non-transversal edges
+ \@ifnextchar\pmdEmpty{}{% If not at end of list
+ \pmdraw@drawUedges% Draw each edge
+ }%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Draw commands %
+% - loosely ordered alphabetically %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\pmdraw@drawBottomVertices}{% Draws bottom row of vertices
+ \setcounter{pmdraw@bottomTotal}{\value{pmdraw@blankB}}% Store size of bottom row of vertices
+ \addtocounter{pmdraw@bottomTotal}{\value{pmdraw@degreeB}}% Store size of bottom row of vertices
+ \ifnum\value{pmdraw@ifDiagWDotsFirst}=1% If drawing first brick of diagram
+ \setcounter{pmdraw@ifDiagWDotsFirst}{0}% Mark that first brick has been drawn
+ \else% If not drawing first brick of diagram
+ \pmdraw@drawDots{0.5*\value{pmdraw@topShift}+0.5*\value{pmdraw@blankT}}{\pmdraw@rowSep}% Draw upper dots
+ \pmdraw@drawDots{0.5*\value{pmdraw@bottomShift}+0.5*\value{pmdraw@blankB}}{0}% Draw lower dots
+ \fi%
+ \ifnum\value{pmdraw@topTotal}>\value{pmdraw@bottomTotal}% If top row is longer than bottom row
+ \ifnum\pmdraw@ifDiagWDots=1% If drawing a diagram with dots
+ \addtocounter{pmdraw@brickShift}{\value{pmdraw@topTotal}}% Keep track of size of diagram
+ % Store shifts
+ \setcounter{pmdraw@topShift}{-\value{pmdraw@topTotal}}%
+ \addtocounter{pmdraw@topShift}{\value{pmdraw@topTotal}}%
+ \setcounter{pmdraw@bottomShift}{-\value{pmdraw@topTotal}}%
+ \addtocounter{pmdraw@bottomShift}{\value{pmdraw@bottomTotal}}%
+ \else% If drawing a diagram without dots
+ \setcounter{pmdraw@brickShift}{\value{pmdraw@topTotal}}% Keep track of size of diagram
+ \fi%
+ \else% If bottom row is longer than top row
+ \ifnum\pmdraw@ifDiagWDots=1% If drawing a diagram with dots
+ \addtocounter{pmdraw@brickShift}{\value{pmdraw@bottomTotal}}% Keep track of size of diagram
+ % Store shifts
+ \setcounter{pmdraw@topShift}{-\value{pmdraw@bottomTotal}}%
+ \addtocounter{pmdraw@topShift}{\value{pmdraw@topTotal}}%
+ \setcounter{pmdraw@bottomShift}{-\value{pmdraw@bottomTotal}}%
+ \addtocounter{pmdraw@bottomShift}{\value{pmdraw@bottomTotal}}%
+ \else% If drawing a diagram without dots
+ \setcounter{pmdraw@brickShift}{\value{pmdraw@bottomTotal}}% Keep track of size of diagram
+ \fi%
+ \fi%
+ \foreach \x in {1,...,\value{pmdraw@degreeB}} {% For each vertex in row
+ \ifnum\pmdraw@drawNoVertexBa=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexBb=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexBc=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexBd=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexBe=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexBf=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexBg=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexBh=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexBi=\x\else% If not skipping vertex
+ \pmdraw@drawVertex{\x + \value{pmdraw@blankB}}{0}% Draw lower vertex
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \ifnum\pmdraw@drawNoLabelBa=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelBb=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelBc=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelBd=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelBe=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelBf=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelBg=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelBh=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelBi=\x\else% If not skipping label
+ \ifnum\pmdraw@ifLabelsB=1% If drawing labels
+ \pmdraw@drawLabelBottom{\x + \value{pmdraw@blankT}}{0}{\thepmdraw@labelStartB}% Draw label
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \stepcounter{pmdraw@labelStartB}% Update label counter
+ }%
+}
+\newcommand{\pmdraw@drawBrickInit}[1]{% Initialises the drawing of a brick
+ \ifnum\value{pmdraw@ifDiagWDotsFirst}=0% If not drawing first brick in diagram
+ \stepcounter{pmdraw@brickShift}% Makes space for dots to left of current brick
+ \fi%
+ \begin{scope}[shift={(\value{pmdraw@brickShift},0)}]% Shift brick to the right of already drawn bricks
+ \pmdraw@drawBrick#1% Draw brick
+ \end{scope}%
+ \pmdraw@bricksLoop% Restart for loop
+}
+\newcommand{\pmdraw@drawBrick}[4][]{% Draws a brick
+ % #1 Options
+ % #2 Upper non-transversal edges, as list [<options>]{<left vertex>}{<right vertex>}, eg [level=1]{2}{3}
+ % #3 Lower non-transversal edges, as list [<options>]{<left vertex>}{<right vertex>}, eg [level=1]{2}{3}
+ % #4 Transversals, as list [<options>]{<upper vertex>}{<lower vertex>}, eg [level=1]{2}{3}
+ \setkeys{pmdraw@brick}{% Set default values for brick keys
+ degree bottom=\usevalue{degree bottom},
+ degree top=\usevalue{degree top},
+ blank bottom=\usevalue{blank bottom},
+ blank top=\usevalue{blank top},
+ row sep=\usevalue{row sep},
+ no vertex bottom 1=\usevalue{no vertex bottom 1},
+ no vertex bottom 2=\usevalue{no vertex bottom 2},
+ no vertex bottom 3=\usevalue{no vertex bottom 3},
+ no vertex bottom 4=\usevalue{no vertex bottom 4},
+ no vertex bottom 5=\usevalue{no vertex bottom 5},
+ no vertex bottom 6=\usevalue{no vertex bottom 6},
+ no vertex bottom 7=\usevalue{no vertex bottom 7},
+ no vertex bottom 8=\usevalue{no vertex bottom 8},
+ no vertex bottom 9=\usevalue{no vertex bottom 9},
+ no vertex top 1=\usevalue{no vertex top 1},
+ no vertex top 2=\usevalue{no vertex top 2},
+ no vertex top 3=\usevalue{no vertex top 3},
+ no vertex top 4=\usevalue{no vertex top 4},
+ no vertex top 5=\usevalue{no vertex top 5},
+ no vertex top 6=\usevalue{no vertex top 6},
+ no vertex top 7=\usevalue{no vertex top 7},
+ no vertex top 8=\usevalue{no vertex top 8},
+ no vertex top 9=\usevalue{no vertex top 9},
+ labels=\usevalue{labels},
+ labels bottom=\usevalue{labels bottom},
+ labels top=\usevalue{labels top},
+ labels start=\usevalue{labels start},
+ labels bottom start=\usevalue{labels bottom start},
+ labels top start=\usevalue{labels top start},
+ no label bottom 1=\usevalue{no label bottom 1},
+ no label bottom 2=\usevalue{no label bottom 2},
+ no label bottom 3=\usevalue{no label bottom 3},
+ no label bottom 4=\usevalue{no label bottom 4},
+ no label bottom 5=\usevalue{no label bottom 5},
+ no label bottom 6=\usevalue{no label bottom 6},
+ no label bottom 7=\usevalue{no label bottom 7},
+ no label bottom 8=\usevalue{no label bottom 8},
+ no label bottom 9=\usevalue{no label bottom 9},
+ no label top 1=\usevalue{no label top 1},
+ no label top 2=\usevalue{no label top 2},
+ no label top 3=\usevalue{no label top 3},
+ no label top 4=\usevalue{no label top 4},
+ no label top 5=\usevalue{no label top 5},
+ no label top 6=\usevalue{no label top 6},
+ no label top 7=\usevalue{no label top 7},
+ no label top 8=\usevalue{no label top 8},
+ no label top 9=\usevalue{no label top 9},
+ labels bottom draw=\usevalue{labels bottom draw},
+ labels bottom node=\usevalue{labels bottom node},
+ labels top draw=\usevalue{labels top draw},
+ labels top node=\usevalue{labels top node},
+ dots draw=\usevalue{dots draw},
+ dots node=\usevalue{dots node},
+ vertices bottom phantom=\usevalue{vertices bottom phantom},
+ vertices top phantom=\usevalue{vertices top phantom},
+ vertices bottom uncover=\usevalue{vertices bottom uncover},
+ vertices top uncover=\usevalue{vertices top uncover},
+ levels=\usevalue{levels},
+ levels bottom=\usevalue{levels bottom},
+ levels top=\usevalue{levels top},
+ levels sep=\usevalue{levels sep},
+ levels sep bottom=\usevalue{levels sep bottom},
+ levels sep top=\usevalue{levels sep top},
+ edges first=\usevalue{edges first},
+ transversals first=\usevalue{transversals first},
+ edges phantom=\usevalue{edges phantom},
+ edges uncover=\usevalue{edges uncover},
+ brace draw=\usevalue{brace draw},
+ brace node=\usevalue{brace node},
+ decorate before=\usevalue{decorate before},
+ decorate after=\usevalue{decorate after}
+ }%
+ \setkeys{pmdraw@brick}{levels,#1}% Processes options and set default levels
+ \pmdraw@hookBeforeBrick% Hook before drawing brick
+ \ifnum\pmdraw@ifEdgesFirst=0% If drawing vertices first
+ \@ifclassloaded{beamer}{% If in beamer
+ \uncover<\pmdraw@verticesTopUncover>{% Uncovers top vertices
+ \ifnum\value{pmdraw@ifVerticesTop}=0% If drawing top vertices
+ \pmdraw@drawTopVertices% Draw base diagram
+ \else% If hiding top vertices
+ \phantom{%
+ \pmdraw@drawTopVertices% Draw base diagram
+ }%
+ \fi%
+ }%
+ \uncover<\pmdraw@verticesBottomUncover>{% Uncovers bottom vertices
+ \ifnum\value{pmdraw@ifVerticesBottom}=0% If drawing bottom vertices
+ \pmdraw@drawBottomVertices% Draw base diagram
+ \else% If hiding top vertices
+ \phantom{%
+ \pmdraw@drawBottomVertices% Draw base diagram
+ }%
+ \fi%
+ }%
+ \uncover<\pmdraw@edgesUncover>{% Uncovers edges
+ \ifnum\value{pmdraw@ifEdges}=0% If drawing edges
+ \ifnum\pmdraw@ifTedgesFirst=0% If drawing non-transversals first
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \else% If drawing transversal first
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \fi%
+ \else% If hiding edges
+ \phantom{%
+ \ifnum\pmdraw@ifTedgesFirst=0% If drawing non-transversals first
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \else% If drawing transversal first
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \fi%
+ }%
+ \fi%
+ }%
+ }{% If not in beamer
+ \ifnum\value{pmdraw@ifVerticesTop}=0% If drawing top vertices
+ \pmdraw@drawTopVertices% Draw base diagram
+ \else% If hiding top vertices
+ \phantom{%
+ \pmdraw@drawTopVertices% Draw base diagram
+ }%
+ \fi%
+ \ifnum\value{pmdraw@ifVerticesBottom}=0% If drawing bottom vertices
+ \pmdraw@drawBottomVertices% Draw base diagram
+ \else% If hiding top vertices
+ \phantom{%
+ \pmdraw@drawBottomVertices% Draw base diagram
+ }%
+ \fi%
+ \ifnum\value{pmdraw@ifEdges}=0% If drawing edges
+ \ifnum\pmdraw@ifTedgesFirst=0% If drawing non-transversals first
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \else% If drawing transversal first
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \fi%
+ \else% If hiding edges
+ \phantom{%
+ \ifnum\pmdraw@ifTedgesFirst=0% If drawing non-transversals first
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \else% If drawing transversal first
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \fi%
+ }%
+ \fi%
+ }%
+ \else% If drawing edges first
+ \@ifclassloaded{beamer}{% If in beamer
+ \uncover<\pmdraw@edgesUncover>{% Uncovers edges
+ \ifnum\value{pmdraw@ifEdges}=0% If drawing edges
+ \ifnum\pmdraw@ifTedgesFirst=0% If drawing non-transversals first
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \else% If drawing transversal first
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \fi%
+ \else% If hiding edges
+ \phantom{%
+ \ifnum\pmdraw@ifTedgesFirst=0% If drawing non-transversals first
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \else% If drawing transversal first
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \fi%
+ }%
+ \fi%
+ }%
+ \uncover<\pmdraw@verticesTopUncover>{% Uncovers top vertices
+ \ifnum\value{pmdraw@ifVerticesTop}=0% If drawing top vertices
+ \pmdraw@drawTopVertices% Draw base diagram
+ \else% If hiding top vertices
+ \phantom{%
+ \pmdraw@drawTopVertices% Draw base diagram
+ }%
+ \fi%
+ }%
+ \uncover<\pmdraw@verticesBottomUncover>{% Uncovers bottm vertices
+ \ifnum\value{pmdraw@ifVerticesBottom}=0% If drawing bottom vertices
+ \pmdraw@drawBottomVertices% Draw base diagram
+ \else% If hiding top vertices
+ \phantom{%
+ \pmdraw@drawBottomVertices% Draw base diagram
+ }%
+ \fi%
+ }%
+ }{% If not in beamer
+ \ifnum\value{pmdraw@ifEdges}=0% If drawing edges
+ \ifnum\pmdraw@ifTedgesFirst=0% If drawing non-transversals first
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \else% If drawing transversal first
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \fi%
+ \else% If hiding edges
+ \phantom{%
+ \ifnum\pmdraw@ifTedgesFirst=0% If drawing non-transversals first
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \else% If drawing transversal first
+ \pmdraw@TedgesLoop% Draws transversals
+ #4%
+ \pmdEmpty%
+ \pmdraw@UedgesLoop% Draws upper edges
+ #2%
+ \pmdEmpty%
+ \pmdraw@LedgesLoop% Draws lower edges
+ #3%
+ \pmdEmpty%
+ \fi%
+ }%
+ \fi%
+ \ifnum\value{pmdraw@ifVerticesTop}=0% If drawing top vertices
+ \pmdraw@drawTopVertices% Draw base diagram
+ \else% If hiding top vertices
+ \phantom{%
+ \pmdraw@drawTopVertices% Draw base diagram
+ }%
+ \fi%
+ \ifnum\value{pmdraw@ifVerticesBottom}=0% If drawing bottom vertices
+ \pmdraw@drawBottomVertices% Draw base diagram
+ \else% If hiding top vertices
+ \phantom{%
+ \pmdraw@drawBottomVertices% Draw base diagram
+ }%
+ \fi%
+ }%
+ \fi%
+ \pmdraw@hookAfterBrick% Hook after drawing brick
+ % Resets user keys and other flags to default values
+ \renewcommand{\pmdraw@drawBraceDrawOptions}{}%
+ \renewcommand{\pmdraw@drawBraceNodeOptions}{}%
+ \renewcommand{\pmdraw@drawDotsDrawOptions}{}%
+ \renewcommand{\pmdraw@drawDotsNodeOptions}{}%
+ \renewcommand{\pmdraw@drawLabelBDrawOptions}{}%
+ \renewcommand{\pmdraw@drawLabelBNodeOptions}{}%
+ \renewcommand{\pmdraw@drawLabelTDrawOptions}{}%
+ \renewcommand{\pmdraw@drawLabelTNodeOptions}{}%
+ \renewcommand{\pmdraw@drawLedgesDrawOptions}{}%
+ \renewcommand{\pmdraw@drawNoLabelBa}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelBb}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelBc}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelBd}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelBe}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelBf}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelBg}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelBh}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelBi}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTa}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTb}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTc}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTd}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTe}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTf}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTg}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTh}{-1}%
+ \renewcommand{\pmdraw@drawNoLabelTi}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBa}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBb}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBc}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBd}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBe}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBf}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBg}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBh}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexBi}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTa}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTb}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTc}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTd}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTe}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTf}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTg}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTh}{-1}%
+ \renewcommand{\pmdraw@drawNoVertexTi}{-1}%
+ \renewcommand{\pmdraw@drawTedgesDrawOptions}{}%
+ \renewcommand{\pmdraw@drawUedgesDrawOptions}{}%
+ \renewcommand{\pmdraw@drawVertexOptions}{}%
+ \renewcommand{\pmdraw@hookBeforeBrick}{}%
+ \renewcommand{\pmdraw@hookAfterBrick}{}%
+ \renewcommand{\pmdraw@ifEdgesFirst}{0}%
+ \renewcommand{\pmdraw@ifLabelsB}{0}%
+ \renewcommand{\pmdraw@ifLabelsT}{0}%
+ \renewcommand{\pmdraw@ifTedgesFirst}{0}%
+ \renewcommand{\pmdraw@edgesUncover}{1-}%
+ \renewcommand{\pmdraw@verticesBottomUncover}{1-}%
+ \renewcommand{\pmdraw@verticesTopUncover}{1-}%
+ \let\pmdraw@drawLabelBottom\pmdraw@drawLabelBottomDefault%
+ \let\pmdraw@drawLabelTop\pmdraw@drawLabelTopDefault%
+ \let\pmdraw@drawLabelBottom\pmdraw@drawLabelBottomDefault%
+ \let\pmdraw@drawVertex\pmdraw@drawVertexDefault%
+ \setcounter{pmdraw@blankB}{0}%
+ \setcounter{pmdraw@blankT}{0}%
+ \setcounter{pmdraw@labelStartB}{1}%
+ \setcounter{pmdraw@labelStartT}{1}%
+ \setcounter{pmdraw@ifEdges}{0}%
+ \setcounter{pmdraw@ifVerticesBottom}{0}%
+ \setcounter{pmdraw@ifVerticesTop}{0}%
+}
+\newcommand{\pmdraw@drawLedges}[3][]{% Draws lower non-transversal edge, #1 options, #2 L vertex, #3 R vertex
+ \setcounter{pmdraw@NTlevel}{1}% Store default level of edge
+ \setkeys{pmdraw@NTedges}{% Sets default non-transversal edge keys
+ level=\usevalue{level},
+ height=\usevalue{height},
+ edge draw=\usevalue{edge draw},
+ phantom=\usevalue{phantom},
+ uncover=\usevalue{uncover}
+ }%
+ \setkeys{pmdraw@NTedges}{#1}% Processes options
+ \ifdim\pmdraw@NTedgesHeight pt=-1000pt% If using default heights
+ \tikzmath{%
+ \pmdraw{edgeHeight}=\value{pmdraw@NTlevel}*\pmdraw{edgeSepL};% Calculates height based on level of edge
+ }%
+ \else% If using manual heights
+ \tikzmath{%
+ \pmdraw{edgeHeight}=\pmdraw@NTedgesHeight;% Set manual height
+ }%
+ \fi%
+ \@ifclassloaded{beamer}{% If in beamer
+ \uncover<\pmdraw@edgeUncover>{% Uncovers edge
+ \ifnum\value{pmdraw@ifEdge}=0% If drawing edge
+ \pmdraw@drawLedgesDraw{#2}{#3}% Draw edge
+ \else% If hiding edge
+ \phantom{%
+ \pmdraw@drawLedgesDraw{#2}{#3}% Draw edge
+ }%
+ \fi%
+ }%
+ }{% If not in beamer
+ \ifnum\value{pmdraw@ifEdge}=0% If drawing edge
+ \pmdraw@drawLedgesDraw{#2}{#3}% Draw edge
+ \else% If hiding edge
+ \phantom{%
+ \pmdraw@drawLedgesDraw{#2}{#3}% Draw edge
+ }%
+ \fi%
+ }%
+ % Resets user keys and other flags to default values
+ \renewcommand{\pmdraw@NTedgesHeight}{-1000}%
+ \renewcommand{\pmdraw@edgeUncover}{1-}%
+ \setcounter{pmdraw@ifEdge}{0}%
+ \let\pmdraw@drawLedgesDraw\pmdraw@drawLedgesDrawDefault%
+ \pmdraw@LedgesLoop% Restart for loop
+}
+\newcommand{\pmdraw@drawTedges}[3][]{% Draws transversal edge, #1 options, #2 upper vertex, #3 lower vertex
+ \setkeys{pmdraw@Tedges}{% Sets default key values for transversal edges
+ edge draw=\usevalue{edge draw},
+ phantom=\usevalue{phantom},
+ uncover=\usevalue{uncover}
+ }%
+ \setkeys{pmdraw@Tedges}{#1}% Processes options
+ \@ifclassloaded{beamer}{% If in beamer
+ \uncover<\pmdraw@edgeUncover>{% Uncovers edge
+ \ifnum\value{pmdraw@ifEdge}=0% If drawing edge
+ \pmdraw@drawTedgesDraw{#2}{#3}% Draw edge
+ \else% If hiding edge
+ \phantom{%
+ \pmdraw@drawTedgesDraw{#2}{#3}% Draw edge
+ }%
+ \fi%
+ }%
+ }{% If not in beamer
+ \ifnum\value{pmdraw@ifEdge}=0% If drawing edge
+ \pmdraw@drawTedgesDraw{#2}{#3}% Draw edge
+ \else% If hiding edge
+ \phantom{%
+ \pmdraw@drawTedgesDraw{#2}{#3}% Draw edge
+ }%
+ \fi%
+ }%
+ % Resets user keys and other flags to default values
+ \renewcommand{\pmdraw@edgeUncover}{1-}%
+ \setcounter{pmdraw@ifEdge}{0}%
+ \let\pmdraw@drawTedgesDraw\pmdraw@drawTedgesDrawDefault%
+ \pmdraw@TedgesLoop% Restart for loop
+}
+\newcommand{\pmdraw@drawTopVertices}{% Draws top row of vertices
+ \setcounter{pmdraw@topTotal}{\value{pmdraw@blankT}}% Store size of top row of vertices
+ \addtocounter{pmdraw@topTotal}{\value{pmdraw@degreeT}}% Store size of top row of vertices
+ \foreach \x in {1,...,\value{pmdraw@degreeT}} {% For each vertex in row
+ \ifnum\pmdraw@drawNoVertexTa=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexTb=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexTc=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexTd=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexTe=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexTf=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexTg=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexTh=\x\else% If not skipping vertex
+ \ifnum\pmdraw@drawNoVertexTi=\x\else% If not skipping vertex
+ \pmdraw@drawVertex{\x + \value{pmdraw@blankT}}{\pmdraw@rowSep}% Draw upper vertex
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \ifnum\pmdraw@drawNoLabelTa=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelTb=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelTc=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelTd=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelTe=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelTf=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelTg=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelTh=\x\else% If not skipping label
+ \ifnum\pmdraw@drawNoLabelTi=\x\else% If not skipping label
+ \ifnum\pmdraw@ifLabelsT=1% If drawing labels
+ \pmdraw@drawLabelTop{\x + \value{pmdraw@blankT}}{\pmdraw@rowSep}{\thepmdraw@labelStartT}% Draw label
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \stepcounter{pmdraw@labelStartT}% Update label counter
+ }%
+}
+\newcommand{\pmdraw@drawUedges}[3][]{% Draws upper non-transversal edge, #1 options, #2 L vertex, #3 R vertex
+ \setcounter{pmdraw@NTlevel}{1}% Store default level of edge
+ \setkeys{pmdraw@NTedges}{% Sets default non-transversal edge keys
+ level=\usevalue{level},
+ height=\usevalue{height},
+ edge draw=\usevalue{edge draw},
+ phantom=\usevalue{phantom},
+ uncover=\usevalue{uncover}
+ }%
+ \setkeys{pmdraw@NTedges}{#1}% Processes options
+ \ifdim\pmdraw@NTedgesHeight pt=-1000pt% If using default heights
+ \tikzmath{%
+ \pmdraw{edgeHeight}=\value{pmdraw@NTlevel}*\pmdraw{edgeSepU};% Calculates height based on level of edge
+ }%
+ \else% If using manual heights
+ \tikzmath{%
+ \pmdraw{edgeHeight}=\pmdraw@rowSep-\pmdraw@NTedgesHeight;% Set manual height
+ }%
+ \fi%
+ \@ifclassloaded{beamer}{% If in beamer
+ \uncover<\pmdraw@edgeUncover>{% Uncovers edge
+ \ifnum\value{pmdraw@ifEdge}=0% If drawing edge
+ \pmdraw@drawUedgesDraw{#2}{#3}% Draw edge
+ \else% If hiding edge
+ \phantom{%
+ \pmdraw@drawUedgesDraw{#2}{#3}% Draw edge
+ }%
+ \fi%
+ }%
+ }{% If not in beamer
+ \ifnum\value{pmdraw@ifEdge}=0% If drawing edge
+ \pmdraw@drawUedgesDraw{#2}{#3}% Draw edge
+ \else% If hiding edge
+ \phantom{%
+ \pmdraw@drawUedgesDraw{#2}{#3}% Draw edge
+ }%
+ \fi%
+ }%
+ % Resets user keys and other flags to default values
+ \renewcommand{\pmdraw@NTedgesHeight}{-1000}%
+ \renewcommand{\pmdraw@edgeUncover}{1-}%
+ \setcounter{pmdraw@ifEdge}{0}%
+ \let\pmdraw@drawLedgesDraw\pmdraw@drawLedgesDrawDefault%
+ \let\pmdraw@drawUedgesDraw\pmdraw@drawUedgesDrawDefault%
+ \pmdraw@UedgesLoop% Restart for loop
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% Grid creation %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% This is a verbatim copy of:
+% https://tex.stackexchange.com/a/467908
+
+\newif\if@showgrid@grid
+\newif\if@showgrid@left
+\newif\if@showgrid@right
+\newif\if@showgrid@below
+\newif\if@showgrid@above
+\tikzset{%
+ every show grid/.style={},
+ show grid/.style={execute at end picture={\@showgrid{grid=true,#1}}},%
+ show grid/.default={true},
+ show grid/.cd,
+ labels/.style={font={\sffamily\small},help lines},
+ xlabels/.style={},
+ ylabels/.style={},
+ keep bb/.code={\useasboundingbox (current bounding box.south west) rectangle (current bounding box.north west);},
+ true/.style={left,below},
+ false/.style={left=false,right=false,above=false,below=false,grid=false},
+ none/.style={left=false,right=false,above=false,below=false},
+ all/.style={left=true,right=true,above=true,below=true},
+ grid/.is if=@showgrid@grid,
+ left/.is if=@showgrid@left,
+ right/.is if=@showgrid@right,
+ below/.is if=@showgrid@below,
+ above/.is if=@showgrid@above,
+ false,
+}
+
+\def\@showgrid#1{%
+ \begin{scope}[every show grid,show grid/.cd,#1]
+ \if@showgrid@grid
+ \begin{pgfonlayer}{background}
+ \draw [help lines]
+ (current bounding box.south west) grid
+ (current bounding box.north east);
+%
+ \pgfpointxy{1}{1}%
+ \edef\xs{\the\pgf@x}%
+ \edef\ys{\the\pgf@y}%
+ \pgfpointanchor{current bounding box}{south west}
+ \edef\xa{\the\pgf@x}%
+ \edef\ya{\the\pgf@y}%
+ \pgfpointanchor{current bounding box}{north east}
+ \edef\xb{\the\pgf@x}%
+ \edef\yb{\the\pgf@y}%
+ \pgfmathtruncatemacro\xbeg{ceil(\xa/\xs)}
+ \pgfmathtruncatemacro\xend{floor(\xb/\xs)}
+ \if@showgrid@below
+ \foreach \X in {\xbeg,...,\xend} {
+ \node [below,show grid/labels,show grid/xlabels] at (\X,\ya) {\X};
+ }
+ \fi
+ \if@showgrid@above
+ \foreach \X in {\xbeg,...,\xend} {
+ \node [above,show grid/labels,show grid/xlabels] at (\X,\yb) {\X};
+ }
+ \fi
+ \pgfmathtruncatemacro\ybeg{ceil(\ya/\ys)}
+ \pgfmathtruncatemacro\yend{floor(\yb/\ys)}
+ \if@showgrid@left
+ \foreach \Y in {\ybeg,...,\yend} {
+ \node [left,show grid/labels,show grid/ylabels] at (\xa,\Y) {\Y};
+ }
+ \fi
+ \if@showgrid@right
+ \foreach \Y in {\ybeg,...,\yend} {
+ \node [right,show grid/labels,show grid/ylabels] at (\xb,\Y) {\Y};
+ }
+ \fi
+ \end{pgfonlayer}
+ \fi
+ \end{scope}
+}
+\tikzset{every show grid/.style={show grid/keep bb}}% Keep the original bounding box!
+
+\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/pmdraw/pmdraw.tex b/graphics/pgf/contrib/pmdraw/pmdraw.tex
new file mode 100644
index 0000000000..03ffc279e7
--- /dev/null
+++ b/graphics/pgf/contrib/pmdraw/pmdraw.tex
@@ -0,0 +1,4030 @@
+\documentclass{ltxdoc}
+
+% *------------------------------*
+% |8````````````````````````````2|
+% |`````____````____`````````````|
+% |````|MFMF\ /MFMF|````````````|
+% |````|MF|MF\/MF|MF|````````````|
+% |````|MF|\MFMF/|MF|_______`````|
+% |````|MF|``````|MFMFMFMFMF|````|
+% |````|MF|``````|MF|````````````|
+% |````|MF|``````|MF|___`````````|
+% |``````````````|MFMFMF|````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |``````````````|MF|````````````|
+% |3````````````````````````````5|
+% *------------------------------*
+
+\usepackage{pmdraw}
+\usepackage{xcolor}
+\usepackage{fancyvrb}
+\usepackage{hyperref}
+
+\begin{document}
+
+\hypersetup{colorlinks, linkcolor=blue, urlcolor=blue}
+
+\title{The \textsf{pmdraw} package\thanks{This document
+ corresponds to \textsf{pmdraw}~v1.7, 2025-01-28.}}
+\author{Matthias Fresacher \\ \texttt{matthias.ypg37@slmail.me}}
+
+\maketitle
+
+\begin{abstract}
+The \texttt{pmdraw} package allows you to draw elements of the diagram monoids, commonly referred to as diagrams. The package provides a lot of flexibility to draw most diagrams and can be customised as needed.
+\end{abstract}
+
+\tableofcontents
+
+\newpage
+\section{Introduction}
+
+\subsection{Motivation}
+
+Diagram monoids and their closely related algebras are well studied objects with applications in theoretical physics and representation theory in mathematics. The elements of these monoids are called diagrams because they can be drawn graphically as a graph following certain conventions.
+
+My PhD thesis examines properties of these diagram monoids and hence I needed to draw a large number of diagrams in a neat and consistent way. This thesis work formed the basis of this package with only customisability and the manual needed to be added to complete this package.
+
+\subsection{Acknowledgments}
+
+Most importantly, I thank James East, my PhD supervisor for allowing me to get a little sidetracked in my PhD research and develop and publish this package rather than work on my thesis like I should have.
+
+This package has at its core the basic drawing macro of a diagram as used by James East and Nik Ru\v{s}kuc in their 2022 publication {\it Classification of congruences of twisted partition monoids} in Advances in Mathematics. I thank them both for allowing me to build on their work.
+
+I thank everybody that has helped me proof read, spot bugs, provide feedback, suggest improvements or has otherwise contributed to this package. Those that are happy to be named are (in chronological order):
+\begin{itemize}
+ \item Nik Ru\v{s}kuc
+ \item Luka Carroll
+\end{itemize}
+
+This package heavily uses commands that can accept an arbitrary number of arguments as inputs. I thank \texttt{egreg} for their template upon which my commands are based (\url{https://tex.stackexchange.com/a/72915}).
+
+As this was my first time using keys, I thank David Carlisle for their very helpful example (\url{https://tex.stackexchange.com/a/542555}).
+
+As it turns out, passing my keys to the \verb`\draw` command of \texttt{tikz} is a little more tricky than one might expect. I thank Andrew Stacey for their solution (\url{https://tex.stackexchange.com/a/64237}).
+
+I thank Partha~D.~for their ready to use out of the box macro for adding grid lines to a \texttt{tikz} drawing (\url{https://tex.stackexchange.com/a/467908}).
+
+I also thank everybody on \url{https://tex.stackexchange.com} who has answered a questions or solved a problem. There are too many to list you all. Thank you.
+
+\section{Bugs and known problems}
+
+\subsection{Bugs}
+
+If you discover a bug, please be so kind and send me a minimum working example of the bug in action and I will work on fixing it.
+
+I would like this package to be as perfect as it can be but I will need your help with this as there simply are too many keys to test every combination or use case.
+
+The following are a list of currently known bugs that will be addressed:
+\begin{enumerate}
+ \item When the radius of the arc for non-transversal edges is too large compared to the distance between the two nodes, the arcs overlap. The current solution is to manually specify a \texttt{level} or \texttt{height} that makes the arcs smaller.
+ \item Baseline adjustments are hard coded so when changing \texttt{scale}, \texttt{row sep} or text size, for example, the vertical position of diagrams is likely to be incorrect. The current solution is to manually adjust the \texttt{baseline} within the \texttt{tikz} key.
+ \item In a product diagram, if \texttt{row sep} is used in the bottom diagram, the spacing between diagrams is incorrect.
+\end{enumerate}
+
+\subsection{Incompatibilities}
+
+The following are a list of known problems or incompatibilities that are not scheduled to be resolved anytime soon:
+\begin{enumerate}
+ \item Whilst not strictly an incompatibility, when using \texttt{beamer}, frames have to be \texttt{fragile}.
+\end{enumerate}
+
+\section{Usage}
+
+To use the package, one must understand that all diagrams are created from a basic building block called a brick.
+
+\subsection{Bricks}
+
+\DescribeMacro{brick}
+A \texttt{brick} is a diagram that contains no dots. For example,
+\begin{center}
+ \pmdBrick[ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+ }{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+ }{ % Transversal edges
+ {1}{1}
+ {3}{4}
+ }
+\end{center}
+is a brick whilst
+\begin{center}
+ \pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+ }
+\end{center}
+is not a brick.
+\DescribeMacro{<brick>}
+The syntax for a brick contains four components and is as follows:
+\begin{center}
+ \texttt{<brick>~=~[<options>]\{<Uedges>\}\{<Ledges>\}\{<Tedges>\}}
+\end{center}
+where
+\DescribeMacro{brick/<options>}
+the \texttt{<options>} are described in Section~\ref{sec: brick/options}.
+
+\DescribeMacro{<Uedges>}
+is a list of upper non-transversal edges. An upper non-transversal edges has three components \texttt{<Uedges>~=~[<options>]\{<Svertex>\}\{<Tvertex>\}} where
+\DescribeMacro{Uedges/<options>}\DescribeMacro{Ledges/<options>}
+the \texttt{<options>} are described in Section~\ref{sec: NT edge/options},
+\DescribeMacro{<Svertex>}
+\texttt{\{<Svertex>\}} is the starting vertex and
+\DescribeMacro{<Tvertex>}
+\texttt{\{<Tvertex>\}} is the terminating vertex of the edge. Both \texttt{\{<Svertex>\}} and \texttt{\{<Tvertex>\}} are a \( x \)-coordinate and it is assumed that \( \texttt{\{<Svertex>\}} < \texttt{\{<Tvertex>\}} \).
+
+\DescribeMacro{list}
+A \texttt{list} of upper non-transversal edges is simply each upper non-transversal edge written after the other. For example a list with one upper non-transversal edges is
+\begin{verbatim}
+ {1}{2}
+\end{verbatim}
+whilst one with three upper non-transversal edges may be
+\begin{verbatim}
+ {1}{2}[level=1]{3}{4}{5}{6}
+\end{verbatim}
+For ease of reading this will coded as
+\begin{verbatim}
+ {1}{2}
+ [level=1]{3}{4}
+ {5}{6}
+\end{verbatim}
+\DescribeMacro{\pmdEmpty}
+Should a list be empty, the command \verb`\pmdEmpty` should be used.
+
+\DescribeMacro{<Ledges>}
+is a list of lower non-transversal edges. A lower non-transversal edges has the same three components as an upper non-transversal edge, namely \texttt{<Ledges>~=~[<options>]\{<Svertex>\}\{<Tvertex>\}}.
+
+\DescribeMacro{<Tedges>}
+is a list of transversal edges. A transversal edges has three components \texttt{<Tedges>~=~[<options>]\{<Tvertex>\}\{<Bvertex>\}} where
+\DescribeMacro{Tedges/<options>}
+the \texttt{<options>} are described in Section~\ref{sec: T edge/options},
+\DescribeMacro{<Tvertex>}
+\texttt{\{<Tvertex>\}} is the top vertex and
+\DescribeMacro{<Bvertex>}
+\texttt{\{<Bvertex>\}} is the bottom vertex of the edge. Both \texttt{\{<Tvertex>\}} and \texttt{\{<Bvertex>\}} are a \( x \)-coordinate.
+
+An example \texttt{<brick>} and the resultant diagram is:
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+ {4}{5}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+ {4}{5}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\subsection{Draw commands}
+
+This package has three draw commands.
+
+\DescribeMacro{\pmdBrick}
+draws a brick and has the syntax \verb`\pmdBrick<brick>`.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+ {4}{5}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+ {4}{5}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{\pmdDiagram}
+draws arbitrarily many bricks separated by dots and has the syntax
+\begin{verbatim}
+\pmdDiagram[<options>]{<bricks>}
+\end{verbatim}
+where
+\DescribeMacro{diagram/<options>}
+the \texttt{<options>} are described in Section~\ref{sec: diagram/options} and
+\DescribeMacro{<bricks>}
+\texttt{<bricks>} is a list of \texttt{<brick>}-s, with each brick enclosed in curly brackets.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+It should be noted that \verb`\pmdBrick` is simply a wrapper for a single brick that calls \verb`\pmdDiagram` with no diagram options. This means that, for example, the \texttt{grid} key is not available for \verb`\pmdBrick` and \verb`\pmdDiagram` must be used instead to access the \texttt{grid} key.
+
+For edges that go across multiple bricks, know that the coordinate positions of the vertices extends infinitely in both directions. If using default settings, the dots between bricks occupies one vertex position. To help with counting and identifying the correct coordinate position, the \texttt{grid} flag may also be used, see Section~\ref{sec: diagram/options all}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=3,
+ brace={
+ left=2,
+ right=6,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{6}
+ {3}{5}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{-1}
+ {2}{-2}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=3,
+ brace={
+ left=2,
+ right=6,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{6}
+ {3}{5}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{-1}
+ {2}{-2}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{\pmdProduct}
+draws two diagrams on top of each other as is the case during multiplication or concatenation and has the syntax
+\begin{verbatim}
+\pmdProduct[<options>]{<Aedges>}{<Tbricks>}{<Bbricks>}
+\end{verbatim}
+where
+\DescribeMacro{diagram/<options>}
+the \texttt{<options>} are described in Section~\ref{sec: diagram/options}.
+
+\DescribeMacro{<Aedges>}
+is a list of edges that are added during the concatenation process. An added edge has two components, namely \texttt{<Aedges>~=~\{<Svertex>\}\{<Tvertex>\}}, where \texttt{\{<Svertex>\}} is the starting vertex and \texttt{\{<Tvertex>\}} is the terminating vertex of the collection of added edges. Both \texttt{\{<Svertex>\}} and \texttt{\{<Tvertex>\}} are a \( x \)-coordinate and it is assumed that \( \texttt{\{<Svertex>\}} < \texttt{\{<Tvertex>\}} \).
+
+\DescribeMacro{<Tbricks>}
+is a list of bricks that correspond to the top diagram, with each brick enclosed in curly brackets.
+
+\DescribeMacro{<Bbricks>}
+is a list of bricks that correspond to the bottom diagram, with each brick enclosed in curly brackets.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProduct{ % Added edges
+ {1}{5}
+ {7}{8}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProduct{ % Added edges
+ {1}{5}
+ {7}{8}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{\pmdProductTriple}
+draws three diagrams on top of each other as is the case during multiplication or concatenation of three diagrams and has the syntax
+\begin{verbatim}
+\pmdProductTriple[<options>]{<ATedges>}{<ABedges>}{<Tbricks>}}{<Mbricks>}{<Bbricks>}
+\end{verbatim}
+where
+\DescribeMacro{diagram/<options>}
+the \texttt{<options>} are described in Section~\ref{sec: diagram/options}.
+
+\DescribeMacro{<ATedges>}\DescribeMacro{<ABedges>}
+is a list of edges that are added during the concatenation process. \texttt{<ATedges>} is the list of edges between the top and middle diagrams, whilst \texttt{<ABedges>} is the list of edges between the middle and bottom diagrams. An added edge has two components, namely \texttt{<ATedges>~=~\{<Svertex>\}\{<Tvertex>\}} and \texttt{<ABedges>~=~\{<Svertex>\}\{<Tvertex>\}}, where \texttt{\{<Svertex>\}} is the starting vertex and \texttt{\{<Tvertex>\}} is the terminating vertex of the collection of added edges. Both \texttt{\{<Svertex>\}} and \texttt{\{<Tvertex>\}} are a \( x \)-coordinate and it is assumed that \( \texttt{\{<Svertex>\}} < \texttt{\{<Tvertex>\}} \).
+
+\DescribeMacro{<Tbricks>}
+is a list of bricks that correspond to the top diagram, with each brick enclosed in curly brackets.
+
+\DescribeMacro{<Mbricks>}
+is a list of bricks that correspond to the top diagram, with each brick enclosed in curly brackets.
+
+\DescribeMacro{<Bbricks>}
+is a list of bricks that correspond to the bottom diagram, with each brick enclosed in curly brackets.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProductTriple{ % Top added edges
+ {1}{5}
+ {7}{8}
+}{ % Bottom added edges
+ {1}{5}
+ {7}{8}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }
+}{ % Middle diagram
+ % Continued on next page ...
+\end{verbatim}
+ \end{minipage}
+ \end{minipage}
+\end{center}
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+ % ... continued from previous page (note repeated line)
+}{ % Middle diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{3}
+ {3}{2}
+ {4}{5}
+ {5}{4}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{1}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProductTriple{ % Top added edges
+ {1}{5}
+ {7}{8}
+}{ % Bottom added edges
+ {1}{5}
+ {7}{8}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }
+}{ % Middle diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{3}
+ {3}{2}
+ {4}{5}
+ {5}{4}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{1}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {1}{2}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{center}
+
+\section{Options}
+
+\subsection{Brick options} \label{sec: brick/options}
+
+The following are all of the keys that are available for bricks.
+
+\subsubsection{Vertex options}
+
+\DescribeMacro{degree}
+specifies the degree, that is, the number of vertices in the top and bottom row of the diagram. Must be a positive integer and must be provided unless using \texttt{degree top} and \texttt{degree bottom}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{degree top} \DescribeMacro{degree bottom}
+specifies the degree, that is, the number of vertices in the top (bottom) row of the diagram. Must be a positive integer and must be provided as a pair \texttt{degree top} and \texttt{degree bottom}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree top=5,
+ degree bottom=4
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree top=5,
+ degree bottom=4
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{blank top} \DescribeMacro{blank bottom}
+specifies the number of blank vertices to the left of the top (bottom) row of the diagram. Default is zero.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ blank top=1,
+ degree top=4,
+ degree bottom=5
+]{ % Upper non-transversal edges
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ blank top=1,
+ degree top=4,
+ degree bottom=5
+]{ % Upper non-transversal edges
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+It should also be noted that the \texttt{blank top} and \texttt{blank bottom} can also be used to create more space between bricks and the dots between bricks by setting a large number. Likewise if set to \( -1 \) and the dots is redefined to not draw, the space between bricks can be removed altogether. See Examples~13-15.
+
+\DescribeMacro{row sep}
+specifies the vertical separation between rows of vertices. Default is two. If using edge options such as \texttt{levels}, \texttt{row sep} must be given before \texttt{levels}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ row sep=4
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ row sep=4
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{vertices}
+passes through options to the \verb`\draw` command of vertices. The default is no argument.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ vertices=blue
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ vertices=blue
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{no vertex bottom 1}
+\DescribeMacro{ \vdots}
+\DescribeMacro{no vertex bottom 9}
+\DescribeMacro{no vertex top 1}
+\DescribeMacro{ \vdots}
+\DescribeMacro{no vertex top 9}
+specifies a vertex that is not drawn. Any of the nine available keys can be used in any order. It can be used to draw single vertices that are different to the others. If more than nine vertices need to be excluded, simply draw multiple bricks next to each other. The default is -1.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ no vertex top 1=2,
+ no vertex top 2=3,
+ no vertex bottom 1=4,
+ decorate after={
+ \fill[red] (4,0) circle (.1);
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdBrick[ % Options
+ degree=5,
+ no vertex top 1=2,
+ no vertex top 2=3,
+ no vertex bottom 1=4,
+ decorate after={
+ \fill[red] (4,0) circle (.1);
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{center}
+
+\DescribeMacro{vertices options}
+allows for the redefinition of the command that draws the vertices. It has two arguments, the \( x \) and \( y \)-position of the vertex. The default is
+\begin{verbatim}
+\fill[apply style/.expand once=\pmdraw@drawVertexOptions] (#1,#2) circle (.17);
+\end{verbatim}
+An example use is
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ vertices options={
+ \draw[very thick] (#1,#2) circle (.25);
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdBrick[ % Options
+ degree=5,
+ vertices options={
+ \draw[very thick] (#1,#2) circle (.25);
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{center}
+
+\DescribeMacro{labels}\DescribeMacro{labels top}\DescribeMacro{labels bottom}
+flags that allow for the drawing of labels for the vertices. Use \texttt{labels} for labels on both the top and bottom or set individually. The default is no labels.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ labels bottom
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ labels bottom
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{labels start}\DescribeMacro{labels top start}\DescribeMacro{labels bottom start}
+sets the starting value of the labels for the vertices. The default is one.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ labels,
+ labels top start=3,
+ labels bottom start=-2
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ labels,
+ labels top start=3,
+ labels bottom start=-2
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{no labels bottom 1}
+\DescribeMacro{ \vdots}
+\DescribeMacro{no labels bottom 9}
+\DescribeMacro{no labels top 1}
+\DescribeMacro{ \vdots}
+\DescribeMacro{no labels top 9}
+specifies a vertex for which no label is drawn. Any of the nine available keys can be used in any order. It can be used to insert single unique labels that are different to the others. If more than nine labels need to be excluded, simply draw multiple bricks next to each other. The default is -1.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ labels,
+ no label top 1=2,
+ no label top 2=3,
+ no label bottom 1=4,
+ decorate after={
+ \draw (3,2) node[above=6pt,red] {\(x\)};
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdBrick[ % Options
+ degree=5,
+ labels,
+ no label top 1=2,
+ no label top 2=3,
+ no label bottom 1=4,
+ decorate after={
+ \draw (3,2) node[above=6pt,red] {\(x\)};
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{center}
+
+\DescribeMacro{labels top draw}\DescribeMacro{labels top node}\DescribeMacro{labels bottom draw}\DescribeMacro{labels bottom node}
+passes through options to the \verb`\draw` and \verb`node` command of the labels of vertices. The default is no argument.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ labels,
+ labels top node=red,
+ labels bottom node={right=2pt}
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdBrick[ % Options
+ degree=5,
+ labels,
+ labels top node=red,
+ labels bottom node={right=2pt}
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{center}
+
+\DescribeMacro{labels top options}\DescribeMacro{labels bottom options}
+allows for the redefinition of the command that draws the labels of the vertices. They have three arguments, the \( x \) and \( y \)-position of the vertex and the label value. The default for the top is
+\begin{verbatim}
+\draw[apply style/.expand once=\pmdraw@drawLabelTDrawOptions] (#1,#2)
+ node[above=6pt,apply style/.expand once=\pmdraw@drawLabelTNodeOptions] {\(#3\)};
+\end{verbatim}
+and for the bottom
+\begin{verbatim}
+\draw[apply style/.expand once=\pmdraw@drawLabelBDrawOptions] (#1,#2)
+ node[below=6pt,apply style/.expand once=\pmdraw@drawLabelBNodeOptions] {\(#3'\)};
+\end{verbatim}
+An example use is
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ labels,
+ labels bottom options={
+ \draw (#1,#2) node[below=6pt,blue] {\(#3''\)};
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdBrick[ % Options
+ degree=5,
+ labels,
+ labels bottom options={
+ \draw (#1,#2) node[below=6pt,blue] {\(#3''\)};
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{center}
+
+\DescribeMacro{no dots}
+The \texttt{no dots} flag removes the drawing of dots to the left of the current brick in diagrams. Default is to draw dots except for the first brick.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1,
+ no dots
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1,
+ % no dots
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+
+\DescribeMacro{dots draw}\DescribeMacro{dots node}
+passes through options to the \verb`\draw` and \verb`node` command of the dots. The default is no argument.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1,
+ dots node=red
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1,
+ dots node=red
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{vertices top phantom}\DescribeMacro{vertices bottom phantom}
+These flags allow for all of the top or bottom vertices to be hidden using the \texttt{phantom} command. Simply wraps the vertex drawing macros with a \texttt{phantom} command. This hiding will also apply to the labels of that row (top or bottom) of vertices. To only hide a selected number of vertices, use seperate bricks. The default is false.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ vertices top phantom,
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ vertices top phantom
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{vertices top uncover}\DescribeMacro{vertices bottom uncover}
+allows for all of the top or bottom vertices to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the vertex drawing macros. This uncover will also apply to the labels of that row (top or bottom) of vertices. To only uncover a selected number of vertices, use seperate bricks. The default is~\texttt{1-}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ vertices top uncover={2,4-7,9-},
+ vertices bottom uncover={3-}
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ vertices top uncover={2,4-7,9-},
+ vertices bottom uncover={3-}
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+
+\subsubsection{Edge options}
+
+These options should be read in conjunction with Section~\ref{sec: edge/options}.
+
+\DescribeMacro{levels}
+specifies how many horizontal levels there are for non-transversal edges. Default is one.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ levels=3
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ levels=3
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{levels top} \DescribeMacro{levels bottom}
+specifies how many horizontal levels there are for upper (lower) non-transversal edges. Default is one.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ levels top=3,
+ levels bottom=2
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ levels top=3,
+ levels bottom=2
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{levels sep}
+specifies the vertical separation between horizontal levels for non-transversal edges. Default is evenly spaced within the space available for the given number of \texttt{levels}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ levels=3,
+ levels sep=0.3
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ levels=3,
+ levels sep=0.3
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{levels sep top} \DescribeMacro{levels sep bottom}
+specifies the vertical separation between horizontal levels for upper (lower) non-transversal edges. Default is evenly spaced within the space available for the given number of \texttt{levels}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ levels=3,
+ levels sep top=0.4,
+ levels sep bottom=0.15
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ levels=3,
+ levels sep top=0.4,
+ levels sep bottom=0.15
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{edges}\DescribeMacro{edges non-transversal}\DescribeMacro{edges upper}\DescribeMacro{edges lower}\DescribeMacro{edges transversal}
+pass through options to the \verb`\draw` command of their respective edge types. The default is no argument.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ edges upper=blue,
+ edges lower={red, dotted, very thick},
+ edges transversal=dashed
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdBrick[ % Options
+ degree=5,
+ edges upper=blue,
+ edges lower={red, dotted, very thick},
+ edges transversal=dashed
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{center}
+
+\DescribeMacro{edges first}
+flag ensures edges are drawn before vertices. The default is vertices are drawn first.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ edges lower={red, very thick},
+ edges first
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ edges lower={red, very thick},
+ edges first
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{transversals first}
+flag ensures transversal edges are drawn before non-transversal edges. The default is non-transversal edges are drawn first.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ edges lower={red, very thick},
+ transversals first
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ edges lower={red, very thick},
+ transversals first
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{edges phantom}
+This flag allows for all edges to be hidden using the \texttt{phantom} command. Simply wraps the edge drawing macros with a \texttt{phantom} command. The default is false.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ edges phantom
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ edges phantom
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{edges uncover}
+allows for all edges to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. The default is~\texttt{1-}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ edges uncover={2,4-7,9-}
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ edges uncover={2,4-7,9-}
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\subsubsection{Brace}
+
+\DescribeMacro{brace}
+specifies instructions for the drawing of a brace with the brace keys. These are described in Section~\ref{sec: brace}. The default is no brace is drawn.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{brace draw}\DescribeMacro{brace node}
+passes through options to the \verb`\draw` and \verb`node` command of the brace. Must be given before the \texttt{brace} key. The default is no argument.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace draw=thin,
+ brace node={pos=0.25},
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace draw=thin,
+ brace node={pos=0.25},
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\subsubsection{Decorations}
+
+\DescribeMacro{decorate before}\DescribeMacro{decorate after}
+provides a hook to draw additional \texttt{tikz} elements before and after the brick is drawn. The default is empty.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ decorate after={
+ \draw[
+ very thick,
+ red,
+ rounded corners=5pt
+ ] (0.6, -0.4) rectangle (1.4, 2.4);
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdBrick[ % Options
+ degree=5,
+ decorate after={
+ \draw[
+ very thick,
+ red,
+ rounded corners=5pt
+ ] (0.6, -0.4) rectangle (1.4, 2.4);
+ }
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{center}
+
+These hooks can also be used for more sophisticated manipulation of diagrams be inserting not just \texttt{tikz} elements but arbitrary code before and after draw a brick.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ {1}{1}
+ {4}{4}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=3,
+ decorate before={\begin{scope}[red,shift={(1,1)},rotate=30]},
+ decorate after={\end{scope}}
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=4
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ {1}{1}
+ {4}{4}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=3,
+ decorate before={\begin{scope}[red,shift={(1,1)},rotate=30]},
+ decorate after={\end{scope}}
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{2}
+ {2}{3}
+ {3}{1}
+ }
+ }
+}
+\end{center}
+
+\subsubsection{Drawing order} \label{sec: order}
+
+For clarity, this is the default drawing order for a brick:
+\begin{enumerate}
+ \item \texttt{decorate before}
+ \item Top row of vertices
+ \item Bottom row of vertices
+ \item Upper non-transversal edges
+ \item Lower non-transversal edges
+ \item Transversal edges
+ \item \texttt{decorate after}
+\end{enumerate}
+
+This order can be altered using the \texttt{edges first} and \texttt{transversals first} flags.
+
+For the drawing order of a diagram and product diagram, see the \texttt{decorate before} and \texttt{decorate after} keys in Section~\ref{sec: diagram/options all}.
+
+\subsection{Edge options} \label{sec: edge/options}
+
+\subsubsection{Non-transversal edge options} \label{sec: NT edge/options}
+
+\DescribeMacro{level}
+specifies the horizontal level of a non-transversal edges. Default is one.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5,
+ levels=3
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5,
+ levels=3
+]{ % Upper non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Lower non-transversal edges
+ [level=3]{1}{5}
+ [level=2]{1}{4}
+ [level=1]{2}{3}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{height}
+specifies a manually set horizontal height of a non-transversal edges. Default is to use levels.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{5}
+ [height=1.75]{1}{4}
+}{ % Lower non-transversal edges
+ [height=1.25]{1}{5}
+ {1}{4}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{5}
+ [height=1.75]{1}{4}
+}{ % Lower non-transversal edges
+ [height=1.25]{1}{5}
+ {1}{4}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{edge draw}
+passes through options to the \verb`\draw` command of the edge. The default is no argument.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ [edge draw=red]{2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ [edge draw=dotted]{1}{2}
+ {3}{4}
+}{ % Transversal edges
+ \pmdEmpty
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ [edge draw=red]{2}{3}
+ {4}{5}
+}{ % Lower non-transversal edges
+ [edge draw=dotted]{1}{2}
+ {3}{4}
+}{ % Transversal edges
+ \pmdEmpty
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{options}
+allows for the redefinition of the command that draws the non-transversal edge. It has two arguments, the start and end \( x \)-position of the edge. The default for an upper non-transversal is
+\begin{verbatim}
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1,\pmdraw@rowSep) arc (180:270:\pmdraw{edgeHeight});% Draw left arch
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1+\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight})
+ -- (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight});
+ % Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawUedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#2-\pmdraw{edgeHeight},\pmdraw@rowSep-\pmdraw{edgeHeight})
+ arc (270:360:\pmdraw{edgeHeight});% Draw right arc
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
+\end{verbatim}
+and for a lower non-transversal
+\begin{verbatim}
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1,0) arc (180:90:\pmdraw{edgeHeight});% Draw left arch
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1+\pmdraw{edgeHeight},\pmdraw{edgeHeight})
+ -- (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawLedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#2-\pmdraw{edgeHeight},\pmdraw{edgeHeight})
+ arc (90:0:\pmdraw{edgeHeight});% Draw right arc
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
+\end{verbatim}
+An example use is
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ [options={
+ \draw[blue, very thick] (#1,0) -- (#2,0);
+ }]{1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ [options={
+ \draw[blue, very thick] (#1,0) -- (#2,0);
+ }]{1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{center}
+
+\DescribeMacro{phantom}
+This flag allows for the edge to be hidden using the \texttt{phantom} command. Simply wraps the edge drawing macros with a \texttt{phantom} command. The default is false.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ [phantom]{1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ [phantom]{1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ [phantom]{1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ [phantom]{1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{uncover}
+allows for that edge to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. This uncover is nested inside the \texttt{edges uncover} and hence the limitations of nested uncovers are present here. For example, an individual edge will not uncover until the \texttt{edges uncover} has been uncovered. In such instances only use individual uncovers for each edge. The default is~\texttt{1-}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ [uncover={2,4-7,9-}]{1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ [uncover={3-}]{1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ [uncover={2,4-7,9-}]{1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ [uncover={3-}]{1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\subsubsection{Transversal edge options} \label{sec: T edge/options}
+
+\DescribeMacro{height}
+draws transversal edges with a horizontal component and specifies the manually set horizontal height of the transversal edges. Default is to use non-horizontal transversal edges.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree top=5,
+ degree bottom=6
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ [height=1]{10}{2}
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=3,
+ blank bottom=1,
+ degree bottom=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree top=5,
+ degree bottom=6
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ [height=1]{10}{2}
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=3,
+ blank bottom=1,
+ degree bottom=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{edge draw}
+passes through options to the \verb`\draw` command of the edge. The default is no argument.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {4}{5}
+ {3}{4}
+}{ % Transversal edges
+ [edge draw=red]{1}{1}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+}{ % Lower non-transversal edges
+ {4}{5}
+ {3}{4}
+}{ % Transversal edges
+ [edge draw=red]{1}{1}
+ {3}{2}
+ [edge draw=dashed]{4}{5}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{options}
+allows for the redefinition of the command that draws the transversal edge. It has two arguments, the \( x \)-position of the edge in the top row of vertices and the \( x \)-position of the edge in the bottom row of vertices. The default is
+\begin{verbatim}
+ \ifnum\pmdraw@ifTedgeHorizontal=0% If drawing a straight line edge
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1,\pmdraw@rowSep) -- (#2,0);% Draw straight line
+ \else% If transversal edge is drawn horizontally
+ \ifnum#1>#2% If edge goes from top right to bottom left
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions] (#2,0) arc
+ (180:90:\pmdraw{Tlevel});% Draw bottom arch
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#2+\pmdraw{Tlevel},\pmdraw{Tlevel}) --
+ (#1-\pmdraw@rowSep+\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1-\pmdraw@rowSep+\pmdraw{Tlevel},\pmdraw{Tlevel}) arc
+ (270:360:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
+ \else% If edge goes from top left to bottom right
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#2,0) arc (0:90:\pmdraw{Tlevel});% Draw bottom arch
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#2-\pmdraw{Tlevel},\pmdraw{Tlevel}) --
+ (#1+\pmdraw@rowSep-\pmdraw{Tlevel}, \pmdraw{Tlevel});% Draw straight line
+ \draw[apply style/.expand once=\pmdraw@drawTedgesDrawOptions,
+ apply style/.expand once=\pmdraw@drawEdgeDrawOptions]
+ (#1+\pmdraw@rowSep-\pmdraw{Tlevel},\pmdraw{Tlevel}) arc
+ (270:180:{\pmdraw@rowSep-\pmdraw{Tlevel}});% Draw top arc
+ \fi%
+ \renewcommand{\pmdraw@ifTedgeHorizontal}{0}% Reset flag to default
+ \fi%
+ \renewcommand{\pmdraw@drawEdgeDrawOptions}{}% Reset draw options for edge
+\end{verbatim}
+An example use is
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree top=5,
+ degree bottom=6
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ [options={
+ \draw (#2,0) -- (#2+1,1); % Draw bottom line
+ \draw (#2+1,1) -- (#1-1, 1); % Draw straight line
+ \draw (#1-1,1) -- (#1,2); % Draw top line
+ }]{10}{2}
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=3,
+ blank bottom=1,
+ degree bottom=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree top=5,
+ degree bottom=6
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ [options={
+ \draw (#2,0) -- (#2+1,1); % Draw bottom line
+ \draw (#2+1,1) -- (#1-1, 1); % Draw straight line
+ \draw (#1-1,1) -- (#1,2); % Draw top line
+ }]{10}{2}
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=3,
+ blank bottom=1,
+ degree bottom=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{phantom}
+This flag allows for the edge to be hidden using the \texttt{phantom} command. Simply wraps the edge drawing macros with a \texttt{phantom} command. The default is false.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ [phantom]{1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ [phantom]{1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\DescribeMacro{uncover}
+allows for that edge to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the edge drawing macros. This uncover is nested inside the \texttt{edges uncover} and hence the limitations of nested uncovers are present here. For example, an individual edge will not uncover until the \texttt{edges uncover} has been uncovered. In such instances only use individual uncovers for each edge. The default is~\texttt{1-}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ [uncover={2,4-7,9-}]{1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdBrick[ % Options
+ degree=5
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ [uncover={2,4-7,9-}]{1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+\subsection{Brace} \label{sec: brace}
+
+\DescribeMacro{brick/brace}
+As part of a diagram, it may be useful to draw a brace. The options of a brace are as follows:
+
+\DescribeMacro{left}\DescribeMacro{right}
+specifies the \( x \)-position of the start/left and end/right of the brace. Both must be provided.
+
+\DescribeMacro{label}
+specifies the label to be printed with the brace. Default is empty.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{above}
+The \texttt{above} flag draws the brace above the diagram. Default is below.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n},
+ above
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n},
+ above
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{options}
+allows for the redefinition of the command that draws the brace. It has three arguments, the \( x \)-position start and end of the brace, as well as the label of the brace. The default is
+\begin{verbatim}
+ \ifnum\pmdraw@ifProdDiag=1 % If drawing a product diagram
+ % or if placing brace above diagram
+ \draw[
+ very thick,
+ decorate,
+ decoration={calligraphic brace,amplitude=6pt},
+ apply style/.expand once=\pmdraw@drawBraceDrawOptions
+ ] (#1-0.17,\pmdraw@rowSep+0.5) -- (#2+0.17,\pmdraw@rowSep+0.5)
+ node[
+ pos=0.5,
+ above=6pt,
+ apply style/.expand once=\pmdraw@drawBraceNodeOptions
+ ] {\(#3\)}; % Draw brace on top of diagram
+ \else % If not drawing a product diagram or if placing brace below diagram
+ \draw[
+ very thick,
+ decorate,
+ decoration={calligraphic brace,mirror,amplitude=6pt},
+ apply style/.expand once=\pmdraw@drawBraceDrawOptions
+ ] (#1-0.17,-0.5) -- (#2+0.17,-0.5)
+ node[
+ pos=0.5,
+ below=6pt,
+ apply style/.expand once=\pmdraw@drawBraceNodeOptions
+ ] {\(#3\)}; % Draw brace on bottom of diagram
+ \fi%
+\end{verbatim}
+it should be noted that the flag \verb`\pmdraw@ifProdDiag` is both used for when drawing a product diagram but also when placing the brace above the diagram as this clearly must be the default for the top diagram in a product diagram.
+An example use is
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n},
+ options={
+ \draw[
+ red,
+ very thick,
+ decorate,
+ decoration={calligraphic brace,mirror,amplitude=6pt}
+ ] (#1-0.17,-0.5) -- (#2+0.17,-0.5)
+ node[pos=0.25,below=6pt]{\(#3\)};
+ }
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n},
+ options={
+ \draw[
+ red,
+ very thick,
+ decorate,
+ decoration={calligraphic brace,mirror,amplitude=6pt}
+ ] (#1-0.17,-0.5) -- (#2+0.17,-0.5)
+ node[pos=0.25,below=6pt]{\(#3\)};
+ }
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\subsection{Diagram options} \label{sec: diagram/options}
+
+\subsubsection{For all (product) diagrams} \label{sec: diagram/options all}
+
+The following options can be used for both diagrams (\verb`\pmdDiagram`) and product diagrams (\verb`\pmdProduct`).
+
+\DescribeMacro{row sep}
+same as \texttt{row sep} option in bricks but applied to all bricks within (product) diagram.
+
+\DescribeMacro{tikz}
+passes through options to \texttt{tikz} environment. Specifically, the options in \verb`\begin{tikzpicture}[<options>]`. The default is no argument. However there are some default options passed to \texttt{tikz} automatically. These are an adjustment to the \texttt{baseline} depending on the current typesetting mode and a \texttt{grid} key if the grid is activated.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram[ % Options
+ tikz={scale=2}
+]{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram[ % Options
+ tikz={scale=2}
+]{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=4,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{dots options}
+allows for the redefinition of the command that draws dots between bricks. It has two arguments, the \( x \) and \( y \)-position of the dots. The default is
+\begin{verbatim}
+ \draw[apply style/.expand once=\pmdraw@drawDotsDrawOptions]
+ (#1,#2) node[apply style/.expand once=\pmdraw@drawDotsNodeOptions] {\(\dots\)};
+\end{verbatim}
+An example use is
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram[ % Options
+ dots options={
+ \draw[red] (#1,#2) node {\(\dots\dots\)};
+ }
+]{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=5,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1,
+ blank top=1,
+ blank bottom=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {2}{2}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram[ % Options
+ dots options={
+ \draw[red] (#1,#2) node {\(\dots\dots\)};
+ }
+]{
+ { % Brick 1
+ [ % Options
+ degree=2,
+ brace={
+ left=1,
+ right=5,
+ label={n}
+ }
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree=1,
+ blank top=1,
+ blank bottom=1
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {2}{2}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{grid}
+As it can get confusing where things are drawn and the different coordinate scopes between all the bricks and diagrams, the \texttt{grid} flag draws the base coordinate grid that the first drawn brick is based on. This should help with all coordinate related inquiries. Default is no grid.
+
+It should be noted that the \texttt{grid} key is not available for \verb`\pmdBrick` and \verb`\pmdDiagram` must be used instead when needing a grid for a single brick only.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdDiagram[ % Options
+ grid
+]{
+ { % Brick 1
+ [ % Options
+ degree top=5,
+ degree bottom=6,
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ [height=1]{10}{2}
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=3,
+ blank bottom=1,
+ degree bottom=
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdDiagram[ % Options
+ grid
+]{
+ { % Brick 1
+ [ % Options
+ degree top=5,
+ degree bottom=6
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {3}{4}
+ {5}{6}
+ }{ % Transversal edges
+ [height=1]{10}{2}
+ {1}{1}
+ }
+ }{ % Brick 2
+ [ % Options
+ degree top=3,
+ blank bottom=1,
+ degree bottom=2
+ ]{ % Upper non-transversal edges
+ {1}{2}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ }{ % Transversal edges
+ \pmdEmpty
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{decorate before}\DescribeMacro{decorate after}
+same as \texttt{decorate before} and \texttt{decorate after} in bricks but these are drawn before (after) all bricks are drawn. For clarity, this is default drawing order for a diagram:
+\begin{enumerate}
+ \item \texttt{diagram/decorate before}
+ \item Brick loop:
+ \begin{enumerate}
+ \item \texttt{brick/decorate before}
+ \item Draws brick
+ \item \texttt{brick/decorate after}
+ \end{enumerate}
+ \item \texttt{diagram/decorate after}
+\end{enumerate}
+And this is default drawing order for a product diagram:
+\begin{enumerate}
+ \item \texttt{diagram/decorate before}
+ \item Draws added edges
+ \item Top diagram:
+ \begin{enumerate}
+ \item Brick loop:
+ \begin{enumerate}
+ \item \texttt{brick/decorate before}
+ \item Draws brick
+ \item \texttt{brick/decorate after}
+ \end{enumerate}
+ \end{enumerate}
+ \item Bottom diagram:
+ \begin{enumerate}
+ \item Brick loop:
+ \begin{enumerate}
+ \item \texttt{brick/decorate before}
+ \item Draws brick
+ \item \texttt{brick/decorate after}
+ \end{enumerate}
+ \end{enumerate}
+ \item \texttt{diagram/decorate after}
+\end{enumerate}
+
+For the drawing order of a brick see Section~\ref{sec: order}.
+
+\subsubsection{For product diagrams only} \label{sec: prod only}
+
+The following options can only be used for product diagrams (\verb`\pmdProduct`).
+
+\DescribeMacro{diagram sep}
+specifies the vertical separation between the bottom row of vertices in top diagram and the top row of vertices in bottom diagram. Also controls the length of the added edges. Default is one.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProduct[ % Options
+ diagram sep=2
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProduct[ % Options
+ diagram sep=2
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{vertex sep}
+increases the vertical separation between the bottom row of vertices in top diagram and the top row of vertices in bottom diagram without altering the length of the added edges. Useful for things when adjusting the \texttt{row sep} of the bottom diagram for example. Default is zero.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProduct[ % Options
+ vertex sep=1
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5,
+ row sep=3
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProduct[ % Options
+ vertex sep=1
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5,
+ row sep=3
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{edges added}
+passes through options to the \verb`\draw` command of the added edges. The default is no argument.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProduct[ % Options
+ edges added={red,very thick}
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProduct[ % Options
+ edges added={red,very thick}
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{edges added phantom}
+This flag allows for the added edges to be hidden using the \texttt{phantom} command. Simply wraps the edge drawing macros with a \texttt{phantom} command. The default is false.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProduct[ % Options
+ edges added phantom
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProduct[ % Options
+ edges added phantom
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\DescribeMacro{edges added uncover}
+allows for the added edges to be uncovered in a \texttt{beamer} presentation\footnote{Make sure to use a \texttt{fragile} frame.} using the command \verb`\uncover<n->{text}`. Simply passes the slide uncover information \verb`<n->` to the embedded \texttt{uncover} command within the added edge drawing macros. The default is~\texttt{1-}.
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdProduct[ % Options
+ edges added uncover={2,4-7,9-}
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+\begin{center}
+\pmdProduct[ % Options
+ edges added uncover={2,4-7,9-}
+]{ % Added edges
+ {1}{5}
+}{ % Top diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ \pmdEmpty
+ }{ % Lower non-transversal edges
+ \pmdEmpty
+ }{ % Transversal edges
+ {1}{1}
+ {2}{2}
+ {3}{3}
+ {4}{4}
+ {5}{5}
+ }
+ }
+}{ % Bottom diagram
+ { % Brick 1
+ [ % Options
+ degree=5
+ ]{ % Upper non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Lower non-transversal edges
+ {2}{3}
+ {4}{5}
+ }{ % Transversal edges
+ {1}{1}
+ }
+ }
+}
+\end{center}
+
+\subsection{Global options}
+
+The following are all of the commands that change all diagrams after the command is given.
+
+\DescribeMacro{\pmdSetDefault}
+sets the default style of all diagrams and has the syntax \verb`\pmdSetDefault{<keys>}`, where the input keys are one of the following:
+\begin{itemize}
+ \item \texttt{brick} -- see Section~\ref{sec: brick/options},
+ \item \texttt{NTedges} -- non-transversal edges, see Section~\ref{sec: NT edge/options},
+ \item \texttt{Tedges} -- transversal edges, see Section~\ref{sec: T edge/options},
+ \item \texttt{brace} -- see Section~\ref{sec: brace},
+ \item \texttt{diagram} -- see Section~\ref{sec: diagram/options}.
+\end{itemize}
+Only the keys (both families, for example brick, and individual keys, for example degree) that are to be changed need to be given. Unspecified keys will retain their existing default values.
+
+The follow is an example use:
+\begin{center}
+ \begin{minipage}{\dimexpr0.85\textwidth-2\fboxrule-2\fboxsep\relax}
+ \begin{minipage}[c]{0.4\linewidth}
+\begin{verbatim}
+\pmdSetDefault{% Set default keys
+ brick={% Brick keys
+ degree=5,
+ vertices=blue
+ },
+ Tedges={% Transversal edge keys
+ edge draw=red
+ }
+}
+
+\pmdBrick[ % Options
+ % degree=5% Not needed anymore
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+\end{verbatim}
+ \end{minipage}
+ \hfill
+ \begin{minipage}[c]{0.4\linewidth}
+\pmdSetDefault{% Set default keys
+ brick={% Brick keys
+ degree=5,
+ vertices=blue
+ },
+ Tedges={% Transversal edge keys
+ edge draw=red
+ }
+}
+
+\pmdBrick[ % Options
+ % degree=5% Not needed anymore
+]{ % Upper non-transversal edges
+ {1}{2}
+ {2}{5}
+}{ % Lower non-transversal edges
+ {1}{2}
+ {3}{4}
+}{ % Transversal edges
+ {1}{1}
+ {3}{4}
+}
+ \end{minipage}
+ \end{minipage}%
+\end{center}
+
+By default, any keys that are provided in a specific instance of a diagram completely override the default value of those keys for that specific instance of a diagram. However, the following keys work differently in that the default value is loaded and then the specific instance of that key in a diagram is appended to the list of options given:
+\begin{itemize}
+ \item \texttt{brick} keys:
+ \begin{itemize}
+ \item \texttt{vertices},
+ \item \texttt{edges},
+ \item \texttt{edges non-transversal},
+ \item \texttt{edges upper},
+ \item \texttt{edges lower},
+ \item \texttt{edges transversal}.
+ \end{itemize}
+ \item \texttt{diagram} keys:
+ \begin{itemize}
+ \item \texttt{edges added}.
+ \end{itemize}
+\end{itemize}
+This means that, for example, if the default \texttt{brick/edges} key is set to \texttt{red} and for a specific diagram the \texttt{brick/edges} key is set to \texttt{thick}, the resulting edge will be \verb`{red, thick}`. In short, this works in the default way that \texttt{tikz} handles multiple options, including repeated options, given to a \verb`\draw` command. Options are appended in the following order:
+\begin{enumerate}
+ \item Global default value,
+ \item Diagram value,
+ \item Brick value,
+ \item Edge value (if key is for an edge).
+\end{enumerate}
+The following keys cannot be changed using the \verb`\pmdSetDefault` command:
+\begin{itemize}
+ \item \texttt{brick} keys:
+ \begin{itemize}
+ \item \texttt{vertices options},
+ \item \texttt{labels bottom options},
+ \item \texttt{labels top options},
+ \item \texttt{no dots},
+ \item \texttt{brace}.
+ \end{itemize}
+ \item \texttt{NTedges} keys:
+ \begin{itemize}
+ \item \texttt{options}.
+ \end{itemize}
+ \item \texttt{Tedges} keys:
+ \begin{itemize}
+ \item \texttt{height},
+ \item \texttt{options}.
+ \end{itemize}
+ \item \texttt{brace} keys:
+ \begin{itemize}
+ \item \texttt{label},
+ \item \texttt{options}.
+ \end{itemize}
+ \item \texttt{diagram} keys:
+ \begin{itemize}
+ \item \texttt{dots options}.
+ \end{itemize}
+\end{itemize}
+Instead their default commands should be changed as a work around. For example, the key \texttt{labels bottom options} can be set to a different default value by finding the corresponding default command in the style file, \verb`\pmdraw@drawLabelBottomDefault` for this example, and redefining that command to the new default value sought.
+
+It should be noted that for some of these keys the above mentioned work around does not work. An example of this is for the \texttt{height} key as this is defined more complexly than just via a single command.
+
+Due to the use of the \texttt{xkeyval} package which only has the ability to save one value for a key, it is not possible to have more than one default option defined. A substantial rewrite of the package would be needed to have an arbitrary number of predefined styles that can quickly be used.
+
+\DescribeMacro{\pmdSetToOriginalDefault}
+sets the style of all diagrams to the default original style of the package. In effect it undoes any and all changes made with \verb`\pmdSetDefault`.
+
+\section{Future features/work}
+
+I have attempted to make most use cases easy to use with dedicated functionality that does not require significant \LaTeX\ knowledge whilst at the same time provide more advanced interfaces to allow for hopefully almost complete customisability for those who put in the effort.
+
+Having said that, please do let me know if there are features or improvements you will like to see added.
+
+The following are some of the aims for the future for this package:
+\begin{enumerate}
+ \item Fix bugs.
+ \item Add warning and error messages to log.
+ \item Allow all brick keys to work as diagram keys that apply to all bricks in a diagram. This will require setting up a flag for each key so that the diagram key sets the brick key but the brick key is not reset after drawing the first brick. This process also will need to be able to handle when a single brick has a custom special different key value and that this is reset to the digram key value and not the global default key value.
+ \item Allow appropriate diagram keys to work as brick keys. Notably the \texttt{grid} key.
+ \item The creation of user profiles that allows for fast and efficient setting of default key values that are different to the package defaults. Hence within a diagram, there can be a number of different diagram styles that can be accessed with one command. That is, in the options for a diagram, have this profile key.
+ \item Allow for adjusting the horizontal spacing of vertices. Need to think about making that a simple scale factor so that integer interface for edge positions is the same but then hooks will have very messy coordinates or keep it as absolute coordinates with messy edges. Alternatively, do both, allowing the user to choose which option to do and somehow distinguish between the two in the background.
+ \item Create \texttt{pmdMirror} command that mirrors all upper non-transversals into lower non-transversals.
+ \item Create \texttt{invert} key for bricks, diagrams and product diagrams that inverts everything. Probably easiest done with a \texttt{scope} environment around everything and \texttt{yscale=-1}.
+ \item For product diagram, have interface where you input diagram instead of bricks so that you have access to diagram options.
+ \item Create a transversal edge key \texttt{identity} so that all edges in between the two values are straight vertical edges. Thus eliminating the need to write out each edge manually.
+ \item Create \texttt{shift} key for edges that shifts horizontal position.
+ \item Decouple the uncover of labels from \texttt{vertices top uncover}/\texttt{vertices bottom uncover}.
+ \item Decouple the phantom of labels from \texttt{vertices top phantom}/\texttt{vertices bottom phantom}.
+ \item For all of the keys in Section~\ref{sec: prod only}, create a top and bottom version to be used in \texttt{pmdProductTriple}.
+\end{enumerate}
+
+\section{Examples}
+
+This section is simply a collection of example diagrams. The code for them can be found in the \texttt{examples} folder. Perhaps you will find them useful as a starting point for your diagrams or to see what this package is capable of.
+
+\usetikzlibrary{patterns}
+
+\foreach \example in {1,...,25}{
+ \paragraph{Example~\example}
+ \begin{center}
+ \input{examples/example-\example}
+ \end{center}
+}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/polyomino/README.md b/graphics/pgf/contrib/polyomino/README.md
new file mode 100644
index 0000000000..7f3c8023ad
--- /dev/null
+++ b/graphics/pgf/contrib/polyomino/README.md
@@ -0,0 +1,25 @@
+# `polyomino`
+
+## Polyominoes using Ti*k*Z and LaTeX3
+
+Version 1.0 (2024/08/01)
+
+This package is based on the package [Ti*k*Z](https://ctan.org/pkg/pgf) and can be used to draw polyominoes. It is possible to define custom styles, pics and grids.
+
+%% README.md
+%% Copyright 2024 Matthias Floré
+%
+% 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 Matthias Floré.
+%
+% This work consists of the files polyomino.pdf, polyomino.sty,
+% polyomino.tex and README.md. \ No newline at end of file
diff --git a/graphics/pgf/contrib/polyomino/polyomino.pdf b/graphics/pgf/contrib/polyomino/polyomino.pdf
new file mode 100644
index 0000000000..597c00c4db
--- /dev/null
+++ b/graphics/pgf/contrib/polyomino/polyomino.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/polyomino/polyomino.sty b/graphics/pgf/contrib/polyomino/polyomino.sty
new file mode 100644
index 0000000000..7a85590118
--- /dev/null
+++ b/graphics/pgf/contrib/polyomino/polyomino.sty
@@ -0,0 +1,286 @@
+%% polyomino.sty
+%% Copyright 2024 Matthias Floré
+%
+% 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 Matthias Floré.
+%
+% This work consists of the files polyomino.pdf, polyomino.sty,
+% polyomino.tex and README.md.
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{tikz}
+\ProvidesExplPackage{polyomino}{2024/08/01}{1.0}{Polyominoes using TikZ and LaTeX3}
+
+%%> \subsection{Variables and variants}
+
+\bool_new:N \l__polyomino_grid_bool
+\bool_new:N \l__polyomino_pic_bool
+
+\int_new:N \l__polyomino_col_int
+\int_new:N \l__polyomino_dir_int
+\int_new:N \l__polyomino_max_int
+\int_new:N \l__polyomino_row_int
+\int_new:N \l__polyomino_x_int
+\int_new:N \l__polyomino_y_int
+
+\seq_new:N \l__polyomino_add_seq
+\seq_new:N \l__polyomino_cols_seq
+
+\tl_new:N \l__polyomino_path_tl
+\tl_new:N \l__polyomino_pic_tl
+
+\cs_generate_variant:Nn \tl_map_inline:nn { en }
+
+%%> \subsection{Pgfkeys}
+
+\pgfkeys
+ {
+ / polyomino /. is~family ,
+ / polyomino /. search~also = / polyomino / p_2 ,
+ / polyomino ,
+ at /. initial = { ( 0 , 0 ) } ,
+ empty~cell /. initial = . ,
+ grid /. code = \bool_set:Nn \l__polyomino_grid_bool { \cs:w c_#1_bool \cs_end: } ,
+ grid /. default = true ,
+ grid = false ,
+ grid~style /. style = { grid_style /. style = {#1} } ,
+ grid_style /. style = {} ,
+ row~sep /. initial = { , } ,
+ }
+
+\pgfkeys
+ {%a separate key family so that the second argument of the key p only accepts keys which apply to a separate polyomino
+ / polyomino / p_2 /. is~family ,
+ / polyomino / p_2 ,
+ connected /. code = \bool_set_false:N \l__polyomino_pic_bool ,
+ connected /. value~forbidden ,
+ discrete /. code = \bool_set_true:N \l__polyomino_pic_bool ,
+ discrete /. value~forbidden ,
+ p /. style~2~args = { #1__style /. style = {#2} } ,%2 underscores to avoid the same name as for example the key style_style
+ pic /. code =
+ {
+ \bool_set_true:N \l__polyomino_pic_bool
+ \tl_set:Nn \l__polyomino_pic_tl {#1}
+ } ,
+ style /. style = { style_style /. style = {#1} } ,
+ style_style /. style = {} ,
+ }
+
+%%> \subsection{The command \textbackslash polyomino}
+
+\NewDocumentCommand \polyomino { O {} m }
+ {
+ {%note the double braces {{...}} so that the contents is in a group and in particular, \pgfkeys is applied locally
+ \pgfkeys { / polyomino , #1 }
+ \int_zero:N \l__polyomino_col_int
+ \int_set:Nn \l__polyomino_row_int { 1 }
+ \seq_clear:N \l__polyomino_cols_seq
+ \tl_map_inline:en {#2}
+ %it is convenient that this ignores spaces in #2
+ %e argument specifier for the case that #2 is given by a command or contains a command
+ {
+ \tl_if_eq:neTF {##1} { \pgfkeysvalueof { / polyomino / row~sep } }
+ {
+ \seq_put_right:NV \l__polyomino_cols_seq \l__polyomino_col_int
+ \int_incr:N \l__polyomino_row_int
+ \int_zero:N \l__polyomino_col_int
+ }
+ {
+ \int_incr:N \l__polyomino_col_int
+ \tl_clear_new:c { l__polyomino_\int_use:N \l__polyomino_row_int _\int_use:N \l__polyomino_col_int _tl }
+ \tl_if_eq:neF {##1} { \pgfkeysvalueof { / polyomino / empty~cell } }
+ { \tl_set:cn { l__polyomino_\int_use:N \l__polyomino_row_int _\int_use:N \l__polyomino_col_int _tl } {##1} }
+ \tl_gclear_new:c { g__polyomino_\int_use:N \l__polyomino_row_int _\int_use:N \l__polyomino_col_int _tl }
+ }
+ }
+ \seq_put_right:NV \l__polyomino_cols_seq \l__polyomino_col_int
+ \int_set:Nn \l__polyomino_max_int { \fp_eval:n { max ( \seq_use:Nn \l__polyomino_cols_seq { , } ) } }
+ \seq_map_indexed_inline:Nn \l__polyomino_cols_seq
+ {
+ \tl_clear_new:c { l__polyomino_##1_0_tl }
+ \int_step_inline:nnn { ##2 + 1 } { \l__polyomino_max_int + 1 }
+ { \tl_clear_new:c { l__polyomino_##1_####1_tl } }
+ }
+ \int_step_inline:nnn { 0 } { \l__polyomino_max_int + 1 }
+ {
+ \tl_clear_new:c { l__polyomino_0_##1_tl }
+ \tl_clear_new:c { l__polyomino_\int_eval:n { \l__polyomino_row_int + 1 }_##1_tl }
+ }
+ \pgfkeys
+ {
+ / tikz ,
+ shift /. expanded = { \pgfkeysvalueof { / polyomino / at } } ,
+ shift = { ( 0 , \seq_count:N \l__polyomino_cols_seq ) }
+ }
+ \seq_map_indexed_inline:Nn \l__polyomino_cols_seq
+ {
+ \int_step_inline:nn {##2}
+ {
+ \tl_if_empty:cF { l__polyomino_##1_####1_tl }
+ {
+ {%note the double braces {{...}} so that \pgfkeys is applied locally
+ \pgfkeys { / polyomino / p_2 , \cs:w l__polyomino_##1_####1_tl \cs_end: __style }
+ \bool_if:NTF \l__polyomino_pic_bool
+ { \pic [ / polyomino / p_2 / style_style ] at ( ####1 - 0.5 , 0.5 - ##1 ) { code = { \l__polyomino_pic_tl } } ; }
+ {
+ \seq_clear:N \l__polyomino_add_seq
+ \tl_if_eq:ccF { l__polyomino_##1_####1_tl } { l__polyomino_##1_\int_eval:n { ####1 - 1 }_tl }
+ {
+ \tl_if_empty:cT { g__polyomino_##1_####1_tl }
+ {
+ \int_set:Nn \l__polyomino_dir_int { 1 }
+ \int_set:Nn \l__polyomino_col_int {####1}
+ \int_set:Nn \l__polyomino_row_int {##1}
+ \int_set:Nn \l__polyomino_x_int {####1}
+ \int_set:Nn \l__polyomino_y_int { 1 - ##1 }
+ \tl_build_begin:N \l__polyomino_path_tl
+ \fp_do_until:nn { ####1 - 1 = \l__polyomino_x_int && 1 - ##1 = \l__polyomino_y_int }
+ {
+ %concerning \tl_build_put_right:Ne \l__polyomino_path_tl,
+ %for example (0,0)--(0,1)--(0,2) results in a larger file size than (0,0)--(0,2)
+ \tl_if_eq:ccTF
+ { l__polyomino_##1_####1_tl }
+ {
+ l__polyomino
+ _\int_eval:n
+ { \l__polyomino_row_int + \clist_item:nn { 0 , 1 , 0 , -1 } { \l__polyomino_dir_int } }
+ _\int_eval:n
+ { \l__polyomino_col_int + \clist_item:nn { 1 , 0 , -1 , 0 } { \l__polyomino_dir_int } }
+ _tl
+ }
+ {
+ \tl_if_eq:ccTF
+ { l__polyomino_##1_####1_tl }
+ {
+ l__polyomino
+ _\int_eval:n
+ { \l__polyomino_row_int + \clist_item:nn { -1 , 1 , 1 , -1 } { \l__polyomino_dir_int } }
+ _\int_eval:n
+ { \l__polyomino_col_int + \clist_item:nn { 1 , 1 , -1 , -1 } { \l__polyomino_dir_int } }
+ _tl
+ }
+ {
+ \tl_build_put_right:Ne \l__polyomino_path_tl
+ { -- ( \int_use:N \l__polyomino_x_int , \int_use:N \l__polyomino_y_int ) }
+ \int_add:Nn \l__polyomino_row_int
+ { \clist_item:nn { -1 , 1 , 1 , -1 } { \l__polyomino_dir_int } }
+ \int_add:Nn \l__polyomino_col_int
+ { \clist_item:nn { 1 , 1 , -1 , -1 } { \l__polyomino_dir_int } }
+ \int_compare:nNnTF { \l__polyomino_dir_int } = { 1 }
+ { \int_set:Nn \l__polyomino_dir_int { 4 } }
+ { \int_decr:N \l__polyomino_dir_int }
+ }
+ {
+ \int_add:Nn \l__polyomino_row_int
+ { \clist_item:nn { 0 , 1 , 0 , -1 } { \l__polyomino_dir_int } }
+ \int_add:Nn \l__polyomino_col_int
+ { \clist_item:nn { 1 , 0 , -1 , 0 } { \l__polyomino_dir_int } }
+ }
+ \tl_if_empty:cTF
+ { g__polyomino_\int_use:N \l__polyomino_row_int _\int_use:N \l__polyomino_col_int _tl }
+ {
+ \seq_put_right:Ne \l__polyomino_add_seq
+ { \int_use:N \l__polyomino_row_int _\int_use:N \l__polyomino_col_int }
+ }
+ {
+ \bool_set_true:N \l__polyomino_pic_bool
+ \int_set:Nn \l__polyomino_x_int { ####1 - 1 }
+ \int_set:Nn \l__polyomino_y_int { 1 - ##1 }
+ }
+ }
+ {
+ \tl_build_put_right:Ne \l__polyomino_path_tl
+ { -- ( \int_use:N \l__polyomino_x_int , \int_use:N \l__polyomino_y_int ) }
+ \int_compare:nNnTF { \l__polyomino_dir_int } = { 4 }
+ { \int_set:Nn \l__polyomino_dir_int { 1 } }
+ { \int_incr:N \l__polyomino_dir_int }
+ }
+ \bool_if:NF \l__polyomino_pic_bool
+ {
+ \int_add:Nn \l__polyomino_x_int { \clist_item:nn { 1 , 0 , -1 , 0 } { \l__polyomino_dir_int } }
+ \int_add:Nn \l__polyomino_y_int { \clist_item:nn { 0 , -1 , 0 , 1 } { \l__polyomino_dir_int } }
+ }
+ }
+ \tl_build_end:N \l__polyomino_path_tl
+ \bool_if:NF \l__polyomino_pic_bool
+ { \fill [ / polyomino / p_2 / style_style ] ( ####1 - 1 , 1 - ##1 ) \l__polyomino_path_tl -- cycle ; }
+ }
+ }
+ \tl_gset:cn { g__polyomino_##1_####1_tl } { c }
+ \seq_map_inline:Nn \l__polyomino_add_seq
+ { \tl_gset:cn { g__polyomino_########1_tl } { c } }
+ }
+ }
+ }
+ }
+ }
+ \bool_if:NT \l__polyomino_grid_bool
+ {
+ \int_step_inline:nn { \seq_count:N \l__polyomino_cols_seq - 1 }
+ {
+ \int_zero:N \l__polyomino_col_int
+ \int_zero:N \l__polyomino_x_int
+ \int_set:Nn \l__polyomino_y_int
+ { \int_min:nn { \seq_item:Nn \l__polyomino_cols_seq {##1} } { \seq_item:Nn \l__polyomino_cols_seq { ##1 + 1 } } }
+ \int_while_do:nNnn { \l__polyomino_x_int } < { \l__polyomino_y_int }
+ {
+ \bool_do_while:nn
+ {
+ \tl_if_eq_p:cc
+ { l__polyomino_##1_\int_use:N \l__polyomino_x_int _tl }
+ { l__polyomino_\int_eval:n { ##1 + 1 }_\int_use:N \l__polyomino_x_int _tl }
+ &&
+ ! \tl_if_empty_p:c { g__polyomino_##1_\int_use:N \l__polyomino_x_int _tl }
+ &&
+ \int_compare_p:nNn { \l__polyomino_x_int } < { \l__polyomino_y_int + 1 }
+ }
+ { \int_incr:N \l__polyomino_x_int }
+ \int_compare:nNnT { \l__polyomino_x_int } > { \l__polyomino_col_int + 1 }
+ {
+ \draw [ / polyomino / grid_style ]
+ ( \int_use:N \l__polyomino_col_int , -##1 ) -- ( \int_use:N \l__polyomino_x_int - 1 , -##1 ) ;
+ }
+ \int_set_eq:NN \l__polyomino_col_int \l__polyomino_x_int
+ }
+ }
+ \int_set:Nn \l__polyomino_x_int { \seq_count:N \l__polyomino_cols_seq }
+ \int_step_inline:nn { \l__polyomino_max_int - 1 }
+ {
+ \int_zero:N \l__polyomino_row_int
+ \int_zero:N \l__polyomino_y_int
+ \int_while_do:nNnn { \l__polyomino_y_int } < { \l__polyomino_x_int }
+ {
+ \bool_do_while:nn
+ {
+ \tl_if_eq_p:cc
+ { l__polyomino_\int_use:N \l__polyomino_y_int _##1_tl }
+ { l__polyomino_\int_use:N \l__polyomino_y_int _\int_eval:n { ##1 + 1 }_tl }
+ &&
+ ! \tl_if_empty_p:c { g__polyomino_\int_use:N \l__polyomino_y_int _##1_tl }
+ &&
+ \int_compare_p:nNn { \l__polyomino_y_int } < { \l__polyomino_x_int + 1 }
+ &&
+ \int_compare_p:nNn {##1} < { \seq_item:Nn \l__polyomino_cols_seq { \l__polyomino_y_int } + 0 }
+ }
+ { \int_incr:N \l__polyomino_y_int }
+ \int_compare:nNnT { \l__polyomino_y_int } > { \l__polyomino_row_int + 1 }
+ {
+ \draw [ / polyomino / grid_style ]
+ ( ##1 , -\int_use:N \l__polyomino_row_int ) -- ( ##1 , 1 - \int_use:N \l__polyomino_y_int ) ;
+ }
+ \int_set_eq:NN \l__polyomino_row_int \l__polyomino_y_int
+ }
+ }
+ }
+ }
+ }
+
+\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/polyomino/polyomino.tex b/graphics/pgf/contrib/polyomino/polyomino.tex
new file mode 100644
index 0000000000..c512cec895
--- /dev/null
+++ b/graphics/pgf/contrib/polyomino/polyomino.tex
@@ -0,0 +1,278 @@
+%% polyomino.tex
+%% Copyright 2024 Matthias Floré
+%
+% 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 Matthias Floré.
+%
+% This work consists of the files polyomino.pdf, polyomino.sty,
+% polyomino.tex and README.md.
+\documentclass[a4paper,english,dvipsnames]{ltxdoc}
+\usepackage[english]{babel}
+\usepackage{graphicx}
+\usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead]{geometry}
+\usepackage{parskip}
+\usepackage{iftex}
+\ifluatex
+\else
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\fi
+\usepackage{mathtools}
+\usepackage{amssymb}
+\allowdisplaybreaks
+\usepackage{pdflscape}
+\usepackage{polyomino}
+\input{pgfmanual-en-macros.tex}
+\usepackage{codehigh}
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+\renewcommand{\headrulewidth}{0pt}
+\fancyhead{}
+\ExplSyntaxOn
+\NewExpandableDocumentCommand \repeatnumber {}
+ { \prg_replicate:nn { \thepage } { * } }
+\ExplSyntaxOff
+\fancyfoot[C]{\IfRefUndefinedExpandable{Thesourcecode}{}{\begin{tikzpicture}[scale=0.9]
+\polyomino[
+ grid,
+ p={*}{style={teal,draw=black}}
+]{\repeatnumber}
+\end{tikzpicture}}}
+\usepackage[nottoc]{tocbibind}
+\usepackage{imakeidx}
+\makeindex[program=makeindex,columns=2,intoc=true]
+\indexsetup{othercode={\thispagestyle{fancy}}}
+\AtEndPreamble{\hypersetup{%
+linktoc=all,
+pdfstartview=FitH,
+colorlinks=true,
+linkcolor=Mahogany,
+citecolor=ForestGreen,
+urlcolor=MidnightBlue,
+bookmarksnumbered=true,
+pdftitle={The polyomino package},
+pdfauthor={Matthias Floré},
+pdfsubject={Manual},
+pdfkeywords={polyomino}}}
+\setcounter{tocdepth}{2}
+\setcounter{secnumdepth}{2}
+\title{The \texttt{polyomino} package\\[12pt]\large Polyominoes using \tikzname{} and \LaTeX3}
+\author{Matthias Floré}
+\date{Version 1.0 (2024/08/01)}%\\[12pt]
+\begin{document}
+\maketitle
+\thispagestyle{fancy}
+\begin{abstract}
+\noindent This package is based on the package |tikz| (see \cite{TtTaPGFp}) and can be used to draw polyominoes. It is possible to define custom styles, pics and grids.% This is the manual for version .
+\end{abstract}
+\tableofcontents
+\section{Usage}
+The package |polyomino| can be used by putting the following in the preamble.
+\begin{codeexample}[code only]
+\usepackage{polyomino}
+\end{codeexample}
+The package |polyomino| loads the package |tikz|.
+\section{The command \textbackslash polyomino}
+\begin{command}{\polyomino\opt{\oarg{options}}\marg{polyomino specification}}
+This command can be placed inside a |tikzpicture| environment. The \meta{polyomino specification} is a token list. Spaces in this list are ignored. With the initial settings, a |,| starts a new row. Otherwise each element in this list corresponds to a cell. An element can consist of multiple characters by surrounding it with braces. The \meta{options} can be given with the keys described in Section \ref{Keys}.
+\begin{codeexample}[width=8cm]
+\pgfkeys{
+ /polyomino,
+ p={F}{style={blue,draw=black,ultra thick}},
+ p={I}{style={brown,draw=black,ultra thick}},
+ p={L}{style={cyan,draw=black,ultra thick}},
+ p={N}{style={gray,draw=black,ultra thick}},
+ p={P}{style={lime,draw=black,ultra thick}},
+ p={T}{style={magenta,draw=black,ultra thick}},
+ p={U}{style={olive,draw=black,ultra thick}},
+ p={V}{style={orange,draw=black,ultra thick}},
+ p={W}{style={pink,draw=black,ultra thick}},
+ p={X}{style={purple,draw=black,ultra thick}},
+ p={Y}{style={red,draw=black,ultra thick}},
+ p={Z}{style={teal,draw=black,ultra thick}}
+}
+\begin{tikzpicture}
+\polyomino[
+ grid
+]{
+ UUUVVV,
+ UXUZZV,
+ XXXFZV,
+ IXFFZZ,
+ ILLFFT,
+ ILNTTT,
+ ILNWWT,
+ ILNNWW,
+ PPPNYW,
+ PPYYYY
+}
+\end{tikzpicture}
+\end{codeexample}
+The algorithm constructs the border of each polyomino. It does not consider holes determined by empty cells. Although it does detect a cell inside a polyomino which has a different style. This is illustrated in the example below.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}[scale=0.8]
+\polyomino[
+ p={a}{style={gray,draw=black,thick}}
+]{
+ aaaaa,
+ a.a.a,
+ aaaaa
+}
+\polyomino[
+ at={(0,-4)},
+ p={a}{style={gray,draw=black,thick}},
+ p={*}{style={white,draw=black,thick}}
+]{
+ aaaaa,
+ a*a*a,
+ aaaaa
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+\section{Keys}\label{Keys}
+The keys in this Section can be given as \meta{options} to the command |\polyomino|.
+
+There are two key families: |/polyomino| and |/polyomino/p_2|. The key family |/polyomino| is intended for usage in documents whereas |/polyomino/p_2| is not. In the key family |/polyomino|, also keys from the key family |/polyomino/p_2| will be looked up. The second argument from the key |p| only accepts keys from the key family |/polyomino/p_2|.
+\begin{key}{/polyomino/at=\marg{point} (initially (0,0))}
+This key defines the bottom left coordinate of the polyomino.
+\end{key}
+\begin{key}{/polyomino/p\_2/connected}
+This key sets the |pic| type (which is activated by the key |pic|) to false. This is the initial setting.
+\end{key}
+\begin{key}{/polyomino/p\_2/discrete}
+This key sets the |pic| type (which is activated by the key |pic|) to true.
+\end{key}
+\begin{key}{/polyomino/empty cell=\marg{token list} (initially .)}
+A cell corresponding to the \meta{token list} in the \meta{polyomino specification} will be left empty.
+
+A cell corresponding to the empty token list will always be left empty.
+\end{key}
+\begin{key}{/polyomino/grid=\opt{\meta{boolean}} (default true, initially false)}
+If true then a grid is drawn. The grid does not apply to borders of polyominoes. The style of this grid is determined by the key |grid style|. A grid does not apply to a cell with a |pic|.
+\end{key}
+\begin{stylekey}{/polyomino/grid style=\marg{options} (initially \normalfont empty)}
+This key determines the style of the grid.
+\begin{codeexample}[width=6.5cm]
+\begin{tikzpicture}[rotate=90]
+\polyomino[
+ grid,
+ grid style={gray,dash pattern=on 3mm off 4mm on 3mm off 0mm},
+ p={L}{style={darkgray,draw=black}},
+ p={P}{style={green,draw=black}},
+ p={T}{style={violet,draw=black}},
+ p={V}{style={yellow,draw=black}}
+]{
+ LTVVV,
+ LTTTV,
+ LTPPV,
+ LLPPP
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{stylekey}
+\begin{stylekey}{/polyomino/p\_2/p=\marg{name}\marg{options} (initially \normalfont empty)}
+This key determines the style of the polyomino with \meta{name} in the \meta{polyomino specification}.
+
+The \meta{options} only accept keys from the key family |/polyomino/p_2|.
+
+In the example below, the polyominoes have the same shape but are differentiated by using different names.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\pgfkeys{
+ /polyomino,
+ p={a}{},
+ p={b}{},
+ style={fill=none,draw}
+}
+\def\example{
+ aa,
+ ab,
+ ab,
+ bb
+}
+\polyomino{\example}
+\polyomino[
+ at={(2,0)}
+]{\example}
+\end{tikzpicture}
+\end{codeexample}
+\end{stylekey}
+\begin{key}{/polyomino/p\_2/pic=\marg{code}}
+The \meta{code} defines the |pic| which is used for each cell of the polyomino.
+
+A grid does not apply to a cell with a |pic|.
+\begin{codeexample}[width=7cm]
+\begin{tikzpicture}
+\polyomino[
+ empty cell=*,
+ grid,
+ p={a}{style={red,draw=black}},
+ p={b}{style={blue,draw=black}},
+ p={c}{style={orange,draw=black}},
+ p={circle}{pic={\fill[green] (0,0) circle[radius=0.4];}},
+ row sep=;
+]{
+ {} * * b {} c ;
+ a a b b {circle} c ;
+ {circle} a a b c c
+}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=5cm]
+\begin{tikzpicture}
+\polyomino[
+ p={circle}{
+ pic={\path[pic actions] (0,0) circle[radius=0.45];},
+ style={right color=cyan,left color=red,draw,dashed}
+ },
+ p={L}{
+ pic={
+ \fill[yellow!80!black] (-0.5,-0.5) rectangle +(1,1);
+ \fill[yellow!50,rounded corners] (-0.4,-0.4) rectangle +(0.8,0.8);
+ }
+ },
+ p={square}{
+ pic={\path[pic actions] (-0.45,-0.45) rectangle +(0.9,0.9);},
+ style={fill=magenta,draw,rounded corners}
+ }
+]{
+ L {circle} {square} {square} ,
+ L {circle} {circle} {square} ,
+ L L {circle} {circle}
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/polyomino/row sep=\marg{token list} (initially ,)}
+The \meta{token list} in the \meta{polyomino specification} will start a new row.
+\end{key}
+\begin{stylekey}{/polyomino/p\_2/style=\marg{options} (initially \normalfont empty)}
+This key determines the style of the polyomino.
+\end{stylekey}
+\begin{thebibliography}{9}
+\bibitem{TtTaPGFp}
+Till Tantau,
+\emph{The \tikzname{} and {\upshape\pgfname} Packages},
+Manual for version 3.1.10,
+\url{https://ctan.org/pkg/pgf},
+2023.
+\end{thebibliography}
+\printindex
+\newgeometry{left=2.25cm,right=2.25cm,top=2.25cm,bottom=2.25cm}
+\pagestyle{plain}
+\appendix
+\begin{landscape}
+\section{The source code}\label{Thesourcecode}
+\dochighinput[language=latex/latex3]{polyomino.sty}
+\end{landscape}
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.pdf b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.pdf
index a95ad30ad7..af15730e34 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.pdf
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.tex b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.tex
index f29587bab9..e3073d3bac 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.tex
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe71.tex
@@ -15,4 +15,4 @@
\GrilleCCFSIO[Session=2025,Type={7-1},PoliceManuscrite={\poltuto}]{LOVELACE Ada}{21 mai 2024}{Quelques propriétés de la suite de Syracuse}
-\end{document}
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.pdf b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.pdf
index 7e7ca969ea..5995eee9c0 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.pdf
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.tex b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.tex
index 00af2e5e36..1c3fb34c96 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.tex
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe72.tex
@@ -16,4 +16,4 @@
\def\grccfcompetsyr{variables et types/listes et tableaux/tests et boucles/fonctions}
\GrilleCCFSIO[Session=2025,Type={7-2},PoliceManuscrite={\poltuto}]{LOVELACE Ada}{21 mai 2024}{Quelques propriétés de la suite de Syracuse}<\grccfcompetsyr>
-\end{document}
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.pdf b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.pdf
index b9c6d73803..efefc42595 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.pdf
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.tex b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.tex
index 24747750c8..188aeaad52 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.tex
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-annexe73.tex
@@ -16,4 +16,4 @@
\def\grccfcompetsyr{variables et types/listes et tableaux/tests et boucles/fonctions}
\GrilleCCFSIO[Session=2024,Type={7-3},PoliceManuscrite={\poltuto}]{LOVELACE Ada}{14 mai 2024}{Calculs booléens + Graphes + Chiffrements}
-\end{document}
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
index 265dc41596..6ce8f3e1b1 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
index 59ae3cd132..6c03b52cf2 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
@@ -5,8 +5,8 @@
\documentclass[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.2.8}
-\def\TPdate{18 mai 2024}
+\def\TPversion{0.3.0}
+\def\TPdate{3 février 2025}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
@@ -142,7 +142,7 @@
\begin{center}
\begin{tabular}{c}
\texttt{Cédric Pierquet} ({\ttfamily c pierquet -- at -- outlook . fr})\\
- \texttt{\url{https://github.com/cpierquet/profsio}}
+ \texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}}
\end{tabular}
\end{center}
@@ -256,6 +256,10 @@
\section{Historique}
+\verb|v0.3.0|~:~~~~Mise en conformité pour les grilles de CCF (E3)
+
+\verb|v0.2.9|~:~~~~Correction d'un bug dans les simplifications de Karnaugh
+
\verb|v0.2.8|~:~~~~Grilles d'évaluation des CCF
\verb|v0.2.7|~:~~~~Correction d'un bug dans les simplifications de Karnaugh
diff --git a/graphics/pgf/contrib/profsio/tex/ProfSio.sty b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
index 3b70f9a1e3..71f6d62bf6 100644
--- a/graphics/pgf/contrib/profsio/tex/ProfSio.sty
+++ b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
@@ -1,9 +1,11 @@
% Author : C. Pierquet
-% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
% : Luatruthtable from Chetan Shirore and Dr. Ajit Kumar https://ctan.org/pkg/luatruthtable
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfSio}[2024/05/18 0.2.8 Pour les enseignants de Maths en BTS SIO]
+\ProvidesPackage{ProfSio}[2025/02/03 0.3.0 Pour les enseignants de Maths en BTS SIO]
+%0.3.0 Mise en conformité des grilles d'évaluation CCF
+%0.2.9 Correction d'un bug dans les simplifications de Karnaugh
%0.2.8 Ajout des grilles de CCF (E2)
%0.2.7 Correction d'un bug dans les simplifications de Karnaugh
%0.2.6 Corrections dans les simplifications de Karnaugh
@@ -39,7 +41,8 @@
\RequirePackage{calc}
\RequirePackage{nicematrix}
%------Librairies
-\usetikzlibrary{positioning,decorations.pathreplacing,decorations.markings,arrows,arrows.meta,calc,babel,shapes,shapes.geometric}
+\usetikzlibrary{positioning,decorations.pathreplacing,decorations.markings,arrows,arrows.meta,calc,shapes,shapes.geometric}
+\usetikzlibrary{babel}
%------Divers
\def\§{\mkern1.5mu\relax}
@@ -2041,32 +2044,32 @@ end
%calculs pour 1 lettre
\IfSubStr{\knghbintransf}{(AA)}{\xdef\knghbinres{\inteval{\knghbinres+11110000}}}{}%
\IfSubStr{\knghbintransf}{(BB)}{\xdef\knghbinres{\inteval{\knghbinres+11001100}}}{}%
- \IfSubStr{\knghbintransf}{(CC)}{\xdef\knghbinres{\inteval{\knghbinres+01100110}}}{}%
+ \IfSubStr{\knghbintransf}{(CC)}{\xdef\knghbinres{\inteval{\knghbinres+01100110}}}{}%version c intérieure !!
\IfSubStr{\knghbintransf}{(AA*)}{\xdef\knghbinres{\inteval{\knghbinres+00001111}}}{}%
\IfSubStr{\knghbintransf}{(BB*)}{\xdef\knghbinres{\inteval{\knghbinres+00110011}}}{}%
- \IfSubStr{\knghbintransf}{(CC*)}{\xdef\knghbinres{\inteval{\knghbinres+10011001}}}{}%
+ \IfSubStr{\knghbintransf}{(CC*)}{\xdef\knghbinres{\inteval{\knghbinres+10011001}}}{}%version bar(c) extérieure
%calculs pour 2 lettres
\IfSubStr{\knghbintransf}{(AABB)}{\xdef\knghbinres{\inteval{\knghbinres+11000000}}}{}%
- \IfSubStr{\knghbintransf}{(AACC*)}{\xdef\knghbinres{\inteval{\knghbinres+01100000}}}{}%
+ \IfSubStr{\knghbintransf}{(AACC*)}{\xdef\knghbinres{\inteval{\knghbinres+10010000}}}{}%=====!
\IfSubStr{\knghbintransf}{(AABB*)}{\xdef\knghbinres{\inteval{\knghbinres+00110000}}}{}%
\IfSubStr{\knghbintransf}{(AA*BB)}{\xdef\knghbinres{\inteval{\knghbinres+00001100}}}{}%
- \IfSubStr{\knghbintransf}{(AA*CC*)}{\xdef\knghbinres{\inteval{\knghbinres+00000110}}}{}%
+ \IfSubStr{\knghbintransf}{(AA*CC*)}{\xdef\knghbinres{\inteval{\knghbinres+00001001}}}{}%=====!
\IfSubStr{\knghbintransf}{(AA*BB*)}{\xdef\knghbinres{\inteval{\knghbinres+00000011}}}{}%
- \IfSubStr{\knghbintransf}{(AACC)}{\xdef\knghbinres{\inteval{\knghbinres+10010000}}}{}%
- \IfSubStr{\knghbintransf}{(AA*CC)}{\xdef\knghbinres{\inteval{\knghbinres+00001001}}}{}%
- \IfSubStr{\knghbintransf}{(BBCC)}{\xdef\knghbinres{\inteval{\knghbinres+10001000}}}{}%
- \IfSubStr{\knghbintransf}{(BBCC*)}{\xdef\knghbinres{\inteval{\knghbinres+01000100}}}{}%
- \IfSubStr{\knghbintransf}{(BB*CC*)}{\xdef\knghbinres{\inteval{\knghbinres+00100010}}}{}%
- \IfSubStr{\knghbintransf}{(BB*CC)}{\xdef\knghbinres{\inteval{\knghbinres+00010001}}}{}%
+ \IfSubStr{\knghbintransf}{(AACC)}{\xdef\knghbinres{\inteval{\knghbinres+01100000}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(AA*CC)}{\xdef\knghbinres{\inteval{\knghbinres+00000110}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(BBCC)}{\xdef\knghbinres{\inteval{\knghbinres+01000100}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(BBCC*)}{\xdef\knghbinres{\inteval{\knghbinres+10001000}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(BB*CC*)}{\xdef\knghbinres{\inteval{\knghbinres+00010001}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(BB*CC)}{\xdef\knghbinres{\inteval{\knghbinres+00100010}}}{}%=====!
%calculs pour 3 lettres
- \IfSubStr{\knghbintransf}{(AABBCC)}{\xdef\knghbinres{\inteval{\knghbinres+10000000}}}{}%
- \IfSubStr{\knghbintransf}{(AABBCC*)}{\xdef\knghbinres{\inteval{\knghbinres+01000000}}}{}%
- \IfSubStr{\knghbintransf}{(AABB*CC*)}{\xdef\knghbinres{\inteval{\knghbinres+00100000}}}{}%
- \IfSubStr{\knghbintransf}{(AABB*CC)}{\xdef\knghbinres{\inteval{\knghbinres+00010000}}}{}%
- \IfSubStr{\knghbintransf}{(AA*BBCC)}{\xdef\knghbinres{\inteval{\knghbinres+00001000}}}{}%
- \IfSubStr{\knghbintransf}{(AA*BBCC*)}{\xdef\knghbinres{\inteval{\knghbinres+00000100}}}{}%
- \IfSubStr{\knghbintransf}{(AA*BB*CC*)}{\xdef\knghbinres{\inteval{\knghbinres+00000010}}}{}%
- \IfSubStr{\knghbintransf}{(AA*BB*CC)}{\xdef\knghbinres{\inteval{\knghbinres+00000001}}}{}%
+ \IfSubStr{\knghbintransf}{(AABBCC)}{\xdef\knghbinres{\inteval{\knghbinres+01000000}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(AABBCC*)}{\xdef\knghbinres{\inteval{\knghbinres+10000000}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(AABB*CC*)}{\xdef\knghbinres{\inteval{\knghbinres+00010000}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(AABB*CC)}{\xdef\knghbinres{\inteval{\knghbinres+00100000}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(AA*BBCC)}{\xdef\knghbinres{\inteval{\knghbinres+00000100}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(AA*BBCC*)}{\xdef\knghbinres{\inteval{\knghbinres+00001000}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(AA*BB*CC*)}{\xdef\knghbinres{\inteval{\knghbinres+00000001}}}{}%=====!
+ \IfSubStr{\knghbintransf}{(AA*BB*CC)}{\xdef\knghbinres{\inteval{\knghbinres+00000010}}}{}%=====!
%on complète
\StrLen{\knghbinres}[\knghbinresnbchiffres]
\ifnum\knghbinresnbchiffres<8%
@@ -2867,7 +2870,7 @@ end
\hline
BTS SERVICES INFORMATIQUES AUX ORGANISATIONS\hfill{}SESSION {\grccfsioannee}\hspace*{1cm} \\
ANNEXE 7-1 : Document de préparation au déroulement de la situation 1 \\
- Épreuve E2 – Mathématiques pour l’informatique (CCF) \\
+ Épreuve E3 – Mathématiques pour l’informatique (CCF) \\
\hline
\end{tblr}
@@ -2921,7 +2924,7 @@ end
\hline
BTS SERVICES INFORMATIQUES AUX ORGANISATIONS\hfill{}SESSION {\grccfsioannee}\hspace*{1cm} \\
ANNEXE 7-2 : Grille d’aide à l’évaluation de la situation 1 (recto) \\
- Épreuve E2 – Mathématiques pour l’informatique (CCF) \\
+ Épreuve E3 – Mathématiques pour l’informatique (CCF) \\
\hline
\end{tblr}
@@ -2988,7 +2991,7 @@ end
\hline
BTS SERVICES INFORMATIQUES AUX ORGANISATIONS\hfill{}SESSION {\grccfsioannee}\hspace*{1cm} \\
ANNEXE 7-2 : Grille d’aide à l’évaluation de la situation 1 (verso) \\
- Épreuve E2 – Mathématiques pour l’informatique (CCF) \\
+ Épreuve E3 – Mathématiques pour l’informatique (CCF) \\
\hline
\end{tblr}
@@ -3035,7 +3038,7 @@ end
\hline
BTS SERVICES INFORMATIQUES AUX ORGANISATIONS\hfill{}SESSION {\grccfsioannee}\hspace*{1cm} \\
ANNEXE 7-3 : Grille d’aide à l’évaluation de la situation 2 (recto) \\
- Épreuve E2 – Mathématiques pour l’informatique (CCF) \\
+ Épreuve E3 – Mathématiques pour l’informatique (CCF) \\
\hline
\end{tblr}
@@ -3096,7 +3099,7 @@ end
\hline
BTS SERVICES INFORMATIQUES AUX ORGANISATIONS\hfill{}SESSION {\grccfsioannee}\hspace*{1cm} \\
ANNEXE 7-3 : Grille d’aide à l’évaluation de la situation 2 (verso) \\
- Épreuve E2 – Mathématiques pour l’informatique (CCF) \\
+ Épreuve E3 – Mathématiques pour l’informatique (CCF) \\
\hline
\end{tblr}
diff --git a/graphics/pgf/contrib/prooftrees/README b/graphics/pgf/contrib/prooftrees/README
deleted file mode 100644
index 687eddf510..0000000000
--- a/graphics/pgf/contrib/prooftrees/README
+++ /dev/null
@@ -1,39 +0,0 @@
-%% Copyright 2019 Clea F. Rees
-%
-% 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 all files listed in manifest.txt.
-
-This package supports drawing tableaux (proof trees) of the kind often used in
-introductory logic classes, especially those aimed at students without strong
-mathemtical backgrounds. Hodges (1991) is one example of a text which uses
-this system. When teaching such a system it is especially useful to annotate
-the tree with line numbers, justifications and explanations of branch
-closures.
-
-prooftrees provides a single environment, prooftree, and a variety of tools
-for annotating, customising and highlighting such trees. A cross-referencing
-system is provided for trees which cite line numbers in justifications for
-proof lines or branch closures.
-
-prooftrees is based on Forest and, hence, TikZ. The package requires version
-2.1+ of Forest for expected results and will not work with version 1.
-
-The author is certain that some of her beliefs are false, but sure that her
-belief that prooftrees has bugs is not among them.
-
-Clea F. Rees
-ReesC21 <at> cardiff <dot> ac <dot> uk
-2019/09/30
-
-vim: set nospell:
diff --git a/graphics/pgf/contrib/prooftrees/README.md b/graphics/pgf/contrib/prooftrees/README.md
new file mode 100644
index 0000000000..dced983574
--- /dev/null
+++ b/graphics/pgf/contrib/prooftrees/README.md
@@ -0,0 +1,66 @@
+$Id: README.md 10529 2024-10-25 21:19:36Z cfrees $
+
+# prooftrees
+
+A LaTeX package for drawing logical tableaux.
+
+## Licence
+
+Copyright 2016-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
+prooftrees. You may however distribute the package prooftrees without
+such generated files.
+
+This work consists of all files listed in manifest.txt.
+
+## Features
+
+This package supports drawing tableaux (proof trees) of the kind often used in
+introductory logic classes, especially those aimed at students without strong
+mathemtical backgrounds. Hodges (1991) is one example of a text which uses
+this system. When teaching such a system it is especially useful to annotate
+the tree with line numbers, justifications and explanations of branch
+closures.
+
+prooftrees provides a single environment - either prooftree or tableau - and a
+variety of tools for annotating, customising and highlighting such trees. A
+cross-referencing system is provided for trees which cite line numbers in
+justifications for proof lines or branch closures.
+
+prooftrees is based on Forest and, hence, TikZ. The package requires version
+2.1+ of Forest for expected results and will not work with version 1.
+
+Version 0.9 adds out-of-the-box support for externalisation of tableaux using
+memoize.
+
+## Code Repositories
+
+Code for the package is hosted at
+ https://codeberg.org/cfr/prooftrees
+For convenience, the repository is mirrored at
+ https://github.com/cfr42/prooftrees
+
+## Contact Details
+
+Bug reports, feature requests etc. should be filed at
+ https://codeberg.org/cfr/prooftrees/issues
+
+
+Clea F. Rees
+Version 0.9
+2024-10-25
+
+vim: et:tw=80:
diff --git a/graphics/pgf/contrib/prooftrees/manifest.txt b/graphics/pgf/contrib/prooftrees/manifest.txt
index e6116e22a9..0890ae8ff5 100644
--- a/graphics/pgf/contrib/prooftrees/manifest.txt
+++ b/graphics/pgf/contrib/prooftrees/manifest.txt
@@ -1,6 +1,13 @@
-Copyright 2023 Clea F. Rees
+# Manifest for prooftrees
-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.
+Copyright (C) 2016-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'.
@@ -8,11 +15,40 @@ The Current Maintainer of this work is Clea F. Rees.
This work consists of all files listed in manifest.txt.
-prooftrees.sty
-prooftrees.tex
-prooftrees_biber.bib
-manifest.txt
-README
+This file was automatically generated by `l3build manifest`.
+
+## Source files
+
+
+### Package files
+
+
+* manifest.txt
+* README.md
+* prooftrees_biber.bib
+* prooftrees.sty
+* prooftrees.tex
+
+### Development files
+
+
+* build.lua
+* manifest.lua
+* tag.lua
+* config-mem.lua
+* prooftrees-memoize-t1.lvt
+* prooftrees-memoize-t1.tlg
+* prooftrees-conflicts-t1.lvt
+* prooftrees-egs.lvt
+* prooftrees-conflicts-t1.tlg
+* prooftrees-egs.luatex.tlg
+* prooftrees-egs.pdftex.tlg
+* prooftrees-egs.xetex.tlg
+
+
+## Derived files
+
+
+### Typeset documentation
-Derived files:
-prooftrees.pdf
+* prooftrees.pdf
diff --git a/graphics/pgf/contrib/prooftrees/prooftrees.pdf b/graphics/pgf/contrib/prooftrees/prooftrees.pdf
index 6535d91236..8aaabf2ef9 100644
--- a/graphics/pgf/contrib/prooftrees/prooftrees.pdf
+++ b/graphics/pgf/contrib/prooftrees/prooftrees.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/prooftrees/prooftrees.sty b/graphics/pgf/contrib/prooftrees/prooftrees.sty
index c28a6c9688..ea15ae2748 100644
--- a/graphics/pgf/contrib/prooftrees/prooftrees.sty
+++ b/graphics/pgf/contrib/prooftrees/prooftrees.sty
@@ -1,23 +1,26 @@
-%% Copyright 2020 Clea F. Rees
-%
-% 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 all files listed in manifest.txt.
+%% Copyright 2016-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
+%% prooftrees.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{svn-prov}
-\ProvidesPackageSVN{$Id: prooftrees.sty 9103 2022-04-02 04:28:09Z cfrees $}[v0.8 \revinfo]
-\RequirePackage{etoolbox}
+\ProvidesPackageSVN{$Id: prooftrees.sty 10522 2024-10-23 16:31:08Z cfrees $}[v0.9 \revinfo]
% define \prooftrees@enw to hold the name of the environment
% default is to name the environment prooftree, this ensures backwards compatibility
\newcommand*\prooftrees@enw{prooftree}
@@ -27,7 +30,12 @@
\DeclareOption{tableau}{\renewcommand*\prooftrees@enw{tableau}}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{forest}}
% if \prooftree is not yet defined, set the name to prooftree; otherwise, use tableau to avoid conflict with bussproofs (which uses 'prooftree' rather than 'bussproof' as one might expect)
-\ifundef\prooftree{\renewcommand*\prooftrees@enw{prooftree}}{\renewcommand*\prooftrees@enw{tableau}}
+\ifcsname prooftree\endcsname
+ \renewcommand*\prooftrees@enw{tableau}%
+\else
+ \renewcommand*\prooftrees@enw{prooftree}%
+\fi
+% \ifundef\prooftree{\renewcommand*\prooftrees@enw{prooftree}}{\renewcommand*\prooftrees@enw{tableau}}
% let users override the default prooftree in case they need to load bussproofs later
\ProcessOptions
\RequirePackage{forest}[2016/12/04]
@@ -457,7 +465,7 @@
}{},
where={%
>{O _O< O &&}{grouped}{1}{level}{proof tree rhifo}%
- }{% this searches for certain kinds of structural asymmetry in the tree and attempts to move lines appropriately in such cases - the algorithm is intended to be relatively conservative (not in the sense of 'cautious' or 'safe' but in the sense of 'reflection of the overlapping consensus of reasonable users' / 'what would be rationally agreed behind the prooftrees veil of ignorance'; apologies for the inconvenience if you are an unreasonable user)
+ }{% this searches for certain kinds of structural asymmetry in the tree and attempts to move lines appropriately in such cases - the algorithm is intended to be relatively conservative (not in the sense of 'cautious' or 'safe' but in the sense of 'reflection of the overlapping consensus of reasonable users' / 'what would be rationally agreed behind the prooftrees veil of ignorance'; however, I should have realised I actually had 'the overlapping concensus of reasonable Beamer users' in mind rather than 'the overlapping consensus of reasonable users', so there is now an option to turn it off;apologies if this comment previously misclassified you as 'unreasonable'; apologies for the inconvenience if you are an unreasonable user)
not tempboola,
for root/.process={Ow1}{level}{%
for level={##1}{%
@@ -867,9 +875,9 @@
},
},
}
-\environbodyname\prooftreebody
+% \environbodyname\prooftreebody
\bracketset{action character=@}
-\NewEnviron{\prooftrees@enw}[1]{% \forest/\endforest from egreg's answer at http://tex.stackexchange.com/a/229608/
+\NewDocumentEnvironment{\prooftrees@enw}{ m +b }{% \forest/\endforest from egreg's answer at http://tex.stackexchange.com/a/229608/
\forest
(%
stages={% customised definition of stages - we don't use any custom stages, but we do use several custom keylists, where the processing order of these is critical
@@ -896,7 +904,26 @@
)%
proof tree,% apply the proof tree style, which sets keylists from both forest's defaults and our custom additions
#1,% insert user's preamble, empty or otherwise - this allows the user both to override our defaults (e.g. by setting a non-empty proof statement or a custom format for line numbers) and to customise the tree using forest's facilities in the usual way - BUT customisations of the latter kind may or may not be effective, may or may not have undesirable - not to say chaotic - consequences, and may or may not cause compilation failures (structural changes, in particular, should be avoided completely)
- [, name=proof statement @\prooftreebody]%
- \endforest}
+ [, name=proof statement @#2]%
+ \endforest
+}{}
+
+\ExplSyntaxOn
+\cs_new_protected_nopar:Npn \__prooftrees_memoize:n #1
+{
+ \mmzset{
+ auto = { #1 } { memoize },
+ }
+}
+\cs_generate_variant:Nn \__prooftrees_memoize:n { V }
+\hook_gput_code:nnn { begindocument / before } { . }
+{% paid â memoize bussproofs prooftree ...
+ \@ifpackageloaded{memoize}{
+ \__prooftrees_memoize:V \prooftrees@enw
+ }{}
+}
+\ExplSyntaxOff
+
\endinput
%% end prooftrees.sty
+
diff --git a/graphics/pgf/contrib/prooftrees/prooftrees.tex b/graphics/pgf/contrib/prooftrees/prooftrees.tex
index 0b479838f9..2f9250201f 100644
--- a/graphics/pgf/contrib/prooftrees/prooftrees.tex
+++ b/graphics/pgf/contrib/prooftrees/prooftrees.tex
@@ -1,26 +1,36 @@
-%% Copyright 2023 Clea F. Rees
-%
-% 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 all files listed in manifest.txt.
+\iffalse
+%% Copyright 2016-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
+%% prooftrees.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% arara: pdflatex: { synctex: true, shell: false }
+% arara: biber
+% arara: makeindex
+% arara: pdflatex: { synctex: true, shell: false }
% arara: pdflatex: { synctex: true, shell: false }
% biber --output_format=bibtex --output_resolve prooftrees.bcf to generate .bib for upload
% sed -i '/1977/s/DATE/YEAR'
-%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\fi
\pdfminorversion=7
\RequirePackage{svn-prov}
-\ProvidesFileSVN{$Id: prooftrees.tex 9582 2023-06-18 01:00:05Z cfrees $}[v0.8 \revinfo]
+\ProvidesFileSVN{$Id: prooftrees.tex 10525 2024-10-24 06:31:34Z cfrees $}[v0.9 \revinfo]
\GetFileInfoSVN*
\let\prooftreesdocversion\fileversion
\let\prooftreesdocbase\filebase
@@ -28,8 +38,30 @@
\let\prooftreesdocdate\filedate
% BEGIN preamble
\documentclass[10pt,british,a4paper,doc2]{ltxdoc}
-\usepackage{babel,geometry,pageslts,fancyhdr,enumitem}
-\usepackage[utf8]{inputenc}
+\usepackage[extract=python]{memoize}
+\mmzset{%
+ prefix={memos/},
+ include context in ccmemo,
+ auto=\cref{multiref},
+ auto=\Cref{multiref},
+ auto=\labelcref{multiref},
+ auto=\cpageref{multiref},
+ auto=\labelcpageref{multiref},
+ auto=\namecref{ref},
+ auto=\nameCref{ref},
+ auto=\namecrefs{ref},
+ auto=\nameCrefs{ref},
+ auto=\lcnamecrefs{ref},
+ auto=\lcnamecrefs{ref},
+ auto=\crefrange{refrange},
+ auto=\cpagerefrange{refrange},
+ auto=\Cpagerefrange{refrange},
+ mkdir,
+}
+% \CodelineIndex
+% \RecordChanges
+% \EnableCrossrefs
+\usepackage{babel,geometry,fancyhdr,enumitem}
\usepackage{csquotes}
\MakeAutoQuote{‘}{’}
\MakeAutoQuote*{“}{”}
@@ -41,7 +73,7 @@
\bibliography{prooftrees_biber.bib}% generate for upload (gweler uchod)
\usepackage{etoolbox,verbatim,parskip,changepage,titling,makeidx}
\usepackage[dvipsnames,svgnames,rgb,x11names]{xcolor}
-\usepackage{prooftrees}
+\usepackage[tableaux]{prooftrees}
\usepackage{mathtools,turnstile,pifont}
\newcommand*{\fycheck}{\text{\ding{52}}}
\newcommand*{\fycross}{\text{\ding{56}}}
@@ -60,7 +92,12 @@
},
}
\usepackage{tcolorbox}
-\tcbuselibrary{listings,xparse,breakable}% if you use skins, you need to disable externalisation for boxes which use the relevant options - gweler nodiadau/tex/tex.se/tcolorbox-coursepacket-exp.tex
+\tcbuselibrary{listingsutf8}% if you use skins, you need to disable externalisation for boxes which use the relevant options - gweler nodiadau/tex/tex.se/tcolorbox-coursepacket-exp.tex
+%%%%%%%%%%%%%%%%
+% Sašo Živanović: https://github.com/sasozivanovic/memoize/issues/31#issuecomment-2424700001
+\csappto{tcb@shield@@externalize}{\ifdefined\memoizefalse\memoizefalse\fi}
+\tcbset{shield externalize}
+%%%%%%%%%%%%%%%%
\usepackage[%
loadHyperref=true,
createIndexEntries=false,
@@ -83,7 +120,7 @@
\raggedleft\PrintDescribeMacro{#1}\par
\PrintLabelName[\macrolabelfont]{\macrolabelname}%
}%
- \expandafter\prooftrees@index{\macrolabelname}{\protect\verb \protect #1}\@esphack\ignorespaces}
+ \expandafter\prooftrees@index{\macrolabelname}{\protect\ttfamily\protect\string\protect#1}\@esphack\ignorespaces}
\renewcommand*\Describe@Env[1]{\endgroup
\marginpar{%
\raggedleft\PrintDescribeMacro{#1}\par
@@ -106,7 +143,7 @@
\renewcommand*\do[1]{\ifcyntafun ##1\else\\##1\fi\cyntafunfalse}%
\cyntafuntrue
\marginpar{%
- \raggedleft\PrintDescribeMacro{ % peid â dileu'r gwagle hwn!!
+ \raggedleft\PrintDescribeMacro{ % paid â dileu'r gwagle hwn!!
\expandafter\docsvlist{#2}%
}\par
\PrintLabelName[\macrolabelfont]{\csname #1labelname\endcsname}%
@@ -184,6 +221,16 @@
commentstyle=\color{doc@commentcolor},
frame=none,
}
+\lstdefinestyle{lstsrc}{%
+ style=lstDemoStyleLaTeXCode,
+ stringstyle=\color{doc@stringcolor},
+ keywordstyle=\color{doc@keywordcolor},
+ commentstyle=\color{doc@commentcolor},
+ texcsstyle=\color{doc@keywordcolor},
+ frame=none,
+ numbers=left,
+ moretexcs={forestset,linenumberstyle,ifcsname,ProcessOptions,DeclareOption,ProvidesPackageSVN,bracketset,NewDocumentEnvironment,ExplSyntaxOn,mmzset,ExplSyntaxOff,forest,prooftrees@enw,foresteregister,foresteoption,forestregister,forestoption,PackageError,PackageWarning,PassOptionsToPackage,CurrentOption,@ifpackageloaded,endforest,draw},
+}
\geometry{headheight=12pt,marginparwidth=45mm,hmarginratio=4:1,vscale=.8,hscale=.7,verbose}
\newlength\tewadjust
\setlength\tewadjust{\marginparwidth+\marginparsep-\paperwidth+\textwidth+\oddsidemargin+1in}
@@ -269,20 +316,83 @@
Version \prooftreesdocversion{} \prooftreesdocinfo
\end{center}%
}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ExplSyntaxOn
+% \NewDocumentCommand \ivals { +m }
+% {
+% {
+% \clist_if_empty:nF { #1 }
+% {
+% \normalfont
+% \itshape
+% < \clist_use:nn { #1 } { >\texttt{,} ~ < } >
+% }
+% }
+% }
+\keys_define:nn { prooftrees / doc }
+{
+ unknown .code:n = {
+ \cs_if_free:cT { \l_keys_key_str }
+ {
+ \tl_gset:cn { \l_keys_key_str } { #1 }
+ }
+ },
+}
+\NewDocumentCommand \prooftreesdocset { +m }
+{
+ \keys_set:nn { prooftrees / doc } { #1 }
+}
+\ExplSyntaxOff
+\prooftreesdocset{%
+ bug={\href{https://codeberg.org/cfr/prooftrees/issues}{\textsc{bugtracker}}},
+ codeberg={\href{https://codeberg.org/cfr/prooftrees}{\textsc{codeberg}}},
+ github={\href{https://github.com/cfr42/prooftrees}{\textsc{github}}},
+ ctan={\href{https://ctan.org/}{\textsc{ctan}}},
+}
+% \newcommand*{\lpack}[1]{\textsf{#1}}
+\title{\filebase}
+\author{Clea F. Rees\thanks{%
+ Bug tracker:
+ \href{https://codeberg.org/cfr/prooftrees/issues}{\url{codeberg.org/cfr/prooftrees/issues}}
+ \textbar{} Code:
+ \href{https://codeberg.org/cfr/prooftrees}{\url{codeberg.org/cfr/prooftrees}}
+ \textbar{} Mirror:
+ \href{https://github.com/cfr42/prooftrees}{\url{github.com/cfr42/prooftrees}}%
+}}
+% \date{\fileversion~\filedate}
+\date{\prooftreesdocdate}%
+\title{\prooftreesdocbase}%
+\ExplSyntaxOn
+\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}
+}
+% \NewDocumentCommand \plarg {+m} {{\ttfamily (\ivals{#1})}}
+\ExplSyntaxOff
+% \NewDocumentCommand \istable{m}{\texttt{= \{}\ivals{#1}\texttt{\}}\par\noindent}
+% \NewDocumentCommand \isstring{m}{\texttt{= ''}\meta{#1}\texttt{''}\par\noindent}
+% \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}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy}
\fancyhf{}
\fancyhf[lh]{\textit{\leftmark}}
\fancyhf[rh]{\textit{\rightmark}}
-\fancyhf[cf]{\textit{--- \thepage{} of \lastpageref*{LastPage} ---}}
+\fancyhf[cf]{\textit{--- \thepage{} of \lastpage{} ---}}
\fancypagestyle{fancyplain}{%
\fancyhf{}%
\fancyhf[lh]{\textit{\leftmark}}%
\renewcommand*\headrulewidth{0pt}%
- \fancyhf[cf]{\textit{--- \thepage{} of \lastpageref*{LastPage} ---}}}
+ \fancyhf[cf]{\textit{--- \thepage{} of \lastpage{} ---}}}
\fancypagestyle{plain}{%
\fancyhf{}%
\renewcommand*\headrulewidth{0pt}%
- \fancyhf[cf]{\textit{--- \thepage{} of \lastpageref*{LastPage} ---}}}
+ \fancyhf[cf]{\textit{--- \thepage{} of \lastpage{} ---}}}
\patchcmd{\sectionmark}{\MakeUppercase}{}{\typeout{sectionmark patched OK!}}{\typeout{sectionmark patch failed!}}
\patchcmd{\tableofcontents}{\MakeUppercase}{}{\typeout{sectionmark patched OK!}}{\typeout{sectionmark patch failed!}}
\patchcmd{\tableofcontents}{\MakeUppercase\contentsname}{}{\typeout{sectionmark patched OK!}}{\typeout{sectionmark patch failed!}}
@@ -297,9 +407,6 @@
% END preamble
\begin{document}
-\title{\prooftreesdocbase}%
-\author{Clea F. Rees\texorpdfstring{\thanks{reesc21 <at> cardiff <dot> ac <dot> uk}}{}}%
-\date{\prooftreesdocdate}%
\newgeometry{headheight=12pt,scale=.8,marginparwidth=0pt,marginparsep=0pt}%
\savegeometry{safonol}%
\setlength\tewadjust{\marginparwidth+\marginparsep}%
@@ -309,8 +416,9 @@
\bigskip
\begin{abstract}
- \noindent \keyname[pkg]{\pkg{prooftrees}} is a \LaTeXe{} package, based on \keyname[pkg]{\pkg{forest}}, designed to support the typesetting of proof trees in styles sometimes used in teaching introductory logic courses, especially those aimed at students without a strong background in mathematics.
+ \noindent \keyname[pkg]{\pkg{prooftrees}} is a \LaTeXe{} package, based on \keyname[pkg]{\pkg{forest}}, designed to support the typesetting of logical tableaux --- ‘proof trees’ or ‘truth trees’ --- in styles sometimes used in teaching introductory logic courses, especially those aimed at students without a strong background in mathematics.
One textbook which uses proofs of this kind is \textcite{hodges-logic}.
+ Like \pkg{forest}, \pkg{prooftrees} supports \keyname[pkg]{\pkg{memoize}} out-of-the-box.
\end{abstract}
\bigskip
@@ -318,7 +426,7 @@
\begin{adjustwidth}{-3em}{-5em}
\centering
\begin{minipage}[t]{.475\linewidth}
- \begin{prooftree}
+ \begin{tableau}
{
to prove={S \liff \lnot T, T \liff \lnot R \sststile{\mathcal{L}}{} S \liff R},
highlight format={text=WildStrawberry},
@@ -387,10 +495,10 @@
]
]
]
- \end{prooftree}%
+ \end{tableau}%
\end{minipage}\hfill
\begin{minipage}[t]{.525\linewidth}
- \begin{prooftree}
+ \begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \Rightarrow (x = y)) \cdot Px) \sststile{\mathcal{L}_1}{} (\exists x)(\forall y)(Py \Leftrightarrow (x = y))},
line no sep=.35em,
@@ -441,7 +549,7 @@
]
]
]
- \end{prooftree}%
+ \end{tableau}%
\end{minipage}%
\end{adjustwidth}
\end{figure}
@@ -512,7 +620,7 @@ The package supports a small number of options which can be configured to custom
The code for a \pkg{prooftrees} proof tree is shown in \cref{ptdefaults}, together with the output obtained using the default settings.
\begin{codcoeden}*[label=ptdefaults]{\pkg{prooftrees}: default settings}
-\begin{prooftree}
+\begin{tableau}
{
to prove={\{P \vee (Q \vee \lnot R), P \lif \lnot R, Q \lif \lnot R\} \sststile{}{} \lnot R}
}
@@ -528,7 +636,7 @@ The code for a \pkg{prooftrees} proof tree is shown in \cref{ptdefaults}, togeth
[\lnot Q, close={:!u,!c}]
[\lnot R, close={:not conc,!c}, just={$\lif$ Elim:last premise}]]
[\lnot R, close={:not conc,!c}, move by=1, just={$\vee$ Elim:!u}]]]]]]
-\end{prooftree}
+\end{tableau}
\end{codcoeden}
More extensive configuration can be achieved by utilising \pkg{forest} \autocite{saso-forest-manual} and/or \TikZ{} \autocite{tantau-tikz-pgf-manual} directly.
A sample of supported proof tree styles are shown in \cref{sample}.
@@ -537,7 +645,7 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
\thispagestyle{plain}%
\begin{coeden}[label=sample, floatplacement={!bp}, grow to left by=3em, grow to right by=3em]{\pkg{prooftrees}: sample output}
\centering
- \begin{prooftree}
+ \begin{tableau}
{
to prove={\{ P \lor (Q \lor \lnot R), P \lif \lnot R, Q \lif \lnot R \} \sststile{}{} \lnot R},
line no sep=.35em,
@@ -566,9 +674,9 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
]
]
]
- \end{prooftree}\hfill
+ \end{tableau}\hfill
{\renewcommand*\linenumberstyle[1]{#1)}%
- \begin{prooftree}
+ \begin{tableau}
{
close with={\ensuremath{\ast}},
just format={text=gray, font=\itshape},
@@ -602,9 +710,9 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
]
]
]
- \end{prooftree}}
+ \end{tableau}}
- \begin{prooftree}
+ \begin{tableau}
{
not line numbering,
single branches,
@@ -636,8 +744,8 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
]
]
]
- \end{prooftree}%
- \hfill\begin{prooftree}
+ \end{tableau}%
+ \hfill\begin{tableau}
{
to prove={\{ P \lor (Q \lor \lnot R), P \lif \lnot R, Q \lif \lnot R \} \therefore \lnot R},
close with={\ensuremath{\times}},
@@ -668,9 +776,9 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
]
]
]
- \end{prooftree}
+ \end{tableau}
- \begin{prooftree}
+ \begin{tableau}
{
to prove={(\exists x)(Lx \lor Mx) \sststile{}{} (\exists x) Lx \lor (\exists x) Mx},
highlight format={text=blue!50!cyan},
@@ -695,8 +803,8 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
]
]
]
- \end{prooftree}%
- \hfill\begin{prooftree}
+ \end{tableau}%
+ \hfill\begin{tableau}
{
for tree={%
plain content,
@@ -717,7 +825,7 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
]
]
]
- \end{prooftree}
+ \end{tableau}
\end{coeden}
% END sec:raisondetre
@@ -730,7 +838,7 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
\begin{itemize}
\item All derivation rules yield equal numbers of \wff{}s on all branches.
\begin{center}
- \begin{prooftree}
+ \begin{tableau}
{
not line numbering,
for tree={plain content},
@@ -740,7 +848,7 @@ The package is \emph{\bfseries not} intended for the typesetting of proof trees
[\wff[\wff[\wff]][\wff[\wff, label={[text=Green3]right:{\fycheck}}]]]
[\wff[\wff][\wff[\wff, label={[text=red]right:{\fycross}}]]]
[\wff[\wff[\wff]][\wff[\phantom{\wff}, label={[text=red]right:{\fycross}}]]]
- \end{prooftree}
+ \end{tableau}
\end{center}
If $\mathcal{L}$ fails to satisfy this condition, \pkg{prooftrees} is likely to violate the requirements of affected derivation rules by splitting branches ‘mid-inference’.
\item No derivation rule yields \wff{}s on more than two branches.
@@ -780,17 +888,17 @@ Suppose that we wish to typeset the proof tree for
and we would like to typeset the entailment established by our proof at the top of the tree.
Then we should begin like this:
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
-\end{prooftree}
+\end{tableau}
\end{latexcode}
That is all the preamble we want, so we move onto consider the \meta{tree specification}.
\pkg{forest} uses square brackets to specify trees' structures.
To typeset a proof, think of it as consisting of nested trees, trunks upwards, and work from the outside in and the trunks down (\cref{nythod}).
\begin{coeden}[label=nythod]{Nested structure of proof tree}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)},
just sep*=3,
@@ -900,7 +1008,7 @@ To typeset a proof, think of it as consisting of nested trees, trunks upwards, a
]
]
]
-\end{prooftree}
+\end{tableau}
\end{coeden}
Starting with the outermost tree \nyth*{} and the topmost trunk, we replace the \bocsnyth{} with square brackets and enter the first \wff{} inside, adding \verb|just=Pr.| for the justification on the right and \verb|checked=a| so that the line will be marked as discharged with $a$ substituted for $x$.
@@ -908,13 +1016,13 @@ We also use \pkg{forest}'s \keyname*[fopttoks]{name} to label the line for ease
(Technically, it is the node rather than the line which is named, but, for our purposes, this doesn't matter.
\pkg{forest} will create a name if we don't specify one, but it will not necessarily be one we would have chosen for ease of use!)
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
[{(\exists x)((\forall y)(Py \lif x = y) \land Px)}, checked=a, just=Pr., name=pr
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
We can refer to this line later as \verb|pr|.
@@ -923,7 +1031,7 @@ Its \bocsnyth{} goes inside that for \nyth[1], so the square brackets containing
Again, we add the justification with \keyname[foptautotoks]{just}, but we use \verb|subs=a| rather than \verb|checked=a| as we want to mark substitution of $a$ for $x$ without discharging the line.
Again, we use \keyname*[fopttoks]{name} so that we can refer to the line later as \verb|neg conc|.
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -931,7 +1039,7 @@ Again, we use \keyname*[fopttoks]{name} so that we can refer to the line later a
[{\lnot (\exists x)(\forall y)(Py \liff x = y)}, subs=a, just=Conc.~neg., name=neg conc
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
Turning to tree \nyth*{}, we again note that its \bocsnyth{} is nested within the previous two, so the square brackets for its \wff{} need to be nested within those for the previous \wff{}s.
@@ -941,7 +1049,7 @@ This justification also refers to an earlier line in the proof.
We could write this as \verb|just=1 $\exists\elim$|, but instead we use the name we assigned earlier with the referencing feature provided by \pkg{prooftrees}.
To do this, we put the reference, \verb|pr| \emph{after} the rest of the justification, separating the two parts by a colon i.e.~\verb|$\exists\elim$:pr| and allow \pkg{prooftrees} to figure out the correct number.
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -951,7 +1059,7 @@ To do this, we put the reference, \verb|pr| \emph{after} the rest of the justifi
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
Continuing in the same way, we surround each of the \wff{}s for \nyth*{}, \nyth*{}, \nyth*{} and \nyth*{} within square brackets nested within those surrounding the previous \wff{} since each of the trees is nested within the previous one.
@@ -961,7 +1069,7 @@ For example, in the next line we add, we specify the justification as \verb|just
\verb|!u| refers to the current line's parent line --- in this case, \verb|{(\forall y)(Py \lif a = y) \land Pa}, checked, just=$\exists\elim$:pr|.
\verb|!uu| refers to the current line's parent line's parent line and so on.
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -979,14 +1087,14 @@ For example, in the next line we add, we specify the justification as \verb|just
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
Reaching \nyth*{}, things get a little more complex since we now have not one, but \emph{two} \bocsnyth{} nested within \nyth[7].
This means that we need \emph{two} sets of square brackets for \nyth{} --- one for each of its two trees.
Again, both of these should be nested within the square brackets for \nyth[7] but neither should be nested within the other because the trees for the two branches at \nyth{} are distinct.
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1008,14 +1116,14 @@ Again, both of these should be nested within the square brackets for \nyth[7] bu
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
At this point, we need to work separately or in parallel on each of our two branches since each constitutes its own tree.
Turning to trees \nyth*{}, each needs to be nested within the relevant tree \nyth[8], since each \bocsnyth{} is nested within the applicable branch's tree.
Hence, we nest square brackets for each of the \wff{}s at \nyth{} within the previous set.
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1041,7 +1149,7 @@ Hence, we nest square brackets for each of the \wff{}s at \nyth{} within the pre
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
We only have one tree \nyth*{} as there is no corresponding tree in the left-hand branch.
@@ -1054,7 +1162,7 @@ We can use \verb|close={8,10}| for this or we can use the same referencing syste
In either case, we again surrounding the argument with curly brackets to protect the comma.
\verb|!c| refers to the current line --- something useful in many close annotations, but not helpful in specifying non-circular justifications.
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1082,13 +1190,13 @@ In either case, we again surrounding the argument with curly brackets to protect
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
This completes the main right-hand branch of the tree and we can focus solely on the remaining left-hand one.
Tree \nyth*{} is straightforward --- we just need to nest it within the left-hand tree \nyth[9].
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1118,14 +1226,14 @@ Tree \nyth*{} is straightforward --- we just need to nest it within the left-han
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
At this point, the main left-hand branch itself branches, so we have two trees \nyth*{}.
Treating this in the same way as the earlier branch at \nyth[8], we use two sets of square brackets nested within those for tree \nyth{}, but with neither nested within the other.
Since we also want to mark the leftmost branch as closed, we add \verb|close={:to Pb or not to Pb,!c}| in the same way as before.
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1159,12 +1267,12 @@ Since we also want to mark the leftmost branch as closed, we add \verb|close={:t
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
We complete our initial specification by nesting \nyth*{} within the appropriate tree \nyth[12], again marking closure appropriately.
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1200,12 +1308,12 @@ We complete our initial specification by nesting \nyth*{} within the appropriate
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
Compiling our code, we find that the line numbering is not quite right:
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1241,7 +1349,7 @@ Compiling our code, we find that the line numbering is not quite right:
]
]
]
-\end{prooftree}
+\end{tableau}
\pkg{prooftrees} warns us about this:
\begin{latexcode}
@@ -1258,7 +1366,7 @@ by
\end{latexcode}
giving us the following code:
\begin{latexcode}
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1294,11 +1402,11 @@ giving us the following code:
]
]
]
-\end{prooftree}
+\end{tableau}
\end{latexcode}
which produces our desired result:
-\begin{prooftree}
+\begin{tableau}
{
to prove={(\exists x)((\forall y)(Py \lif x = y) \land Px) \sststile{}{} (\exists x)(\forall y)(Py \liff x = y)}
}
@@ -1334,7 +1442,7 @@ which produces our desired result:
]
]
]
-\end{prooftree}
+\end{tableau}
% END sec:ee
@@ -1393,7 +1501,7 @@ The following diagram provides an overview of the configuration and anatomy of a
Detailed documentation is provided in \cref{sec:ops} and \cref{sec:macros}.
\forestset{declare count register={cau},cau'=0}
-\begin{prooftree}
+\begin{tableau}
{
to prove={proof statement},
for tree={%
@@ -1472,7 +1580,7 @@ Detailed documentation is provided in \cref{sec:ops} and \cref{sec:macros}.
\end{scope}
}
[[[[][]]]][[[[[]][[[]]]][[]]]]]]]
-\end{prooftree}
+\end{tableau}
% END sec:anatomy
@@ -1916,6 +2024,54 @@ For example, if for some reason you would like bold line numbers, try
% END sec:macros
+\section{Memoization}\label{sec:memoize}
+% BEGIN sec:memoize
+
+Tableaux created by \pkg{prooftrees} cannot, in general, be externalised with \TikZ's \keyname[pkg]{\pkg{external}} library.
+Since \keyname[pkg]{\pkg{pgf}}/\TikZ{}, in general, and \pkg{prooftrees}, in particular, can be rather slow to compile, this is a serious issue.
+If you only have a two or three small tableaux, the compilation time will be negligible.
+But if you have large, complex proofs or many smaller ones, compilation time will quickly become excessive.
+
+Version 0.9 does not cure the disease, but it does offer an extremely effective remedy for the condition.
+While it does not make \pkg{prooftrees} any faster, it supports the \keyname[pkg]{\pkg{memoize}} package developed by \pkg{forest}'s author, Sašo Živanović \autocite*{saso-memoize-manual}.
+Memoization is faster, more secure, more robust and easier to use than \TikZ's externalisation.
+\begin{description}
+ \item[It is faster.] It does not require separate compilations for each memoized object, so it is comparatively fast even when memoizing.
+ \item[It is more secure.] It requires only restricted shell-escape, which almost all \TeX{} installations enable by default, so it is considerably more secure and can be utilised even where shell-escape is disabled.
+ \item[It is more robust.] It can successfully memoize code which defeats all ordinary mortals' attempts to externalize with the older \TikZ{} library.
+ \item[It is easier to use.] It requires less configuration and less intervention.
+ For example, it detects problematic code and aborts memoization automatically in many cases in which \TikZ's \pkg{external} would either cause a compilation error or silently produce nonsense output, forcing the user to manually disable the process for relevant code.
+\end{description}
+
+There is always a ‘but’, but this is a pretty small ‘but’ as ‘but’s go.
+\begin{description}
+ \item[But installation requires slightly more work.] To reap the full benefits, you want to use either the \texttt{perl} or the \texttt{python} ‘extraction’ method.
+ There is a third method, which does not require any special installation, but this lacks several of the advantages explained above and is not recommended.
+
+ If you use \TeX{} Live, you have \texttt{perl} already, but you may need to install a couple of libraries.
+ \texttt{python} is not a prerequisite for \TeX{} Live but, if you happen to have it installed, you will probably only need an additional library to use this method.
+
+ See \citetitle{saso-memoize-manual} \autocite{saso-memoize-manual} for further details.
+\end{description}
+
+Once you have the prerequisites setup, all you need do is load \pkg{memoize} \emph{before} \pkg{prooftrees}.
+
+\begin{latexcode}
+\usepackage[extraction method=perl]{memoize}% or python
+\usepackage{prooftrees}
+\end{latexcode}
+
+After a single compilation, your document will have expanded to include extra pages.
+At this point, it will look pretty weird.
+After the next compilation, your document will return to its normal self, the only difference being the speed with which it does so as all your memoized tableaux will simply be included, as opposed to recompiled.
+Only when you alter the code for a tableau, delete the generated files, disable memoization or explicitly request it will the proof be recompiled.
+
+Memoization is compatible with both \pkg{prooftrees}'s cross-referencing system and \LaTeXe's cross-references, but the latter require an additional compilation.
+In general, if a document element takes $n$ compilations to stabilise, it will take $n+1$ compilations to complete the memoization process.
+See \citetitle{saso-memoize-manual} \autocite{saso-memoize-manual} for details.
+
+% END sec:memoize
+
\section{Compatibility}\label{sec:compat}
% BEGIN sec:compat
@@ -1933,6 +2089,13 @@ This allows you to use \env{tableau} for \pkg{prooftrees} trees and \env{prooftr
\section{Version History}\label{sec:hanes}
% BEGIN sec:hanes
+\subsection{0.9}\label{subsec:0.9}
+% BEGIN subsec:0.9
+Add support for \pkg{memoize} and utilise for documentation.
+
+Use \cs{NewDocumentEnvironment}, removing direct dependency on \pkg{environ}.
+% END subsec:0.9
+
\subsection{0.8}
Add previously unnoticed dependency on \pkg{amstext}.
Attempt to fix straying closure symbols evident in documentation and a \TeX\ SE question\footnote{\url{https://tex.stackexchange.com/q/619314/}.}
@@ -1948,7 +2111,7 @@ See \cref{subsec:go}.
The main point of this option is to allow automatic moves to be switched off if one teaches students to first apply all available non-branching rules for the tableau as a whole, as opposed to all non-branching rules for the sub-tree.
The automatic algorithm is consistent with the latter, but not former, approach.
The algorithm favours compact trees, which are more likely to fit on \pkg{beamer} slides.
-Switching the algorithm off permits users to specify exactly how things should or should not be move.
+Switching the algorithm off permits users to specify exactly how things should or should not be moved.
Thanks to Peter Smith for prompting this.
Fix bug reported at \href{https://tex.stackexchange.com/q/479263/39222}{tex.stackexchange.com/q/479263/39222}.
@@ -2001,10 +2164,25 @@ First CTAN release.
% END sec:hanes
\printbibliography
-\clearpage
\loadgeometry{safonol}%
\fancyheadoffset[lh]{0pt}%
+
\printindex
+
+\onecolumn
+\appendix
+
+\section{Implementation}\label{sec:imp}
+
+{%
+ % \makeatletter
+ % \def\@xobeysp{\leavevmode\penalty100\ }%
+ % \makeatother
+ % \verbatiminput{prooftrees.sty}%
+}
+\lstinputlisting[style=lstsrc,numbers=left,inputencoding=utf8/latin1]{prooftrees.sty}
+
+
\end{document}
diff --git a/graphics/pgf/contrib/prooftrees/prooftrees_biber.bib b/graphics/pgf/contrib/prooftrees/prooftrees_biber.bib
index 021c9d1cfd..0a3ab30332 100644
--- a/graphics/pgf/contrib/prooftrees/prooftrees_biber.bib
+++ b/graphics/pgf/contrib/prooftrees/prooftrees_biber.bib
@@ -31,3 +31,12 @@
TITLE = {Forest: A {PGF}/Ti\mkbibemph{k}{Z}-Based Package for Drawing Linguistic Trees},
}
+@MANUAL{saso-memoize-manual,
+ AUTHOR = ZIVANOVIC-SASO,
+ URL = {https://www.ctan.org/pkg/memoize},
+ DATE = {2023-10-10},
+ EDITION = {1.0.0},
+ KEYWORDS = {TeX,LaTeX,PGF,TikZ,Forest,Memoize},
+ TITLE = {Memoize},
+}
+
diff --git a/graphics/pgf/contrib/sankey/README b/graphics/pgf/contrib/sankey/README
index aa0a7f627a..576bac9aaa 100644
--- a/graphics/pgf/contrib/sankey/README
+++ b/graphics/pgf/contrib/sankey/README
@@ -10,7 +10,7 @@ the flow rate.
license
=======
-Copyright (C) 2016-2021 by Paul Gaborit
+Copyright (C) 2016-2025 by Paul Gaborit
This file may be distributed and/or modified
diff --git a/graphics/pgf/contrib/sankey/sankey.dtx b/graphics/pgf/contrib/sankey/sankey.dtx
index 0338d1f761..c8de03c5f2 100644
--- a/graphics/pgf/contrib/sankey/sankey.dtx
+++ b/graphics/pgf/contrib/sankey/sankey.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2016, 2021 by Paul Gaborit
+% Copyright (C) 2016-2025 by Paul Gaborit
% -----------------------------------
%
% This work may be distributed and/or modified under the conditions of
@@ -30,6 +30,7 @@
%
%<*driver>
\documentclass[a4paper,10pt,draft]{ltxdoc}
+\SetupDoc{reportchangedates}
\usepackage{sankey-doc-preamble}
\EnableCrossrefs
\CodelineIndex
@@ -40,26 +41,6 @@
%</driver>
% \fi
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
-%
-% \CheckSum{1718}
-%
-%
% \GetFileInfo{\jobname.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
@@ -68,6 +49,7 @@
% \DoNotIndex{\def,\edef,\gdef,\xdef,\ifx,\else,\string,\relax}
% \DoNotIndex{\csname,\endcsname,\ifcsdef,\expandafter,\ifnumgreater}
% \DoNotIndex{\NewDocumentCommand,\NewDocumentEnvironment,\IfBooleanTF}
+% \DoNotIndex{\NewCommandCopy,\NewExpandableDocumentCommand}
% \DoNotIndex{\NeedsTeXFormat,\ProvidesPackage,\RequirePackage,\PackageError,\PackageWarning}
% \DoNotIndex{\newtoggle,\toggletrue,\togglefalse,\iftoggle,\ifdefempty,\ifundef,\ifdefstrequal}
% \DoNotIndex{\ifbool,\ifdef,\ifnumequal,\colorlet,\fpeval,\inteval,\newbool}
@@ -104,10 +86,11 @@
% pdfauthor=Paul Gaborit,
% }
%
+% \def\ttintitle#1{\textmd{\textcolor{red!50!black}{\texttt{#1}}}}
%
%
% \begin{abstract}
-% The \texttt{sankey} package provides macros and environments to
+% The \code{sankey} package provides macros and environments to
% build \emph{Sankey
% diagrams}\footnote{\url{https://en.wikipedia.org/wiki/Sankey_diagram}},
% i.e. \emph{flow diagrams} in which the width of the arrows is
@@ -119,6 +102,11 @@
%
% \end{abstract}
%
+%
+% \manualparts
+%
+% \clearpage
+%
% \manualparts
%
% \begin{quote}
@@ -131,11 +119,17 @@
% \label{usermanual}
%^^A % ------------------------------------------------------------
%
+% \changes{v3.0.2}{2025/10/10}{Update for new version of \protect\code{ltxdoc} class}
+%
+% \changes{v3.0.2}{2025/10/10}{Fixed extra parentheses in some code examples}
+%
% {
% \setlength{\parskip}{0pt}
% \localtableofcontents
% }
%
+% \clearpage
+%
%^^A % ------------------------------------------------------------
% \section{Preamble}
%^^A % ------------------------------------------------------------
@@ -149,13 +143,13 @@
% {\small Note: the
% \code{sankey} package requires automatically the
% \code{xparse}, \code{etoolbox}, \code{xfp} and
-% \code{tikz} packages, and the \code{calc},
+% \code{tikz} packages, as well as the \code{calc},
% \code{decorations.markings} and
% \code{dubins} (cf. \vref{sec:dubins}) TikZ libraries.\par}
%
%
%^^A % ------------------------------------------------------------
-% \section{The \texttt{sankeydiagram} environment}
+% \section{The \ttintitle{sankeydiagram} environment}
%^^A % ------------------------------------------------------------
%
% \DescribeEnv{sankeydiagram} %
@@ -175,35 +169,41 @@
%^^A % ------------------------------------------------------------
%
% The \code{sankey} package uses \code{pgfkeys} to set options via
-% \emph{key=value} pairs with default path \texttt{/sankey} (and
-% \texttt{/sankey/node parameters} for Sankey node parameters).
+% \emph{key=value} pairs with default path \code{/sankey} (and
+% \code{/sankey/node parameters} for Sankey node parameters).
+%
%
-% The options can be defined via the optional argument of the
-% \code{sankeydiagram} environment:
+% Options can be defined in three ways:
%
+% \begin{itemize}
+% \item via the optional argument of the
+% \code{sankeydiagram} environment:
+%
% \begin{lstlisting}[style=LaTeXsmall]
% \begin{sankeydiagram}[debug=true]
% \sankeynode{name=a,quantity=1,angle=0,at={0,0}}
% \end{sankeydiagram}
% \end{lstlisting}
-%
-% \DescribeMacro{\sankeyset} %
-% The options can also be modified via the \code{\sankeyset} macro:
-%
+%
+% \item \DescribeMacro{\sankeyset} %
+% via the \code{\sankeyset} macro:
+%
% \begin{lstlisting}[style=LaTeXsmall]
% \begin{sankeydiagram}
% \sankeyset{debug=true}
% \sankeynode{name=a,quantity=1,angle=0,at={0,0}}
% \end{sankeydiagram}
% \end{lstlisting}
-%
-% The options can be temporarily modified for a single macro:
+%
+% \item temporarily modified for a single macro:
% \begin{lstlisting}[style=LaTeXsmall]
% \begin{sankeydiagram}
% \sankeynode[debug=true]{name=a,quantity=1,angle=0,at={0,0}}
% \end{sankeydiagram}
% \end{lstlisting}
-%
+%
+% \end{itemize}
+%
% At the begining of each Sankey diagram, all options are initialized
% with initial values then the \code{every diagram} style is applied.
%
@@ -340,9 +340,9 @@
%^^A % ------------------------------------------------------------
%
% \begin{miniblock}
+% \DescribeMacro{\sankeynode} %
% \MACRO\code{\sankeynode}\OPTARG{\VAR{options}}\ARG{\VAR{node parameters}}
%
-% \DescribeMacro{\sankeynode} %
% The \code{\sankeynode} macro defines a Sankey node. The \VAR{options}
% can be any Sankey diagram keys. To define a Sankey node, you must
% provide a \emph{name}, a \emph{quantity} and an \emph{angle} as
@@ -363,8 +363,8 @@
% \end{sankeyoption}
%
% \begin{sankeyoption}[/sankey/node parameters]{at}{\VAR{at}}{}{0,0}
-% The position of the new Sankey node (a TikZ coordinate \emph{without}
-% round brackets or parentheses).
+% The position of the new Sankey node (a TikZ coordinate
+% \textbf{without} round brackets or parentheses).
% \end{sankeyoption}
%
% \begin{sankeyoption}[/sankey/node parameters]{anchor}{\VAR{anchor}}{}{center}
@@ -392,8 +392,7 @@
% \begin{sankeydiagram}[debug]
% \sankeynode{name=a,quantity=10}
% \sankeynode{name=b,quantity=5,angle=45,at={2,1},anchor=left}
-% \sankeynode{name=c,quantity=20,angle=-90,at={5,1},anchor=right}
-%
+% \sankeynode{name=c,quantity=20,angle=-90,at={5,0},anchor=right}
% \foreach \nodename/\pos in {a/left,b/below left,c/above}{
% \foreach \ancname in {left,center,right}{
% \node[node font=\ttfamily\footnotesize,\pos=1mm of \nodename.\ancname,
@@ -410,6 +409,9 @@
% %
% \lstinputlisting[style=LaTeXsmall]{\samplecodename}
% \end{miniblock}
+%
+%^^A % \clearpage
+%
%^^A % ------------------------------------------------------------
% \subsubsection{Choose default parameters}
%^^A % ------------------------------------------------------------
@@ -424,9 +426,9 @@
%^^A % ------------------------------------------------------------
%
% \begin{miniblock}
+% \DescribeMacro{\sankeynodestart} %
% \MACRO\code{\sankeynodestart}\OPTARG{\VAR{options}}\ARG{\VAR{node parameters}}
%
-% \DescribeMacro{\sankeynodestart} %
% The \code{\sankeynodestart} creates and fills/draws a starting Sankey
% node:
%
@@ -449,10 +451,10 @@
%
%
% \begin{miniblock}
+% \DescribeMacro{\sankeynodeend} %
% \MACRO\code{\sankeynodeend}\OPTARG{\VAR{options}}\ARG{\VAR{node
% parameters}}
%
-% \DescribeMacro{\sankeynodeend} %
% The \code{\sankeynodeend} creates and fills/draws an ending Sankey
% node:
%
@@ -547,21 +549,21 @@
% \subsection{Retrieve information from Sankey nodes}
%^^A % ------------------------------------------------------------
%
+% \DescribeMacro{\sankeygetnodeqty} %
% \MACRO\code{\sankeygetnodeqty}\ARG{\VAR{node name}}
%
-% \DescribeMacro{\sankeygetnodeqty} %
% The expandable command \code{\sankeygetnodeqty} returns the quantity
% assigned to the Sankey node named \VAR{node name}.
%
+% \DescribeMacro{\sankeyqtytolen} %
% \MACRO\code{\sankeyqtytolen}\ARG{\VAR{quantity}}
%
-% \DescribeMacro{\sankeyqtytolen} %
% The expandable \code{\sankeyqtytolen} macro converts \VAR{quantity} to
% graphical length using the current ratio.
%
+% \DescribeMacro{\sankeygetnodeorient} %
% \MACRO\code{\sankeygetnodeorient}\ARG{\VAR{node name}}
%
-% \DescribeMacro{\sankeygetnodeorient} %
% The expandable command \code{\sankeygetnodeorient} returns the angle
% (orientation) assigned to the Sankey node named \VAR{node name}.
%
@@ -658,13 +660,14 @@
%
%
% \begin{miniblock}
+% \DescribeMacro{\sankeyadvance} %
% \MACRO\code{\sankeyadvance}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{distance}}
%
-% \DescribeMacro{\sankeyadvance} The \code{\sankeyadvance} moves the
-% sankey node straight ahead and fills/draws this portion of the
-% sankey path. A positive \VAR{distance} moves forward while a
-% negative \VAR{distance} moves backward.
+% The \code{\sankeyadvance} moves the sankey node straight ahead and
+% fills/draws this portion of the sankey path. A positive
+% \VAR{distance} moves forward while a negative \VAR{distance} moves
+% backward.
%
% \begin{VerbatimOut}[gobble=2]{\samplecodename}
% \begin{tikzpicture}
@@ -677,6 +680,7 @@
% \sankeyadvance{b}{1cm}
% \sankeynodestart{name=c,quantity=10,angle=-90,at={5,1},anchor=right}
% \sankeyadvance{c}{5mm}
+% \fill[cyan] (0,0) circle(2pt) (2,1) circle(2pt) (5,1) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -689,11 +693,9 @@
% \begin{miniblock}
% \MACRO\code{\sankeyadvance*}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{distance}}
-%
-% \DescribeMacro{\sankeyadvance*} The \code{\sankeyadvance*} moves
-% the sankey node straight back and fills/draws this portion of the
-% sankey path. A positive \VAR{distance} moves backward while a
-% negative \VAR{distance} moves forward.
+%
+% The
+% \code{\sankeyadvance*} moves the sankey node straight back and fills/draws this portion of the sankey path. A positive \VAR{distance} moves backward while a negative \VAR{distance} moves forward.
%
% \begin{VerbatimOut}[gobble=2]{\samplecodename}
% \begin{tikzpicture}
@@ -706,6 +708,7 @@
% \sankeyadvance*{b}{1cm}
% \sankeynodeend{name=c,quantity=10,angle=-90,at={5,1},anchor=right}
% \sankeyadvance*{c}{5mm}
+% \fill[cyan] (0,0) circle(2pt) (2,1) circle(2pt) (5,1) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -720,10 +723,11 @@
%^^A % ------------------------------------------------------------
%
%\begin{miniblock}
+% \DescribeMacro{\sankeyturn} %
% \MACRO\code{\sankeyturn}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturn} The \code{\sankeyturn} macro moves the
+% The \code{\sankeyturn} macro moves the
% sankey node by turning to one side or the other and fills/draws
% this portion of the sankey path. A \emph{positive} \VAR{angle}
% turns left while a \emph{negative} \VAR{angle} turns right.
@@ -739,6 +743,7 @@
% \sankeyturn[minimum radius=1cm]{b}{-45}
% \sankeynodestart{name=c,quantity=10,angle=-90,at={5,1},anchor=right}
% \sankeyturn{c}{180}
+% \fill[cyan] (0,0) circle(2pt) (2,1) circle(2pt) (5,1) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -752,7 +757,7 @@
% \MACRO\code{\sankeyturn*}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturn*} The \code{\sankeyturn*} macro moves the
+% The \code{\sankeyturn*} macro moves the
% sankey node backward by turning right or left and fills/draws this
% portion of the sankey path. A \emph{positive} \VAR{angle} turns left
% while a \emph{negative} \VAR{angle} turns right.
@@ -768,6 +773,7 @@
% \sankeyturn*[minimum radius=1cm]{b}{-45}
% \sankeynodeend{name=c,quantity=10,angle=-90,at={3,1},anchor=right}
% \sankeyturn*{c}{180}
+% \fill[cyan] (0,0) circle(2pt) (2,1) circle(2pt) (3,1) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -782,13 +788,14 @@
%^^A % ------------------------------------------------------------
%
% \begin{miniblock}
+% \DescribeMacro{\sankeyturnleft} %
% \MACRO\code{\sankeyturnleft}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturnleft} The
-% \code{\sankeyturnleft} macro moves the sankey node by turning left
-% and fills/draws this portion of the sankey path. A \emph{positive}
-% \VAR{angle} turns forward while a \emph{negative} \VAR{angle} turns backward.
+% The \code{\sankeyturnleft} macro moves the sankey node by turning
+% left and fills/draws this portion of the sankey path. A
+% \emph{positive} \VAR{angle} turns forward while a \emph{negative}
+% \VAR{angle} turns backward.
%
% \begin{VerbatimOut}[gobble=2]{\samplecodename}
% \begin{tikzpicture}
@@ -801,6 +808,7 @@
% \sankeyset{fill/.style={fill=lime!20}}
% \sankeynodeend{name=b,quantity=5,angle=-135,at={1,2},anchor=left}
% \sankeyturnleft[minimum radius=1cm]{b}{-225}
+% \fill[cyan] (0,0) circle(2pt) (1,2) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -814,7 +822,7 @@
% \MACRO\code{\sankeyturnleft*}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturnleft*} The
+% The
% \code{\sankeyturnleft*} macro moves the sankey node backward
% by turning left and fills/draws this portion of the sankey path.
% A \emph{positive} \VAR{angle} turns backward while a
@@ -831,6 +839,7 @@
% \sankeyset{fill/.style={fill=lime!20}}
% \sankeynodestart{name=b,quantity=5,angle=-135,at={1,2},anchor=left}
% \sankeyturnleft*[minimum radius=.75cm]{b}{-225}
+% \fill[cyan] (0,0) circle(2pt) (1,2) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -841,13 +850,13 @@
% \end{miniblock}
%
% \begin{miniblock}
+% \DescribeMacro{\sankeyturnleftbackward} %
% \MACRO\code{\sankeyturnleftbackward}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturnleftbackward} The
-% \code{\sankeyturnleftbackward} macro moves the sankey node backward
-% by turning left and fills/draws this portion of the sankey path.
-% A \emph{positive} \VAR{angle} turns backward while a
+% The \code{\sankeyturnleftbackward} macro moves the sankey node
+% backward by turning left and fills/draws this portion of the sankey
+% path. A \emph{positive} \VAR{angle} turns backward while a
% \emph{negative} \VAR{angle} turns forward.
%
% \begin{VerbatimOut}[gobble=2]{\samplecodename}
@@ -861,6 +870,7 @@
% \sankeyset{fill/.style={fill=lime!20}}
% \sankeynodestart{name=b,quantity=5,angle=-135,at={1,2},anchor=left}
% \sankeyturnleftbackward[minimum radius=.75cm]{b}{-225}
+% \fill[cyan] (0,0) circle(2pt) (1,2) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -874,7 +884,7 @@
% \MACRO\code{\sankeyturnleftbackward*}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturnleftbackward*} The
+% The
% \code{\sankeyturnleftbackward*} macro moves the sankey node by turning left
% and fills/draws this portion of the sankey path. A \emph{positive}
% \VAR{angle} turns forward while a \emph{negative} \VAR{angle} turns backward.
@@ -890,6 +900,7 @@
% \sankeyset{fill/.style={fill=lime!20}}
% \sankeynodeend{name=b,quantity=5,angle=-135,at={1,2},anchor=left}
% \sankeyturnleftbackward*[minimum radius=1cm]{b}{-225}
+% \fill[cyan] (0,0) circle(2pt) (1,2) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -905,13 +916,14 @@
%^^A % ------------------------------------------------------------
%
% \begin{miniblock}
+% \DescribeMacro{\sankeyturnright} %
% \MACRO\code{\sankeyturnright}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturnright} The \code{\sankeyturnright} macro
-% moves the sankey node by turning right and fills/draws this portion
-% of the sankey path. A \emph{positive} \VAR{angle} turns forward
-% while a \emph{negative} \VAR{angle} turns backward.
+% The \code{\sankeyturnright} macro moves the sankey node by turning
+% right and fills/draws this portion of the sankey path. A
+% \emph{positive} \VAR{angle} turns forward while a \emph{negative}
+% \VAR{angle} turns backward.
%
% \begin{VerbatimOut}[gobble=2]{\samplecodename}
% \begin{tikzpicture}
@@ -924,6 +936,7 @@
% \sankeyset{fill/.style={fill=lime!20}}
% \sankeynodeend{name=b,quantity=5,angle=45,at={2,1},anchor=left}
% \sankeyturnright[minimum radius=.75cm]{b}{-225}
+% \fill[cyan] (0,0) circle(2pt) (2,1) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -937,7 +950,7 @@
% \MACRO\code{\sankeyturnright*}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturnright*} The \code{\sankeyturnright*} macro
+% The \code{\sankeyturnright*} macro
% moves the sankey node backward by turning right and fills/draws
% this portion of the sankey path. A \emph{positive} \VAR{angle} turns
% backward while a \emph{negative} \VAR{angle} turns forward.
@@ -953,6 +966,7 @@
% \sankeyset{fill/.style={fill=lime!20}}
% \sankeynodestart{name=b,quantity=5,angle=45,at={1,1},anchor=left}
% \sankeyturnright*[minimum radius=.75cm]{b}{-225}
+% \fill[cyan] (0,0) circle(2pt) (1,1) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -963,10 +977,10 @@
% \end{miniblock}
%
% \begin{miniblock}
+% \DescribeMacro{\sankeyturnrightbackward} %
% \MACRO\code{\sankeyturnrightbackward}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturnrightbackward}
% The \code{\sankeyturnrightbackward} macro
% moves the sankey node backward by turning right and fills/draws
% this portion of the sankey path. A \emph{positive} \VAR{angle} turns
@@ -983,6 +997,7 @@
% \sankeyset{fill/.style={fill=lime!20}}
% \sankeynodestart{name=b,quantity=5,angle=45,at={1,1},anchor=left}
% \sankeyturnrightbackward[minimum radius=.75cm]{b}{-225}
+% \fill[cyan] (0,0) circle(2pt) (1,1) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -996,7 +1011,7 @@
% \MACRO\code{\sankeyturnrightbackward*}\OPTARG{\VAR{options}}\ARG{\VAR{node
% name}}\ARG{\VAR{angle}}
%
-% \DescribeMacro{\sankeyturnrightbackward*} The
+% The
% \code{\sankeyturnrightbackward*} macro moves the sankey
% node forward by turning right and fills/draws this portion
% of the sankey path. A \emph{positive} \VAR{angle} turns forward
@@ -1013,6 +1028,7 @@
% \sankeyset{fill/.style={fill=lime!20}}
% \sankeynodeend{name=b,quantity=5,angle=45,at={2,1},anchor=left}
% \sankeyturnrightbackward*[minimum radius=.75cm]{b}{-225}
+% \fill[cyan] (0,0) circle(2pt) (2,1) circle(2pt);
% \end{sankeydiagram}
% \end{tikzpicture}
% \end{VerbatimOut}
@@ -1035,31 +1051,36 @@
% node to \code{A} node!
%
% \begin{miniblock}
+% \DescribeMacro{\sankeyoutin} %
% \MACRO\code{\sankeyoutin}\OPTARG{\VAR{options}}\ARG{\VAR{node
% A}}\ARG{\VAR{node B}}
%
-% \DescribeMacro{\sankeyoutin} The \code{\sankeyoutin} macro
+% The \code{\sankeyoutin} macro
% fills/draws a lane from \VAR{node A} to \VAR{node B} using a
% Bézier curve with regular steps (10 steps by default) to
% simulate constant width lane.
%
-% The constant width and the minimum curvature are \emph{not} guaranteed!
+% \textbf{Note:} The constant width and the minimum curvature are
+% \emph{not} guaranteed!
% \end{miniblock}
%
% \begin{miniblock}
+% \DescribeMacro{\sankeydubins} %
% \MACRO\code{\sankeydubins}\OPTARG{\VAR{options}}\ARG{\VAR{node
% A}}\ARG{\VAR{node B}}
%
-% \DescribeMacro{\sankeydubins} %
% The \code{\sankeydubins} macro fills/draws a lane between
% \VAR{node A} and \VAR{node B} using a Dubins
% path\footnote{\url{https://en.wikipedia.org/wiki/Dubins_path}}.
%
-% The constant width and the minimum curvature are guaranteed.
+% \textbf{Note:} The constant width and the minimum curvature are
+% guaranteed.
% \end{miniblock}
%
+% \clearpage
+%
%^^A % ------------------------------------------------------------
-% \subsubsection{Comparison between \texttt{outin} and \texttt{dubins}
+% \subsubsection{Comparison between \ttintitle{outin} and \ttintitle{dubins}
% paths}
%^^A % ------------------------------------------------------------
%
@@ -1083,7 +1104,7 @@
%
% \sankeyset{fill/.style={fill=lime!40}}
% \sankeynodestart{name=a,at={4,0},quantity=5}
-% \sankeynodeend{name=b,at={(8,3},quantity=5}
+% \sankeynodeend{name=b,at={8,3},quantity=5}
% \sankeydubins[minimum radius=5mm]{a}{b}
% \end{sankeydiagram}
% \end{tikzpicture}
@@ -1110,7 +1131,7 @@
%
% \sankeyset{fill/.style={fill=lime!40}}
% \sankeynodestart{name=a,at={4,0},quantity=5}
-% \sankeynodeend{name=b,at={(6,3},quantity=5}
+% \sankeynodeend{name=b,at={6,3},quantity=5}
% \sankeydubins[minimum radius=5mm]{a}{b}
% \end{sankeydiagram}
% \end{tikzpicture}
@@ -1137,7 +1158,7 @@
%
% \sankeyset{fill/.style={fill=lime!40}}
% \sankeynodestart{name=a,at={4,0},quantity=5}
-% \sankeynodeend{name=b,at={(4,3},quantity=5}
+% \sankeynodeend{name=b,at={4,3},quantity=5}
% \sankeydubins[minimum radius=5mm]{a}{b}
% \end{sankeydiagram}
% \end{tikzpicture}
@@ -1149,7 +1170,7 @@
% \end{miniblock}
%
%^^A % ------------------------------------------------------------
-% \subsubsection{Examples of \texttt{dubins} paths}
+% \subsubsection{Examples of \ttintitle{dubins} paths}
%^^A % ------------------------------------------------------------
%
% \begin{miniblock}
@@ -1195,13 +1216,13 @@
%^^A % ------------------------------------------------------------
%
% \begin{miniblock}
-% \MACRO\code{\sankeystart}\OPTARG{\VAR{options}}\ARG{\VAR{name}}
-%
-% \DescribeMacro{\sankeystart} %
-% The \code{\sankeystart} fills/draws a starting extremity attached to
-% the preexisting Sankey node \VAR{name}:
-%
-%
+% \DescribeMacro{\sankeystart} %
+% \MACRO\code{\sankeystart}\OPTARG{\VAR{options}}\ARG{\VAR{name}}
+%
+% The \code{\sankeystart} fills/draws a starting extremity attached to
+% the preexisting Sankey node \VAR{name}:
+%
+%
% \begin{VerbatimOut}[gobble=2]{\samplecodename}
% \begin{tikzpicture}
% \begin{sankeydiagram}
@@ -1224,9 +1245,9 @@
%
%
% \begin{miniblock}
+% \DescribeMacro{\sankeyend} %
% \MACRO\code{\sankeyend}\OPTARG{\VAR{options}}\ARG{\VAR{name}}
%
-% \DescribeMacro{\sankeyend} %
% The \code{\sankeyend} fills/draws an ending extremity attached to
% the preexisting Sankey node \VAR{name}:
%
@@ -1257,7 +1278,7 @@
% \subsubsection{Create and fork a Sankey node}
%^^A % ------------------------------------------------------------
%
-% \changes{v3.0}{2021/03/14}{add keys to fork a Sankey node during its
+% \changes{v3.0}{2021/03/14}{Add keys to fork a Sankey node during its
% creation}
%
% \begin{miniblock}
@@ -1314,9 +1335,9 @@
% \subsubsection{Fork a Sankey node}
%^^A % ------------------------------------------------------------
% \begin{miniblock}
+% \DescribeMacro{\sankeyfork} %
% \MACRO\code{\sankeyfork}\OPTARG{\VAR{options}}\ARG{\VAR{name}}\ARG{\VAR{quantity/name pairs}}
%
-% \DescribeMacro{\sankeyfork} %
% The \code{\sankeyfork} macro splits the preexisting Sankey node
% named \VAR{name} in a list of new Sankey subnodes. The
% \VAR{quantity/name pairs} is a comma separated list of
@@ -1344,7 +1365,7 @@
%^^A % ------------------------------------------------------------
%
%^^A % ------------------------------------------------------------
-% \subsection{The \texttt{debug} layer}
+% \subsection{The \ttintitle{debug} layer}
%^^A % ------------------------------------------------------------
%
% The options \code{debug} key uses the \code{sankeydebug} layer to draw
@@ -1378,7 +1399,7 @@
% \end{lstlisting}
%
%^^A % ------------------------------------------------------------
-% \subsection{The \texttt{dubins} TikZ library}
+% \subsection{The \ttintitle{dubins} TikZ library}
% \label{sec:dubins}
%^^A % ------------------------------------------------------------
%
@@ -1390,9 +1411,9 @@
% \subsection{How to duplicate a Sankey node}
%^^A % ------------------------------------------------------------
%
+% \DescribeMacro{\sankeynodealias} %
% \MACRO\code{\sankeynodealias}\ARG{\VAR{origname}}\ARG{\VAR{clonename}}
%
-% \DescribeMacro{\sankeynodealias} %
% The \code{\sankeynodealias} macro clones the Sankey node named
% \VAR{origname} into the Sankey node named \VAR{clonename}.
%
@@ -1727,7 +1748,7 @@
% \section{Example from question on TeX.se}
%^^A % ------------------------------------------------------------
%
-% \changes{v3.0}{2021/03/14}{fix bad names in second example}
+% \changes{v3.0}{2021/03/14}{Fix bad names in second example}
%
% \embedfile[mimetype=text/plain]{sankey-example2.tex}
%
@@ -1946,7 +1967,7 @@
% \section{Reproduction of an example from Google Charts documentation}
%^^A % ------------------------------------------------------------
%
-% \changes{v3.0}{2021/03/14}{add the reproduction of an example from
+% \changes{v3.0}{2021/03/14}{Add the reproduction of an example from
% Google Charts documentation}
%
% \embedfile[mimetype=text/plain]{sankey-example3.tex}
@@ -2313,7 +2334,7 @@
% for Adyen's second half 2018 report to shareholders. It is coded here
% with her kind permission.
%
-% You can change the data values between lines 28 and 53.
+% You can change the data values between lines 27 and 52.
%
% See figure~\vref{fig:nice-example}. The \code{sankey-example4.tex}
% file contains the following code and is an attachement of the current
@@ -2585,13 +2606,13 @@
% }
%
%
-% \changes{v3.0.1}{2022/02/04}{fix options used by the new version of siunitx}
+% \changes{v3.0.1}{2022/02/04}{Fix options used by the new version of \protect\code{siunitx} package}
%
%^^A % ------------------------------------------------------------
-% \section{Compiling \texttt{sankey}}
+% \section{Compiling \ttintitle{sankey}}
%^^A % ------------------------------------------------------------
%
-% \changes{v3.0.1}{2022/02/04}{instructions for compiling and installing the
+% \changes{v3.0.1}{2022/02/04}{Add instructions for compiling and installing the
% package}
%
% To produce the \code{sankey} package:
@@ -2618,15 +2639,15 @@
%
%
%^^A % ------------------------------------------------------------
-% \section{The \texttt{sankey.sty} file}
+% \section{The \ttintitle{sankey.sty} file}
%^^A % ------------------------------------------------------------
%
% Poorly commented source code...
%
-% \changes{v1.0}{2016/03/06}{first version}
-% \changes{v2.0}{2021/01/27}{first public version (on \CTAN)}
-% \changes{v3.0}{2021/03/14}{better naming rule}
-% \changes{v3.0}{2021/03/14}{use .ins and .dtx files}
+% \changes{v1.0}{2016/03/06}{First version}
+% \changes{v2.0}{2021/01/27}{First public version (on \CTAN)}
+% \changes{v3.0}{2021/03/14}{Better naming rule}
+% \changes{v3.0}{2021/03/14}{Use \protect\code{.ins} and \protect\code{.dtx} files}
%
% \iffalse
%<*sankey>
@@ -2636,7 +2657,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2015/10/01]
-\ProvidesPackage{sankey}[2022/02/04 v3.0.1 to draw Sankey diagrams]
+\ProvidesPackage{sankey}[2025/01/10 v3.0.2 to draw Sankey diagrams]
% \end{macrocode}
%
% All required packages and TikZ libraries:
@@ -2700,7 +2721,7 @@
%
%^^A % ------------------------------------------------------------
% \subsubsection{Definition of \emph{global} and \emph{expanded} fields (using
-% \texttt{\protect\string\xdef})}
+% \ttintitle{\protect\string\xdef})}
%^^A % ------------------------------------------------------------
%
% \begin{macro}{\snk@setnodeqty}
@@ -2728,7 +2749,7 @@
% \end{macro}
%
%^^A % ------------------------------------------------------------
-% \subsubsection{Definitions of \emph{local} fields (using \texttt{\protect\string\def})}
+% \subsubsection{Definitions of \emph{local} fields (using \ttintitle{\protect\string\def})}
%^^A % ------------------------------------------------------------
%
% \begin{macro}{\snk@setstartfill}
@@ -2795,7 +2816,7 @@
% \end{macro}
%
%^^A % ------------------------------------------------------------
-% \subsection{The \texttt{sankey node} shape}
+% \subsection{The \ttintitle{sankey node} shape}
%^^A % ------------------------------------------------------------
%
%
@@ -3191,21 +3212,6 @@
},
}
% \end{macrocode}
-%
-%^^A % ------------------------------------------------------------
-% \subsection{The \texttt{sankeydiagram} environment}
-% ^^A % ------------------------------------------------------------
-%
-% \begin{environment}{sankeydiagram}
-%
-% The \code{sankeydiagram} environment defines locally all the macros
-% used by a Sankey diagram. Then it applies the %
-% \code{@initial options} and \code{every diagram} styles (in this
-% order) and applies all the keys provided in its optional argument.
-%
-% \begin{macrocode}
-\NewDocumentEnvironment{sankeydiagram}{O{}}{
-% \end{macrocode}
%
%^^A % ------------------------------------------------------------
% \subsection{Internal macros}
@@ -3217,10 +3223,10 @@
% node\footnote{Thanks to Andrew Stacey \url{https://tex.stackexchange.com/a/33765/14500}}.
%
% \begin{macrocode}
- \def\snk@getpos##1##2{%
- \tikz@scan@one@point\pgfutil@firstofone(##2)\relax%
- \edef##1{\the\pgf@x,\the\pgf@y}%
- }
+\def\snk@getpos#1#2{%
+ \tikz@scan@one@point\pgfutil@firstofone(#2)\relax%
+ \edef#1{\the\pgf@x,\the\pgf@y}%
+}
% \end{macrocode}
% \end{macro}
%
@@ -3229,7 +3235,7 @@
% The \code{\snk@modulo} macro evaluates \#1 modulo \#2 using \code{\fpeval}.
%
% \begin{macrocode}
- \def\snk@modulo##1##2{\fpeval{##1-(floor((##1)/(##2),0)*##2)}}
+\def\snk@modulo#1#2{\fpeval{#1-(floor((#1)/(#2),0)*#2)}}
% \end{macrocode}
% \end{macro}
%
@@ -3239,9 +3245,9 @@
% $-180$ and $180$ (using \code{\fpeval}).
%
% \begin{macrocode}
- \def\snk@normalize@angle##1{%
- \fpeval{\snk@modulo{(##1)+180}{360}-180}%
- }
+\def\snk@normalize@angle#1{%
+ \fpeval{\snk@modulo{(#1)+180}{360}-180}%
+}
% \end{macrocode}
% \end{macro}
%
@@ -3254,22 +3260,22 @@
% \code{/sankey/debug normal} and \code{/sankey/debug label} Tikz styles.
%
% \begin{macrocode}
- \def\snk@show@debug##1{% node name
- \iftoggle{sankey debug}{
- \begingroup
- \edef\name{##1}
- \edef\qty{\sankeygetnodeqty{\name}}
- \edef\orient{\sankeygetnodeorient{\name}}
- \begin{pgfonlayer}{sankeydebug}
- \path[/sankey/debug line] (\name.left) -- (\name.right);
- \pgfmathsetmacro{\snk@len}{\sankeyqtytolen{\qty}/3}
- \path[/sankey/debug normal] (\name.center)
- -- ($(\name.center)!\snk@len pt!90:(\name.right)$)
- node[/sankey/debug label,rotate=\orient+90+\snk@rotate,anchor=north];
- \end{pgfonlayer}
- \endgroup
- }{}
- }
+\def\snk@show@debug#1{% node name
+ \iftoggle{sankey debug}{
+ \begingroup
+ \edef\name{#1}
+ \edef\qty{\sankeygetnodeqty{\name}}
+ \edef\orient{\sankeygetnodeorient{\name}}
+ \begin{pgfonlayer}{sankeydebug}
+ \path[/sankey/debug line] (\name.left) -- (\name.right);
+ \pgfmathsetmacro{\snk@len}{\sankeyqtytolen{\qty}/3}
+ \path[/sankey/debug normal] (\name.center)
+ -- ($(\name.center)!\snk@len pt!90:(\name.right)$)
+ node[/sankey/debug label,rotate=\orient+90+\snk@rotate,anchor=north];
+ \end{pgfonlayer}
+ \endgroup
+ }{}
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\snk@makeforkednode}
@@ -3281,47 +3287,47 @@
% The \code{\snk@makeforkednode} forks a Sankey node.
%
% \begin{macrocode}
- \def\snk@makeforkednode{
- \begingroup
- \ifdefempty{\snk@listofforks}{
- \ifdefempty{\snk@forkanchor}{}{
- \PackageWarning{sankey}%
- {Can't use 'fork anchor' key without 'forked' key}
- }
- }{
- \def\snk@tot{0}
- \def\snk@added@values{}
- \sankeyset{
- @add forked node/.code args={####1/####2}{
- \coordinate (####2) at ($(\name.left)%
- !\fpeval{(\snk@tot+.5*(####1))/\qty}%
- !(\name.right)$);
- \edef\snk@orient{\orient}
- \sankeynode[debug=false]
- {name=####2,quantity=####1,at=####2,angle=\snk@orient}
- \edef\snk@tot{\fpeval{\snk@tot+####1}}
- \edef\snk@added@values{\snk@added@values+####1}
- },
- @add forked node/.list/.expand once=\snk@listofforks,
- }
- \edef\snk@diff{\fpeval{abs(\qty-\snk@tot)}}
- \ifnumequal{\snk@diff}{0}{}{
- \PackageWarning{sankey}%
- {^^J*** Warning: bad sankey fork: %
- \qty\space!=\space\snk@added@values(=\snk@tot)%
- ^^J\snk@listofforks}
- }
- \ifdefempty{\snk@forkanchor}{
- \edef\snk@forkanchor{\name.\snk@anchor}
- }{}
- \snk@getpos\snk@c{$(\snk@forkanchor) - (\pos)$}
- \sankeynode{as=\name,at={$(\name) - (\snk@c)$}}
- \foreach \snk@subnodeqty/\snk@subnodename in \snk@listofforks {
- \sankeynode{as=\snk@subnodename,at={$(\snk@subnodename) - (\snk@c)$}}
- }
+\def\snk@makeforkednode{
+ \begingroup
+ \ifdefempty{\snk@listofforks}{
+ \ifdefempty{\snk@forkanchor}{}{
+ \PackageWarning{sankey}%
+ {Can't use 'fork anchor' key without 'forked' key}
+ }
+ }{
+ \def\snk@tot{0}
+ \def\snk@added@values{}
+ \sankeyset{
+ @add forked node/.code args={##1/##2}{
+ \coordinate (##2) at ($(\name.left)%
+ !\fpeval{(\snk@tot+.5*(##1))/\qty}%
+ !(\name.right)$);
+ \edef\snk@orient{\orient}
+ \sankeynode[debug=false]
+ {name=##2,quantity=##1,at=##2,angle=\snk@orient}
+ \edef\snk@tot{\fpeval{\snk@tot+##1}}
+ \edef\snk@added@values{\snk@added@values+##1}
+ },
+ @add forked node/.list/.expand once=\snk@listofforks,
+ }
+ \edef\snk@diff{\fpeval{abs(\qty-\snk@tot)}}
+ \ifnumequal{\snk@diff}{0}{}{
+ \PackageWarning{sankey}%
+ {^^J*** Warning: bad sankey fork: %
+ \qty\space!=\space\snk@added@values(=\snk@tot)%
+ ^^J\snk@listofforks}
+ }
+ \ifdefempty{\snk@forkanchor}{
+ \edef\snk@forkanchor{\name.\snk@anchor}
+ }{}
+ \snk@getpos\snk@c{$(\snk@forkanchor) - (\pos)$}
+ \sankeynode{as=\name,at={$(\name) - (\snk@c)$}}
+ \foreach \snk@subnodeqty/\snk@subnodename in \snk@listofforks {
+ \sankeynode{as=\snk@subnodename,at={$(\snk@subnodename) - (\snk@c)$}}
}
- \endgroup
}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3337,15 +3343,15 @@
% by default) at \code{\pos} position.
%
% \begin{macrocode}
- \def\snk@makenode{
- \begingroup
- \snk@setnodeqty{\name}{\qty}
- \edef\orient{\snk@normalize@angle{\orient}}
- \snk@setnodeorient{\name}{\orient}
- \ifundef{\snk@anchor}{\def\snk@anchor{center}}{}
- \node[/sankey/@sankey node={\name}{\pos}{\snk@anchor}];
- \endgroup
- }
+\def\snk@makenode{
+ \begingroup
+ \snk@setnodeqty{\name}{\qty}
+ \edef\orient{\snk@normalize@angle{\orient}}
+ \snk@setnodeorient{\name}{\orient}
+ \ifundef{\snk@anchor}{\def\snk@anchor{center}}{}
+ \node[/sankey/@sankey node={\name}{\pos}{\snk@anchor}];
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
%
@@ -3358,12 +3364,12 @@
% the Sankey node named \code{\name}.
%
% \begin{macrocode}
- \def\snk@filldrawstart{
- \begin{scope}[shift={(\name)},rotate=\orient]
- \path[/sankey/fill] \snk@getstartfill{\snk@startstyle};
- \path[/sankey/draw] \snk@getstartdraw{\snk@startstyle};
- \end{scope}
- }
+\def\snk@filldrawstart{
+ \begin{scope}[shift={(\name)},rotate=\orient]
+ \path[/sankey/fill] \snk@getstartfill{\snk@startstyle};
+ \path[/sankey/draw] \snk@getstartdraw{\snk@startstyle};
+ \end{scope}
+}
% \end{macrocode}
% \end{macro}
%
@@ -3376,12 +3382,12 @@
% the Sankey node named \code{\name}.
%
% \begin{macrocode}
- \def\snk@filldrawend{
- \begin{scope}[shift={(\name)},rotate=\sankeygetnodeorient{\name}]
- \path[/sankey/fill] \snk@getendfill{\snk@endstyle};
- \path[/sankey/draw] \snk@getenddraw{\snk@endstyle};
- \end{scope}
- }
+\def\snk@filldrawend{
+ \begin{scope}[shift={(\name)},rotate=\sankeygetnodeorient{\name}]
+ \path[/sankey/fill] \snk@getendfill{\snk@endstyle};
+ \path[/sankey/draw] \snk@getenddraw{\snk@endstyle};
+ \end{scope}
+}
% \end{macrocode}
% \end{macro}
%
@@ -3394,19 +3400,19 @@
% of the macro which requested the verification).
%
% \begin{macrocode}
- \def\snk@checkquantities##1##2##3{
- \begingroup
- \edef\snk@qtyi{\sankeygetnodeqty{##1}}
- \edef\snk@qtyii{\sankeygetnodeqty{##2}}
- \ifdefstrequal{\snk@qtyi}{\snk@qtyii}{}{
- \PackageError{sankey}%
- {^^J*** \string##3: quantities differ between %
- ##1 (\snk@qtyi) and ##2 (\snk@qtyii)%
- ^^J}%
- {The quantities of the two Sankey nodes must be equal.}
- }
- \endgroup
+\def\snk@checkquantities#1#2#3{
+ \begingroup
+ \edef\snk@qtyi{\sankeygetnodeqty{#1}}
+ \edef\snk@qtyii{\sankeygetnodeqty{#2}}
+ \ifdefstrequal{\snk@qtyi}{\snk@qtyii}{}{
+ \PackageError{sankey}%
+ {^^J*** \string#3: quantities differ between %
+ #1 (\snk@qtyi) and #2 (\snk@qtyii)%
+ ^^J}%
+ {The quantities of the two Sankey nodes must be equal.}
}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3416,76 +3422,80 @@
% \subsection{User macros}
%^^A % ------------------------------------------------------------
%
-% \begin{macro}{\sankeydubins}
-%
-% The \code{\sankeydubins} macro links two Sankey nodes via
-% a Dubins path. First, it computes the Dubins path between
-% centers (left and right radii are the same) and stores the
-% result in \code{sankey}. Then it uses the stored result
-% to fill and draw the lane (left border and right borders
-% use Dubins paths with asymmetric radii).
-%
+% The user macros are globally defined as internal (with \code{snk@}
+% prefix) and locally defined in the \code{sankeydiagram} environment as
+% user macros (without the \code{snk@} prefix).
+%
+% \begin{macro}{\snk@sankeydubins}
+%
+% The \code{\snk@sankeydubins} macro links two Sankey nodes via a
+% Dubins path. First, it computes the Dubins path between centers
+% (left and right radii are the same) and stores the result in
+% \code{sankey}. Then it uses the stored result to fill and draw the
+% lane (left border and right borders use Dubins paths with asymmetric
+% radii).
+%
% \begin{macrocode}
- \NewDocumentCommand\sankeydubins{O{}mm}{% options, sn, en
- \snk@errorifnotdefined{##2}
- \snk@errorifnotdefined{##3}
- \snk@checkquantities{##2}{##3}{\sankeydubins}
- \begingroup
- \sankeyset{##1}
- \pgfmathsetmacro\qty{\sankeygetnodeqty{##2}}
- \dubinspathset{
- sankey/.style={
- start point=##2.center,start angle=\sankeygetnodeorient{##2},
- end point=##3.center,end angle=\sankeygetnodeorient{##3},
- minimum radius=\snk@minradius + .5 * \sankeyqtytolen{\qty} pt,
- },
- }
- \dubinspathcalc{sankey,store=sankey}
- \dubinspathset{
- left border/.style={
- sankey, use store=sankey,
- left and right minimum radii={\snk@minradius}
- and {\snk@minradius + \sankeyqtytolen{\qty} pt},
- },
- right border/.style={
- sankey, use store=sankey,
- left and right minimum radii=
- {\snk@minradius + \sankeyqtytolen{\qty} pt}
- and {\snk@minradius},
- },
- }
- % fill the region
- \path[/sankey/fill] (##2.left) \dubinspath{left border}
- -- (##3.left) -- (##3.right) \dubinspath{right border,reverse}
- -- (##2.right) -- cycle;
- % draw left and right borders
- \path[/sankey/draw] (##2.left) \dubinspath{left border}
- (##2.right) \dubinspath{right border};
- \endgroup
+\NewDocumentCommand\snk@sankeydubins{O{}mm}{% options, sn, en
+ \snk@errorifnotdefined{#2}
+ \snk@errorifnotdefined{#3}
+ \snk@checkquantities{#2}{#3}{\sankeydubins}
+ \begingroup
+ \sankeyset{#1}
+ \pgfmathsetmacro\qty{\sankeygetnodeqty{#2}}
+ \dubinspathset{
+ sankey/.style={
+ start point=#2.center,start angle=\sankeygetnodeorient{#2},
+ end point=#3.center,end angle=\sankeygetnodeorient{#3},
+ minimum radius=\snk@minradius + .5 * \sankeyqtytolen{\qty} pt,
+ },
+ }
+ \dubinspathcalc{sankey,store=sankey}
+ \dubinspathset{
+ left border/.style={
+ sankey, use store=sankey,
+ left and right minimum radii={\snk@minradius}
+ and {\snk@minradius + \sankeyqtytolen{\qty} pt},
+ },
+ right border/.style={
+ sankey, use store=sankey,
+ left and right minimum radii=
+ {\snk@minradius + \sankeyqtytolen{\qty} pt}
+ and {\snk@minradius},
+ },
}
+ % fill the region
+ \path[/sankey/fill] (#2.left) \dubinspath{left border}
+ -- (#3.left) -- (#3.right) \dubinspath{right border,reverse}
+ -- (#2.right) -- cycle;
+ % draw left and right borders
+ \path[/sankey/draw] (#2.left) \dubinspath{left border}
+ (#2.right) \dubinspath{right border};
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\snk@sankeyoutin}
%
-% \begin{macro}{\sankeyoutin}
-%
-% The \code{\sankeyoutin} macro links two Sankey nodes via a Bézier curve.
-% First, to simulate constant width, it creates \code{\snk@stepoutin}
-% intermediate Sankey nodes along the Bézier curve. Then, the lane is
-% filled and drawn linking all the intermediate Sankey node via smaller
-% Bézier curves.
-%
+% The \code{\snk@sankeyoutin} macro links two Sankey nodes via a
+% Bézier curve. First, to simulate constant width, it creates
+% \code{\snk@stepoutin} intermediate Sankey nodes along the Bézier
+% curve. Then, the lane is filled and drawn linking all the
+% intermediate Sankey node via smaller Bézier curves.
+%
% \begin{macrocode}
- \NewDocumentCommand\sankeyoutin{O{}mm}{% options, sn, en
- \snk@errorifnotdefined{##2}
- \snk@errorifnotdefined{##3}
- \snk@checkquantities{##2}{##3}{\sankeyoutin}
- \begingroup
- \sankeyset{##1}
- \edef\qty{\sankeygetnodeqty{##2}}
- \pgfmathsetmacro\snk@len{\sankeyqtytolen{\qty}/2}
- \edef\snk@step{\fpeval{1/\snk@stepoutin}}
- \edef\snk@laststep{\inteval{\snk@stepoutin-1}}
- \path[overlay,decorate,decoration={
+\NewDocumentCommand\snk@sankeyoutin{O{}mm}{% options, sn, en
+ \snk@errorifnotdefined{#2}
+ \snk@errorifnotdefined{#3}
+ \snk@checkquantities{#2}{#3}{\sankeyoutin}
+ \begingroup
+ \sankeyset{#1}
+ \edef\qty{\sankeygetnodeqty{#2}}
+ \pgfmathsetmacro\snk@len{\sankeyqtytolen{\qty}/2}
+ \edef\snk@step{\fpeval{1/\snk@stepoutin}}
+ \edef\snk@laststep{\inteval{\snk@stepoutin-1}}
+ \path[overlay,decorate,decoration={
markings,
mark=between positions \snk@step and {\fpeval{1-.5*\snk@step}}
step \snk@step with {
@@ -3500,533 +3510,563 @@
;
}
}]
- (##2.center)
- to[out=\sankeygetnodeorient{##2},in=\sankeygetnodeorient{##3}+180]
- (##3.center);
- \foreach \snk@ptnum in {1,...,\snk@laststep}{
- \edef\snk@outinmidptname{snk@outinmidpt-\snk@ptnum}
- \dbp@anglebetween\snk@outinmidptangle%
- {\snk@outinmidptname-r}{\snk@outinmidptname-l}
- \sankeynode[debug=false]{%
- name=\snk@outinmidptname,
- quantity=\qty,
- angle=\snk@outinmidptangle-90,%
- at=\snk@outinmidptname%
- }
- }
+ (#2.center)
+ to[out=\sankeygetnodeorient{#2},in=\sankeygetnodeorient{#3}+180]
+ (#3.center);
+ \foreach \snk@ptnum in {1,...,\snk@laststep}{
+ \edef\snk@outinmidptname{snk@outinmidpt-\snk@ptnum}
+ \dbp@anglebetween\snk@outinmidptangle%
+ {\snk@outinmidptname-r}{\snk@outinmidptname-l}
\sankeynode[debug=false]{%
- name={snk@outinmidpt-0},
- quantity=\sankeygetnodeqty{##2},
- angle=\sankeygetnodeorient{##2},%
- at={##2}%
+ name=\snk@outinmidptname,
+ quantity=\qty,
+ angle=\snk@outinmidptangle-90,%
+ at=\snk@outinmidptname%
}
- \sankeynode[debug=false]{%
- name={snk@outinmidpt-\snk@stepoutin},
- quantity={\sankeygetnodeqty{##3}},
- angle={\sankeygetnodeorient{##3}},%
- at={##3}%
- }
- \path[/sankey/fill,looseness=1]
- (snk@outinmidpt-0.left)
- \foreach \snk@curpt
- [remember=\snk@curpt as \snk@prevpt (initially 0)]
- in {1,...,\snk@stepoutin}{
- to[out=\sankeygetnodeorient{snk@outinmidpt-\snk@prevpt},
+ }
+ \sankeynode[debug=false]{%
+ name={snk@outinmidpt-0},
+ quantity=\sankeygetnodeqty{#2},
+ angle=\sankeygetnodeorient{#2},%
+ at={#2}%
+ }
+ \sankeynode[debug=false]{%
+ name={snk@outinmidpt-\snk@stepoutin},
+ quantity={\sankeygetnodeqty{#3}},
+ angle={\sankeygetnodeorient{#3}},%
+ at={#3}%
+ }
+ \path[/sankey/fill,looseness=1]
+ (snk@outinmidpt-0.left)
+ \foreach \snk@curpt
+ [remember=\snk@curpt as \snk@prevpt (initially 0)]
+ in {1,...,\snk@stepoutin}{
+ to[out=\sankeygetnodeorient{snk@outinmidpt-\snk@prevpt},
in=\sankeygetnodeorient{snk@outinmidpt-\snk@curpt}+180]
- (snk@outinmidpt-\snk@curpt.left)
- }
- --
- (snk@outinmidpt-\snk@stepoutin.right)
- \foreach \snk@curpt
- [remember=\snk@curpt as \snk@prevpt (initially \snk@stepoutin)]
- in {\snk@laststep,...,0}{
- to[out=\sankeygetnodeorient{snk@outinmidpt-\snk@prevpt}+180,
+ (snk@outinmidpt-\snk@curpt.left)
+ }
+ --
+ (snk@outinmidpt-\snk@stepoutin.right)
+ \foreach \snk@curpt
+ [remember=\snk@curpt as \snk@prevpt (initially \snk@stepoutin)]
+ in {\snk@laststep,...,0}{
+ to[out=\sankeygetnodeorient{snk@outinmidpt-\snk@prevpt}+180,
in=\sankeygetnodeorient{snk@outinmidpt-\snk@curpt}]
- (snk@outinmidpt-\snk@curpt.right)
- }
- -- cycle;
- \path[/sankey/draw,looseness=1]
- (snk@outinmidpt-0.left)
- \foreach \snk@curpt
- [remember=\snk@curpt as \snk@prevpt (initially 0)]
- in {1,...,\snk@stepoutin}{
- to[out=\sankeygetnodeorient{snk@outinmidpt-\snk@prevpt},
+ (snk@outinmidpt-\snk@curpt.right)
+ }
+ -- cycle;
+ \path[/sankey/draw,looseness=1]
+ (snk@outinmidpt-0.left)
+ \foreach \snk@curpt
+ [remember=\snk@curpt as \snk@prevpt (initially 0)]
+ in {1,...,\snk@stepoutin}{
+ to[out=\sankeygetnodeorient{snk@outinmidpt-\snk@prevpt},
in=\sankeygetnodeorient{snk@outinmidpt-\snk@curpt}+180]
- (snk@outinmidpt-\snk@curpt.left)
- }
- (snk@outinmidpt-\snk@stepoutin.right)
- \foreach \snk@curpt
- [remember=\snk@curpt as \snk@prevpt (initially \snk@stepoutin)]
- in {\snk@laststep,...,0}{
- to[out=\sankeygetnodeorient{snk@outinmidpt-\snk@prevpt}+180,
- in=\sankeygetnodeorient{snk@outinmidpt-\snk@curpt}]
- (snk@outinmidpt-\snk@curpt.right)
- };
- \endgroup
+ (snk@outinmidpt-\snk@curpt.left)
}
+ (snk@outinmidpt-\snk@stepoutin.right)
+ \foreach \snk@curpt
+ [remember=\snk@curpt as \snk@prevpt (initially \snk@stepoutin)]
+ in {\snk@laststep,...,0}{
+ to[out=\sankeygetnodeorient{snk@outinmidpt-\snk@prevpt}+180,
+ in=\sankeygetnodeorient{snk@outinmidpt-\snk@curpt}]
+ (snk@outinmidpt-\snk@curpt.right)
+ };
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\sankeynodealias}
-%
-% The \code{\sankeynodealias} macro clones the Sankey node
-% named \code{#1} into a Sankey node named \code{#2}.
+% \begin{macro}{\snk@sankeynodealias}
+%
+% The \code{\snk@sankeynodealias} macro clones the Sankey node named
+% \code{#1} into a Sankey node named \code{#2}.
%
% \begin{macrocode}
- \NewDocumentCommand\sankeynodealias{mm}{%name, alias
- \snk@errorifnotdefined{##1}
- \path[late options={name=##1,alias=##2}];
- \snk@setnodeqty{##2}{\sankeygetnodeqty{##1}}
- \snk@setnodeorient{##2}{\sankeygetnodeorient{##1}}
- }
+\NewDocumentCommand\snk@sankeynodealias{mm}{%name, alias
+ \snk@errorifnotdefined{#1}
+ \path[late options={name=#1,alias=#2}];
+ \snk@setnodeqty{#2}{\sankeygetnodeqty{#1}}
+ \snk@setnodeorient{#2}{\sankeygetnodeorient{#1}}
+}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\sankeynode}
-%
-% The \code{\sankeynode} macro creates the new Sankey
-% node named \code{#2}.
-%
+%
+% \begin{macro}{\snk@sankeynode}
+%
+% The \code{\snk@sankeynode} macro creates the new Sankey
+% node named \code{#2}.
+%
% \begin{macrocode}
- \NewDocumentCommand\sankeynode{O{}m}{% options, node parameters
- \begingroup
- \sankeyset{##1}
- \sankeyset{node parameters,@initial parameters,/sankey/every node,##2}
- \snk@makenode{}
- \snk@makeforkednode{}
- \iftoggle{sankey node start}{\snk@filldrawstart}{}
- \iftoggle{sankey node end}{\snk@filldrawend}{}
- \snk@show@debug{\name}
- \endgroup
- }
+\NewDocumentCommand\snk@sankeynode{O{}m}{% options, node parameters
+ \begingroup
+ \sankeyset{#1}
+ \sankeyset{node parameters,@initial parameters,/sankey/every node,#2}
+ \snk@makenode{}
+ \snk@makeforkednode{}
+ \iftoggle{sankey node start}{\snk@filldrawstart}{}
+ \iftoggle{sankey node end}{\snk@filldrawend}{}
+ \snk@show@debug{\name}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\sankeystart}
-%
-% The \code{\sankeystart} macro fills and draws a starting lane
-% attached to the Sankey node named \code{#2}.
+%
+% \begin{macro}{\snk@sankeystart}
+%
+% The \code{\snk@sankeystart} macro fills and draws a starting lane
+% attached to the Sankey node named \code{#2}.
%
% \begin{macrocode}
- \NewDocumentCommand\sankeystart{O{}m}{% options, name
- \snk@errorifnotdefined{##2}
- \begingroup
- \sankeyset{##1}
- \edef\name{##2}
- \edef\orient{\sankeygetnodeorient{##2}}
- \edef\qty{\sankeygetnodeqty{##2}}
- \snk@filldrawstart
- \endgroup
- }
+\NewDocumentCommand\snk@sankeystart{O{}m}{% options, name
+ \snk@errorifnotdefined{#2}
+ \begingroup
+ \sankeyset{#1}
+ \edef\name{#2}
+ \edef\orient{\sankeygetnodeorient{#2}}
+ \edef\qty{\sankeygetnodeqty{#2}}
+ \snk@filldrawstart
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\sankeynodestart}
-%
-% The \code{\sankeynodestart} macro creates the new Sankey
-% node named \code{#2} then fills and draws a starting lane
-% attached to this new Sankey node.
-%
+%
+% \begin{macro}{\snk@sankeynodestart}
+%
+% The \code{\snk@sankeynodestart} macro creates the new Sankey
+% node named \code{#2} then fills and draws a starting lane
+% attached to this new Sankey node.
+%
% \begin{macrocode}
- \NewDocumentCommand\sankeynodestart{O{}m}{% option, node parameters
- \sankeynode[##1]{start,##2}
- }
+\NewDocumentCommand\snk@sankeynodestart{O{}m}{% option, node parameters
+ \sankeynode[#1]{start,#2}
+}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\sankeyend}
-%
-% The \code{\sankeyend} macro fills and draws an ending lane
-% attached to the Sankey node named \code{#2}.
-%
+%
+% \begin{macro}{\snk@sankeyend}
+%
+% The \code{\snk@sankeyend} macro fills and draws an ending lane
+% attached to the Sankey node named \code{#2}.
+%
% \begin{macrocode}
- \NewDocumentCommand\sankeyend{O{}m}{%options, name
- \snk@errorifnotdefined{##2}
- \begingroup
- \sankeyset{##1}
- \edef\name{##2}
- \edef\orient{\sankeygetnodeorient{##2}}
- \edef\qty{\sankeygetnodeqty{##2}}
- \snk@filldrawend
- \endgroup
- }
+\NewDocumentCommand\snk@sankeyend{O{}m}{%options, name
+ \snk@errorifnotdefined{#2}
+ \begingroup
+ \sankeyset{#1}
+ \edef\name{#2}
+ \edef\orient{\sankeygetnodeorient{#2}}
+ \edef\qty{\sankeygetnodeqty{#2}}
+ \snk@filldrawend
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\sankeynodeend}
-%
-% The \code{\sankeynodeend} macro creates the new Sankey
-% node named \code{#2} then fills and draws an ending lane
-% attached to this new Sankey node.
-%
+%
+% \begin{macro}{\snk@sankeynodeend}
+%
+% The \code{\snk@sankeynodeend} macro creates the new Sankey
+% node named \code{#2} then fills and draws an ending lane
+% attached to this new Sankey node.
+%
% \begin{macrocode}
- \NewDocumentCommand\sankeynodeend{O{}m}{% options, node parameters
- \sankeynode[##1]{end,##2}
- }
+\NewDocumentCommand\snk@sankeynodeend{O{}m}{% options, node parameters
+ \sankeynode[#1]{end,#2}
+}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\sankeyadvance}
-% \begin{macro}{\sankeyadvance*}
+% \begin{macro}{\snk@init@move}
%
-% The \code{\sankeyadvance} macro moves toward (or backward if
-% \emph{starred} calls -- \code{#1}) the Sankey node named \code{#3}.
-% \code{#4} is a distance. The previous position is keeped
-% by a Sankey node named \code{#3-old}.
+% \changes{v3.0.2}{2025/10/10}{Factorization of the node move initialization code}
+%
+% The \code{\snk@init@move} macro applies options et clones the
+% current node before its moving.
%
% \begin{macrocode}
- \NewDocumentCommand\sankeyadvance{sO{}mm}{%
- %params: *(reverse), options, name, distance
- \snk@errorifnotdefined{##3}
- \begingroup
- \sankeyset{##2}
- \edef\name{##3}
- \edef\snk@oldname{##3-old}
- \sankeynodealias{\name}{\snk@oldname}
- \IfBooleanTF{##1}{
- % move backward
- \sankeynode{
- at={$(\snk@oldname.center)!##4!90:(\snk@oldname.left)$},
- angle=\sankeygetnodeorient{\snk@oldname},
- quantity=\sankeygetnodeqty{\snk@oldname},
- name=\name,
- }
- \path[/sankey/fill]
- (\name.left) -- (\snk@oldname.left)
- -- (\snk@oldname.right) -- (\name.right) -- cycle;
- \path[/sankey/draw]
- (\name.left) -- (\snk@oldname.left)
- (\snk@oldname.right) -- (\name.right);
- }{
- % move forward
- \sankeynode{
- at={$(\snk@oldname.center)!##4!-90:(\snk@oldname.left)$},
- angle=\sankeygetnodeorient{\snk@oldname},
- quantity=\sankeygetnodeqty{\snk@oldname},
- name=\name,
- }
- \path[/sankey/fill]
- (\snk@oldname.left) -- (\name.left)
- -- (\name.right) -- (\snk@oldname.right) -- cycle;
- \path[/sankey/draw]
- (\snk@oldname.left) -- (\name.left)
- (\name.right) -- (\snk@oldname.right);
- }
- \snk@show@debug{\name}
- \endgroup
- }
+\def\snk@init@move#1#2{% params: options, name
+ \sankeyset{#1}
+ \edef\name{#2}
+ \edef\snk@oldname{#2-old}
+ \sankeynodealias{\name}{\snk@oldname}
+ \edef\qty{\sankeygetnodeqty{\name}}
+}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \begin{macro}{\sankeyturnright}
-% \begin{macro}{\sankeyturnright*}
-%
-% \changes{v3.0}{2021/03/14}{new macro}
%
-% The \code{sankeyturnright} macro moves forward the Sankey node
-% named \code{#3} by turning right. The angle is \code{#4} (the starred
-% version uses the opposite of \code{#4}). If the angle is \emph{negative}, the
-% macro calls the \code{\sankeyturnrightbackward} macro to move backward else
-% the macro fills/draws the lane between the previous position and the new
-% position. The previous position is keeped by a Sankey
-% node named \code{#3-old}.
+% \begin{macro}{\snk@sankeyadvance}
%
+% The \code{\snk@sankeyadvance} macro moves toward (or backward if
+% \emph{starred} calls -- \code{#1}) the Sankey node named \code{#3}.
+% \code{#4} is a distance. The previous position is keeped
+% by a Sankey node named \code{#3-old}.
+%
% \begin{macrocode}
- \NewDocumentCommand\sankeyturnright{sO{}mm}{
- % *(reverse), options, name, angle
- \snk@errorifnotdefined{##3}
- \begingroup
- \IfBooleanTF{##1}
- {\edef\snk@angle{\fpeval{-1*##4}}}
- {\edef\snk@angle{\fpeval{1*##4}}}
- \edef\snk@anglesign{\fpeval{sign(\snk@angle)}}
- \ifnumgreater{\snk@anglesign}{-1}{
- \sankeyset{##2}
- \edef\name{##3}
- \edef\snk@oldname{##3-old}
- \sankeynodealias{\name}{\snk@oldname}
- \edef\qty{\sankeygetnodeqty{\name}}
- \edef\orient{\snk@normalize@angle{\sankeygetnodeorient{\name}-\snk@angle}}
- \snk@getpos\snk@c{$(\name.right)!-\snk@minradius!(\name.left)$}
- \snk@getpos\pos{$(\snk@c)!1!-\snk@angle:(\name.center)$}
- \snk@makenode{}
- % fill the region
- \path[/sankey/fill] let
- \p1=(\snk@oldname.left),\p2=(\snk@oldname.right),
- \p3=(\name.left),\p4=(\name.right),
- \n1={\sankeyqtytolen{\qty}},
- \n{maxr}={\snk@minradius+\n1},
- \n{minr}={\snk@minradius}
- in
- (\p1) arc(\orient+\snk@angle+90:\orient+90:\n{maxr}) -- (\p3) --
- (\p4) arc(\orient+90:\orient+\snk@angle+90:\n{minr}) -- (\p2) -- cycle;
- % draw left and right borders
- \path[/sankey/draw] let
- \p1=(\snk@oldname.left),\p2=(\snk@oldname.right),
- \p3=(\name.left),\p4=(\name.right),
- \n1={\sankeyqtytolen{\qty}},
- \n{maxr}={\snk@minradius+\n1},
- \n{minr}={\snk@minradius}
- in
- (\p1) arc(\orient+\snk@angle+90:\orient+90:\n{maxr})
- (\p4) arc(\orient+90:\orient+\snk@angle+90:\n{minr});
- \snk@show@debug{\name}
- }{
- \sankeyturnrightbackward[##2]{##3}{-1*\snk@angle}
+\NewDocumentCommand\snk@sankeyadvance{sO{}mm}{%
+ % params: *(reverse), options, name, distance
+ \snk@errorifnotdefined{#3}
+ \begingroup
+ \snk@init@move{#2}{#3}
+ \IfBooleanTF{#1}{
+ % move backward
+ \sankeynode{
+ at={$(\snk@oldname.center)!#4!90:(\snk@oldname.left)$},
+ angle=\sankeygetnodeorient{\snk@oldname},
+ quantity=\sankeygetnodeqty{\snk@oldname},
+ name=\name,
}
- \endgroup
+ \path[/sankey/fill]
+ (\name.left) -- (\snk@oldname.left)
+ -- (\snk@oldname.right) -- (\name.right) -- cycle;
+ \path[/sankey/draw]
+ (\name.left) -- (\snk@oldname.left)
+ (\snk@oldname.right) -- (\name.right);
+ }{
+ % move forward
+ \sankeynode{
+ at={$(\snk@oldname.center)!#4!-90:(\snk@oldname.left)$},
+ angle=\sankeygetnodeorient{\snk@oldname},
+ quantity=\sankeygetnodeqty{\snk@oldname},
+ name=\name,
+ }
+ \path[/sankey/fill]
+ (\snk@oldname.left) -- (\name.left)
+ -- (\name.right) -- (\snk@oldname.right) -- cycle;
+ \path[/sankey/draw]
+ (\snk@oldname.left) -- (\name.left)
+ (\name.right) -- (\snk@oldname.right);
}
+ \snk@show@debug{\name}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\sankeyturnrightbackward}
-% \begin{macro}{\sankeyturnrightbackward*}
-%
-% \changes{v3.0}{2021/03/14}{new macro}
-%
-% The \code{sankeyturnrightbackward} macro moves backward the Sankey node
-% named \code{#3} by turning right. The angle is \code{#4} (the starred
-% version uses the opposite of \code{#4}). If the angle is \emph{negative}, the
-% macro calls the \code{\sankeyturnright} macro to move forward else
-% the macro fills/draws the lane between the previous position and the new
-% position. The previous position is keeped by a Sankey
-% node named \code{#3-old}.
+% \begin{macro}{\snk@sankeyturnright}
+%
+% \changes{v3.0}{2021/03/14}{New macro}
+%
+% The \code{sankeyturnright} macro moves forward the Sankey node named
+% \code{#3} by turning right. The angle is \code{#4} (the starred
+% version uses the opposite of \code{#4}). If the angle is
+% \emph{negative}, the macro calls the \code{\sankeyturnrightbackward}
+% macro to move backward else the macro fills/draws the lane between
+% the previous position and the new position. The previous position is
+% keeped by a Sankey node named \code{#3-old}.
%
% \begin{macrocode}
- \NewDocumentCommand\sankeyturnrightbackward{sO{}mm}{
- % *(reverse), options, name, angle
- \snk@errorifnotdefined{##3}
- \begingroup
- \IfBooleanTF{##1}
- {\edef\snk@angle{\fpeval{-1*##4}}}
- {\edef\snk@angle{\fpeval{1*##4}}}
- \edef\snk@anglesign{\fpeval{sign(\snk@angle)}}
- \ifnumgreater{\snk@anglesign}{-1}{
- \sankeyset{##2}
- \edef\name{##3}
- \edef\snk@oldname{##3-old}
- \sankeynodealias{\name}{\snk@oldname}
- \edef\qty{\sankeygetnodeqty{\name}}
- \edef\orient{\snk@normalize@angle{\sankeygetnodeorient{\name}+\snk@angle}}
- \snk@getpos\snk@c{$(\name.right)!-\snk@minradius!(\name.left)$}
- \snk@getpos\pos{$(\snk@c)!1!\snk@angle:(\name.center)$}
- \snk@makenode{}
- % fill the region
- \path[/sankey/fill] let
- \p1=(\name.left),\p2=(\name.right),
- \p3=(\snk@oldname.left),\p4=(\snk@oldname.right),
- \n1={\sankeyqtytolen{\qty}},
- \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
- in
- (\p1) arc(\orient+90:\orient-\snk@angle+90:\n{maxr}) -- (\p3) --
- (\p4) arc(\orient-\snk@angle+90:\orient+90:\n{minr}) -- (\p2) -- cycle;
- % draw left and right borders
- \path[/sankey/draw] let
- \p1=(\name.left),\p2=(\name.right),
- \p3=(\snk@oldname.left),\p4=(\snk@oldname.right),
- \n1={\sankeyqtytolen{\qty}},
- \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
- in
- (\p1) arc(\orient+90:\orient-\snk@angle+90:\n{maxr})
- (\p4) arc(\orient-\snk@angle+90:\orient+90:\n{minr});
- \snk@show@debug{\name}
- }{
- \sankeyturnright[##2]{##3}{-1*\snk@angle}
- }
- \endgroup
+\NewDocumentCommand\snk@sankeyturnright{sO{}mm}{
+ % *(reverse), options, name, angle
+ \snk@errorifnotdefined{#3}
+ \begingroup
+ \IfBooleanTF{#1}
+ {\edef\snk@angle{\fpeval{-1*#4}}}
+ {\edef\snk@angle{\fpeval{1*#4}}}
+ \edef\snk@anglesign{\fpeval{sign(\snk@angle)}}
+ \ifnumgreater{\snk@anglesign}{-1}{
+ \snk@init@move{#2}{#3}
+ \edef\orient{\snk@normalize@angle{\sankeygetnodeorient{\name}-\snk@angle}}
+ \snk@getpos\snk@c{$(\name.right)!-\snk@minradius!(\name.left)$}
+ \snk@getpos\pos{$(\snk@c)!1!-\snk@angle:(\name.center)$}
+ \snk@makenode{}
+ % fill the region
+ \path[/sankey/fill] let
+ \p1=(\snk@oldname.left),\p2=(\snk@oldname.right),
+ \p3=(\name.left),\p4=(\name.right),
+ \n1={\sankeyqtytolen{\qty}},
+ \n{maxr}={\snk@minradius+\n1},
+ \n{minr}={\snk@minradius}
+ in
+ (\p1) arc(\orient+\snk@angle+90:\orient+90:\n{maxr}) -- (\p3) --
+ (\p4) arc(\orient+90:\orient+\snk@angle+90:\n{minr}) -- (\p2) -- cycle;
+ % draw left and right borders
+ \path[/sankey/draw] let
+ \p1=(\snk@oldname.left),\p2=(\snk@oldname.right),
+ \p3=(\name.left),\p4=(\name.right),
+ \n1={\sankeyqtytolen{\qty}},
+ \n{maxr}={\snk@minradius+\n1},
+ \n{minr}={\snk@minradius}
+ in
+ (\p1) arc(\orient+\snk@angle+90:\orient+90:\n{maxr})
+ (\p4) arc(\orient+90:\orient+\snk@angle+90:\n{minr});
+ \snk@show@debug{\name}
+ }{
+ \sankeyturnrightbackward[#2]{#3}{-1*\snk@angle}
}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \begin{macro}{\sankeyturnleft}
-% \begin{macro}{\sankeyturnleft*}
-%
-% \changes{v3.0}{2021/03/14}{new macro}
-%
-% The \code{sankeyturnleft} macro moves forward the Sankey node
-% named \code{#3} by turning left. The angle is \code{#4} (the starred
-% version uses the opposite of \code{#4}). If the angle is \emph{negative}, the
-% macro calls the \code{\sankeyturnleftbackward} macro to move backward else
-% the macro fills/draws the lane between the previous position and the new
-% position. The previous position is keeped by a Sankey
-% node named \code{#3-old}.
+%
+% \begin{macro}{\snk@sankeyturnrightbackward}
+%
+% \changes{v3.0}{2021/03/14}{New macro}
+%
+% The \code{\snk@sankeyturnrightbackward} macro moves backward the
+% Sankey node named \code{#3} by turning right. The angle is \code{#4}
+% (the starred version uses the opposite of \code{#4}). If the angle
+% is \emph{negative}, the macro calls the \code{\sankeyturnright}
+% macro to move forward else the macro fills/draws the lane between
+% the previous position and the new position. The previous position is
+% keeped by a Sankey node named \code{#3-old}.
%
% \begin{macrocode}
- \NewDocumentCommand\sankeyturnleft{sO{}mm}{
- % *(reverse), options, name, angle
- \snk@errorifnotdefined{##3}
- \begingroup
- \IfBooleanTF{##1}
- {\edef\snk@angle{\fpeval{-1*##4}}}
- {\edef\snk@angle{\fpeval{1*##4}}}
- \edef\snk@anglesign{\fpeval{sign(\snk@angle)}}
- \ifnumgreater{\snk@anglesign}{-1}{
- \sankeyset{##2}
- \edef\name{##3}
- \edef\snk@oldname{##3-old}
- \sankeynodealias{\name}{\snk@oldname}
- \edef\qty{\sankeygetnodeqty{\name}}
- \edef\orient{\snk@normalize@angle{\sankeygetnodeorient{\name}+\snk@angle}}
- \snk@getpos\snk@c{$(\name.left)!-\snk@minradius!(\name.right)$}
- \snk@getpos\pos{$(\snk@c)!1!\snk@angle:(\name.center)$}
- \snk@makenode{}
- % fill the region
- \path[/sankey/fill] let
- \p1=(\snk@oldname.left),\p2=(\snk@oldname.right),
- \p3=(\name.left),\p4=(\name.right),
- \n1={\sankeyqtytolen{\qty}},
- \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
- in
- (\p1) arc(\orient-\snk@angle-90:\orient-90:\n{minr}) -- (\p3) --
- (\p4) arc(\orient-90:\orient-\snk@angle-90:\n{maxr}) -- (\p2) -- cycle;
- % draw left and right borders
- \path[/sankey/draw] let
- \p1=(\snk@oldname.left),\p2=(\snk@oldname.right),
- \p3=(\name.left),\p4=(\name.right),
- \n1={\sankeyqtytolen{\qty}},
- \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
- in
- (\p1) arc(\orient-\snk@angle-90:\orient-90:\n{minr})
- (\p4) arc(\orient-90:\orient-\snk@angle-90:\n{maxr});
- \snk@show@debug{\name}
- }{
- \sankeyturnleftbackward[##2]{##3}{-1*\snk@angle}
- }
- \endgroup
+\NewDocumentCommand\snk@sankeyturnrightbackward{sO{}mm}{
+ % *(reverse), options, name, angle
+ \snk@errorifnotdefined{#3}
+ \begingroup
+ \IfBooleanTF{#1}
+ {\edef\snk@angle{\fpeval{-1*#4}}}
+ {\edef\snk@angle{\fpeval{1*#4}}}
+ \edef\snk@anglesign{\fpeval{sign(\snk@angle)}}
+ \ifnumgreater{\snk@anglesign}{-1}{
+ \snk@init@move{#2}{#3}
+ \edef\orient{\snk@normalize@angle{\sankeygetnodeorient{\name}+\snk@angle}}
+ \snk@getpos\snk@c{$(\name.right)!-\snk@minradius!(\name.left)$}
+ \snk@getpos\pos{$(\snk@c)!1!\snk@angle:(\name.center)$}
+ \snk@makenode{}
+ % fill the region
+ \path[/sankey/fill] let
+ \p1=(\name.left),\p2=(\name.right),
+ \p3=(\snk@oldname.left),\p4=(\snk@oldname.right),
+ \n1={\sankeyqtytolen{\qty}},
+ \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
+ in
+ (\p1) arc(\orient+90:\orient-\snk@angle+90:\n{maxr}) -- (\p3) --
+ (\p4) arc(\orient-\snk@angle+90:\orient+90:\n{minr}) -- (\p2) -- cycle;
+ % draw left and right borders
+ \path[/sankey/draw] let
+ \p1=(\name.left),\p2=(\name.right),
+ \p3=(\snk@oldname.left),\p4=(\snk@oldname.right),
+ \n1={\sankeyqtytolen{\qty}},
+ \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
+ in
+ (\p1) arc(\orient+90:\orient-\snk@angle+90:\n{maxr})
+ (\p4) arc(\orient-\snk@angle+90:\orient+90:\n{minr});
+ \snk@show@debug{\name}
+ }{
+ \sankeyturnright[#2]{#3}{-1*\snk@angle}
}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \begin{macro}{\sankeyturnleftbackward}
-% \begin{macro}{\sankeyturnleftbackward*}
-%
-% \changes{v3.0}{2021/03/14}{new macro}
-%
-% The \code{sankeyturnleftbackward} macro moves backward the Sankey node
-% named \code{#3} by turning left. The angle is \code{#4} (the starred
-% version uses the opposite of \code{#4}). If the angle is \emph{negative}, the
-% macro calls the \code{\sankeyturnleft} macro to move forward else
-% the macro fills/draws the lane between the previous position and the new
-% position. The previous position is keeped by a Sankey
-% node named \code{#3-old}.
+% \begin{macro}{\snk@sankeyturnleft}
+%
+% \changes{v3.0}{2021/03/14}{New macro}
+%
+% The \code{\snk@sankeyturnleft} macro moves forward the Sankey node
+% named \code{#3} by turning left. The angle is \code{#4} (the starred
+% version uses the opposite of \code{#4}). If the angle is
+% \emph{negative}, the macro calls the \code{\sankeyturnleftbackward}
+% macro to move backward else the macro fills/draws the lane between
+% the previous position and the new position. The previous position is
+% keeped by a Sankey node named \code{#3-old}.
%
% \begin{macrocode}
- \NewDocumentCommand\sankeyturnleftbackward{sO{}mm}{
- % *(reverse), options, name, angle
- \snk@errorifnotdefined{##3}
- \begingroup
- \IfBooleanTF{##1}
- {\edef\snk@angle{\fpeval{-1*##4}}}
- {\edef\snk@angle{\fpeval{1*##4}}}
- \edef\snk@anglesign{\fpeval{sign(\snk@angle)}}
- \ifnumgreater{\snk@anglesign}{-1}{
- \sankeyset{##2}
- \edef\name{##3}
- \edef\snk@oldname{##3-old}
- \sankeynodealias{\name}{\snk@oldname}
- \edef\qty{\sankeygetnodeqty{\name}}
- \edef\orient{\snk@normalize@angle{\sankeygetnodeorient{\name}-\snk@angle}}
- \snk@getpos\snk@c{$(\name.left)!-\snk@minradius!(\name.right)$}
- \snk@getpos\pos{$(\snk@c)!1!-\snk@angle:(\name.center)$}
- \snk@makenode{}
- % fill the region
- \path[/sankey/fill] let
- \p1=(\name.left),\p2=(\name.right),
- \p3=(\snk@oldname.left),\p4=(\snk@oldname.right),
- \n1={\sankeyqtytolen{\qty}},
- \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
- in
- (\p1) arc(\orient-90:\orient+\snk@angle-90:\n{minr}) -- (\p3) --
- (\p4) arc(\orient+\snk@angle-90:\orient-90:\n{maxr}) -- (\p2) -- cycle;
- % draw left and right borders
- \path[/sankey/draw] let
- \p1=(\name.left),\p2=(\name.right),
- \p3=(\snk@oldname.left),\p4=(\snk@oldname.right),
- \n1={\sankeyqtytolen{\qty}},
- \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
- in
- (\p1) arc(\orient-90:\orient+\snk@angle-90:\n{minr})
- (\p4) arc(\orient+\snk@angle-90:\orient-90:\n{maxr});
- \snk@show@debug{\name}
- }{
- \sankeyturnleft[##2]{##3}{-1*\snk@angle}
- }
- \endgroup
+\NewDocumentCommand\snk@sankeyturnleft{sO{}mm}{
+ % *(reverse), options, name, angle
+ \snk@errorifnotdefined{#3}
+ \begingroup
+ \IfBooleanTF{#1}
+ {\edef\snk@angle{\fpeval{-1*#4}}}
+ {\edef\snk@angle{\fpeval{1*#4}}}
+ \edef\snk@anglesign{\fpeval{sign(\snk@angle)}}
+ \ifnumgreater{\snk@anglesign}{-1}{
+ \snk@init@move{#2}{#3}
+ \edef\orient{\snk@normalize@angle{\sankeygetnodeorient{\name}+\snk@angle}}
+ \snk@getpos\snk@c{$(\name.left)!-\snk@minradius!(\name.right)$}
+ \snk@getpos\pos{$(\snk@c)!1!\snk@angle:(\name.center)$}
+ \snk@makenode{}
+ % fill the region
+ \path[/sankey/fill] let
+ \p1=(\snk@oldname.left),\p2=(\snk@oldname.right),
+ \p3=(\name.left),\p4=(\name.right),
+ \n1={\sankeyqtytolen{\qty}},
+ \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
+ in
+ (\p1) arc(\orient-\snk@angle-90:\orient-90:\n{minr}) -- (\p3) --
+ (\p4) arc(\orient-90:\orient-\snk@angle-90:\n{maxr}) -- (\p2) -- cycle;
+ % draw left and right borders
+ \path[/sankey/draw] let
+ \p1=(\snk@oldname.left),\p2=(\snk@oldname.right),
+ \p3=(\name.left),\p4=(\name.right),
+ \n1={\sankeyqtytolen{\qty}},
+ \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
+ in
+ (\p1) arc(\orient-\snk@angle-90:\orient-90:\n{minr})
+ (\p4) arc(\orient-90:\orient-\snk@angle-90:\n{maxr});
+ \snk@show@debug{\name}
+ }{
+ \sankeyturnleftbackward[#2]{#3}{-1*\snk@angle}
}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \begin{macro}{\sankeyturn}
-% \begin{macro}{\sankeyturn*}
-%
-% \changes{v3.0}{2021/03/14}{simplification by using new \emph{turn} macros}
+% \begin{macro}{\snk@sankeyturnleftbackward}
%
-% The \code{\sankeyturn} macro moves toward (or backward if
-% \emph{starred} calls -- \code{#1}) the Sankey node named
-% \code{#3} by turning left (angle \code{#4} is positive)
-% or right (angle \code{#4} is negative).
-% The previous position is keeped by a Sankey node named
-% \code{#3-old}.
+% \changes{v3.0}{2021/03/14}{New macro}
+%
+% The \code{\snk@sankeyturnleftbackward} macro moves backward the
+% Sankey node named \code{#3} by turning left. The angle is \code{#4}
+% (the starred version uses the opposite of \code{#4}). If the angle
+% is \emph{negative}, the macro calls the \code{\sankeyturnleft} macro
+% to move forward else the macro fills/draws the lane between the
+% previous position and the new position. The previous position is
+% keeped by a Sankey node named \code{#3-old}.
%
% \begin{macrocode}
- \NewDocumentCommand\sankeyturn{sO{}mm}{%
- % *(reverse), options, name, angle
- \snk@errorifnotdefined{##3}
- \begingroup
- \edef\snk@anglesign{\fpeval{sign(##4)}}
- \IfBooleanTF{##1}{
- \ifnumgreater{\snk@anglesign}{-1}
- {\sankeyturnleftbackward[##2]{##3}{##4}}
- {\sankeyturnrightbackward[##2]{##3}{-1*##4}}
- }{
- \ifnumgreater{\snk@anglesign}{-1}
- {\sankeyturnleft[##2]{##3}{##4}}
- {\sankeyturnright[##2]{##3}{-1*##4}}
- }
- \endgroup
+\NewDocumentCommand\snk@sankeyturnleftbackward{sO{}mm}{
+ % *(reverse), options, name, angle
+ \snk@errorifnotdefined{#3}
+ \begingroup
+ \IfBooleanTF{#1}
+ {\edef\snk@angle{\fpeval{-1*#4}}}
+ {\edef\snk@angle{\fpeval{1*#4}}}
+ \edef\snk@anglesign{\fpeval{sign(\snk@angle)}}
+ \ifnumgreater{\snk@anglesign}{-1}{
+ \snk@init@move{#2}{#3}
+ \edef\orient{\snk@normalize@angle{\sankeygetnodeorient{\name}-\snk@angle}}
+ \snk@getpos\snk@c{$(\name.left)!-\snk@minradius!(\name.right)$}
+ \snk@getpos\pos{$(\snk@c)!1!-\snk@angle:(\name.center)$}
+ \snk@makenode{}
+ % fill the region
+ \path[/sankey/fill] let
+ \p1=(\name.left),\p2=(\name.right),
+ \p3=(\snk@oldname.left),\p4=(\snk@oldname.right),
+ \n1={\sankeyqtytolen{\qty}},
+ \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
+ in
+ (\p1) arc(\orient-90:\orient+\snk@angle-90:\n{minr}) -- (\p3) --
+ (\p4) arc(\orient+\snk@angle-90:\orient-90:\n{maxr}) -- (\p2) -- cycle;
+ % draw left and right borders
+ \path[/sankey/draw] let
+ \p1=(\name.left),\p2=(\name.right),
+ \p3=(\snk@oldname.left),\p4=(\snk@oldname.right),
+ \n1={\sankeyqtytolen{\qty}},
+ \n{maxr}={\snk@minradius+\n1}, \n{minr}={\snk@minradius}
+ in
+ (\p1) arc(\orient-90:\orient+\snk@angle-90:\n{minr})
+ (\p4) arc(\orient+\snk@angle-90:\orient-90:\n{maxr});
+ \snk@show@debug{\name}
+ }{
+ \sankeyturnleft[#2]{#3}{-1*\snk@angle}
}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \begin{macro}{\sankeyfork}
-%
-% The \code{\sankeyfork} macro forks the Sankey node named
-% \code{#2} to the list of subnodes given by \code{#3}.
-% The subnodes are cloned to take into account
-% the \code{debug} option.
+% \begin{macro}{\snk@sankeyturn}
+%
+% \changes{v3.0}{2021/03/14}{Simplification by using new \emph{turn} macros}
+%
+% The \code{\snk@sankeyturn} macro moves toward (or backward if
+% \emph{starred} calls -- \code{#1}) the Sankey node named \code{#3}
+% by turning left (angle \code{#4} is positive) or right (angle
+% \code{#4} is negative). The previous position is keeped by a Sankey
+% node named \code{#3-old}.
%
% \begin{macrocode}
- \NewDocumentCommand\sankeyfork{O{}mm}{%options, name, list of forks
- \snk@errorifnotdefined{##2}
- \begingroup
- \sankeyset{##1}
- \sankeynode[debug=false]{as={##2},forked={##3}}
- \foreach \qty/\snk@subnodename in {##3}{\sankeynode{as={\snk@subnodename}}}
- \endgroup
+\NewDocumentCommand\snk@sankeyturn{sO{}mm}{%
+ % *(reverse), options, name, angle
+ \snk@errorifnotdefined{#3}
+ \begingroup
+ \edef\snk@anglesign{\fpeval{sign(#4)}}
+ \IfBooleanTF{#1}{
+ \ifnumgreater{\snk@anglesign}{-1}
+ {\sankeyturnleftbackward[#2]{#3}{#4}}
+ {\sankeyturnrightbackward[#2]{#3}{-1*#4}}
+ }{
+ \ifnumgreater{\snk@anglesign}{-1}
+ {\sankeyturnleft[#2]{#3}{#4}}
+ {\sankeyturnright[#2]{#3}{-1*#4}}
}
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\sankeyqtytolen}
-%
-% The \code{\sankeyqtytolen} macro converts quantity
-% to length using \code{\fpeval} and the ratio determined
-% by \code{\snk@totalqty} and \code{\snk@totallen}.
+% \begin{macro}{\snk@sankeyfork}
+%
+% The \code{\snk@sankeyfork} macro forks the Sankey node named
+% \code{#2} to the list of subnodes given by \code{#3}.
+% The subnodes are cloned to take into account
+% the \code{debug} option.
+%
+% \begin{macrocode}
+\NewDocumentCommand\snk@sankeyfork{O{}mm}{%options, name, list of forks
+ \snk@errorifnotdefined{#2}
+ \begingroup
+ \sankeyset{#1}
+ \sankeynode[debug=false]{as={#2},forked={#3}}
+ \foreach \qty/\snk@subnodename in {#3}{\sankeynode{as={\snk@subnodename}}}
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\snk@sankeyqtytolen}
+%
+% The \code{\snk@sankeyqtytolen} macro converts quantity to length
+% using \code{\fpeval} and the ratio determined by
+% \code{\snk@totalqty} and \code{\snk@totallen}.
%
% \begin{macrocode}
- \def\sankeyqtytolen##1{\fpeval{(##1)/\snk@totalqty*\snk@totallen}}
+\NewExpandableDocumentCommand\snk@sankeyqtytolen{m}{%
+ \fpeval{(#1)/\snk@totalqty*\snk@totallen}%
+}
% \end{macrocode}
% \end{macro}
%
%^^A % ------------------------------------------------------------
-% \subsection{The \protect\texttt{sankeydiagram} environment (the end)}
+% \subsection{The \protect\ttintitle{sankeydiagram} environment}
%^^A % ------------------------------------------------------------
%
-% Here is the end of the definition of the \code{sankeydiagram}
-% environment. The \code{@initial options} style and the %
-% \code{every diagram} style are applied before options provided by
-% user.
+%
+% \begin{environment}{sankeydiagram}
+%
+% \changes{v3.0.2}{2025/01/10}{Simplification of the environment by copying internal macros}
+%
+% The \code{sankeydiagram} environment allows the creation of Sankey
+% diagrams.
+%
+% \DescribeMacro{\sankeyadvance}%
+% \DescribeMacro{\sankeydubins}%
+% \DescribeMacro{\sankeyend}%
+% \DescribeMacro{\sankeyfork}%
+% \DescribeMacro{\sankeynodealias}%
+% \DescribeMacro{\sankeynodeend}%
+% \DescribeMacro{\sankeynodestart}%
+% \DescribeMacro{\sankeynode}%
+% \DescribeMacro{\sankeyoutin}%
+% \DescribeMacro{\sankeyqtytolen}%
+% \DescribeMacro{\sankeystart}%
+% \DescribeMacro{\sankeyturnleftbackward}%
+% \DescribeMacro{\sankeyturnleft}%
+% \DescribeMacro{\sankeyturnrightbackward}%
+% \DescribeMacro{\sankeyturnright}%
+% \DescribeMacro{\sankeyturn}%
+% It defines locally all the macros used by a Sankey diagram.
+%
+% Then it applies the \code{@initial options} and \code{every diagram}
+% styles (in this order) and applies all the keys provided in its
+% optional argument.
%
% \begin{macrocode}
+\NewDocumentEnvironment{sankeydiagram}{O{}}{
+ \NewCommandCopy{\sankeyadvance}{\snk@sankeyadvance}
+ \NewCommandCopy{\sankeydubins}{\snk@sankeydubins}
+ \NewCommandCopy{\sankeyend}{\snk@sankeyend}
+ \NewCommandCopy{\sankeyfork}{\snk@sankeyfork}
+ \NewCommandCopy{\sankeynodealias}{\snk@sankeynodealias}
+ \NewCommandCopy{\sankeynodeend}{\snk@sankeynodeend}
+ \NewCommandCopy{\sankeynodestart}{\snk@sankeynodestart}
+ \NewCommandCopy{\sankeynode}{\snk@sankeynode}
+ \NewCommandCopy{\sankeyoutin}{\snk@sankeyoutin}
+ \NewCommandCopy{\sankeyqtytolen}{\snk@sankeyqtytolen}
+ \NewCommandCopy{\sankeystart}{\snk@sankeystart}
+ \NewCommandCopy{\sankeyturnleftbackward}{\snk@sankeyturnleftbackward}
+ \NewCommandCopy{\sankeyturnleft}{\snk@sankeyturnleft}
+ \NewCommandCopy{\sankeyturnrightbackward}{\snk@sankeyturnrightbackward}
+ \NewCommandCopy{\sankeyturnright}{\snk@sankeyturnright}
+ \NewCommandCopy{\sankeyturn}{\snk@sankeyturn}
\sankeyset{
@initial options,
every diagram,
@@ -4097,7 +4137,7 @@
% \fi
%
%^^A % ------------------------------------------------------------
-% \section{\texttt{tikzlibrarydubins.code.tex}}
+% \section{\ttintitle{tikzlibrarydubins.code.tex}}
%^^A % ------------------------------------------------------------
%
% Not yet documented nor commented...
@@ -4108,8 +4148,8 @@
% \begin{macro}{\tikzlibrarydubins@version}
% \begin{macro}{\tikzlibrarydubins@date}
% \begin{macrocode}
-\def\tikzlibrarydubins@version{v3.0.1}
-\def\tikzlibrarydubins@date{2022/02/04}
+\def\tikzlibrarydubins@version{v3.0.2}
+\def\tikzlibrarydubins@date{2025/01/10}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4453,7 +4493,8 @@
+\dbp@rsrlen
+angtodist(\dbp@rsrangtwo,\dbp@radius)
}
- \dbp@setparams{rsr}{\dbp@rsrdist}{\dbp@rsrangone}{\dbp@rsrlen}{\dbp@rsrangtwo}
+ \dbp@setparams%
+ {rsr}{\dbp@rsrdist}{\dbp@rsrangone}{\dbp@rsrlen}{\dbp@rsrangtwo}
% LSL (al and bl)
\dbp@anglebetween\dbp@lslalbl{\p{al}}{\p{bl}}
@@ -4564,21 +4605,29 @@
%
% \PrintChanges
%
-% \setcounter{IndexColumns}{2}
-% \PrintIndex
-%
+% {
+% \setcounter{IndexColumns}{2}
+% \let\code\relax
+% \IndexPrologue{\section{Index} Italic numbers refer page where the
+% corresponding entry is described; Underlined numbers refer to the
+% code line of the definition; Roman numbers refer to the code lines
+% where the entry is used.}
+%
+% \PrintIndex
+% }
% \Finale
%
% \iffalse
-%<*sankeydocpreamble>
+%<*sankey-doc-preamble>
\usepackage[paper=a4paper,vmargin=1.5cm,left=4.5cm,right=3.5cm,marginparwidth=3.5cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
+\usepackage{inconsolata}
\usepackage[final,protrusion=true,expansion=true]{microtype}
\usepackage{xcolor}
-\PassOptionsToPackage{final,colorlinks,linkcolor=red!60!orange!85!black}{hyperref}
+\PassOptionsToPackage{final,colorlinks,linkcolor=cyan!25!blue!75!black}{hyperref}
\usepackage{dtxdescribe}
\usepackage[numbered]{hypdoc}
\usepackage{fancyvrb}
@@ -4743,17 +4792,17 @@
% \vspace{.25\baselineskip plus .25\baselineskip minus 0mm}
\parfillskip 0pt plus 1fil%
\leavevmode%
- \DescribeKey{\key}%
+ \expandafter\DescribeKey\expandafter{\key}%
\ttfamily%
%\hspace*{-1cm}%
\textcolor{red!75!black}{\texttt{\docprefix{\keypath/}\key}}%
\ifdefempty{\val}{}{=\val}%
\hfill%
- \ifdefempty{\default}{\null}{(default:\,\constant{\default})}%
- \ifdefempty{\initially}{\null}{(initially:\,\constant{\initially})}%
+ \ifdefempty{\default}{\null}{{\rmfamily (default:\,\constant{\default})}}%
+ \ifdefempty{\initially}{\null}{{\rmfamily (initially:\,\constant{\initially})}}%
\mynobreakpar%
\endgroup%
- \parskip=.5\baselineskip plus .25\baselineskip minus .25\baselineskip
+ \parskip=.5\baselineskip plus .25\baselineskip minus .3\baselineskip
\parfillskip=30pt plus 1fil
\itemize[topsep=0pt,partopsep=0pt,itemsep=0pt]\item[]
}{%
@@ -4809,37 +4858,7 @@
\footnotesize
}
-\renewcommand*{\DescribeMacro}[2][]{%
- \@bsphack%
- \@ifundefined{@captype}{% not float?
- \leavevmode%
- \marginpar{%
- \hbadness=10000%
- \hfuzz=5em%
- \raggedleft%
- \ifblank{#1}{}{{\scriptsize\textsf{[#1]}} }% class
- \MacroFont\cmd{#2}% name
- }% marginpar
- }{}% not float?
- \begingroup%
- \DTXD@origwrindex{%
- \DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}% name
- \ifblank{#1}{}{\levelchar[#1]}% class
- \encapchar usage}%
- \ifblank{#1}%
- {}% no class
- {% class given
- \begingroup%
- \DTXD@origwrindex{%
- #1\actualchar[#1]:\levelchar%
- \DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}%
- \encapchar usage}%
- }% class given
- \@esphack%
- \ignorespaces%
-}
-
-%</sankeydocpreamble>
+%</sankey-doc-preamble>
% \fi
\endinput
diff --git a/graphics/pgf/contrib/sankey/sankey.ins b/graphics/pgf/contrib/sankey/sankey.ins
index ab11ca1dc1..d6df36b89f 100644
--- a/graphics/pgf/contrib/sankey/sankey.ins
+++ b/graphics/pgf/contrib/sankey/sankey.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2016, 2021 by Paul Gaborit
+%% Copyright (C) 2016-2022 by Paul Gaborit
%%
%% This work may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3 of this license
@@ -31,7 +31,7 @@
This is a generated file.
-Copyright (C) 2016, 2021 by Paul Gaborit
+Copyright (C) 2016-2022 by Paul Gaborit
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
@@ -65,7 +65,7 @@ sankey-example-energy.tex
\file{sankey-example3.tex}{\nopreamble\nopostamble\from{sankey.dtx}{example3}}%
\file{sankey-example3-variation.tex}{\nopreamble\nopostamble\from{sankey.dtx}{example3-variation}}%
\file{sankey-example4.tex}{\nopreamble\nopostamble\from{sankey.dtx}{example4}}%
- \file{sankey-doc-preamble.sty}{\from{sankey.dtx}{sankeydocpreamble}}%
+ \file{sankey-doc-preamble.sty}{\from{sankey.dtx}{sankey-doc-preamble}}%
}
\Msg{*********************************************************}
@@ -82,4 +82,4 @@ sankey-example-energy.tex
\Msg{* Happy TeXing!}
\Msg{*********************************************************}
-\endbatchfile \ No newline at end of file
+\endbatchfile
diff --git a/graphics/pgf/contrib/sankey/sankey.pdf b/graphics/pgf/contrib/sankey/sankey.pdf
index 97bf902ff4..e9acaad541 100644
--- a/graphics/pgf/contrib/sankey/sankey.pdf
+++ b/graphics/pgf/contrib/sankey/sankey.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/spath3/README b/graphics/pgf/contrib/spath3/README.txt
index dad3e28a92..b1104b7f4d 100644
--- a/graphics/pgf/contrib/spath3/README
+++ b/graphics/pgf/contrib/spath3/README.txt
@@ -1,6 +1,6 @@
----------------------------------------------------------------
spath3 --- LaTeX3 functions for manipulating PGF soft paths
-E-mail: loopspace@mathforge.org
+E-mail: Andrew Stacey <loopspace@mathforge.org>
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
----------------------------------------------------------------
diff --git a/graphics/pgf/contrib/spath3/spath3.pdf b/graphics/pgf/contrib/spath3/spath3.pdf
index 9282e0adfe..6ade2656ac 100644
--- a/graphics/pgf/contrib/spath3/spath3.pdf
+++ b/graphics/pgf/contrib/spath3/spath3.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/spath3/spath3.tex b/graphics/pgf/contrib/spath3/spath3.tex
index c8e9d65af7..897f5f7b3d 100644
--- a/graphics/pgf/contrib/spath3/spath3.tex
+++ b/graphics/pgf/contrib/spath3/spath3.tex
@@ -1,5 +1,5 @@
\RequirePackage{shellesc}
-\immediate\write18{tex spath3_code.dtx}
+%\immediate\write18{tex spath3_code.dtx}
\documentclass{l3doc}
\usepackage{tikz}
\usetikzlibrary{
@@ -50,27 +50,29 @@
\title{The \textsf{spath3} Package: Documentation}
\author{Andrew Stacey \\ \url{loopspace@mathforge.org}}
- \date{\fileversion~from \filedate}
+\date{\fileversion~from \filedate}
- \begin{document}
+\let\OriginalBar=|
- \maketitle
+\begin{document}
+
+\maketitle
\tableofcontents
- \section{Introduction}
+\section{Introduction}
- The \texttt{spath3} package was originally designed as a low-level package for manipulating the \emph{soft paths} defined by PGF/TikZ.
- Soft paths form one stage of the stack of translations between what the author writes in the \texttt{tikzpicture} environments in their \LaTeX\ document and what is eventually written to the output file.
- Most of the complicated processing has been done by the time a soft path is constructed, but it is still very definitely a \TeX\ object and there has not, for example, been any consideration as to what the eventual output file format is (such as PDF, DVI, or SVG).
- So it is very amenable to being modified at this stage and this package provides a set of routines for doing so.
+The \texttt{spath3} package was originally designed as a low-level package for manipulating the \emph{soft paths} defined by PGF/TikZ.
+Soft paths form one stage of the stack of translations between what the author writes in the \texttt{tikzpicture} environments in their \LaTeX\ document and what is eventually written to the output file.
+Most of the complicated processing has been done by the time a soft path is constructed, but it is still very definitely a \TeX\ object and there has not, for example, been any consideration as to what the eventual output file format is (such as PDF, DVI, or SVG).
+So it is very amenable to being modified at this stage and this package provides a set of routines for doing so.
- The original purpose was to provide a common core on which other packages would be built.
- Indeed, the packages \texttt{calligraphy}, \texttt{knots}, and \texttt{penrose} all use this package.
- However, over time I've found myself wanting to use the routines of this package at a higher level and so have designed some user-level interfaces.
- This document documents those.
+The original purpose was to provide a common core on which other packages would be built.
+Indeed, the packages \texttt{calligraphy}, \texttt{knots}, and \texttt{tilings} all use this package.
+However, over time I've found myself wanting to use the routines of this package at a higher level and so have designed some user-level interfaces.
+This document documents those.
- To clarify some terminology used in this document (and more generally, this package), I regard paths as being composed of \emph{segments} and \emph{components}.
+To clarify some terminology used in this document (and more generally, this package), I regard paths as being composed of \emph{segments} and \emph{components}.
A \emph{segment} is a minimal drawing piece.
Thus it might be a straight line or a B\'ezier curve.
A \emph{component} is a minimal connected section of the path.
@@ -634,6 +636,24 @@ The ones that keep the middle need two parameters to specify the break points.
\end{function}
+\begin{function}{
+ arrow shortening
+}
+\begin{syntax}
+|arrow shortening|
+|arrow shortening=|\marg{true{\OriginalBar}false}
+\end{syntax}
+
+When an arrow is added to a path then the path is shortened so that the arrow tip is at the end of where the path should end up.
+Placing an arrow, therefore, has two effects: modifying the path and rendering the arrow.
+The former should happen before a soft path is manipulated, the latter afterwards.
+This key allows for the necessary separation to occur.
+Invoking it when the path is used disables the shortening at that juncture.
+
+Note that if the path (or its last segment) is very short then when the arrow is eventually placed it may end up pointing backwards.
+Fixing this is on the \emph{ToDo} list!
+\end{function}
+
\subsection{Exporting Paths}
There are two keys to export a path.
@@ -908,6 +928,21 @@ The intention with the second key is that it is similar to what happens with the
\end{tikzpicture}
\end{example}
+\begin{example}
+\begin{tikzpicture}[>=Latex, line width=5pt]
+% Just a simple line
+\draw (0,1) to[bend left] +(5,0);
+% Same line but with arrows, also save the path
+\draw[->.>, spath/save=arrow] (0,0) to[bend left] +(5,0);
+% Let's redraw that path without the arrows - it's short! But also distorted
+\draw[spath/use={arrow,transform={yshift=-1cm}}];
+% So if we redraw it with arrows it gets doubly shortened
+\draw[->.>,spath/use={arrow,transform={yshift=-2cm}}];
+% If we disable the shortening, the arrows end up in the right place
+\draw[->.>,spath/use={arrow,transform={yshift=-3cm}}, spath/arrow shortening=false];
+\end{tikzpicture}
+\end{example}
+
\item Intersections.
One of the main motivations for implementing the intersection routines was to provide a different way of drawing knots and links and similar diagrams.
diff --git a/graphics/pgf/contrib/spath3/spath3_code.dtx b/graphics/pgf/contrib/spath3/spath3_code.dtx
index 031c0e7bd3..3b0178db5a 100644
--- a/graphics/pgf/contrib/spath3/spath3_code.dtx
+++ b/graphics/pgf/contrib/spath3/spath3_code.dtx
@@ -5,7 +5,7 @@
%<*readme>
----------------------------------------------------------------
spath3 --- LaTeX3 functions for manipulating PGF soft paths
-E-mail: loopspace@mathforge.org
+E-mail: Andrew Stacey <loopspace@mathforge.org>
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
----------------------------------------------------------------
@@ -27,7 +27,7 @@ As applications of its use, included are a package for drawing calligraphic path
\preamble
----------------------------------------------------------------
spath3 --- Functions for manipulating PGF soft paths
-E-mail: loopspace@mathforge.org
+E-mail: Andrew Stacey <loopspace@mathforge.org>
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
----------------------------------------------------------------
@@ -35,7 +35,7 @@ See http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2011-2021 by Andrew Stacey <loopspace@mathforge.org>
+Copyright (C) 2011-2024 by Andrew Stacey <loopspace@mathforge.org>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License (LPPL), either
@@ -60,7 +60,7 @@ and the derived files spath3.ins,
calligraphy.pdf
knots.pdf
spath3.pdf
- README
+ README.txt
\endpostamble
\usedir{tex/latex/spath3}
@@ -143,7 +143,7 @@ and the derived files spath3.ins,
%</driver>
% \fi
%
-% \CheckSum{10189}
+% \CheckSum{10278}
%
% \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
@@ -171,6 +171,7 @@ and the derived files spath3.ins,
% \changes{2.4}{2021/02/21}{Rejigged how the routines for using paths were implemented, added some more routines for joining paths.}
% \changes{2.6}{2021/11/23}{Modified core routines to cope with a "true rectangle" path; added routines for splitting at a parametrised point.}
% \changes{2.7}{2022/08/24}{Bug fixes}
+% \changes{2.8}{2024/05/31}{Routine to disable arrow shortening, bug fixes}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
@@ -198,7 +199,7 @@ and the derived files spath3.ins,
% It was originally not really intended for use by end users but as a foundation on which other packages can be built.
% However, over the years I've found myself using it at ever higher levels and so a set of interfaces has been designed using TikZ keys.
%
-% It also provides the engine that drives a few other packages, such as the \Verb+calligraphy+, \Verb+knot+, and \Verb+penrose+ packages.
+% It also provides the engine that drives a few other packages, such as the \Verb+calligraphy+, \Verb+knot+, and \Verb+tilings+ (formerly, \Verb+penrose+) packages.
% The first two of these are subpackages of this one.
% The \Verb+calligraphy+ package simulates a calligraphic pen stroking a path.
% The \Verb+knots+ package can be used to draw knot (and similar) diagrams.
@@ -208,7 +209,7 @@ and the derived files spath3.ins,
% \begin{itemize}
% \item \Verb+calligraphy+
% \item \Verb+knots+
-% \item \Verb+penrose+
+% \item \Verb+tilings+
% \item \Verb+spath3+ (\emph{this} document is the code, there's another which focusses on usage)
% \end{itemize}
%
@@ -259,7 +260,7 @@ and the derived files spath3.ins,
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\RequirePackage{pgf}
-\ProvidesExplPackage {spath3} {2022/08/24} {2.7} {Functions for
+\ProvidesExplPackage {spath3} {2024/05/31} {2.8} {Functions for
manipulating PGF soft paths}
\RequirePackage{xparse}
% \end{macrocode}
@@ -375,6 +376,13 @@ manipulating PGF soft paths}
\bool_new:N \l_spath_movetorelevant_bool
% \end{macrocode}
%
+% When manipulating soft paths, we might need to separate the shortening due to an arrow from when the path is rendered.
+%
+% \begin{macrocode}
+\bool_new:N \l_spath_arrow_shortening_bool
+\bool_set_true:N \l_spath_arrow_shortening_bool
+% \end{macrocode}
+%
% The intersection routine can't happen inside a group so we need two token lists to hold the paths that we'll intersect.
%
% \begin{macrocode}
@@ -457,7 +465,7 @@ manipulating PGF soft paths}
{
\tl_set:Nx \l_@@_tmpc_tl {\tl_head:N \l_@@_tmpa_tl}
\tl_set:Nx \l_@@_tmpa_tl {\tl_tail:N \l_@@_tmpa_tl}
- \tl_case:NnF \l_@@_tmpc_tl
+ \token_case_meaning:NnF \l_@@_tmpc_tl
{
\c_spath_moveto_tl
{
@@ -718,7 +726,7 @@ manipulating PGF soft paths}
\int_set:Nn \l_@@_tmpa_int {0}
\tl_map_inline:nn {#1} {
\tl_set:Nn \l_@@_tmpa_tl {##1}
- \tl_case:NnT \l_@@_tmpa_tl
+ \token_case_meaning:NnT \l_@@_tmpa_tl
{
\c_spath_lineto_tl {}
\c_spath_curveto_tl {}
@@ -763,7 +771,7 @@ manipulating PGF soft paths}
\int_set:Nn \l_@@_tmpa_int {0}
\tl_map_inline:nn {#1} {
\tl_set:Nn \l_@@_tmpa_tl {##1}
- \tl_case:Nn \l_@@_tmpa_tl
+ \token_case_meaning:Nn \l_@@_tmpa_tl
{
\c_spath_moveto_tl
{
@@ -910,7 +918,7 @@ manipulating PGF soft paths}
}
{
\tl_set:Nx \l_@@_tmpb_tl {\tl_head:N \l_@@_tmpa_tl}
- \tl_case:Nn \l_@@_tmpb_tl
+ \token_case_meaning:Nn \l_@@_tmpb_tl
{
\c_spath_moveto_tl
{
@@ -1102,7 +1110,7 @@ manipulating PGF soft paths}
}
{
\tl_set:Nx \l_@@_tmpb_tl {\tl_head:N \l_@@_tmpa_tl}
- \tl_case:Nn \l_@@_tmpb_tl
+ \token_case_meaning:Nn \l_@@_tmpb_tl
{
\c_spath_moveto_tl
{
@@ -1229,7 +1237,7 @@ manipulating PGF soft paths}
\tl_set:Nx \l_@@_tmpc_tl {\tl_head:N \l_@@_tmpa_tl}
\bool_set_false:N \l_@@_rect_bool
- \tl_case:NnTF \l_@@_tmpc_tl
+ \token_case_meaning:NnTF \l_@@_tmpc_tl
{
\c_spath_moveto_tl {
@@ -1679,8 +1687,8 @@ manipulating PGF soft paths}
\tl_clear:N \l_@@_tmpa_tl
\tl_put_right:Nn \l_@@_tmpa_tl {
\ExplSyntaxOn
- \tl_clear_new:N #1
- \tl_set:Nn #1 {#2}
+ \tl_gclear_new:N #1
+ \tl_gset:Nn #1 {#2}
\ExplSyntaxOff
}
\protected@write\@auxout{}{
@@ -3054,6 +3062,35 @@ manipulating PGF soft paths}
}
\cs_generate_variant:Nn \spath_gbake_shorten:N {c}
% \end{macrocode}
+%
+% Shortening the path when it is baked can cause issues with arrows.
+% Putting an arrow in a path definition affects the path because the path gets shortened so that the arrow ends where the path was meant to end.
+% So an arrow affects the path definition, but the arrow is not itself part of the path so if an arrow is used when the path is defined and again when the path is used, the path will be shortened twice which might not be what is intended.
+% Therefore it is useful to have a way to disable the shortening and place an arrow tip at the actual end of the line.
+% The following code achieves that.
+%
+% Save the original command that computes the arrow shortening.
+% \begin{macrocode}
+\cs_set_eq:Nc \@@_pgf_arrow_compute_shortening:n {pgf@arrow@compute@shortening}
+% \end{macrocode}
+%
+% After \verb+\pgf@arrow@compute@shortening+ then \verb+\pgf@xa+ is the amount to shorten the line by, so we will be setting that to 0pt.
+% Then \verb+\pgf@xb+ is the length of the arrow head which is used to position the arrow and so before zeroing \verb+\pgf@xa+ we subtract it from \verb+\pgf@xb+ so that the arrow is placed so that its back point is at the current position.
+%
+% \begin{macrocode}
+\cs_new_nopar:Npn \@@_arrow_compute_shortening:n #1
+{
+ \@@_pgf_arrow_compute_shortening:n {#1}
+ \bool_if:NF \l_spath_arrow_shortening_bool
+ {
+ \dim_sub:cn {pgf@xb} {\dim_use:c {pgf@xa}}
+ \dim_zero:c {pgf@xa}
+ }
+}
+
+\cs_set_eq:cN {pgf@arrow@compute@shortening} \@@_arrow_compute_shortening:n
+% \end{macrocode}
+%
% \end{macro}
%
% \begin{macro}[internal]{
@@ -3209,7 +3246,7 @@ manipulating PGF soft paths}
\tl_set:Nx \l_@@_tmpc_tl {\tl_head:N \l_@@_tmpa_tl}
\tl_set:Nx \l_@@_tmpa_tl {\tl_tail:N \l_@@_tmpa_tl}
- \tl_case:NnF \l_@@_tmpc_tl
+ \token_case_meaning:NnF \l_@@_tmpc_tl
{
\c_spath_closepath_tl {
@@ -3930,7 +3967,7 @@ manipulating PGF soft paths}
}
{
\tl_set:Nx \l_@@_tmpc_tl {\tl_head:N \l_@@_tmpa_tl}
- \tl_case:NnF \l_@@_tmpc_tl
+ \token_case_meaning:NnF \l_@@_tmpc_tl
{
\c_spath_curvetoa_tl
{
@@ -4225,7 +4262,7 @@ manipulating PGF soft paths}
{
\tl_set:Nx \l_@@_tmpf_tl {\tl_head:N \l_@@_tmpe_tl}
\tl_set:Nx \l_@@_tmpe_tl {\tl_tail:N \l_@@_tmpe_tl }
- \tl_case:Nn \l_@@_tmpf_tl
+ \token_case_meaning:Nn \l_@@_tmpf_tl
{
\c_spath_lineto_tl
{
@@ -4279,7 +4316,7 @@ manipulating PGF soft paths}
}
{
- \tl_case:Nn \l_@@_tmpf_tl
+ \token_case_meaning:Nn \l_@@_tmpf_tl
{
\c_spath_lineto_tl
{
@@ -5018,7 +5055,7 @@ manipulating PGF soft paths}
\tl_clear:N \l_@@_tmpc_tl
- \tl_case:Nn \l_@@_tmpb_tl
+ \token_case_meaning:Nn \l_@@_tmpb_tl
{
\c_spath_moveto_tl
{
@@ -5263,7 +5300,7 @@ manipulating PGF soft paths}
\tl_clear:N \l_@@_tmpc_tl
- \tl_case:Nn \l_@@_tmpb_tl
+ \token_case_meaning:Nn \l_@@_tmpb_tl
{
\c_spath_moveto_tl
{
@@ -6383,7 +6420,7 @@ manipulating PGF soft paths}
\tl_map_inline:nn {#1}
{
\tl_set:Nn \l_@@_tmpb_tl {##1}
- \tl_case:NnF \l_@@_tmpb_tl
+ \token_case_meaning:NnF \l_@@_tmpb_tl
{
\c_spath_moveto_tl
{
@@ -6516,10 +6553,14 @@ manipulating PGF soft paths}
\cs_new_protected_nopar:Npn \spath_protocol_path:n #1
{
\spath_minbb:Nn \l_@@_tmpa_tl {#1}
- \exp_last_unbraced:NV \pgf@protocolsizes\l_@@_tmpa_tl
+ \dim_set:Nn \l_@@_tmpa_dim {\tl_item:Nn \l_@@_tmpa_tl {1}}
+ \dim_set:Nn \l_@@_tmpb_dim {\tl_item:Nn \l_@@_tmpa_tl {2}}
+ \pgf@protocolsizes\l_@@_tmpa_dim\l_@@_tmpb_dim
\spath_maxbb:Nn \l_@@_tmpa_tl {#1}
- \exp_last_unbraced:NV \pgf@protocolsizes\l_@@_tmpa_tl
+ \dim_set:Nn \l_@@_tmpa_dim {\tl_item:Nn \l_@@_tmpa_tl {1}}
+ \dim_set:Nn \l_@@_tmpb_dim {\tl_item:Nn \l_@@_tmpa_tl {2}}
+ \pgf@protocolsizes\l_@@_tmpa_dim\l_@@_tmpb_dim
}
\cs_generate_variant:Nn \spath_protocol_path:n {V}
% \end{macrocode}
@@ -6880,7 +6921,7 @@ manipulating PGF soft paths}
}
}
{
- \msg_warning:nnn { spath3 } { missing soft path } { #2 }
+ \msg_warning:nnx { spath3 } { missing soft path } { #2 }
}
\tl_use:N \l_@@_check_tl
}
@@ -9027,12 +9068,8 @@ manipulating PGF soft paths}
% This puts a conditional around the \texttt{spot weld} key because when figuring out a knot drawing then we will initially want to render it without the spot weld to keep the number of components constant.
%
% \begin{macrocode}
- draft~ mode/.is~ choice,
- draft~ mode/true/.code={
- \bool_set_true:N \l_@@_draft_bool
- },
- draft~ mode/false/.code={
- \bool_set_false:N \l_@@_draft_bool
+ draft~ mode/.code={
+ \@@_set_bool:Nn \l_@@_draft_bool {#1}
},
maybe~ spot~ weld/.code={
\bool_if:NF \l_@@_draft_bool
@@ -9113,6 +9150,12 @@ manipulating PGF soft paths}
},
% \end{macrocode}
%
+% \begin{macrocode}
+ arrow~ shortening/.code={
+ \@@_set_bool:Nn \l_spath_arrow_shortening_bool {#1}
+ },
+% \end{macrocode}
+%
% For single argument commands which take a path as their argument, set the default to be \Verb+current+ so that they use the current path.
%
% \begin{macrocode}
@@ -9616,7 +9659,7 @@ manipulating PGF soft paths}
\dim_set:Nn \l_@@_tmpb_dim {\tl_item:Nn \l_@@_tmpa_tl {3}}
\tl_set:Nx \l_@@_tmpb_tl {\tl_item:Nn \l_@@_tmpa_tl {4}}
- \tl_case:NnF \l_@@_tmpb_tl
+ \token_case_meaning:NnF \l_@@_tmpb_tl
{
\c_spath_lineto_tl
{
@@ -9668,7 +9711,7 @@ manipulating PGF soft paths}
\dim_set:Nn \l_@@_tmpb_dim {\tl_item:Nn \l_@@_tmpa_tl {-1}}
\tl_set:Nx \l_@@_tmpb_tl {\tl_item:Nn \l_@@_tmpa_tl {-3}}
- \tl_case:NnF \l_@@_tmpb_tl
+ \token_case_meaning:NnF \l_@@_tmpb_tl
{
\c_spath_lineto_tl
{
@@ -10411,6 +10454,15 @@ manipulating PGF soft paths}
}
}
+\cs_new_nopar:Npn \knot_show_strand:n #1
+{
+ \bool_if:NT \l_@@_debugging_bool
+ {
+ \iow_term:n {===Knot~ debug: #1===}
+ \spath_show:v {knot #1}
+ }
+}
+
\cs_generate_variant:Nn \knot_debug:n {x}
% \end{macrocode}
% \end{macro}
@@ -10592,6 +10644,7 @@ manipulating PGF soft paths}
knot~ diagram/only~ when~ rendering/.try,
only~ when~ rendering/.try,
}
+ \knot_show_strand:n {strand #1}
\spath_tikz_path:Vv \l_@@_tmpa_tl {knot strand #1}
\group_end:
\endpgfscope
@@ -10629,6 +10682,7 @@ manipulating PGF soft paths}
}
{
\tl_clear:N \l_@@_tmpa_tl
+ \spath_remove_empty_components:c {knot strand #1}
\spath_initialpoint:Nv \l_@@_tmpa_tl {knot strand #1}
\tl_put_left:NV \l_@@_tmpa_tl \c_spath_moveto_tl
\spath_segments_to_seq:Nv \l_@@_segments_seq {knot strand #1}
@@ -10649,7 +10703,7 @@ manipulating PGF soft paths}
{
\knot_debug:n {knot~ split~ self~ intersects}
\tl_set:Nx \l_@@_tmpc_tl {\tl_item:nn {#1} {4}}
- \tl_case:NnF \l_@@_tmpc_tl
+ \token_case_meaning:NnF \l_@@_tmpc_tl
{
\c_spath_curvetoa_tl
{
@@ -11271,6 +11325,7 @@ manipulating PGF soft paths}
\int_set_eq:NN \l_@@_component_start_int \g_@@_filaments_int
\int_incr:N \l_@@_component_start_int
\tl_set_eq:Nc \l_@@_tmpa_tl {l_@@_options_strand #1}
+ \spath_remove_empty_components:c {knot strand #1}
\spath_segments_to_seq:Nv \l_@@_segments_seq {knot strand #1}
\seq_map_function:NN \l_@@_segments_seq \knot_save_filament:N
}
@@ -11284,7 +11339,7 @@ manipulating PGF soft paths}
{
\knot_debug:n {knot~ save~ filament}
\tl_set:Nx \l_@@_tmpb_tl {\tl_item:nn {#1} {4}}
- \tl_case:NnF \l_@@_tmpb_tl
+ \token_case_meaning:NnF \l_@@_tmpb_tl
{
\c_spath_moveto_tl
{
diff --git a/graphics/pgf/contrib/spath3/spath3_code.pdf b/graphics/pgf/contrib/spath3/spath3_code.pdf
index f773a0b534..840b7842d3 100644
--- a/graphics/pgf/contrib/spath3/spath3_code.pdf
+++ b/graphics/pgf/contrib/spath3/spath3_code.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/sunpath/README.md b/graphics/pgf/contrib/sunpath/README.md
new file mode 100644
index 0000000000..108f45025d
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/README.md
@@ -0,0 +1,60 @@
+# `sunpath` -- Draw Sun Path #
+
+
+(C) 2024 Hồng-Phúc Bùi
+
+
+## Description ##
+
+This package provides tool to draw a sunpath chart like this:
+
+![sunpath chart](https://raw.githubusercontent.com/hpb-htw/sunpath/refs/heads/master/sunpath.track.svg)
+
+## Licence ##
+
+
+This package may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this
+License or any later version. The latest version
+of this license is in the file https://www.latex-project.org/lppl.txt
+
+## Build and Install (for Distributor) ##
+
+
+* To build the style file `sunpath.sty` just run **one** of
+
+```
+latex sunpath.ins
+pdflatex sunpath.ins
+xelatex sunpath.ins
+lualatex sunpath.ins
+```
+
+then you can copy `sunpath.sty` to your local `texmf` tree, where latex can find it.
+
+* To create PDF Document manual you must use `lualatex` via `l3build doc`:
+
+```
+l3build doc
+```
+
+You also need the TikZ-library hobby to create the curve.
+
+```
+\usetikzlibrary{hobby}
+```
+
+(`lualatex` because of my name, really ego right! It needs unicode to be typeset correctly.)
+
+## Development ##
+
+
+I try to use latex3 as much as posible. You can use
+
+```
+l3build doc
+```
+
+to create the style file and documentation files at once. You can also (like I also do) use `make`
+to call repeatly tasks.
+
diff --git a/graphics/pgf/contrib/sunpath/horizontal-coordinate.pdf b/graphics/pgf/contrib/sunpath/horizontal-coordinate.pdf
new file mode 100644
index 0000000000..676516d93d
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/horizontal-coordinate.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/sunpath/horizontal-coordinate.tex b/graphics/pgf/contrib/sunpath/horizontal-coordinate.tex
new file mode 100644
index 0000000000..2d121e761e
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/horizontal-coordinate.tex
@@ -0,0 +1,183 @@
+\documentclass[tikz]{standalone}
+
+\usepackage{fontspec}
+\usepackage{mathtools}
+\usepackage{unicode-math}
+\usepackage{siunitx}
+
+\newcommand{\az}{\ensuremath{\Phi}}
+\newcommand{\el}{\ensuremath{\theta}}
+
+% Tikz Style
+\usepackage{tikz}
+
+\usetikzlibrary{decorations.markings}
+\usetikzlibrary{arrows.meta}
+
+\usepackage{pgfplots}
+\pgfplotsset{
+ compat=1.18
+ ,width=15cm
+ ,lua debug
+}
+
+\definecolor{celestial}{rgb}{1,0,1}%{0.0, 0.51, 0.5}
+\definecolor{elevation}{rgb}{0,1,0}%{0.6, 0.4, 0.8}
+\definecolor{horizon}{rgb}{0,0,1}%{0.54, 0.81, 0.94}
+\definecolor{sun}{rgb}{0.83, 0.0, 0.25}
+
+\tikzstyle{help circle} = [dashed, thick]
+\tikzstyle{coordinate curve} = [ultra thick]
+\tikzstyle{sun position} = [color=sun,ultra thick]
+\tikzstyle{navi direction} = [font=\sffamily\Large]
+\tikzstyle{coordinate angle} = [font=\Large]
+\tikzstyle{base plane} = [font=\sffamily]
+
+\begin{document}
+\begin{tikzpicture}
+\begin{axis}[view={5}{5}
+ ,axis lines=none,
+ ,plot box ratio={1 1 1}
+ ,xlabel=$x$
+ ,ylabel=$y$
+ ,zlabel=$z$
+ ,xmin=-1.4
+ ,xmax=1.4
+% ,ymin=-1.2
+% ,ymax=1.2
+% ,zmin=-1.2
+% ,zmax=1.2
+ ,declare function={
+% Sun position
+ azimuth=-110; % Positive = westward from north
+ elevation = 65; % Positive = from Horizon to Zenith
+ sunx = cos(azimuth)*cos(elevation);
+ suny = sin(azimuth)*cos(elevation);
+ sunz = sin(elevation);
+% Text Az coordinates
+ textazx = cos(3/5*azimuth);
+ textazy = sin(3/5*azimuth);
+ textazz = 0;
+% Text El coordinates
+ textelx = cos(azimuth)*cos(elevation/2);
+ textely = sin(azimuth)*cos(elevation/2);
+ textelz = sin(elevation/2);
+% Celestial Meridian
+ ucx = 1;
+ ucy = 0;
+ ucz = 0;
+%
+ vcx = 0;
+ vcy = 0;
+ vcz = 1;
+ celestialx(\t) = cos(\t)*ucx + sin(\t)*vcx;
+ celestialy(\t) = cos(\t)*ucy + sin(\t)*vcy;
+ celestialz(\t) = cos(\t)*ucz + sin(\t)*vcz;
+% Horizon => Azimut
+ uhx = 1;
+ uhy = 0;
+ uhz = 0;
+%
+ vhx = 0;
+ vhy = 1;
+ vhz = 0;
+ horizonx(\t) = cos(\t)*uhx + sin(\t)*vhx;
+ horizony(\t) = cos(\t)*uhy + sin(\t)*vhy;
+ horizonz(\t) = cos(\t)*uhz + sin(\t)*vhz;
+% Elevation
+ uex = cos(azimuth);
+ uey = sin(azimuth);
+ uez = 0;
+%
+ vex = 0;
+ vey = 0;
+ vez = 1;
+ elevationx(\t) = cos(\t)*uex + sin(\t)*vex;
+ elevationy(\t) = cos(\t)*uey + sin(\t)*vey;
+ elevationz(\t) = cos(\t)*uez + sin(\t)*vez;
+ }
+]
+%
+\draw[->] (0,0,0) -- (1.1,0,0) node[anchor=west,navi direction] {North};
+\draw[->] (0,0,0) -- (0,-1.5,0) node[anchor=north,navi direction] {East};
+\draw[->] (0,0,0) -- (0,0,1.1) node[anchor=south,navi direction] {Zenith};
+\node at ( 0.71, 0,0.71)[anchor=west,outer sep=1ex,base plane] {Meridian}; %0.71 app sqrt(2)/2
+\node at (-0.71, 0.71,0) [anchor=south,base plane] {Horizon};
+% Plot the Meridian through Nord
+\addplot3 [
+ domain=0:360,
+ samples=60,
+ samples y=1,
+ variable=t,
+ celestial,help circle
+] (
+ {celestialx(t)},
+ {celestialy(t)},
+ {celestialz(t)}
+);
+% Plot the horizon circle
+\addplot3 [
+ domain=0:360,
+ samples=60,
+ samples y=1,
+ variable=t,
+ horizon,help circle
+] (
+ {horizonx(t)},
+ {horizony(t)},
+ {horizonz(t)}
+);
+% Plot the azimuth curve
+\addplot3 [
+ domain=0:azimuth+0.5,
+ samples=60,
+ samples y=1,
+ variable=t,
+ horizon,coordinate curve,
+ postaction={decorate},
+ decoration={markings,
+ mark=at position 0.55 with {\arrow{Latex[round]}}
+ }
+] (
+ {horizonx(t)},
+ {horizony(t)},
+ {horizonz(t)}
+);
+% Plot the great circle through the sun
+\addplot3 [
+ domain=0:360,
+ samples=60,
+ samples y=1,
+ variable=t,
+ elevation,help circle
+] (
+ {elevationx(t)},
+ {elevationy(t)},
+ {elevationz(t)}
+);
+% Plot the elevation curve
+\addplot3 [
+ domain=0.5:elevation,
+ samples=60,
+ samples y=1,
+ variable=t,
+ elevation,coordinate curve,
+ postaction={decorate},
+ decoration={markings,
+ mark=at position 0.5 with {\arrow{Latex[round]}}
+ }
+] (
+ {elevationx(t)},
+ {elevationy(t)},
+ {elevationz(t)}
+) ;
+\draw [-{Latex[round]}, sun position] (0,0,0) -- (sunx, suny, sunz) node[anchor=south east,inner sep=0] {$\odot$};
+\draw [sun position, thin](0,0,0) -- (uex, uey, 0);
+\node at (textazx, textazy, textazz) [anchor=north,coordinate angle] {\az};
+\node at (textelx, textely, textelz) [anchor=east ,coordinate angle] {\el};
+\end{axis}
+\end{tikzpicture}
+
+\end{document}
+
+
diff --git a/graphics/pgf/contrib/sunpath/releasenote.txt b/graphics/pgf/contrib/sunpath/releasenote.txt
new file mode 100644
index 0000000000..e13301084a
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/releasenote.txt
@@ -0,0 +1,2 @@
+* [breaking change] Rename prefix draw to sp in exposed command
+* [intern] let build.lua also check release date
diff --git a/graphics/pgf/contrib/sunpath/sunpath.article.pdf b/graphics/pgf/contrib/sunpath/sunpath.article.pdf
new file mode 100644
index 0000000000..0f68980307
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.article.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/sunpath/sunpath.article.tex b/graphics/pgf/contrib/sunpath/sunpath.article.tex
new file mode 100644
index 0000000000..0904568fec
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.article.tex
@@ -0,0 +1,39 @@
+\documentclass{article}
+
+\usepackage{fontspec}
+\usepackage{luaotfload}
+\usepackage{tikz}
+\usepackage{graphicx}
+\usepackage{float}
+
+\usepackage{sunpath}
+
+\usetikzlibrary{hobby} % this library let one connect points to curve.
+
+\newcommand{\TikZ}{Ti\textit{k}Z}
+
+\title{
+ \textsf{sunpath} -- Draw Sun Path\\
+ (Test Compatibility only)
+}%
+%
+\author{%
+ Hồng-Phúc Bùi%
+}
+
+
+
+\begin{document}
+%
+\parindent0pt
+%
+\maketitle
+\tableofcontents
+
+\section{Object}
+
+This file tests if this package can be used within a \texttt{article} class.
+
+\input{sunpath.docpart.tex}
+
+\end{document}
diff --git a/graphics/pgf/contrib/sunpath/sunpath.docpart.tex b/graphics/pgf/contrib/sunpath/sunpath.docpart.tex
new file mode 100644
index 0000000000..810bc8c6b9
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.docpart.tex
@@ -0,0 +1,447 @@
+\section{Documentation}
+
+\subsection{Context and Terms}
+The position of the sun from perspective of an observer is defined by two parameters:
+
+\begin{itemize}
+ \item the azimuth $\Phi$, which tells the observer, how far (in degree) he must turn around from the North direction,
+ \item the altitude $\theta$, which tells the observer, how height (in degree) about the horizon he must look to see the sun.
+\end{itemize}
+The azimuth can take a value in the interval $[0,360)$.
+The altitude can take a value in the interval $[0,90]$, whereas 0 is the horizon, 90 is the zenith.
+We do not care so much about how far is the sun, so we normalize this distance to 1.
+
+
+The figure~\ref{fig:hz-coordinate} shows these parameter.
+The coordinate system, which takes the position of the observer as the centre,
+and the observer's local horizon as the fundamental plane,
+is called horizontal coordinate system.\footnote{dt.: topozentrisches Koordinatensystem}
+
+\begin{figure}[H]
+\centering
+\includegraphics[scale=0.75]{horizontal-coordinate.pdf}
+\caption{Horizontal coordinate system}
+\label{fig:hz-coordinate}
+\end{figure}
+
+In this package, the cardinal points have specifics values of azimuth as following:
+
+\begin{tabular}{c c c c}
+North & East & South & West \\
+0° & 90° & 180° & 270°
+\end{tabular}
+
+
+The projection of the sun on the horizon plane is a point, which can be defined by two parameters:
+\begin{itemize}
+\item the angle $\Phi$,
+\item the distance $r = \cos(\theta)$ from the centre to the sun.
+\end{itemize}
+
+Figure~\ref{fig:sun-projection} shows the projection of the sun on the horizontal plane.
+If we track the position of sun on the horizontal plane changes from time to time, we will get a curve.
+This curve is called the sun path.
+A chart which shows position of the sun from time to time is called a sun path chart.
+Of course there are many type of sun path chart.
+This package provides tools to plot sun path on the horizontal plane.
+
+\begin{figure}[H]
+\centering
+\begin{tikzpicture}[spradius=3]
+\spcrosshair
+\spaltitudecircle{{0}}
+\spgeodirection[0pt]
+\path[draw=red,fill=red](sunpath cs:azi=110,alt=66) circle[radius=2pt] ;
+\end{tikzpicture}
+\caption{Projection of the sun on the horizon plane}
+\label{fig:sun-projection}
+\end{figure}
+
+
+\subsection{Draw a Sun path chart}
+
+Figure~\ref{fig:sun-projection} is a very rudimentary sun path chart.
+There is neither scalar, nor time on the chart.
+A more usable Sun path chart may look like one in the figure~\ref{fig:full-sun-path-chart}.
+In this section we will create this chart.
+
+
+\begin{figure}[H]
+\centering
+\begin{tikzpicture}
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+
+\spazimuthtick
+
+\spgeodirection
+\spaltitudelabel{{10,20,...,80,85}}
+\spazimuthlabel{{0,15,...,350}}
+
+\path[draw=red,fill=red](sunpath cs:azi=110,alt=66) circle[radius=2pt] node[below] {{9:30}};
+\end{tikzpicture}
+\caption{A Sun path chart}
+\label{fig:full-sun-path-chart}
+\end{figure}
+
+\subsubsection{Outlines}
+
+User has to place \verb:\usepackage{sunpath}: in the preamble part of the document.
+
+The chart is a \TikZ-picture, so we need a \texttt{tikzpicture}-environment.
+We can also customize the distance from the centre of the chart to the horizon line by setup the option \texttt{spradius}.
+By default it is 5.5 in PGF xy coordinate.
+In this example we make it a little bigger:
+
+\marginpar{\texttt{spradius}}
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\end{tikzpicture}
+\end{verbatim}
+
+We also need the crosshair, the horizon line --in this type of sun path chart it is a circle--,
+the fours geographic direction.
+This can be done by adding more commands into the \texttt{tikzpicture}
+
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0}}
+\spgeodirection
+\end{tikzpicture}
+\end{verbatim}
+
+\marginpar{\texttt{drawcrosshair\\ drawgeodirection\\ drawaltitudecircle}}
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0}}
+\spgeodirection
+\end{tikzpicture}
+
+
+Man has to pay attention to the double curry brackets in the command \texttt{drawaltitudecircle}.
+The outer brackets delimit the argument of the command.
+The argument of the command is a valid \TikZ-range, which is used in a \verb:\foreach: command,
+so it has be placed in between a pair of curry bracket.
+That is the inner brackets.
+
+
+\subsubsection{Scalar and labels}
+
+
+As the name of the commando says, we can also draw more than the horizon line by adding some values of altitude in the range of the argument of the command \verb|\spaltitudecircle|.
+For example \verb:\spaltitudecircle{{0,10,...,80,85}}: draws 10 circles of altitude.
+
+\marginpar{\texttt{drawaltitudecircle}}
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spgeodirection
+\end{tikzpicture}
+\end{verbatim}
+
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spgeodirection
+\end{tikzpicture}
+
+
+We can use the command \verb:\drawazumuthline{r}{h}{l}: to draw azimuth lines in range \verb:r:,
+from the higher altitude \verb:h: to the lower altitude \verb:l:.
+
+For example
+
+\begin{itemize}
+ \item \verb:\spazimuthline{{0,10,...,360}}{85}{70}: draws every 10° azimuth from the 85° altitude to to 70° altitude.
+ \item \verb:\spazimuthline{{0,5,...,360}}{80}{0}: draws every 5° azimuth from the 80° altitude to to 0° altitude.
+\end{itemize}
+
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+
+\spgeodirection
+\end{tikzpicture}
+\end{verbatim}
+
+\marginpar{\texttt{drawazimuthline}}
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+
+\spgeodirection
+\end{tikzpicture}
+
+To draw azimuth ticks outside the horizon line, we can use
+\verb:\spazimuthtick:.
+This command expects for now no argument.
+
+\begin{verbatim}
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+\spgeodirection
+\end{tikzpicture}
+\end{verbatim}
+
+\marginpar{\texttt{drawazimuthtick}}
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+\spgeodirection
+\end{tikzpicture}
+
+
+To draw labels of azimuth lines and altitude circles in the chart, we can use the commands
+
+\verb:\spaltitudelabel{r}: and
+
+\verb:\spazimuthlabel{r}:.
+
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+\spaltitudelabel{{10,20,...,80,85}}
+\spazimuthlabel{{0,15,...,350}}
+\spgeodirection
+\end{tikzpicture}
+
+That it's, now we have a nice chart, on which we can draw positions of the sun from time to time.
+
+\subsubsection{Position of the sun}
+
+We can easily plot the position of the sun in the chart with the coordinate \texttt{sunpath},
+if the azimuth and the altitude are given.
+For example, to plot the position of the sun with 150° Azimuth and 22° Altitude,
+we just use the \texttt{path} command as following:
+
+\verb|\path[fill=red,draw=red] (sunpath cs:azi=150,alt=22);|
+
+The result would be
+
+\begin{verbatim}
+% ...
+\path[fill=red,draw=red] (sunpath cs:azi=150,alt=35) circle[radius=2pt];
+\spaltitudelabel{{10,20,...,80,85}}[160]
+% ...
+\end{verbatim}
+
+\marginpar{\texttt{sunpath cs}}
+\begin{tikzpicture}[spradius=6]
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+\path[fill=red,draw=red] (sunpath cs:azi=150,alt=35) circle[radius=2pt];
+
+\spaltitudelabel{{10,20,...,80,85}}[160]
+\spazimuthlabel{{0,15,...,350}}
+\spgeodirection
+\end{tikzpicture}
+
+The command \verb:\spaltitudelabel: can also take an optional argument to set altitude label on other azimuth.
+This can be useful if the labels cover distract important points on chart.
+In this chart it is set to be 160°. So one can easily read the azimuth of the sun on the chart.
+
+We can also connect the position of the sun to a path, for example with the positions given in the following table
+
+{\ttfamily
+\begin{tabular}{c c c}
+Time & Azimuth & Altitude \\
+07:44 & 98.968673 & -0.208672 \\
+08:00 & 102.009695 & 2.035492 \\
+10:00 & 126.513583 & 19.499874 \\
+12:00 & 156.854847 & 31.593335 \\
+14:00 & 192.292832 & 33.425294 \\
+16:00 & 224.708002 & 24.034984 \\
+18:00 & 250.626597 & 7.619801 \\
+18:53 & 260.810553 & -0.244637 \\
+\end{tabular}
+}
+
+we can get a sun path like this:
+
+\begin{tikzpicture}[spradius=6]
+\tikzset{
+ sunpath curve/.style={draw,fill=red},
+ sunpath point/.style={radius=2pt,draw=red},
+ sunpath node/.style={below,inner sep=0.5pt,outer sep=4.5pt,fill=white}
+}
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+\path[sunpath curve]
+ (sunpath cs:azi=98.968673,alt=-0.208672) circle[sunpath point] node[sunpath node]{ { 07:44 } }
+--(sunpath cs:azi=102.009695,alt=2.035492) circle[sunpath point] node[sunpath node]{ { 08:00 } }
+--(sunpath cs:azi=126.513583,alt=19.499874) circle[sunpath point] node[sunpath node]{ { 10:00 } }
+--(sunpath cs:azi=156.854847,alt=31.593335) circle[sunpath point] node[sunpath node]{ { 12:00 } }
+--(sunpath cs:azi=192.292832,alt=33.425294) circle[sunpath point] node[sunpath node]{ { 14:00 } }
+--(sunpath cs:azi=224.708002,alt=24.034984) circle[sunpath point] node[sunpath node]{ { 16:00 } }
+--(sunpath cs:azi=250.626597,alt=7.619801) circle[sunpath point] node[sunpath node]{ { 18:00 } }
+--(sunpath cs:azi=260.810553,alt=-0.244637) circle[sunpath point] node[sunpath node]{ { 18:53 } }
+;
+
+\spaltitudelabel{{10,20,...,80,85}}
+\spazimuthlabel{{0,15,...,350}}
+\spgeodirection
+\end{tikzpicture}
+
+But this chart is not nice.
+If the data is machine readable, we can generate all stuffs of the chart automatically.
+This chart below is generated from the table above.
+Just use your favourite programming language to process sun data.
+
+\begin{tikzpicture}[spradius=6]
+\tikzset{
+ sun path curve/.style={draw=red!20,thick},
+ sun point/.style={radius=2pt,draw=red,fill=red},
+ sun label/.style={below,fill=white,outer sep=4pt,text=red},
+}
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+\coordinate (P0) at (sunpath cs:azi=98.968673,alt=-0.208672);
+\coordinate (P1) at (sunpath cs:azi=102.009695,alt=2.035492);
+\coordinate (P2) at (sunpath cs:azi=126.513583,alt=19.499874);
+\coordinate (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+\coordinate (P4) at (sunpath cs:azi=192.292832,alt=33.425294);
+\coordinate (P5) at (sunpath cs:azi=224.708002,alt=24.034984);
+\coordinate (P6) at (sunpath cs:azi=250.626597,alt=7.619801);
+\coordinate (P7) at (sunpath cs:azi=260.810553,alt=-0.244637);
+\path[sun point] (P0) circle;
+\path[sun point] (P1) circle;
+\path[sun point] (P2) circle;
+\path[sun point] (P3) circle;
+\path[sun point] (P4) circle;
+\path[sun point] (P5) circle;
+\path[sun point] (P6) circle;
+\path[sun point] (P7) circle;
+\node[sun label,anchor=270-98.968673] at (P0) {07:44};
+\node[sun label,anchor=270-102.009695] at (P1) {08:00};
+\node[sun label,anchor=270-126.513583] at (P2) {10:00};
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+\node[sun label,anchor=270-192.292832] at (P4) {14:00};
+\node[sun label,anchor=270-224.708002] at (P5) {16:00};
+\node[sun label,anchor=270-250.626597] at (P6) {18:00};
+\node[sun label,anchor=270-260.810553] at (P7) {18:53};
+\path[sun path curve] (P0) to [curve through={ (P1) .. (P2) .. (P3) .. (P4) .. (P5) .. (P6) }] (P7) ;
+
+\spaltitudelabel{{10,20,...,80,85}}[170]
+\spazimuthlabel{{0,15,...,350}}
+\spgeodirection
+\end{tikzpicture}
+
+\vfill\newpage
+The part, which makes the chart nicer, is there:
+
+\begin{verbatim}
+%...
+\coordinate (P0) at (sunpath cs:azi=98.968673,alt=-0.208672);
+\coordinate (P1) at (sunpath cs:azi=102.009695,alt=2.035492);
+\coordinate (P2) at (sunpath cs:azi=126.513583,alt=19.499874);
+\coordinate (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+\coordinate (P4) at (sunpath cs:azi=192.292832,alt=33.425294);
+\coordinate (P5) at (sunpath cs:azi=224.708002,alt=24.034984);
+\coordinate (P6) at (sunpath cs:azi=250.626597,alt=7.619801);
+\coordinate (P7) at (sunpath cs:azi=260.810553,alt=-0.244637);
+\path[sun point] (P0) circle;
+\path[sun point] (P1) circle;
+\path[sun point] (P2) circle;
+\path[sun point] (P3) circle;
+\path[sun point] (P4) circle;
+\path[sun point] (P5) circle;
+\path[sun point] (P6) circle;
+\path[sun point] (P7) circle;
+\node[sun label,anchor=270-98.968673] at (P0) {07:44};
+\node[sun label,anchor=270-102.009695] at (P1) {08:00};
+\node[sun label,anchor=270-126.513583] at (P2) {10:00};
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+\node[sun label,anchor=270-192.292832] at (P4) {14:00};
+\node[sun label,anchor=270-224.708002] at (P5) {16:00};
+\node[sun label,anchor=270-250.626597] at (P6) {18:00};
+\node[sun label,anchor=270-260.810553] at (P7) {18:53};
+\path[sun path curve] (P0) to [curve through={
+ (P1) .. (P2) .. (P3) .. (P4) .. (P5) .. (P6)
+ }]
+ (P7) ;
+%...
+\end{verbatim}
+
+To set the altitude scale (and also the altitude lines) equidistance, just use the option \verb|altitude mapping=equidistance|.
+The chart above with same data looks like the chart below with this option.
+
+\marginpar{\texttt{altitude mapping}} \texttt{ = equidistance}
+
+\begin{tikzpicture}[spradius=6,altitude mapping=equidistance]
+\tikzset{
+ sun path curve/.style={draw=red!20,thick},
+ sun point/.style={radius=2pt,draw=red,fill=red},
+ sun label/.style={below,fill=white,outer sep=4pt,text=red},
+}
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+\coordinate (P0) at (sunpath cs:azi=98.968673,alt=-0.208672);
+\coordinate (P1) at (sunpath cs:azi=102.009695,alt=2.035492);
+\coordinate (P2) at (sunpath cs:azi=126.513583,alt=19.499874);
+\coordinate (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+\coordinate (P4) at (sunpath cs:azi=192.292832,alt=33.425294);
+\coordinate (P5) at (sunpath cs:azi=224.708002,alt=24.034984);
+\coordinate (P6) at (sunpath cs:azi=250.626597,alt=7.619801);
+\coordinate (P7) at (sunpath cs:azi=260.810553,alt=-0.244637);
+\path[sun point] (P0) circle;
+\path[sun point] (P1) circle;
+\path[sun point] (P2) circle;
+\path[sun point] (P3) circle;
+\path[sun point] (P4) circle;
+\path[sun point] (P5) circle;
+\path[sun point] (P6) circle;
+\path[sun point] (P7) circle;
+\node[sun label,anchor=270-98.968673] at (P0) {07:44};
+\node[sun label,anchor=270-102.009695] at (P1) {08:00};
+\node[sun label,anchor=270-126.513583] at (P2) {10:00};
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+\node[sun label,anchor=270-192.292832] at (P4) {14:00};
+\node[sun label,anchor=270-224.708002] at (P5) {16:00};
+\node[sun label,anchor=270-250.626597] at (P6) {18:00};
+\node[sun label,anchor=270-260.810553] at (P7) {18:53};
+\path[sun path curve] (P0) to [curve through={ (P1) .. (P2) .. (P3) .. (P4) .. (P5) .. (P6) }] (P7) ;
+
+\spaltitudelabel{{10,20,...,80,85}}[170]
+\spazimuthlabel{{0,15,...,350}}
+\spgeodirection
+\end{tikzpicture}
+
+
diff --git a/graphics/pgf/contrib/sunpath/sunpath.dtx b/graphics/pgf/contrib/sunpath/sunpath.dtx
new file mode 100644
index 0000000000..916443f98f
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.dtx
@@ -0,0 +1,353 @@
+% \iffalse meta-comment
+%
+% File: sunpath.dtx Copyright (C) 2024 Hong-Phuc Bui
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/hpb-htw/sunpath
+%
+% for those people who are interested.
+%
+% -----------------------------------------------------------------------
+% \fi
+%
+% ^^A To get version of latex run:
+% ^^A `latex '\typeout{\fmtversion}\stop' | grep LaTeX2e`
+%
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}[2022/11/01]
+%<package>\ProvidesPackage{sunpath}[2024/10/20 v0.5 Draw Sun Path]
+% \fi
+
+% \changes{v0.5}
+% {2024/10/20}
+% {replace prefix "draw" in exposed commands by "sp"}
+% \changes{v0.4-Alpha}
+% {2024/10/20}
+% {rename option altitude projection to altitude mapping}
+% \changes{v0.3-Alpha}
+% {2024/10/16}
+% {add style option in exposed commands;
+% let build.lua read version information from sunpath.dtx file}
+%
+% \changes{v0.2-Alpha}
+% {2024/10/16}
+% {Small fixes in README.md and document}
+%
+% \changes{v0.1-Alpha}
+% {2024/10/10}
+% {Initial implementation}
+
+
+% \section{Implementation}
+%
+% \subsection{Package Dependenies}
+%
+% \begin{macrocode}
+\RequirePackage{expl3}
+\RequirePackage{tikz}
+% \end{macrocode}
+%
+% Load necsessary \texttt{tikz}-libraries.
+% \begin{macrocode}
+\usetikzlibrary{calc,math,through}
+% \end{macrocode}
+
+
+
+
+% \subsection{\texttt{tikz}-Options for the new coordinate system}
+% Setup options for \texttt{tikzpicture} environment.
+%
+% \DescribeMacro{spradius} The radius of the 0° Altitude circle, default 5.5.
+% This value can be accessed via macro \verb:\spradius:.
+%
+% \DescribeMacro{altitude mapping}
+% How the altitude of the sun is mapped on the sunpath diagram.
+% This mapping is a function $f(\theta): [-90,90] \to [0, r]$, where $r$ is saved in \verb|\spradius|.
+%
+% Valid values are \texttt{spherical} and \texttt{equidistance}.
+% Its default value is \texttt{spherical}.
+%
+% This value can be accessed via macro \verb:\altmapping:.
+
+% These options can be used like:
+%
+% \begin{verbatim}
+% \begin{tikzpicture}[spradius=6,altitude projection=equidistance]
+% \coordinate (sunrise) at (sunpath cs:azi=105, alt=66.6);
+% \end{tikzpicture}
+% \end{verbatim}
+%
+% \begin{macrocode}
+\pgfkeys{/tikz/.cd,
+ spradius/.store in=\spradius,
+ spradius=5.5,
+ altitude mapping/.store in = \altmapping,
+ altitude mapping=spherical
+}
+% \end{macrocode}
+%
+
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Define the new coordinate system \texttt{sunpath}}
+\makeatletter
+
+% \subsubsection{Azimuth and altitude}
+% Define component \texttt{azi} (=Azimuth angle) and \texttt{alt} (=Altidude angle) for the coordinate system \texttt{sunpath}.
+% \begin{macrocode}
+\tikzset{
+ cs/azi/.store in=\tikz@cs@azi,
+ cs/alt/.store in=\tikz@cs@alt,
+}
+% \end{macrocode}
+
+
+% \subsubsection{Projection functions}
+% Funtions to map the atitude of the sun to the altitude value on the sun path diagram.
+%
+% \DescribeMacro{spherical}
+% maps an altitude angle $\theta$ to the altitude radius on the diagram with the function
+% \[s (\theta) = r \cos(\theta). \]
+%
+% \DescribeMacro{equidistance}
+% maps an altitude angle $\theta$ to the altitude radius on the diagram with the function
+% \[e (\theta) = r - r \cdot \frac{\left\lvert \theta \right\rvert}{90}. \]
+%
+% \DescribeMacro{altradius}
+% this function is used in the coordinate system \texttt{sunpath} to determinate the altitude
+% radius of an azimuth angle on the sun path chart.
+% It depends on the value of the option \verb:altitude projection:.
+%
+%
+% \DescribeMacro{aziangle}
+% maps the azimuth angle $\Phi$ to the azimuth angle on the diagram with the function
+% \[ a(\Phi) = 90 - \Phi. \]
+% \begin{macrocode}
+\tikzset{
+ declare function = {
+ spherical(\alt) = \spradius * cos(\alt);
+ equidistance(\alt) = \spradius - \spradius*abs(\alt)/90;
+ altradius(\alt) = \altmapping(\alt);
+ aziangle(\x) = 90 - \x;
+ }
+}
+% \end{macrocode}
+%
+
+
+% \subsubsection{Coordinate system \texttt{sunpath}}
+% \begin{macrocode}
+\tikzdeclarecoordinatesystem{sunpath}%
+{
+ \tikzset{cs/.cd,azi=0,alt=0,#1}
+ \tikzmath{
+ \r = altradius(\tikz@cs@alt);
+ \angle = aziangle(\tikz@cs@azi);
+ }
+ \pgfpointadd{\pgfpointxy{0}{0}}{%
+ \pgfpointpolarxy{\angle}{\r}
+ }
+}
+% \end{macrocode}
+\makeatother
+
+
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \subsection{Setup optical options for sunpath diagram}
+% These are pre-defined \TikZ{} style for components of the chart. They can be easily changed by using \cmd{\tikzset}.
+%
+% \DescribeMacro{sunpath grid} \tikz{\draw [sunpath grid] (0,0) -- (1,0);} style for azimuth lines and altitude circles
+%
+% \DescribeMacro{sunpath tick} \tikz{\draw [sunpath tick] (0,0) -- (4pt,0);} style for ticks around the horizon line
+%
+% \DescribeMacro{sunpath minor tick} \tikz{\draw [sunpath minor tick] (0,0) -- (4pt,0);} style for minor ticks around horizon line
+%
+% \DescribeMacro{altitude label} \tikz{\node[altitude label] {80};}
+%
+% \DescribeMacro{azimuth label} \tikz{\node[altitude label] {350};} style for text label of altitude circle respective azimuth line
+%
+% \DescribeMacro{direction label} \tikz{\node[direction label] {N E S W}; } style for text label of four directions
+%
+% \begin{macrocode}
+\tikzset{
+ sunpath grid/.style={help lines,color=blue!45!white!80},
+ sunpath tick/.style={draw,thick,color=blue!90!white!80},
+ sunpath minor tick/.style={draw,thin,color=blue!90!white!80},
+ altitude label/.style={
+ font=\footnotesize\sffamily,
+ fill=white,minimum width={width("90")+2pt},
+ inner sep=0.5pt
+ },
+ azimuth label/.style={
+ font=\footnotesize\sffamily,
+ minimum width={width("360")+2pt},
+ inner sep=0.5pt
+ },
+ direction label/.style={
+ font=\normalsize\rmfamily
+ }
+}
+% \end{macrocode}
+
+
+% \subsection{Expose some commands for end-user}
+
+% \DescribeMacro{\spcrosshair} \oarg{style}
+%
+% Draws a thin line from North to South and a thin line from East to West.
+% Default value of \oarg{style} is \texttt{sunpath grid}.
+%
+% \begin{macrocode}
+\NewDocumentCommand\spcrosshair{O{sunpath grid}}{
+ \draw[#1] (-\spradius,0) -- (\spradius,0);
+ \draw[#1] (0,-\spradius) -- (0,\spradius);
+}
+% \end{macrocode}
+
+
+
+
+% \DescribeMacro{\spgeodirection} \oarg{offset}\oarg{style}
+%
+%
+% Puts four geographic directions North, East, South, West around the horinzon line.
+% \oarg{offset} is the distance from horizon to the \TikZ{} node of the directions.
+% Its default value is 22pt.
+% Set it to zero causes that the directions are set very near to the horizon line.
+% \begin{macrocode}
+\NewDocumentCommand\spgeodirection{O{22pt} O{direction label}}{
+ \foreach \dname / \dgrad in {N/0, E/90, S/180, W/270}{
+ \tikzmath{
+ \polarangle = aziangle(\dgrad);
+ }
+ \coordinate (D) at (\polarangle:\spradius cm + #1);
+ \node[#2,anchor=270-\dgrad] at (D) {\dname};
+ }
+}
+% \end{macrocode}
+
+
+
+
+% \DescribeMacro{\spaltitudecircle} \marg{range}\oarg{style}
+%
+% Draws altitude circle given by \marg{range}.
+% The argument \marg{range} must be a valid \TikZ-range, which can be used in \cmd{\foreach}.
+% For example \verb|{{10,20,...,80,85}}|.
+% The argument \oarg{style} define the style of altitude circles, default is \texttt{sunpath~grid}.
+% \begin{macrocode}
+\NewDocumentCommand\spaltitudecircle{m O{sunpath grid}}{
+ \foreach \altitude in #1 {
+ \coordinate (A) at (sunpath cs:azi=0,alt=\altitude) ;
+ \path[draw,sunpath grid] (0,0) circle[radius=altradius(\altitude)];
+ }
+}
+% \end{macrocode}
+
+
+
+
+% \DescribeMacro{\spaltitudelabel} \marg{range}\oarg{azimuth}\oarg{style}
+%
+% Draws the labels of altitude circles given by \marg{range}.
+% Range must be an in \TikZ{} valid numeric range which can be used in \cmd{\foreach}.
+% For example \verb|{{10,20,...,80}}|
+% The labels are placed along the azimuth \oarg{azimuth} (default 135)
+% and typeset with style \oarg{style} (default \texttt{altitude label}).
+%
+% \begin{macrocode}
+\NewDocumentCommand\spaltitudelabel{m O{135} O{altitude label}}{
+ \foreach \altitude in #1 {
+ \coordinate (A) at (sunpath cs:azi=#2,alt=\altitude) ;
+ \node [anchor=east,#3] at (A) {\altitude};
+ }
+}
+% \end{macrocode}
+
+
+
+
+% \DescribeMacro{\spazimuthlabel} \marg{range}\oarg{style}
+%
+% \begin{macrocode}
+\NewDocumentCommand\spazimuthlabel{m O{azimuth label}}{
+ \foreach \azimuth in #1 {
+ \tikzmath{
+ \polarangle = aziangle(\azimuth);
+ }
+ \coordinate (D) at (\polarangle:\spradius cm + 13pt);
+ \node[#2] at (D) {\azimuth};
+ }
+}
+% \end{macrocode}
+
+
+
+
+% \DescribeMacro{\spazimuthline} \marg{range}\marg{start~alt}\marg{end~alt}
+%
+% \begin{macrocode}
+\NewDocumentCommand\spazimuthline{m m m}{
+ \foreach \azimuth in #1{
+ \draw[sunpath grid]
+ (sunpath cs:azi=\azimuth,alt={#2}) -- (sunpath cs:azi=\azimuth,alt={#3});
+ }
+}
+% \end{macrocode}
+
+
+
+
+% \DescribeMacro{\spazimuthtick} \oarg{major}\oarg{minor}\oarg{mid}
+%
+% Draws ticks along and outside the horizon circle. The optional arguments \oarg{major},
+% \oarg{minor} and \oarg{mid} are the length of major ticks (every 10° from Zero),
+% minor ticks (every 1°, from 1°) and the length of the middle ticks (every 30°, from 15°).
+% Their default values are 6pt, 2.5pt and 5pt.
+%
+% \begin{macrocode}
+\NewDocumentCommand\spazimuthtick{O{6pt} O{2.5pt} O{5pt}}{
+ \foreach \azimuth in {10,20,...,360}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath tick] (\pa:\spradius) -- (\pa:{\spradius cm + #1});
+ }
+
+ \foreach \azimuth in {1,2,...,360}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath minor tick] (\pa:\spradius) -- (\pa:{\spradius cm + #2});
+ }
+
+ \foreach \azimuth in {15,45,...,345}{
+ \tikzmath{
+ \pa = aziangle(\azimuth);
+ }
+ \path[sunpath minor tick] (\pa:\spradius) -- (\pa:{\spradius cm + #3});
+ }
+}
+% \end{macrocode}
+
+
+
+
+%%%%%%%%%%%%%%
+\endinput
+%%%%%%%%%%%%%%
+
+
diff --git a/graphics/pgf/contrib/sunpath/sunpath.equidistance.pdf b/graphics/pgf/contrib/sunpath/sunpath.equidistance.pdf
new file mode 100644
index 0000000000..2b2c5f5c6a
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.equidistance.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/sunpath/sunpath.equidistance.tex b/graphics/pgf/contrib/sunpath/sunpath.equidistance.tex
new file mode 100644
index 0000000000..2bbc7f3cf2
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.equidistance.tex
@@ -0,0 +1,36 @@
+\documentclass{standalone}
+
+
+\usepackage{fontspec}
+\usepackage{sunpath}
+\usetikzlibrary{hobby}
+
+\usepackage{hyperref}
+
+\pagecolor{white}
+\begin{document}
+\begin{tikzpicture}[spradius=6,altitude mapping=equidistance]
+\tikzset{
+ sun path curve/.style={draw=red!20,thick},
+ sun point/.style={radius=2pt,draw=red,fill=red},
+ sun label/.style={below,fill=white,outer sep=4pt,text=red},
+}
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+
+\coordinate (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+
+\path[sun point] (P3) circle;
+
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+
+\spaltitudelabel{{10,20,...,80,85}}
+\spazimuthlabel{{0,15,...,350}}
+\spgeodirection
+\end{tikzpicture}
+\end{document}
+
diff --git a/graphics/pgf/contrib/sunpath/sunpath.ins b/graphics/pgf/contrib/sunpath/sunpath.ins
new file mode 100644
index 0000000000..726943e315
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.ins
@@ -0,0 +1,62 @@
+\iffalse meta-comment
+
+File: sunpath.ins Copyright (C) 2024 by Hong-Phuc Bui
+
+It may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in the file
+
+ https://www.latex-project.org/lppl.txt
+
+
+The released version of this bundle is available from CTAN.
+
+-----------------------------------------------------------------------
+
+The development version of the bundle can be found at
+
+ https://github.com/hpb-htw/sunpath
+
+for those people who are interested.
+
+-----------------------------------------------------------------------
+
+\fi
+
+\input l3docstrip.tex
+\askforoverwritefalse
+\usedir{tex/latex/sunpath}
+% stop DocStrip adding rather wordy text
+\preamble
+\endpreamble
+\postamble
+Copyright (C) 2024 by
+ Hong-Phuc Bui
+
+It may be distributed and/or modified under the conditions of
+the LaTeX Project Public License (LPPL), either version 1.3c of
+this license or (at your option) any later version. The latest
+version of this license is in the file:
+
+ https://www.latex-project.org/lppl.txt
+
+
+This work consists of the files sunpath.dtx,
+ sunpath.ins,
+ and the derived files sunpath.pdf,
+ sunpath.sty.
+
+\endpostamble
+
+\keepsilent
+
+\generate {%
+ \file{sunpath.sty} {%
+ \from{sunpath.dtx}{package}
+ }
+}
+
+\endbatchfile
+
+
diff --git a/graphics/pgf/contrib/sunpath/sunpath.pdf b/graphics/pgf/contrib/sunpath/sunpath.pdf
new file mode 100644
index 0000000000..77235519dd
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/sunpath/sunpath.scrartcl.pdf b/graphics/pgf/contrib/sunpath/sunpath.scrartcl.pdf
new file mode 100644
index 0000000000..78c93c271a
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.scrartcl.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/sunpath/sunpath.scrartcl.tex b/graphics/pgf/contrib/sunpath/sunpath.scrartcl.tex
new file mode 100644
index 0000000000..d3293d1792
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.scrartcl.tex
@@ -0,0 +1,39 @@
+\documentclass{scrartcl}
+
+\usepackage{fontspec}
+\usepackage{luaotfload}
+\usepackage{tikz}
+\usepackage{graphicx}
+\usepackage{float}
+
+\usepackage{sunpath}
+
+\usetikzlibrary{hobby} % this library let one connect points to curve.
+
+\newcommand{\TikZ}{Ti\textit{k}Z}
+
+\title{
+ \textsf{sunpath} -- Draw Sun Path\\
+ (Test Compatibility only)
+}%
+%
+\author{%
+ Hồng-Phúc Bùi%
+}
+
+
+
+\begin{document}
+%
+\parindent0pt
+%
+\maketitle
+\tableofcontents
+
+\section{Object}
+
+This file tests if this package can be used within a \texttt{scrartcl} class.
+
+\input{sunpath.docpart.tex}
+
+\end{document}
diff --git a/graphics/pgf/contrib/sunpath/sunpath.spherical.pdf b/graphics/pgf/contrib/sunpath/sunpath.spherical.pdf
new file mode 100644
index 0000000000..0655714ca1
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.spherical.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/sunpath/sunpath.spherical.tex b/graphics/pgf/contrib/sunpath/sunpath.spherical.tex
new file mode 100644
index 0000000000..6a231c19c7
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.spherical.tex
@@ -0,0 +1,36 @@
+\documentclass{standalone}
+
+
+\usepackage{fontspec}
+\usepackage{sunpath}
+\usetikzlibrary{hobby}
+
+\usepackage{hyperref}
+
+\pagecolor{white}
+\begin{document}
+\begin{tikzpicture}[spradius=6]
+\tikzset{
+ sun path curve/.style={draw=red!20,thick},
+ sun point/.style={radius=2pt,draw=red,fill=red},
+ sun label/.style={below,fill=white,outer sep=4pt,text=red},
+}
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+
+\coordinate (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+
+\path[sun point] (P3) circle;
+
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+
+\spaltitudelabel{{10,20,...,80,85}}
+\spazimuthlabel{{0,15,...,350}}
+\spgeodirection
+\end{tikzpicture}
+\end{document}
+
diff --git a/graphics/pgf/contrib/sunpath/sunpath.tex b/graphics/pgf/contrib/sunpath/sunpath.tex
new file mode 100644
index 0000000000..1468c48687
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.tex
@@ -0,0 +1,61 @@
+% main document
+% separated from dtx, sothat there is no unrelated things in the dtx itselft, but only code and comment for package
+
+\documentclass{ltxdoc}
+
+\usepackage{fontspec}
+\usepackage{luaotfload}
+\usepackage{tikz}
+\usepackage{graphicx}
+\usepackage{float}
+\usepackage{mathtools}
+
+
+\usepackage{sunpath}
+
+\usetikzlibrary{hobby} % this library let one connect points to curve.
+
+\newcommand{\TikZ}{Ti\textit{k}Z}
+
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+
+\GetFileInfo{\jobname.sty}
+%
+\title{
+ \pkg{sunpath} -- Draw Sun Path%
+ \thanks{This file describes \fileversion, %
+ last revised \filedate.}\\[1ex]%
+ \normalsize{Reference}%
+}%
+%
+\author{%
+ Hồng-Phúc Bùi%
+ \thanks{%
+ E-mail:
+ \href{mailto:Hồng-Phúc Bùi}
+ {hong-phuc.bui (at) htwsaar dot de}%
+ }%
+}
+%
+\date{Released \filedate}
+
+
+\begin{document}
+%
+\parindent0pt
+%
+\maketitle
+\tableofcontents
+
+
+\input{sunpath.docpart.tex}
+
+\vfill\newpage
+% get the document about implementation inside main document
+\DocInput{\jobname.dtx}
+
+\PrintChanges
+\PrintIndex
+\end{document}
diff --git a/graphics/pgf/contrib/sunpath/sunpath.track.pdf b/graphics/pgf/contrib/sunpath/sunpath.track.pdf
new file mode 100644
index 0000000000..789e2c9230
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.track.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/sunpath/sunpath.track.tex b/graphics/pgf/contrib/sunpath/sunpath.track.tex
new file mode 100644
index 0000000000..64f7256356
--- /dev/null
+++ b/graphics/pgf/contrib/sunpath/sunpath.track.tex
@@ -0,0 +1,56 @@
+\documentclass{standalone}
+
+
+\usepackage{fontspec}
+\usepackage{sunpath}
+\usetikzlibrary{hobby}
+
+\usepackage{hyperref}
+
+\pagecolor{white}
+\begin{document}
+\begin{tikzpicture}[spradius=4]
+\tikzset{
+ sun path curve/.style={draw=red!20,thick},
+ sun point/.style={radius=2pt,draw=red,fill=red},
+ sun label/.style={below,fill=white,outer sep=3pt,inner sep=0pt,text=red},
+ small alt label/.style={altitude label,font=\scriptsize\sffamily}
+}
+\spcrosshair
+\spaltitudecircle{{0,10,...,80,85}}
+\spazimuthline{{0,10,...,360}}{85}{70}
+\spazimuthline{{0,5,...,360}}{80}{0}
+\spazimuthtick
+
+\coordinate (P0) at (sunpath cs:azi=98.968673,alt=-0.208672);
+\coordinate (P1) at (sunpath cs:azi=102.009695,alt=2.035492);
+\coordinate (P2) at (sunpath cs:azi=126.513583,alt=19.499874);
+\coordinate (P3) at (sunpath cs:azi=156.854847,alt=31.593335);
+\coordinate (P4) at (sunpath cs:azi=192.292832,alt=33.425294);
+\coordinate (P5) at (sunpath cs:azi=224.708002,alt=24.034984);
+\coordinate (P6) at (sunpath cs:azi=250.626597,alt=7.619801);
+\coordinate (P7) at (sunpath cs:azi=260.810553,alt=-0.244637);
+\path[sun point] (P0) circle;
+\path[sun point] (P1) circle;
+\path[sun point] (P2) circle;
+\path[sun point] (P3) circle;
+\path[sun point] (P4) circle;
+\path[sun point] (P5) circle;
+\path[sun point] (P6) circle;
+\path[sun point] (P7) circle;
+\node[sun label,anchor=270-98.968673] at (P0) {07:44};
+\node[sun label,anchor=270-102.009695] at (P1) {08:00};
+\node[sun label,anchor=270-126.513583] at (P2) {10:00};
+\node[sun label,anchor=270-156.854847] at (P3) {12:00};
+\node[sun label,anchor=270-192.292832] at (P4) {14:00};
+\node[sun label,anchor=270-224.708002] at (P5) {16:00};
+\node[sun label,anchor=270-250.626597] at (P6) {18:00};
+\node[sun label,anchor=270-260.810553] at (P7) {18:53};
+\path[sun path curve] (P0) to [curve through={ (P1) .. (P2) .. (P3) .. (P4) .. (P5) .. (P6) }] (P7) ;
+
+\spaltitudelabel{{10,30,40,...,80,85}}[175][small alt label]
+\spazimuthlabel{{0,15,...,350}}
+\spgeodirection
+\end{tikzpicture}
+\end{document}
+
diff --git a/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.pdf b/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.pdf
index a2c8baa025..d90be6bda7 100644
--- a/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.pdf
+++ b/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.tex b/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.tex
index 041190728b..72a56fa35d 100644
--- a/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.tex
+++ b/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-en.tex
@@ -50,10 +50,11 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.1.5}
-\def\TPdate{25/02/2023}
+\def\TPversion{0.1.7}
+\def\TPdate{25/01/2025}
\usepackage[most]{tcolorbox}
+\usepackage{minted2}
\tcbuselibrary{minted}
\NewTCBListing{PresentationCode}{ O{blue} m }{%
sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,%
@@ -86,9 +87,11 @@
\begin{tabular}{c}
{\Huge \texttt{TangramTikz [en]}}\\
\\
- {\LARGE Tangrams, with Ti\textit{k}Z}, \\
+ {\LARGE An extension of Ti\textit{k}Z to display Tangrams,} \\
\\
- {\LARGE with solution and/or color.} \\
+ {\LARGE outlining or not individual pieces,} \\
+ \\
+ {\LARGE with a single or individual colours} \\
\end{tabular}
\medskip
@@ -104,22 +107,22 @@
\begin{center}
\begin{tabular}{c}
\texttt{Cédric Pierquet}\\
- {\ttfamily c pierquet -- at -- outlook . fr}\\
- \texttt{\url{https://github.com/cpierquet/TangramTikz}}
+ {\ttfamily cpierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}}
\end{tabular}
\end{center}
\vspace{0.5cm}
-{$\blacktriangleright$~~Some commands to display existing Tangrams.}
+{$\blacktriangleright$~~Commands to display predefined Tangrams}
\smallskip
-{$\blacktriangleright$~~Create tangram, with postionning manually the pieces.}
+{$\blacktriangleright$~~Commands to create Tangrams by positioning individual pieces}
\smallskip
-{$\blacktriangleright$~~Idea(s) from \url{https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex}}
+{$\blacktriangleright$~~Inspired by \url{https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex}}
\vspace{1cm}
@@ -135,14 +138,14 @@
\vspace*{1cm}
\TangramTikz[Couleur=orange]<scale=1>{Maison}
- \TangramTikz[Correction]<scale=1>{Maison}
- \TangramTikz[CorrectionCouleur]<scale=1>{Maison}
+ \TangramTikz[Solution]<scale=1>{Maison}
+ \TangramTikz[ColorSolution]<scale=1>{Maison}
\TangramTikz[ListeCouleurs={blue,red,black,orange,purple},CorrectionCouleur]<scale=1>{Maison}
\end{center}
\vspace{0.5cm}
-%\hfill{}\textit{Merci aux membres du groupe \faFacebook{} du \og Coin \LaTeX{} \fg{} pour leur aide et leurs idées !}
+\hfill{}\textit{Thanks to Eric Martin, teacher-researcher in Sydney, for his careful proofreading of the English version!}
%\hfill{}\textit{Merci à Denis Bitouzé et à Patrick Bideault pour leurs retours et idées !}
@@ -171,56 +174,56 @@
\part{Introduction}
-\section{The package TangramTikz}
+\section{The TangramTikz package}
-\subsection{Source}
+\subsection{Origination}
-Some of the ideas are coming from \url{https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex}, specially from Andrew Stacey.
+Some of the ideas come from \url{https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex}, with a partial solution by Andrew Stacey.
\smallskip
-The package has been \textit{built} around the ideas from Andrew Stacey.
+The package has then been \textit{built} and \emph{modestly enriched} on the basis of the styles and methods proposed by Andrew Stacey.
-\subsection{Loading of the package, used packages}
+\subsection{Loading the package, used packages}
-The package \textsf{TangramTikz} loads into the preamble by :
+The \textsf{TangramTikz} package is loaded into the preamble using:
\begin{PresentationCode}{listing only}
\usepackage{TangramTikz}
\end{PresentationCode}
-It's fully copatible with usuals compilations, such as \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex}.
+It is fully compatible with the usual compilation methods, such as \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex}.
\medskip
-It loads the packages and libraries :
+It loads the following packages and libraries:
\begin{itemize}
- \item \texttt{tikz} awith libraries \Cle{calc} ans \Cle{shapes.geometric} ;
+ \item \texttt{tikz} with the \Cle{calc} and \Cle{shapes.geometric} libraries;
\item \texttt{xstring}, \texttt{xparse}, \texttt{simplekv} and \texttt{listofitems}.
\end{itemize}
-\subsection{The package itself}
+\subsection{Package design}
-The idea is to, thanks to \TikZ, propose \textsf{commands} to display a Tangram Puzzle :
+The aim is to leverage \TikZ\ functionality and define \textsf{commands} to display a Tangram puzzle:
\begin{itemize}
- \item with \textit{full} pieces ;
- \item by puzzle with \textit{border} pieces ;
- \item by puzzle with \textit{border colored} pieces.
+ \item without gaps between pieces, so the overall shape stands out,
+ \item or with a small gap between pieces, which are then individually recognisable,
+ \item in the latter case, with pieces that are either \textit{mono}coloured or \emph{individually} coloured.
\end{itemize}
\begin{PresentationCode}{listing only}
-%independant command to display a Tangram
+%Standalone command to display a Tangram
\TangramTikz[keys]<options tikz>{tangram_name}
\end{PresentationCode}
-There's also an \textsf{environment} and a special \textsf{command} to build the puzzle, by positionning the pieces.
+Also available are an \textsf{environment} and a special \textsf{command} to build a puzzle by positioning each piece.
\begin{PresentationCode}{listing only}
-%environment, with keys, and positionning the pieces
+%Environment, with keys, to position the pieces
\begin{EnvTangramTikz}[keys]<options tikz>
- %positionning the pieces
+ %Position each piece
\PieceTangram[keys]<options pic>(offsetH,offsetV){TangBigTri}
\PieceTangram[keys]<options pic>(offsetH,offsetH){TangBigTri}
\PieceTangram[keys]<options pic>(offsetH,offsetH){TangMedTri}
@@ -228,36 +231,36 @@ There's also an \textsf{environment} and a special \textsf{command} to build the
\PieceTangram[keys]<options pic>(offsetH,offsetH){TangSmalTri}
\PieceTangram[keys]<options pic>(offsetH,offsetH){TangSqua}
\PieceTangram[keys]<options pic>(offsetH,offsetH){TangPara}
- %\filldraw[black] (0,0) circle[radius=4pt] ; %help for positionning
+ %\filldraw[black] (0,0) circle[radius=4pt] ; %Origin to help positioning
\end{EnvTangramTikz}
\end{PresentationCode}
\pagebreak
-\part{Usage of the package}
+\part{Using the package}
-\section{Manually}
+\section{Dealing with individual pieces}
-\subsection{The pieces of the Tangram}
+\subsection{The pieces}
-A Tangram is composed by 7 pieces :
+A Tangram consists of 7 pieces:
\begin{itemize}
- \item 2 big triangles ; 1 medium triangle ; 2 small triangles ;
- \item 1 square ;
+ \item 2 large triangles; 1 medium triangle; 2 small triangles;
+ \item 1 square;
\item 1 parallelogram.
\end{itemize}
-Each piece of the Tangram is defined in \tikzlogo, by an independent \texttt{pic}..
+Each piece that makes up the Tangram is defined in \tikzlogo\ as an individual \texttt{pic}.
\medskip
-A figure to show the 5 pieces :
+Next is a figure that shows the 5 kinds of pieces, with for each of them:
\begin{itemize}
- \item with the \textcolor{purple}{\texttt{name}} of the \texttt{pic} ;
- \item with the initial \textit{orientation} ;
- \item with thier initial \textcolor{red}{\textit{origin}} ;
- \item with their common \textcolor{blue}{\textit{dimensions}} (given in \textit{unit}).
+ \item the \textcolor{purple}{\texttt{name}} of the associated \texttt{pic};
+ \item its initial \textit{orientation};
+ \item its initial \textcolor{red}{\textit{origin}};
+ \item its useful \textcolor{blue}{\textit{dimensions}} (given in \textit{unit}).
\end{itemize}
\begin{center}
@@ -312,49 +315,49 @@ A figure to show the 5 pieces :
\end{tikzpicture}
\end{center}
-Each \textit{piece} can :
+Each \textit{piece} can be:
\begin{itemize}
- \item rotated, thanks to \tikzlogo' option \texttt{rotate=...} ;
- \item fliped vertically or horizontally, thanks to \tikzlogo' option \texttt{xscale=-1} and \texttt{yscale=-1} ;
- \item moved, by placing it at point \texttt{(x,y)}.
+ \item rotated, thanks to \tikzlogo\ \texttt{rotate=...} option;
+ \item flipped vertically or horizontally, thanks to \tikzlogo\ \texttt{xscale=-1} and \texttt{yscale=-1} options;
+ \item moved, by placing its origin at the point of coordinates \texttt{(x,y)}.
\end{itemize}
-Each piece comes with a \tikzlogo' style :
+Each piece comes with a \tikzlogo\ style:
\begin{itemize}
- \item \texttt{TangPuzz} : piece of Tangram, \textit{full}, with a color (\Cle{black} by default) ;
- \item \texttt{TangSol} : piece of tangram, \textit{with white border}, with a color (\Cle{black} by default).
+ \item \texttt{TangPuzz}: Tangram piece, \textit{without border}, coloured (\Cle{black} by default);
+ \item \texttt{TangSol}: Tangram piece, \textit{with a white border}, coloured (\Cle{black} by default).
\end{itemize}
\pagebreak
-\subsection{Positionning of the pieces}
+\subsection{Positioning the pieces}
-A first methodis to use \texttt{pic} syntax in \tikzlogo{} :
+A first method is given by \tikzlogo{} \texttt{pic} syntax:
\begin{PresentationCode}{listing only}
-%environment or tikz command
+%Environment or tikz command
\pic[style,rotate=...,xscale=...,yscale=...] at (x,y) {piece_name} ;
\end{PresentationCode}
-The package \textsf{TangramTikz} proposes a specific command to place the pieces :
+The \textsf{TangramTikz} package offers a specific command to place the pieces:
\begin{PresentationCode}{listing only}
-%environment or tikz command
+%Environment or tikz command
\PieceTangram[style={color}]<xscale=...,yscale=...,rotate=...>(x,y){piece_name}
\end{PresentationCode}
-A Tangram is built form the 7 pieces, by :
+A Tangram is built from the 7 pieces, by:
\begin{itemize}
- \item \textit{putting} pieces at origin ;
- \item \textit{rotating/fliping} for the correct orientation ;
- \item \textit{translating} for the correct position.
+ \item \textit{placing} pieces at the origin;
+ \item \textit{rotating/flipping} them to give them the desired orientation;
+ \item \textit{moving} them to the desired location.
\end{itemize}
\begin{PresentationCode}{}
-%Correction colored version, initial size
+%Coloured solved version, default size
\begin{EnvTangramTikz}
\PieceTangram[TangSol={green}]({0},{0}){TangSqua}
\PieceTangram[TangSol={red}]({-1.5},{1}){TangBigTri}
@@ -365,7 +368,7 @@ A Tangram is built form the 7 pieces, by :
\PieceTangram[TangSol={orange}]({-0.5},{3}){TangMedTri}
\filldraw[black] (0,0) circle[radius=2pt] ; %help
\end{EnvTangramTikz}
-%Normal version, initial size
+%Standard version, default size
\begin{EnvTangramTikz}
\PieceTangram[TangPuzz]({0},{0}){TangSqua}
\PieceTangram[TangPuzz]({-1.5},{1}){TangBigTri}
@@ -379,50 +382,51 @@ A Tangram is built form the 7 pieces, by :
\pagebreak
-\section{Automatic Method}
+\section{Dealing with a whole shape}
\subsection{Command}
-Some predefined tangrams are present in the package \textsf{TangramTikz}, and thre's an independent \textsf{command} to "call" them :
+A collection of predefined Tangrams is included in \textsf{TangramTikz}, together with a standalone \textsf{command} to display them:
\begin{PresentationCode}{listing only}
-%independent command to display a Tangram
+%Standalone command to display a Tangram
\TangramTikz[keys]<options tikz>{tangram_name}
\end{PresentationCode}
\begin{PresentationCode}{}
-%independent command to display Cat/Boat/Kangaroo, with options by default
+%Standalone command to display Cat/Boat/Kangaroo with default options
\TangramTikz{Cat}~~\TangramTikz{Boat}~~\TangramTikz{Kangaroo}
\end{PresentationCode}
\subsection{Keys, options and arguments}
-The first argument, \textit{optional} and between \texttt{[...]}, give the keys :
+The first argument, \textit{optional} and provided within \texttt{[...]}, deals with the keys and their associated options:
\begin{itemize}
- \item the boolean \Cle{Puzzle} to display \textit{uni-}color pieces, without border ; \hfill~default : \Cle{true}
- \item the boolean \Cle{Correction} to display \textit{uni-}color pieces, with border ; \hfill~default : \Cle{false}
- \item \Cle{Color} to configure the \textit{uni-}color with the above bololeans ; \hfill~default : \Cle{black}
- \item the boolean \Cle{ColorCorrection} to display colored pieces with border ; \hfill~default : \Cle{false}
- \item \Cle{ColorList} which are the colors of the pieces (\texttt{BT,MT,ST,SQUA,PARA}) ;
+ \item the boolean \Cle{Puzzle} to display \textit{mono}coloured pieces, without border \hfill~default : \Cle{true}
+ \item the boolean \Cle{Solution} (\textsc{\textcolor{purple}{\scriptsize\textbf{new name since v0.1.7 !}}}) to display \textit{mono}coloured pieces, with a border \hfill~default : \Cle{false}
+ \item \Cle{Color} to configure the \textit{mono}colour associated with the previous booleans \hfill~default : \Cle{black}
+ \item the boolean \Cle{ColorSolution} (\textsc{\textcolor{purple}{\scriptsize\textbf{new name since v0.1.7 !}}}) to display coloured pieces, with a border \hfill~default : \Cle{false}
+ \item \Cle{ColorList} to list the colours of the pieces (\texttt{BT,MT,ST,SQUA,PARA});
\hfill~default : \Cle{red,orange,blue,green,purple}
- \item \Cle{Sep}, the width of the border in \Cle{Correction} mode. \hfill~default : \Cle{1pt}
+ \item \Cle{Sep}, the width of the border in \Cle{Solution} mode. \hfill~default : \Cle{1pt}
\end{itemize}
-The second argument, \textit{optional} ans between \texttt{<...>}, give options to the \tikzlogo{} environnement, for example :
+The second argument, \textit{optional} and within \texttt{<...>}, provides options to the \tikzlogo{} environment, for instance:
\begin{itemize}
- \item unit(s) change, scale change ;
- \item rotation, vertical alignment ;
- \item etc
+ \item change of unit
+ \item change of scale
+ \item rotation
+ \item vertical alignment
\end{itemize}
-The third argument, \textit{mandatory} and between \texttt{\{...\}} is the name of the predefined tangram (list below).
+The third argument, \textit{mandatory} and within \texttt{\{...\}}, is the name of the predefined Tangram (from the following list).
\pagebreak
-\subsection{List of predefined tangrams}
+\subsection{List of predefined Tangrams}
\texttt{\begin{multicols}{5}
\begin{itemize}
@@ -462,15 +466,16 @@ The third argument, \textit{mandatory} and between \texttt{\{...\}} is the name
\item Turtle
\item Crab
\item Snail
+ \item Goose
\end{itemize}
\end{multicols}}
\begin{PresentationCode}{}
\TangramTikz{Rocket}~~
\TangramTikz[Color=red]{Rocket}~~
-\TangramTikz[Correction]{Rocket}~~
-\TangramTikz[Correction,Color=lightgray]{Rocket}~~
-\TangramTikz[ColorCorrection,ColorList={orange,blue,yellow,green,pink},Sep=1mm]{Rocket}
+\TangramTikz[Solution]{Rocket}~~
+\TangramTikz[Solution,Color=lightgray]{Rocket}~~
+\TangramTikz[ColorSolution,ColorList={orange,blue,yellow,green,pink},Sep=1mm]{Rocket}
\TangramTikz<scale=1.5,rotate=30>{Rocket}~~
\TangramTikz<scale=0.75,rotate=-90>{Rocket}
@@ -478,228 +483,238 @@ The third argument, \textit{mandatory} and between \texttt{\{...\}} is the name
\pagebreak
-\part{Gallery of Tangrams}
+\part{A gallery of Tangrams}
\begin{PresentationCode}{}
\TangramTikz{Square}
-\TangramTikz[Correction]{Square}
-\TangramTikz[ColorCorrection]{Square}
+\TangramTikz[Solution]{Square}
+\TangramTikz[ColorSolution]{Square}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Pinguin}
-\TangramTikz[Correction]{Pinguin}
-\TangramTikz[ColorCorrection]{Pinguin}
+\TangramTikz[Solution]{Pinguin}
+\TangramTikz[ColorSolution]{Pinguin}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Boat}
-\TangramTikz[Correction]{Boat}
-\TangramTikz[ColorCorrection]{Boat}
+\TangramTikz[Solution]{Boat}
+\TangramTikz[ColorSolution]{Boat}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Home}
-\TangramTikz[Correction]{Home}
-\TangramTikz[ColorCorrection]{Home}
+\TangramTikz[Solution]{Home}
+\TangramTikz[ColorSolution]{Home}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{FirTree}
-\TangramTikz[Correction]{FirTree}
-\TangramTikz[ColorCorrection]{FirTree}
+\TangramTikz[Solution]{FirTree}
+\TangramTikz[ColorSolution]{FirTree}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Cat}
-\TangramTikz[Correction]{Cat}
-\TangramTikz[ColorCorrection]{Cat}
+\TangramTikz[Solution]{Cat}
+\TangramTikz[ColorSolution]{Cat}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Swan}
-\TangramTikz[Correction]{Swan}
-\TangramTikz[ColorCorrection]{Swan}
+\TangramTikz[Solution]{Swan}
+\TangramTikz[ColorSolution]{Swan}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Pyramid}
-\TangramTikz[Correction]{Pyramid}
-\TangramTikz[ColorCorrection]{Pyramid}
+\TangramTikz[Solution]{Pyramid}
+\TangramTikz[ColorSolution]{Pyramid}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Duck}
-\TangramTikz[Correction]{Duck}
-\TangramTikz[ColorCorrection]{Duck}
+\TangramTikz[Solution]{Duck}
+\TangramTikz[ColorSolution]{Duck}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Rocket}
-\TangramTikz[Correction]{Rocket}
-\TangramTikz[ColorCorrection]{Rocket}
+\TangramTikz[Solution]{Rocket}
+\TangramTikz[ColorSolution]{Rocket}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Candle}
-\TangramTikz[Correction]{Candle}
-\TangramTikz[ColorCorrection]{Candle}
+\TangramTikz[Solution]{Candle}
+\TangramTikz[ColorSolution]{Candle}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Shirt}
-\TangramTikz[Correction]{Shirt}
-\TangramTikz[ColorCorrection]{Shirt}
+\TangramTikz[Solution]{Shirt}
+\TangramTikz[ColorSolution]{Shirt}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Fish}
-\TangramTikz[Correction]{Fish}
-\TangramTikz[ColorCorrection]{Fish}
+\TangramTikz[Solution]{Fish}
+\TangramTikz[ColorSolution]{Fish}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Sailboat}
-\TangramTikz[Correction]{Sailboat}
-\TangramTikz[ColorCorrection]{Sailboat}
+\TangramTikz[Solution]{Sailboat}
+\TangramTikz[ColorSolution]{Sailboat}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Kangaroo}
-\TangramTikz[Correction]{Kangaroo}
-\TangramTikz[ColorCorrection]{Kangaroo}
+\TangramTikz[Solution]{Kangaroo}
+\TangramTikz[ColorSolution]{Kangaroo}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Dog}
-\TangramTikz[Correction]{Dog}
-\TangramTikz[ColorCorrection]{Dog}
+\TangramTikz[Solution]{Dog}
+\TangramTikz[ColorSolution]{Dog}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Plane}
-\TangramTikz[Correction]{Plane}
-\TangramTikz[ColorCorrection]{Plane}
+\TangramTikz[Solution]{Plane}
+\TangramTikz[ColorSolution]{Plane}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Rabbit}
-\TangramTikz[Correction]{Rabbit}
-\TangramTikz[ColorCorrection]{Rabbit}
+\TangramTikz[Solution]{Rabbit}
+\TangramTikz[ColorSolution]{Rabbit}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Rooster}
-\TangramTikz[Correction]{Rooster}
-\TangramTikz[ColorCorrection]{Rooster}
+\TangramTikz[Solution]{Rooster}
+\TangramTikz[ColorSolution]{Rooster}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Jogger}
-\TangramTikz[Correction]{Jogger}
-\TangramTikz[ColorCorrection]{Jogger}
+\TangramTikz[Solution]{Jogger}
+\TangramTikz[ColorSolution]{Jogger}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Dancer}
-\TangramTikz[Correction]{Dancer}
-\TangramTikz[ColorCorrection]{Dancer}
+\TangramTikz[Solution]{Dancer}
+\TangramTikz[ColorSolution]{Dancer}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Camel}
-\TangramTikz[Correction]{Camel}
-\TangramTikz[ColorCorrection]{Camel}
+\TangramTikz[Solution]{Camel}
+\TangramTikz[ColorSolution]{Camel}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Flamingo}
-\TangramTikz[Correction]{Flamingo}
-\TangramTikz[ColorCorrection]{Flamingo}
+\TangramTikz[Solution]{Flamingo}
+\TangramTikz[ColorSolution]{Flamingo}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Heart}
-\TangramTikz[Correction]{Heart}
-\TangramTikz[ColorCorrection]{Heart}
+\TangramTikz[Solution]{Heart}
+\TangramTikz[ColorSolution]{Heart}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Giraffe}
-\TangramTikz[Correction]{Giraffe}
-\TangramTikz[ColorCorrection]{Giraffe}
+\TangramTikz[Solution]{Giraffe}
+\TangramTikz[ColorSolution]{Giraffe}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Horse}
-\TangramTikz[Correction]{Horse}
-\TangramTikz[ColorCorrection]{Horse}
+\TangramTikz[Solution]{Horse}
+\TangramTikz[ColorSolution]{Horse}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Goat}
-\TangramTikz[Correction]{Goat}
-\TangramTikz[ColorCorrection]{Goat}
+\TangramTikz[Solution]{Goat}
+\TangramTikz[ColorSolution]{Goat}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Lions}
-\TangramTikz[Correction]{Lions}
-\TangramTikz[ColorCorrection]{Lions}
+\TangramTikz[Solution]{Lions}
+\TangramTikz[ColorSolution]{Lions}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Factory}
-\TangramTikz[Correction]{Factory}
-\TangramTikz[ColorCorrection]{Factory}
+\TangramTikz[Solution]{Factory}
+\TangramTikz[ColorSolution]{Factory}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Angel}
-\TangramTikz[Correction]{Angel}
-\TangramTikz[ColorCorrection]{Angel}
+\TangramTikz[Solution]{Angel}
+\TangramTikz[ColorSolution]{Angel}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Tower}
-\TangramTikz[Correction]{Tower}
-\TangramTikz[ColorCorrection]{Tower}
+\TangramTikz[Solution]{Tower}
+\TangramTikz[ColorSolution]{Tower}
\end{PresentationCode}
\begin{PresentationCode}{}
-\TangramTikz{Ufo}
-\TangramTikz[Correction]{Ufo}
-\TangramTikz[ColorCorrection]{Ufo}
+\TangramTikz<scale=0.75>{Ufo}
+\TangramTikz[Solution]<scale=0.75>{Ufo}
+\TangramTikz[ColorSolution]<scale=0.75>{Ufo}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Chicken}
-\TangramTikz[Correction]{Chicken}
-\TangramTikz[ColorCorrection]{Chicken}
+\TangramTikz[Solution]{Chicken}
+\TangramTikz[ColorSolution]{Chicken}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Turtle}
-\TangramTikz[Correction]{Turtle}
-\TangramTikz[ColorCorrection]{Turtle}
+\TangramTikz[Solution]{Turtle}
+\TangramTikz[ColorSolution]{Turtle}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Crab}
-\TangramTikz[Correction]{Crab}
-\TangramTikz[ColorCorrection]{Crab}
+\TangramTikz[Solution]{Crab}
+\TangramTikz[ColorSolution]{Crab}
\end{PresentationCode}
\begin{PresentationCode}{}
\TangramTikz{Snail}
-\TangramTikz[Correction]{Snail}
-\TangramTikz[ColorCorrection]{Snail}
+\TangramTikz[Solution]{Snail}
+\TangramTikz[ColorSolution]{Snail}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+\TangramTikz<scale=0.75>{Goose}
+\TangramTikz[Solution]<scale=0.75>{Goose}
+\TangramTikz[ColorSolution]<scale=0.75>{Goose}
\end{PresentationCode}
\newpage
\part{History}
+\verb|v0.1.7|~:~~~~Bugfixes in english doc + Renaming certain keys
+
+\verb|v0.1.6|~:~~~~New models
+
\verb|v0.1.5|~:~~~~New models
\verb|v0.1.4|~:~~~~New models
diff --git a/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.pdf b/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.pdf
index 647f1eafea..46e4df411a 100644
--- a/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.pdf
+++ b/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.tex b/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.tex
index e45fbee518..334231dfd3 100644
--- a/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.tex
+++ b/graphics/pgf/contrib/tangramtikz/doc/TangramTikz-doc-fr.tex
@@ -49,10 +49,11 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.1.5}
-\def\TPdate{25 Février 2023}
+\def\TPversion{0.1.7}
+\def\TPdate{25 janvier 2025}
\usepackage[most]{tcolorbox}
+\usepackage{minted2}
\tcbuselibrary{minted}
\NewTCBListing{PresentationCode}{ O{blue} m }{%
sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,%
@@ -104,7 +105,7 @@
\begin{tabular}{c}
\texttt{Cédric Pierquet}\\
{\ttfamily c pierquet -- at -- outlook . fr}\\
- \texttt{\url{https://github.com/cpierquet/TangramTikz}}
+ \texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}}
\end{tabular}
\end{center}
@@ -141,6 +142,8 @@
\vspace{0.5cm}
+\hfill{}\textit{Merci à Eric Martin, enseignant-chercheur à Sydney, pour sa relecture attentive de la version anglaise !}
+
%\hfill{}\textit{Merci aux membres du groupe \faFacebook{} du \og Coin \LaTeX{} \fg{} pour leur aide et leurs idées !}
%\hfill{}\textit{Merci à Denis Bitouzé et à Patrick Bideault pour leurs retours et idées !}
@@ -464,6 +467,7 @@ Le troisième argument, \textit{obligatoire} et entre \texttt{\{...\}} est quant
\item Tortue
\item Crabe
\item Escargot
+ \item Oie
\end{itemize}
\end{multicols}}
@@ -671,9 +675,9 @@ Le troisième argument, \textit{obligatoire} et entre \texttt{\{...\}} est quant
\end{PresentationCode}
\begin{PresentationCode}{}
-\TangramTikz{Ovni}
-\TangramTikz[Correction]{Ovni}
-\TangramTikz[CorrectionCouleur]{Ovni}
+\TangramTikz<scale=0.75>{Ovni}
+\TangramTikz[Correction]<scale=0.75>{Ovni}
+\TangramTikz[CorrectionCouleur]<scale=0.75>{Ovni}
\end{PresentationCode}
\begin{PresentationCode}{}
@@ -700,10 +704,20 @@ Le troisième argument, \textit{obligatoire} et entre \texttt{\{...\}} est quant
\TangramTikz[CorrectionCouleur]{Escargot}
\end{PresentationCode}
+\begin{PresentationCode}{}
+\TangramTikz<scale=0.75>{Oie}
+\TangramTikz[Correction]<scale=0.75>{Oie}
+\TangramTikz[CorrectionCouleur]<scale=0.75>{Oie}
+\end{PresentationCode}
+
\newpage
\part{Historique}
+\verb|v0.1.7|~:~~~~Améliorations pour la version anglaise
+
+\verb|v0.1.6|~:~~~~Nouveaux modèles
+
\verb|v0.1.5|~:~~~~Nouveaux modèles
\verb|v0.1.4|~:~~~~Nouveaux modèles
diff --git a/graphics/pgf/contrib/tangramtikz/tex/TangramTikz.sty b/graphics/pgf/contrib/tangramtikz/tex/TangramTikz.sty
index 9773eb1d11..304ae6310d 100644
--- a/graphics/pgf/contrib/tangramtikz/tex/TangramTikz.sty
+++ b/graphics/pgf/contrib/tangramtikz/tex/TangramTikz.sty
@@ -1,9 +1,11 @@
% Author.........: C. Pierquet
-% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
% Inspiration....: https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{TangramTikz}[2023/02/25 v0.1.5 Tangram Puzzles with TikZ]
+\ProvidesPackage{TangramTikz}[2025/01/25 v0.1.7 Tangram Puzzles with TikZ]
+% 0.1.7 Améliorations pour la version [en]
+% 0.1.6 Ajout de modèles
% 0.1.5 Ajout de modèles
% 0.1.4 Ajout de modèles
% 0.1.3 Ajout de modèles
@@ -872,12 +874,35 @@
}%
}
+%the goose / l'oie (0.1.6)
+\NewDocumentCommand\TangramGoose{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
+ \IfBooleanTF{#1}%
+ {%
+ \PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-135>({sqrt(2)},{sqrt(2)}){TangGrandTri}
+ \PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-135>({0},{0}){TangCar}
+ \PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-45>({-1.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
+ \PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1>({1-1.5*sqrt(2)},{0.5*sqrt(2)}){TangPara}
+ \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-1.5*sqrt(2)-2},{1+0.5*sqrt(2)}){TangMoyTri}
+ \PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=45>({sqrt(2)},{-1.5*sqrt(2)}){TangPetTri}
+ \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-0.5},{-sqrt(2)-0.5}){TangPetTri}
+ }%
+ {%
+ \PieceTangram[#2]<rotate=-135>({sqrt(2)},{sqrt(2)}){TangGrandTri}
+ \PieceTangram[#2]<rotate=-135>({0},{0}){TangCar}
+ \PieceTangram[#2]<rotate=-45>({-1.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
+ \PieceTangram[#2]<xscale=-1>({1-1.5*sqrt(2)},{0.5*sqrt(2)}){TangPara}
+ \PieceTangram[#2]({-1.5*sqrt(2)-2},{1+0.5*sqrt(2)}){TangMoyTri}
+ \PieceTangram[#2]<rotate=45>({sqrt(2)},{-1.5*sqrt(2)}){TangPetTri}
+ \PieceTangram[#2]({-0.5},{-sqrt(2)-0.5}){TangPetTri}
+ }%
+}
+
%macros for tangram creation / commandes pour créer le tangram
\NewDocumentCommand\TangramTikzCreateEN{ m }{%
\readlist*\TanGListeCouleurs{\TangColors}%
\ifboolKV[TGRMTikz]{Puzzle}{#1[TangPuzz={\TangColor}]}{}%
- \ifboolKV[TGRMTikz]{Correction}{#1[TangSol={\TangColor}]}{}%
- \ifboolKV[TGRMTikz]{ColorCorrection}{#1*}{}%
+ \ifboolKV[TGRMTikz]{Solution}{#1[TangSol={\TangColor}]}{}%
+ \ifboolKV[TGRMTikz]{ColorSolution}{#1*}{}%
}
\NewDocumentCommand\TangramTikzCreateFR{ m }{%
\readlist*\TanGListeCouleurs{\TangCouleurs}%
@@ -896,8 +921,9 @@
\setKVdefault[TGRMTikz]{%keys by default [en] and [fr]
Puzzle=true,%
Correction=false,%
- ColorCorrection=false,%
CorrectionCouleur=false,%
+ Solution=false,%en
+ ColorSolution=false,%en
ListeCouleurs={red,orange,blue,green,purple},%
ColorList={red,orange,blue,green,purple},%
Couleur=black,%
@@ -1018,6 +1044,9 @@
%SNAIL
\IfStrEq{#3}{Snail}{\TangramTikzCreateEN{\TangramSnail}}{}%
\IfStrEq{#3}{Escargot}{\TangramTikzCreateFR{\TangramSnail}}{}%
+ %GOOSE
+ \IfStrEq{#3}{Goose}{\TangramTikzCreateEN{\TangramGoose}}{}%
+ \IfStrEq{#3}{Oie}{\TangramTikzCreateFR{\TangramGoose}}{}%
\end{tikzpicture}%
}
diff --git a/graphics/pgf/contrib/tikz-bpmn/README.md b/graphics/pgf/contrib/tikz-bpmn/README.md
new file mode 100644
index 0000000000..573ad22b33
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-bpmn/README.md
@@ -0,0 +1,10 @@
+Version: 2025-01-07
+
+This Tikz library provides primitives for drawing Business Process Modelling and Notation (BPMN) models.
+It includes tasks, subprocesses, events, task markers and gateways.
+The symbols aim to follow the BPMN standard [https://www.omg.org/bpmn/] as closely as possible.
+Please refer to the documentation for further information.
+
+Author: Sander J.J. Leemans, RWTH Aachen University, Germany
+
+This material is subject to the LaTeX Project Public License 1.3c.
diff --git a/graphics/pgf/contrib/tikz-bpmn/tikz-bpmn-doc.pdf b/graphics/pgf/contrib/tikz-bpmn/tikz-bpmn-doc.pdf
new file mode 100644
index 0000000000..a896411446
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-bpmn/tikz-bpmn-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikz-bpmn/tikz-bpmn-doc.tex b/graphics/pgf/contrib/tikz-bpmn/tikz-bpmn-doc.tex
new file mode 100644
index 0000000000..d68bbd3fc7
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-bpmn/tikz-bpmn-doc.tex
@@ -0,0 +1,333 @@
+\documentclass{article}
+
+\usepackage{booktabs,multirow,tabularx,tikz,amssymb,amsmath}
+\usetikzlibrary{bpmn}
+
+\title{The Tikz BPMN package}
+\author{Sander J.J. Leemans}
+
+\begin{document}
+ \maketitle
+
+ This manual describes the BPMN Tikz package, used to draw BPMN models.
+
+ \def\event#1{
+ \eventsymbol{#1}
+ &
+ \eventcode{#1}
+ }
+
+ \def\eventsymbol#1{
+ \begin{tikzpicture}[baseline]
+ \node [#1] {};
+ \end{tikzpicture}
+ }
+ \def\eventcode#1{
+ \texttt{\textbackslash{}node [#1] \{\};}
+ }
+
+ \def\boundary#1{
+ \begin{tikzpicture}[baseline]
+ \node [task, label={[#1]225:}] {};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [task, label=\{[#1]225:\}] \{\};}
+ }
+
+ \section{Usage}
+ Place the file \texttt{tikzlibrarybpmn.code.tex} in the same folder as your .tex file, and include \verb!\usetikzlibrary{bpmn}! in the preamble of your .text file.
+
+ \subsection{Gateways}
+ \begin{tabularx}{\linewidth}{cX}
+ \toprule
+ Symbol & code\\
+ \midrule
+ \event{exclusive gateway}\newline\eventcode{xor gateway}\\
+ \event{parallel gateway}\newline\eventcode{and gateway}\\
+ \event{inclusive gateway}\newline\eventcode{or gateway}\\
+ \event{eventbased gateway}\\
+ \bottomrule
+ \end{tabularx}
+
+ \subsection{Events}
+ \begin{tabularx}{\linewidth}{cX}
+ \toprule
+ Symbol & code\\
+ \midrule
+ \event{start event}\\
+ \event{end event}\\
+ \midrule
+ \event{message start event}\\
+ \event{catching message intermediate event}\\
+ \event{throwing message intermediate event}\\
+ \event{message end event}\\
+ \midrule
+ \event{timer start event}\\
+ \eventsymbol{timer event}
+ &
+ \texttt{\textbackslash{}node [timer event] \{\};}\newline
+ \texttt{\textbackslash{}node [intermediate timer event] \{\};}
+ \\
+ \midrule
+ \event{throwing compensation intermediate event}\\
+ \event{throwing compensation end event}\\
+ \midrule
+ \eventsymbol{error event} & \eventcode{error event} \newline \eventcode{throwing error end event}\\
+ \midrule
+ \event{signal start event}\\
+ \event{catching signal intermediate event} \newline \eventcode{signal intermediate event}\\
+ \event{throwing signal intermediate event}\\
+ \event{signal end event}\\
+ \bottomrule
+ \end{tabularx}
+
+ \subsubsection{Background colour}
+ The background colour is an optional argument for several event styles, and required to be set if the background is not white for correct rendering.
+ The default can be set using
+ \verb=\colorlet{defaultbackgroundcolour}{new default colour}= after loading the package.
+
+ \subsection{Tasks \& sub-processes}
+ \begin{tabularx}{\linewidth}{cX}
+ \toprule
+ Symbol & code\\
+ \midrule
+ \begin{tikzpicture}[baseline]
+ \node [task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [task] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [compensation task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [compensation task] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [loop task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [loop task] \{A\};} \newline
+ requires the \texttt{amssymb} and \texttt{amsmath} packages
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [multiinstance task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [multiinstance task] \{A\};}
+ \\
+
+ \midrule
+
+ \begin{tikzpicture}[baseline]
+ \node [manual task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [manual task] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [receive task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [receive task] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [script task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [script task] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [send task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [send task] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [service task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [service task] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [user task] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [user task] \{A\};}
+ \\
+ \bottomrule
+ \end{tabularx}
+
+ \begin{tabularx}{\linewidth}{cX}
+ \toprule
+ Symbol & code\\
+ \midrule
+ \begin{tikzpicture}[baseline]
+ \node [subprocess] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [subprocess] \{A\};} \newline
+ \texttt{\textbackslash{}node [collapsed subprocess] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [adhoc subprocess] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [adhoc subprocess] \{A\};} \newline
+ \texttt{\textbackslash{}node [collapsed adhoc subprocess] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [compensation subprocess] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [compensation subprocess] \{A\};} \newline
+ \texttt{\textbackslash{}node [collapsed compensation subprocess] \{A\};}
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [loop subprocess] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [loop subprocess] \{A\};} \newline
+ \texttt{\textbackslash{}node [collapsed loop subprocess] \{A\};} \newline
+ requires the \texttt{amssymb} and \texttt{amsmath} packages
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [multiinstance subprocess] {A};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [multiinstance subprocess] \{A\};} \newline
+ \texttt{\textbackslash{}node [collapsed multiinstance subprocess] \{A\};}
+ \\
+
+ \midrule
+
+ \multirow{2}{*}{\begin{tikzpicture}[baseline]
+ \node [expanded subprocess] {};
+ \end{tikzpicture}}
+ &
+ \texttt{\textbackslash{}node [expanded subprocess] \{\};}\newline
+ use in combination with the \verb=fit= key
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [expanded adhoc subprocess] {};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [expanded adhoc subprocess] \{\};}\newline
+ use in combination with the \verb=fit= key
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [expanded compensation subprocess] {};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [expanded compensation subprocess] \{\};}\newline
+ use in combination with the \verb=fit= key
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [expanded loop subprocess] {};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [expanded loop subprocess] \{\};}\newline
+ use in combination with the \verb=fit= key
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [expanded multiinstance subprocess] {};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [expanded multiinstance subprocess] \{\};}\newline
+ use in combination with the \verb=fit= key
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [subprocess label=A] {};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [subprocess label=A] \{\};}\newline
+ use in combination with the \verb=fit= key
+ \\
+ \bottomrule
+ \end{tabularx}
+
+ \subsection{Event sub-processes}
+ \begin{tabularx}{\linewidth}{cX}
+ \toprule
+ Symbol & code\\
+ \midrule
+ \event{message subprocess event}\\
+ \event{timer subprocess event}\\
+ \event{signal subprocess event}\\
+ \event{compensation subprocess event}\\
+ \event{error subprocess event}\\
+ \midrule
+ \event{message noninterrupting subprocess event}\\
+ \event{timer noninterrupting subprocess event}\\
+ \event{signal noninterrupting subprocess event}\\
+ \midrule
+ \event{message event subprocess}\\
+ \event{timer event subprocess}\\
+ \event{signal event subprocess}\\
+ \event{compensation event subprocess}\\
+ \event{error event subprocess}\\
+ \midrule
+ \event{message noninterrupting event subprocess}\\
+ \event{timer noninterrupting event subprocess}\\
+ \event{signal noninterrupting event subprocess}\\
+ \bottomrule
+ \end{tabularx}
+
+ \subsection{Boundary events}
+ In the following, the number 225 controls the position of the boundary event (in degrees).
+ Naturally, a label can be used on any node.
+ To connect associations to a label, use the style \texttt{name=}.
+
+ \noindent\begin{tabularx}{\linewidth}{cX}
+ \toprule
+ Symbol & code\\
+ \midrule
+ \boundary{timer boundary event}\\
+ \boundary{message boundary event}\\
+ \boundary{signal boundary event}\\
+ \boundary{compensation boundary event}\\
+ \boundary{error boundary event}\\
+ \boundary{timer noninterrupting boundary event}\\
+ \boundary{message noninterrupting boundary event}\\
+ \boundary{signal noninterrupting boundary event}\\
+ \bottomrule
+ \end{tabularx}
+
+ All boundary events use fill to draw over the border of the parent node, and accept an argument for the fill colour.
+ The default fill colour can be changed using \verb=\colorlet{defaultbackgroundcolour}{new default colour}= after loading the package.
+
+ \subsection{Data}
+ \begin{tabularx}{\linewidth}{cX}
+ \toprule
+ Symbol & code\\
+ \midrule
+ \event{data object}\\
+ \event{data collection}\\
+ \event{data store}\\
+ \bottomrule
+ \end{tabularx}
+
+
+ \subsection{Resources}
+ \begin{tabularx}{\linewidth}{cX}
+ \toprule
+ Symbol & code\\
+ \midrule
+ \begin{tikzpicture}[baseline]
+ \node [pool] {\phantom{ABCDEF}\strut};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [pool] \{\};} \newline
+ use in combination with the \verb=fit= key
+ \\
+ \begin{tikzpicture}[baseline]
+ \node [pool label=A] {\phantom{ABCDEF}\strut};
+ \end{tikzpicture}
+ &
+ \texttt{\textbackslash{}node [pool label=A] \{\};} \newline
+ use in combination with the \verb=fit= key
+ \\
+ \bottomrule
+ \end{tabularx}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz-bpmn/tikzlibrarybpmn.code.tex b/graphics/pgf/contrib/tikz-bpmn/tikzlibrarybpmn.code.tex
new file mode 100644
index 0000000000..01c9e9db19
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-bpmn/tikzlibrarybpmn.code.tex
@@ -0,0 +1,1031 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{tikz-bpmn}[2011/08/16 BPMN diagrams using the
+Tikz library]
+
+\RequirePackage{xcolor}
+\RequirePackage{tikz}
+\RequirePackage{bm}
+
+%this can be overridden to set the background colour, necessary for drawing double lines and other things.
+\colorlet{defaultbackgroundcolour}{white}
+
+\usetikzlibrary{shapes,shapes.geometric}
+\usetikzlibrary{arrows}
+\usetikzlibrary{calc}
+
+\tikzstyle{every task} = []
+\tikzstyle{every gateway} = []
+\tikzstyle{every sequence} = []
+\tikzstyle{every message} = []
+\tikzstyle{every association} = []
+\tikzstyle{every event} = []
+\tikzstyle{every intermediate event} = []
+\tikzstyle{every token} = []
+\tikzstyle{every call activity} = []
+
+\tikzstyle{task} = [rectangle, draw, minimum width=4em, minimum height=2em,rounded corners,align=center,every task]
+
+\tikzstyle{sequence} = [->,>=triangle 45,every sequence]
+\tikzstyle{reverse sequence} = [sequence,<-]
+\tikzstyle{message} = [o->,dashed,>=open triangle 45,every sequence]
+\tikzstyle{reverse message} = [message,<-o]
+\tikzstyle{association} = [densely dotted,>=angle 45,every association]
+\tikzstyle{event} = [circle,minimum width=1.5em, minimum height=1.5em,draw,every event]
+\tikzstyle{end event} = [event,ultra thick,every event]
+\tikzstyle{intermediate event}[defaultbackgroundcolour] = [event,double=#1,every event, every intermediate event]
+\tikzstyle{token} = [solid,circle,fill,inner sep=0.5mm]
+\tikzstyle{open token} = [solid,circle,draw,fill=red,inner sep=0.5mm,thick]
+
+\tikzset{fit margins/.style={/tikz/afit/.cd,#1,
+ /tikz/.cd,
+ inner xsep=\pgfkeysvalueof{/tikz/afit/left}+\pgfkeysvalueof{/tikz/afit/right},
+ inner ysep=\pgfkeysvalueof{/tikz/afit/top}+\pgfkeysvalueof{/tikz/afit/bottom},
+ xshift=-\pgfkeysvalueof{/tikz/afit/left}+\pgfkeysvalueof{/tikz/afit/right},
+ yshift=-\pgfkeysvalueof{/tikz/afit/bottom}+\pgfkeysvalueof{/tikz/afit/top}},
+ afit/.cd,left/.initial=2pt,right/.initial=2pt,bottom/.initial=2pt,top/.initial=2pt}
+
+\tikzstyle{text annotation} = [
+ font=\tiny,
+ path picture = {
+ \def\w{3mm}
+ \draw ($(path picture bounding box.north west)+(\w,0)$) to (path picture bounding box.north west) to (path picture bounding box.south west) to ($(path picture bounding box.south west)+(\w,0)$);
+ }
+]
+
+%%%%% gateways %%%%%
+
+\tikzstyle{gateway} = [
+ diamond,
+ draw,
+ inner sep=0pt,
+ minimum width=1.5em,
+ minimum height=1.5em,
+ align=center,
+ every gateway
+]
+
+\tikzstyle{and gateway} = [parallel gateway]
+\tikzstyle{parallel gateway} = [
+ gateway,
+ label=center:\Large +
+]
+
+\tikzstyle{xor gateway} = [exclusive gateway]
+\tikzstyle{exclusive gateway} = [
+ gateway,
+ label=center:\Large\texttimes
+]
+
+\tikzstyle{or gateway} = [inclusive gateway]
+\tikzstyle{inclusive gateway} = [
+ gateway,
+ path picture = {
+ \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}}
+ \pgfmathsetmacro\d{\csname pgf@y\endcsname}
+ \node [draw, thick, circle, inner sep=0, minimum size=0.55*\d pt, anchor=center] at (path picture bounding box.center) {};
+ }
+]
+
+\tikzstyle{eventbased gateway} = [
+ gateway,
+ path picture = {
+ \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}}
+ \pgfmathsetmacro\d{\csname pgf@y\endcsname}
+ \node [draw, thin, circle, inner sep=0, minimum size=0.6*\d pt, anchor=center] at (path picture bounding box.center) {};
+ \node [draw, thin, circle, inner sep=0, minimum size=0.5*\d pt, anchor=center] at (path picture bounding box.center) {};
+ \node [draw, thin, regular polygon, regular polygon sides=5, inner sep=0, minimum size=0.35*\d pt, anchor=center] at (path picture bounding box.center) {};
+ }
+]
+
+%%%%% empty events %%%%%
+
+\tikzstyle{start event} = [event]
+\tikzstyle{none start event} = [start event]
+
+%%%%% message events %%%%%
+
+\tikzstyle{message start event} = [
+ start event,
+ draw message
+]
+
+\tikzstyle{catching message intermediate event}[defaultbackgroundcolour] = [
+ draw message,
+ intermediate event=#1
+]
+
+\tikzstyle{throwing message event}[defaultbackgroundcolour] = [
+ path picture = {
+ \def\w{1.7mm}
+ \def\h{1.1mm}
+ \fill ($(path picture bounding box)+(\w,\h)$) rectangle ($(path picture bounding box)+(-\w,-\h)$);
+ \draw [#1, line cap=round, thin] ($(path picture bounding box)+(\w,\h)$) to (path picture bounding box.center);
+ \draw [#1, line cap=round, thin] ($(path picture bounding box)+(-\w,\h)$) to (path picture bounding box.center);
+ }
+]
+
+\tikzstyle{throwing message intermediate event}[defaultbackgroundcolour] = [
+ draw filled message={#1},
+ intermediate event=#1
+]
+
+\tikzstyle{message end event}[defaultbackgroundcolour] = [
+ end event,
+ draw filled message={#1}
+]
+
+\tikzstyle{terminate event} = [
+ end event,
+ path picture = {
+ \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}}
+ \pgfmathsetmacro\d{\csname pgf@y\endcsname}
+ \node [fill, circle, inner sep=0, minimum size=0.65*\d pt, anchor=center] at (path picture bounding box.center) {};
+ }
+]
+
+%%%%% other events %%%%%
+
+\tikzstyle{draw signal}[] = [
+ path picture = {
+ \def\ma{0.8} %1 - margin
+ \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}}
+ \pgfmathsetmacro\d{\csname pgf@y\endcsname}
+ \coordinate (a) at ($(path picture bounding box.center)+(90:\ma*0.5*\d pt)$);
+ \coordinate (b) at ($(path picture bounding box.center)+(210:\ma*0.5*\d pt)$);
+ \coordinate (c) at ($(path picture bounding box.center)+(330:\ma*0.5*\d pt)$);
+ \draw [solid, #1] (a) to (b) to (c) to cycle;
+ }
+]
+
+\tikzstyle{draw error}[] = [
+ path picture = {
+ \def\de{38} %degrees low peaks
+ \def\df{100} %degrees high peaks
+ \def\dd{0.38} %width at valleys
+ \def\ma{0.8} %1 - margin
+ \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}}
+ \pgfmathsetmacro\d{\csname pgf@y\endcsname}
+ \coordinate (path picture bounding box a) at ($(path picture bounding box.center)+(\de:\ma*0.5*\d pt)$);
+ \coordinate (path picture bounding box b) at ($(path picture bounding box.center)+(180+\de:\ma*0.5*\d pt)$);
+ \coordinate (path picture bounding box c) at ($(path picture bounding box.center)+(\df:\ma*0.5*\d pt)$);
+ \coordinate (path picture bounding box d) at ($(path picture bounding box.center)+(180+\df:\ma*0.5*\d pt)$);
+ \coordinate (path picture bounding box e) at ($(path picture bounding box c)+(0,-\dd*\d pt)$);
+ \coordinate (path picture bounding box f) at ($(path picture bounding box d)+(0,\dd*\d pt)$);
+ \draw [solid, #1] (path picture bounding box a) to (path picture bounding box f) to (path picture bounding box c) to (path picture bounding box b) to (path picture bounding box e) to (path picture bounding box d) to cycle;
+ }
+]
+
+\tikzstyle{draw message} = [
+ path picture = {
+ \def\de{38} %degrees
+ \def\ma{0.2} %margin
+ \def\li{0.4} %lid
+ \coordinate (path picture bounding box a1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.north east)$);
+ \coordinate (path picture bounding box a2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.east)$);
+ \coordinate (path picture bounding box a) at (path picture bounding box a1 -| path picture bounding box a2);
+ \coordinate (path picture bounding box b1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.south east)$);
+ \coordinate (path picture bounding box b) at (path picture bounding box b1 -| path picture bounding box a2);
+ \coordinate (path picture bounding box c1) at ($(path picture bounding box.west)!{sin(\de)-\ma}!(path picture bounding box.north west)$);
+ \coordinate (path picture bounding box c2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.west)$);
+ \coordinate (path picture bounding box c) at (path picture bounding box c1 -| path picture bounding box c2);
+ \coordinate (path picture bounding box d1) at ($(path picture bounding box.west)!{sin(\de)-\ma}!(path picture bounding box.south west)$);
+ \coordinate (path picture bounding box d) at (path picture bounding box d1 -| path picture bounding box c2);
+ \coordinate (path picture bounding box e1) at ($(path picture bounding box a)!0.5!(path picture bounding box c)$);
+ \coordinate (path picture bounding box e2) at ($(path picture bounding box b)!0.5!(path picture bounding box d)$);
+ \coordinate (path picture bounding box e) at ($(path picture bounding box e1)!\li!(path picture bounding box e2)$);
+ \draw [solid] (path picture bounding box a) to (path picture bounding box b) to (path picture bounding box d) to (path picture bounding box c) to cycle;
+ \draw [solid, line cap=round] (path picture bounding box a) to (path picture bounding box e) to (path picture bounding box c);
+ }
+]
+
+\tikzstyle{draw filled message} = [
+ path picture = {
+ \def\de{38} %degrees
+ \def\ma{0.2} %margin
+ \def\li{0.4} %lid
+ \coordinate (path picture bounding box a1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.north east)$);
+ \coordinate (path picture bounding box a2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.east)$);
+ \coordinate (path picture bounding box a) at (path picture bounding box a1 -| path picture bounding box a2);
+ \coordinate (path picture bounding box b1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.south east)$);
+ \coordinate (path picture bounding box b) at (path picture bounding box b1 -| path picture bounding box a2);
+ \coordinate (path picture bounding box c1) at ($(path picture bounding box.west)!{sin(\de)-\ma}!(path picture bounding box.north west)$);
+ \coordinate (path picture bounding box c2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.west)$);
+ \coordinate (path picture bounding box c) at (path picture bounding box c1 -| path picture bounding box c2);
+ \coordinate (path picture bounding box d1) at ($(path picture bounding box.west)!{sin(\de)-\ma}!(path picture bounding box.south west)$);
+ \coordinate (path picture bounding box d) at (path picture bounding box d1 -| path picture bounding box c2);
+ \coordinate (path picture bounding box e1) at ($(path picture bounding box a)!0.5!(path picture bounding box c)$);
+ \coordinate (path picture bounding box e2) at ($(path picture bounding box b)!0.5!(path picture bounding box d)$);
+ \coordinate (path picture bounding box e) at ($(path picture bounding box e1)!\li!(path picture bounding box e2)$);
+ \fill (path picture bounding box a) to (path picture bounding box b) to (path picture bounding box d) to (path picture bounding box c) to cycle;
+ \draw [line cap=round, line width=1pt, #1] (path picture bounding box a) to (path picture bounding box e) to (path picture bounding box c);
+ }
+]
+
+\tikzstyle{draw compensation}[] = [
+ path picture = {
+ \def\de{40} %degrees
+ \def\ma{0.2} %margin
+ \coordinate (a1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.north east)$);
+ \coordinate (a2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.east)$);
+ \coordinate (a) at (a1 -| a2);
+ \coordinate (b1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.south east)$);
+ \coordinate (b) at (b1 -| a2);
+ \coordinate (c) at ($(path picture bounding box.west)!\ma!(path picture bounding box.center)$);
+ \coordinate (d1) at ($(a)!0.5!(b)$);
+ \coordinate (d) at ($(c)!0.5!(d1)$);
+ \coordinate (e) at (d |- a);
+ \coordinate (f) at (d |- b);
+ \draw [solid, #1] (d)
+ to (a)
+ to (b)
+ to cycle;
+ \draw [solid, #1] (c)
+ to (e)
+ to (f)
+ to cycle;
+ }
+]
+
+\tikzstyle{draw timer} = [
+ path picture = {
+ \def\ma{0.75} %1 - margin
+ \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}}
+ \pgfmathsetmacro\r{\csname pgf@y\endcsname}
+ \draw [solid, #1] (path picture bounding box.center) circle (\ma*0.5*\r pt);
+ \foreach \angle in {0,30,...,330}
+ \draw [solid, ultra thin, #1] ($(path picture bounding box.center)+(\angle:\ma*0.4*\r pt)$) to ($(path picture bounding box.center)+(\angle:\ma*0.5*\r pt)$);
+ \draw [solid, line cap=round, #1] ($(path picture bounding box.center)+(77:\ma*0.425*\r pt)$) to (path picture bounding box.center);
+ \draw [solid, line cap=round, #1] ($(path picture bounding box.center)+(0:\ma*0.3*\r pt)$) to (path picture bounding box.center);
+ }
+]
+
+\tikzstyle{throwing compensation intermediate event}[defaultbackgroundcolour] = [
+ draw compensation={fill},
+ intermediate event=#1,
+]
+
+\tikzstyle{throwing compensation end event} = [
+ end event,
+ draw compensation={fill,thin}
+]
+
+\tikzstyle{error event} = [throwing error end event]
+\tikzstyle{throwing error end event} = [
+ end event,
+ draw error={fill,thin}
+]
+
+\tikzstyle{timer start event} = [
+ start event,
+ draw timer
+]
+
+\tikzstyle{timer event} = [timer intermediate event]
+\tikzstyle{timer intermediate event}[defaultbackgroundcolour] = [
+ intermediate event=#1,
+ draw timer
+]
+
+\tikzstyle{signal start event} = [
+ start event,
+ draw signal
+]
+
+\tikzstyle{signal intermediate event}[defaultbackgroundcolour] = [catching signal intermediate event=#1]
+\tikzstyle{catching signal intermediate event}[defaultbackgroundcolour] = [
+ intermediate event=#1,
+ draw signal
+]
+
+\tikzstyle{throwing signal intermediate event}[defaultbackgroundcolour] = [
+ intermediate event=#1,
+ draw signal={fill,draw=none}
+]
+
+\tikzstyle{signal end event} = [
+ end event,
+ draw signal={fill,draw=none}
+]
+
+%%%%% boundary events %%%%%
+
+\tikzstyle{boundary event}[defaultbackgroundcolour] = [
+ circle,
+ draw,
+ fill=#1,
+ double=#1,
+ anchor=center
+]
+
+\tikzstyle{noninterrupting boundary event}[defaultbackgroundcolour] = [
+ circle,
+ dashed,
+ dash pattern=on 1.5pt off 1pt,
+ draw,
+ fill=#1,
+ double=#1,
+ anchor=center
+]
+
+\tikzstyle{compensation boundary event}[defaultbackgroundcolour] = [
+ boundary event=#1,
+ draw compensation
+]
+
+\tikzstyle{message boundary event}[defaultbackgroundcolour] = [
+ boundary event=#1,
+ draw message
+]
+
+\tikzstyle{message noninterrupting boundary event}[defaultbackgroundcolour] = [
+ draw message,
+ noninterrupting boundary event=#1
+]
+
+\tikzstyle{timer boundary event}[defaultbackgroundcolour] = [
+ boundary event=#1,
+ draw timer
+]
+
+\tikzstyle{timer noninterrupting boundary event}[defaultbackgroundcolour] = [
+ draw timer,
+ noninterrupting boundary event=#1
+]
+
+\tikzstyle{error boundary event}[defaultbackgroundcolour] = [
+ boundary event=#1,
+ draw error
+]
+
+\tikzstyle{signal boundary event}[defaultbackgroundcolour] = [
+ boundary event=#1,
+ draw signal
+]
+
+\tikzstyle{signal noninterrupting boundary event}[defaultbackgroundcolour] = [
+ draw signal,
+ noninterrupting boundary event=#1
+]
+
+%%%%% event sub-process %%%%%
+
+\tikzstyle{event subprocess} = [
+ expanded subprocess,
+ dotted
+]
+
+\tikzstyle{collapsed event subprocess} = [
+ collapsed subprocess,
+ dotted,
+ label={[anchor=north west,#1,circle,draw,minimum size=0.3cm,inner sep=0,xshift=0.1cm,yshift=-0.1cm]north west:}
+]
+
+\tikzstyle{collapsed noninterrupting event subprocess} = [
+ collapsed subprocess,
+ dotted,
+ label={[anchor=north west,
+ #1,
+ dashed,
+ draw,
+ circle,
+ dash pattern=on 1pt off 1pt,
+ minimum size=0.3cm,
+ inner sep=0,
+ xshift=0.1cm,
+ yshift=-0.1cm]north west:}
+]
+
+\tikzstyle{event subprocess label} = [
+ task,
+ fit margins={left=1.5mm,right=1.5mm,bottom=1.5mm,top=2.1mm},
+ label={[anchor=north west]north west:\footnotesize#1},
+ dotted
+]
+
+\tikzstyle{message event subprocess} = [
+ collapsed event subprocess=draw message
+]
+
+\tikzstyle{timer event subprocess} = [
+ collapsed event subprocess=draw timer
+]
+
+\tikzstyle{compensation event subprocess} = [
+ collapsed event subprocess=draw compensation
+]
+
+\tikzstyle{signal event subprocess} = [
+ collapsed event subprocess=draw signal
+]
+
+\tikzstyle{error event subprocess} = [
+ collapsed event subprocess=draw error
+]
+
+\tikzstyle{message noninterrupting event subprocess} = [
+ collapsed noninterrupting event subprocess=draw message
+]
+
+\tikzstyle{timer noninterrupting event subprocess} = [
+ collapsed noninterrupting event subprocess=draw timer
+]
+
+\tikzstyle{signal noninterrupting event subprocess} = [
+ collapsed noninterrupting event subprocess=draw signal
+]
+
+\tikzstyle{subprocess event} = [
+ start event
+]
+
+\tikzstyle{noninterrupting subprocess event} = [
+ start event,
+ dashed,
+ dash pattern=on 2pt off 2pt
+]
+
+\tikzstyle{message subprocess event} = [
+ subprocess event,
+ draw message
+]
+
+\tikzstyle{message noninterrupting subprocess event} = [
+ noninterrupting subprocess event,
+ draw message
+]
+
+\tikzstyle{timer subprocess event} = [
+ subprocess event,
+ draw timer
+]
+
+\tikzstyle{timer noninterrupting subprocess event} = [
+ noninterrupting subprocess event,
+ draw timer
+]
+
+\tikzstyle{signal subprocess event} = [
+ subprocess event,
+ draw signal
+]
+
+\tikzstyle{signal noninterrupting subprocess event} = [
+ noninterrupting subprocess event,
+ draw signal
+]
+
+\tikzstyle{compensation subprocess event} = [
+ subprocess event,
+ draw compensation
+]
+
+\tikzstyle{error subprocess event} = [
+ subprocess event,
+ draw error
+]
+
+%%%%% call activity %%%%%
+
+\tikzstyle{call task} = [
+ task,
+ thick,
+ every call activity
+]
+
+\tikzstyle{collapsed call subprocess} = [call subprocess]
+\tikzstyle{call subprocess} = [
+ call task,
+ inner sep=3mm,
+ label={[anchor=south,
+ inner sep=-0.25mm,
+ shape=square,
+ draw,
+ regular polygon,
+ regular polygon sides=4,
+ yshift=0.5mm
+ ]below:\footnotesize +},
+ every call activity
+]
+
+%%%%% sub-processes %%%%%
+
+\def\tikzsubprocessmarker{\tikz{\node[draw, regular polygon, regular polygon sides=4, inner sep=-0.25mm]{\footnotesize +};}}
+\def\tikzmultimarker{%
+ \def\x{0.5mm}%
+ \def\y{0.6mm}%
+ \tikz{
+ \node (b) [opacity=0, draw, regular polygon, regular polygon sides=4, inner sep=-0.25mm]{\footnotesize +};
+ \draw ($(b.center)+(0,-\y)$) to ++(0,2*\y);
+ \draw ($(b.center)+(\x,-\y)$) to ++(0,2*\y);
+ \draw ($(b.center)+(-\x,-\y)$) to ++(0,2*\y);
+ }%
+}
+\def\tikzloopmarker{%
+ \tikz{
+ \node (b) [opacity=0, draw, regular polygon, regular polygon sides=4, inner sep=-0.25mm]{\footnotesize +};
+ \node at (b.center) [rotate=170,yshift=-0.9mm] {\pmb{\circlearrowleft}};
+ }%
+}
+\def\tikzcompensationmarker{%
+ \tikz{
+ \def\y{0.4mm}
+ \node (b) [opacity=0, draw, regular polygon, regular polygon sides=4, inner sep=-0.25mm]{\footnotesize +};
+ \draw [rounded corners=0.05mm] (b.center) to ($(b.north)+(0,-\y)$) to (b.west) to ($(b.south)+(0,\y)$) to (b.center);
+ \draw [rounded corners=0.05mm] (b.center) to ($(b.north east)+(0,-\y)$) to ($(b.south east)+(0,\y)$) to cycle;
+ }%
+}
+
+\tikzstyle{subprocess marker} = [
+ task,
+ inner sep=3mm,
+ task marker=#1
+]
+\tikzstyle{task marker} = [
+ task,
+ label={[anchor=south,inner sep=0]below:#1}
+]
+
+\tikzstyle{subprocess} = [
+ subprocess marker=\tikzsubprocessmarker
+]
+\tikzstyle{collapsed subprocess} = [subprocess]
+\tikzstyle{expanded subprocess} = [task, inner sep=3mm]
+\tikzstyle{subprocess label} = [task, fit margins={left=1.5mm,right=1.5mm,bottom=1.5mm,top=2.1mm}, label={[anchor=north]above:\footnotesize#1}]
+
+\tikzstyle{adhoc subprocess} = [collapsed adhoc subprocess]
+\tikzstyle{collapsed adhoc subprocess} = [
+ subprocess marker=\tikzsubprocessmarker{} $\thicksim$
+]
+
+\tikzstyle{expanded adhoc subprocess} = [
+ subprocess marker=$\thicksim$
+]
+
+\tikzstyle{multiinstance task} = [
+ subprocess marker=\tikzmultimarker
+]
+
+\tikzstyle{multiinstance subprocess} = [collapsed multiinstance subprocess]
+\tikzstyle{collapsed multiinstance subprocess} = [
+ subprocess marker=\tikzsubprocessmarker \tikzmultimarker
+]
+
+\tikzstyle{expanded multiinstance subprocess} = [
+ subprocess marker=\tikzmultimarker
+]
+
+\tikzstyle{loop task} = [
+ task marker=\tikzloopmarker
+]
+
+\tikzstyle{loop subprocess} = [collapsed loop subprocess]
+\tikzstyle{collapsed loop subprocess} = [
+ subprocess marker=\tikzsubprocessmarker{} \tikzloopmarker
+]
+
+\tikzstyle{expanded loop subprocess} = [
+ subprocess marker=\tikzloopmarker
+]
+
+\tikzstyle{compensation task} = [
+ fit margins={left=0.8mm,right=0.8mm,bottom=2.1mm,top=0.8mm},
+ task marker=\tikzcompensationmarker
+]
+
+\tikzstyle{compensation subprocess} = [collapsed compensation subprocess]
+\tikzstyle{collapsed compensation subprocess} = [
+ subprocess marker=\tikzsubprocessmarker{} \tikzcompensationmarker
+]
+
+\tikzstyle{expanded compensation subprocess} = [
+ subprocess marker=\tikzcompensationmarker
+]
+
+%%%%% task type marker %%%%%
+
+\tikzstyle{task type marker} = [
+ task,
+ label={[anchor=north west,
+ line width=0.1pt,
+ #1,
+ minimum size=0.2cm,
+ inner sep=0,
+ xshift=0.05cm,
+ yshift=-0.05cm]north west:}
+]
+
+\tikzstyle{manual task} = [
+ task type marker=draw manual
+]
+
+\tikzstyle{receive task} = [
+ task type marker=draw message
+]
+
+\tikzstyle{script task} = [
+ task type marker=draw script
+]
+
+\tikzstyle{send task}[defaultbackgroundcolour] = [
+ task type marker={draw filled message={#1, line width=0.1pt}}
+]
+
+\tikzstyle{service task}[defaultbackgroundcolour] = [
+ task type marker={draw service={#1}}
+]
+
+\tikzstyle{user task} = [
+ task type marker=draw user
+]
+
+\tikzstyle{draw service}[defaultbackgroundcolour] = [
+ path picture = {
+ \coordinate (ne) at ($(path picture bounding box.north east)-(0.5pt,0.5pt)$);
+ \coordinate (sw) at ($(path picture bounding box.south west)+(0.5pt,0.5pt)$);
+ %\draw (path picture bounding box.north east) rectangle (path picture bounding box.south west);
+\coordinate (c1x) at ($(sw)!0.613157894736843!(ne)$);\coordinate (c1y) at ($(sw)!0.774869109947646!(ne)$);\coordinate (c4x) at ($(sw)!0.673684210526316!(ne)$);\coordinate (c4y) at ($(sw)!0.837696335078536!(ne)$);\coordinate (c8x) at ($(sw)!0.665789473684211!(ne)$);\coordinate (c8y) at ($(sw)!0.869109947643979!(ne)$);\coordinate (c12x) at ($(sw)!0.649999999999999!(ne)$);\coordinate (c12y) at ($(sw)!0.890052356020943!(ne)$);\coordinate (c16x) at ($(sw)!0.626315789473683!(ne)$);\coordinate (c16y) at ($(sw)!0.908376963350787!(ne)$);\coordinate (c20x) at ($(sw)!0.594736842105263!(ne)$);\coordinate (c20y) at ($(sw)!0.916230366492146!(ne)$);\coordinate (c24x) at ($(sw)!0.526315789473684!(ne)$);\coordinate (c24y) at ($(sw)!0.853403141361256!(ne)$);\coordinate (c28x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c28y) at ($(sw)!0.869109947643979!(ne)$);\coordinate (c32x) at ($(sw)!0.452631578947368!(ne)$);\coordinate (c32y) at ($(sw)!0.882198952879582!(ne)$);\coordinate (c36x) at ($(sw)!0.444736842105262!(ne)$);\coordinate (c36y) at ($(sw)!0.976439790575915!(ne)$);\coordinate (c40x) at ($(sw)!0.421052631578948!(ne)$);\coordinate (c40y) at ($(sw)!0.992146596858639!(ne)$);\coordinate (c44x) at ($(sw)!0.389473684210526!(ne)$);\coordinate (c44y) at ($(sw)!1!(ne)$);\coordinate (c48x) at ($(sw)!0.360526315789475!(ne)$);\coordinate (c48y) at ($(sw)!0.992146596858639!(ne)$);\coordinate (c52x) at ($(sw)!0.33421052631579!(ne)$);\coordinate (c52y) at ($(sw)!0.976439790575915!(ne)$);\coordinate (c56x) at ($(sw)!0.328947368421053!(ne)$);\coordinate (c56y) at ($(sw)!0.882198952879582!(ne)$);\coordinate (c60x) at ($(sw)!0.278947368421053!(ne)$);\coordinate (c60y) at ($(sw)!0.866492146596859!(ne)$);\coordinate (c64x) at ($(sw)!0.234210526315788!(ne)$);\coordinate (c64y) at ($(sw)!0.840314136125656!(ne)$);\coordinate (c68x) at ($(sw)!0.150000000000001!(ne)$);\coordinate (c68y) at ($(sw)!0.916230366492146!(ne)$);\coordinate (c72x) at ($(sw)!0.121052631578947!(ne)$);\coordinate (c72y) at ($(sw)!0.908376963350787!(ne)$);\coordinate (c76x) at ($(sw)!0.0947368421052642!(ne)$);\coordinate (c76y) at ($(sw)!0.890052356020943!(ne)$);\coordinate (c80x) at ($(sw)!0.0789473684210531!(ne)$);\coordinate (c80y) at ($(sw)!0.869109947643979!(ne)$);\coordinate (c84x) at ($(sw)!0.0736842105263161!(ne)$);\coordinate (c84y) at ($(sw)!0.837696335078536!(ne)$);\coordinate (c88x) at ($(sw)!0.150000000000001!(ne)$);\coordinate (c88y) at ($(sw)!0.751308900523561!(ne)$);\coordinate (c92x) at ($(sw)!0.131578947368421!(ne)$);\coordinate (c92y) at ($(sw)!0.709424083769635!(ne)$);\coordinate (c96x) at ($(sw)!0.118421052631578!(ne)$);\coordinate (c96y) at ($(sw)!0.667539267015707!(ne)$);\coordinate (c100x) at ($(sw)!0.0184210526315796!(ne)$);\coordinate (c100y) at ($(sw)!0.662303664921466!(ne)$);\coordinate (c104x) at ($(sw)!0.00263157894736852!(ne)$);\coordinate (c104y) at ($(sw)!0.636125654450263!(ne)$);\coordinate (c108x) at ($(sw)!0!(ne)$);\coordinate (c108y) at ($(sw)!0.607329842931938!(ne)$);\coordinate (c112x) at ($(sw)!0.00263157894736852!(ne)$);\coordinate (c112y) at ($(sw)!0.578534031413614!(ne)$);\coordinate (c116x) at ($(sw)!0.0184210526315796!(ne)$);\coordinate (c116y) at ($(sw)!0.55497382198953!(ne)$);\coordinate (c120x) at ($(sw)!0.118421052631578!(ne)$);\coordinate (c120y) at ($(sw)!0.547120418848168!(ne)$);\coordinate (c124x) at ($(sw)!0.126315789473684!(ne)$);\coordinate (c124y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c128x) at ($(sw)!0.147368421052632!(ne)$);\coordinate (c128y) at ($(sw)!0.473821989528796!(ne)$);\coordinate (c132x) at ($(sw)!0.0736842105263161!(ne)$);\coordinate (c132y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c136x) at ($(sw)!0.0789473684210531!(ne)$);\coordinate (c136y) at ($(sw)!0.363874345549739!(ne)$);\coordinate (c140x) at ($(sw)!0.0947368421052642!(ne)$);\coordinate (c140y) at ($(sw)!0.340314136125655!(ne)$);\coordinate (c144x) at ($(sw)!0.121052631578947!(ne)$);\coordinate (c144y) at ($(sw)!0.321989528795811!(ne)$);\coordinate (c148x) at ($(sw)!0.150000000000001!(ne)$);\coordinate (c148y) at ($(sw)!0.316753926701573!(ne)$);\coordinate (c152x) at ($(sw)!0.226315789473685!(ne)$);\coordinate (c152y) at ($(sw)!0.382198952879583!(ne)$);\coordinate (c156x) at ($(sw)!0.273684210526316!(ne)$);\coordinate (c156y) at ($(sw)!0.353403141361257!(ne)$);\coordinate (c160x) at ($(sw)!0.328947368421053!(ne)$);\coordinate (c160y) at ($(sw)!0.337696335078534!(ne)$);\coordinate (c164x) at ($(sw)!0.33421052631579!(ne)$);\coordinate (c164y) at ($(sw)!0.23821989528796!(ne)$);\coordinate (c168x) at ($(sw)!0.360526315789475!(ne)$);\coordinate (c168y) at ($(sw)!0.222513089005236!(ne)$);\coordinate (c172x) at ($(sw)!0.389473684210526!(ne)$);\coordinate (c172y) at ($(sw)!0.217277486910995!(ne)$);\coordinate (c176x) at ($(sw)!0.421052631578948!(ne)$);\coordinate (c176y) at ($(sw)!0.222513089005236!(ne)$);\coordinate (c180x) at ($(sw)!0.444736842105262!(ne)$);\coordinate (c180y) at ($(sw)!0.23821989528796!(ne)$);\coordinate (c184x) at ($(sw)!0.452631578947368!(ne)$);\coordinate (c184y) at ($(sw)!0.337696335078534!(ne)$);\coordinate (c188x) at ($(sw)!0.492105263157896!(ne)$);\coordinate (c188y) at ($(sw)!0.350785340314137!(ne)$);\coordinate (c192x) at ($(sw)!0.53421052631579!(ne)$);\coordinate (c192y) at ($(sw)!0.36910994764398!(ne)$);\coordinate (c196x) at ($(sw)!0.594736842105263!(ne)$);\coordinate (c196y) at ($(sw)!0.316753926701573!(ne)$);\coordinate (c200x) at ($(sw)!0.626315789473683!(ne)$);\coordinate (c200y) at ($(sw)!0.321989528795811!(ne)$);\coordinate (c204x) at ($(sw)!0.649999999999999!(ne)$);\coordinate (c204y) at ($(sw)!0.340314136125655!(ne)$);\coordinate (c208x) at ($(sw)!0.665789473684211!(ne)$);\coordinate (c208y) at ($(sw)!0.363874345549739!(ne)$);\coordinate (c212x) at ($(sw)!0.673684210526316!(ne)$);\coordinate (c212y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c216x) at ($(sw)!0.621052631578948!(ne)$);\coordinate (c216y) at ($(sw)!0.452879581151832!(ne)$);\coordinate (c220x) at ($(sw)!0.647368421052631!(ne)$);\coordinate (c220y) at ($(sw)!0.500000000000001!(ne)$);\coordinate (c224x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c224y) at ($(sw)!0.547120418848168!(ne)$);\coordinate (c228x) at ($(sw)!0.760526315789472!(ne)$);\coordinate (c228y) at ($(sw)!0.55497382198953!(ne)$);\coordinate (c232x) at ($(sw)!0.776315789473683!(ne)$);\coordinate (c232y) at ($(sw)!0.578534031413614!(ne)$);\coordinate (c236x) at ($(sw)!0.778947368421052!(ne)$);\coordinate (c236y) at ($(sw)!0.607329842931938!(ne)$);\coordinate (c240x) at ($(sw)!0.776315789473683!(ne)$);\coordinate (c240y) at ($(sw)!0.636125654450263!(ne)$);\coordinate (c244x) at ($(sw)!0.760526315789472!(ne)$);\coordinate (c244y) at ($(sw)!0.662303664921466!(ne)$);\coordinate (c248x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c248y) at ($(sw)!0.667539267015707!(ne)$);\coordinate (c252x) at ($(sw)!0.642105263157894!(ne)$);\coordinate (c252y) at ($(sw)!0.722513089005235!(ne)$);\coordinate (c256x) at ($(sw)!0.613157894736843!(ne)$);\coordinate (c256y) at ($(sw)!0.774869109947646!(ne)$);
+ \draw (c1x |- c1y) -- (c4x |- c4y) -- (c8x |- c8y) -- (c12x |- c12y) -- (c16x |- c16y) -- (c20x |- c20y) -- (c24x |- c24y) -- (c28x |- c28y) -- (c32x |- c32y) -- (c36x |- c36y) -- (c40x |- c40y) -- (c44x |- c44y) -- (c48x |- c48y) -- (c52x |- c52y) -- (c56x |- c56y) -- (c60x |- c60y) -- (c64x |- c64y) -- (c68x |- c68y) -- (c72x |- c72y) -- (c76x |- c76y) -- (c80x |- c80y) -- (c84x |- c84y) -- (c88x |- c88y) -- (c92x |- c92y) -- (c96x |- c96y) -- (c100x |- c100y) -- (c104x |- c104y) -- (c108x |- c108y) -- (c112x |- c112y) -- (c116x |- c116y) -- (c120x |- c120y) -- (c124x |- c124y) -- (c128x |- c128y) -- (c132x |- c132y) -- (c136x |- c136y) -- (c140x |- c140y) -- (c144x |- c144y) -- (c148x |- c148y) -- (c152x |- c152y) -- (c156x |- c156y) -- (c160x |- c160y) -- (c164x |- c164y) -- (c168x |- c168y) -- (c172x |- c172y) -- (c176x |- c176y) -- (c180x |- c180y) -- (c184x |- c184y) -- (c188x |- c188y) -- (c192x |- c192y) -- (c196x |- c196y) -- (c200x |- c200y) -- (c204x |- c204y) -- (c208x |- c208y) -- (c212x |- c212y) -- (c216x |- c216y) -- (c220x |- c220y) -- (c224x |- c224y) -- (c228x |- c228y) -- (c232x |- c232y) -- (c236x |- c236y) -- (c240x |- c240y) -- (c244x |- c244y) -- (c248x |- c248y) -- (c252x |- c252y) -- (c256x |- c256y) ;
+ \coordinate (c301x) at ($(sw)!0.476315789473685!(ne)$);\coordinate (c301y) at ($(sw)!0.672774869109948!(ne)$);\coordinate (c304x) at ($(sw)!0.499999999999999!(ne)$);\coordinate (c304y) at ($(sw)!0.696335078534033!(ne)$);\coordinate (c308x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c308y) at ($(sw)!0.709424083769635!(ne)$);\coordinate (c312x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c312y) at ($(sw)!0.719895287958115!(ne)$);\coordinate (c316x) at ($(sw)!0.481578947368422!(ne)$);\coordinate (c316y) at ($(sw)!0.725130890052356!(ne)$);\coordinate (c320x) at ($(sw)!0.471052631578948!(ne)$);\coordinate (c320y) at ($(sw)!0.730366492146597!(ne)$);\coordinate (c324x) at ($(sw)!0.442105263157894!(ne)$);\coordinate (c324y) at ($(sw)!0.704188481675394!(ne)$);\coordinate (c328x) at ($(sw)!0.413157894736843!(ne)$);\coordinate (c328y) at ($(sw)!0.712041884816756!(ne)$);\coordinate (c332x) at ($(sw)!0.410526315789474!(ne)$);\coordinate (c332y) at ($(sw)!0.751308900523561!(ne)$);\coordinate (c336x) at ($(sw)!0.389473684210526!(ne)$);\coordinate (c336y) at ($(sw)!0.761780104712043!(ne)$);\coordinate (c340x) at ($(sw)!0.368421052631578!(ne)$);\coordinate (c340y) at ($(sw)!0.751308900523561!(ne)$);\coordinate (c344x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c344y) at ($(sw)!0.712041884816756!(ne)$);\coordinate (c348x) at ($(sw)!0.347368421052632!(ne)$);\coordinate (c348y) at ($(sw)!0.706806282722515!(ne)$);\coordinate (c352x) at ($(sw)!0.331578947368421!(ne)$);\coordinate (c352y) at ($(sw)!0.701570680628274!(ne)$);\coordinate (c356x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c356y) at ($(sw)!0.730366492146597!(ne)$);\coordinate (c360x) at ($(sw)!0.286842105263159!(ne)$);\coordinate (c360y) at ($(sw)!0.725130890052356!(ne)$);\coordinate (c364x) at ($(sw)!0.276315789473685!(ne)$);\coordinate (c364y) at ($(sw)!0.719895287958115!(ne)$);\coordinate (c368x) at ($(sw)!0.271052631578948!(ne)$);\coordinate (c368y) at ($(sw)!0.709424083769635!(ne)$);\coordinate (c372x) at ($(sw)!0.268421052631579!(ne)$);\coordinate (c372y) at ($(sw)!0.696335078534033!(ne)$);\coordinate (c376x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c376y) at ($(sw)!0.664921465968586!(ne)$);\coordinate (c380x) at ($(sw)!0.28421052631579!(ne)$);\coordinate (c380y) at ($(sw)!0.630890052356022!(ne)$);\coordinate (c384x) at ($(sw)!0.244736842105262!(ne)$);\coordinate (c384y) at ($(sw)!0.630890052356022!(ne)$);\coordinate (c388x) at ($(sw)!0.239473684210525!(ne)$);\coordinate (c388y) at ($(sw)!0.62041884816754!(ne)$);\coordinate (c392x) at ($(sw)!0.239473684210525!(ne)$);\coordinate (c392y) at ($(sw)!0.599476439790576!(ne)$);\coordinate (c396x) at ($(sw)!0.244736842105262!(ne)$);\coordinate (c396y) at ($(sw)!0.586387434554973!(ne)$);\coordinate (c400x) at ($(sw)!0.28421052631579!(ne)$);\coordinate (c400y) at ($(sw)!0.586387434554973!(ne)$);\coordinate (c404x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c404y) at ($(sw)!0.55759162303665!(ne)$);\coordinate (c408x) at ($(sw)!0.268421052631579!(ne)$);\coordinate (c408y) at ($(sw)!0.526178010471204!(ne)$);\coordinate (c412x) at ($(sw)!0.271052631578948!(ne)$);\coordinate (c412y) at ($(sw)!0.513089005235604!(ne)$);\coordinate (c416x) at ($(sw)!0.276315789473685!(ne)$);\coordinate (c416y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c420x) at ($(sw)!0.286842105263159!(ne)$);\coordinate (c420y) at ($(sw)!0.497382198952881!(ne)$);\coordinate (c424x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c424y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c428x) at ($(sw)!0.328947368421053!(ne)$);\coordinate (c428y) at ($(sw)!0.518324607329842!(ne)$);\coordinate (c432x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c432y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c436x) at ($(sw)!0.368421052631578!(ne)$);\coordinate (c436y) at ($(sw)!0.465968586387435!(ne)$);\coordinate (c440x) at ($(sw)!0.378947368421052!(ne)$);\coordinate (c440y) at ($(sw)!0.458115183246073!(ne)$);\coordinate (c444x) at ($(sw)!0.389473684210526!(ne)$);\coordinate (c444y) at ($(sw)!0.455497382198952!(ne)$);\coordinate (c448x) at ($(sw)!0.4!(ne)$);\coordinate (c448y) at ($(sw)!0.458115183246073!(ne)$);\coordinate (c452x) at ($(sw)!0.410526315789474!(ne)$);\coordinate (c452y) at ($(sw)!0.465968586387435!(ne)$);\coordinate (c456x) at ($(sw)!0.413157894736843!(ne)$);\coordinate (c456y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c460x) at ($(sw)!0.444736842105262!(ne)$);\coordinate (c460y) at ($(sw)!0.515706806282724!(ne)$);\coordinate (c464x) at ($(sw)!0.471052631578948!(ne)$);\coordinate (c464y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c468x) at ($(sw)!0.481578947368422!(ne)$);\coordinate (c468y) at ($(sw)!0.497382198952881!(ne)$);\coordinate (c472x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c472y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c476x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c476y) at ($(sw)!0.513089005235604!(ne)$);\coordinate (c480x) at ($(sw)!0.499999999999999!(ne)$);\coordinate (c480y) at ($(sw)!0.526178010471204!(ne)$);\coordinate (c484x) at ($(sw)!0.481578947368422!(ne)$);\coordinate (c484y) at ($(sw)!0.547120418848168!(ne)$);\coordinate (c488x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c488y) at ($(sw)!0.568062827225132!(ne)$);\coordinate (c492x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c492y) at ($(sw)!0.586387434554973!(ne)$);\coordinate (c496x) at ($(sw)!0.53421052631579!(ne)$);\coordinate (c496y) at ($(sw)!0.586387434554973!(ne)$);\coordinate (c500x) at ($(sw)!0.542105263157895!(ne)$);\coordinate (c500y) at ($(sw)!0.599476439790576!(ne)$);\coordinate (c504x) at ($(sw)!0.542105263157895!(ne)$);\coordinate (c504y) at ($(sw)!0.62041884816754!(ne)$);\coordinate (c508x) at ($(sw)!0.53421052631579!(ne)$);\coordinate (c508y) at ($(sw)!0.630890052356022!(ne)$);\coordinate (c512x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c512y) at ($(sw)!0.633507853403143!(ne)$);\coordinate (c516x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c516y) at ($(sw)!0.651832460732984!(ne)$);\coordinate (c520x) at ($(sw)!0.476315789473685!(ne)$);\coordinate (c520y) at ($(sw)!0.672774869109948!(ne)$);
+ \draw (c301x |- c301y) -- (c304x |- c304y) -- (c308x |- c308y) -- (c312x |- c312y) -- (c316x |- c316y) -- (c320x |- c320y) -- (c324x |- c324y) -- (c328x |- c328y) -- (c332x |- c332y) -- (c336x |- c336y) -- (c340x |- c340y) -- (c344x |- c344y) -- (c348x |- c348y) -- (c352x |- c352y) -- (c356x |- c356y) -- (c360x |- c360y) -- (c364x |- c364y) -- (c368x |- c368y) -- (c372x |- c372y) -- (c376x |- c376y) -- (c380x |- c380y) -- (c384x |- c384y) -- (c388x |- c388y) -- (c392x |- c392y) -- (c396x |- c396y) -- (c400x |- c400y) -- (c404x |- c404y) -- (c408x |- c408y) -- (c412x |- c412y) -- (c416x |- c416y) -- (c420x |- c420y) -- (c424x |- c424y) -- (c428x |- c428y) -- (c432x |- c432y) -- (c436x |- c436y) -- (c440x |- c440y) -- (c444x |- c444y) -- (c448x |- c448y) -- (c452x |- c452y) -- (c456x |- c456y) -- (c460x |- c460y) -- (c464x |- c464y) -- (c468x |- c468y) -- (c472x |- c472y) -- (c476x |- c476y) -- (c480x |- c480y) -- (c484x |- c484y) -- (c488x |- c488y) -- (c492x |- c492y) -- (c496x |- c496y) -- (c500x |- c500y) -- (c504x |- c504y) -- (c508x |- c508y) -- (c512x |- c512y) -- (c516x |- c516y) -- (c520x |- c520y) ;
+ \coordinate (c601x) at ($(sw)!0.834210526315788!(ne)$);\coordinate (c601y) at ($(sw)!0.55497382198953!(ne)$);\coordinate (c604x) at ($(sw)!0.892105263157893!(ne)$);\coordinate (c604y) at ($(sw)!0.62041884816754!(ne)$);\coordinate (c608x) at ($(sw)!0.88421052631579!(ne)$);\coordinate (c608y) at ($(sw)!0.649214659685863!(ne)$);\coordinate (c612x) at ($(sw)!0.86578947368421!(ne)$);\coordinate (c612y) at ($(sw)!0.675392670157068!(ne)$);\coordinate (c616x) at ($(sw)!0.844736842105262!(ne)$);\coordinate (c616y) at ($(sw)!0.691099476439792!(ne)$);\coordinate (c620x) at ($(sw)!0.815789473684211!(ne)$);\coordinate (c620y) at ($(sw)!0.701570680628274!(ne)$);\coordinate (c624x) at ($(sw)!0.742105263157895!(ne)$);\coordinate (c624y) at ($(sw)!0.636125654450263!(ne)$);\coordinate (c628x) at ($(sw)!0.705263157894736!(ne)$);\coordinate (c628y) at ($(sw)!0.651832460732984!(ne)$);\coordinate (c632x) at ($(sw)!0.668421052631579!(ne)$);\coordinate (c632y) at ($(sw)!0.662303664921466!(ne)$);\coordinate (c636x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c636y) at ($(sw)!0.761780104712043!(ne)$);\coordinate (c640x) at ($(sw)!0.636842105263157!(ne)$);\coordinate (c640y) at ($(sw)!0.777486910994766!(ne)$);\coordinate (c644x) at ($(sw)!0.607894736842106!(ne)$);\coordinate (c644y) at ($(sw)!0.782722513089005!(ne)$);\coordinate (c648x) at ($(sw)!0.578947368421052!(ne)$);\coordinate (c648y) at ($(sw)!0.777486910994766!(ne)$);\coordinate (c652x) at ($(sw)!0.550000000000001!(ne)$);\coordinate (c652y) at ($(sw)!0.761780104712043!(ne)$);\coordinate (c656x) at ($(sw)!0.547368421052632!(ne)$);\coordinate (c656y) at ($(sw)!0.662303664921466!(ne)$);\coordinate (c660x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c660y) at ($(sw)!0.649214659685863!(ne)$);\coordinate (c664x) at ($(sw)!0.452631578947368!(ne)$);\coordinate (c664y) at ($(sw)!0.623036649214661!(ne)$);\coordinate (c668x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c668y) at ($(sw)!0.701570680628274!(ne)$);\coordinate (c672x) at ($(sw)!0.336842105263158!(ne)$);\coordinate (c672y) at ($(sw)!0.691099476439792!(ne)$);\coordinate (c676x) at ($(sw)!0.31578947368421!(ne)$);\coordinate (c676y) at ($(sw)!0.675392670157068!(ne)$);\coordinate (c680x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c680y) at ($(sw)!0.649214659685863!(ne)$);\coordinate (c684x) at ($(sw)!0.289473684210527!(ne)$);\coordinate (c684y) at ($(sw)!0.62041884816754!(ne)$);\coordinate (c688x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c688y) at ($(sw)!0.534031413612566!(ne)$);\coordinate (c692x) at ($(sw)!0.347368421052632!(ne)$);\coordinate (c692y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c696x) at ($(sw)!0.33421052631579!(ne)$);\coordinate (c696y) at ($(sw)!0.452879581151832!(ne)$);\coordinate (c700x) at ($(sw)!0.234210526315788!(ne)$);\coordinate (c700y) at ($(sw)!0.445026178010473!(ne)$);\coordinate (c704x) at ($(sw)!0.21842105263158!(ne)$);\coordinate (c704y) at ($(sw)!0.421465968586388!(ne)$);\coordinate (c708x) at ($(sw)!0.215789473684211!(ne)$);\coordinate (c708y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c712x) at ($(sw)!0.21842105263158!(ne)$);\coordinate (c712y) at ($(sw)!0.363874345549739!(ne)$);\coordinate (c716x) at ($(sw)!0.234210526315788!(ne)$);\coordinate (c716y) at ($(sw)!0.337696335078534!(ne)$);\coordinate (c720x) at ($(sw)!0.33421052631579!(ne)$);\coordinate (c720y) at ($(sw)!0.332460732984293!(ne)$);\coordinate (c724x) at ($(sw)!0.347368421052632!(ne)$);\coordinate (c724y) at ($(sw)!0.293193717277488!(ne)$);\coordinate (c728x) at ($(sw)!0.363157894736841!(ne)$);\coordinate (c728y) at ($(sw)!0.259162303664921!(ne)$);\coordinate (c732x) at ($(sw)!0.289473684210527!(ne)$);\coordinate (c732y) at ($(sw)!0.17539267015707!(ne)$);\coordinate (c736x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c736y) at ($(sw)!0.146596858638744!(ne)$);\coordinate (c740x) at ($(sw)!0.31578947368421!(ne)$);\coordinate (c740y) at ($(sw)!0.120418848167541!(ne)$);\coordinate (c744x) at ($(sw)!0.336842105263158!(ne)$);\coordinate (c744y) at ($(sw)!0.104712041884818!(ne)$);\coordinate (c748x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c748y) at ($(sw)!0.0994764397905771!(ne)$);\coordinate (c752x) at ($(sw)!0.442105263157894!(ne)$);\coordinate (c752y) at ($(sw)!0.164921465968588!(ne)$);\coordinate (c756x) at ($(sw)!0.492105263157896!(ne)$);\coordinate (c756y) at ($(sw)!0.136125654450262!(ne)$);\coordinate (c760x) at ($(sw)!0.547368421052632!(ne)$);\coordinate (c760y) at ($(sw)!0.117801047120421!(ne)$);\coordinate (c764x) at ($(sw)!0.550000000000001!(ne)$);\coordinate (c764y) at ($(sw)!0.0235602094240846!(ne)$);\coordinate (c768x) at ($(sw)!0.578947368421052!(ne)$);\coordinate (c768y) at ($(sw)!0.00785340314136155!(ne)$);\coordinate (c772x) at ($(sw)!0.607894736842106!(ne)$);\coordinate (c772y) at ($(sw)!0!(ne)$);\coordinate (c776x) at ($(sw)!0.636842105263157!(ne)$);\coordinate (c776y) at ($(sw)!0.00785340314136155!(ne)$);\coordinate (c780x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c780y) at ($(sw)!0.0235602094240846!(ne)$);\coordinate (c784x) at ($(sw)!0.668421052631579!(ne)$);\coordinate (c784y) at ($(sw)!0.117801047120421!(ne)$);\coordinate (c788x) at ($(sw)!0.710526315789473!(ne)$);\coordinate (c788y) at ($(sw)!0.133507853403141!(ne)$);\coordinate (c792x) at ($(sw)!0.750000000000001!(ne)$);\coordinate (c792y) at ($(sw)!0.154450261780105!(ne)$);\coordinate (c796x) at ($(sw)!0.815789473684211!(ne)$);\coordinate (c796y) at ($(sw)!0.0994764397905771!(ne)$);\coordinate (c800x) at ($(sw)!0.844736842105262!(ne)$);\coordinate (c800y) at ($(sw)!0.104712041884818!(ne)$);\coordinate (c804x) at ($(sw)!0.86578947368421!(ne)$);\coordinate (c804y) at ($(sw)!0.120418848167541!(ne)$);\coordinate (c808x) at ($(sw)!0.88421052631579!(ne)$);\coordinate (c808y) at ($(sw)!0.146596858638744!(ne)$);\coordinate (c812x) at ($(sw)!0.892105263157893!(ne)$);\coordinate (c812y) at ($(sw)!0.17539267015707!(ne)$);\coordinate (c816x) at ($(sw)!0.836842105263157!(ne)$);\coordinate (c816y) at ($(sw)!0.235602094240839!(ne)$);\coordinate (c820x) at ($(sw)!0.863157894736842!(ne)$);\coordinate (c820y) at ($(sw)!0.280104712041885!(ne)$);\coordinate (c824x) at ($(sw)!0.878947368421053!(ne)$);\coordinate (c824y) at ($(sw)!0.332460732984293!(ne)$);\coordinate (c828x) at ($(sw)!0.976315789473683!(ne)$);\coordinate (c828y) at ($(sw)!0.337696335078534!(ne)$);\coordinate (c832x) at ($(sw)!0.992105263157895!(ne)$);\coordinate (c832y) at ($(sw)!0.363874345549739!(ne)$);\coordinate (c836x) at ($(sw)!1!(ne)$);\coordinate (c836y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c840x) at ($(sw)!0.992105263157895!(ne)$);\coordinate (c840y) at ($(sw)!0.421465968586388!(ne)$);\coordinate (c844x) at ($(sw)!0.976315789473683!(ne)$);\coordinate (c844y) at ($(sw)!0.445026178010473!(ne)$);\coordinate (c848x) at ($(sw)!0.878947368421053!(ne)$);\coordinate (c848y) at ($(sw)!0.452879581151832!(ne)$);\coordinate (c852x) at ($(sw)!0.863157894736842!(ne)$);\coordinate (c852y) at ($(sw)!0.505235602094242!(ne)$);\coordinate (c856x) at ($(sw)!0.834210526315788!(ne)$);\coordinate (c856y) at ($(sw)!0.55497382198953!(ne)$);
+ \draw [fill=#1] (c601x |- c601y) -- (c604x |- c604y) -- (c608x |- c608y) -- (c612x |- c612y) -- (c616x |- c616y) -- (c620x |- c620y) -- (c624x |- c624y) -- (c628x |- c628y) -- (c632x |- c632y) -- (c636x |- c636y) -- (c640x |- c640y) -- (c644x |- c644y) -- (c648x |- c648y) -- (c652x |- c652y) -- (c656x |- c656y) -- (c660x |- c660y) -- (c664x |- c664y) -- (c668x |- c668y) -- (c672x |- c672y) -- (c676x |- c676y) -- (c680x |- c680y) -- (c684x |- c684y) -- (c688x |- c688y) -- (c692x |- c692y) -- (c696x |- c696y) -- (c700x |- c700y) -- (c704x |- c704y) -- (c708x |- c708y) -- (c712x |- c712y) -- (c716x |- c716y) -- (c720x |- c720y) -- (c724x |- c724y) -- (c728x |- c728y) -- (c732x |- c732y) -- (c736x |- c736y) -- (c740x |- c740y) -- (c744x |- c744y) -- (c748x |- c748y) -- (c752x |- c752y) -- (c756x |- c756y) -- (c760x |- c760y) -- (c764x |- c764y) -- (c768x |- c768y) -- (c772x |- c772y) -- (c776x |- c776y) -- (c780x |- c780y) -- (c784x |- c784y) -- (c788x |- c788y) -- (c792x |- c792y) -- (c796x |- c796y) -- (c800x |- c800y) -- (c804x |- c804y) -- (c808x |- c808y) -- (c812x |- c812y) -- (c816x |- c816y) -- (c820x |- c820y) -- (c824x |- c824y) -- (c828x |- c828y) -- (c832x |- c832y) -- (c836x |- c836y) -- (c840x |- c840y) -- (c844x |- c844y) -- (c848x |- c848y) -- (c852x |- c852y) -- (c856x |- c856y) -- cycle;
+ \coordinate (c901x) at ($(sw)!0.694736842105262!(ne)$);\coordinate (c901y) at ($(sw)!0.455497382198952!(ne)$);\coordinate (c904x) at ($(sw)!0.71578947368421!(ne)$);\coordinate (c904y) at ($(sw)!0.481675392670158!(ne)$);\coordinate (c908x) at ($(sw)!0.71578947368421!(ne)$);\coordinate (c908y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c912x) at ($(sw)!0.710526315789473!(ne)$);\coordinate (c912y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c916x) at ($(sw)!0.699999999999999!(ne)$);\coordinate (c916y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c920x) at ($(sw)!0.686842105263159!(ne)$);\coordinate (c920y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c924x) at ($(sw)!0.657894736842105!(ne)$);\coordinate (c924y) at ($(sw)!0.486910994764399!(ne)$);\coordinate (c928x) at ($(sw)!0.628947368421051!(ne)$);\coordinate (c928y) at ($(sw)!0.497382198952881!(ne)$);\coordinate (c932x) at ($(sw)!0.626315789473683!(ne)$);\coordinate (c932y) at ($(sw)!0.534031413612566!(ne)$);\coordinate (c936x) at ($(sw)!0.61842105263158!(ne)$);\coordinate (c936y) at ($(sw)!0.541884816753927!(ne)$);\coordinate (c940x) at ($(sw)!0.607894736842106!(ne)$);\coordinate (c940y) at ($(sw)!0.544502617801048!(ne)$);\coordinate (c944x) at ($(sw)!0.594736842105263!(ne)$);\coordinate (c944y) at ($(sw)!0.541884816753927!(ne)$);\coordinate (c948x) at ($(sw)!0.586842105263157!(ne)$);\coordinate (c948y) at ($(sw)!0.534031413612566!(ne)$);\coordinate (c952x) at ($(sw)!0.58157894736842!(ne)$);\coordinate (c952y) at ($(sw)!0.497382198952881!(ne)$);\coordinate (c956x) at ($(sw)!0.563157894736841!(ne)$);\coordinate (c956y) at ($(sw)!0.489528795811519!(ne)$);\coordinate (c960x) at ($(sw)!0.547368421052632!(ne)$);\coordinate (c960y) at ($(sw)!0.481675392670158!(ne)$);\coordinate (c964x) at ($(sw)!0.513157894736841!(ne)$);\coordinate (c964y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c968x) at ($(sw)!0.502631578947367!(ne)$);\coordinate (c968y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c972x) at ($(sw)!0.492105263157896!(ne)$);\coordinate (c972y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c976x) at ($(sw)!0.486842105263159!(ne)$);\coordinate (c976y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c980x) at ($(sw)!0.48421052631579!(ne)$);\coordinate (c980y) at ($(sw)!0.481675392670158!(ne)$);\coordinate (c984x) at ($(sw)!0.513157894736841!(ne)$);\coordinate (c984y) at ($(sw)!0.445026178010473!(ne)$);\coordinate (c988x) at ($(sw)!0.499999999999999!(ne)$);\coordinate (c988y) at ($(sw)!0.413612565445027!(ne)$);\coordinate (c992x) at ($(sw)!0.460526315789473!(ne)$);\coordinate (c992y) at ($(sw)!0.413612565445027!(ne)$);\coordinate (c996x) at ($(sw)!0.457894736842105!(ne)$);\coordinate (c996y) at ($(sw)!0.400523560209424!(ne)$);\coordinate (c1000x) at ($(sw)!0.455263157894736!(ne)$);\coordinate (c1000y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c1004x) at ($(sw)!0.457894736842105!(ne)$);\coordinate (c1004y) at ($(sw)!0.379581151832462!(ne)$);\coordinate (c1008x) at ($(sw)!0.460526315789473!(ne)$);\coordinate (c1008y) at ($(sw)!0.36910994764398!(ne)$);\coordinate (c1012x) at ($(sw)!0.499999999999999!(ne)$);\coordinate (c1012y) at ($(sw)!0.36649214659686!(ne)$);\coordinate (c1016x) at ($(sw)!0.513157894736841!(ne)$);\coordinate (c1016y) at ($(sw)!0.340314136125655!(ne)$);\coordinate (c1020x) at ($(sw)!0.48421052631579!(ne)$);\coordinate (c1020y) at ($(sw)!0.308900523560211!(ne)$);\coordinate (c1024x) at ($(sw)!0.486842105263159!(ne)$);\coordinate (c1024y) at ($(sw)!0.295811518324608!(ne)$);\coordinate (c1028x) at ($(sw)!0.492105263157896!(ne)$);\coordinate (c1028y) at ($(sw)!0.287958115183247!(ne)$);\coordinate (c1032x) at ($(sw)!0.502631578947367!(ne)$);\coordinate (c1032y) at ($(sw)!0.280104712041885!(ne)$);\coordinate (c1036x) at ($(sw)!0.513157894736841!(ne)$);\coordinate (c1036y) at ($(sw)!0.277486910994765!(ne)$);\coordinate (c1040x) at ($(sw)!0.544736842105264!(ne)$);\coordinate (c1040y) at ($(sw)!0.30366492146597!(ne)$);\coordinate (c1044x) at ($(sw)!0.563157894736841!(ne)$);\coordinate (c1044y) at ($(sw)!0.293193717277488!(ne)$);\coordinate (c1048x) at ($(sw)!0.58157894736842!(ne)$);\coordinate (c1048y) at ($(sw)!0.287958115183247!(ne)$);\coordinate (c1052x) at ($(sw)!0.586842105263157!(ne)$);\coordinate (c1052y) at ($(sw)!0.248691099476442!(ne)$);\coordinate (c1056x) at ($(sw)!0.594736842105263!(ne)$);\coordinate (c1056y) at ($(sw)!0.243455497382201!(ne)$);\coordinate (c1060x) at ($(sw)!0.607894736842106!(ne)$);\coordinate (c1060y) at ($(sw)!0.23821989528796!(ne)$);\coordinate (c1064x) at ($(sw)!0.61842105263158!(ne)$);\coordinate (c1064y) at ($(sw)!0.243455497382201!(ne)$);\coordinate (c1068x) at ($(sw)!0.626315789473683!(ne)$);\coordinate (c1068y) at ($(sw)!0.248691099476442!(ne)$);\coordinate (c1072x) at ($(sw)!0.628947368421051!(ne)$);\coordinate (c1072y) at ($(sw)!0.287958115183247!(ne)$);\coordinate (c1076x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c1076y) at ($(sw)!0.298429319371729!(ne)$);\coordinate (c1080x) at ($(sw)!0.686842105263159!(ne)$);\coordinate (c1080y) at ($(sw)!0.277486910994765!(ne)$);\coordinate (c1084x) at ($(sw)!0.699999999999999!(ne)$);\coordinate (c1084y) at ($(sw)!0.280104712041885!(ne)$);\coordinate (c1088x) at ($(sw)!0.710526315789473!(ne)$);\coordinate (c1088y) at ($(sw)!0.287958115183247!(ne)$);\coordinate (c1092x) at ($(sw)!0.71578947368421!(ne)$);\coordinate (c1092y) at ($(sw)!0.295811518324608!(ne)$);\coordinate (c1096x) at ($(sw)!0.71578947368421!(ne)$);\coordinate (c1096y) at ($(sw)!0.308900523560211!(ne)$);\coordinate (c1100x) at ($(sw)!0.69736842105263!(ne)$);\coordinate (c1100y) at ($(sw)!0.332460732984293!(ne)$);\coordinate (c1104x) at ($(sw)!0.705263157894736!(ne)$);\coordinate (c1104y) at ($(sw)!0.348167539267016!(ne)$);\coordinate (c1108x) at ($(sw)!0.713157894736841!(ne)$);\coordinate (c1108y) at ($(sw)!0.36910994764398!(ne)$);\coordinate (c1112x) at ($(sw)!0.750000000000001!(ne)$);\coordinate (c1112y) at ($(sw)!0.36910994764398!(ne)$);\coordinate (c1116x) at ($(sw)!0.757894736842104!(ne)$);\coordinate (c1116y) at ($(sw)!0.379581151832462!(ne)$);\coordinate (c1120x) at ($(sw)!0.760526315789472!(ne)$);\coordinate (c1120y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c1124x) at ($(sw)!0.757894736842104!(ne)$);\coordinate (c1124y) at ($(sw)!0.400523560209424!(ne)$);\coordinate (c1128x) at ($(sw)!0.750000000000001!(ne)$);\coordinate (c1128y) at ($(sw)!0.413612565445027!(ne)$);\coordinate (c1132x) at ($(sw)!0.713157894736841!(ne)$);\coordinate (c1132y) at ($(sw)!0.413612565445027!(ne)$);\coordinate (c1136x) at ($(sw)!0.705263157894736!(ne)$);\coordinate (c1136y) at ($(sw)!0.437172774869111!(ne)$);\coordinate (c1140x) at ($(sw)!0.694736842105262!(ne)$);\coordinate (c1140y) at ($(sw)!0.455497382198952!(ne)$);
+ \draw (c901x |- c901y) -- (c904x |- c904y) -- (c908x |- c908y) -- (c912x |- c912y) -- (c916x |- c916y) -- (c920x |- c920y) -- (c924x |- c924y) -- (c928x |- c928y) -- (c932x |- c932y) -- (c936x |- c936y) -- (c940x |- c940y) -- (c944x |- c944y) -- (c948x |- c948y) -- (c952x |- c952y) -- (c956x |- c956y) -- (c960x |- c960y) -- (c964x |- c964y) -- (c968x |- c968y) -- (c972x |- c972y) -- (c976x |- c976y) -- (c980x |- c980y) -- (c984x |- c984y) -- (c988x |- c988y) -- (c992x |- c992y) -- (c996x |- c996y) -- (c1000x |- c1000y) -- (c1004x |- c1004y) -- (c1008x |- c1008y) -- (c1012x |- c1012y) -- (c1016x |- c1016y) -- (c1020x |- c1020y) -- (c1024x |- c1024y) -- (c1028x |- c1028y) -- (c1032x |- c1032y) -- (c1036x |- c1036y) -- (c1040x |- c1040y) -- (c1044x |- c1044y) -- (c1048x |- c1048y) -- (c1052x |- c1052y) -- (c1056x |- c1056y) -- (c1060x |- c1060y) -- (c1064x |- c1064y) -- (c1068x |- c1068y) -- (c1072x |- c1072y) -- (c1076x |- c1076y) -- (c1080x |- c1080y) -- (c1084x |- c1084y) -- (c1088x |- c1088y) -- (c1092x |- c1092y) -- (c1096x |- c1096y) -- (c1100x |- c1100y) -- (c1104x |- c1104y) -- (c1108x |- c1108y) -- (c1112x |- c1112y) -- (c1116x |- c1116y) -- (c1120x |- c1120y) -- (c1124x |- c1124y) -- (c1128x |- c1128y) -- (c1132x |- c1132y) -- (c1136x |- c1136y) -- (c1140x |- c1140y);
+ }
+]
+
+\tikzstyle{draw manual} = [
+ path picture = {
+ \coordinate (ne) at ($(path picture bounding box.north east)-(0.5pt,0.5pt)$);
+ \coordinate (sw) at ($(path picture bounding box.south west)+(0.5pt,0.5pt)$);
+ %\draw (path picture bounding box.north east) rectangle (path picture bounding box.south west);
+\coordinate (c1x) at ($(sw)!0.70189701897019!(ne)$);
+\coordinate (c2x) at ($(sw)!0.520325203252032!(ne)$);
+\coordinate (c3x) at ($(sw)!0.51219512195122!(ne)$);
+\coordinate (c4x) at ($(sw)!0.506775067750678!(ne)$);
+\coordinate (c5x) at ($(sw)!0.51219512195122!(ne)$);
+\coordinate (c6x) at ($(sw)!0.520325203252032!(ne)$);
+\coordinate (c7x) at ($(sw)!0.905149051490515!(ne)$);
+\coordinate (c8x) at ($(sw)!0.932249322493225!(ne)$);
+\coordinate (c9x) at ($(sw)!0.956639566395664!(ne)$);
+\coordinate (c10x) at ($(sw)!0.975609756097561!(ne)$);
+\coordinate (c11x) at ($(sw)!0.994579945799458!(ne)$);
+\coordinate (c12x) at ($(sw)!1!(ne)$);
+\coordinate (c13x) at ($(sw)!0.986449864498645!(ne)$);
+\coordinate (c14x) at ($(sw)!0.97289972899729!(ne)$);
+\coordinate (c15x) at ($(sw)!0.959349593495935!(ne)$);
+\coordinate (c16x) at ($(sw)!0.284552845528455!(ne)$);
+\coordinate (c17x) at ($(sw)!0.314363143631436!(ne)$);
+\coordinate (c18x) at ($(sw)!0.485094850948509!(ne)$);
+\coordinate (c19x) at ($(sw)!0.528455284552846!(ne)$);
+\coordinate (c20x) at ($(sw)!0.563685636856369!(ne)$);
+\coordinate (c21x) at ($(sw)!0.590785907859079!(ne)$);
+\coordinate (c22x) at ($(sw)!0.590785907859079!(ne)$);
+\coordinate (c23x) at ($(sw)!0.582655826558266!(ne)$);
+\coordinate (c24x) at ($(sw)!0.168021680216802!(ne)$);
+\coordinate (c25x) at ($(sw)!0!(ne)$);
+\coordinate (c26x) at ($(sw)!0!(ne)$);
+\coordinate (c27x) at ($(sw)!0.0921409214092141!(ne)$);
+\coordinate (c28x) at ($(sw)!0.769647696476965!(ne)$);
+\coordinate (c29x) at ($(sw)!0.794037940379404!(ne)$);
+\coordinate (c30x) at ($(sw)!0.815718157181572!(ne)$);
+\coordinate (c31x) at ($(sw)!0.831978319783198!(ne)$);
+\coordinate (c32x) at ($(sw)!0.840108401084011!(ne)$);
+\coordinate (c33x) at ($(sw)!0.826558265582656!(ne)$);
+\coordinate (c34x) at ($(sw)!0.799457994579946!(ne)$);
+\coordinate (c35x) at ($(sw)!0.669376693766938!(ne)$);
+\coordinate (c36x) at ($(sw)!0.650406504065041!(ne)$);
+\coordinate (c37x) at ($(sw)!0.542005420054201!(ne)$);
+\coordinate (c38x) at ($(sw)!0.531165311653117!(ne)$);
+\coordinate (c39x) at ($(sw)!0.528455284552846!(ne)$);
+\coordinate (c40x) at ($(sw)!0.531165311653117!(ne)$);
+\coordinate (c41x) at ($(sw)!0.542005420054201!(ne)$);
+\coordinate (c42x) at ($(sw)!0.688346883468834!(ne)$);
+\coordinate (c43x) at ($(sw)!0.823848238482385!(ne)$);
+\coordinate (c44x) at ($(sw)!0.853658536585366!(ne)$);
+\coordinate (c45x) at ($(sw)!0.875338753387534!(ne)$);
+\coordinate (c46x) at ($(sw)!0.894308943089431!(ne)$);
+\coordinate (c47x) at ($(sw)!0.910569105691057!(ne)$);
+\coordinate (c48x) at ($(sw)!0.921409214092141!(ne)$);
+\coordinate (c49x) at ($(sw)!0.905149051490515!(ne)$);
+\coordinate (c50x) at ($(sw)!0.894308943089431!(ne)$);
+\coordinate (c51x) at ($(sw)!0.880758807588076!(ne)$);
+\coordinate (c52x) at ($(sw)!0.550135501355014!(ne)$);
+\coordinate (c53x) at ($(sw)!0.542005420054201!(ne)$);
+\coordinate (c54x) at ($(sw)!0.536585365853658!(ne)$);
+\coordinate (c55x) at ($(sw)!0.542005420054201!(ne)$);
+\coordinate (c56x) at ($(sw)!0.550135501355014!(ne)$);
+\coordinate (c57x) at ($(sw)!0.688346883468834!(ne)$);
+\coordinate (c58x) at ($(sw)!0.70189701897019!(ne)$);
+\coordinate (c59x) at ($(sw)!0.856368563685637!(ne)$);
+\coordinate (c60x) at ($(sw)!0.888888888888889!(ne)$);
+\coordinate (c61x) at ($(sw)!0.91869918699187!(ne)$);
+\coordinate (c62x) at ($(sw)!0.940379403794038!(ne)$);
+\coordinate (c63x) at ($(sw)!0.959349593495935!(ne)$);
+\coordinate (c64x) at ($(sw)!0.970189701897019!(ne)$);
+\coordinate (c65x) at ($(sw)!0.953929539295393!(ne)$);
+\coordinate (c66x) at ($(sw)!0.937669376693767!(ne)$);
+\coordinate (c67x) at ($(sw)!0.924119241192412!(ne)$);
+\coordinate (c68x) at ($(sw)!0.70189701897019!(ne)$);
+\coordinate (c1y) at ($(sw)!0.73657094216209!(ne)$);
+\coordinate (c2y) at ($(sw)!0.73657094216209!(ne)$);
+\coordinate (c3y) at ($(sw)!0.741947045383272!(ne)$);
+\coordinate (c4y) at ($(sw)!0.752699251825636!(ne)$);
+\coordinate (c5y) at ($(sw)!0.760763406657407!(ne)$);
+\coordinate (c6y) at ($(sw)!0.763451458268!(ne)$);
+\coordinate (c7y) at ($(sw)!0.763451458268!(ne)$);
+\coordinate (c8y) at ($(sw)!0.768827561489182!(ne)$);
+\coordinate (c9y) at ($(sw)!0.774203664710364!(ne)$);
+\coordinate (c10y) at ($(sw)!0.787643922763317!(ne)$);
+\coordinate (c11y) at ($(sw)!0.803772232426863!(ne)$);
+\coordinate (c12y) at ($(sw)!0.82796469692218!(ne)$);
+\coordinate (c13y) at ($(sw)!0.862909367859866!(ne)$);
+\coordinate (c14y) at ($(sw)!0.873661574302225!(ne)$);
+\coordinate (c15y) at ($(sw)!0.879037677523407!(ne)$);
+\coordinate (c16y) at ($(sw)!0.879037677523407!(ne)$);
+\coordinate (c17y) at ($(sw)!0.895165987186953!(ne)$);
+\coordinate (c18y) at ($(sw)!0.895165987186953!(ne)$);
+\coordinate (c19y) at ($(sw)!0.905918193629317!(ne)$);
+\coordinate (c20y) at ($(sw)!0.924734554903457!(ne)$);
+\coordinate (c21y) at ($(sw)!0.956991174230544!(ne)$);
+\coordinate (c22y) at ($(sw)!0.981183638725865!(ne)$);
+\coordinate (c23y) at ($(sw)!1!(ne)$);
+\coordinate (c24y) at ($(sw)!1!(ne)$);
+\coordinate (c25y) at ($(sw)!0.879037677523407!(ne)$);
+\coordinate (c26y) at ($(sw)!0.427445006944135!(ne)$);
+\coordinate (c27y) at ($(sw)!0.376372026342908!(ne)$);
+\coordinate (c28y) at ($(sw)!0.376372026342908!(ne)$);
+\coordinate (c29y) at ($(sw)!0.379060077953497!(ne)$);
+\coordinate (c30y) at ($(sw)!0.392500336006455!(ne)$);
+\coordinate (c31y) at ($(sw)!0.403252542448814!(ne)$);
+\coordinate (c32y) at ($(sw)!0.422068903722953!(ne)$);
+\coordinate (c33y) at ($(sw)!0.448949419828863!(ne)$);
+\coordinate (c34y) at ($(sw)!0.459701626271228!(ne)$);
+\coordinate (c35y) at ($(sw)!0.459701626271228!(ne)$);
+\coordinate (c36y) at ($(sw)!0.46507772949241!(ne)$);
+\coordinate (c37y) at ($(sw)!0.46507772949241!(ne)$);
+\coordinate (c38y) at ($(sw)!0.467765781102998!(ne)$);
+\coordinate (c39y) at ($(sw)!0.478517987545362!(ne)$);
+\coordinate (c40y) at ($(sw)!0.486582142377133!(ne)$);
+\coordinate (c41y) at ($(sw)!0.494646297208908!(ne)$);
+\coordinate (c42y) at ($(sw)!0.494646297208908!(ne)$);
+\coordinate (c43y) at ($(sw)!0.486582142377133!(ne)$);
+\coordinate (c44y) at ($(sw)!0.489270193987726!(ne)$);
+\coordinate (c45y) at ($(sw)!0.497334348819497!(ne)$);
+\coordinate (c46y) at ($(sw)!0.510774606872454!(ne)$);
+\coordinate (c47y) at ($(sw)!0.524214864925407!(ne)$);
+\coordinate (c48y) at ($(sw)!0.543031226199542!(ne)$);
+\coordinate (c49y) at ($(sw)!0.575287845526634!(ne)$);
+\coordinate (c50y) at ($(sw)!0.586040051968998!(ne)$);
+\coordinate (c51y) at ($(sw)!0.59141615519018!(ne)$);
+\coordinate (c52y) at ($(sw)!0.59141615519018!(ne)$);
+\coordinate (c53y) at ($(sw)!0.594104206800774!(ne)$);
+\coordinate (c54y) at ($(sw)!0.604856413243132!(ne)$);
+\coordinate (c55y) at ($(sw)!0.615608619685497!(ne)$);
+\coordinate (c56y) at ($(sw)!0.620984722906679!(ne)$);
+\coordinate (c57y) at ($(sw)!0.620984722906679!(ne)$);
+\coordinate (c58y) at ($(sw)!0.623672774517272!(ne)$);
+\coordinate (c59y) at ($(sw)!0.620984722906679!(ne)$);
+\coordinate (c60y) at ($(sw)!0.623672774517272!(ne)$);
+\coordinate (c61y) at ($(sw)!0.631736929349043!(ne)$);
+\coordinate (c62y) at ($(sw)!0.642489135791407!(ne)$);
+\coordinate (c63y) at ($(sw)!0.661305497065547!(ne)$);
+\coordinate (c64y) at ($(sw)!0.68280990995027!(ne)$);
+\coordinate (c65y) at ($(sw)!0.717754580887955!(ne)$);
+\coordinate (c66y) at ($(sw)!0.731194838940908!(ne)$);
+\coordinate (c67y) at ($(sw)!0.739258993772679!(ne)$);
+\coordinate (c68y) at ($(sw)!0.739258993772679!(ne)$);
+\draw[line width=0.1pt, line cap=rect,line join=round]
+ (c1x |- c1y) -- (c2x |- c2y)-- (c3x |- c3y)-- (c4x |- c4y)-- (c5x |- c5y)-- (c6x |- c6y)-- (c7x |- c7y)-- (c8x |- c8y)-- (c9x |- c9y)-- (c10x |- c10y)-- (c11x |- c11y)-- (c12x |- c12y)-- (c13x |- c13y)-- (c14x |- c14y)-- (c15x |- c15y)-- (c16x |- c16y)-- (c17x |- c17y)-- (c18x |- c18y)-- (c19x |- c19y)-- (c20x |- c20y)-- (c21x |- c21y)-- (c22x |- c22y)-- (c23x |- c23y)-- (c24x |- c24y)-- (c25x |- c25y)-- (c26x |- c26y)-- (c27x |- c27y)-- (c28x |- c28y)-- (c29x |- c29y)-- (c30x |- c30y)-- (c31x |- c31y)-- (c32x |- c32y)-- (c33x |- c33y)-- (c34x |- c34y)-- (c35x |- c35y)-- (c36x |- c36y)-- (c37x |- c37y)-- (c38x |- c38y)-- (c39x |- c39y)-- (c40x |- c40y)-- (c41x |- c41y)-- (c42x |- c42y)-- (c43x |- c43y)-- (c44x |- c44y)-- (c45x |- c45y)-- (c46x |- c46y)-- (c47x |- c47y)-- (c48x |- c48y)-- (c49x |- c49y)-- (c50x |- c50y)-- (c51x |- c51y)-- (c52x |- c52y)-- (c53x |- c53y)-- (c54x |- c54y)-- (c55x |- c55y)-- (c56x |- c56y)-- (c57x |- c57y)-- (c58x |- c58y)-- (c59x |- c59y)-- (c60x |- c60y)-- (c61x |- c61y)-- (c62x |- c62y)-- (c63x |- c63y)-- (c64x |- c64y)-- (c65x |- c65y)-- (c66x |- c66y)-- (c67x |- c67y)-- (c68x |- c68y);
+ }
+]
+
+\tikzstyle{draw script} = [
+ path picture = {
+ \def\de{40} %degrees
+ \def\ma{0.2} %margin
+ \coordinate (a1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.north east)$);
+ \coordinate (a2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.east)$);
+ %\coordinate (ne) at (4.323838pt, -0.8041138pt);
+ %\coordinate (sw) at (0.7419678pt, -4.077197pt);
+ \coordinate (ne) at ($(path picture bounding box.north east)-(0.5pt,0.5pt)$);
+ \coordinate (sw) at ($(path picture bounding box.south west)+(0.5pt,0.5pt)$);
+ \coordinate (sm) at ($(sw)!0.6793108!(ne |- sw)$); %south middle: lower right corner
+ \coordinate (nm) at ($(ne)!0.6793108!(ne -| sw)$); %north middle: top left corner
+ \coordinate (l1) at ($(ne)!0.20377!(sw)$);
+ \coordinate (l2) at ($(ne)!0.4!(sw)$);
+ \coordinate (l3) at ($(ne)!0.626414!(sw)$);
+ \coordinate (l4) at ($(ne)!0.826416!(sw)$);
+ \coordinate (linestart12) at ($(sw)!0.179310!(ne)$);
+ \coordinate (lineend12) at ($(sw)!0.637931!(ne)$);
+ \coordinate (linestart3) at ($(sw)!0.2965524!(ne)$);
+ \coordinate (lineend3) at ($(sw)!0.751723!(ne)$);
+ \coordinate (linestart4) at ($(sw)!0.286207!(ne)$);
+ \coordinate (lineend4) at ($(sw)!0.74137868!(ne)$);
+ \coordinate (em) at ($(ne)!0.4792457!(sw)$);
+ \coordinate (bezierright) at ($(sw)!0.7793097!(ne)$);
+ \coordinate (bezierleft) at ($(sw)!0.0965516!(ne)$);
+ \coordinate (b11x) at ($(sw)!0.632702!(ne)$);
+ \coordinate (b11y) at ($(ne)!0.219119!(sw)$);
+ \coordinate (b12x) at ($(sw)!0.775287!(ne)$);
+ \coordinate (b12y) at ($(ne)!0.087421!(sw)$);
+ \coordinate (b21x) at ($(sw)!0.951148!(ne)$);
+ \coordinate (b21y) at ($(ne)!0.686793!(sw)$);
+ \coordinate (b22x) at ($(sw)!0.933448!(ne)$);
+ \coordinate (b22y) at ($(ne)!0.898365!(sw)$);
+ \coordinate (b31x) at ($(sw)!-0.051781!(ne)$);
+ \coordinate (b31y) at ($(ne)!0.220063!(sw)$);
+ \coordinate (b32x) at ($(sw)!0.092529!(ne)$);
+ \coordinate (b32y) at ($(ne)!0.084087!(sw)$);
+ \coordinate (b41x) at ($(sw)!0.265459!(ne)$);
+ \coordinate (b41y) at ($(ne)!0.694026!(sw)$);
+ \coordinate (b42x) at ($(sw)!0.250402!(ne)$);
+ \coordinate (b42y) at ($(ne)!0.886981!(sw)$);
+ \draw[line width=0.1pt, solid,line cap=round,line join=round]
+ (linestart12 |- l1) -- (lineend12 |- l1) %(302.6953pt, -147.1082pt)
+ (linestart12 |- l2) -- (lineend12 |- l2) %(302.6953pt, -211.3347pt)
+ (linestart3 |- l3) -- (lineend3 |- l3) %(343.4541pt, -285.4421pt)
+ (linestart4 |- l4) -- (lineend4 |- l4) %(339.749pt, -350.9043pt)
+ (ne) -- (nm) %top
+ (sw) -- (sm) %bottom
+ (bezierright |- em)
+ .. controls (b11x |- b11y) and (b12x |- b12y) ..
+ (ne)
+ (bezierright |- em)
+ .. controls (b21x |- b21y) and (b22x |- b22y) ..
+ (sm)
+ (bezierleft |- em)
+ .. controls (b31x |- b31y) and (b32x |- b32y) ..
+ (nm)
+ (bezierleft |- em)
+ .. controls (b41x |- b41y) and (b42x |- b42y) ..
+ (sw);
+ }
+]
+
+\tikzstyle{draw user} = [
+ path picture = {
+ \coordinate (ne) at ($(path picture bounding box.north east)-(0.5pt,0.5pt)$);
+ \coordinate (sw) at ($(path picture bounding box.south west)+(0.5pt,0.5pt)$);
+% \draw (path picture bounding box.north east) rectangle (path picture bounding box.south west);
+\coordinate (c1x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c1y) at ($(sw)!0.527950310559006!(ne)$);
+\coordinate (c2x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c2y) at ($(sw)!0.527950310559006!(ne)$);
+\coordinate (c3x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c3y) at ($(sw)!0.527950310559006!(ne)$);
+\coordinate (c4x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c4y) at ($(sw)!0.555905797101449!(ne)$);
+\coordinate (c5x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c5y) at ($(sw)!0.555905797101449!(ne)$);
+\coordinate (c6x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c6y) at ($(sw)!0.555905797101449!(ne)$);
+\coordinate (c7x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c7y) at ($(sw)!0.555905797101449!(ne)$);
+\coordinate (c8x) at ($(sw)!0.644444444444444!(ne)$); \coordinate (c8y) at ($(sw)!0.593167701863355!(ne)$);
+\coordinate (c9x) at ($(sw)!0.644444444444444!(ne)$); \coordinate (c9y) at ($(sw)!0.593167701863355!(ne)$);
+\coordinate (c10x) at ($(sw)!0.644444444444444!(ne)$); \coordinate (c10y) at ($(sw)!0.593167701863355!(ne)$);
+\coordinate (c11x) at ($(sw)!0.644444444444444!(ne)$); \coordinate (c11y) at ($(sw)!0.593167701863355!(ne)$);
+\coordinate (c12x) at ($(sw)!0.511111111111112!(ne)$); \coordinate (c12y) at ($(sw)!1!(ne)$);
+\coordinate (c13x) at ($(sw)!0.511111111111112!(ne)$); \coordinate (c13y) at ($(sw)!1!(ne)$);
+\coordinate (c14x) at ($(sw)!0.511111111111112!(ne)$); \coordinate (c14y) at ($(sw)!1!(ne)$);
+\coordinate (c15x) at ($(sw)!0.371428571428571!(ne)$); \coordinate (c15y) at ($(sw)!0.593167701863355!(ne)$);
+\coordinate (c16x) at ($(sw)!0.371428571428571!(ne)$); \coordinate (c16y) at ($(sw)!0.593167701863355!(ne)$);
+\coordinate (c17x) at ($(sw)!0.371428571428571!(ne)$); \coordinate (c17y) at ($(sw)!0.593167701863355!(ne)$);
+\coordinate (c18x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c18y) at ($(sw)!0.555905797101449!(ne)$);
+\coordinate (c19x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c19y) at ($(sw)!0.555905797101449!(ne)$);
+\coordinate (c20x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c20y) at ($(sw)!0.555905797101449!(ne)$);
+\coordinate (c21x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c21y) at ($(sw)!0.555905797101449!(ne)$);
+\coordinate (c22x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c22y) at ($(sw)!0.509316770186336!(ne)$);
+\coordinate (c23x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c23y) at ($(sw)!0.509316770186336!(ne)$);
+\coordinate (c24x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c24y) at ($(sw)!0.509316770186336!(ne)$);
+\coordinate (c25x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c25y) at ($(sw)!0.509316770186336!(ne)$);
+\coordinate (c26x) at ($(sw)!0.333333333333333!(ne)$); \coordinate (c26y) at ($(sw)!0.527950310559006!(ne)$);
+\coordinate (c27x) at ($(sw)!0.333333333333333!(ne)$); \coordinate (c27y) at ($(sw)!0.527950310559006!(ne)$);
+\coordinate (c28x) at ($(sw)!0.333333333333333!(ne)$); \coordinate (c28y) at ($(sw)!0.527950310559006!(ne)$);
+\coordinate (c29x) at ($(sw)!0.333333333333333!(ne)$); \coordinate (c29y) at ($(sw)!0.527950310559006!(ne)$);
+\coordinate (c30x) at ($(sw)!0!(ne)$); \coordinate (c30y) at ($(sw)!0.350931677018634!(ne)$);
+\coordinate (c31x) at ($(sw)!0!(ne)$); \coordinate (c31y) at ($(sw)!0.350931677018634!(ne)$);
+\coordinate (c32x) at ($(sw)!0!(ne)$); \coordinate (c32y) at ($(sw)!0.350931677018634!(ne)$);
+\coordinate (c33x) at ($(sw)!0!(ne)$); \coordinate (c33y) at ($(sw)!0!(ne)$);
+\coordinate (c34x) at ($(sw)!0!(ne)$); \coordinate (c34y) at ($(sw)!0!(ne)$);
+\coordinate (c35x) at ($(sw)!0!(ne)$); \coordinate (c35y) at ($(sw)!0!(ne)$);
+\coordinate (c36x) at ($(sw)!0!(ne)$); \coordinate (c36y) at ($(sw)!0!(ne)$);
+\coordinate (c37x) at ($(sw)!1!(ne)$); \coordinate (c37y) at ($(sw)!0!(ne)$);
+\coordinate (c38x) at ($(sw)!1!(ne)$); \coordinate (c38y) at ($(sw)!0!(ne)$);
+\coordinate (c39x) at ($(sw)!1!(ne)$); \coordinate (c39y) at ($(sw)!0!(ne)$);
+\coordinate (c40x) at ($(sw)!1!(ne)$); \coordinate (c40y) at ($(sw)!0!(ne)$);
+\coordinate (c41x) at ($(sw)!1!(ne)$); \coordinate (c41y) at ($(sw)!0.350931677018634!(ne)$);
+\coordinate (c42x) at ($(sw)!1!(ne)$); \coordinate (c42y) at ($(sw)!0.350931677018634!(ne)$);
+\coordinate (c43x) at ($(sw)!1!(ne)$); \coordinate (c43y) at ($(sw)!0.350931677018634!(ne)$);
+\coordinate (c44x) at ($(sw)!1!(ne)$); \coordinate (c44y) at ($(sw)!0.350931677018634!(ne)$);
+\coordinate (c45x) at ($(sw)!0.444444444444444!(ne)$); \coordinate (c45y) at ($(sw)!0.406832298136645!(ne)$);
+\coordinate (c46x) at ($(sw)!0.444444444444444!(ne)$); \coordinate (c46y) at ($(sw)!0.406832298136645!(ne)$);
+\coordinate (c47x) at ($(sw)!0.444444444444444!(ne)$); \coordinate (c47y) at ($(sw)!0.406832298136645!(ne)$);
+\coordinate (c48x) at ($(sw)!0.555555555555556!(ne)$); \coordinate (c48y) at ($(sw)!0.406832298136645!(ne)$);
+\coordinate (c49x) at ($(sw)!0.555555555555556!(ne)$); \coordinate (c49y) at ($(sw)!0.406832298136645!(ne)$);
+\coordinate (c50x) at ($(sw)!0.555555555555556!(ne)$); \coordinate (c50y) at ($(sw)!0.406832298136645!(ne)$);
+\coordinate (c51x) at ($(sw)!0.555555555555556!(ne)$); \coordinate (c51y) at ($(sw)!0.406832298136645!(ne)$);
+\coordinate (c52x) at ($(sw)!0.53015873015873!(ne)$); \coordinate (c52y) at ($(sw)!0.400626293995859!(ne)$);
+\coordinate (c53x) at ($(sw)!0.53015873015873!(ne)$); \coordinate (c53y) at ($(sw)!0.400626293995859!(ne)$);
+\coordinate (c54x) at ($(sw)!0.53015873015873!(ne)$); \coordinate (c54y) at ($(sw)!0.400626293995859!(ne)$);
+\coordinate (c55x) at ($(sw)!0.53015873015873!(ne)$); \coordinate (c55y) at ($(sw)!0.400626293995859!(ne)$);
+\coordinate (c56x) at ($(sw)!0.498412698412698!(ne)$); \coordinate (c56y) at ($(sw)!0.397515527950311!(ne)$);
+\coordinate (c57x) at ($(sw)!0.498412698412698!(ne)$); \coordinate (c57y) at ($(sw)!0.397515527950311!(ne)$);
+\coordinate (c58x) at ($(sw)!0.498412698412698!(ne)$); \coordinate (c58y) at ($(sw)!0.397515527950311!(ne)$);
+\coordinate (c59x) at ($(sw)!0.498412698412698!(ne)$); \coordinate (c59y) at ($(sw)!0.397515527950311!(ne)$);
+\coordinate (c60x) at ($(sw)!0.473015873015873!(ne)$); \coordinate (c60y) at ($(sw)!0.400626293995859!(ne)$);
+\coordinate (c61x) at ($(sw)!0.473015873015873!(ne)$); \coordinate (c61y) at ($(sw)!0.400626293995859!(ne)$);
+\coordinate (c62x) at ($(sw)!0.473015873015873!(ne)$); \coordinate (c62y) at ($(sw)!0.400626293995859!(ne)$);
+\coordinate (c63x) at ($(sw)!0.473015873015873!(ne)$); \coordinate (c63y) at ($(sw)!0.400626293995859!(ne)$);
+\coordinate (c64x) at ($(sw)!0.444444444444444!(ne)$); \coordinate (c64y) at ($(sw)!0.406832298136645!(ne)$);
+\coordinate (b11x1) at ($(sw)!0.798148148148148!(ne)$);
+\coordinate (b11y1) at ($(sw)!0.722670807453416!(ne)$);
+\coordinate (b11x2) at ($(sw)!0.722222222222222!(ne)$);
+\coordinate (b11y2) at ($(sw)!0.994151138716356!(ne)$);
+\coordinate (b11x3) at ($(sw)!0.511111111111112!(ne)$);
+\coordinate (b11y3) at ($(sw)!1!(ne)$);
+\coordinate (b14x1) at ($(sw)!0.297671957671958!(ne)$);
+\coordinate (b14y1) at ($(sw)!1.00020703933747!(ne)$);
+\coordinate (b14x2) at ($(sw)!0.215714285714286!(ne)$);
+\coordinate (b14y2) at ($(sw)!0.723240165631469!(ne)$);
+\coordinate (b14x3) at ($(sw)!0.371428571428571!(ne)$);
+\coordinate (b14y3) at ($(sw)!0.593167701863355!(ne)$);
+\coordinate (b29x1) at ($(sw)!0.209100529100529!(ne)$);
+\coordinate (b29y1) at ($(sw)!0.531418219461698!(ne)$);
+\coordinate (b29x2) at ($(sw)!0.062804232804232!(ne)$);
+\coordinate (b29y2) at ($(sw)!0.455020703933747!(ne)$);
+\coordinate (b29x3) at ($(sw)!0!(ne)$);
+\coordinate (b29y3) at ($(sw)!0.350931677018634!(ne)$);
+\coordinate (b44x1) at ($(sw)!0.935185185185186!(ne)$);
+\coordinate (b44y1) at ($(sw)!0.454606625258799!(ne)$);
+\coordinate (b44x2) at ($(sw)!0.800899470899472!(ne)$);
+\coordinate (b44y2) at ($(sw)!0.523654244306418!(ne)$);
+\coordinate (b44x3) at ($(sw)!0.67936507936508!(ne)$);
+\coordinate (b44y3) at ($(sw)!0.527950310559006!(ne)$);
+\draw[line width=0.1pt, line cap=rect,line join=round]
+ (c1x |- c1y) -- (c2x |- c2y) -- (c3x |- c3y) -- (c4x |- c4y) -- (c5x |- c5y) -- (c6x |- c6y) -- (c7x |- c7y) -- (c8x |- c8y) -- (c9x |- c9y) -- (c10x |- c10y) -- (c11x |- c11y) .. controls (b11x1 |- b11y1) and (b11x2 |- b11y2) .. (b11x3 |- b11y3) -- (c12x |- c12y) -- (c13x |- c13y) -- (c14x |- c14y) .. controls (b14x1 |- b14y1) and (b14x2 |- b14y2) .. (b14x3 |- b14y3) -- (c15x |- c15y) -- (c16x |- c16y) -- (c17x |- c17y) -- (c18x |- c18y) -- (c19x |- c19y) -- (c20x |- c20y) -- (c21x |- c21y) -- (c22x |- c22y) -- (c23x |- c23y) -- (c24x |- c24y) -- (c25x |- c25y) -- (c26x |- c26y) -- (c27x |- c27y) -- (c28x |- c28y) -- (c29x |- c29y) .. controls (b29x1 |- b29y1) and (b29x2 |- b29y2) .. (b29x3 |- b29y3) -- (c30x |- c30y) -- (c31x |- c31y) -- (c32x |- c32y) -- (c33x |- c33y) -- (c34x |- c34y) -- (c35x |- c35y) -- (c36x |- c36y) -- (c37x |- c37y) -- (c38x |- c38y) -- (c39x |- c39y) -- (c40x |- c40y) -- (c41x |- c41y) -- (c42x |- c42y) -- (c43x |- c43y) -- (c44x |- c44y) .. controls (b44x1 |- b44y1) and (b44x2 |- b44y2) .. (b44x3 |- b44y3);
+ (c45x |- c45y) -- (c46x |- c46y) -- (c47x |- c47y) -- (c48x |- c48y) -- (c49x |- c49y) -- (c50x |- c50y) -- (c51x |- c51y) -- (c52x |- c52y) -- (c53x |- c53y) -- (c54x |- c54y) -- (c55x |- c55y) -- (c56x |- c56y) -- (c57x |- c57y) -- (c58x |- c58y) -- (c59x |- c59y) -- (c60x |- c60y) -- (c61x |- c61y) -- (c62x |- c62y) -- (c63x |- c63y) -- (c64x |- c64y) -- cycle;
+ }
+]
+
+%%%%% resources %%%%%
+
+\tikzstyle{pool} = [
+ draw
+]
+
+\tikzstyle{pool label} = [
+ pool,
+ label={[rotate=90,anchor=north]left:\footnotesize #1},
+ fit margins={left=0.8em,right=0.1em,bottom=0.1em,top=0.1em},
+ path picture = {
+ \def\x{1.2em}
+ \draw ($(path picture bounding box.north west)+(\x,0)$) to ($(path picture bounding box.south west)+(\x,0)$);
+ }
+]
+
+%%%%% data %%%%%
+
+\tikzstyle{data object} = [
+ inner sep=0,
+ minimum width=1em,
+ minimum height=1.5em,
+ path picture = {
+ \def\i{0.3em}
+ \draw (path picture bounding box.north west) to (path picture bounding box.south west) to (path picture bounding box.south east) |- ($(path picture bounding box.north east)+(-\i,-\i)$) |- cycle;
+ \draw ($(path picture bounding box.north east)+(-\i,0)$) to ($(path picture bounding box.north east)+(0,-\i)$);
+ }
+]
+
+\tikzstyle{data collection} = [
+ data object,
+ label={[anchor=south,inner sep=0]below:\tikzmultimarker}
+]
+
+\tikzstyle{data store} = [
+ database,
+ database segment height=0.3mm,
+ database bottom segment height=3mm,
+ database aspect ratio=0.25,
+ database radius=0.35cm
+]
+
+%adapted from https://tex.stackexchange.com/questions/442991/database-shape-in-tikz
+\makeatletter
+\tikzset{
+ database/.style={
+ path picture={
+ \draw (0, 1.5*\database@segmentheight+0.5*\database@bottomsegmentheight) circle [x radius=\database@radius,y radius=\database@aspectratio*\database@radius];
+ \draw (-\database@radius, 0.5*\database@segmentheight+0.5*\database@bottomsegmentheight) arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius];
+ \draw (-\database@radius,-0.5*\database@segmentheight+0.5*\database@bottomsegmentheight) arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius];
+ \draw (-\database@radius,1.5*\database@segmentheight+0.5*\database@bottomsegmentheight)
+ to ++(0,-2*\database@segmentheight-\database@bottomsegmentheight)
+ arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius]
+ to ++(0,2*\database@segmentheight+\database@bottomsegmentheight);
+ },
+ minimum width=2*\database@radius + 2*\pgflinewidth,
+ minimum height=2*\database@segmentheight + \database@bottomsegmentheight + 2*\database@aspectratio*\database@radius + 2*\pgflinewidth,
+ },
+ database segment height/.store in=\database@segmentheight,
+ database bottom segment height/.store in=\database@bottomsegmentheight,
+ database radius/.store in=\database@radius,
+ database aspect ratio/.store in=\database@aspectratio,
+ database segment height=0.1cm,
+ database radius=0.25cm,
+ database aspect ratio=0.35,
+}
+\makeatother
diff --git a/graphics/pgf/contrib/tikz-decofonts/README.md b/graphics/pgf/contrib/tikz-decofonts/README.md
new file mode 100644
index 0000000000..684a360e7c
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-decofonts/README.md
@@ -0,0 +1,8 @@
+This package provides some macros to present simple decoration fonts, made with TikZ.
+Available decorations are brushpaint and inkline, and gridlcd.
+-------------------------------------------------------------------------------------
+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
+ CC BY-SA 4.0 (https://tex.stackexchange.com/questions/475141/simulating-paintbrush-strokes-in-tikz from user121799)
+ CC BY-SA 4.0 (https://tex.stackexchange.com/questions/460836/custom-line-cap-to-simulate-inked-line-in-tikz/460842#460842 from user121799) \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz-decofonts/doc/tikz-decofonts-doc.pdf b/graphics/pgf/contrib/tikz-decofonts/doc/tikz-decofonts-doc.pdf
new file mode 100644
index 0000000000..cf67b2a862
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-decofonts/doc/tikz-decofonts-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikz-decofonts/doc/tikz-decofonts-doc.tex b/graphics/pgf/contrib/tikz-decofonts/doc/tikz-decofonts-doc.tex
new file mode 100644
index 0000000000..5b62282d15
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-decofonts/doc/tikz-decofonts-doc.tex
@@ -0,0 +1,469 @@
+% !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{amsmath}
+\usepackage{bera}
+\usepackage{inconsolata}
+\usepackage[T1]{fontenc}
+\usepackage[scale=0.875]{cabin}
+\usepackage{tikz-decofonts}
+\usepackage{fancyvrb}
+\usepackage{setspace}
+\usepackage{fancyhdr}
+\usepackage{tabularray}
+\usepackage{fontawesome5}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [tikz-decofonts]}
+\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.2}
+\def\TPdate{03/02/2025}
+\usepackage{tcolorbox}
+\tcbuselibrary{breakable,skins,hooks,listingsutf8}
+
+\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={\tkzbrush,\tkzink,\tkzpixl,\tkzpixletter,\tkzpixlquote,\tkzcomicbubble},%
+ 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={\tkzbrush,\tkzink,\tkzpixl,\tkzpixletter,\tkzpixlquote,\tkzbicolor,\tkzcomicbubble},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={color,lines,scale,height,offseth,offsetv,thick,gridcolor,gridafter,nospaceafter,border,colors,style,intdelta,paralcolors},%
+ 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}%
+}
+
+\def\sampleformula{$\displaystyle\int_0^1 \dfrac{1+x}{1+x^2}\,\mathrm{d}x$}
+\def\sampletxt{But I must explain to you how all this mistaken idea of denouncing pleasure.}
+\def\samplenum{1500}
+
+\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{tikz-decofonts}}\\
+ \\
+ {\LARGE Simple "decoration" fonts, made} \\
+ {\LARGE with Ti\textit{k}Z, for small texts\ldots} \\
+ \\
+ {\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://forge.apps.education.fr/pierquetcedric/packages-latex}} \\
+ \end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
+%paintbrush effect
+\tkzbrush[color=blue]{DECORATION}
+%paintink effect
+\tkzink[color=orange]{DECORATION}
+%pixeletter effect
+\tkzpixl[color=violet]{DECORATION}
+%bicolor effect
+\tkzbicolor[colors=blue/red,style=ndiag]{\Huge\sffamily DECORATION}
+\tkzbicolor[colors=teal/orange,style=ellips]{\Huge\sffamily DECORATION}
+\end{tcblisting}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\tkzbrush[color=blue]{DECORATION}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\hfill\tkzink[color=orange]{DECORATION}\hfill~
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\hfill\tkzpixl[color=violet]{Decoration}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\hfill\tkzbicolor[colors=blue/red,style=ndiag]{\Huge\sffamily DECORATION}~~\tkzbicolor[colors=teal/orange,style=ellips]{\Huge\sffamily DECORATION}\hfill~
+\end{tcolorbox}
+
+\vfill~
+
+\hrule
+
+\vspace*{5mm}
+
+\textit{Ideas and parts of codes, with \texttt{CC\,BY-SA\,4.0} licenses, come from :}
+
+\begin{itemize}
+ \item \href{https://tex.stackexchange.com/questions/475141/simulating-paintbrush-strokes-in-tikz}{[link on tex.stackexchange]} from \textsf{user121799} for paintbrush;
+ \item \href{https://tex.stackexchange.com/questions/460836/custom-line-cap-to-simulate-inked-line-in-tikz/460842#460842}{[link on tex.stackexchange]} from \textsf{user121799} for inkbrush.
+\end{itemize}
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+%\hrule
+
+\pagebreak
+
+\section{Loading, useful packages, purposes and acknowledgments}
+
+\subsection{Loading and useful packages}
+
+In order to load \texttt{tikz-decofonts}, simply use:
+
+\begin{DemoCode}{listing only}
+\usepackage{tikz-decofonts}
+\end{DemoCode}
+
+Loaded packages are \texttt{tikz}, \texttt{xintexpr}, \texttt{simplekv}, \texttt{listofitems} and \texttt{xstring}.
+
+Loaded \texttt{tikz.librairies} are \texttt{decorations}, \texttt{decorations.pathreplacing}, \texttt{calc}, \texttt{positioning}, \texttt{bbox}, \texttt{arrows.meta}, \texttt{shapes.callouts} and \texttt{bending}.
+
+\smallskip
+
+Globally, height of rendering is about 1cm, but some customization are available.
+
+\subsection{Purposes and acknowledgments}
+
+The purposes of this small package is not to provide full fonts, with all characters, but give restricted possibility to present \textbf{short} texts of title with \textit{cute} effects.
+
+\smallskip
+
+These decorations are not destined to be use for whole paragraphs or texts, but just for fun for small titles or small texts.
+
+\smallskip
+
+Since many calculations are required internally, compilation time can be increased, so be careful with intensive use!
+
+\smallskip
+
+\textit{Ideas and parts of codes, with \texttt{CC\,BY-SA\,4.0} licenses, come from:}
+
+\begin{itemize}
+ \item \href{https://tex.stackexchange.com/questions/475141/simulating-paintbrush-strokes-in-tikz}{[link on tex.stackexchange]} from \textsf{user121799} for paintbrush;
+ \item \href{https://tex.stackexchange.com/questions/460836/custom-line-cap-to-simulate-inked-line-in-tikz/460842#460842}{[link on tex.stackexchange]} from \textsf{user121799} for inkbrush.
+\end{itemize}
+
+Some adjustments (keys, paths) are maid from original code, but the global usage is due to the links above !
+
+\pagebreak
+
+\section{The different effects}
+
+\subsection{Paint brush}
+
+{\small\faBomb} The effect is \textbf{very} \textit{time-consuming} to compile !!
+
+\begin{DemoCode}{listing only}
+%only uppercase letters allowed
+\tkzbrush[color=...,lines=...,scale=...]<tikzpicture options>{short text}
+
+%color = black by default
+%lines = 12 by default
+%scale = 1 by default
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%default output
+\tkzbrush{TIKZ DECORATION}
+\end{DemoCode}
+
+\begin{DemoCode}{text only}
+%default output
+\tkzbrush{TIKZ DECORATION}
+
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%customization(s) (external file for speeding rendering ^^)
+\tkzbrush[color=red,lines=20,scale=1.5]{CUSTOM TEXT}
+\end{DemoCode}
+
+\begin{DemoCode}{text only}
+%customization(s) (external file for speeding rendering ^^)
+\includegraphics{tkzbrushA.pdf}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Ink brush}
+
+\begin{DemoCode}{listing only}
+%only uppercase letters allowed
+\tkzink[color=...,thick=...,scale=...]<tikzpicture options>{short text}
+
+%color = black by default
+%thick = 3 by default
+%scale = 1 by default
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%default output
+\tkzink{TIKZ DECORATION}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%customization(s)
+\tkzink[color=olive,thick=5,scale=2]{TIKZ DECORATION}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Pixl brush}
+
+\begin{DemoCode}{listing only}
+%regular letters allowed (upper and/or lower), rendered characters are 5 columns x 7 lines
+\tkzpixl%
+ [height=...,thick=...,color=...,gridcolor=...,border=...,
+ offseth=...,offsetv=...,gridafter=...,nospaceafter=...]
+ <tikzpicture options>{short text}
+
+\tkzpixletter%
+ [height=...,thick=...,color=...,gridcolor=...,border=...,
+ offseth=...,offsetv=...,gridafter=...,nospaceafter=...]
+ <tikzpicture options>{letter}
+
+\tkzpixlquote%if problem with '...
+ [height=...,thick=...,color=...,gridcolor=...,
+ offseth=...,offsetv=...,gridafter=...,nospaceafter=...]
+ <tikzpicture options>
+
+%height = 11mm by default, thick = 0.1mm by default
+%color = black by default, gridcolor = gray by default
+%offseth = 1 by default (squares left/right of regular character)
+%offsetv = 2 by default (squares above/below of regular character)
+%boder = false by default (boolean for adding border)
+%gridafter = false by default (boolean for showing grid after pixls)
+%nospaceafter = false by default (boolean for removeing hspace after pixls)
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%default output, comparaison with character w/o offsets (5*7)
+\tkzpixl{And then, 1+1=2 !?!} and \tkzpixletter[offseth=0,offsetv=0]{*}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%customization(s)
+\tkzpixl[color=violet,height=1.75cm,gridafter,offsetv=3,border]{Small custo'm text}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Bicolor effect}
+
+\begin{DemoCode}{listing only}
+%compatible with all fonts and/or sizes
+\tkzbicolor%
+ [colors=...,style=...,intdelta=...]
+ {text}
+
+\tkzbicolor%with paral style
+ [paralcolors=...,style=paral,intdelta=...]
+ {text}
+
+%style = midh/midv/rect/ellips/paral (paral by default)
+%colors = red/blue by default,
+%paralcolors = red/blue/orange/gray by default
+%intdelta = 0.66 by default, percentage of int dim for ellips/rect
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+\def\sampleformula{$\displaystyle\int_0^1 \dfrac{1+x}{1+x^2}\,\mathrm{d}x$}
+\def\sampletxt{But I must explain to you how all this mistaken idea of denouncing pleasure.}
+\def\samplenum{1500}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\tkzbicolor[style=midh]{\sampleformula}
+or \tkzbicolor[colors=violet/magenta,style=midv]{\sampleformula}
+or \tkzbicolor[colors=darkgray/olive,style=ndiag]{\sampleformula}
+or \tkzbicolor[colors=orange/teal,style=sdiag]{\sampleformula}
+or \tkzbicolor[colors=orange/teal,style=ellips]{\sampleformula}
+or \tkzbicolor[colors=pink/violet,style=rect]{\sampleformula}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\tkzbicolor[style=midh]{\sampletxt}\par
+\tkzbicolor[colors=violet/magenta,style=midv]{\sampletxt}\par
+\tkzbicolor[colors=darkgray/olive,style=ndiag]{\sampletxt}\par
+\tkzbicolor[colors=orange/teal,style=sdiag]{\sampletxt}\par
+\tkzbicolor[colors=orange/teal,style=ellips]{\sampletxt}\par
+\tkzbicolor[colors=pink/violet,style=rect]{\sampletxt}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\tkzbicolor[style=midh]{\parbox{2.5cm}{\sampletxt}}
+\tkzbicolor[colors=violet/gray,style=midv]{\parbox{2.5cm}{\sampletxt}}
+\tkzbicolor[colors=darkgray/olive,style=ndiag]{\parbox{2.5cm}{\sampletxt}}
+\tkzbicolor[colors=orange/cyan,style=sdiag]{\parbox{2.5cm}{\sampletxt}}
+\tkzbicolor[colors=pink/violet,style=ellips]{\parbox{2.5cm}{\sampletxt}}
+\tkzbicolor[colors=pink/violet,style=ellips,intdelta=0.85]{\parbox{2.5cm}{\sampletxt}}
+\tkzbicolor[colors=cyan/darkgray,style=rect]{\parbox{2.5cm}{\sampletxt}}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\tkzbicolor[style=paral]{\parbox{6cm}{\large\sffamily\sampletxt}}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\tkzbicolor[style=midh]{\samplenum}\par
+\tkzbicolor[colors=violet/magenta,style=midv]{\samplenum}\par
+\tkzbicolor[colors=darkgray/olive,style=ndiag]{\samplenum}\par
+\tkzbicolor[colors=orange/teal,style=sdiag]{\samplenum}\par
+\tkzbicolor[colors=orange/teal,style=ellips]{\samplenum}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Comic bubble}
+
+\begin{DemoCode}{listing only}
+%style tikz
+\tikzset{comicbubble/.style args={#1#2}{%
+ inner sep=1mm,line join=round,rectangle callout,draw,very thick,
+ text width=#1,align=flush center,callout relative pointer=#2}}
+\end{DemoCode}
+
+\begin{DemoCode}{listing only}
+%independant macro
+\tkzcomicbubble[%
+ width=...,coltxt=...,colbg=...,colframe=...,pospointer=(...),
+ font=...,rcorners=true/false]%
+ <tikz options>{text}
+
+%with tikzpicture environment
+\begin{tikzpicture}
+ %...
+ \tkzcomicbubble*[%
+ width=...,coltxt=...,colbg=...,colframe=...,pospointer=(...),
+ font=...,rcorners=true/false]%
+ <tikz options>{text}
+\end{tikzpicture}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\def\mytext{Let's play with Pythagoras !\relax}
+\tkzcomicbubble[font=\large\bfseries\itshape]{\mytext}~~
+\tkzcomicbubble%
+ [width=3cm,coltxt=red,colframe=teal,font=\bfseries,
+ colbg=yellow!15,pospointer={(150:1em)},rcorners]%
+ <thick>%
+ {\mytext}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+%\usepackage{setspace}
+\def\mytext{Let's use Pythagoras !\relax}
+{\tikz[rotate=-15,transform shape]\tkzcomicbubble*[width=2.5cm,font=\large\sffamily]<execute at begin node={\setlength{\baselineskip}{0.75\baselineskip}}>{\mytext};}
+\end{DemoCode}
+
+\pagebreak
+
+\section{History}
+
+\texttt{0.1.2: Comic bubble}
+
+\texttt{0.1.1: Bicolor effect}
+
+\texttt{0.1.0: Initial version}
+
+\end{document}
diff --git a/graphics/pgf/contrib/tikz-decofonts/doc/tkzbrushA.pdf b/graphics/pgf/contrib/tikz-decofonts/doc/tkzbrushA.pdf
new file mode 100644
index 0000000000..764b4cc3a4
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-decofonts/doc/tkzbrushA.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikz-decofonts/doc/tkzbrushA.tex b/graphics/pgf/contrib/tikz-decofonts/doc/tkzbrushA.tex
new file mode 100644
index 0000000000..e130834119
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-decofonts/doc/tkzbrushA.tex
@@ -0,0 +1,11 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
+
+\documentclass{standalone}
+\usepackage{tikz-decofonts}
+
+\begin{document}
+
+\tkzbrush[color=red,lines=20,scale=1.5]{CUSTOM TEXT}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz-decofonts/tex/tikz-decofonts.sty b/graphics/pgf/contrib/tikz-decofonts/tex/tikz-decofonts.sty
new file mode 100644
index 0000000000..076894fdf9
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-decofonts/tex/tikz-decofonts.sty
@@ -0,0 +1,1008 @@
+% Author : C. Pierquet
+% licences : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+% : CC BY-SA 4.0 (https://tex.stackexchange.com/questions/475141/simulating-paintbrush-strokes-in-tikz from user121799)
+% : (https://tex.stackexchange.com/questions/460836/custom-line-cap-to-simulate-inked-line-in-tikz/460842#460842 from user121799)
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{tikz-decofonts}[2025/02/03 0.1.2 Custom fonts, made with TikZ, with effects]
+
+%------History
+% 0.1.2 Bd fonts (with callout.shapes)
+% 0.1.1 Bicolor txt
+% 0.1.0 Initial version
+
+%------Packages and library
+\RequirePackage{tikz}
+\RequirePackage{xstring}
+\RequirePackage{xintexpr}
+\RequirePackage{listofitems}
+\RequirePackage{simplekv}
+\usetikzlibrary{decorations,decorations.pathreplacing,calc,positioning,bbox,arrows.meta,bending,shapes.callouts}
+
+%------Paintbrush
+\pgfmathdeclarerandomlist{randcolor}{{black}{white}}
+\pgfkeys{/brush pars/.cd,
+ lines/.initial={\tkzbrushlines},
+ distance/.initial=0.25pt
+}
+\tikzset{
+ brush/.style={
+ decorate,
+ decoration={
+ show path construction,
+ lineto code={
+ \foreach\Xbrush in{1,...,\pgfkeysvalueof{/brush pars/lines}}{
+ \pgfmathrandomitem{\c}{randcolor}
+ \pgfmathtruncatemacro{\mix}{100-24*rnd}
+ \draw[color=brushcolor!\mix!\c,
+ shorten >={(3-4*rnd)*1pt
+ -0.5*\pgfkeysvalueof{/brush pars/lines}*\pgfkeysvalueof{/brush pars/distance}},
+ shorten <={(3-4*rnd)*1pt
+ -0.5*\pgfkeysvalueof{/brush pars/lines}*\pgfkeysvalueof{/brush pars/distance}}]
+ let \p1=($(\tikzinputsegmentlast)-(\tikzinputsegmentfirst)$),
+ \n1={90+atan2(\y1,\x1)} in
+ ($(\tikzinputsegmentfirst)+(\n1:{((1.02-0.04*rnd)*\Xbrush-\pgfkeysvalueof{/brush pars/lines}/2)*\pgfkeysvalueof{/brush pars/distance}})$)
+ --
+ ($(\tikzinputsegmentlast)+(\n1:{((1.02-0.04*rnd)*\Xbrush-\pgfkeysvalueof{/brush pars/lines}/2)*\pgfkeysvalueof{/brush pars/distance}})$);
+ }
+ },
+ curveto code={
+ \foreach\Xbrush in{1,...,\pgfkeysvalueof{/brush pars/lines}}{
+ \pgfmathrandomitem{\c}{randcolor}
+ \pgfmathtruncatemacro{\mix}{100-24*rnd}
+ \draw[color=brushcolor!\mix!\c,shorten >={(3-4*rnd)*1pt
+ -0.5*\pgfkeysvalueof{/brush pars/lines}*\pgfkeysvalueof{/brush pars/distance}},
+ shorten <={(3-4*rnd)*1pt
+ -0.5*\pgfkeysvalueof{/brush pars/lines}*\pgfkeysvalueof{/brush pars/distance}}]
+ let \p1=($(\tikzinputsegmentsupporta)-(\tikzinputsegmentfirst)$),
+ \p2=($(\tikzinputsegmentsupportb)-(\tikzinputsegmentsupporta)$),
+ \p3=($(\tikzinputsegmentlast)-(\tikzinputsegmentsupportb)$),
+ \n1={90+atan2(\y1,\x1)}, \n2={90+atan2(\y2,\x2)},
+ \n3={90+atan2(\y3,\x3)} in
+ ($(\tikzinputsegmentfirst)+(\n1:{((1.02-0.04*rnd)*\Xbrush-\pgfkeysvalueof{/brush pars/lines}/2)*\pgfkeysvalueof{/brush pars/distance}})$)
+ .. controls ($(\tikzinputsegmentsupporta)+(\n2:{((1.02-0.04*rnd)*\Xbrush-\pgfkeysvalueof{/brush pars/lines}/2)*\pgfkeysvalueof{/brush pars/distance}})$)
+ and ($(\tikzinputsegmentsupportb)+(\n3:{((1.02-0.04*rnd)*\Xbrush-\pgfkeysvalueof{/brush pars/lines}/2)*\pgfkeysvalueof{/brush pars/distance}})$) ..
+ ($(\tikzinputsegmentlast)+(\n3:{((1.02-0.04*rnd)*\Xbrush-\pgfkeysvalueof{/brush pars/lines}/2)*\pgfkeysvalueof{/brush pars/distance}})$);
+ }
+ },
+ }
+ }
+}
+\tikzset{pics/.cd,
+ brushA/.style={code={%
+ \draw[brush] (0,-0.5) -- (0.25,0.5) -- (0.5,-0.5);
+ \draw[brush] (0.125,-0.15) -- (0.375,-0.15);
+ %\path (0.725,0);%
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }%
+ },
+ brushB/.style={code={%
+ \draw[brush] (0,-0.5) -- (0,0.5) to[out=0,in=0,looseness=2.5] (0,0) to[out=0,in=0,looseness=3] cycle;
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushC/.style={code={%
+ \draw[brush] (0,0) to[out=90,in=180] (0.25,0.5) to[out=0,in=110] (0.5,0.325) ;
+ \draw[brush] (0,0) to[out=-90,in=180] (0.25,-0.5) to[out=0,in=-110] (0.5,-0.325) ;
+ %\draw[brush] (0,0) to[out=90,in=110,looseness=2] (0.5,0.325);
+ %\draw[brush](0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.2325);
+ %\path (0.7,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushD/.style={code={%
+ \draw[brush] (0,-0.5) -- (0,0.5) to[out=0,in=0,looseness=1.75] cycle;
+ %\path (0.675,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushE/.style={code={%
+ \draw[brush] (0.425,-0.5) --(0,-0.5) -- (0,0.5) -- (0.425,0.5);
+ \draw[brush] (0,0) -- (0.425,0);
+ \path (0.5,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushF/.style={code={%
+ \draw[brush] (0,-0.5) -- (0,0.5) -- (0.425,0.5);
+ \draw[brush] (0,0) -- (0.425,0);
+ \path (0.5,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushG/.style={code={%
+ \draw[brush] (0,0) to[out=90,in=180] (0.25,0.5) to[out=0,in=100] (0.475,0.325) ;
+ \draw[brush] (0,0) to[out=-90,in=180] (0.25,-0.5) to[out=0,in=-110] (0.475,-0.1) ;
+ \draw[brush] (0.475,-0.1) to (0.275,-0.1);
+ %\draw[brush] (0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
+ %\draw[brush] (0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.25);
+ %\draw[brush] (0.5,-0.25) to (0.25,-0.25);
+ %\path (0.7,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushH/.style={code={%
+ \draw[brush] (0,-0.5) -- (0,0.5);
+ \draw[brush] (0.5,-0.5) -- (0.5,0.5);
+ \draw[brush] (0,0) -- (0.5,0);
+ %\path (0.7,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushI/.style={code={%
+ \draw[brush] (0,-0.5) -- (0,0.5);
+ %\path (0.25,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushJ/.style={code={%
+ \draw[brush] (0.35,0.5) -- (0.35,-0.35) to[out=-90,in=0] (0.175,-0.5) to[out=180,in=-90] (0,-0.3);
+ %\path (0.45,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushK/.style={code={%
+ \draw[brush] (0,-0.5) -- (0,0.5);
+ \draw[brush] (0.4,0.475) -- (0.02,0) -- (0.4,-0.475);
+ %\path (0.6,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushL/.style={code={
+ \draw[brush] (0,0.5) -- (0,-0.5) -- (0.5,-0.5);
+ %\path (0.6,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushM/.style={code={
+ \draw[brush] (0,-0.5) -- (0,0.5) -- (0.25,0.25) -- (0.5,0.5) -- (0.5,-0.5);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushN/.style={code={
+ \draw[brush] (0,-0.5) -- (0,0.5) -- (0.5,-0.5) -- (0.5,0.5);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushO/.style={code={
+ \draw[brush] (0.25,0) circle(0.25 and 0.5);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushP/.style={code={
+ \draw[brush] (0,-0.5) -- (0,0.5) to[out=0,in=0,looseness=2.5] (0,0);
+ %\path (0.6,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushQ/.style={code={
+ \draw[brush] (0.25,0) circle(0.25 and 0.5);
+ \draw[brush](0.35,-0.25) -- (0.475,-0.45);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushR/.style={code={
+ \draw[brush] (0,-0.5) -- (0,0.5) to[out=0,in=0,looseness=2.5] (0.05,0) -- (0.5,-0.5);
+ %\path (0.6,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushS/.style={code={
+ \draw[brush] (0.475,0.475) to[out=150,in=165,looseness=2.25] (0.25,0) to[out=-15,in=-30,looseness=2.25] (0.025,-0.475);
+ %\path (0.65,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushT/.style={code={
+ \draw[brush] (0.25,-0.5) -- (0.25,0.5) (0,0.5) -- (0.5,0.5);
+ %\path (0.85,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushU/.style={code={
+ \draw[brush] (0,0.5) -- (0,0) to[out=-90,in=-90,looseness=4] (0.5,0) -- (0.5,0.5);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushV/.style={code={
+ \draw[brush] (0,0.5) -- (0.25,-0.5) -- (0.5,0.5);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushW/.style={code={
+ \draw[brush] (0,0.5) -- (0.15,-0.5) -- (0.3,-0.25) -- (0.45,-0.5) -- (0.6,0.5);
+ %\path (1.1,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushX/.style={code={
+ \draw[brush] (0,0.5) -- (0.5,-0.5);
+ \draw[brush] (0.5,0.5) -- (0,-0.5);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushY/.style={code={
+ \draw[brush] (0,0.5) -- (0.25,0);
+ \draw[brush] (0.5,0.5) -- (0,-0.5);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushZ/.style={code={
+ \draw[brush] (0,0.5) --(0.5,0.5) -- (0,-0.5) -- (0.5,-0.5);
+ %\path (0.8,0);
+ %\filldraw[blue] (0,0) circle[radius=2pt] ;
+ }
+ },
+ brushspace/.style={code={\path (0,0) (0.2,0);}},
+}
+
+
+\defKV[tkzbrush]{%
+ scale=\def\tkzbrushscale{#1},%
+ color=\colorlet{brushcolor}{#1},%
+ lines=\def\tkzbrushlines{#1},%
+ thick=\def\tkzbrushthick{#1}
+}
+
+\setKVdefault[tkzbrush]{%
+ scale=1,%
+ color=black,%
+ lines=12,%
+ thick=3
+}
+
+%------inkbrush
+\pgfdeclarearrow{
+ name=ink,
+ parameters= {\the\pgfarrowlength},
+ setup code={
+ \pgfarrowssettipend{0pt}
+ \pgfarrowssetlineend{-\pgfarrowlength}
+ \pgfarrowlinewidth=\pgflinewidth
+ \pgfarrowssavethe\pgfarrowlength
+ },
+ drawing code={
+ \pgfpathmoveto{\pgfpoint{-\pgfarrowlength}{0.5\pgflinewidth}}
+ \pgfpathcurveto{\pgfpoint{-0.75\pgfarrowlength}{0.6\pgflinewidth}}{%
+ \pgfpoint{-0.01\pgfarrowlength}{0.6\pgflinewidth}}{%
+ \pgfpoint{0pt}{0pt}}
+ \pgfpathcurveto{\pgfpoint{-0.01\pgfarrowlength}{-0.5\pgflinewidth}}{%
+ \pgfpoint{-0.2\pgfarrowlength}{-(1+0.3*rnd)*\pgflinewidth}}{%
+ \pgfpoint{-0.3\pgfarrowlength}{-0.8*(1+0.3*rnd)*\pgflinewidth}}
+ \pgfpathcurveto{\pgfpoint{-0.4\pgfarrowlength}{-0.6*(1+0.3*rnd)*\pgflinewidth}}{%
+ \pgfpoint{-0.6\pgfarrowlength}{-0.3*(1+0.3*rnd)*\pgflinewidth}}{%
+ \pgfpoint{-1\pgfarrowlength}{-0.5\pgflinewidth}}
+ \pgfusepathqfill
+ },
+ defaults={length=8pt}
+}
+
+\tikzset{pics/.cd,
+ inkA/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,-0.5) -- (0.25,0.5) -- (0.5,-0.5);
+ \draw[line width={\tkzbrushthick}] (0.125,-0.15) -- (0.375,-0.15);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,-0.55) -- (0.3,0.4) -- (0.6,-0.55);
+ %\draw[line width=5](0.1,1/3-0.45) -- (0.5,1/3-0.45);
+ %\path (0.7,0);
+ }
+ },
+ inkB/.style={code={
+ \draw[line width={\tkzbrushthick},{ink[bend]}-{ink[bend]}] (0,-0.5) -- (0,0.5) to[out=0,in=0,looseness=2.5] (0,0) to[out=0,in=0,looseness=3] cycle;
+ %\draw[line width=5] (0,-0.45) -- (0,0.45) to[out=0,in=0,looseness=2.5] (0,0) to[out=0,in=0,looseness=3] cycle;
+ }
+ },
+ inkC/.style={code={
+ \draw[line width={\tkzbrushthick}] (0,0) to[out=90,in=180] (0.25,0.5) to[out=0,in=110] (0.5,0.325) ;
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0) to[out=-90,in=180] (0.25,-0.5) to[out=0,in=-110] (0.5,-0.325) ;
+ %\draw[line width=5,-{ink[bend]}] (0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
+ %\draw[line width=5,-{ink[bend]}] (0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.25);
+ %\path (0.7,0);
+ }
+ },
+ inkD/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,-0.5) -- (0,0.5) to[out=0,in=0,looseness=1.75] (0.075,-0.5) ;
+ %\draw[line width=5] (0,-0.45) -- (0,0.45) to[out=0,in=0,looseness=2.25] cycle;
+ %\path (0.7,0);
+ }
+ },
+ inkE/.style={code={%
+ \draw[line width={\tkzbrushthick},{ink[bend]}-] (0.5,0.5) -- (0,0.5) -- (0,-0.5) ;
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0) -- (0.425,0) ;
+ \draw[line width={\tkzbrushthick}] (0,-0.5) -- (0.4,-0.5);
+ %\draw[line width={\tkzbrushthick},{ink[bend]}-{ink[bend]}] (0.5,-0.45) --(0,-0.45) -- (0,0.45) -- (0.5,0.45);
+ %\draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0) -- (0.5,0);
+ %\path (0.7,0);
+ }
+ },
+ inkF/.style={code={%
+ \draw[line width={\tkzbrushthick},{ink[bend]}-] (0.5,0.5) -- (0,0.5) -- (0,-0.5) ;
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0) -- (0.425,0) ;
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,-0.45) -- (0,0.45) -- (0.5,0.45);
+ %\draw[line width=5,-{ink[bend]}] (0,0) -- (0.5,0);
+ %\path (0.7,0);
+ }
+ },
+ inkG/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0) to[out=90,in=180] (0.25,0.5) to[out=0,in=100] (0.475,0.325) ;
+ \draw[line width={\tkzbrushthick}] (0,0) to[out=-90,in=180] (0.25,-0.5) to[out=0,in=-110] (0.475,-0.1) ;
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0.475,-0.1) to (0.275,-0.1);
+ %\draw[line width=5,-{ink[bend]}] (0,0) to[out=90,in=110,looseness=2] (0.5,0.25);
+ %\draw[line width=5] (0,0) to[out=-90,in=-110,looseness=2] (0.5,-0.25);
+ %\draw[line width=5,-{ink[bend]}] (0.54,-0.25) to (0.3,-0.25);
+ %\path (0.7,0);
+ }
+ },
+ inkH/.style={code={%
+ \draw[line width={\tkzbrushthick},{ink[bend]}-] (0,-0.5) -- (0,0.5);
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0.5,-0.5) -- ([yshift=1pt]0.5,0.5);
+ \draw[line width={\tkzbrushthick}] (0,0) -- (0.5,0);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,-0.5) -- (0,0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0.5,-0.5) -- (0.5,0.5);
+ %\draw[line width=5] (0,0) -- (0.5,0);
+ \path (0.7,0);
+ }
+ },
+ inkI/.style={code={
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] ([yshift=-0.5pt]0,-0.5) -- ([yshift=1pt]0,0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,-0.45) -- (0,0.45);
+ \path (0.075,0);
+ }
+ },
+ inkJ/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0.35,0.5) -- (0.35,-0.35) to[out=-90,in=0] (0.175,-0.5) to[out=180,in=-90] (0,-0.3);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0.2,0.45) -- (0.2,-0.35) to[out=-90,in=0] (0.1,-0.45) to[out=180,in=-90] (0,-0.35);
+ %\path (0.45,0);
+ }
+ },
+ inkK/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,-0.5) -- ([yshift=1pt]0,0.5);
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0.4,0.5) -- (0.02,0) -- (0.4,-0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,-0.45) -- (0,0.45);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0.4,0.45) -- (0.02,0) -- (0.4,-0.45);
+ %\path (0.6,0);
+ }
+ },
+ inkL/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.5) -- (0,-0.5) -- (0.5,-0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,0.5) -- (0,-0.45) -- (0.4,-0.45);
+ %\path (0.6,0);
+ }
+ },
+ inkM/.style={code={%
+ \draw[line width={\tkzbrushthick}] (0,-0.5)--(0,0.45) ;
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.475) -- (0.25,0.25) -- (0.5,0.45) -- (0.5,-0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,-0.45) -- (0,0.45) -- (0.3,0.25) -- (0.6,0.45) -- (0.6,-0.45);
+ %\path (0.8,0);%
+ }
+ },
+ inkN/.style={code={%
+ \draw[line width={\tkzbrushthick}] (0,-0.5)--(0,0.45) ;
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.475) -- (0.5,-0.51) -- (0.5,0.515);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,-0.45) -- (0,0.45) -- (0.6,-0.4) -- (0.6,0.45);
+ %\path (0.8,0);
+ }
+ },
+ inkO/.style={code={%
+ \draw[line width={\tkzbrushthick}] (0.25,0) circle(0.25 and 0.5);
+ %\path (0.8,0);
+ }
+ },
+ inkP/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,-0.5) -- (0,0.5) to[out=0,in=0,looseness=2.5] (0,0);
+ %\draw[line width=5,{ink[bend]}-] (0,-0.45) -- (0,0.45) to[out=0,in=0,looseness=2.5] (0,0);
+ %\path (0.6,0);
+ }
+ },
+ inkQ/.style={code={%
+ \draw[line width={\tkzbrushthick}] (0.25,0) circle(0.25 and 0.5);
+ \draw[line width={\tkzbrushthick},{ink[bend]}-{ink[bend]}](0.35,-0.25) -- (0.5,-0.5);
+ %\draw[line width=5] (0.3,0) circle(0.3 and 0.48);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}](0.35,-0.25) -- (0.6,-0.45);
+ %\path (0.8,0);
+ }
+ },
+ inkR/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,-0.5) -- (0,0.5) to[out=0,in=0,looseness=2.5] (0.05,0) -- (0.5,-0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,-0.45) -- (0,0.45) to[out=0,in=0,looseness=2.5] (0.05,0) -- (0.4,-0.45);
+ %\path (0.6,0);
+ }
+ },
+ inkS/.style={code={%
+ \draw[line width={\tkzbrushthick},{ink[bend]}-] (0.475,0.475) to[out=150,in=165,looseness=2.25] (0.25,0) to[out=-15,in=-30,looseness=2.25] (0.025,-0.475);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0.5,0.4) to[out=160,in=165,looseness=2] (0.3,0) to[out=-15,in=-20,looseness=2] (0.1,-0.4);
+ %\path (0.65,0);
+ }
+ },
+ inkT/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0.25,-0.5) -- (0.25,0.5) ;
+ \draw[line width={\tkzbrushthick}] (0,0.5) -- (0.5,0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0.35,-0.45) -- (0.35,0.45) (0,0.45) -- (0.7,0.45);
+ %\path (0.85,0);
+ }
+ },
+ inkU/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.5) -- (0,0.25) to[out=-90,in=180] (0.25,-0.5) to[out=0,in=-90] (0.5,0.25) -- (0.5,0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,0.5) -- (0,0) to[out=-90,in=-90,looseness=2.5] (0.6,0) -- (0.6,0.5);
+ %\path (0.8,0);
+ }
+ },
+ inkV/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.5) -- (0.25,-0.5) -- (0.5,0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,0.5) -- (0.3,-0.4) -- (0.6,0.5);
+ %\path (0.8,0);
+ }
+ },
+ inkW/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.5) -- (0.15,-0.5) -- (0.3,-0.25) -- (0.45,-0.5) -- (0.6,0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,0.45) -- (0.3,-0.4) -- (0.45,-0.1) -- (0.6,-0.4) -- (0.9,0.45);
+ %\path (1.1,0);
+ }
+ },
+ inkX/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.5) -- (0.5,-0.5);
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0.5,0.5) -- (0,-0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,0.45) -- (0.6,-0.45);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0.6,0.45) -- (0,-0.45);
+ %\path (0.8,0);
+ }
+ },
+ inkY/.style={code={
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.5) -- (0.25,0);
+ \draw[line width={\tkzbrushthick},{ink[bend]}-{ink[bend]}] (0.5,0.5) -- (0,-0.5);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,0.45) -- (0.3,0);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0.6,0.45) -- (0,-0.45);
+ %\path (0.8,0);
+ }
+ },
+ inkZ/.style={code={%
+ \draw[line width={\tkzbrushthick},-{ink[bend]}] (0,0.5) --(0.5,0.5) -- (0,-0.5) -- (0.5,-0.45);
+ %\draw[line width=5,{ink[bend]}-{ink[bend]}] (0,0.45) --(0.6,0.45) -- (0,-0.45) -- (0.6,-0.45);
+ %\path (0.8,0);
+ }
+ },
+ inkspace/.style={code={\path (0,0) (0.2,0);}},
+}
+
+%------macros
+\NewDocumentCommand\tkzbrush{ O{} D<>{} m }{%
+ \restoreKV[tkzbrush]%
+ \setKV[tkzbrush]{#1}%
+ \StrChar{#3}{1}[\myfisrtchar]%
+ \StrLen{#3}[\mynbofchars]%
+ \begin{tikzpicture}%[bezier bounding box]
+ \pic[bezier bounding box,local bounding box=box1,scale={\tkzbrushscale},#2] at (0,0) {brush\myfisrtchar} ;%
+ %on boucle les lettres une par une ??
+ \foreach \i [count=\Y,evaluate=\Y as \Z using {int(\Y+1)}] in {2,...,\mynbofchars}{%
+ \StrChar{#3}{\i}[\mytmpchar]%
+ \IfStrEq{\mytmpchar}{ }%
+ {%
+ \edef\temp{\noexpand\pic[bezier bounding box,right=2mm of box\Y,local bounding box=box\Z,scale={\tkzbrushscale},#2] {brushspace};}
+ \temp%
+ }%
+ {%
+ \edef\temp{\noexpand\pic[bezier bounding box,right=2mm of box\Y,local bounding box=box\Z,scale={\tkzbrushscale},#2] {brush\mytmpchar};}
+ \temp%
+ }%
+ }%
+ \end{tikzpicture}%
+}
+
+\NewDocumentCommand\tkzink{ O{} D<>{} m }{%
+ \restoreKV[tkzbrush]%
+ \setKV[tkzbrush]{#1}%
+ \StrChar{#3}{1}[\myfisrtchar]%
+ \StrLen{#3}[\mynbofchars]%
+ \begin{tikzpicture}[brushcolor,line join=round,line cap=round]%,bezier bounding box]
+ \pic[bezier bounding box,local bounding box=box1,scale={\tkzbrushscale},#2] at (0,0) {ink\myfisrtchar} ;%
+ \foreach \i [count=\Y,evaluate=\Y as \Z using {int(\Y+1)}] in {2,...,\mynbofchars}{%
+ \StrChar{#3}{\i}[\mytmpchar]%
+ \IfStrEq{\mytmpchar}{ }%
+ {%
+ \edef\temp{\noexpand\pic[bezier bounding box,right=2mm of box\Y,local bounding box=box\Z,scale={\tkzbrushscale},#2] {inkspace};}
+ \temp%
+ }%
+ {%
+ \edef\temp{\noexpand\pic[bezier bounding box,right=2mm of box\Y,local bounding box=box\Z,scale={\tkzbrushscale},#2] {ink\mytmpchar};}
+ \temp%
+ }%
+ }%
+ \end{tikzpicture}%
+}
+
+
+%====PixlArt Words
+\def\lsteightbittikzA{0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1}%7C*5L
+\def\lsteightbittikzB{1,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,1,1,1,0}%7C*5L
+\def\lsteightbittikzC{0,1,1,1,0,1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzD{1,1,1,0,0,1,0,0,1,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,1,0,1,1,1,0,0}
+\def\lsteightbittikzE{1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1}
+\def\lsteightbittikzF{1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0}
+\def\lsteightbittikzG{0,1,1,1,0,1,0,0,0,1,1,0,0,0,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzH{1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1}
+\def\lsteightbittikzI{1,1,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,1,1}
+\def\lsteightbittikzJ{0,0,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,1,0,0,1,0,0,1,1,0,0}
+\def\lsteightbittikzK{1,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1}
+\def\lsteightbittikzL{1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1}
+\def\lsteightbittikzM{1,0,0,0,1,1,1,0,1,1,1,0,1,0,1,1,0,1,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1}
+\def\lsteightbittikzN{1,0,0,0,1,1,0,0,0,1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,0,1}
+\def\lsteightbittikzO{0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzP{1,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,1,1,1,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0}
+\def\lsteightbittikzQ{0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,1,0,1,1,0,0,1,0,0,1,1,0,1}
+\def\lsteightbittikzR{1,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,1,1,1,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1}
+\def\lsteightbittikzS{0,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,1,1,1,0}
+\def\lsteightbittikzT{1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0}
+\def\lsteightbittikzU{1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzV{1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0}
+\def\lsteightbittikzW{1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0}
+\def\lsteightbittikzX{1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,1,0,0,0,1}
+\def\lsteightbittikzY{1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0}
+\def\lsteightbittikzZ{1,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,1,1}
+\def\lsteightbittikza{0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,1,1}
+\def\lsteightbittikzaaccent{0,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,1,1}
+\def\lsteightbittikzaaigu{0,1,0,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,0,0,0,1,0,1,1,1,1}
+\def\lsteightbittikzb{1,0,0,0,0,1,0,0,0,0,1,0,1,1,0,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,1,0}
+\def\lsteightbittikzc{0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzd{0,0,0,0,1,0,0,0,0,1,0,1,1,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,1}
+\def\lsteightbittikze{0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0}
+\def\lsteightbittikzeaccent{0,1,1,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0}
+\def\lsteightbittikzeaigu{0,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0}
+\def\lsteightbittikzf{0,0,1,1,0,0,1,0,0,1,0,1,0,0,0,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0}
+\def\lsteightbittikzg{0,0,0,0,0,0,1,1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzh{1,0,0,0,0,1,0,0,0,0,1,0,1,1,0,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1}
+\def\lsteightbittikzi{0,1,0,0,0,0,1,1,0,0,1,0,0,1,0,0,1,0,1,1,1}
+\def\lsteightbittikziaccent{1,1,1,0,0,0,1,1,0,0,1,0,0,1,0,0,1,0,1,1,1}
+\def\lsteightbittikziaigu{1,0,1,0,0,0,1,1,0,0,1,0,0,1,0,0,1,0,1,1,1}
+\def\lsteightbittikzj{0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,1,0,0,0,1,1,0,0,1,0,1,1,0}
+\def\lsteightbittikzk{1,0,0,0,1,0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,0,1,0,1,0,0,1}
+\def\lsteightbittikzl{1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,1,1}
+\def\lsteightbittikzm{0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,1,0,1,0,1,1,0,1,0,1,1,0,0,0,1,1,0,0,0,1}
+\def\lsteightbittikzn{0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1}
+\def\lsteightbittikzo{0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzp{0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,0,0,0,1,1,1,1,1,0,1,0,0,0,0,1,0,0,0,0}
+\def\lsteightbittikzq{0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,1,1,0,0,0,0,1,0,0,0,0,1}
+\def\lsteightbittikzr{0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,1,0,0,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0}
+\def\lsteightbittikzs{0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1,0}
+\def\lsteightbittikzt{0,1,0,0,0,0,1,0,0,0,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,1,1,0}
+\def\lsteightbittikzu{0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,1,1,0,1,1,0,1}
+\def\lsteightbittikzv{0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,0}
+\def\lsteightbittikzw{0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,1,1,0}
+\def\lsteightbittikzx{0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1}
+\def\lsteightbittikzy{0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzz{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,1}
+\def\lsteightbittikzzero{0,1,1,1,0,1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzun{0,1,0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,1,1}
+\def\lsteightbittikzdeux{0,1,1,1,0,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,1}
+\def\lsteightbittikztrois{1,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzquatre{0,0,0,1,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1,0,1,1,1,1,1,0,0,0,1,0,0,0,0,1,0}
+\def\lsteightbittikzcinq{1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzsix{0,0,1,1,0,0,1,0,0,0,1,0,0,0,0,1,1,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzsept{1,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0}
+\def\lsteightbittikzhuit{0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0}
+\def\lsteightbittikzneuf{0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,1,0,0}
+\def\lsteightbittikzapostr{1,1,0,1,1,0,0,0,0,0,0,0,0}
+\def\lsteightbittikzparg{0,0,1,0,1,0,1,0,0,1,0,0,1,0,0,0,1,0,0,0,1}
+\def\lsteightbittikzpard{1,0,0,0,1,0,0,0,1,0,0,1,0,0,1,0,1,0,1,0,0}
+\def\lsteightbittikzfois{0,0,0,0,0,0,0,1,0,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0}
+\def\lsteightbittikzplus{0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0}
+\def\lsteightbittikzvirgule{0,0,0,0,0,0,0,0,1,1,0,1,1,0}
+\def\lsteightbittikzmoins{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
+\def\lsteightbittikzpoint{0,0,0,0,0,0,0,0,0,0,1,1,1,1}
+\def\lsteightbittikzslash{0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0}
+\def\lsteightbittikzdeuxpoints{0,0,1,1,1,1,0,0,1,1,1,1,0,0}
+\def\lsteightbittikzpointvirg{0,0,1,1,1,1,0,0,1,1,0,1,1,0}
+\def\lsteightbittikzinf{0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0}
+\def\lsteightbittikzeggal{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0}
+\def\lsteightbittikzsup{1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0}
+\def\lsteightbittikzinterro{0,1,1,1,0,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0}
+\def\lsteightbittikzexcla{1,1,1,1,1,0,1}
+\def\lsteightbittikzcrog{1,1,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,1,1}
+\def\lsteightbittikzgrod{1,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,1,1,1}
+\def\lsteightbittikzbarre{1,1,1,1,1,1,1}
+\def\lsteightbittikzspace{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
+
+\newlength{\eightbitpartthick}
+\newlength{\eightbitpartheight}
+\newlength{\eightbitpartunit}
+\setlength{\eightbitpartthick}{0.1mm}
+\setlength{\eightbitpartheight}{11mm}
+\setlength{\eightbitpartunit}{1mm}
+
+\defKV[eightbitpart]{%
+ %unit=\def\eightbitpartunit{#1},%
+ height=\setlength{\eightbitpartheight}{#1},%
+ thick=\setlength{\eightbitpartthick}{#1},%
+ color=\def\eightbitpartcolor{#1},%
+ gridcolor=\def\eightbitpartgridcolor{#1},%
+ offseth=\def\eightbitpartoffseth{#1},%
+ offsetv=\def\eightbitpartoffsetv{#1}%
+}
+
+\setKVdefault[eightbitpart]{%
+ height=11mm,%
+ thick=0.1mm,%
+ color=black,%
+ gridcolor=gray,
+ offseth=1,%
+ offsetv=2,%
+ gridafter=false,%
+ nospaceafter=false,%
+ border=false
+}
+
+\NewDocumentCommand\tkzpixletter{ }{%
+ \begingroup
+ \catcode`\;=12
+ \catcode`\:=12
+ \catcode`\!=12
+ \catcode`\?=12
+ \PixlLetterAux
+}
+
+\NewDocumentCommand\PixlLetterAux{ O{} D<>{} m }{%
+ \endgroup
+ \restoreKV[eightbitpart]%
+ \setKV[eightbitpart]{#1}%
+ \xdef\tmplarg{5}%
+ %MAJUSCULE
+ \IfStrEq{#3}{A}{\xdef\TMPLIST{\lsteightbittikzA}}{}%
+ \IfStrEq{#3}{B}{\xdef\TMPLIST{\lsteightbittikzB}}{}%
+ \IfStrEq{#3}{C}{\xdef\TMPLIST{\lsteightbittikzC}}{}%
+ \IfStrEq{#3}{D}{\xdef\TMPLIST{\lsteightbittikzD}}{}%
+ \IfStrEq{#3}{E}{\xdef\TMPLIST{\lsteightbittikzE}}{}%
+ \IfStrEq{#3}{F}{\xdef\TMPLIST{\lsteightbittikzF}}{}%
+ \IfStrEq{#3}{G}{\xdef\TMPLIST{\lsteightbittikzG}}{}%
+ \IfStrEq{#3}{H}{\xdef\TMPLIST{\lsteightbittikzH}}{}%
+ \IfStrEq{#3}{I}{\xdef\TMPLIST{\lsteightbittikzI}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{J}{\xdef\TMPLIST{\lsteightbittikzJ}}{}%
+ \IfStrEq{#3}{K}{\xdef\TMPLIST{\lsteightbittikzK}}{}%
+ \IfStrEq{#3}{L}{\xdef\TMPLIST{\lsteightbittikzL}}{}%
+ \IfStrEq{#3}{M}{\xdef\TMPLIST{\lsteightbittikzM}}{}%
+ \IfStrEq{#3}{N}{\xdef\TMPLIST{\lsteightbittikzN}}{}%
+ \IfStrEq{#3}{O}{\xdef\TMPLIST{\lsteightbittikzO}}{}%
+ \IfStrEq{#3}{P}{\xdef\TMPLIST{\lsteightbittikzP}}{}%
+ \IfStrEq{#3}{Q}{\xdef\TMPLIST{\lsteightbittikzQ}}{}%
+ \IfStrEq{#3}{R}{\xdef\TMPLIST{\lsteightbittikzR}}{}%
+ \IfStrEq{#3}{S}{\xdef\TMPLIST{\lsteightbittikzS}}{}%
+ \IfStrEq{#3}{T}{\xdef\TMPLIST{\lsteightbittikzT}}{}%
+ \IfStrEq{#3}{U}{\xdef\TMPLIST{\lsteightbittikzU}}{}%
+ \IfStrEq{#3}{V}{\xdef\TMPLIST{\lsteightbittikzV}}{}%
+ \IfStrEq{#3}{W}{\xdef\TMPLIST{\lsteightbittikzW}}{}%
+ \IfStrEq{#3}{X}{\xdef\TMPLIST{\lsteightbittikzX}}{}%
+ \IfStrEq{#3}{Y}{\xdef\TMPLIST{\lsteightbittikzY}}{}%
+ \IfStrEq{#3}{Z}{\xdef\TMPLIST{\lsteightbittikzZ}}{}%
+ %minuscule
+ \IfStrEq{#3}{a}{\xdef\TMPLIST{\lsteightbittikza}}{}%
+ \IfStrEq{#3}{à}{\xdef\TMPLIST{\lsteightbittikzaaccent}}{}%
+ \IfStrEq{#3}{ä}{\xdef\TMPLIST{\lsteightbittikzaaigu}}{}%
+ \IfStrEq{#3}{b}{\xdef\TMPLIST{\lsteightbittikzb}}{}%
+ \IfStrEq{#3}{c}{\xdef\TMPLIST{\lsteightbittikzc}}{}%
+ \IfStrEq{#3}{d}{\xdef\TMPLIST{\lsteightbittikzd}}{}%
+ \IfStrEq{#3}{e}{\xdef\TMPLIST{\lsteightbittikze}}{}%
+ \IfStrEq{#3}{é}{\xdef\TMPLIST{\lsteightbittikzeaccent}}{}%
+ \IfStrEq{#3}{è}{\xdef\TMPLIST{\lsteightbittikzeaccent}}{}%
+ \IfStrEq{#3}{ê}{\xdef\TMPLIST{\lsteightbittikzeaccent}}{}%
+ \IfStrEq{#3}{ë}{\xdef\TMPLIST{\lsteightbittikzeaigu}}{}%
+ \IfStrEq{#3}{f}{\xdef\TMPLIST{\lsteightbittikzf}}{}%
+ \IfStrEq{#3}{g}{\xdef\TMPLIST{\lsteightbittikzg}}{}%
+ \IfStrEq{#3}{h}{\xdef\TMPLIST{\lsteightbittikzh}}{}%
+ \IfStrEq{#3}{i}{\xdef\TMPLIST{\lsteightbittikzi}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{î}{\xdef\TMPLIST{\lsteightbittikziaccent}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{ï}{\xdef\TMPLIST{\lsteightbittikziaigu}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{j}{\xdef\TMPLIST{\lsteightbittikzj}\xdef\tmplarg{4}}{}%
+ \IfStrEq{#3}{k}{\xdef\TMPLIST{\lsteightbittikzk}\xdef\tmplarg{4}}{}%
+ \IfStrEq{#3}{l}{\xdef\TMPLIST{\lsteightbittikzl}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{m}{\xdef\TMPLIST{\lsteightbittikzm}}{}%
+ \IfStrEq{#3}{n}{\xdef\TMPLIST{\lsteightbittikzn}}{}%
+ \IfStrEq{#3}{o}{\xdef\TMPLIST{\lsteightbittikzo}}{}%
+ \IfStrEq{#3}{p}{\xdef\TMPLIST{\lsteightbittikzp}}{}%
+ \IfStrEq{#3}{q}{\xdef\TMPLIST{\lsteightbittikzq}}{}%
+ \IfStrEq{#3}{r}{\xdef\TMPLIST{\lsteightbittikzr}}{}%
+ \IfStrEq{#3}{s}{\xdef\TMPLIST{\lsteightbittikzs}}{}%
+ \IfStrEq{#3}{t}{\xdef\TMPLIST{\lsteightbittikzt}}{}%
+ \IfStrEq{#3}{u}{\xdef\TMPLIST{\lsteightbittikzu}}{}%
+ \IfStrEq{#3}{v}{\xdef\TMPLIST{\lsteightbittikzv}}{}%
+ \IfStrEq{#3}{w}{\xdef\TMPLIST{\lsteightbittikzw}}{}%
+ \IfStrEq{#3}{x}{\xdef\TMPLIST{\lsteightbittikzx}}{}%
+ \IfStrEq{#3}{y}{\xdef\TMPLIST{\lsteightbittikzy}}{}%
+ \IfStrEq{#3}{z}{\xdef\TMPLIST{\lsteightbittikzz}}{}%
+ %chiffres
+ \IfStrEq{#3}{0}{\xdef\TMPLIST{\lsteightbittikzzero}}{}%
+ \IfStrEq{#3}{1}{\xdef\TMPLIST{\lsteightbittikzun}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{2}{\xdef\TMPLIST{\lsteightbittikzdeux}}{}%
+ \IfStrEq{#3}{3}{\xdef\TMPLIST{\lsteightbittikztrois}}{}%
+ \IfStrEq{#3}{4}{\xdef\TMPLIST{\lsteightbittikzquatre}}{}%
+ \IfStrEq{#3}{5}{\xdef\TMPLIST{\lsteightbittikzcinq}}{}%
+ \IfStrEq{#3}{6}{\xdef\TMPLIST{\lsteightbittikzsix}}{}%
+ \IfStrEq{#3}{7}{\xdef\TMPLIST{\lsteightbittikzsept}}{}%
+ \IfStrEq{#3}{8}{\xdef\TMPLIST{\lsteightbittikzhuit}}{}%
+ \IfStrEq{#3}{9}{\xdef\TMPLIST{\lsteightbittikzneuf}}{}%
+ %ponctuation
+ \IfStrEq{#3}{'}{\xdef\TMPLIST{\lsteightbittikzapostr}\xdef\tmplarg{2}}{}%
+ \IfStrEq{#3}{(}{\xdef\TMPLIST{\lsteightbittikzparg}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{)}{\xdef\TMPLIST{\lsteightbittikzpard}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{*}{\xdef\TMPLIST{\lsteightbittikzfois}}{}%
+ \IfStrEq{#3}{+}{\xdef\TMPLIST{\lsteightbittikzplus}}{}%
+ \IfStrEq{#3}{,}{\xdef\TMPLIST{\lsteightbittikzvirgule}\xdef\tmplarg{2}}{}%
+ \IfStrEq{#3}{-}{\xdef\TMPLIST{\lsteightbittikzmoins}}{}%
+ \IfStrEq{#3}{.}{\xdef\TMPLIST{\lsteightbittikzpoint}\xdef\tmplarg{2}}{}%
+ \IfStrEq{#3}{/}{\xdef\TMPLIST{\lsteightbittikzslash}}{}%
+ \IfStrEq{#3}{:}{\xdef\TMPLIST{\lsteightbittikzdeuxpoints}\xdef\tmplarg{2}}{}%
+ \IfStrEq{#3}{;}{\xdef\TMPLIST{\lsteightbittikzpointvirg}\xdef\tmplarg{2}}{}%
+ \IfStrEq{#3}{<}{\xdef\TMPLIST{\lsteightbittikzinf}}{}%
+ \IfStrEq{#3}{=}{\xdef\TMPLIST{\lsteightbittikzeggal}}{}%
+ \IfStrEq{#3}{>}{\xdef\TMPLIST{\lsteightbittikzsup}}{}%
+ \IfStrEq{#3}{?}{\xdef\TMPLIST{\lsteightbittikzinterro}}{}%
+ \IfStrEq{#3}{!}{\xdef\TMPLIST{\lsteightbittikzexcla}\xdef\tmplarg{1}}{}%
+ \IfStrEq{#3}{[}{\xdef\TMPLIST{\lsteightbittikzcrog}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{]}{\xdef\TMPLIST{\lsteightbittikzgrod}\xdef\tmplarg{3}}{}%
+ \IfStrEq{#3}{|}{\xdef\TMPLIST{\lsteightbittikzbarre}\xdef\tmplarg{1}}{}%
+ \IfStrEq{#3}{ }{\xdef\TMPLIST{\lsteightbittikzspace}\xdef\tmplarg{3}}{}%
+ %la case !
+ \xdef\tmpnumbercasesv{\inteval{7+2*\eightbitpartoffsetv}}%
+ \pgfmathsetlength{\eightbitpartunit}{\eightbitpartheight/\tmpnumbercasesv}%
+ %tikzpicture
+ \begin{tikzpicture}[line cap=rect,x=\eightbitpartunit,y=\eightbitpartunit,line width=\eightbitpartthick,#2]
+ %clipping ?
+ %\clip ([shift={(-0.5\eightbitpartthick,-0.5\eightbitpartthick)}]{-\eightbitpartoffseth},{-\eightbitpartoffsetv}) rectangle ([shift={(0.5\eightbitpartthick,0.5\eightbitpartthick)}]{\tmplarg+\eightbitpartoffseth},{7+\eightbitpartoffsetv}) ;
+ %gridbefore
+ \ifboolKV[eightbitpart]{gridafter}%
+ {}%
+ {%
+ \foreach \x in {-\eightbitpartoffseth,...,\numexpr\tmplarg+\eightbitpartoffseth\relax}
+ {%
+ \draw[line width=\eightbitpartthick,\eightbitpartgridcolor] (\x,{-\eightbitpartoffsetv}) --++ (0,{7+2*\eightbitpartoffsetv}) ;
+ }%
+ \foreach \y in {-\eightbitpartoffsetv,...,\numexpr7+\eightbitpartoffseth+\eightbitpartoffseth\relax}
+ {%
+ \draw[line width=\eightbitpartthick,\eightbitpartgridcolor] ({-\eightbitpartoffseth},\y) --++ ({\tmplarg+2*\eightbitpartoffseth},0) ;
+ }%
+ }%
+ \ifnum\tmplarg=1%
+ \foreach \i [count=\j] in \TMPLIST {%
+ \ifnum\i=1%
+ \fill[\eightbitpartcolor] (0,{7-\j}) rectangle++ (1,1) ;
+ \fi%
+ }%
+ \fi%
+ \ifnum\tmplarg=2%
+ \foreach \i [count=\j] in \TMPLIST {%
+ \ifnum\i=1%
+ \xintifboolexpr{ \xintiiOdd{\j} == 1 }%
+ {%si c'est impair
+ \xdef\tmpX{0}%
+ \xdef\tmpY{\xintieval{(\j-1)/2}}%
+ }%
+ {%si c'est pair
+ \xdef\tmpX{1}%
+ \xdef\tmpY{\xintieval{(\j)/2-1}}%
+ }%
+ \fill[\eightbitpartcolor] ({\tmpX},{6-\tmpY}) rectangle++ (1,1) ;
+ \fi%
+ }%
+ \fi%
+ \ifnum\tmplarg>2%
+ \foreach \i [count=\j] in \TMPLIST {%
+ \ifnum\i=1%
+ \xdef\tmpX{\xintiiRem{\j-1}{\tmplarg}}%
+ \xdef\tmpY{\xintiiQuo{\j-1}{\tmplarg}}%
+ \fill[\eightbitpartcolor] ({\tmpX},{6-\tmpY}) rectangle++ (1,1) ;
+ \fi%
+ }%
+ \fi%
+ %gridafter
+ \ifboolKV[eightbitpart]{gridafter}%
+ {%
+ \foreach \x in {-\eightbitpartoffseth,...,\numexpr\tmplarg+\eightbitpartoffseth\relax}
+ {%
+ \draw[line width=\eightbitpartthick,\eightbitpartgridcolor] (\x,{-\eightbitpartoffsetv}) --++ (0,{7+2*\eightbitpartoffsetv}) ;
+ }%
+ \foreach \y in {-\eightbitpartoffsetv,...,\numexpr7+\eightbitpartoffseth+\eightbitpartoffseth\relax}
+ {%
+ \draw[line width=\eightbitpartthick,\eightbitpartgridcolor] ({-\eightbitpartoffseth},\y) --++ ({\tmplarg+2*\eightbitpartoffseth},0) ;
+ }%
+ }%
+ {}%
+ \end{tikzpicture}%
+ \ifboolKV[eightbitpart]{nospaceafter}{\hspace*{-\eightbitpartthick}}{}%
+}
+
+\NewDocumentCommand\tkzpixlquote{ O{} D<>{} }{%
+ \restoreKV[eightbitpart]%
+ \setKV[eightbitpart]{#1}%
+ \xdef\tmplarg{2}%
+ \xdef\tmpnumbercasesv{\inteval{7+2*\eightbitpartoffsetv}}%
+ \pgfmathsetlength{\eightbitpartunit}{\eightbitpartheight/\tmpnumbercasesv}%
+ \begin{tikzpicture}[line cap=rect,x=\eightbitpartunit,y=\eightbitpartunit,line width=\eightbitpartthick,#2]
+ %clipping ?
+ %\clip ({-\eightbitpartoffseth},{-\eightbitpartoffsetv}) rectangle ({\tmplarg+\eightbitpartoffseth},{7+\eightbitpartoffsetv}) ;
+ %gridbefore
+ \ifboolKV[eightbitpart]{gridafter}%
+ {}%
+ {%
+ \foreach \x in {-\eightbitpartoffseth,...,\numexpr\tmplarg+\eightbitpartoffseth\relax}
+ {%
+ \draw[line width=\eightbitpartthick,\eightbitpartgridcolor] (\x,{-\eightbitpartoffsetv}) --++ (0,{7+2*\eightbitpartoffsetv}) ;
+ }%
+ \foreach \y in {-\eightbitpartoffsetv,...,\numexpr7+\eightbitpartoffseth+\eightbitpartoffseth\relax}
+ {%
+ \draw[line width=\eightbitpartthick,\eightbitpartgridcolor] ({-\eightbitpartoffseth},\y) --++ ({\tmplarg+2*\eightbitpartoffseth},0) ;
+ }%
+ }%
+ \fill[\eightbitpartcolor] ({0},{6}) rectangle++ (1,1) ;
+ \fill[\eightbitpartcolor] ({1},{6}) rectangle++ (1,1) ;
+ \fill[\eightbitpartcolor] ({1},{5}) rectangle++ (1,1) ;
+ \fill[\eightbitpartcolor] ({0},{4}) rectangle++ (1,1) ;
+ %gridafter
+ \ifboolKV[eightbitpart]{gridafter}%
+ {%
+ \foreach \x in {-\eightbitpartoffseth,...,\numexpr\tmplarg+\eightbitpartoffseth\relax}
+ {%
+ \draw[line width=\eightbitpartthick,\eightbitpartgridcolor] (\x,{-\eightbitpartoffsetv}) --++ (0,{7+2*\eightbitpartoffsetv}) ;
+ }%
+ \foreach \y in {-\eightbitpartoffsetv,...,\numexpr7+\eightbitpartoffseth+\eightbitpartoffseth\relax}
+ {%
+ \draw[line width=\eightbitpartthick,\eightbitpartgridcolor] ({-\eightbitpartoffseth},\y) --++ ({\tmplarg+2*\eightbitpartoffseth},0) ;
+ }%
+ }%
+ {}%
+ \end{tikzpicture}%
+ \ifboolKV[eightbitpart]{nospaceafter}{\hspace*{-2\eightbitpartthick}}{}%
+}
+
+\NewDocumentCommand\tkzpixl{ }{%
+ \begingroup
+ \catcode`\;=12
+ \catcode`\:=12
+ \catcode`\!=12
+ \catcode`\?=12
+ \PixlLettersAux
+}
+
+\NewDocumentCommand\PixlLettersAux{ O{} D<>{} m }{%
+ \endgroup
+ \setKV[eightbitpart]{#1}%
+ \StrLen{#3}[\tmpnbcaract]%
+ \ifboolKV[eightbitpart]{border}%
+ {%
+ \setlength{\fboxrule}{1.75\eightbitpartthick}%
+ \setlength{\fboxsep}{-\eightbitpartthick}%
+ \fbox{%
+ \foreach \i in {1,...,\tmpnbcaract}{%
+ \StrChar{#3}{\i}[\tmpcaract]%
+ \tkzpixletter[#1]<#2>{\tmpcaract}%
+ \ifnum\i<\tmpnbcaract\hspace*{-\eightbitpartthick}\fi%
+ }%
+ }%
+ \ifboolKV[eightbitpart]{nospaceafter}{\hspace*{-\eightbitpartthick}}{}%
+ \fboxrule=0.4pt%
+ \fboxsep=3.0pt%
+ }%
+ {%
+ \foreach \i in {1,...,\tmpnbcaract}{%
+ \StrChar{#3}{\i}[\tmpcaract]%
+ \tkzpixletter[#1]<#2>{\tmpcaract}%
+ \ifnum\i<\tmpnbcaract\hspace*{-\eightbitpartthick}\fi%
+ \ifboolKV[eightbitpart]{nospaceafter}{\hspace*{-\eightbitpartthick}}{}%
+ }%
+ }%
+}
+
+%====BICOLORTXT
+\defKV[bicolortxt]{colors=\def\bicolortxtcols{#1},style=\def\bicolortxtsttyle{#1},intdelta=\def\bicolortxtdelta{#1},paralcolors=\def\bicolortxtcolstrapez{#1}}
+\setKVdefault[bicolortxt]{colors={red/blue},style=midh,intdelta=0.66,paralcolors={red/blue/orange/gray}}
+
+\NewDocumentCommand\tkzbicolor{ O{} m }{%
+ \restoreKV[bicolortxt]%
+ \setKV[bicolortxt]{#1}%
+ \IfStrEq{\bicolortxtsttyle}{paral}%
+ {%
+ \setsepchar[.]{/}%
+ \readlist*\bicolortrapez{\bicolortxtcolstrapez}%
+ }%
+ {%
+ \StrCut{\bicolortxtcols}{/}{\bicolorabove}{\bicolorbelow}%
+ }%
+ \tikz[baseline=(l.base),inner sep=0pt,outer sep=0pt]{%
+ \node[inner sep=0pt,outer sep=0pt](l){\phantom{#2}};
+ \coordinate (lnw) at ([shift={(-0.5\pgflinewidth,0.5\pgflinewidth)}]l.north west) ;
+ \coordinate (ln) at ([shift={(0,0.5\pgflinewidth)}]l.north) ;
+ \coordinate (lne) at ([shift={(0.5\pgflinewidth,0.5\pgflinewidth)}]l.north east) ;
+ \coordinate (le) at ([shift={(0.5\pgflinewidth,0)}]l.east) ;
+ \coordinate (lse) at ([shift={(0.5\pgflinewidth,-0.5\pgflinewidth)}]l.south east) ;
+ \coordinate (ls) at ([shift={(0,-0.5\pgflinewidth)}]l.south) ;
+ \coordinate (lsw) at ([shift={(-0.5\pgflinewidth,-0.5\pgflinewidth)}]l.south west) ;
+ \coordinate (lw) at ([shift={(-0.5\pgflinewidth,0)}]l.west) ;
+ \IfStrEqCase{\bicolortxtsttyle}{%
+ {ellips}%
+ {%
+ \coordinate (lcircn) at ($(l.center)!\bicolortxtdelta!(l.north)$) ;
+ \coordinate (lcirce) at ($(l.center)!\bicolortxtdelta!(l.east)$) ;
+ }%
+ {rect}%
+ {%
+ \coordinate (lrectnw) at ($(l.center)!\bicolortxtdelta!(l.north west)$) ;
+ \coordinate (lrectse) at ($(l.center)!\bicolortxtdelta!(l.south east)$) ;
+ }%
+ {paral}%
+ {%
+ \coordinate (ltrapna) at ($(l.north west)!0.333!(l.north east)$) ;
+ \coordinate (ltrapnb) at ($(l.north west)!0.666!(l.north east)$) ;
+ \coordinate (ltrapsa) at ($(l.south west)!0.333!(l.south east)$) ;
+ \coordinate (ltrapsb) at ($(l.south west)!0.666!(l.south east)$) ;
+ }%
+ }%
+ \begin{scope}
+ \IfStrEqCase{\bicolortxtsttyle}{%
+ {midh}{\clip(ls)rectangle(lnw);\node[\bicolorabove]at(l){#2};}%
+ {midv}{\clip(lnw)rectangle(le);\node[\bicolorabove]at(l){#2};}%
+ {ndiag}{\clip(lnw)--(lne)--(lse)--cycle;\node[\bicolorabove]at(l){#2};}%
+ {sdiag}{\clip(lsw)--(lnw)--(lne)--cycle;\node[\bicolorabove]at(l){#2};}%
+ {ellips}{\clip(lsw)rectangle(lne);\node[\bicolorabove]at(l){#2};}%
+ {rect}{\clip(lsw)rectangle(lne);\node[\bicolorabove]at(l){#2};}%
+ {paral}{\clip(lsw)--(lnw)--(ltrapna)--cycle;\node[{\bicolortrapez[1]}]at(l){#2};}%
+ }%
+ \end{scope}
+ \begin{scope}
+ \IfStrEqCase{\bicolortxtsttyle}{%
+ {midh}{\clip(ls)rectangle(lne);\node[\bicolorbelow]at(l){#2};}%
+ {midv}{\clip(lsw)rectangle(le);\node[\bicolorbelow]at(l){#2};}%
+ {ndiag}{\clip(lsw)--(lnw)--(lse)--cycle;\node[\bicolorbelow]at(l){#2};}%
+ {sdiag}{\clip(lsw)--(lne)--(lse)--cycle;\node[\bicolorbelow]at(l){#2};}%
+ {ellips}{\clip(lsw)rectangle(lne);\pgfpathellipse{\pgfpointanchor{l}{center}}{\pgfpointanchor{lcirce}{center}}{\pgfpointanchor{lcircn}{center}}\pgfusepath{clip}\node[\bicolorbelow]at(l){#2};}%
+ {rect}{\clip(lrectnw)rectangle(lrectse);\node[\bicolorbelow]at(l){#2};}%
+ {paral}{\clip(lsw)--(ltrapna)--(ltrapnb)--(ltrapsa)--cycle;\node[{\bicolortrapez[2]}]at(l){#2};}%
+ }%
+ \end{scope}
+ \IfStrEq{\bicolortxtsttyle}{paral}%
+ {%
+ \begin{scope}%3
+ \clip(ltrapsa)--(ltrapnb)--(lne)--(ltrapsb)--cycle;\node[{\bicolortrapez[3]}]at(l){#2};
+ \end{scope}
+ \begin{scope}%
+ \clip(ltrapsb)--(lne)--(lse)--cycle;\node[{\bicolortrapez[4]}]at(l){#2};
+ \end{scope}
+ }%
+ {}%
+ }%
+}
+
+%===CALLOUT
+\newlength\comicbubblelgt
+\defKV[comicbubble]{width=\setlength\comicbubblelgt{#1},coltxt=\def\comicbubblecolfont{#1},colbg=\def\comicbubblecolgb{#1},colframe=\def\comicbubblecolframe{#1},pospointer=\def\comicbubblepospointer{#1},font=\def\comicbubblefont{#1}}
+\setKVdefault[comicbubble]{width=4cm,coltxt=black,colbg={},colframe=black,pospointer=(-150:0.75),font={},rcorners=false}
+
+\tikzset{comicbubble/.style args={#1#2}{inner sep=1mm,line join=round,rectangle callout,draw,very thick,text width=#1,align=flush center,callout relative pointer=#2}}
+
+\NewDocumentCommand\tkzcomicbubble{ s O{} D<>{} m }{%
+ \restoreKV[comicbubble]%
+ \setKV[comicbubble]{#2}%
+ \ifboolKV[comicbubble]{rcorners}%
+ {%
+ \tikzset{comicbubble/.append style={rounded corners}}%
+ }%
+ {}%
+ \IfEq{\comicbubblecolgb}{}%
+ {%
+ \tikzset{comicbubblebg/.style={}}%
+ }%
+ {%
+ \tikzset{comicbubblebg/.style={fill=\comicbubblecolgb}}%
+ }%
+ \IfBooleanTF{#1}%independant macro
+ {%
+ \node[comicbubble={\comicbubblelgt}{\comicbubblepospointer},comicbubblebg,text=\comicbubblecolfont,font=\comicbubblefont,#3]{#4}%
+ }%
+ {%
+ {\tikz\node[comicbubble={\comicbubblelgt}{\comicbubblepospointer},comicbubblebg,text=\comicbubblecolfont,font=\comicbubblefont,#3]{#4};}%
+ }%
+}
+
+\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz-triminos/README.md b/graphics/pgf/contrib/tikz-triminos/README.md
new file mode 100644
index 0000000000..7a28aaaf39
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-triminos/README.md
@@ -0,0 +1,6 @@
+This package provides a macro to obtain triminos, made with TikZ.
+-----------------------------------------------------------------
+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
+Inspiration....: https://schule.paul-matthies.de/Trimino.php (CC BY-NC-SA 4.0) \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz-triminos/doc/tikz-triminos-doc.pdf b/graphics/pgf/contrib/tikz-triminos/doc/tikz-triminos-doc.pdf
new file mode 100644
index 0000000000..e67e2d262b
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-triminos/doc/tikz-triminos-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikz-triminos/doc/tikz-triminos-doc.tex b/graphics/pgf/contrib/tikz-triminos/doc/tikz-triminos-doc.tex
new file mode 100644
index 0000000000..5fb0ae2e13
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-triminos/doc/tikz-triminos-doc.tex
@@ -0,0 +1,368 @@
+% !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{amsmath}
+\usepackage{kpfonts}
+\usepackage{inconsolata}
+\usepackage[T1]{fontenc}
+\usepackage[scale=0.875]{cabin}
+\usepackage{tikz-triminos}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{tabularray}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [tikz-triminos]}
+\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{20/01/2025}
+\usepackage{tcolorbox}
+\tcbuselibrary{breakable,skins,hooks,listingsutf8}
+
+\lstset{
+ language=[LaTeX]TeX,%
+ basicstyle=\ttfamily,%
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={tkz-triminos},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\tkztriminos},%
+ 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,\tikzset,\readlist,\showitems,\xintFor,\xintSeq},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={tikz-triminos},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\tkztriminos},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={size,font,decocolor,decoration,showtxtlogo,showiconlogo,bgcolor,txtlogo,iconlogo,scaledeco,fontdeco},%
+ 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{tikz-triminos}}\\
+ \\
+ {\LARGE Single or several TriMinos,} \\
+ {\LARGE made with Ti\textit{k}Z\ldots} \\
+ \\
+ {\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://forge.apps.education.fr/pierquetcedric/packages-latex}} \\
+ \end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
+%single TriMino
+\tkztriminos{One § Two § \faHatWizard}~~\tkztriminos{\faHatWizard § Three § Two}
+\end{tcblisting}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\hfill\tkztriminos<scale=0.85,transform shape>{One § Two § \faHatWizard}~~\tkztriminos<scale=0.85,transform shape>{\faHatWizard § Three § Two}\hfill~
+\end{tcolorbox}
+
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
+%multiple TriMino (9 or 12)
+\tkztriminos[keys]<tikz options>{list of values}
+\end{tcblisting}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\hfill\tkztriminos%
+[size=5cm,showiconlogo,bgcolor=teal!15,font=\large,iconlogo={\scalebox{3}[3]{\textcolor{orange}{\faBahai}}},decocolor=orange]%
+<scale=0.5,rotate=90,transform shape>%
+{%
+ $1+1$ § $2$ §
+ $2+2$ § $4$ §
+ $3+3$ § ${6}$ §
+ {$x_{1}=\frac{-3-\sqrt{41}}{6}$ ; $x_{2}=\frac{-3+\sqrt{41}}{6}$} § $9x^{2}+9x-8$ §
+ $5+5$ § $10$ §
+ ${6}+6$ § $12$ §
+ $7+7$ § $14$ §
+ $8+8$ § $16$ §
+ ${9}+{9}$ § $18$ §
+ $10+10$ § $20$ §
+ $11+11$ § $22$ §
+ $12+12$ § $24$ §
+ $13+13$ § $26$ §
+ $14+14$ § $28$ §
+ $15+15$ § $30$ §
+ $16+16$ § $32$ §
+ $17+17$ § $34$ §
+ $18+18$ § $36$
+}\hfill~
+\end{tcolorbox}
+
+\vfill~
+
+\hrule
+
+\vspace*{2.5mm}
+
+\textit{Inspirations, with \texttt{CC\,BY-NC-SA\,4.0} license, come from \url{https://schule.paul-matthies.de/Trimino.php}}.
+
+\vspace*{2.5mm}
+
+\hrule
+
+\vspace*{2.5mm}
+
+{\tiny\itshape Yes, it's -- again -- a package "clearly too limited which simply aligns, linearly and without any real programmation, the high-level macros of the packages \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|tikz|, \texttt{listofitems}, \texttt{xstring}, \texttt{settobox} and \texttt{simplekv}". But if you don't want to use it, it's easy\ldots don't load it ! If you want to take ownership of the package, with better programming, it's easy too\ldots just ask !}
+
+\vspace*{2.5mm}
+
+\hrule
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+%\hrule
+
+\pagebreak
+
+\section{Loading, useful packages, purposes and acknowledgments}
+
+\subsection{Loading and useful packages}
+
+In order to load \lstinline[language={[latex]TeX},basicstyle=\ttfamily]{tikz-triminos}, simply use:
+
+\begin{DemoCode}{listing only}
+\usepackage{tikz-triminos}
+\end{DemoCode}
+
+%Loaded packages are \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|tikz| (with librairies \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|calc| and \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|decorations text|), \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|ifthen|, \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|simplekv|, \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|listofitems|, \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|fontawesome5| and \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|settobox|.
+
+\subsection{Purposes and acknowledgments}
+
+The purposes of this small package is to provide simple tool to create \textsf{TriMinos} (1 or 9 or 12) with automatic positionning of texts.
+
+\smallskip
+
+\textit{Inspiration come from \url{https://schule.paul-matthies.de/Trimino.php} (CC BY-SA 4.0)}.
+
+\section{Usage}
+
+\subsection{Main macro}
+
+In order to create (single or multiple) \textsf{TriMinos}, simple use:
+
+\begin{DemoCode}{listing only}
+\tkztriminos[keys]<tikz options>{list of values}
+\end{DemoCode}
+
+For \texttt{list of values} argument (seperated with \texttt{§}):
+
+\begin{itemize}
+ \item 3 values can be given (so 1 \textsf{TriMino}) ;
+ \item 19 values can be given (so 9 \textsf{TriMinos}, with 5 \textit{jokers}) ;
+ \item 25 values can be given (so 12 \textsf{TriMinos}, with 10 \textit{jokers}) ;
+ \item 36 values can be given (so 12 full \textsf{TriMinos}).
+\end{itemize}
+
+Moreover:
+
+\begin{itemize}
+ \item if the text is too long for the \textsf{TriMino}, the code adjusts its width ;
+ \item icons of graphicx elements can be used ;
+ \item with \textit{jokers}, the final value is the \textit{joker}.
+\end{itemize}
+
+\begin{DemoCode}{}
+%default output
+\tkztriminos{value 1 § value 2 § a long long value 3}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{TikZ styles}
+
+Few \TikZ\ styles are available, and they can be modified.
+
+\begin{DemoCode}{listing only}
+%sides of TriMino
+\tikzset{tkztriminoside/.style={thick}}
+
+%labels (with \tkztriminofont given by key)
+\tikzset{tkztriminolabel/.style={font=\tkztriminofont,inner sep=1pt}}
+
+%decoration (with \tkztriminocolor given by key)
+\tikzset{tkztriminosidedeco/.style={semithick,draw=black,fill=\tkztriminocolor}}
+\end{DemoCode}
+
+\subsection{Keys}
+
+Available keys, to be given within \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|[...]| are:
+
+\begin{itemize}
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|size| := size of \textsf{TriMino}\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|5cm|)
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|font| := font for texts\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|\Large|)
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|decoration| :=boolean for showing the \textit{inner} decoration\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|true|)
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|decocolor| := color of the optional \textit{inner} decoration\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|lightgray|)
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|showtxtlogo| := boolean for showing optional circular logo text\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|false|)
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|txtlogo| := text for optional circular logo\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|TriMino~TriMino~TriMino~|)
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|fontdeco| := font for optional circular logo\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|\tiny\sffamily|)
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|showiconlogo| := boolean for showing optional graphic logo\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|false|)
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|iconlogo| := graphic element for center logo
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|bgcolor| := optional background color of \textsf{TriMino}
+ \item \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|scaledeco| :=scale for \textit{inner} decoration\hfill(default \lstinline[language={[latex]TeX},basicstyle=\ttfamily]|0.25|)
+\end{itemize}
+
+\pagebreak
+
+\section{Examples}
+
+\subsection{One TriMino}
+
+\begin{DemoCode}{}
+\tkztriminos%
+ [showiconlogo,size=4cm,bgcolor=yellow!15,decocolor=teal!75,font=\large]
+ {$(x+1)(x+2)$ § $x^2+2x+1$ § $(x-7)^2-4$}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\tkztriminos[showtxtlogo]{%
+ \faHatWizard\,--\,\faHatWizard\,--\,\faHatWizard
+ §
+ \faPython\,--\,\faPython\,--\,\faPython
+ §
+ \faTimes\,--\,\faTimes\,--\,\faTimes
+}
+\end{DemoCode}
+
+\subsection{Several TriMinos}
+
+\begin{DemoCode}{}
+\tkztriminos%
+ [size=5cm,showiconlogo,bgcolor=orange!15,font=\large,decocolor=purple,%
+ iconlogo={\scalebox{2.15}[2.15]{\textcolor{blue!75!black}{\faPuzzlePiece}}}]%
+ <scale=0.75,transform shape>%
+ {%
+ $1+1$ § $2$ §
+ $2+2$ § $4$ §
+ $3+3$ § $6$ §
+ {$x_{1}=\frac{-3-\sqrt{41}}{6}$ ; $x_{2}=\frac{-3+\sqrt{41}}{6}$} § $9x^{2}+9x-8$ §
+ $5+5$ § $10$ §
+ $6+6$ § $12$ §
+ $7+7$ § $14$ §
+ $8+8$ § $16$ §
+ $9+9$ § $18$ §
+ $10+10$ § $20$ §
+ $11+11$ § $22$ §
+ $12+12$ § $24$ §
+ Joker
+}
+\end{DemoCode}
+
+\pagebreak
+
+\begin{DemoCode}{}
+\tkztriminos%
+ [showiconlogo,iconlogo={\includegraphics[height=0.75cm]{pfl-checked}}]%
+ {1a§1b§2a§2b§3a§3b§4a§4b§5a§5b§6a§6b§7a§7b§8a§8b§9a§9b§joker}
+\end{DemoCode}
+
+\pagebreak
+
+\section{History}
+
+\texttt{0.1.0: Initial version}
+
+\end{document}
diff --git a/graphics/pgf/contrib/tikz-triminos/tex/tikz-triminos.sty b/graphics/pgf/contrib/tikz-triminos/tex/tikz-triminos.sty
new file mode 100644
index 0000000000..95e0c32836
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-triminos/tex/tikz-triminos.sty
@@ -0,0 +1,179 @@
+% Author : C. Pierquet
+% licences : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+% Inspiration.....: https://schule.paul-matthies.de/Trimino.php (CC BY-NC-SA 4.0)
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{tikz-triminos}[2025/01/20 0.1.0 triminos, made with TikZ]
+
+%------History
+% 0.1.0 Initial version
+
+%------Packages and library
+\RequirePackage{tikz}
+\usetikzlibrary{calc,decorations.text}
+\RequirePackage{xstring}
+\RequirePackage{fontawesome5}
+\RequirePackage{ifthen}
+\RequirePackage{settobox}
+\RequirePackage{simplekv}
+\RequirePackage{listofitems}
+
+%------tikz styles
+\tikzset{tkztriminoside/.style={thick}}
+\tikzset{tkztriminolabel/.style={font=\tkztriminofont,inner sep=1pt}}
+\tikzset{tkztriminosidedeco/.style={semithick,draw=black,fill=\tkztriminocolor}}
+
+%------lengths
+\newlength{\tkztriminotmpnode}
+\newlength{\tkztriminosize}
+\newsavebox{\tkztriminobox}
+
+%------keys
+\defKV[tkztrimino]{%
+ size=\setlength\tkztriminosize{#1},
+ font=\def\tkztriminofont{#1},
+ decocolor=\def\tkztriminocolor{#1},
+ bgcolor=\def\tkztriminobgcolor{#1},%
+ txtlogo=\def\tkztriminotxtlogo{#1},%
+ iconlogo=\def\tkztriminoiconlogo{#1},%
+ scaledeco=\def\tkztriminostar{#1},%
+ fontdeco=\def\tkztriminodecofont{#1}
+}
+\setKVdefault[tkztrimino]{%
+ size=5cm,%
+ font=\Large,%
+ decocolor=lightgray,%
+ decoration=true,%
+ showtxtlogo=false,%
+ showiconlogo=false,%
+ bgcolor={},%
+ txtlogo={TriMino~TriMino~TriMino~},%
+ iconlogo={\scalebox{2}[2]{\textcolor{darkgray}{\faBahai}}},%
+ scaledeco=0.25,%
+ fontdeco={\tiny\sffamily}
+}
+
+%------internal macro
+\NewDocumentCommand\inttrimino{ m m m }{%
+ \begin{scope}[shift={#1},rotate=#2,transform shape,line join=round]
+ \IfEq{\tkztriminobgcolor}{}%
+ {%
+ \draw[tkztriminoside] (0,0) --++ (60:{\tkztriminosize}) --++ (-60:{\tkztriminosize}) -- cycle ;
+ }%
+ {%
+ \draw[fill=\tkztriminobgcolor,tkztriminoside] (0,0) --++ (60:{\tkztriminosize}) --++ (-60:{\tkztriminosize}) -- cycle ;
+ }%
+ \ifboolKV[tkztrimino]{decoration}%
+ {%
+ \draw[tkztriminosidedeco] (0,0) --++ (60:{\tkztriminostar\tkztriminosize}) -- (30:{\tkztriminostaralt\tkztriminosize}) -- (0:{\tkztriminostar\tkztriminosize}) -- cycle ;
+ \begin{scope}[shift={(0:{\tkztriminosize})},rotate=120]
+ \fill[tkztriminosidedeco] (0,0) --++ (60:{\tkztriminostar\tkztriminosize}) -- (30:{\tkztriminostaralt\tkztriminosize}) -- (0:{\tkztriminostar\tkztriminosize}) -- cycle ;
+ \end{scope}
+ \begin{scope}[shift={(60:{\tkztriminosize})},rotate=-120]
+ \fill[tkztriminosidedeco] (0,0) --++ (60:{\tkztriminostar\tkztriminosize}) -- (30:{\tkztriminostaralt\tkztriminosize}) -- (0:{\tkztriminostar\tkztriminosize}) -- cycle ;
+ \end{scope}
+ }%
+ {}%
+ \ifboolKV[tkztrimino]{showtxtlogo}%
+ {%
+ \path[decorate,decoration={text along path,text={|\tkztriminodecofont|\tkztriminotxtlogo},text align=fit to path}] (30:{sqrt(3)/3*\tkztriminosize}) circle[radius=0.085\tkztriminosize];
+ }%
+ {}%
+ \ifboolKV[tkztrimino]{showiconlogo}%
+ {%
+ \draw (30:{sqrt(3)/3*\tkztriminosize}) node {\tkztriminoiconlogo};
+ }%
+ {}%
+ \foreach \tkztext [count=\i] in {#3}{
+ \ifnum\i=1
+ \sbox{\tkztriminobox}{\pgfinterruptpicture \tkztriminofont\tkztext\endpgfinterruptpicture}\settoboxwidth{\tkztriminotmpnode}{\tkztriminobox}
+ \ifthenelse{\lengthtest{\tkztriminotmpnode < \fpeval{1-2*\tkztriminostar}\tkztriminosize}}%
+ {%
+ \path (60:{\tkztriminosize}) -- (0,0) node[midway,sloped,above,tkztriminolabel,rotate=180] {\strut\tkztext} ;
+ }%
+ {%
+ \path (60:{\tkztriminosize}) -- (0,0) node[midway,sloped,above,tkztriminolabel,rotate=180] {\strut\resizebox{\fpeval{1-2*\tkztriminostar}\tkztriminosize}{!}{\tkztext}} ;
+ }%
+ \fi
+ \ifnum\i=2
+ \sbox{\tkztriminobox}{\pgfinterruptpicture \tkztriminofont\tkztext\endpgfinterruptpicture}\settoboxwidth{\tkztriminotmpnode}{\tkztriminobox}
+ \ifthenelse{\lengthtest{\tkztriminotmpnode < \fpeval{1-2*\tkztriminostar}\tkztriminosize}}%
+ {%
+ \path (0,0) -- ({\tkztriminosize},0) node[midway,sloped,above,tkztriminolabel] {\strut\tkztext} ;
+ }%
+ {%
+ \path (0,0) -- ({\tkztriminosize},0) node[midway,sloped,above,tkztriminolabel] {\strut\resizebox{\fpeval{1-2*\tkztriminostar}\tkztriminosize}{!}{\tkztext}} ;
+ }%
+ \fi
+ \ifnum\i=3
+ \sbox{\tkztriminobox}{\pgfinterruptpicture \tkztriminofont\tkztext\endpgfinterruptpicture}\settoboxwidth{\tkztriminotmpnode}{\tkztriminobox}
+ \ifthenelse{\lengthtest{\tkztriminotmpnode < \fpeval{1-2*\tkztriminostar}\tkztriminosize}}%
+ {%
+ \path ({\tkztriminosize},0) -- (60:{\tkztriminosize}) node[midway,sloped,above,tkztriminolabel,rotate=180] {\strut\tkztext} ;
+ }%
+ {%
+ \path ({\tkztriminosize},0) -- (60:{\tkztriminosize}) node[midway,sloped,above,tkztriminolabel,rotate=180] {\strut\resizebox{\fpeval{1-2*\tkztriminostar}\tkztriminosize}{!}{\tkztext}} ; ;
+ }%
+ \fi
+ }
+ \end{scope}
+}
+
+%------main macro
+\NewDocumentCommand\tkztriminos{ O{} D<>{} m }{%
+ \restoreKV[tkztrimino]%
+ \setKV[tkztrimino]{#1}%
+ \xdef\tkztriminostaralt{\fpeval{0.5*(\tkztriminostar)}}%
+ \setsepchar{§}%
+ \readlist*\listitemstrimino{#3}%
+ \begin{tikzpicture}[#2]
+ \ifnum\listitemstriminolen=3
+ %only one
+ \inttrimino{(0,0)}{0}{\listitemstrimino[1],\listitemstrimino[2],\listitemstrimino[3]}
+ \fi
+ \ifnum\listitemstriminolen=19
+ %with 9 triminos (5 jokers)
+ \inttrimino{(0,0)}{0}{\listitemstrimino[-1],\listitemstrimino[7],\listitemstrimino[3]}
+ \inttrimino{(0:{\tkztriminosize})}{60}{\listitemstrimino[4],\listitemstrimino[6],\listitemstrimino[2]}
+ \inttrimino{(0:{\tkztriminosize})}{0}{\listitemstrimino[5],\listitemstrimino[9],\listitemstrimino[-1]}
+ \inttrimino{(0,0)}{-60}{\listitemstrimino[8],\listitemstrimino[12],\listitemstrimino[14]}
+ \inttrimino{(0:{\tkztriminosize})}{-120}{\listitemstrimino[15],\listitemstrimino[13],\listitemstrimino[-1]}
+ \inttrimino{(0:{\tkztriminosize})}{-60}{\listitemstrimino[10],\listitemstrimino[16],\listitemstrimino[18]}
+ \inttrimino{(-60:{\tkztriminosize})}{-60}{\listitemstrimino[1],\listitemstrimino[-1],\listitemstrimino[-1]}
+ \inttrimino{(-60:{\tkztriminosize})}{-120}{\listitemstrimino[-1],\listitemstrimino[11],\listitemstrimino[-1]}
+ \inttrimino{(-30:{sqrt(3)*\tkztriminosize})}{-120}{\listitemstrimino[17],\listitemstrimino[-1],\listitemstrimino[-1]}
+ \fi
+ \ifnum\listitemstriminolen=25
+ %with 12 triminos (10 jokers)
+ \inttrimino{(0,0)}{0}{\listitemstrimino[13],\listitemstrimino[11],\listitemstrimino[1]}
+ \inttrimino{(0:{\tkztriminosize})}{60}{\listitemstrimino[2],\listitemstrimino[4],\listitemstrimino[16]}
+ \inttrimino{(0:{\tkztriminosize})}{0}{\listitemstrimino[3],\listitemstrimino[5],\listitemstrimino[17]}
+ \inttrimino{(0,0)}{-60}{\listitemstrimino[12],\listitemstrimino[24],\listitemstrimino[10]}
+ \inttrimino{(0:{\tkztriminosize})}{-120}{\listitemstrimino[7],\listitemstrimino[9],\listitemstrimino[21]}
+ \inttrimino{(0:{\tkztriminosize})}{-60}{\listitemstrimino[6],\listitemstrimino[8],\listitemstrimino[20]}
+ \inttrimino{(-60:{\tkztriminosize})}{-60}{\listitemstrimino[22],\listitemstrimino[-1],\listitemstrimino[-1]}
+ \inttrimino{(-60:{\tkztriminosize})}{-120}{\listitemstrimino[-1],\listitemstrimino[23],\listitemstrimino[-1]}
+ \inttrimino{(-30:{sqrt(3)*\tkztriminosize})}{-120}{\listitemstrimino[19],\listitemstrimino[-1],\listitemstrimino[-1]}
+ \inttrimino{(-60:{2*\tkztriminosize})}{-120}{\listitemstrimino[-1],\listitemstrimino[-1],\listitemstrimino[15]}
+ \inttrimino{(-60:{2*\tkztriminosize})}{-60}{\listitemstrimino[-1],\listitemstrimino[-1],\listitemstrimino[18]}
+ \inttrimino{(-60:{2*\tkztriminosize})}{-180}{\listitemstrimino[-1],\listitemstrimino[-1],\listitemstrimino[14]}
+ \fi
+ \ifnum\listitemstriminolen=36
+ %with 12 triminos tous remplis
+ \inttrimino{(0,0)}{0}{\listitemstrimino[13],\listitemstrimino[11],\listitemstrimino[1]}
+ \inttrimino{(0:{\tkztriminosize})}{60}{\listitemstrimino[2],\listitemstrimino[4],\listitemstrimino[16]}
+ \inttrimino{(0:{\tkztriminosize})}{0}{\listitemstrimino[3],\listitemstrimino[5],\listitemstrimino[17]}
+ \inttrimino{(0,0)}{-60}{\listitemstrimino[12],\listitemstrimino[24],\listitemstrimino[10]}
+ \inttrimino{(0:{\tkztriminosize})}{-120}{\listitemstrimino[7],\listitemstrimino[9],\listitemstrimino[21]}
+ \inttrimino{(0:{\tkztriminosize})}{-60}{\listitemstrimino[6],\listitemstrimino[8],\listitemstrimino[20]}
+ \inttrimino{(-60:{\tkztriminosize})}{-60}{\listitemstrimino[22],\listitemstrimino[31],\listitemstrimino[25]}
+ \inttrimino{(-60:{\tkztriminosize})}{-120}{\listitemstrimino[32],\listitemstrimino[23],\listitemstrimino[33]}
+ \inttrimino{(-30:{sqrt(3)*\tkztriminosize})}{-120}{\listitemstrimino[19],\listitemstrimino[26],\listitemstrimino[35]}
+ \inttrimino{(-60:{2*\tkztriminosize})}{-120}{\listitemstrimino[30],\listitemstrimino[28],\listitemstrimino[15]}
+ \inttrimino{(-60:{2*\tkztriminosize})}{-60}{\listitemstrimino[36],\listitemstrimino[29],\listitemstrimino[18]}
+ \inttrimino{(-60:{2*\tkztriminosize})}{-180}{\listitemstrimino[27],\listitemstrimino[34],\listitemstrimino[14]}
+ \fi
+ \end{tikzpicture}%
+}
+
+\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdf b/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdf
index 68574d0bff..e765213680 100644
--- a/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdf
+++ b/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex b/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex
index 287d240690..f45f5b8eb8 100644
--- a/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex
+++ b/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex
@@ -4,8 +4,8 @@
\documentclass[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.2}
-\def\TPdate{22 juillet 2023}
+\def\TPversion{0.1.3}
+\def\TPdate{16 septembre 2024}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
@@ -16,6 +16,7 @@
\makesavenoteenv{tabular}
\usepackage{enumitem}
\usepackage{tabularray}
+\UseTblrLibrary{diagbox}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\fancyhf{}
@@ -206,6 +207,7 @@
\vspace*{-2cm}
+ \def\listecouleursdes{red!25,blue!25,yellow!25,orange!25,green!25}\TirageAleaDesTriDim[EspaceH=-2mm]{5}
\hfill
\begin{EmpilementCubes}
\PlaquePetitsCubes[cyan/red/green/yellow]{ 3111-1-4 / 233123 / 2-1112 }
@@ -242,17 +244,19 @@
\tableofcontents
-\vfill
+\pagebreak
\part{Historique}
+\verb|v0.1.3|~:~~~~Affichage de dés en 3d (avec aléatoire possible)
+
\verb|v0.1.2|~:~~~~Option pour l'épaisseur des traits + \textsf{[line join=round]} pour les cubes
\verb|v0.1.1|~:~~~~Tracé des segments individuels avec l'option \textsf{[line cap=round]}
\verb|v0.1.0|~:~~~~Version initiale
-\newpage
+\pagebreak
\part{Introduction}
@@ -268,7 +272,8 @@ Le package propose des commandes basiques -- et francisées -- pour travailler s
\item une commande pour tracer et personnaliser un cube ;
\item des commandes pour créer/afficher/nommer des points de l'espace ;
\item des commandes pour tracer un ou plusieurs segments ;
- \item des commandes et un environnement pour travailler sur des \textit{empilements} de cubes.
+ \item des commandes et un environnement pour travailler sur des \textit{empilements} de cubes ;
+ \item des commandes pour représenter des dés en perspective (avec aléatoire possible).
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{noteblock}
@@ -297,8 +302,8 @@ Il n'existe pas d'option pour le package, et \texttt{xcolor} n'est pas chargé.
\textsf{tikz3d-fr} charge les packages suivantes :
\begin{itemize}
- \item \texttt{tikz}, \texttt{xstring}, \texttt{xintexpr}, \texttt{simplekv} et \texttt{xinttools} et \texttt{listofitems} ;
- \item les librairies \texttt{\textit{tikz}.calc} et \texttt{\textit{tikz}.babel}.
+ \item \texttt{tikz}, \texttt{xstring}, \texttt{xintexpr}, \texttt{simplekv} et \texttt{xinttools} et \texttt{listofitems}, \texttt{tikz-3dplot} et \texttt{randomlist} ;
+ \item la librairie \texttt{\textit{tikz}.calc}.
\end{itemize}
Il est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}.
@@ -758,4 +763,144 @@ Par exemple, la \textit{grille} associée à l'empilement précédent est :
\end{EmpilementCubes}
\end{PresCode}
+\newpage
+
+\part{Dés à jouer, en 3D}
+
+\section{Fonctionnement global}
+
+\begin{tipblock}
+L'idée est de proposer des commandes pour travailler avec des dés, en 3D, avec possibilité de les \textit{lancer} de manière aléatoire.
+
+\smallskip
+
+La commande peut être autonome pour afficher dé par dé, mais elle peut être également à intégrer dans un environnement \texttt{tikzpicture}.
+\end{tipblock}
+
+\begin{importantblock}
+Par défaut, les dés ont une hauteur proche de 1~cm (sans la perspective).
+
+\smallskip
+
+L'orientation est \textit{globalement} fixée, mais il est possible (dans une certaine mesure) de pivoter les dés (suivants les angles $\theta$ et $\phi$ des coordonnées sphériques).
+
+\smallskip
+
+Il est également possible de spécifier un \textit{angle de vue}, droite ou gauche.
+\end{importantblock}
+
+
+\begin{PresCodeTex}{listing only}
+%affichage indépendant
+\DeTriDim[clés]{numéro(s)}
+\end{PresCodeTex}
+
+\begin{PresCodeTex}{listing only}
+%affichage dans un environnement
+\begin{tikzpicture}
+ \DeTriDim*[clés]{numéro(s)}
+\end{tikzpicture}
+\end{PresCodeTex}
+
+\begin{PresCodeTex}{listing only}
+%tirages aléatoires
+\TirageAleaDesTriDim[clés]{tirages}
+\end{PresCodeTex}
+
+\begin{PresCode}{}
+\DeTriDim{6/2}~\DeTriDim{1/5}~\DeTriDim{6/4}~\DeTriDim{3/2}
+\end{PresCode}
+
+\begin{PresCode}{}
+\begin{tikzpicture}
+ %\tdplotsetmaincoords{70}{110}
+ \DeTriDim*[Echelle=2]{6/2}
+ \DeTriDim*[Echelle=2,Origine={(2,-0.2)}]{6/5}
+ \DeTriDim*[Echelle=2,Origine={(4,-0.4)},]{6/3}
+ \DeTriDim*[Echelle=2,Origine={(6,-0.6)},Hasard]{}
+\end{tikzpicture}
+\end{PresCode}
+
+\begin{PresCode}{}
+\TirageAleaDesTriDim[Vue=G,Yams,Echelle=3,Couleurs={red!25,blue!25,yellow!25}]{3}
+\end{PresCode}
+
+\section{Influence des paramètres}
+
+\subsection{Clés et options}
+
+\begin{tipblock}
+Quelques \Cle{clés} sont disponibles pour cette commande (elles ne sont pas toutes utilisées par les toutes les commandes) :
+
+\begin{itemize}
+ \item \Cle{Echelle} : échelle pour modifier la taille ;\hfill{}défaut \Cle{1}
+ \item \Cle{Couleur} : couleur (individuelle) ;\hfill{}défaut \Cle{lightgray!25}
+ \item \Cle{CouleurPoints} : couleurs des points ;\hfill{}défaut \Cle{black}
+ \item \Cle{Phi} : angle $\phi$ de la perpective ;\hfill{}défaut \Cle{110}
+ \item \Cle{Theta} : angle $\theta$ de la perpective ;\hfill{}défaut \Cle{70}
+ \item \Cle{Vue} : vue de la perspective (\texttt{D/G}) ;\hfill{}défaut \Cle{D}
+ \item \Cle{Hasard} : booléen pour un tirage aléatoire ;\hfill{}défaut \Cle{false}
+ \item \Cle{Origine} : origine du dé pour la version \texttt{tikzpicture} ;
+ \item en ce qui concerne les clés spécifiques au tirage :
+ \begin{itemize}
+ \item \Cle{EspaceH} : espace horizontal entre les dés ;\hfill{}défaut \Cle{0mm}
+ \item \Cle{Couleurs} : liste des couleurs pour les dés ;\hfill{}défaut \Cle{lightgray!25}
+ \item \Cle{Yams} : booléen pour forcer un affichage en ligne.\hfill{}défaut \Cle{false}
+ \end{itemize}
+\end{itemize}
+
+Hormis dans le cas où \texttt{Harsard=true}, l'argument obligatoire, pour l'affichage unique, est à donner sous la forme \texttt{face de devant/face du dessus} (l'autre face visible est déterminée automatiquement).
+\end{tipblock}
+
+\subsection{Exemples}
+
+\begin{PresCode}{}
+\TirageAleaDesTriDim[EspaceH=-2mm]{5}
+
+\TirageAleaDesTriDim[EspaceH=1mm,Echelle=2,Couleurs=darkgray,CouleurPoints=white]{5}
+\end{PresCode}
+
+\begin{PresCode}{}
+\def\listecouleursdes{red!25,blue!25,yellow!25,orange!25,green!25}
+
+\TirageAleaDesTriDim[Yams,Couleurs=brown!10]{10}
+
+\TirageAleaDesTriDim[Yams,Echelle=2,Couleurs=\listecouleursdes,CouleurPoints=magenta]{5}
+
+\TirageAleaDesTriDim[Vue=G,Yams,Echelle=3,Couleurs=\listecouleursdes]{3}
+\end{PresCode}
+
+\subsection{Angles de rotation}
+
+\begin{cautionblock}
+Les paramètres $\theta$ et $\phi$ peuvent être modifiés, en fonction du rendu souhaité.
+
+Mais comme toutes les faces ne sont pas traitées (du fait de la perspective), il est conseillé de rester dans une \textit{fenêtre classique}.
+\end{cautionblock}
+
+\begin{tipblock}
+Vue \texttt{D} :
+
+\begin{tblr}{hlines,vlines,colspec={*{5}{Q[m,c]}}}
+ \diagbox{$\phi$}{$\theta$} & 60 & \textbf{70} & 80 & 85 \\
+ 95 & \DeTriDim[Hasard,Theta=60,Phi=95]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=70,Phi=95]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=80,Phi=95]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=85,Phi=95]<baseline=0pt>{} \\
+ 100 & \DeTriDim[Hasard,Theta=60,Phi=100]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=70,Phi=100]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=80,Phi=100]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=85,Phi=100]<baseline=0pt>{} \\
+ \textbf{110} & \DeTriDim[Hasard,Theta=60,Phi=95]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=70,Phi=110,Couleur=red!25]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=80,Phi=110]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=85,Phi=110]<baseline=0pt>{} \\
+ 120 & \DeTriDim[Hasard,Theta=60,Phi=120]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=70,Phi=120]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=80,Phi=120]<baseline=0pt>{} & \DeTriDim[Hasard,Theta=85,Phi=120]<baseline=0pt>{} \\
+\end{tblr}
+\end{tipblock}
+
+\begin{tipblock}
+Vue \texttt{G} :
+
+\begin{tblr}{hlines,vlines,colspec={*{5}{Q[m,c]}}}
+ \diagbox{$\phi$}{$\theta$} & 60 & \textbf{70} & 80 & 85 \\
+ 95 & \DeTriDim[Vue=G,Hasard,Theta=60,Phi=95]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=70,Phi=95]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=80,Phi=95]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=85,Phi=95]<baseline=0pt>{} \\
+ 100 & \DeTriDim[Vue=G,Hasard,Theta=60,Phi=100]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=70,Phi=100]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=80,Phi=100]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=85,Phi=100]<baseline=0pt>{} \\
+ \textbf{110} & \DeTriDim[Vue=G,Hasard,Theta=60,Phi=95]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=70,Phi=110,Couleur=red!25]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=80,Phi=110]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=85,Phi=110]<baseline=0pt>{} \\
+ 120 & \DeTriDim[Vue=G,Hasard,Theta=60,Phi=120]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=70,Phi=120]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=80,Phi=120]<baseline=0pt>{} & \DeTriDim[Vue=G,Hasard,Theta=85,Phi=120]<baseline=0pt>{} \\
+\end{tblr}
+\end{tipblock}
+
+
\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty b/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
index 5056c951a8..b6d4e20829 100644
--- a/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
+++ b/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
@@ -3,15 +3,18 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tikz3d-fr}[2023/07/22 0.1.2 Aide pour l'utilisation de TikZ 3D]
+\ProvidesPackage{tikz3d-fr}[2024/09/16 0.1.3 Aide pour l'utilisation de TikZ 3D]
+%0.1.3 Dés à jouer en 3D
%0.1.2 Option pour l'épaisseur des traits + [line join=round] pour les cubes
%0.1.1 Segments avec [line cap=round]
%0.1.0 Version initiale
%------Packages utiles
\RequirePackage{tikz}
+\RequirePackage{tikz-3dplot}
\RequirePackage{xstring}
\RequirePackage{simplekv}
+\RequirePackage{randomlist}
\RequirePackage{xinttools}
\RequirePackage{xintexpr}
\RequirePackage{listofitems}
@@ -328,4 +331,258 @@
{\end{EnvTikzEspace}}
}
+%====DÉS EN 3D
+\newlength{\detridimoffseth}
+\setlength{\detridimoffseth}{0mm}
+
+\defKV[DeTriDim]{%
+ Echelle=\def\detridimscale{#1},%
+ Couleur=\def\detridimcouleur{#1},%
+ EspaceH=\setlength{\detridimoffseth}{#1},%
+ Couleurs=\def\detridimcouleurs{#1},%
+ CouleurPoints=\def\detridimcouleurpts{#1},%
+ Phi=\def\detridimphi{#1},%
+ Theta=\def\detridimtheta{#1},%
+ Vue=\def\deftridimvue{#1},%
+ Origine=\def\deftridimorigin{#1}
+}
+\setKVdefault[DeTriDim]{%
+ Echelle=1,%
+ Couleur=lightgray!25,%
+ CouleurPoints=black,%
+ Hasard=false,%
+ EspaceH={0mm},%
+ Couleurs=lightgray!25,%
+ Phi=110,%
+ Theta=70,%
+ Vue=D,%
+ Origine={(0,0)},%
+ Yams=false
+}
+
+\NewDocumentCommand\FaceDeTriDim{ m }{%
+ %1 = face avec points communs si besoin pour simplifier le code
+ \xintifboolexpr{#1 == 2 'or' #1 == 4 'or' #1 == 5 'or' #1 == 6}%
+ {%
+ \fill[\detridimcouleurpts] (0.5,0.5) circle[radius=1/6] ; % HG
+ \fill[\detridimcouleurpts] (-0.5,-0.5) circle[radius=1/6] ; % BD
+ }%
+ {}%
+ \xintifboolexpr{#1 == 3 'or' #1 == 4 'or' #1 == 5 'or' #1 == 6}%
+ {%
+ \fill[\detridimcouleurpts] (-0.5,0.5) circle[radius=1/6] ; % HD
+ \fill[\detridimcouleurpts] (0.5,-0.5) circle[radius=1/6] ; % BG
+ }%
+ {}%
+ \xintifboolexpr{#1 == 1 'or' #1 == 3 'or' #1 == 5}%
+ {%
+ \fill[\detridimcouleurpts] (0,0) circle[radius=1/6] ; % CENTRE
+ }%
+ {}%
+ \xintifboolexpr{#1 == 6}%
+ {%
+ \fill[\detridimcouleurpts] (0.5,0) circle[radius=1/6] ; % MG
+ \fill[\detridimcouleurpts] (-0.5,0) circle[radius=1/6] ; % MD
+ }%
+ {}%
+}
+
+%liste pour les faces
+\NewList{detridimfaceU}\SetList{detridimfaceU}{2,3,4,5}
+\NewList{detridimfaceD}\SetList{detridimfaceD}{1,3,4,6}
+\NewList{detridimfaceT}\SetList{detridimfaceT}{1,2,6,5}
+\NewList{detridimfaceQ}\SetList{detridimfaceQ}{1,5,6,2}
+\NewList{detridimfaceC}\SetList{detridimfaceC}{1,3,6,4}
+\NewList{detridimfaceS}\SetList{detridimfaceS}{2,4,5,3}
+
+%commande autonome
+\NewDocumentCommand\DeTriDim{ s O{} D<>{} m }{%
+ %* = mode non autonome
+ %1 = clés
+ %2 = options tikzpicture
+ %3 = faces devant/dessus
+ \restoreKV[DeTriDim]%
+ \setKV[DeTriDim]{#2}%
+ %si aléatoire
+ \ifboolKV[DeTriDim]{Hasard}%
+ {%
+ \xdef\detridimfacedevant{\xinteval{randrange(1,7)}}%
+ \xintifboolexpr{\detridimfacedevant == 1}%
+ {%
+ \GetRandomItem{detridimfaceU}{detridimfacedessus}%
+ }%
+ {}%
+ \xintifboolexpr{\detridimfacedevant == 2}%
+ {%
+ \GetRandomItem{detridimfaceD}{detridimfacedessus}%
+ }%
+ {}%
+ \xintifboolexpr{\detridimfacedevant == 3}%
+ {%
+ \GetRandomItem{detridimfaceT}{detridimfacedessus}%
+ }%
+ {}%
+ \xintifboolexpr{\detridimfacedevant == 4}%
+ {%
+ \GetRandomItem{detridimfaceQ}{detridimfacedessus}%
+ }%
+ {}%
+ \xintifboolexpr{\detridimfacedevant == 5}%
+ {%
+ \GetRandomItem{detridimfaceC}{detridimfacedessus}%
+ }%
+ {}%
+ \xintifboolexpr{\detridimfacedevant == 6}%
+ {%
+ \GetRandomItem{detridimfaceS}{detridimfacedessus}%
+ }%
+ {}%
+ \xdef\detridimfaces{\detridimfacedevant/\detridimfacedessus}%
+ }%
+ {%
+ \xdef\detridimfaces{#4}%
+ \StrCut{#4}{/}{\detridimfacedevant}{\detridimfacedessus}%
+ }%
+ \IfStrEq{\deftridimvue}{D}%
+ {%
+ \IfStrEqCase{\detridimfaces}{%
+ {1/2}{\def\detridimfacedroite{3}}%
+ {1/3}{\def\detridimfacedroite{5}}%
+ {1/5}{\def\detridimfacedroite{4}}%
+ {1/4}{\def\detridimfacedroite{2}}%
+ %
+ {2/1}{\def\detridimfacedroite{4}}%
+ {2/4}{\def\detridimfacedroite{6}}%
+ {2/6}{\def\detridimfacedroite{3}}%
+ {2/3}{\def\detridimfacedroite{1}}%
+ %
+ {3/1}{\def\detridimfacedroite{2}}%
+ {3/2}{\def\detridimfacedroite{6}}%
+ {3/6}{\def\detridimfacedroite{5}}%
+ {3/5}{\def\detridimfacedroite{1}}%
+ %
+ {4/1}{\def\detridimfacedroite{5}}%
+ {4/5}{\def\detridimfacedroite{6}}%
+ {4/6}{\def\detridimfacedroite{2}}%
+ {4/2}{\def\detridimfacedroite{1}}%
+ %
+ {5/1}{\def\detridimfacedroite{3}}%
+ {5/3}{\def\detridimfacedroite{6}}%
+ {5/6}{\def\detridimfacedroite{4}}%
+ {5/4}{\def\detridimfacedroite{1}}%
+ %
+ {6/2}{\def\detridimfacedroite{4}}%
+ {6/4}{\def\detridimfacedroite{5}}%
+ {6/5}{\def\detridimfacedroite{3}}%
+ {6/3}{\def\detridimfacedroite{2}}%
+ }%
+ }%
+ {%
+ \IfStrEqCase{\detridimfaces}{%
+ {1/2}{\def\detridimfacedroite{4}}%
+ {1/3}{\def\detridimfacedroite{2}}%
+ {1/5}{\def\detridimfacedroite{3}}%
+ {1/4}{\def\detridimfacedroite{5}}%
+ %
+ {2/1}{\def\detridimfacedroite{3}}%
+ {2/4}{\def\detridimfacedroite{1}}%
+ {2/6}{\def\detridimfacedroite{4}}%
+ {2/3}{\def\detridimfacedroite{6}}%
+ %
+ {3/1}{\def\detridimfacedroite{5}}%
+ {3/2}{\def\detridimfacedroite{1}}%
+ {3/6}{\def\detridimfacedroite{2}}%
+ {3/5}{\def\detridimfacedroite{6}}%
+ %
+ {4/1}{\def\detridimfacedroite{2}}%
+ {4/5}{\def\detridimfacedroite{1}}%
+ {4/6}{\def\detridimfacedroite{5}}%
+ {4/2}{\def\detridimfacedroite{6}}%
+ %
+ {5/1}{\def\detridimfacedroite{3}}%
+ {5/3}{\def\detridimfacedroite{6}}%
+ {5/6}{\def\detridimfacedroite{4}}%
+ {5/4}{\def\detridimfacedroite{1}}%
+ %
+ {6/2}{\def\detridimfacedroite{3}}%
+ {6/4}{\def\detridimfacedroite{2}}%
+ {6/5}{\def\detridimfacedroite{4}}%
+ {6/3}{\def\detridimfacedroite{5}}%
+ }%
+ }%
+ \IfStrEq{\deftridimvue}{D}{\def\tmpdetridimxscale{1}}{\def\tmpdetridimxscale{-1}}%
+ \IfBooleanF{#1}{\begin{tikzpicture}[#3]}%
+ \tdplotsetmaincoords{\detridimtheta}{\detridimphi}
+ \begin{scope}[shift={(\deftridimorigin)},scale=\fpeval{0.5*\detridimscale},xscale=\tmpdetridimxscale,thick,tdplot_main_coords,rounded corners=\fpeval{\detridimscale*0.5*0.33}cm,fill=\detridimcouleur]
+ \begin{scope}[canvas is xy plane at z=-1]
+ \filldraw (-1,-1) rectangle (1,1);
+ \end{scope}
+ \begin{scope}[canvas is xz plane at y=-1]
+ \filldraw (-1,-1) rectangle (1,1);
+ \end{scope}
+ \begin{scope}[canvas is yz plane at x=-1]
+ \filldraw (-1,-1) rectangle (1,1);
+ \end{scope}
+ \begin{scope}[canvas is xy plane at z=1]%face du dessus
+ \filldraw (-1,-1) rectangle (1,1);
+ \FaceDeTriDim{\detridimfacedessus}
+ \end{scope}
+ \begin{scope}[canvas is xz plane at y=1]%face de droite
+ \filldraw (-1,-1) rectangle (1,1);
+ \FaceDeTriDim{\detridimfacedroite}
+ \end{scope}
+ \begin{scope}[canvas is yz plane at x=1]%face de devant
+ \filldraw (-1,-1) rectangle (1,1);
+ \FaceDeTriDim{\detridimfacedevant}
+ \end{scope}
+ \end{scope}
+ \IfBooleanF{#1}{\end{tikzpicture}}%
+}
+
+\NewDocumentCommand\TirageAleaDesTriDim{ O{} D<>{} m }{%
+ \restoreKV[DeTriDim]%
+ \setKV[DeTriDim]{#1}%
+ \readlist*\detridimlstcolors{\detridimcouleurs}%
+ \ifboolKV[DeTriDim]{Yams}%
+ {%
+ \begin{tikzpicture}[#2]
+ \ifnum\detridimlstcolorslen=1\relax
+ \foreach \i in {1,...,#3}{%
+ \IfStrEq{\deftridimvue}{D}%
+ {%
+ \DeTriDim*[#1,Hasard,Couleur=\detridimcouleurs,Origine={(\i*\detridimscale,-\i*\detridimscale*0.1)}]{}%
+ }%
+ {%
+ \DeTriDim*[#1,Hasard,Couleur=\detridimcouleurs,Origine={(-\i*\detridimscale,-\i*\detridimscale*0.1)}]{}%
+ }%
+ }%
+ \else%
+ \foreach \i in {1,...,#3}{%
+ \itemtomacro\detridimlstcolors[\i]{\tmpdetridimcolor}%
+ \IfStrEq{\deftridimvue}{D}%
+ {%
+ \DeTriDim*[#1,Hasard,Couleur=\tmpdetridimcolor,Origine={(\i*\detridimscale,-\i*\detridimscale*0.1)}]{}%
+ }%
+ {%
+ \DeTriDim*[#1,Hasard,Couleur=\tmpdetridimcolor,Origine={(-\i*\detridimscale,-\i*\detridimscale*0.1)}]{}%
+ }%
+ }%
+ \fi%
+ \end{tikzpicture}
+ }%
+ {%
+ \ifnum\detridimlstcolorslen=1\relax
+ \foreach \i in {1,...,#3}{%
+ \DeTriDim[#1,Hasard,Couleur=\detridimcouleurs]<#2>{}\ifnum\i<#3\relax\hspace*{\detridimoffseth}\fi%
+ }%
+ \else%
+ \foreach \i in {1,...,#3}{%
+ \itemtomacro\detridimlstcolors[\i]{\tmpdetridimcolor}%
+ \DeTriDim[#1,Hasard,Couleur=\tmpdetridimcolor]<#2>{}\ifnum\i<#3\relax\hspace*{\detridimoffseth}\fi%
+ }%
+ \fi%
+ }%
+}
+
+
\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzbricks/README.md b/graphics/pgf/contrib/tikzbricks/README.md
index 57dd862009..b55cdae41e 100644
--- a/graphics/pgf/contrib/tikzbricks/README.md
+++ b/graphics/pgf/contrib/tikzbricks/README.md
@@ -2,13 +2,13 @@
# TikZbricks
-[![GitHub](https://img.shields.io/github/license/samcarter/tikzbricks.svg?color=blue)](http://www.latex-project.org/lppl.txt)
-[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/samcarter/tikzbricks.svg?label=current%20version)](https://github.com/samcarter/tikzbricks/releases/latest)
-[![CTAN](https://img.shields.io/ctan/v/tikzbricks.svg)](https://ctan.org/pkg/tikzbricks)
+[![License](https://img.shields.io/github/license/samcarter/tikzbricks.svg?color=blue)](https://www.latex-project.org/lppl.txt)
+[![GitHub tag](https://img.shields.io/github/tag/samcarter/tikzbricks.svg?label=current%20version&color=blue)](https://github.com/samcarter/tikzbricks/releases/latest)
+[![CTAN](https://img.shields.io/ctan/v/tikzbricks.svg?color=blue)](https://ctan.org/pkg/tikzbricks)
A small LaTeX package to draw bricks with TikZ. The user can modify the colour, shape and viewpoint.
-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/tikzbricks .
diff --git a/graphics/pgf/contrib/tikzbricks/tikzbricks-doc-settings.sty b/graphics/pgf/contrib/tikzbricks/tikzbricks-doc-settings.sty
index 777cedba6e..dbe497f34b 100644
--- a/graphics/pgf/contrib/tikzbricks/tikzbricks-doc-settings.sty
+++ b/graphics/pgf/contrib/tikzbricks/tikzbricks-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
@@ -68,67 +68,27 @@
\RequirePackage{inconsolata}% mono font with bold, but italic is missing
% \RequirePackage[scale=0.85]{cascadia-code}
% \AddToHook{cmd/ttfamily/before}{\fontseries{sl}}
-\RequirePackage{iexec}
+\usepackage{synthslant}% to fake slented comments in inconsolata
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Listings
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage[
- cachedir=$TMPDIR/minted/
-]{minted}
-
-% smuggling custom pygmentize style in cache folder
-% (a real pygmentise style would need installtion in some python folder)
-\begin{filecontents*}[noheader]{./sam.pygstyle}
-\makeatletter
-\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
- \let\PYG@ul=\relax \let\PYG@tc=\relax%
- \let\PYG@bc=\relax \let\PYG@ff=\relax}
-\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
-\def\PYG@toks#1+{\ifx\relax#1\empty\else%
- \PYG@tok{#1}\expandafter\PYG@toks\fi}
-\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
- \PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
-\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
-
-% optional arguments
-\expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor{black}{##1}}}
-
-% macros
-\expandafter\def\csname PYG@tok@k\endcsname{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}
-% curly brakets
-\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}}}
-
-\def\PYGZbs{\char`\\}
-\def\PYGZus{\char`\_}
-\def\PYGZob{\char`\{}
-\def\PYGZcb{\char`\}}
-\def\PYGZca{\char`\^}
-\def\PYGZam{\char`\&}
-\def\PYGZlt{\char`\<}
-\def\PYGZgt{\char`\>}
-\def\PYGZsh{\char`\#}
-\def\PYGZpc{\char`\%}
-\def\PYGZdl{\char`\$}
-\def\PYGZhy{\char`\-}
-\def\PYGZsq{\char`\'}
-\def\PYGZdq{\char`\"}
-\def\PYGZti{\char`\~}
-% for compatibility with earlier versions
-\def\PYGZat{@}
-\def\PYGZlb{[}
-\def\PYGZrb{]}
-\makeatother
-\end{filecontents*}
-
-\iexec{mkdir -p $TMPDIR/minted && mv sam.pygstyle $TMPDIR/minted/.}
+\RequirePackage[cachedir=./.minted]{minted}
+
+\AddToHook{env/MintedVerbatim/before}{%
+ % optional arguments
+ \@namedef{PYG@tok@na}{\def\PYG@tc##1{\textcolor{black}{##1}}}%
+ % macros
+ \@namedef{PYG@tok@k}{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % curly brakets
+ \@namedef{PYG@tok@nb}{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % comments (italics won't work with the inconsolata font)
+ \@namedef{PYG@tok@c}{\def\PYG@tc##1{\textcolor{gray}{\textsynthslant{##1}}}}%
+}
-\usemintedstyle{sam}
+\usemintedstyle{default}
\setminted{
breaksymbolleft={},
tabsize=2,
diff --git a/graphics/pgf/contrib/tikzbricks/tikzbricks-doc.pdf b/graphics/pgf/contrib/tikzbricks/tikzbricks-doc.pdf
index 121c6d41ba..b13c8f53b0 100644
--- a/graphics/pgf/contrib/tikzbricks/tikzbricks-doc.pdf
+++ b/graphics/pgf/contrib/tikzbricks/tikzbricks-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzbricks/tikzbricks-doc.tex b/graphics/pgf/contrib/tikzbricks/tikzbricks-doc.tex
index 3895d6675e..f1ad0c2c59 100644
--- a/graphics/pgf/contrib/tikzbricks/tikzbricks-doc.tex
+++ b/graphics/pgf/contrib/tikzbricks/tikzbricks-doc.tex
@@ -8,18 +8,10 @@
% https://github.com/samcarter/TikZbricks
%
% 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
-% arara: latexmk: {
-% arara: --> engine: pdflatex,
-% arara: --> options: [
-% arara: --> '-shell-escape',
-% arara: --> '-synctex=1',
-% arara: --> '-interaction=nonstopmode',
-% arara: --> ]
-% arara: --> }
+% arara: latexmk
\documentclass{scrartcl}
% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -34,7 +26,7 @@
\url{https://github.com/samcarter/TikZbricks}\\
\url{https://www.ctan.org/pkg/tikzbricks}
}{samcarter}}
-\date{Version v0.5 \textendash{} 2024/04/26}
+\date{Version v0.6 \textendash{} 2024/12/16}
\usepackage[
themecolor=samred
@@ -75,7 +67,7 @@ The package allows to draw bricks with \TikZ. The user can modify their colour,
The package is included in both \texlive and \miktex and available from \CTAN (\url{https://ctan.org/pkg/tikzbricks}).
The development version of this package is located on github at \url{https://github.com/samcarter/TikZbricks}. If you have any problems, ideas or other feedback, please make constructive use of its bug 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 \href{http://www.latex-project.org/lppl.txt}{LaTeX project public licence, version 1.3c or later}.
+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 \href{https://www.latex-project.org/lppl.txt}{LaTeX project public licence, version 1.3c or later}.
\section{Basic usage}
@@ -143,6 +135,11 @@ In addition to this basic block, the user can customise the block via the follow
\brick[studtext={TikZ}]{2}{3}
\end{tikzpicture}
\end{tcblisting}
+\begin{tcblisting}{title={Brick text ()}}
+\begin{tikzpicture}
+ \brick[bricktext={TikZ}]{2}{3}
+\end{tikzpicture}
+\end{tcblisting}
All the above options are also available as package options to change the value for the whole document. The default colour can for example be specified like this:
\begin{tcolorbox}[title={Package options ()}]
diff --git a/graphics/pgf/contrib/tikzbricks/tikzbricks.sty b/graphics/pgf/contrib/tikzbricks/tikzbricks.sty
index 01b070bb60..2ca3786a42 100644
--- a/graphics/pgf/contrib/tikzbricks/tikzbricks.sty
+++ b/graphics/pgf/contrib/tikzbricks/tikzbricks.sty
@@ -9,10 +9,10 @@
% https://github.com/samcarter/TikZbricks
%
% 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{tikzbricks}[2024/04/26 version v0.5 Drawing bricks with TikZ]
+\ProvidesPackage{tikzbricks}[2024/12/16 version v0.6 Drawing bricks with TikZ]
\RequirePackage{tikz}
\RequirePackage{tikz-3dplot}
@@ -29,12 +29,14 @@
\DeclareOptionX{studcolor}[\brick@color]{\def\brick@default@studcolor{#1}}
\DeclareOptionX{brickheight}[1.3]{\def\brick@default@height{#1}}
\DeclareOptionX{bricklength}[1.0]{\def\brick@default@length{#1}}
+\DeclareOptionX{bricktext}[]{\def\brick@default@facetext{#1}}
\DeclareOptionX{brickwidth}[1.0]{\def\brick@default@width{#1}}
\DeclareOptionX{studradius}[0.35]{\def\brick@default@radius{#1}}
\DeclareOptionX{studheight}[0.3]{\def\brick@default@studheight{#1}}
\DeclareOptionX{studtext}[]{\def\brick@default@text{#1}}
-\ExecuteOptionsX{color,frontcolor,topcolor,sidecolor,studcolor,brickheight,bricklength,brickwidth,studradius,studheight,studtext}
+
+\ExecuteOptionsX{color,frontcolor,topcolor,sidecolor,studcolor,brickheight,bricklength,bricktext,brickwidth,studradius,studheight,studtext}
\ProcessOptionsX
@@ -104,15 +106,17 @@
topcolor/.code = \def\brick@topcolor{#1},
topcolor = \brick@default@topcolor,
sidecolor/.code = \def\brick@sidecolor{#1},
- sidecolor = \brick@default@sidecolor,
+ sidecolor = \brick@default@sidecolor,
studcolor/.code = \def\brick@studcolor{#1},
- studcolor = \brick@default@studcolor,
+ studcolor = \brick@default@studcolor,
brickheight/.code = \def\brick@height{#1},
brickheight = \brick@default@height,
bricklength/.code = \def\brick@length{#1},
bricklength = \brick@default@length,
+ bricktext/.code = \def\brick@facetext{#1},
+ bricktext = \brick@default@facetext,
brickwidth/.code = \def\brick@width{#1},
- brickwidth = \brick@default@width,
+ brickwidth = \brick@default@width,
studradius/.code = \def\brick@radius{#1},
studradius = \brick@default@radius,
studheight/.code = \def\brick@studheight{#1},
@@ -134,42 +138,42 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Drawing the brick
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}[tdplot_main_coords]
-
+
% Drawing faces
\pgfmathparse{sign(sin(\tdplotmainphi))}
\let\brick@sin\pgfmathresult
\pgfmathparse{sign(cos(\tdplotmainphi))}
- \let\brick@cos\pgfmathresult
-
+ \let\brick@cos\pgfmathresult
+
\ifnum\brick@sin<0
% Right
- \fill[\brick@sidecolor,thick]
+ \fill[\brick@sidecolor,thick]
(
\brick@length*\value{brickx},
\brick@width*\value{bricky},
\brick@height*\value{brickz}
- )
- -- ++(0,0,\brick@height)
- -- ++(0,\brick@width*#2,0)
- -- ++(0,0,-\brick@height)
+ )
+ -- ++(0,0,\brick@height)
+ -- ++(0,\brick@width*#2,0)
+ -- ++(0,0,-\brick@height)
-- cycle;
\else
% Left
- \fill[\brick@sidecolor,thick]
+ \fill[\brick@sidecolor,thick]
(
{\brick@length*(#1+\value{brickx})},
\brick@width*\value{bricky},
\brick@height*\value{brickz}
- )
- -- ++(0,0,\brick@height)
- -- ++(0,\brick@width*#2,0)
- -- ++(0,0,-\brick@height)
- -- cycle;
+ )
+ -- ++(0,0,\brick@height)
+ -- ++(0,\brick@width*#2,0)
+ -- ++(0,0,-\brick@height)
+ -- cycle;
\fi
-
+
\ifnum\brick@cos<0
% Front
\fill[\brick@frontcolor,thick]
@@ -178,77 +182,84 @@
{\brick@width*(#2+\value{bricky})},
\brick@height*\value{brickz}
)
- -- ++(\brick@length*#1,0,0)
- -- ++(0,0,\brick@height)
- -- ++(-\brick@length*#1,0,0)
+ -- ++(\brick@length*#1,0,0)
+ -- ++(0,0,\brick@height)
+ -- ++(-\brick@length*#1,0,0)
-- cycle;
+
+ \node[align=center, transform shape, canvas is zx plane at y=0, rotate=-90] at (
+ \brick@length*\value{brickx} + 0.5*\brick@length*#1,
+ {\brick@width*(#2+\value{bricky})},
+ \brick@height*\value{brickz} + 0.5*\brick@height
+ ) {\brick@facetext};
+
\else
- % Back
+ % Back
\fill[\brick@frontcolor,thick]
(
\brick@length*\value{brickx},
\brick@width*\value{bricky},
\brick@height*\value{brickz}
)
- -- ++(\brick@length*#1,0,0)
- -- ++(0,0,\brick@height)
- -- ++(-\brick@length*#1,0,0)
+ -- ++(\brick@length*#1,0,0)
+ -- ++(0,0,\brick@height)
+ -- ++(-\brick@length*#1,0,0)
-- cycle;
\fi
- % Top
- \fill[\brick@topcolor,thick]
+ % Top
+ \fill[\brick@topcolor,thick]
(
\brick@length*\value{brickx},
\brick@width*\value{bricky},
{\brick@height*(1+\value{brickz})}
)
- -- ++(0,\brick@width*#2,0)
- -- ++(\brick@length*#1,0,0)
- -- +(0,-\brick@width*#2,0)
+ -- ++(0,\brick@width*#2,0)
+ -- ++(\brick@length*#1,0,0)
+ -- +(0,-\brick@width*#2,0)
-- cycle;
-
-
+
+
% Drawing studs
\foreach \x in {1,...,#1}{
\foreach \y in {1,...,#2}{
-
+
% Bottom circle
- \fill[\brick@studcolor]
+ \fill[\brick@studcolor]
(
{\brick@length*(\x-0.5+\value{brickx})},
{\brick@width*(\y-0.5+\value{bricky})},
{\brick@height*(1+\value{brickz})}
- )
- circle [radius=\brick@radius];
-
+ )
+ circle [radius=\brick@radius];
+
% Rectangular stem
- \fill[\brick@studcolor]
+ \fill[\brick@studcolor]
(
{\brick@length*(\x-0.5+\value{brickx})},
{\brick@width*(\y-0.5+\value{bricky})},
{\brick@height*(1+\value{brickz})}
- )
- ++(canvas cs:x=-\brick@radius/0.35*10)
- -- ++(canvas cs:y=\brick@studheight*17.8)
- -- ++(canvas cs:x=\brick@radius/0.35*20)
+ )
+ ++(canvas cs:x=-\brick@radius/0.35*10)
+ -- ++(canvas cs:y=\brick@studheight*17.8)
+ -- ++(canvas cs:x=\brick@radius/0.35*20)
-- ++(canvas cs:y=-\brick@studheight*17.8);
-
+
% Top circle with text
- \fill[\brick@topcolor]
+ \fill[\brick@topcolor]
(
{\brick@length*(\x-0.5+\value{brickx})},
{\brick@width*(\y-0.5+\value{bricky})},
{\brick@height*(1+\value{brickz})}
- )
- ++(canvas cs:y=\brick@studheight*17.8)
- circle [radius=\brick@radius]
+ )
+ ++(canvas cs:y=\brick@studheight*17.8)
+ circle [radius=\brick@radius]
node[\brick@color,scale=\scalingfactor*0.5, font=\sffamily] {\brick@text};
}
}
-
+
\end{scope}
}
diff --git a/graphics/pgf/contrib/tikzdotncross/README.md b/graphics/pgf/contrib/tikzdotncross/README.md
index 0c4cbfd2de..7df0e4ae9f 100644
--- a/graphics/pgf/contrib/tikzdotncross/README.md
+++ b/graphics/pgf/contrib/tikzdotncross/README.md
@@ -70,7 +70,13 @@ The Current Maintainer of this work is Alceu Frigeri
- documentation in PDF format
-------------
-* Version 1.1 (this)
+* Version 1.2b/1.2c (this)
+ - correcting package dependencies snafu (issue #1).
+
+* Version 1.2
+ - Added some package options, to change pin defaults, see documentation.
+
+* Version 1.1
- Documentation typos and improvement. Code cleanup.
* Version 1.0
diff --git a/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.pdf b/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.pdf
index c4bb9648fe..fc34d4c561 100644
--- a/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.pdf
+++ b/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex b/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex
index 0719876146..0651e47c3b 100644
--- a/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex
+++ b/graphics/pgf/contrib/tikzdotncross/doc/tikzdotncross.tex
@@ -15,7 +15,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.1} {2024/01/11}
+%% This is version {1.2c} {2025/01/23}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/tikzdotncross
@@ -28,7 +28,6 @@
\SetEnumitemKey{miditemsep}{parsep=0ex,itemsep=0.4ex}
\usepackage[american,siunitx,cuteinductors,smartlabels,arrowmos,EFvoltages,betterproportions]{circuitikz}
-\usetikzlibrary{math}
\usepackage{tikzdotncross}
\RequirePackage[hidelinks,hypertexnames=false]{hyperref}
\begin{document}
@@ -47,11 +46,27 @@ This package offers a few alternative ways for declaring and marking coordinates
%\tableofcontents
\section{Introduction}
-One recurring problem when drawing in general is how to interpret a crossing line. There are many conventions, notably, the old school (like the author of this) a jump denotes ``non touching lines'' while a simple cross is a connection, more recently (like the past 25 years), the winning convention has been that a dot marks a connection, whilst a simple cross denotes ``non touching lines''. Many, for the sake of staying in the safe side of the wall are now marking a connection with dots and non touching lines with a jump, which is a bit overkill, but at least there is no margin for error.
+One recurring problem when drawing circuits in general is how to interpret a crossing line. There are many conventions, notably, for the old school (like the author of this) a jump denotes ``non touching lines'' while a simple cross is a connection, more recently (like the past 25 years), the winning convention has been that a dot marks a connection, whilst a simple cross denotes ``non touching lines''. Many, for the sake of staying in the safe side of the wall, mark a connection with dots and non touching lines with a jump, which is a bit overkill, but at least there is no margin for interpretation errors.
And that's it, this package defines some commands to mark/pin a connection, declaring a coordinate and node at the same spot, for later reference, and a command to draw a line jumping over crossing lines of a pre-existent path.
+\section{Package Options}\label{options}
+\begin{describelist}{option}
+ \describe {pinsize} {pin (circle) size (default: 1.2), in pt.}
+ \describe {pinang} {pin angle (default: 45). }
+ \describe {pincolor} {pin color (default: blue).}
+ \describe {pinlength} {pin length (default: 4), in pt.}
+ \describe {coordcolor} {coordinate color (default: red), used if \tsobj{\showcoordstrue}.}
+\end{describelist}
+
+
+Those can also be set, middle code, via:
+\begin{codedescribe}[code,new=2024/10/22]{\setpindefaults}
+\begin{codesyntax}%
+\tsmacro{\setpindefaults}{options as above}
+\end{codesyntax}
+\end{codedescribe}
\section{Declaring and Marking Coordinates/Nodes}\label{coord}
Those are based on some ideas from Redaelli et al. (\tsobj[pkg]{CircuiTikZ}). Main differences: a variable number of parameters (see below) and it always also adds an empty node n\tsobj[marg]{coord}.
@@ -69,13 +84,16 @@ These will affect how \tsobj{\ncoord,\dotcoord,\odotcoord} will behave, with \ts
\tsobj{\pincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord}\tsverb{)}
\tsobj{\pincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color}\tsverb{)}
\tsobj{\pincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle}\tsverb{)}
-\tsobj{\pincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle,distance}\tsverb{)}
+\tsobj{\pincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle,length}\tsverb{)}
\end{codesyntax}
The \tsobj{\ncoord} always expects a single parameter \tsobj[parg]{coord}. A coordinate named \tsobj[marg]{coord} and node named n\tsobj[marg]{coord} (a ``n'' is added as a prefix) will be created for later use/reference. If \tsobj{\showcoordstrue} is en force, it will also add a pin.
-The \tsobj{\pincoord} always draws a pin, besides declaring a coordinate and node as \tsobj{\ncoord}. It expects one to 4 parameters, as listed. If omitted, the default value for distance is 4 (unit: pt), the default value for the angle is -45 (degrees), the default value for color is blue.
-In fact, the \tsobj{\coord(name)} is just a short cut for \tsverb{\pincoord(name,red,45)}, if \tsobj{\showcoordstrue}.
+The \tsobj{\pincoord} always draws a pin, besides declaring a coordinate and node as \tsobj{\ncoord}. It expects one to 4 parameters, as listed. If omitted, the default length is 4 (unit: pt), the default angle is -45 (degrees), the default color is blue.
+Likewise, if \tsobj{\showcoordstrue}, \tsobj{\coord(name)} is just a short cut for \tsverb{\pincoord(name,red,45)}.
\end{codedescribe}
+\begin{tsremark}
+ Those defaults can be changed via package options, see \ref{options}, or \tsobj{\setpindefaults}.
+\end{tsremark}
\begin{codedescribe}{\dotcoord,\dotpincoord}
\begin{codesyntax}%
@@ -83,7 +101,7 @@ In fact, the \tsobj{\coord(name)} is just a short cut for \tsverb{\pincoord(name
\tsobj{\dotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord}\tsverb{)}
\tsobj{\dotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color}\tsverb{)}
\tsobj{\dotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle}\tsverb{)}
-\tsobj{\dotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle,distance}\tsverb{)}
+\tsobj{\dotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle,length}\tsverb{)}
\end{codesyntax}
These are the same as \tsobj{\ncoord} and friends, just adding a dot (a filled in, small circle) at the coordinate.
\end{codedescribe}
@@ -94,7 +112,7 @@ These are the same as \tsobj{\ncoord} and friends, just adding a dot (a filled i
\tsobj{\odotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord}\tsverb{)}
\tsobj{\odotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color}\tsverb{)}
\tsobj{\odotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle}\tsverb{)}
-\tsobj{\odotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle,distance}\tsverb{)}
+\tsobj{\odotpincoord}\tsverb{(}\tsobj[oarg,sep={,}]{coord,color,angle,length}\tsverb{)}
\end{codesyntax}
These are the same as \tsobj{\ncoord} and friends, just adding an open dot (a small circle filled with white) at the coordinate.
\end{codedescribe}
@@ -114,7 +132,7 @@ Then this will ``calculate'' the intersections between the line (defined by the
At each intersection a semi-circle will be drawn, and finally a line will be draw connecting \tsobj[marg]{coordA} to \tsobj[marg]{coordB} over all intermediate nodes.
-The star version flips the semi-circles.
+The star version flips the semi-circles orientation.
\begin{tsremark}
The default \tsobj[oarg]{cross-name} is ``cross''. It may contain only characters, as any valid \TeX\ macro name. The default \tsobj[oarg]{width} of the semi-circle is 7pt.
\end{tsremark}
@@ -126,7 +144,7 @@ The star version flips the semi-circles.
\end{tsremark}
\end{codedescribe}
-\newpage
+%\newpage
\section{Some Examples}
\textbf{\color{red}Note:} In the examples below, the circuit doesn't make much/any sense, it is just a way to show the commands possibilities.
@@ -175,6 +193,8 @@ And the same with \tsobj{\showcoordsfalse}
\newpage
As said, the main limitation (derived from how \tsobj[pkg]{intersections} works) is that crossings between the line and nodes might not be detected at all. For example, if someone tries to connect the nodes \tsobj[key]{D1,D2}, it will, unfortunately, fail detecting the node (pnp transistor) entirely:
+%\showcoordstrue
+%\setpindefaults{coordcolor=cyan,pincolor=red}
\begin{codestore}[crossdemoC]
\resizebox{0.5\textwidth}{!}{
\begin{tikzpicture}
diff --git a/graphics/pgf/contrib/tikzdotncross/latex/tikzdotncross.sty b/graphics/pgf/contrib/tikzdotncross/latex/tikzdotncross.sty
index 2385fb155e..8c2975e6fa 100644
--- a/graphics/pgf/contrib/tikzdotncross/latex/tikzdotncross.sty
+++ b/graphics/pgf/contrib/tikzdotncross/latex/tikzdotncross.sty
@@ -12,7 +12,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.1} {2024/01/11}
+%% This is version {1.2c} {2025/01/23}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/tikzdotncross
@@ -26,8 +26,8 @@
\ProvidesExplPackage
{tikzdotncross}
- {2024/01/11}
- {1.1}
+ {2025/01/23}
+ {1.2c}
{Marking coordinates and crossing paths}
%%%%%%%
@@ -40,8 +40,8 @@
{
name .code:n = {tikzdotncross} ,
prefix .code:n = {tikzdotncross} ,
- date .code:n = {2024/01/11},
- version .code:n = {1.1} ,
+ date .code:n = {2025/01/23},
+ version .code:n = {1.2c} ,
description .code:n = {Marking~ coordinates~ and~ crossing~ paths}
}
\cs_if_exist:NF \PkgInfo
@@ -54,10 +54,50 @@
%%% End of cut-n-paste
%%%%%%%
+%%%
+%%% why that here? well, the token list's commands will be used outside expl3 'domain'
+%%%
+\makeatletter
+
+\keys_define:nn { tikzdotncross }
+ {
+ pin size .tl_set:N = \dotncross@@pinsep ,
+ pin size .value_required:n = true ,
+ pin size .initial:n = 1.2 ,
+ pin size .usage:n = general ,
+
+ pin ang .tl_set:N = \dotncross@@pinang ,
+ pin ang .value_required:n = true ,
+ pin ang .initial:n = 45 ,
+ pin ang .usage:n = general ,
+
+ pin color .tl_set:N = \dotncross@@pincolor ,
+ pin color .value_required:n = true ,
+ pin color .initial:n = blue ,
+ pin color .usage:n = general ,
+
+ pin length .tl_set:N = \dotncross@@pindistance ,
+ pin length .value_required:n = true ,
+ pin length .initial:n = 4 ,
+ pin length .usage:n = general ,
+
+ coord color .tl_set:N = \dotncross@@coordcolor ,
+ coord color .value_required:n = true ,
+ coord color .initial:n = red ,
+ coord color .usage:n = general ,
+ }
+
+\ProcessKeyOptions [ tikzdotncross ]
+
+\NewDocumentCommand{\setpindefaults}{m} {
+ \keys_set:nn {tikzdotncross}{#1}
+}
+
\ExplSyntaxOff
-\makeatletter
-\usetikzlibrary{intersections}
+%\makeatletter
+\usetikzlibrary{math,intersections}
+\RequirePackage{etoolbox}
%%
%% There is no easy and clean way
@@ -84,17 +124,16 @@
\pgfextra{\csxdef{#2T}{\CrossTotal}}
\foreach \aux in {1,...,\csuse{#2T}}{(#2-\aux) node[minimum size=#6-\pgflinewidth,inner sep=0pt](n#2-\aux){}};
\tikzmath{%
- coordinate \Ctmp; real \dx , \dy , \d; int \idx;
+ coordinate \Ctmp; real \dtmp; int \idx;
\Ctmp{from} = (#3);
\Ctmp{to} = (#4);
- \dx{tmp} = \Ctmpx{to} - \Ctmpx{from};
- \dy{tmp} = \Ctmpy{to} - \Ctmpy{from};
- \d{ang} = atan2(\dy{tmp},\dx{tmp});
+ \dtmp{x} = \Ctmpx{to} - \Ctmpx{from};
+ \dtmp{y} = \Ctmpy{to} - \Ctmpy{from};
+ \dtmp{ang} = atan2(\dtmp{y},\dtmp{x});
\Ctmp{1st} = (n#2-1);
\Ctmp{last} = (n#2-\csuse{#2T});
\idx{1st} = 1;
\idx{last} = \csuse{#2T};
- \idx{crossing} = 1;
if \Ctmpx{1st} == \Ctmpx{from} then {
if \Ctmpy{1st} == \Ctmpy{from} then {
\idx{1st} = 2;
@@ -109,9 +148,9 @@
\ifnum\idx{last}<\idx{1st}
\draw (#3) -- (#4);
\else
- \draw[line width=1.8\pgflinewidth,white,rotate=\d{ang}]
+ \draw[line width=1.8\pgflinewidth,white,rotate=\dtmp{ang}]
\foreach \aux in {\idx{1st},...,\idx{last}}{(#2-\aux) +(-#6/2,0) arc[start angle=\dotncross@@sign180,end angle=0,radius=#6/2]};
- \draw[rotate=\d{ang},line cap=round]
+ \draw[rotate=\dtmp{ang},line cap=round]
\foreach \aux in {\idx{1st},...,\idx{last}}{(#2-\aux) +(-#6/2,0) arc[start angle=\dotncross@@sign180,end angle=0,radius=#6/2]};
\gdef\dotncross@@tmpA{#3}
@@ -133,14 +172,14 @@
\newcommand\showcoordsfalse{\let\ncoord=\dotncross@@coordnode \let\dotcoord=\dotncross@@dotcoordnode \let\odotcoord=\dotncross@@odotcoordnode}
\newcommand\showcoordstrue{\let\ncoord=\dotncross@@coordpin \let\dotcoord=\dotncross@@dotcoordpin \let\odotcoord=\dotncross@@odotcoordpin}
-\def\dotncross@@coordpin(#1){\pincoord(#1,red,45)}
-\def\dotncross@@coordnode(#1){coordinate(#1) node[minimum size=1.2pt,inner sep=1.2pt](n#1){}}
+\def\dotncross@@coordpin(#1){\pincoord(#1,\dotncross@@coordcolor,\dotncross@@pinang)}
+\def\dotncross@@coordnode(#1){coordinate(#1) node[minimum size=\dotncross@@pinsep pt,inner sep=\dotncross@@pinsep pt](n#1){}}
-\def\dotncross@@dotcoordpin(#1){\dotpincoord(#1,red,45)}
-\def\dotncross@@dotcoordnode(#1){coordinate(#1) node[circle,minimum size=1.2pt,inner sep=1.2pt,fill](n#1){}}
+\def\dotncross@@dotcoordpin(#1){\dotpincoord(#1,\dotncross@@coordcolor,\dotncross@@pinang)}
+\def\dotncross@@dotcoordnode(#1){coordinate(#1) node[circle,minimum size=\dotncross@@pinsep pt,inner sep=\dotncross@@pinsep pt,fill](n#1){}}
-\def\dotncross@@odotcoordpin(#1){\odotpincoord(#1,red,45)}
-\def\dotncross@@odotcoordnode(#1){coordinate(#1) node[circle,minimum size=1.2pt,inner sep=1.2pt,fill=white,draw](n#1){}}
+\def\dotncross@@odotcoordpin(#1){\odotpincoord(#1,\dotncross@@coordcolor,\dotncross@@pinang)}
+\def\dotncross@@odotcoordnode(#1){coordinate(#1) node[circle,minimum size=\dotncross@@pinsep pt,inner sep=\dotncross@@pinsep pt,fill=white,draw](n#1){}}
%%%%
%%
@@ -155,17 +194,17 @@
\def\dotncross@@pincasew#1#2{\dotncross@@pincase#1,,,,\dotncross@@pincaseA\dotncross@@pincaseB\dotncross@@pincaseC\dotncross@@pincaseD;#2:}
\def\dotncross@@pincase#1,#2,#3,#4,#5#6#7#8#9:{#8:#1:#2:#3:#4:#9:}
\def\dotncross@@pincaseA:#1:#2:#3:#4:#5;#6:{\dotncross@@pincoord{#1}{#2}{#3}{#4}{#6}}
-\def\dotncross@@pincaseB:#1:#2:#3:#4:#5;#6:{\dotncross@@pincoord{#1}{#2}{#3}{4}{#6}}
-\def\dotncross@@pincaseC:#1:#2:#3:#4:#5;#6:{\dotncross@@pincoord{#1}{#2}{-45}{4}{#6}}
-\def\dotncross@@pincaseD:#1:#2:#3:#4:#5;#6:{\dotncross@@pincoord{#1}{blue}{-45}{4}{#6}}
+\def\dotncross@@pincaseB:#1:#2:#3:#4:#5;#6:{\dotncross@@pincoord{#1}{#2}{#3}{\dotncross@@pindistance}{#6}}
+\def\dotncross@@pincaseC:#1:#2:#3:#4:#5;#6:{\dotncross@@pincoord{#1}{#2}{-\dotncross@@pinang}{\dotncross@@pindistance}{#6}}
+\def\dotncross@@pincaseD:#1:#2:#3:#4:#5;#6:{\dotncross@@pincoord{#1}{\dotncross@@pincolor}{-\dotncross@@pinang}{\dotncross@@pindistance}{#6}}
\def\pincoord(#1){\dotncross@@pincasew{#1}{}}
\def\dotpincoord(#1){\dotncross@@pincasew{#1}{circle,fill,}}
\def\odotpincoord(#1){\dotncross@@pincasew{#1}{circle,fill=white,draw,}}
\newcommand\dotncross@@pincoord[5]{%
- coordinate(#1) node[#5minimum size=1.2pt,inner sep=1.2pt](n#1){}
- node[circle, #2, inner sep=1.2pt, outer sep=0pt, radius=1pt, fill=#2!20!white, fill opacity=0.2, draw opacity=0.4, draw,
+ coordinate(#1) node[#5minimum size=\dotncross@@pinsep pt,inner sep=\dotncross@@pinsep pt](n#1){}
+ node[circle, #2, inner sep=\dotncross@@pinsep pt, outer sep=0pt, radius=1pt, fill=#2!20!white, fill opacity=0.2, draw opacity=0.4, draw,
pin={[#2, overlay, inner sep=0pt, outer sep=1pt, font=\tiny, pin distance=#4pt,
pin edge={#2, overlay}]#3:#1}]{}%
}
diff --git a/graphics/pgf/contrib/tikzducks/README.md b/graphics/pgf/contrib/tikzducks/README.md
index 8298baafa7..2acf36b78c 100644
--- a/graphics/pgf/contrib/tikzducks/README.md
+++ b/graphics/pgf/contrib/tikzducks/README.md
@@ -2,13 +2,13 @@
# TikZducks
-[![GitHub](https://img.shields.io/github/license/samcarter/tikzducks.svg?color=blue)](http://www.latex-project.org/lppl.txt)
-[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/samcarter/tikzducks.svg?label=current%20version)](https://github.com/samcarter/tikzducks/releases/latest)
-[![CTAN](https://img.shields.io/ctan/v/tikzducks.svg)](https://ctan.org/pkg/tikzducks)
+[![License](https://img.shields.io/github/license/samcarter/tikzducks.svg?color=blue)](https://www.latex-project.org/lppl.txt)
+[![GitHub tag](https://img.shields.io/github/tag/samcarter/tikzducks.svg?label=current%20version&color=blue)](https://github.com/samcarter/tikzducks/releases/latest)
+[![CTAN](https://img.shields.io/ctan/v/tikzducks.svg?color=blue)](https://ctan.org/pkg/tikzducks)
This is a little LaTeX package for ducks to be used in TikZ pictures.
-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/tikzducks .
diff --git a/graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv b/graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv
deleted file mode 100644
index 19af36180b..0000000000
--- a/graphics/pgf/contrib/tikzducks/t-tikzducks.mkiv
+++ /dev/null
@@ -1,62 +0,0 @@
-% !TeX root = ./testing/context_duck.tex
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% The tikzducks package
-% A package to bring rubber ducks into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzducks
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-% Code for this ConTeXt User Module kindly provided by @JairoAdelRio https://github.com/samcarter/tikzducks/pull/25
-\writestatus{loading}{ConTeXt User Module / TikZDucks 2024/04/27 version v1.8 Draw rubber ducks in TikZ}
-
-\setupcolors[state=start]
-\usemodule[tikz]
-\enabledirectives[colors.pgf]
-\usetikzlibrary[patterns] % for the wizard hat
-\usetikzlibrary[calc]
-\definecolor[duck@overleafcol][x=48AC3C]
-
-\catcode`\@=11
-
-% Defining commands not available in context %%%%%%%%%%%%%%%%%%%%%%%%%
-\define[2]\scalebox{\scale[factor={\ctxlua{context(3*#1)}}]{#2}}
-\let\tiny\tfxx
-\let\pdfrandomseed\randomseed
-
-% Duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\duck{\dosingleempty\doduck}
-\def\doduck[#1]{%
- \iffirstargument
- \startscope%
- \tikzset{/duck/.cd,#1}%
- \duck@draw%
- \stopscope%
- \else
- \startscope%
- \tikzset{/duck/.cd}%
- \duck@draw%
- \stopscope%
- \fi%
-}
-
-% Stripes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\stripes{\dosingleempty\dostripes}
-\def\dostripes[#1]{%
- \iffirstargument
- \tikzset{/stripes/.cd,#1}\stripes@draw
- \else
- \tikzset{/stripes/.cd}\stripes@draw
- \fi
-}
-
-\input tikzducks-generic.tex
-
-\catcode`\@=12
-\endinput
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty b/graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty
index 777cedba6e..5cb08d5d21 100644
--- a/graphics/pgf/contrib/tikzducks/tikzducks-doc-settings.sty
+++ b/graphics/pgf/contrib/tikzducks/tikzducks-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
@@ -61,6 +61,7 @@
\RequirePackage{footnotehyper}
\makesavenoteenv{tcolorbox}
\RequirePackage[all]{nowidow}
+ \RequirePackage[hyphens]{url}
\RequirePackage[colorlinks=true,breaklinks=true,allcolors=themecolor,hyperfootnotes=false]{hyperref}
}
\RequirePackage[T1]{fontenc}
@@ -68,67 +69,28 @@
\RequirePackage{inconsolata}% mono font with bold, but italic is missing
% \RequirePackage[scale=0.85]{cascadia-code}
% \AddToHook{cmd/ttfamily/before}{\fontseries{sl}}
-\RequirePackage{iexec}
+\RequirePackage{synthslant}% to fake slanted comments in inconsolata
+\RequirePackage{metalogox}% should be loaded after the fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Listings
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage[
- cachedir=$TMPDIR/minted/
-]{minted}
-
-% smuggling custom pygmentize style in cache folder
-% (a real pygmentise style would need installtion in some python folder)
-\begin{filecontents*}[noheader]{./sam.pygstyle}
-\makeatletter
-\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
- \let\PYG@ul=\relax \let\PYG@tc=\relax%
- \let\PYG@bc=\relax \let\PYG@ff=\relax}
-\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
-\def\PYG@toks#1+{\ifx\relax#1\empty\else%
- \PYG@tok{#1}\expandafter\PYG@toks\fi}
-\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
- \PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
-\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
-
-% optional arguments
-\expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor{black}{##1}}}
-
-% macros
-\expandafter\def\csname PYG@tok@k\endcsname{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}
-% curly brakets
-\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}}}
-
-\def\PYGZbs{\char`\\}
-\def\PYGZus{\char`\_}
-\def\PYGZob{\char`\{}
-\def\PYGZcb{\char`\}}
-\def\PYGZca{\char`\^}
-\def\PYGZam{\char`\&}
-\def\PYGZlt{\char`\<}
-\def\PYGZgt{\char`\>}
-\def\PYGZsh{\char`\#}
-\def\PYGZpc{\char`\%}
-\def\PYGZdl{\char`\$}
-\def\PYGZhy{\char`\-}
-\def\PYGZsq{\char`\'}
-\def\PYGZdq{\char`\"}
-\def\PYGZti{\char`\~}
-% for compatibility with earlier versions
-\def\PYGZat{@}
-\def\PYGZlb{[}
-\def\PYGZrb{]}
-\makeatother
-\end{filecontents*}
-
-\iexec{mkdir -p $TMPDIR/minted && mv sam.pygstyle $TMPDIR/minted/.}
+\RequirePackage[cachedir=./.minted]{minted}
+
+\AddToHook{env/MintedVerbatim/before}{%
+ % optional arguments
+ \@namedef{PYG@tok@na}{\def\PYG@tc##1{\textcolor{black}{##1}}}%
+ % macros
+ \@namedef{PYG@tok@k}{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % curly brackets
+ \@namedef{PYG@tok@nb}{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % comments (italics won't work with the inconsolata font)
+ \@namedef{PYG@tok@c}{\def\PYG@tc##1{\textcolor{gray}{\textsynthslant{##1}}}}%
+}
-\usemintedstyle{sam}
+\usemintedstyle{default}
\setminted{
breaksymbolleft={},
tabsize=2,
@@ -196,4 +158,21 @@
\providecommand*{\tikzducks}{Ti\emph{k}Zducks\xspace}
\providecommand*{\tikzlings}{Ti\emph{k}Zlings\xspace}
\providecommand*{\tikzmarmots}{Ti\emph{k}Zmarmots\xspace}
-\providecommand*{\ConTeXt}{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt} \ No newline at end of file
+\providecommand*{\ConTeXt}{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Doc blurb
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\packagename}[1]{\def\@packagename{#1}}
+
+\NewDocumentCommand\blurb{s}{%
+ This package is work in progress, therefore I would be happy to hear your feedback and ideas how to improve the package. The development version of the source code can be found at \url{https://github.com/samcarter/\@packagename}, including an issue tracker.
+ \IfBooleanF#1{%
+ A more stable version of the package can be found on \CTAN (\url{https://ctan.org/pkg/\@packagename}) and is included in both \texlive and \miktex as \texttt{\@packagename}.
+ }%
+ If you seek any other assistance (not bug reports/feature requests), I suggest asking at \url{https://topanswers.xyz/tex}.
+
+ Copyright {\footnotesize\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}.
+} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf b/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf
index 7cc5d36576..5f376543d3 100644
--- a/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf
+++ b/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex b/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex
index 5cc8af0781..becc316cd5 100644
--- a/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex
+++ b/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex
@@ -8,20 +8,16 @@
% https://github.com/samcarter/tikzducks
%
% 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
-% arara: latexmk: {
-% arara: --> engine: pdflatex,
-% arara: --> options: [
-% arara: --> '-shell-escape',
-% arara: --> '-synctex=1',
-% arara: --> '-interaction=nonstopmode',
-% arara: --> ]
-% arara: --> }
+% arara: latexmk
\documentclass{scrartcl}
+\usepackage[
+ themecolor=samlblue
+]{\jobname-settings}
+
% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{The \texorpdfstring{\tikzducks}{tikzducks} package}
\subtitle{using ducks in \TikZ}
@@ -32,13 +28,10 @@
\end{tikzpicture}\\[0.8em]
\texttt{samcarter}\\
\url{https://github.com/samcarter/tikzducks}\\
- \url{https://www.ctan.org/pkg/tikzducks}
+ \url{https://ctan.org/pkg/tikzducks}
}{samcarter}}
-\date{Version v1.8 \textendash{} 2024/04/27}
-
-\usepackage[
- themecolor=samlblue
-]{\jobname-settings}
+\date{Version v2.0 \textendash{} 2025/01/31}
+\packagename{tikzducks}
\colorlet{blue}{samlblue}
\colorlet{red}{samred}
@@ -51,13 +44,12 @@
% customisation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfmathsetseed{2}
-\setlength{\footheight}{41pt}
+\setlength{\footheight}{45pt}
\newlength{\duckoffset}
\cfoot{%
- \shuffleducks
\begin{tikzpicture}[scale=0.5]
- \duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
+ \duck[signpost=\scalebox{0.6}{\thepage},randomhead]
\end{tikzpicture}
}
\pagestyle{scrheadings}
@@ -72,48 +64,13 @@
Rubber ducks can be made of latex, but can they also be made with \LaTeX? Yes! The \tikzducks package is a \LaTeX{} package for rubber ducks to be used in \TikZ pictures.
This project is a continuation of \href{https://tex.stackexchange.com/a/347458/36296}{How can we draw a duck?}.
-This package is work in progress (and will probably never be really finished as there is an infinite amount of things which could be added), therefore I would be happy to hear your feedback and ideas how to improve the package.
-The head version of the source code can be found on \url{https://github.com/samcarter/tikzducks}, including a bug tracker -- please make constructive use of it! A more stable package version can be found on \CTAN (\url{https://www.ctan.org/pkg/tikzducks}) and is included in both \miktex and \texlive as \tikzducks. If you seek any other assistance (not bug reports/feature requests), I suggest asking a question at \url{https://topanswers.xyz/tex}.
-
-\subsection{Acknowledgements}
-
-Without the friendly and helpful community of \TeX{} users this package would not exist. I would like to thank a few fellow users in particular:
-
-First of all
-%
-Carla Maggi for pointing out the overwhelming need of having a \tikzducks package and valuable contribution to the package code, in particular the \hyperref[sec:footballducks]{football ducks},
-%
-Paulo Cereda for his contagious enthusiasm for ducks (\emph{Quack!}) and
-%
-Ulrike Fischer for her useful \TikZ advices and contributions to the package and coming to rescue for keyword highlighting in the package documentation.
-
-Many other users contributed to this package (in random order):
-%
-Enrico Gregorio helped to implement the \saminline|\tikzset{}| interface which makes it much easier to adjust the properties of the ducks to fit the user needs,
-%
-Andrew Stacey contributed the \TikZ Library ``ducks'',
-%
-Symbol~1 solved a few problems with default key values,
-%
-Mihikma created the duck's beard,
-%
-Yudai Nakata helped with problems of \saminline|\pdfrandomseed|,
-%
-@marmot for his seemingly infinite knowledge of \TikZ which he shared with the world,
-%
-@JairoAdelRio for contributing the \ConTeXt{} User Module
-%
-and last but not least my thanks go to Martin Schr\"oder for his feedback to the code review.
-
-The ducks mostly consist of basic geometric shapes drawn in \TikZ. Some of the more complex shapes (e.g.\ the different hair styles) are first drawn in \texttt{inkscape} (\url{https://inkscape.org}) and then exported to \TikZ paths using the \texttt{svg2tikz} extension (\url{https://github.com/xyz2tex/svg2tikz}).
+Without the friendly and helpful community of \TeX{} users this package would not exist. A big thanks to all the users and contributors of this package!
-\subsection{License}
-
-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}.
+\blurb
The shown example ducks are purely fictional characters, any resemblance to real ducks or persons is purely coincidental and no copyright infringement is intended.
+\clearpage
\section{Usage}
The basic usage is fairly simple, to draw a duck:
@@ -189,7 +146,7 @@ For everybody suffering from anatidaephobia, there is also a special option to n
This can also be useful to recycle some of the accessories presented in \ref{sec:accessories}.
-For the \TeX{} purists, there is also a picture mode variant:
+For the purists, there is also a picture mode variant:
{
\setlength{\unitlength}{0.6mm}
\begin{tcblisting}{title={\texttt{picture} mode duck}}
@@ -199,46 +156,6 @@ For the \TeX{} purists, there is also a picture mode variant:
\end{tcblisting}
}
-And thanks to @JairoAdelRio there is even a \ConTeXt{} User Module available. Some of the colours might look different and not being a \ConTeXt{} user myself, I can't guarantee maintenance of this module.
-
-\begin{tcolorbox}[title={\ConTeXt{} User Module}]
-\begin{samcode}
-\usemodule[tikzducks]
-\usecolors[xwi]
-\starttext
-
-\starttikzpicture
- \duck[tophat,bowtie]
-\stoptikzpicture
-
-\stoptext
-\end{samcode}
-
-\tcblower
-\begin{tikzpicture}
- \duck[tophat,bowtie]
-\end{tikzpicture}
-\end{tcolorbox}
-
-For those who prefer to work with pdf\TeX:
-
-\begin{tcolorbox}[title={pdfTeX}]
-\begin{samcode}
-\input tikzducks-plain.tex
-
-\tikzpicture
- \duck[bobblehat,cheese]
-\endtikzpicture
-
-\bye
-\end{samcode}
-
-\tcblower
-\begin{tikzpicture}
- \duck[bobblehat,cheese]
-\end{tikzpicture}
-\end{tcolorbox}
-
\subsection{Body parts}
The various parts of the duck can also be coloured independently, i.e.\ \saminline|body|, \saminline|head| or \saminline|bill|:
@@ -588,6 +505,17 @@ There is a multitude of things a duck might need. The following examples all als
\end{tikzpicture}
\end{tcblisting}
+\begin{tcblisting}{title={Sombrero Duck\footnote{The sombrero was kindly contributed by Carla Maggi}}}
+\begin{tikzpicture}
+ \duck[
+ sombrero=orange!70!yellow,
+ sombreroa=green!70!blue,
+ sombrerob=red,
+ sombreroc=blue
+ ]
+\end{tikzpicture}
+\end{tcblisting}
+
\begin{tcblisting}{title={Glasses duck}}
\begin{tikzpicture}
\duck[glasses=red!50!black]
@@ -889,6 +817,12 @@ There is a multitude of things a duck might need. The following examples all als
\end{tikzpicture}
\end{tcblisting}
+\begin{tcblisting}{title={Megaphone Duck}}
+\begin{tikzpicture}
+ \duck[megaphone=lightgray]
+\end{tikzpicture}
+\end{tcblisting}
+
\section{Random ducks}
With all these available accessories it might be hard to decide which one to choose, but don't worry the \tikzducks provide a solution for this dilemma, the random duck, or short \saminline|\randuck|, which automatically creates a duck with a randomly chosen accessories and something on top of the head (hair, a hat, ears, alien antenna ...)
@@ -899,12 +833,11 @@ With all these available accessories it might be hard to decide which one to cho
\end{tikzpicture}
\end{tcblisting}
-In case the duck should not be completely random, but only some of the random elements are desired, these can be accessed independently by using \saminline|\randomhead| and \saminline|\randomaccessories| for a random headpiece and a random accessories, respectively. Small caveat: Before using \saminline|\randomhead| or \saminline|\randomaccessories|, \saminline|\shuffleducks| has to be used to provide the random items (for \saminline|\randuck| this is done automatically).
+In case the duck should not be completely random, but only some of the random elements are desired, these can be accessed independently by using the \saminline|randomhead| and \saminline|randomaccessories| options for a random headpiece and a random accessories, respectively.
\begin{tcblisting}{title={Random head gear and accessories}}
\begin{tikzpicture}
- \shuffleducks
- \duck[\randomhead, \randomaccessories]
+ \duck[randomhead, randomaccessories]
\end{tikzpicture}
\end{tcblisting}
@@ -932,7 +865,8 @@ For convenience the more complex paths of this package are stored in macros, whi
\begin{tikzpicture}
\duck
\path[preaction={fill, red!50!black},
- pattern=fivepointed stars,
+ pattern={Stars[distance=1.7mm,
+ radius=0.5mm,angle=32]},
pattern color=yellow]
\duckpathlonghair;
\end{tikzpicture}
@@ -982,12 +916,17 @@ To distinguish coordinates from multiple ducks in the same \saminline|tikzpictur
Sometimes it might desirable to add things at a specific z-position, for example re-draw a t-shirt with some pattern that should be below the duck's hair and accessories. To facilitate this the \tikzducks provide a couple of hooks:
-\begin{samcode}
-\duckhookbackground, \duckhookbody, \duckhookclothing, \duckhookhair, \duckhookhat, \duckhookforeground
-\end{samcode}
+\begin{itemize}
+\item \saminline|\NewHook{tikzducks/background}|
+\item \saminline|\NewHook{tikzducks/body}|
+\item \saminline|\NewHook{tikzducks/clothing}|
+\item \saminline|\NewHook{tikzducks/hair}|
+\item \saminline|\NewHook{tikzducks/hat}|
+\item \saminline|\NewHook{tikzducks/foreground}|
+\end{itemize}
\begin{center}
-\texttt{\textbackslash duckhook}\dots
+\saminline|\NewHook{tikzducks/...}|
\begin{tikzpicture}[scale=1.59]
\newcommand{\planes}{\fill[gray!20!white,opacity=0.9] (-0.1,-0.1) rectangle (2.4,2.4);}
@@ -1039,21 +978,26 @@ Sometimes it might desirable to add things at a specific z-position, for example
\end{tikzpicture}
\end{center}
-These hooks can be defined by the user as needed:
+These hooks can be utilised by the user as needed:
\begin{tcblisting}{title={Hooks}}
\begin{tikzpicture}
- \begingroup
- \newcommand{\duckhookclothing}{
- \path[pattern=fivepointed stars,
- pattern color=yellow]
- \duckpathjacket;
- }
- \duck[witch=black!50!gray,
- longhair=red!80!black,
- jacket=black!50!gray,
- magicwand]
- \endgroup
+
+ \AddToHook{tikzducks/clothing}{
+ \path[pattern={Stars[distance=1.7mm,
+ radius=0.5mm,angle=32]},
+ pattern color=yellow]
+ \duckpathjacket;
+ }
+
+ \duck[witch=black!50!gray,
+ longhair=red!80!black,
+ jacket=black!50!gray,
+ magicwand]
+
+ % optionally
+ \RemoveFromHook{tikzducks/clothing}
+
\end{tikzpicture}
\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-generic.tex b/graphics/pgf/contrib/tikzducks/tikzducks-generic.tex
deleted file mode 100644
index 25acd13301..0000000000
--- a/graphics/pgf/contrib/tikzducks/tikzducks-generic.tex
+++ /dev/null
@@ -1,1843 +0,0 @@
-% !TeX root = ./testing/test.tex
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% The tikzducks package
-% A package to bring rubber ducks into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzducks
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\newif\ifduck@name
-\newif\ifduck@invisible
-% Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifduck@water
-% body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifduck@grumpy
-\newif\ifduck@laughing
-\newif\ifduck@parrot
-% hair styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifduck@shorthair
-\newif\ifduck@longhair
-\newif\ifduck@crazyhair
-\newif\ifduck@recedinghair
-\newif\ifduck@eyebrow
-\newif\ifduck@beard
-\newif\ifduck@mohican
-\newif\ifduck@mullet
-\newif\ifduck@parting
-% clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifduck@clothing
-\newif\ifduck@tshirt
-\newif\ifduck@jacket
-\newif\ifduck@tie
-\newif\ifduck@cape
-\newif\ifduck@stripes
-\newif\ifduck@bowtie
-\newif\ifduck@lapel
-\newif\ifduck@aodai
-\newif\ifduck@scarf
-% Headgear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifduck@alien
-\newif\ifduck@hat
-\newif\ifduck@cap
-\newif\ifduck@santa
-\newif\ifduck@unicorn
-\newif\ifduck@magichat
-\newif\ifduck@chef
-\newif\ifduck@witch
-\newif\ifduck@graduate
-\newif\ifduck@beret
-\newif\ifduck@crown
-\newif\ifduck@queencrown
-\newif\ifduck@kingcrown
-\newif\ifduck@peakedcap
-\newif\ifduck@bunny
-\newif\ifduck@tophat
-\newif\ifduck@darthvader
-\newif\ifduck@harlequin
-\newif\ifduck@strawhat
-\newif\ifduck@helmet
-\newif\ifduck@viking
-\newif\ifduck@devil
-\newif\ifduck@conicalhat
-\newif\ifduck@sailor
-\newif\ifduck@bobblehat
-% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifduck@glasses
-\newif\ifduck@sunglasses
-\newif\ifduck@squareglasses
-\newif\ifduck@icecream
-\newif\ifduck@book
-\newif\ifduck@magicwand
-\newif\ifduck@cricket
-\newif\ifduck@rollingpin
-\newif\ifduck@signpost
-\newif\ifduck@lightsaber
-\newif\ifduck@cake
-\newif\ifduck@pizza
-\newif\ifduck@hockey
-\newif\ifduck@baguette
-\newif\ifduck@football
-\newif\ifduck@mask
-\newif\ifduck@necklace
-\newif\ifduck@milkshake
-\newif\ifduck@wine
-\newif\ifduck@prison
-\newif\ifduck@speech
-\newif\ifduck@think
-\newif\ifduck@torch
-\newif\ifduck@easter
-\newif\ifduck@basket
-\newif\ifduck@buttons
-\newif\ifduck@sheep
-\newif\ifduck@horsetail
-\newif\ifduck@crozier
-\newif\ifduck@davidlikespineapplepizza
-\newif\ifduck@wing
-\newif\ifduck@stethoscope
-\newif\ifduck@neckerchief
-\newif\ifduck@snowduck
-\newif\ifduck@vampire
-\newif\ifduck@crystalball
-\newif\ifduck@cheese
-\newif\ifduck@shovel
-\newif\ifduck@pickaxe
-\newif\ifduck@strawbroom
-\newif\ifduck@broom
-\newif\ifduck@umbrella
-\newif\ifduck@umbrellaclosed
-\newif\ifduck@handbag
-\newif\ifduck@cocktail
-\newif\ifduck@overleaf
-\newif\ifduck@banana
-\newif\ifduck@stick
-
-\tikzset{
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % Pass unknown keys on to tikz
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- /duck/.search also={/tikz,/pgf},
- /duck/.cd,
- name/.code= \duck@nametrue \def\duck@name{#1},
- invisible/.code = \duck@invisibletrue,
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % Environment
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- water/.code = \duck@watertrue
- \def\duck@water{#1},
- water/.default = blue,
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % body parts
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- body/.code = \def\duck@body{#1},
- body = yellow!70!brown,
- head/.code = \def\duck@head{#1},
- eye/.code = \def\duck@eye{#1},
- eye = white!85!yellow,
- pupil/.code = \def\duck@pupil{#1},
- pupil = black,
- bill/.code = \def\duck@bill{#1},
- bill = orange!50!brown,
- grumpy/.code = \duck@grumpytrue,
- laughing/.code = \duck@laughingtrue,
- parrot/.code = \duck@parrottrue,
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % clothing
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- tshirt/.code = \duck@tshirttrue
- \duck@clothingtrue
- \def\duck@tshirt{#1},
- tshirt/.default = white,
- jacket/.code = \duck@jackettrue
- \duck@clothingtrue
- \def\duck@jacket{#1},
- jacket/.default = blue,
- tie/.code = \duck@tietrue
- \def\duck@tie{#1},
- tie/.default = blue,
- cape/.code = \duck@capetrue
- \duck@clothingtrue
- \def\duck@cape{#1},
- cape/.default = red,
- stripes/.code = \duck@stripestrue
- \duck@clothingtrue
- \def\duck@stripes{#1},
- stripes/.default = \stripes ,
- bowtie/.code = \duck@bowtietrue
- \def\duck@bowtie{#1},
- bow tie/.forward to = /duck/bowtie,
- bowtie/.default = black,
- lapel/.code = \duck@lapeltrue
- \def\duck@lapel{#1},
- lapel/.default = black,
- aodai/.code = \duck@aodaitrue
- \duck@clothingtrue
- \def\duck@aodai{#1},
- ao dai/.forward to = /duck/aodai,
- aodai/.default = blue!50!black,
- scarf/.code = \duck@scarftrue
- \def\duck@scarf{#1},
- scarf/.default = red!70!black,
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % hair styles
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- shorthair/.code = \duck@shorthairtrue
- \def\duck@hair{#1},
- short hair/.forward to = /duck/shorthair,
- shorthair/.default = brown,
- longhair/.code = \duck@longhairtrue
- \def\duck@hair{#1},
- long hair/.forward to = /duck/longhair,
- longhair/.default = brown,
- crazyhair/.code = \duck@crazyhairtrue
- \def\duck@hair{#1},
- crazy hair/.forward to = /duck/crazyhair,
- crazyhair/.default = brown,
- recedinghair/.code = \duck@recedinghairtrue
- \def\duck@hair{#1},
- receding hair/.forward to = /duck/recedinghair,
- recedinghair/.default = brown,
- eyebrow/.code = \duck@eyebrowtrue
- \def\duck@eyebrow{#1},
- eyebrow/.default = brown,
- beard/.code = \duck@beardtrue
- \def\duck@beard{#1},
- beard/.default = brown,
- mohican/.code = \duck@mohicantrue
- \def\duck@hair{#1},
- mohican/.default = brown,
- mullet/.code = \duck@mullettrue
- \def\duck@hair{#1},
- mullet/.default = brown,
- parting/.code = \duck@partingtrue
- \def\duck@hair{#1},
- parting/.default = brown,
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % Headgear
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- alien/.code = \duck@alientrue
- \def\duck@alien{#1},
- alien/.default = green,
- hat/.code = \duck@hattrue
- \def\duck@hat{#1},
- hat/.default = brown,
- cap/.code = \duck@captrue
- \def\duck@cap{#1},
- cap/.default = blue,
- santa/.code = \duck@santatrue
- \def\duck@santa{#1},
- santa/.default = red!80!black,
- chef/.code = \duck@cheftrue
- \def\duck@chef{#1},
- chef/.default = gray!20!white,
- graduate/.code = \duck@graduatetrue
- \def\duck@graduate{#1},
- graduate/.default = black,
- tassel/.code = \def\duck@tassel{#1},
- tassel = red,
- beret/.code = \duck@berettrue
- \def\duck@beret{#1},
- beret/.default = black,
- unicorn/.code = \duck@unicorntrue
- \def\duck@unicorn{#1},
- unicorn/.default = pink,
- magichat/.code = \duck@magichattrue
- \def\duck@magichat{#1},
- magic hat/.forward to = /duck/magichat,
- magichat/.default = violet,
- magicstars/.code = \def\duck@magicstars{#1},
- magic stars/.forward to = /duck/magicstars,
- magicstars = yellow!80!brown,
- witch/.code = \duck@witchtrue
- \def\duck@witch{#1},
- witch/.default = black,
- crown/.code = \duck@crowntrue
- \def\duck@crown{#1},
- crown/.default = yellow,
- queencrown/.code = \duck@queencrowntrue
- \def\duck@queencrown{#1},
- queen crown/.forward to = /duck/queencrown,
- queencrown/.default = yellow,
- kingcrown/.code = \duck@kingcrowntrue
- \def\duck@kingcrown{#1},
- king crown/.forward to = /duck/kingcrown,
- kingcrown/.default = gray,
- bunny/.code = \duck@bunnytrue
- \def\duck@bunny{#1},
- bunny/.default = \duck@body,
- inear/.code = \def\duck@inear{#1},
- in ear/.forward to = /duck/inear,
- inear = \duck@bunny!50!white,
- peakedcap/.code = \duck@peakedcaptrue
- \def\duck@peakedcap{#1},
- peaked cap/.forward to = /duck/peakedcap,
- peakedcap/.default = blue,
- tophat/.code = \duck@tophattrue
- \def\duck@tophat{#1},
- top hat/.forward to = /duck/tophat,
- tophat/.default = black,
- darthvader/.code = \duck@darthvadertrue
- \def\duck@darthvader{#1},
- darth vader/.forward to = /duck/darthvader,
- darthvader/.default = black,
- harlequin/.code = \duck@harlequintrue
- \def\duck@harlequin{#1},
- harlequin/.default = blue,
- niuqelrah/.code = \def\duck@niuqelrah{#1},
- niuqelrah = red,
- strawhat/.code = \duck@strawhattrue
- \def\duck@strawhat{#1},
- straw hat/.forward to = /duck/strawhat,
- strawhat/.default = gray!30!white,
- ribbon/.code = \def\duck@ribbon{#1},
- ribbon = black,
- helmet/.code = \duck@helmettrue
- \def\duck@helmet{#1},
- helmet/.default = gray,
- devil/.code = \duck@deviltrue
- \def\duck@devil{#1},
- devil/.default = red,
- viking/.code = \duck@vikingtrue
- \def\duck@viking{#1}
- \duck@deviltrue
- \def\duck@devil{brown!20!white},
- viking/.default = gray,
- conicalhat/.code = \duck@conicalhattrue
- \def\duck@conicalhat{#1},
- conical hat/.forward to = /duck/conicalhat,
- conicalhat/.default = brown!90!orange!90!white,
- sailor/.code = \duck@sailortrue
- \def\duck@sailor{#1},
- sailor/.default = white!80!gray,
- bobblehat/.code = \duck@bobblehattrue
- \def\duck@bobblehat{#1},
- bobble hat/.forward to = /duck/bobblehat,
- bobblehat/.default = red!70!black,
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % Accessories
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- glasses/.code = \duck@glassestrue
- \def\duck@glasses{#1},
- glasses/.default = black,
- sunglasses/.code = \duck@sunglassestrue
- \def\duck@sunglasses{#1},
- sunglasses/.default = black,
- squareglasses/.code = \duck@squareglassestrue
- \def\duck@squareglasses{#1},
- square glasses/.forward to = /duck/squareglasses,
- squareglasses/.default = black,
- icecream/.code = \duck@icecreamtrue
- \def\duck@cone{#1},
- ice cream/.forward to = /duck/icecream,
- icecream/.default = brown!60!gray,
- flavoura/.code = \def\duck@flavoura{#1},
- flavour a/.forward to = /duck/flavoura,
- flavoura = brown!50!black,
- flavourb/.code = \def\duck@flavourb{#1},
- flavour b/.forward to = /duck/flavourb,
- flavourb = white!70!brown,
- flavourc/.code = \def\duck@flavourc{#1},
- flavour c/.forward to = /duck/flavourc,
- flavourc = red!50!white,
- book/.code = \duck@booktrue
- \def\duck@book{#1},
- bookcolour/.code = \def\duck@bookcolour{#1},
- book colour/.forward to = /duck/bookcolour,
- book color/.forward to = /duck/bookcolour,
- bookcolor/.forward to = /duck/bookcolour,
- bookcolour = brown,
- signpost/.code = \duck@signposttrue
- \def\duck@signpost{#1},
- sign post/.forward to = /duck/signpost,
- signcolour/.code = \def\duck@signcolour{#1},
- sign colour/.forward to = /duck/signcolour,
- sign color/.forward to = /duck/signcolour,
- signcolor/.forward to = /duck/signcolour,
- signcolour = brown!50!black,
- signback/.code = \def\duck@signback{#1},
- sign back/.forward to = /duck/signback,
- signback = green!40!black,
- magicwand/.code = \duck@magicwandtrue,
- magic want/.forward to = /duck/magicwand,
- cricket/.code = \duck@crickettrue
- \def\duck@cricket{#1},
- cricket/.default = brown,
- rollingpin/.code = \duck@rollingpintrue
- \def\duck@rollingpin{#1},
- rolling pin/.forward to = /duck/rollingpin,
- rollingpin/.default = brown,
- lightsaber/.code = \duck@lightsabertrue
- \def\duck@lightsaber{#1},
- light saber/.forward to = /duck/lightsaber,
- lightsaber/.default = green,
- cake/.code = \duck@caketrue
- \def\duck@cake{#1},
- cake/.default = violet,
- pizza/.code = \duck@pizzatrue,
- hockey/.code = \duck@hockeytrue
- \def\duck@hockey{#1},
- hockey/.default = brown,
- baguette/.code = \duck@baguettetrue
- \def\duck@baguette{#1},
- baguette/.default = brown,
- football/.code = \duck@footballtrue
- \def\duck@football{#1},
- football/.default = white,
- mask/.code = \duck@masktrue
- \def\duck@mask{#1},
- mask/.default = black,
- necklace/.code = \duck@necklacetrue
- \def\duck@necklace{#1},
- necklace/.default = white!80!gray,
- milkshake/.code = \duck@milkshaketrue
- \def\duck@milkshake{#1},
- milkshake/.default = red!20!white,
- wine/.code = \duck@winetrue
- \def\duck@wine{#1},
- wine/.default = red!70!black,
- prison/.code = \duck@prisontrue
- \def\duck@prison{#1},
- prison/.default = gray,
- speech/.code = \duck@speechtrue
- \def\duck@speech{#1},
- think/.code = \duck@thinktrue
- \def\duck@think{#1},
- bubblecolour/.code = \def\duck@bubblecolour{#1},
- bubble colour/.forward to = /duck/bubblecolour,
- bubble color/.forward to = /duck/bubblecolour,
- bubblecolor/.forward to = /duck/bubblecolour,
- bubblecolour = gray!30!white,
- torch/.code = \duck@torchtrue
- \def\duck@torch{#1},
- torch/.default = gray,
- basket/.code = \duck@baskettrue
- \def\duck@basket{#1},
- basket/.default = brown!70!gray,
- easter/.code = \duck@eastertrue
- \duck@baskettrue
- \def\duck@basket{#1},
- easter/.default = brown!70!gray,
- egga/.code = \def\duck@egga{#1},
- egg a/.forward to = /duck/egga,
- egga = blue,
- eggb/.code = \def\duck@eggb{#1},
- egg b/.forward to = /duck/eggb,
- eggb = green,
- eggc/.code = \def\duck@eggc{#1},
- egg c/.forward to = /duck/eggc,
- eggc = red,
- buttons/.code = \duck@buttonstrue
- \def\duck@buttons{#1},
- buttons/.default = black,
- sheep/.code = \duck@sheeptrue
- \def\duck@sheep{#1},
- sheep/.default = \duck@body,
- horsetail/.code = \duck@horsetailtrue
- \def\duck@horsetail{#1},
- horsetail/.default = brown,
- crozier/.code = \duck@croziertrue
- \def\duck@crozier{#1},
- crozier/.default = brown,
- davidlikespineapplepizza/.code = \duck@davidlikespineapplepizzatrue
- \duck@speechtrue
- \def\duck@speech{\scalebox{\scalingfactor}{\scalebox{0.9}{\tiny ih, che schifo!}}},
- david likes pineapple pizza/.forward to = /duck/davidlikespineapplepizza,
- wing/.code = \duck@wingtrue
- \def\duck@wing{#1},
- wing/.default = yellow!50!brown,
- stethoscope/.code = \duck@stethoscopetrue
- \def\duck@stethoscope{#1},
- stethoscope/.default = gray,
- neckerchief/.code = \duck@neckerchieftrue
- \def\duck@neckerchief{#1},
- neckerchief/.default = brown,
- woggle/.code = \def\duck@woggle{#1},
- woggle = brown!50!black,
- snowduck/.code = \duck@snowducktrue
- \def\duck@snowduck{#1}
- \def\duck@eye{#1}
- \def\duck@body{#1}
- \duck@tophattrue
- \def\duck@tophat{black}
- \duck@buttonstrue
- \def\duck@buttons{black},
- snow duck/.forward to = /duck/snowduck,
- snowduck/.default = gray!15!white,
- vampire/.code = \duck@vampiretrue
- \def\duck@vampire{#1},
- vampire/.default = white!85!yellow,
- crystalball/.code = \duck@crystalballtrue
- \def\duck@crystalball{#1},
- crystal ball/.forward to = /duck/crystalball,
- crystalball/.default = cyan,
- cheese/.code = \duck@cheesetrue
- \def\duck@cheese{#1},
- cheese/.default = orange,
- shovel/.code = \duck@shoveltrue
- \def\duck@shovel{#1},
- shovel/.default = gray,
- pickaxe/.code = \duck@pickaxetrue
- \def\duck@pickaxe{#1},
- pickaxe/.default = gray,
- strawbroom/.code = \duck@strawbroomtrue
- \def\duck@strawbroom{#1},
- strawbroom/.default = brown!50!white,
- strawbroomstick/.code = \def\duck@strawbroomstick{#1},
- strawbroomstick = brown,
- strawbroomribbon/.code = \def\duck@strawbroomribbon{#1},
- strawbroomribbon = red!50!black,
- broom/.code = \duck@broomtrue
- \def\duck@broom{#1},
- broom/.default = brown,
- broomstick/.code = \def\duck@broomstick{#1},
- broomstick = gray!50!black,
- umbrella/.code = \duck@umbrellatrue
- \def\duck@umbrella{#1},
- umbrella/.default = cyan,
- umbrellaclosed/.code = \duck@umbrellaclosedtrue
- \def\duck@umbrellaclosed{#1},
- umbrellaclosed/.default = cyan,
- umbrella closed/.forward to = /duck/umbrellaclosed,
- handbag/.code = \duck@handbagtrue
- \def\duck@handbag{#1},
- handbag/.default = red!70!black,
- cocktail/.code = \duck@cocktailtrue,
- overleaf/.code = \duck@overleaftrue
- \def\duck@body{duck@overleafcol}
- \duck@graduatetrue
- \def\duck@graduate{black}
- \duck@squareglassestrue
- \def\duck@squareglasses{black},
- banana/.code = \duck@bananatrue
- \def\duck@banana{#1},
- banana/.default = yellow!80!orange,
- stick/.code = \duck@sticktrue
- \def\duck@stick{#1},
- stick/.default = red!60!green,
- leaf/.code = \def\duck@leaf{#1},
- leaf = green!70!red
-}
-
-\def\duck@draw{
-%\scope
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% minimal bounding box size
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@invisible
-\else
- \path (0.1,0.1) rectangle (2.1,2.12);
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% defining some coordinates
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@name
- \coordinate (\duck@name-wing) at (0.8,0.7);
- \coordinate (\duck@name-head) at (0.9,2);
- \coordinate (\duck@name-bill) at (0.5,1.3);
- \coordinate (\duck@name-tail) at (1.82,1.41);
-\fi
-\coordinate (wing) at (0.8,0.7);
-\coordinate (head) at (0.9,2);
-\coordinate (bill) at (0.5,1.3);
-\coordinate (tail) at (1.82,1.41);
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% store the current scale factor
-% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
-\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
-\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
-\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Environment
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname duckhookbackground\endcsname
-%
-% water %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@water
- \fill[\duck@water, even odd rule] (1.00,0.40) ellipse[x radius=0.88, y radius=0.35] (1.00,0.40) ellipse[x radius=0.75, y radius=0.25];
- \fill[\duck@water, even odd rule] (1.00,0.40) ellipse[x radius=1.05, y radius=0.50] (1.00,0.40) ellipse[x radius=0.95, y radius=0.42];
- \fill[\duck@water, even odd rule] (1.00,0.40) ellipse[x radius=1.23, y radius=0.63] (1.00,0.40) ellipse[x radius=1.17, y radius=0.57];
- \fill[\duck@water, even odd rule] (1.00,0.40) ellipse[x radius=1.42, y radius=0.77] (1.00,0.40) ellipse[x radius=1.38, y radius=0.73];
-\fi
-%
-% sheep %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@sheep
- \fill[\duck@sheep] (0.65,1.95) circle[radius=0.15] (0.50,1.75) circle[radius=0.15] (0.46,1.51) circle[radius=0.15] (0.37,1.00) circle[radius=0.15] (0.23,0.80) circle[radius=0.15] (0.20,0.60) circle[radius=0.15] (0.25,0.45) circle[radius=0.15] (0.35,0.30) circle[radius=0.15] (0.55,0.25) circle[radius=0.15] (0.75,0.20) circle[radius=0.15] (0.95,0.16) circle[radius=0.15] (1.15,0.20) circle[radius=0.15] (1.35,0.23) circle[radius=0.15] (1.55,0.30) circle[radius=0.15] (1.75,0.38) circle[radius=0.15] (1.95,0.50) circle[radius=0.15] (2.05,0.65) circle[radius=0.15] (2.10,0.85) circle[radius=0.15] (2.05,1.00) circle[radius=0.15] (2.00,1.15) circle[radius=0.15] (1.85,1.35) circle[radius=0.15] (1.60,1.25) circle[radius=0.15] (1.35,1.25) circle[radius=0.15] (1.30,1.50) circle[radius=0.15] (1.30,1.70) circle[radius=0.15] (1.20,1.90) circle[radius=0.15] (0.85,2.05) circle[radius=0.15] (1.05,2.00) circle[radius=0.15];
-\fi
-%
-% devil (back horn) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@devil
- \fill[\duck@devil] (0.7723,2.3756) .. controls (0.6369,2.1184) and (0.7916,2.0228) .. (0.8360,1.9897) .. controls (0.8744,1.9675) and (0.8774,1.9511) .. (0.8853,1.9173) .. controls (0.8853,1.8595) and (0.8407,1.8127) .. (0.7856,1.8127) .. controls (0.7535,1.8178) and (0.7240,1.8231) .. (0.6965,1.8545) .. controls (0.6965,1.8545) and (0.4451,2.2259) .. (0.7723,2.3756) -- cycle;
-\fi
-% Conical Hat (background) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@conicalhat
- \fill[\duck@conicalhat!50!black,rotate=-21] (0.265,1.915) ellipse[x radius=0.79, y radius=0.1];
- \fill[\duck@conicalhat!30!black] (0.5501,0.9739) -- (0.2002,1.9676) -- (0.2946,2.0008) -- (0.6445,1.0072) -- cycle;
-\fi
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% body parts
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@invisible
-\else
-%
-% body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\duck@body,overlay] \duckpathbody;
-%
-% head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifdefined\duck@head\else\let\duck@head=\duck@body\fi
-\fill[\duck@head]
- (0.90,1.50) ellipse[x radius=0.50, y radius=0.625];
-%
-% bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@grumpy
- \fill[\duck@bill] \duckpathgrumpybill;
-\else
- \ifduck@laughing
- \fill[\duck@bill!80!black,overlay] (0.40,1.20) .. controls (0.54,1.36) and (0.65,1.31) .. (0.91,1.37) .. controls (0.45,1.06) and (0.36,1.18) .. (0.40,1.20) -- cycle;
- \fill[\duck@bill,overlay] (0.41,1.47) .. controls (0.64,1.53) and (0.54,1.30) .. (0.91,1.37) .. controls (-0.02,1.10) and (0.28,1.37) .. (0.41,1.47) -- cycle;
- \else
- \ifduck@parrot
- \fill[\duck@bill!80!black]
- (0.40,1.45) .. controls (0.51,1.48) and (0.54,1.44) .. (0.59,1.39) .. controls (0.63,1.34) and (0.69,1.34) .. (0.86,1.35) .. controls (0.43,1.15) and (0.37,1.13) .. (0.34,1.20) .. controls (0.52,1.27) and (0.34,1.40) .. (0.40,1.45) -- cycle;
- \fill[\duck@bill]
- (0.39,1.49) .. controls (0.50,1.52) and (0.54,1.44) .. (0.59,1.39) .. controls (0.63,1.34) and (0.68,1.34) .. (0.86,1.35) .. controls (0.43,1.15) and (0.54,1.40) .. (0.22,1.20) .. controls (0.24,1.52) and (0.39,1.49) .. (0.39,1.49) -- cycle;
- \else
- \fill[\duck@bill] \duckpathbill;
- \fi
- \fi
-\fi
-%
-% Superhero mask %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% has to be behind the eyes
-\ifduck@mask
- \scope
- \clip (0.90,1.50) ellipse[x radius=0.50, y radius=0.625];
- \fill[\duck@mask,rotate=-15] (-0.1,1.59) rectangle (1.3,1.88);
- \endscope
-\fi%
-%
-% right eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\duck@eye, rotate=-20]
- (0.23,1.7675) ellipse[x radius=0.0893, y radius=0.125];
-\fill[\duck@pupil, rotate=-20]
- (0.26,1.7575) ellipse[x radius=0.0357, y radius=0.0714];
-%
-% left eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\fill[\duck@eye, rotate=-20]
- (-0.06,1.74) ellipse[x radius=0.0786, y radius=0.1143];
-\fill[\duck@pupil, rotate=-20]
- (-0.03,1.73) ellipse[x radius=0.0286, y radius=0.0643];
-%
-\fi % from no duck
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname duckhookbody\endcsname
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% clothing
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Strap of the conical hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@conicalhat
- \ifduck@clothing
- \fill[\duck@conicalhat!30!black] (1.5943,1.5059) .. controls (1.4384,1.3576) and (1.2780,1.2120) .. (1.0987,1.0923) -- (1.0617,0.9549) .. controls (1.2151,1.0361) and (1.3476,1.1504) .. (1.4785,1.2630) .. controls (1.5417,1.3187) and (1.6038,1.3757) .. (1.6644,1.4344) -- cycle;
- \else
- \fill[\duck@conicalhat!30!black] (1.5943,1.5059) .. controls (1.4384,1.3576) and (1.2780,1.2120) .. (1.0987,1.0923) .. controls (0.9540,0.9995) and (0.7864,0.9875) .. (0.6358,1.0398) .. controls (0.6727,0.9043) and (0.9752,0.9113) .. (1.0617,0.9549) .. controls (1.2151,1.0361) and (1.3476,1.1504) .. (1.4785,1.2630) .. controls (1.5417,1.3187) and (1.6038,1.3757) .. (1.6644,1.4344) -- cycle;
- \fi
-\fi
-%
-% tshirt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@tshirt
- \fill[\duck@tshirt,overlay] \duckpathtshirt;
-\fi
-%
-% tie %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@tie
- \fill[\duck@tie,rotate=-12] (0.32,0.7) rectangle (0.43,1.15);
-\fi
-%
-% jacket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@jacket
- \fill[\duck@jacket,overlay] \duckpathjacket;
-\fi
-%
-% Áo dài %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@aodai
- \fill[\duck@aodai,overlay] (1.819,1.419) .. controls (2.871,0.120) and (0.711,-0.145) .. (0.296,0.251) .. controls (-0.118,0.647) and (0.232,1.073) .. (0.440,1.128) -- (0.567,0.927) .. controls (0.567,0.927) and (0.543,0.906) .. (0.509,0.882) -- (0.481,0.929) -- (0.458,0.915) -- (0.487,0.868) .. controls (0.473,0.859) and (0.457,0.850) .. (0.441,0.842) -- (0.422,0.894) -- (0.397,0.885) -- (0.417,0.831) .. controls (0.404,0.826) and (0.391,0.821) .. (0.378,0.818) -- (0.364,0.869) -- (0.338,0.862) -- (0.351,0.815) .. controls (0.334,0.814) and (0.318,0.817) .. (0.304,0.825) .. controls (0.303,0.774) and (0.329,0.759) .. (0.365,0.763) -- (0.376,0.722) -- (0.402,0.729) -- (0.391,0.768) .. controls (0.405,0.772) and (0.420,0.778) .. (0.435,0.784) -- (0.447,0.750) -- (0.472,0.759) -- (0.459,0.796) .. controls (0.477,0.805) and (0.496,0.815) .. (0.512,0.825) -- (0.533,0.791) -- (0.556,0.805) -- (0.535,0.840) .. controls (0.567,0.860) and (0.590,0.877) .. (0.590,0.877) .. controls (1.011,1.168) and (0.887,0.936) .. (1.819,1.419) -- cycle;
-\fi
-%
-% lapel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@lapel
- \fill[\duck@lapel] (0.490,1.145) .. controls (0.3984,1.13) and (0.3515,1.08) .. (0.3515,1.08) -- (0.4265,1.0192) -- (0.35,0.98) -- (0.513,0.700) -- (1.0089,0.9162) -- (0.9547,0.9868) -- (1.1194,0.9782) -- (1.0822,1.135) .. controls (0.9616,1.1) and (0.8648,1.0300) .. (0.513,0.700) -- cycle;
-\fi
-%
-% stripes for football jersey %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@stripes
- \duck@stripes
-\fi
-%
-% superhero cape %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@cape
- \fill[\duck@cape,overlay] \duckpathcape;
-\fi
-%
-% bowtie %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@bowtie
- \fill[\duck@bowtie] (0.4382, 1.1105) .. controls (0.3984, 1.0671) and (0.3911, 0.9535) .. (0.4116, 0.9176) .. controls (0.4958, 0.9064) and (0.565, 0.9487) .. (0.565, 0.9487) -- (0.6448, 0.9398) .. controls (0.6448, 0.9398) and (0.6777, 0.8844) .. (0.804, 0.8689) .. controls (0.8323, 0.9056) and (0.8422, 1.0026) .. (0.8284, 1.0551) .. controls (0.7881, 1.0942) and (0.6537, 1.0285) .. (0.6537, 1.0285) -- (0.5739, 1.0374) .. controls (0.5739, 1.0374) and (0.5436, 1.0956) .. (0.4382, 1.1105) -- cycle;
-\fi
-%
-% necklace (not really clothing, but needs to be below the hair) %%%%%
-\ifduck@necklace
- \fill[\duck@necklace] (0.5000,1.112) circle[radius=0.032] (0.5100,1.050) circle[radius=0.032] (0.5200,0.990) circle[radius=0.032] (0.5400,0.931) circle[radius=0.032] (0.5825,0.885) circle[radius=0.032] (0.6450,0.885) circle[radius=0.032] (0.7000,0.910) circle[radius=0.032] (0.7500,0.945) circle[radius=0.032] (0.8000,0.980) circle[radius=0.032] (0.8500,1.020) circle[radius=0.032] (0.9000,1.050) circle[radius=0.032] (0.9500,1.080) circle[radius=0.032] (1.0000,1.110) circle[radius=0.032] (1.0550,1.130) circle[radius=0.032] (1.1100,1.150) circle[radius=0.032] (1.1650,1.165) circle[radius=0.032] (1.2200,1.180) circle[radius=0.032] (1.2750,1.195) circle[radius=0.032] (1.3300,1.210) circle[radius=0.032];
-\fi
-%
-% Scout neckerchief %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@neckerchief
- \fill[\duck@neckerchief]
- (0.3650,1.0892) .. controls (0.4127,1.1589) and (0.4900,1.1450) .. (0.4900,1.1450) .. controls (0.6500,0.9300) and (1.1366,1.2400) .. (1.3675,1.2649) .. controls (1.4131,1.2533) and (1.4052,1.2446) .. (1.4099,1.2124) .. controls (1.3028,1.0810) and (0.7415,0.8930) .. (0.6807,0.9076) .. controls (0.8257,0.7387) and (0.6347,0.7168) .. (0.7151,0.4426) .. controls (0.6059,0.5672) and (0.5513,0.6588) .. (0.5938,0.8388) .. controls (0.5871,0.6953) and (0.4493,0.7565) .. (0.4716,0.4967) .. controls (0.3682,0.6697) and (0.3820,0.7984) .. (0.5321,0.9351) .. controls (0.4635,0.9699) and (0.4115,1.0215) .. (0.3650,1.0892) -- cycle;
- \fill[\duck@woggle, rounded corners=\scalingfactor*1, rotate=-10] (0.33,1.05) rectangle (0.55,0.98);
-\fi
-%
-% Scarf %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@scarf
- \fill[\duck@scarf] (1.3780,1.2876) .. controls (1.1405,1.0484) and (0.7278,0.8710) .. (0.4865,1.1319) .. controls (0.4312,1.1245) and (0.3749,1.1088) .. (0.3443,1.0553) .. controls (0.4097,0.9269) and (0.4360,0.9534) .. (0.5231,0.8623) -- (0.4780,0.5230) -- (0.5666,0.5486) -- (0.6442,0.5011) -- (0.6584,0.6852) -- (0.6881,0.3913) -- (0.7782,0.4358) -- (0.8543,0.4133) -- (0.7988,0.8309) .. controls (1.0539,0.8635) and (1.1298,0.8415) .. (1.4849,1.1302) .. controls (1.4898,1.1985) and (1.4313,1.2543) .. (1.3780,1.2876) -- cycle;
-\fi
-%
-% buttons (same argument as for the necklace)
-\ifduck@buttons
- \ifduck@jacket
- \fill[\duck@buttons] (0.49,0.6) circle[radius=0.05] (0.46,0.45) circle[radius=0.05] (0.45,0.3) circle[radius=0.05];
- \else
- \fill[\duck@buttons] (0.53,0.75) circle[radius=0.05] (0.5,0.6) circle[radius=0.05] (0.47,0.45) circle[radius=0.05];
- \fi
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname duckhookclothing\endcsname
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% hair styles
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% short hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@shorthair
- \path (0.1,0.1) rectangle (2.1,2.25);
- \fill[\duck@hair,overlay] \duckpathshorthair;
-\fi
-%
-% long hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@longhair
- \path (0.1,0.1) rectangle (2.1,2.25);
- \fill[\duck@hair,overlay] \duckpathlonghair;
-\fi
-%
-% crazy hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@crazyhair
- \path (0.1,0.1) rectangle (2.1,2.4);
- \fill[\duck@hair,overlay] \duckpathcrazyhair;
-\fi
-%
-% receding hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@recedinghair
- \path (0.1,0.1) rectangle (2.1,2.18);
- \fill[\duck@hair,overlay] \duckpathrecedinghair;
-\fi
-%
-% mohican hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@mohican
- \path (0.1,0.1) rectangle (2.1,2.24);
- \fill[\duck@hair,overlay] \duckpathmohican;
-\fi
-%
-% mullet hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@mullet
- \path (0.1,0.1) rectangle (2.1,2.17);
- \fill[\duck@hair,overlay] \duckpathmullet;
-\fi
-%
-% middle parting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@parting
- \path (0.1,0.1) rectangle (2.1,2.22);
- \fill[\duck@hair,overlay] (1.4053,1.5403) .. controls (1.5524,2.2939) and (0.3739,2.5180) .. (0.4084,1.6117) .. controls (0.4248,1.8921) and (0.7860,1.9734) .. (0.7860,1.9734) .. controls (1.1125,1.5754) and (1.3375,1.4715) .. (1.4053,1.5403) -- cycle;
-\fi
-%
-% eye brow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfkeys{/duck/eyebrow/.@def/.get=\duck@test}
-\ifx\duck@eyebrow\duck@test
- \ifdefined\duck@hair\let\duck@eyebrow=\duck@hair\fi
-\fi%
-\ifduck@eyebrow
- \fill[\duck@eyebrow, rounded corners=\scalingfactor*1, rotate=60] (1.92,0.21) rectangle (1.98,-0.01);
- \fill[\duck@eyebrow, rounded corners=\scalingfactor*1, rotate=100] (1.67,-0.77) rectangle (1.73,-0.95);
-\fi
-%
-% beard %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfkeys{/duck/beard/.@def/.get=\duck@test}
-\ifx\duck@beard\duck@test
- \ifdefined\duck@hair\let\duck@beard=\duck@hair\fi
-\fi%
-\ifduck@beard
- \fill[\duck@beard] (1.3,1.3) circle[radius=0.12] (1.2,1.15) circle[radius=0.12] (0.5,1.05) circle[radius=0.1] (0.525,0.90) circle[radius=0.12] (0.525,0.75) circle[radius=0.12] (0.65,0.65) circle[radius=0.14] (0.75,0.75) circle[radius=0.12] (0.85,0.85) circle[radius=0.12] (0.95,0.95) circle[radius=0.12] (1.05,1.05) circle[radius=0.12] (1.15,1.25) circle[radius=0.12] (1,1.20) circle[radius=0.12] (0.85,1.20) circle[radius=0.12] (0.75,1.15) circle[radius=0.12] (0.65,1.10) circle[radius=0.12] (0.58,1.07) circle[radius=0.12] (0.44,1.46) circle[radius=0.06] (0.52,1.45) circle[radius=0.06] (0.6, 1.41) circle[radius=0.06] (0.68,1.36) circle[radius=0.06] (0.76,1.34) circle[radius=0.06] (0.86,1.26) circle[radius=0.12] (0.38,1.44) circle[radius=0.03] (1,1.28) circle[radius=0.12];
- \fill[\duck@beard] (1.3,1.3) -- (0.5,1.05) -- (0.65,0.65) -- cycle;
-\fi%
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname duckhookhair\endcsname
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Headgear
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% alien %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@alien
- \fill[\duck@alien,rotate=-25] (0.09,2.1) rectangle (0.16,2.6);
- \fill[\duck@alien,rotate=5] (0.79,1.86) rectangle (0.86,2.25);
- \fill[\duck@alien] (1.20,2.30) circle[radius=0.07];
- \fill[\duck@alien] (0.62,2.35) circle[radius=0.07];
-\fi
-%
-% hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@hat
- \ifdefined\duck@hair % with hair
- \fill[\duck@hat,rotate=-15] (0.44,2.1) ellipse[x radius=0.7, y radius=0.1];
- \fill[\duck@hat,rotate=-15] (0.0,2.1) rectangle (0.88,2.4);
- \fill[\duck@hat,rotate=-15] (0.44,2.4) ellipse[x radius=0.44, y radius=0.08];
- \else % without hair
- \fill[\duck@hat,rotate=-15] (0.44,2.1) ellipse[x radius=0.6, y radius=0.1];
- \fill[\duck@hat,rotate=-15] (0.07,2.1) rectangle (0.81,2.4);
- \fill[\duck@hat,rotate=-15] (0.44,2.4) ellipse[x radius=0.37, y radius=0.08];
- \fi
-\fi
-%
-% cap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@cap
- \fill[\duck@cap, start angle=0, end angle=150, radius=0.5] (1.4,1.75) arc;
- \fill[\duck@cap,rotate=-15] (0.3,2.05) ellipse[x radius=0.6, y radius=0.15];
-\fi
-%
-% Santa %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@santa
- \fill[\duck@santa]
- (0.430,1.803) .. controls (0.590,2.174) and (0.837,2.065) ..
- (1.118,1.954) .. controls (1.679,1.731) and (1.328,1.193) ..
- (1.647,1.057) .. controls (1.638,1.255) and (1.745,2.104) ..
- (1.168,2.270) .. controls (0.867,2.356) and (0.536,2.280) ..
- (0.430,1.803) -- cycle;
- \fill[white!80!brown]
- (0.44,1.733) .. controls (0.211,2.299) and (1.082,2.188) ..
- (1.456,1.759) .. controls (1.534,1.637) and (1.480,1.545) ..
- (1.400,1.566) .. controls (1.265,1.714) and (0.577,2.267) ..
- (0.44,1.733) -- cycle;
- \fill[white!80!brown] (1.6,1.0) circle[radius=0.17];
-\fi
-%
-% Chef hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@chef
- \fill[\duck@chef,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.08];
- \fill[\duck@chef,rotate=-15] (0.07,2.1) rectangle (0.81,2.55);
- \fill[\duck@chef] (1.01,2.47) circle[radius=0.17];
- \fill[\duck@chef] (1.24,2.35) circle[radius=0.15];
- \fill[\duck@chef] (0.77,2.40) circle[radius=0.12];
- \fill[\duck@chef] (1.39,2.20) circle[radius=0.12];
-\fi
-%
-% graduate hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@graduate
- \fill[\duck@graduate,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.1];
- \fill[\duck@graduate,rotate=-15] (0.07,2.1) rectangle (0.81,2.3);
- \fill[\duck@graduate] (0.3,2.25) -- (1.05,2.35) -- (1.7,1.95) -- (0.92,1.85) -- cycle;
- \fill[\duck@tassel,rounded corners=\scalingfactor*1] (1.12,1.89) -- (1.01,2.1) -- (1.09,2.11) -- (1.2,1.9) -- (1.2,1.3) -- (1.12,1.3) -- cycle;
- \fill[\duck@tassel] (1.16,1.3) ellipse[x radius=0.06, y radius=0.12];
-\fi
-%
-% beret %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@beret
- \fill[\duck@beret,rotate=-25] (0.13,2.15) ellipse[x radius=0.5, y radius=0.17];
- \fill[\duck@beret,rotate=-25] (0.13,2.25) ellipse[x radius=0.55, y radius=0.17];
- \fill[\duck@beret,rotate=-25] (0.13,2.4) circle[radius=0.08];
-\fi
-%
-% unicorn %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@unicorn
- \fill[\duck@unicorn,rotate=25] (1.48,1.4375)--(1.60,1.9)--(1.72,1.4375);
- \fill[\duck@body!100,rotate=25] (1.50,1.43)--(1.60,1.8375)--(1.70,1.43);
-\fi
-%
-% magic hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@magichat
- \path[preaction={fill, \duck@magichat!100},rotate=-5,
- pattern=fivepointed stars, pattern color=\duck@magicstars!100]
- (0.36,1.95)--(0.86,2.95)--(1.20,1.85);
-\fi
-%
-% witch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@witch
- \fill[\duck@witch,rotate=-15] (0.44,2.13) ellipse[x radius=0.75, y radius=0.17];
- \fill[\duck@witch,rotate=-15] (0.05,2.2)--(0.45,3.2)--(0.82,2.2);
-\fi
-%
-% crown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@crown
- \path (0.7,1.95) rectangle (1.4,2.45);
- \fill[\duck@crown,overlay] \duckpathcrown;
-\fi
-%
-% Queen crown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@queencrown
- \fill[\duck@queencrown] \duckpathqueencrown;
-\fi
-%
-% King crown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@kingcrown
- \fill[\duck@kingcrown] \duckpathkingcrown;
-\fi
-%
-% Bunny ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@bunny
- \path (0.55,1.9) rectangle (1.2,2.55);
- \pgfinterruptboundingbox
- \scope
- \clip[rotate=-5] (0.68,2.38) ellipse[x radius=0.3, y radius=0.4];
- \fill[\duck@bunny,rotate=-5] (1.06,2.2) ellipse[x radius=0.3, y radius=0.4] (0.28,2.26) ellipse[x radius=0.3, y radius=0.4];
- \endscope
-
- \scope
- \clip[rotate=-5] (0.68,2.38) ellipse[x radius=0.25, y radius=0.35];
- \fill[\duck@inear,rotate=-5] (1.06,2.2) ellipse[x radius=0.25, y radius=0.35] (0.28,2.26) ellipse[x radius=0.25, y radius=0.35];
- \endscope
- \endpgfinterruptboundingbox
-\fi
-%
-% peaked cap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@peakedcap
- \fill[\duck@peakedcap,rotate=-15] (0.35,2.05) ellipse[x radius=0.5, y radius=0.15];
- \fill[\duck@peakedcap,rotate=-25] (0.13,2.15) ellipse[x radius=0.5, y radius=0.17];
- \fill[\duck@peakedcap,rotate=-35] (-0.25,2.2) ellipse[x radius=0.55, y radius=0.17];
-\fi
-%
-% tophat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@tophat
- \fill[\duck@tophat,rotate=-15] (0.44,2.1) ellipse[x radius=0.48, y radius=0.1];
- \fill[\duck@tophat,rotate=-15] (0.12,2.1) -- (0.75,2.1) -- (0.81,2.55) -- (0.07,2.55) -- cycle;
- \fill[\duck@tophat,rotate=-15] (0.44,2.55) ellipse[x radius=0.37, y radius=0.08];
-\fi
-%
-% darth vader %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@darthvader
- \path (0.1,0.1) rectangle (2.1,2.22);
- \fill[\duck@darthvader,overlay] \duckpathdarthvader;
-\fi
-%
-% Harlequin duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@harlequin
- \path (0.19,1.85) rectangle (1.85,2.67);
- \fill[\duck@harlequin,overlay] (0.6006,1.9719) .. controls (0.7432,1.8954) and (0.9320,1.8698) .. (0.9320,1.8698) -- (1.0404,2.3839) .. controls (0.9223,2.8873) and (0.1755,2.5634) .. (0.3019,2.2958) .. controls (0.5807,2.5024) and (0.7251,2.3376) .. (0.6006,1.9719) -- cycle;
- \fill[\duck@niuqelrah,overlay] (1.2853,1.8902) .. controls (1.1177,1.8507) and (0.9278,1.8703) .. (0.9278,1.8703) -- (1.0404,2.3839) .. controls (1.3637,2.8347) and (1.9373,2.3532) .. (1.7049,2.1284) .. controls (1.5267,2.3895) and (1.3204,2.2666) .. (1.2853,1.8902) -- cycle;
- \fill[\duck@harlequin] (1.7,2.07) circle[radius=0.1];
- \fill[\duck@niuqelrah] (0.3,2.23) circle[radius=0.1];
-\fi
-%
-% Straw hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@strawhat
- \fill[\duck@strawhat,rotate=-15] (0.44,2.0) ellipse[x radius=0.75, y radius=0.1];
- \fill[\duck@strawhat,rotate=-15] (0.1,2.05) rectangle (0.78,2.5);
- \fill[\duck@strawhat,rotate=-15] (0.44,2.5) ellipse[x radius=0.34, y radius=0.08];
- \fill[\duck@strawhat,rotate=-15] (-0.3,2.02) -- (1.18,2.02) -- (0.78,2.2) -- (0.1,2.2) -- cycle;
- \fill[\duck@ribbon,rotate=-15] (0.44,2.2) ellipse[x radius=0.34, y radius=0.08];
- \fill[\duck@ribbon,rotate=-15] (0.1,2.2) rectangle (0.78,2.3);
- \fill[\duck@strawhat,rotate=-15] (0.44,2.3) ellipse[x radius=0.34, y radius=0.08];
-\fi
-%
-% helmet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@helmet
- \fill[\duck@helmet] (1.4331,1.5155) .. controls (1.4365,1.7226) and (1.3866,2.0493) .. (1.0429,2.1279) .. controls (0.7050,2.2052) and (0.4794,1.9294) .. (0.4481,1.8183) .. controls (0.6062,1.8381) and (1.1506,1.7480) .. (1.4331,1.5155) -- cycle;
- \fill[\duck@helmet!70!black] (1.0282,2.1360) .. controls (0.9395,2.1312) and (0.8696,2.0652) .. (0.8152,2.0010) .. controls (0.7824,1.9609) and (0.7546,1.9169) .. (0.7309,1.8709) .. controls (0.6510,1.8859) and (0.5703,1.8971) .. (0.4892,1.9024) .. controls (0.4595,1.8831) and (0.4114,1.7962) .. (0.4743,1.7961) .. controls (0.5446,1.7868) and (0.6149,1.7767) .. (0.6845,1.7629) .. controls (0.6647,1.7052) and (0.6469,1.6454) .. (0.6401,1.5851) -- (0.6583,1.5355) -- (0.7069,1.5673) .. controls (0.7193,1.6285) and (0.7363,1.6889) .. (0.7590,1.7471) .. controls (0.9991,1.6922) and (1.2114,1.6182) .. (1.4111,1.4722) .. controls (1.4369,1.4960) and (1.4536,1.5229) .. (1.4475,1.5553) .. controls (1.4417,1.5927) and (1.4030,1.6066) .. (1.3766,1.6276) .. controls (1.2054,1.7408) and (1.0085,1.8089) .. (0.8095,1.8546) .. controls (0.8733,1.9674) and (0.9684,2.0703) .. (1.0932,2.1138) .. controls (1.0751,2.1288) and (1.0515,2.1362) .. (1.0282,2.1360) -- cycle;
- \fill[\duck@helmet!50!white] (0.502,1.845) circle[radius=0.015] (0.586,1.835) circle[radius=0.015] (0.684,1.822) circle[radius=0.015] (0.791,1.799) circle[radius=0.015] (0.899,1.770) circle[radius=0.015] (1.003,1.741) circle[radius=0.015] (1.099,1.706) circle[radius=0.015] (1.185,1.673) circle[radius=0.015] (1.276,1.629) circle[radius=0.015] (1.360,1.581) circle[radius=0.015] (0.676,1.606) circle[radius=0.015] (0.695,1.666) circle[radius=0.015] (0.714,1.729) circle[radius=0.015] (0.784,1.889) circle[radius=0.015] (0.835,1.968) circle[radius=0.015] (0.896,2.034) circle[radius=0.015] (0.957,2.081) circle[radius=0.015] (1.020,2.115) circle[radius=0.015] (1.422,1.535) circle[radius=0.015] (0.502,1.845) circle[radius=0.015];
-\fi
-%
-% Viking %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@viking
- \fill[\duck@viking] (1.4331,1.5155) .. controls (1.4365,1.7226) and (1.3866,2.0493) .. (1.0429,2.1279) .. controls (0.7050,2.2052) and (0.4794,1.9294) .. (0.4481,1.8183) .. controls (0.6062,1.8381) and (1.1506,1.7480) .. (1.4331,1.5155) -- cycle;
- \fill[\duck@viking!70!black] (1.0282,2.1360) .. controls (0.9395,2.1312) and (0.8696,2.0652) .. (0.8152,2.0010) .. controls (0.7824,1.9609) and (0.7546,1.9169) .. (0.7309,1.8709) .. controls (0.6510,1.8859) and (0.5703,1.8971) .. (0.4892,1.9024) .. controls (0.4595,1.8831) and (0.4114,1.7962) .. (0.4743,1.7961) .. controls (0.5446,1.7868) and (0.6149,1.7767) .. (0.6845,1.7629) .. controls (0.6845,1.7629) and (0.6845,1.7629) .. (0.7590,1.7471) .. controls (0.9991,1.6922) and (1.2114,1.6182) .. (1.4111,1.4722) .. controls (1.4369,1.4960) and (1.4536,1.5229) .. (1.4475,1.5553) .. controls (1.4417,1.5927) and (1.4030,1.6066) .. (1.3766,1.6276) .. controls (1.2054,1.7408) and (1.0085,1.8089) .. (0.8095,1.8546) .. controls (0.8733,1.9674) and (0.9684,2.0703) .. (1.0932,2.1138) .. controls (1.0751,2.1288) and (1.0515,2.1362) .. (1.0282,2.1360) -- cycle;
- \fill[\duck@viking!50!white] (0.502,1.845) circle[radius=0.015] (0.586,1.835) circle[radius=0.015] (0.684,1.822) circle[radius=0.015] (0.791,1.799) circle[radius=0.015] (0.899,1.770) circle[radius=0.015] (1.003,1.741) circle[radius=0.015] (1.099,1.706) circle[radius=0.015] (1.185,1.673) circle[radius=0.015] (1.276,1.629) circle[radius=0.015] (1.360,1.581) circle[radius=0.015] (0.784,1.889) circle[radius=0.015] (0.835,1.968) circle[radius=0.015] (0.896,2.034) circle[radius=0.015] (0.957,2.081) circle[radius=0.015] (1.020,2.115) circle[radius=0.015] (1.422,1.535) circle[radius=0.015];
-\fi
-%
-% devil (front horn) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@devil
- \fill[\duck@devil] (1.2185,2.3521) .. controls (1.3540,2.0950) and (1.1993,1.9994) .. (1.1548,1.9663) .. controls (1.1165,1.9441) and (1.1134,1.9277) .. (1.1056,1.8938) .. controls (1.1056,1.8361) and (1.1502,1.7893) .. (1.2052,1.7893) .. controls (1.2373,1.7944) and (1.2669,1.7996) .. (1.2944,1.8311) .. controls (1.2944,1.8311) and (1.5458,2.2025) .. (1.2185,2.3521) -- cycle;
-\fi
-%
-% Conical Hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@conicalhat
- \path (0.19,1.4) rectangle (1.68,2.32);
- \fill[\duck@conicalhat,overlay] (1.6722,1.4137) .. controls (1.6722,1.4337) and (1.3592,1.6230) .. (0.9513,1.7735) .. controls (0.5433,1.9239) and (0.1948,1.9784) .. (0.1948,1.9754) .. controls (0.2049,2.0230) and (1.1428,2.36) .. (1.1428,2.3) .. controls (1.1428,2.35) and (1.6821,1.4784) .. (1.6722,1.4137) -- cycle;
-\fi
-%
-% Sailor hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@sailor
- \fill[\duck@sailor] (1.0390,2.2743) .. controls (0.9475,2.2748) and (0.8569,2.2355) .. (0.7943,2.1690) .. controls (0.7147,2.1872) and (0.6335,2.2098) .. (0.5512,2.2029) .. controls (0.5524,2.1164) and (0.5536,2.0299) .. (0.5547,1.9434) .. controls (0.6637,1.9348) and (0.7679,1.8974) .. (0.8716,1.8653) .. controls (1.0321,1.8101) and (1.1932,1.7522) .. (1.3420,1.6697) .. controls (1.3671,1.6622) and (1.3911,1.6147) .. (1.4083,1.6518) .. controls (1.4623,1.7160) and (1.5163,1.7802) .. (1.5702,1.8444) .. controls (1.5154,1.8979) and (1.4433,1.9287) .. (1.3757,1.9624) .. controls (1.3666,2.1156) and (1.2403,2.2511) .. (1.0881,2.2707) .. controls (1.0718,2.2731) and (1.0554,2.2743) .. (1.0390,2.2743) -- cycle;
-\fi
-%
-% Bobble hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@bobblehat
- \pgfinterruptboundingbox
- \fill[\duck@bobblehat] (0.4639,1.7996) .. controls (0.5789,1.8438) and (1.3853,1.6023) .. (1.4046,1.4672) .. controls (1.4581,1.5025) and (1.5242,1.5917) .. (1.4544,1.6879) .. controls (1.5205,2.1879) and (0.7711,2.3780) .. (0.5562,1.9848) .. controls (0.4314,1.9650) and (0.4277,1.8625) .. (0.4639,1.7996) -- cycle;
- \fill[\duck@bobblehat] (1.1,2.2) circle [radius=0.1];
- \endpgfinterruptboundingbox
- \path (0.43,1.3) rectangle (1.5,2.3);
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname duckhookhat\endcsname
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Accessories
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% sunglasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@sunglasses
- \fill[\duck@sunglasses,rotate=-17] (0.42,1.8) rectangle (0.8,1.84);
- \fill[\duck@sunglasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84);
- \fill[\duck@sunglasses,rotate=-20] (0.23,1.7675) circle[radius=0.14];
- \fill[\duck@sunglasses,rotate=-20] (-0.06,1.74) circle[radius=0.13];
-\fi
-%
-% glasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@glasses
- \fill[\duck@glasses,rotate=-17] (0.42,1.8) rectangle (0.8,1.84);
- \fill[\duck@glasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84);
- \fill[\duck@glasses,rotate=-20,even odd rule] (0.23,1.7675) circle[radius=0.14] (0.23,1.7675) circle[radius=0.11];
- \fill[\duck@glasses,rotate=-20,even odd rule] (-0.06,1.74) circle[radius=0.13] (-0.06,1.74) circle[radius=0.095];
-\fi
-%
-% square glasses
-\ifduck@squareglasses
- \fill[\duck@squareglasses,rotate=-17] (0.43,1.8) rectangle (0.8,1.84);
- \fill[\duck@squareglasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84);
- \fill[\duck@squareglasses,rotate=-20,rounded corners=\scalingfactor*2,even odd rule] (-0.16,1.62) -- (-0.18,1.85) -- (0.05,1.87) -- (0.04,1.62) -- cycle [rounded corners=\scalingfactor*1.5] (-0.14,1.64) -- (-0.16,1.83) -- (0.03,1.85) -- (0.02,1.64) -- cycle;
- \fill[\duck@squareglasses,rotate=-20,rounded corners=\scalingfactor*2,even odd rule] (0.12,1.63) -- (0.10,1.88) -- (0.36,1.90) -- (0.35,1.65) -- cycle [rounded corners=\scalingfactor*1.5] (0.14,1.65) -- (0.12,1.86) -- (0.34,1.88) -- (0.33,1.67) -- cycle;
-\fi
-%
-% icecream %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@icecream
- \fill[\duck@cone,rotate=-20] (0.35,1.20)--(0.50,0.60)--(0.75,1.20);
- \fill[\duck@flavoura] (0.85,1.03) circle[radius=0.12];
- \fill[\duck@flavourb] (1.05,0.95) circle[radius=0.12];
- \fill[\duck@flavourc] (0.95,1.1) circle[radius=0.12];
-\fi
-%
-% book %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@book
- \fill[\duck@bookcolour,rotate=-20]
- (0.40,1.20) rectangle (0.80,0.60);
- \node[rotate=-20*\yscalefactor/\xscalefactor, color=white] at (0.88,0.70) {\duck@book};%
-\fi
-%
-% signpost %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@signpost
- \fill[\duck@signcolour, rounded corners=\scalingfactor*1, rotate=-20] (0.8,0.75) rectangle (0.9,1.75);
- \fill[\duck@signcolour, rounded corners=\scalingfactor*1, rotate=-20] (0.4,1.7) rectangle (1.3,2.4);
- \fill[\duck@signback, rounded corners=\scalingfactor*1, rotate=-20] (0.45,1.75) rectangle (1.25,2.35);
- \node[rotate=-20*\yscalefactor/\xscalefactor, color=white] at (1.5,1.65) {\duck@signpost};
-\fi
-%
-% speech bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@speech
- \fill[\duck@bubblecolour] (-0.5,1.8) ellipse[x radius=0.7, y radius=0.3];
- \fill[\duck@bubblecolour] (-0.2,1.54) -- (0.2,1.35) -- (0.0,1.6) -- cycle;
- \node at (-0.5,1.8) {\duck@speech};
-\fi
-%
-% think bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@think
- \fill[\duck@bubblecolour] (2,2.4) ellipse[x radius=0.7, y radius=0.35];
- \fill[\duck@bubblecolour] (1.55,2.35) circle[radius=0.25] (2.0,2.15) circle[radius=0.25] (2.4,2.25) circle[radius=0.25] (1.6,2.55) circle[radius=0.25] (2.0,2.6) circle[radius=0.25] (2.35,2.5) circle[radius=0.25] (1.65,1.95) circle[radius=0.1] (1.55,1.80) circle[radius=0.06] (1.47,1.70) circle[radius=0.03];
- \node at (2,2.4) {\duck@think};
-\fi
-%
-% magic wand %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@magicwand
- \fill[black,rotate=-30] (0.27,1.23) rectangle (0.37,0.65);
- \fill[white,rotate=-30] (0.27,1.13) rectangle (0.37,1.03);
-\fi
-%
-% cricket bat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@cricket
- \fill[\duck@cricket, rounded corners=\scalingfactor*2, rotate=-30] (0.4,1.2) rectangle (0.7,2.2);
- \fill[\duck@cricket, rounded corners=\scalingfactor*1, rotate=-30] (0.5,0.8) rectangle (0.6,1.3);
-\fi
-%
-% rollingpin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@rollingpin
- \fill[\duck@rollingpin, rounded corners=\scalingfactor*2, rotate=-60] (-0.18,0.85) rectangle (0.08,1.75);
- \fill[\duck@rollingpin, rounded corners=\scalingfactor*1, rotate=-60] (-0.1,0.65) rectangle (0.0,1.95);
-\fi
-%
-% lightsaber %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@lightsaber
- \fill[\duck@lightsaber, rounded corners=\scalingfactor*1, rotate=-30] (0.5,0.9) rectangle (0.6,2.5);
- \fill[gray!80!black, rounded corners=\scalingfactor*1, rotate=-30] (0.47,0.7) rectangle (0.63,1.2);
-\fi
-%
-% cake %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@cake
- \fill[\duck@cake] (1.00,0.50) ellipse[x radius=0.4, y radius=0.2];
- \fill[\duck@cake] (0.6,0.5) rectangle (1.4,0.7);
- \fill[\duck@cake] (1.00,0.70) ellipse[x radius=0.4, y radius=0.2];
- \fill[\duck@cake!50!white] (0.75,0.75) rectangle (0.8,0.95);
- \fill[\duck@cake!50!white] (1.2,0.75) rectangle (1.25,0.95);
- \fill[\duck@cake!50!white] (0.975,0.65) rectangle (1.025,0.85);
- \fill[white!85!yellow] (1.0,0.93) ellipse[x radius=0.03, y radius=0.06];
- \fill[white!85!yellow] (1.225,1.03) ellipse[x radius=0.03, y radius=0.06];
- \fill[white!85!yellow] (0.775,1.03) ellipse[x radius=0.03, y radius=0.06];
-\fi
-%
-% pizza %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@pizza
- \fill[brown] (1.00,0.60) ellipse[x radius=0.4, y radius=0.2];
- \fill[red!70!black] (1.00,0.60) ellipse[x radius=0.34, y radius=0.16];
- \fill[white!85!yellow] (1.15,0.65) ellipse[x radius=0.065, y radius=0.04];
- \fill[white!85!yellow] (0.81,0.57) ellipse[x radius=0.065, y radius=0.04];
- \fill[white!85!yellow] (0.95,0.68) ellipse[x radius=0.065, y radius=0.04];
- \fill[white!85!yellow] (1.02,0.54) ellipse[x radius=0.065, y radius=0.04];
- \fill[green!40!brown] (1.09,0.54) ellipse[x radius=0.07, y radius=0.02];
- \fill[green!40!brown,rotate=20] (1.0,0.34) ellipse[x radius=0.07, y radius=0.02];
- \fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse[x radius=0.07, y radius=0.02];
- \fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
-\fi
-%
-% no pizza %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@davidlikespineapplepizza
- \fill[brown] (1.00,0.60) ellipse[x radius=0.4, y radius=0.2];
- \fill[red!70!black] (1.00,0.60) ellipse[x radius=0.34, y radius=0.16];
- \fill[yellow!70!brown] (1.15,0.65) ellipse[x radius=0.08, y radius=0.06];
- \fill[red!70!black] (1.15,0.65) ellipse[x radius=0.04, y radius=0.03];
- \fill[yellow!70!brown] (0.81,0.57) ellipse[x radius=0.08, y radius=0.06];
- \fill[red!70!black] (0.81,0.57) ellipse[x radius=0.04, y radius=0.03];
- \fill[yellow!70!brown] (0.95,0.68) ellipse[x radius=0.08, y radius=0.06];
- \fill[red!70!black] (0.95,0.68) ellipse[x radius=0.04, y radius=0.03];
- \fill[yellow!70!brown] (1.02,0.54) ellipse[x radius=0.08, y radius=0.06];
- \fill[red!70!black] (1.02,0.54) ellipse[x radius=0.04, y radius=0.03];
- \fill[green!40!brown] (1.09,0.54) ellipse[x radius=0.07, y radius=0.02];
- \fill[green!40!brown,rotate=20] (1.0,0.34) ellipse[x radius=0.07, y radius=0.02];
- \fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse[x radius=0.07, y radius=0.02];
- \fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
-\fi
-%
-% Hockey stick %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@hockey
- \fill[\duck@hockey, rounded corners=\scalingfactor*1, rotate=-30] (0.5,0.6) rectangle (0.6,2.1);
- \fill[\duck@hockey, rounded corners=\scalingfactor*3] (0.2,0.2) rectangle (0.85,0.4);
-\fi
-%
-% baguette %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@baguette
- \fill[\duck@baguette!70!white, rounded corners=\scalingfactor*4, rotate=-30] (0.4,0.72) rectangle (0.7,2.0);
- \fill[\duck@baguette!80!black, rotate=5] (1.44,1.1) ellipse[x radius=0.1, y radius=0.03] (1.30,0.9) ellipse[x radius=0.1, y radius=0.03] (1.16,0.7) ellipse[x radius=0.1, y radius=0.03] (1.02,0.5) ellipse[x radius=0.1, y radius=0.03];
-\fi
-%
-% football %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@football
- \fill[\duck@football] (1.2,0.33) circle[radius=0.32];
- \scope
- \clip (1.2,0.33) circle[radius=0.32];
- \fill[black] (1.06,0.30) -- (1.01,0.17) -- (1.14,0.08) -- (1.26,0.14) -- (1.20,0.28) -- cycle (1.37,0.14) -- (1.46,0.27) -- (1.59,0.27) -- (1.41,0.04) -- cycle (1.28,0.38) -- (1.22,0.52) -- (1.33,0.61) -- (1.45,0.51) -- (1.43,0.37) -- cycle (0.87,0.44) -- (1.02,0.40) -- (1.10,0.53) -- (1.07,0.62) -- (0.94,0.57) -- cycle;
- \endscope
-\fi
-%
-% milkshake %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@milkshake
- \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
- \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
- \scope
- \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
- \fill[cyan!10!white, rotate=-10] (0.8,0.94) ellipse[x radius=0.18, y radius=0.4];
- \fill[\duck@milkshake, rotate=-10] (0.8,0.94) ellipse[x radius=0.15, y radius=0.36];
- \endscope
- \fill[white!85!yellow] (0.83,0.92) circle[radius=0.05] (0.88,0.9) circle[radius=0.05] (0.93,0.92) circle[radius=0.05] (0.99,0.91) circle[radius=0.05] (1.06,0.86) circle[radius=0.05] (1.13,0.87) circle[radius=0.05] (0.85,0.99) circle[radius=0.05] (0.9,0.98) circle[radius=0.07] (1.0,0.98) circle[radius=0.07] (1.1,0.95) circle[radius=0.07];
- \fill[red!90!black] (1.0,1.1) circle[radius=0.05];
- \fill[white!85!yellow] (0.94,1.05) circle[radius=0.05] (1.03,1.03) circle[radius=0.05];
- \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
- \fill[red!90!black,rotate=20] (1.2,0.58) rectangle (1.22,0.85);
-\fi
-%
-% wine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@wine
- \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
- \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
- \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse[x radius=0.03, y radius=0.2];
- \scope
- \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
- \fill[cyan!10!white, rotate=-10] (0.8,1.1) ellipse[x radius=0.18, y radius=0.4];
- \endscope
- \scope
- \clip[rotate=-10] (0.58,0.5) rectangle (1.02,0.87);
- \fill[\duck@wine, rotate=-10] (0.8,1.1) ellipse[x radius=0.15, y radius=0.36];
- \endscope
-\fi
-%
-% prison duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@prison
- \fill[\duck@prison] (1.5,0.25) circle[radius=0.3];
- \fill[\duck@prison, even odd rule] (1.2,0.1) ellipse[x radius=0.10, y radius=0.07] (1.2,0.1) ellipse[x radius=0.06, y radius=0.04] (1.05,-0.05) ellipse[x radius=0.10, y radius=0.07] (1.05,-0.05) ellipse[x radius=0.06, y radius=0.04] (0.87,-0.2) ellipse[x radius=0.10, y radius=0.07] (0.87,-0.2) ellipse[x radius=0.06, y radius=0.04];
- \fill[\duck@prison, even odd rule] (0.72,-0.2) ellipse[x radius=0.10, y radius=0.07] (0.72,-0.2) ellipse[x radius=0.06, y radius=0.04];
- \fill[\duck@prison,even odd rule,rotate=70] (0.4,-1.05) ellipse[x radius=0.1, y radius=0.07] (0.4,-1.05) ellipse[x radius=0.06, y radius=0.04] (0.2,-0.95) ellipse[x radius=0.1, y radius=0.07] (0.2,-0.95) ellipse[x radius=0.06, y radius=0.04] (0.22,-0.58) ellipse[x radius=0.1, y radius=0.07] (0.22,-0.58) ellipse[x radius=0.06, y radius=0.04];
- \fill[\duck@prison,even odd rule,rotate=110](-0.33,-0.55) ellipse[x radius=0.1, y radius=0.07] (-0.33,-0.55) ellipse[x radius=0.06, y radius=0.04];
- \scope
- \clip[rotate=-12] (0.45,0.15) rectangle (0.63,0.25);
- \fill[\duck@prison,even odd rule,rotate=110](-0.07,-0.6) ellipse[x radius=0.1, y radius=0.07] (-0.07,-0.6) ellipse[x radius=0.06, y radius=0.04];
- \endscope
-\fi
-%
-% torch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@torch
- \fill[red!50!yellow] \duckpathtorch;
- \fill[red!25!yellow, scale=0.67, xshift=17, yshift=15] \duckpathtorch;
- \fill[white!50!yellow, scale=0.4, xshift=53.5, yshift=45.3] \duckpathtorch;
- \fill[\duck@torch,rounded corners=\scalingfactor*1]
- (1.1,0.96) -- (0.77,0.25) -- (0.83,0.25) -- (1.3,0.86) -- cycle;
- \fill[\duck@torch,rotate=-28]
- (0.62,1.32) ellipse[x radius=0.2, y radius=0.08];
-\fi%
-%
-% sheep %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@sheep
- \scope
- \clip[rotate=-5] (1.2,1.7) ellipse[x radius=0.3, y radius=0.4];
- \fill[\duck@bill,rotate=-5] (0.8,1.5) ellipse[x radius=0.3, y radius=0.4];
- \endscope
-\fi
-%
-% basket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@basket
- \fill[\duck@basket, start angle=180, end angle=360, x radius=0.35, y radius=0.35] (0.65,0.61) arc -- cycle;
- \fill[\duck@basket, start angle=180, end angle=0, even odd rule] [x radius=0.35, y radius=0.5] (0.65,0.6) arc -- cycle [x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle;
- \fill[\duck@basket, even odd rule] (1,0.6) ellipse[x radius=0.35, y radius=0.1] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
- \fill[\duck@basket!75!black] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
-\fi%
-%
-% easter basket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@easter
- \scope
- \clip [start angle=180, end angle=0, x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle [start angle=180, end angle=360, x radius=0.3, y radius=0.07] (0.7,0.6) arc -- cycle;
- \fill[\duck@eggb, rotate=-5] (0.95,0.72) ellipse[x radius=0.09, y radius=0.13];
- \fill[\duck@egga, rotate=10] (0.94,0.42) ellipse[x radius=0.09, y radius=0.13];
- \fill[\duck@eggc, rotate=-30] (0.7,1.08) ellipse[x radius=0.09, y radius=0.13];
- \endscope
-\fi%
-%
-% horse tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\pgfkeys{/duck/horsetail/.@def/.get=\duck@test}
-\ifx\duck@horsetail\duck@test
- \ifdefined\duck@hair\let\duck@horsetail=\duck@hair\fi
-\fi%
-\ifduck@horsetail
- \path (0.1,0.1) rectangle (2.82,2.14);
- \fill[\duck@horsetail,overlay] \duckpathhorsetail;
-\fi
-%
-% crozier %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@crozier
- \scope
- \clip [rotate=-20] (0.6,2.3) rectangle (1.1,1.999);
- \fill[even odd rule,\duck@crozier] (1.5,1.6) circle[radius=0.2] (1.5,1.6) circle[radius=0.1];
- \endscope
- \fill[\duck@crozier,rotate=-20] (0.663,0.5) rectangle (0.763,2.0);
-\fi
-%
-% stethoscope %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@stethoscope
- \fill[\duck@stethoscope,rounded corners=\scalingfactor*0.5,rotate=-18] (0.08,0.7) rectangle (0.13,1.24);
- \fill[\duck@stethoscope] (0.35,0.7) circle[radius=0.1];
- \scope
- \fill[\duck@stethoscope,rounded corners=\scalingfactor*0.5,rotate=-30] (0.53,1.3) rectangle (0.58,1.72);
- \clip[rotate=-30] (0.36,0.89) -- (0.36,1.36) -- (0.79,1.36) -- (0.79,0.89) -- (0.65,0.89) -- (0.65,0.96) -- (0.5,0.96) -- (0.5,0.89) -- cycle ;
- \fill [\duck@stethoscope,rounded corners=\scalingfactor*3,rotate=-30,even odd rule] (0.775,1.35) rectangle (0.375,0.9) [rounded corners=\scalingfactor*2] (0.725,1.3) rectangle (0.425,0.95);
- \endscope
-\fi
-%
-% snow duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@snowduck
- \fill[black, rotate=-25] (0.65,0.65) rectangle (0.7,1.8);
- \fill[black, rotate=35] (1.55,0.15) rectangle (1.6,0.5);
- \fill[black, rotate=-35] (0.4,1.7) rectangle (0.45,2.0);
- \fill[black, rotate=-60] (-0.3,2.0) rectangle (-0.35,1.65);
-\fi
-%
-% vampire %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@vampire
- \ifduck@laughing
- \fill[\duck@vampire] (0.55,1.28) -- (0.575,1.22) -- (0.6,1.29) -- cycle;
- \else
- \fill[\duck@vampire] (0.6,1.20) -- (0.625,1.16) -- (0.65,1.223) -- cycle;
- \fi
-\fi
-%
-% crystal ball %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@crystalball
- \shade[ball color=\duck@crystalball,opacity=0.7] (0.93,0.5) circle[radius=0.33];
-\fi
-%
-% Cheese %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@cheese
- \scope[xshift=26,yshift=-2]
- \fill[\duck@cheese] (-0.3200,0.8058) -- (0.0608,0.7220) -- (0.0608,0.6366) -- (-0.3200,0.5410) -- (0.2143,0.4236) .. controls (0.3395,0.4810) and (0.4241,0.5627) .. (0.4117,0.6253) -- (0.4117,0.7634) .. controls (0.4261,0.8618) and (0.2607,0.8954) .. (0.1907,0.8962) -- cycle;
- \fill[\duck@cheese!35!white] (-0.3200,0.8057) -- (-0.3200,0.5410) -- (0.2143,0.4236) -- (0.2143,0.7381) -- cycle;
- \fill[\duck@cheese] (-0.23,0.71) circle[radius=0.04] (0.0,0.55) circle[radius=0.04] (-0.23,0.58) circle[radius=0.02] (-0.15,0.6) circle[radius=0.02] (-0.1,0.7) circle[radius=0.02] (0.1,0.65) circle[radius=0.02] (0,0.65) circle[radius=0.02] (0.1,0.5) circle[radius=0.02] (0.07,0.55) circle[radius=0.01] (0.12,0.6) circle[radius=0.01] (-0.08,0.54) circle[radius=0.01];
- \endscope
-\fi
-%
-% shovel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@shovel
- \fill[brown!80!black,rotate around={-23:(0.91, 0.88)}] (0.87, 0.28) rectangle ++(0.1,1.4);
- \fill[\duck@shovel] (0.6133, 0.9536) .. controls (0.8388, 0.8117) and (0.9253, 0.7517) .. (1.1962, 0.6696) -- (0.8332, 0.1263) .. controls (0.6458, 0.11) and (0.5417, 0.1644) .. (0.4517, 0.3034) -- cycle;
-\fi
-%
-% pickaxe %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@pickaxe
- \fill[brown!80!black,rotate around={-23:(0.91, 0.88)}] (0.87, 0.28) rectangle ++(0.1,1.4);
- \fill[\duck@pickaxe] (-0.0085, 0.6858) .. controls (0.6422, 0.3523) and (0.7609, 0.3068) .. (1.4114, 0.1108) .. controls (0.6589, 0.1246) and (0.5556, 0.1887) .. (-0.0085, 0.6858) -- cycle;
-\fi
-%
-% strawbroom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@strawbroom
- \fill[\duck@strawbroomstick] (0.9160,0.5478) -- (1.2792,1.6574) .. controls (1.3063,1.6961) and (1.3956,1.6649) .. (1.3688,1.6176) -- (0.9508,0.5179) .. controls (0.9360,0.5142) and (0.9202,0.5331) .. (0.9160,0.5478) -- cycle;
- \fill[\duck@strawbroom] (0.5528,0.2890) .. controls (0.6449,0.3598) and (0.7460,0.5693) .. (0.8911,0.6871) .. controls (0.9481,0.7215) and (1.0395,0.6925) .. (1.0553,0.6224) .. controls (1.1219,0.4385) and (0.9965,0.2147) .. (1.0056,0.1000) .. controls (0.8926,0.0241) and (0.5950,0.2078) .. (0.5528,0.2890) -- cycle;
- \draw[\duck@strawbroomribbon,line width=\scalingfactor*0.4pt] (0.7916,0.5876) .. controls (0.7916,0.5876) and (0.8210,0.5404) .. (0.8451,0.5304) .. controls (0.8708,0.5197) and (0.9021,0.5419) .. (0.9284,0.5329) .. controls (0.9544,0.5240) and (0.9663,0.4903) .. (0.9919,0.4806) .. controls (1.0148,0.4720) and (1.0653,0.4781) .. (1.0653,0.4781);
- \draw[\duck@strawbroomribbon,line width=\scalingfactor*0.4pt] (0.7565,0.5493) .. controls (0.7565,0.5493) and (0.7897,0.4961) .. (0.8169,0.4848) .. controls (0.8458,0.4727) and (0.8812,0.4978) .. (0.9109,0.4876) .. controls (0.9401,0.4776) and (0.9535,0.4396) .. (0.9824,0.4287) .. controls (1.0083,0.4189) and (1.0652,0.4259) .. (1.0652,0.4259);
-\fi
-%
-% broom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@broom
- \scope[rotate=-10]
- \draw[\duck@broomstick,line width=\scalingfactor*1.8pt] (0.9, 1.8) -- ++(0,-1.4);
- \draw[\duck@broomstick,line width=\scalingfactor*1.8pt] (0.6, 0.42) -- ++(0.6,0);
- \fill[\duck@broom] (0.6, 0.40) -- ++(-0.05,-0.1) -- ++(0.7,0) -- ++(-0.05, 0.1) -- cycle;
- \endscope
-\fi
-%
-% umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@umbrella
- \path (0.2,0.4) rectangle (2.22,2.7);
- \fill[gray,overlay] (0.6922,0.5942) -- (0.7426,0.6103) .. controls (0.8276,0.3884) and (0.8855,0.4523) .. (0.9333,0.6543) -- (0.9334,0.6545) -- (0.9335,0.6547) .. controls (1.0347,1.0671) and (1.2906,1.9565) .. (1.2906,1.9565) -- (1.3415,1.9419) .. controls (1.3415,1.9419) and (1.0855,1.0519) .. (0.9849,0.6423) -- (0.9848,0.6420) .. controls (0.9240,0.3633) and (0.7874,0.3312) .. (0.6922,0.5942) -- cycle;
- \fill[\duck@umbrella,overlay] (0.2185,1.9927) .. controls (0.3559,2.1962) and (0.6837,2.0720) .. (0.6761,1.8240) .. controls (0.8398,2.0111) and (1.1891,1.9216) .. (1.1685,1.6915) .. controls (1.3000,1.8765) and (1.6639,1.7626) .. (1.6607,1.5356) .. controls (1.7865,1.7271) and (2.1350,1.6950) .. (2.1626,1.4589) .. controls (2.4996,2.5771) and (0.5644,3.2631) .. (0.2185,1.9927) -- cycle;
-\fi
-%
-% closed umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@umbrellaclosed
- \fill[gray] (1.3401,0.6996) -- (1.2872,0.7019) .. controls (1.2840,0.9395) and (1.2076,0.8995) .. (1.0930,0.7264) -- (1.0929,0.7262) -- (1.0928,0.7261) .. controls (0.8555,0.3739) and (0.9223,0.4608) .. (0.9223,0.4608) -- (0.8795,0.4920) .. controls (0.8795,0.4920) and (0.8131,0.4057) .. (1.0488,0.7554) -- (1.0489,0.7556) .. controls (1.2022,0.9963) and (1.3414,0.9793) .. (1.3401,0.6996) -- cycle;
- \fill[\duck@umbrellaclosed] (0.6827,0.1263) -- (0.8038,0.6188) -- (0.9548,0.6494) -- (0.9520,0.8231) -- (1.1945,0.6529) -- (1.0218,0.5885) -- (1.0465,0.4566) -- cycle;
-\fi
-%
-% handbag %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@handbag
- \fill[\duck@handbag] (0.7811,0.1751) -- (1.4913,0.3097) -- (1.3315,0.7086) -- (0.7832,0.6152) -- cycle;
- \fill[\duck@handbag!70!black] (0.8857,0.4354) .. controls (0.7861,0.9811) and (1.1796,1.0719) .. (1.2866,0.5155) -- (1.2043,0.4996) .. controls (1.1247,0.8952) and (0.9051,0.8883) .. (0.9676,0.4536) -- cycle;
-\fi
-%
-% cocktail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@cocktail
- \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
- \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
- \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse[x radius=0.03, y radius=0.2];
- \fill[cyan!10!white] (0.92,0.6) -- (0.75,0.9) -- (1.18,0.83) -- cycle;
- \fill[gray!60!white] (0.928,0.64) -- (0.85,0.77) -- (1.08,0.77) -- cycle;
- \fill[green!40!brown!60!white] (0.94,0.71) circle[radius=0.04];
- \fill[red!80!black] (0.94,0.72) circle[radius=0.01];
-\fi
-%
-% banana %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@banana
- \begin{scope}[yshift=10,xshift=19,rotate=-25,scale=1.3]
- \fill[\duck@banana!30!] (0.02,0) .. controls (0.21,0.20) and (0.21,0.40) .. (0.02,0.6) arc [start angle=60,end angle=120, radius =0.04] .. controls (0.07,0.40) and (0.07,0.20) .. (-0.02,0) --cycle ;
- %peel
- \begin{scope}
- \clip (-0.04,-0.01) rectangle (0.20,0.3);
- \fill[\duck@banana] (0.03,0) .. controls (0.22,0.20) and (0.22,0.40) .. (0.03,0.6) arc [start angle=60,end angle=120, radius =0.06] .. controls (0.06,0.40) and (0.06,0.20) .. (-0.03,0);
- \end{scope}
- \fill[\duck@banana!60!] (0.12,0.3) arc [start angle=140, end angle=-100, y radius=0.20, x radius=0.06] arc [start angle=-90, end angle=90, y radius=0.15, x radius=0.02] (0.12,0.3) arc [start angle=60, end angle=270, y radius=0.15, x radius=0.1] arc [start angle=270, end angle=90, y radius=0.13, x radius=0.04];
- \end{scope}
-\fi
-%
-% stick %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@stick
- \begin{scope}[rotate=-30,yshift=16,xshift=12]
- %leaf
- \begin{scope}[rotate=60, xshift=8.2,yshift=8.1]
- \fill[\duck@leaf] (-0.01,0) .. controls (-0.1,0) and (-0.02, 0.2) .. (0,0.2) .. controls (0.02, 0.2) and (0.1,0) .. (0.01,0.0);
- \path[clip] (-0.04,-0.04)-- (-0.01,0) .. controls (-0.1,0) and (-0.02, 0.2) .. (0,0.2) .. controls (0.02, 0.2) and (0.1,0) .. (0.01,0)-- (0.04,-0.04) --cycle;
- \draw[\duck@leaf!80!, line width=0.1] (0,-0.04) -- (0,0.2) \foreach \i in {0.02,0.04,...,0.2} {(0,\i) -- ++(0.1,\i) (0,\i) -- ++(-0.1,\i)} ;
- \end{scope}
- %stick itself
- \fill[\duck@stick!90!red] (-0.04,0.8) -- (-0.04,0.4) arc[start angle=345,end angle=270,radius=0.03] -- ++(0,-0.01) arc[start angle=90,end angle=15,radius=0.03] -- (-0.04,0) arc [start angle=180, end angle=360 ,x radius=0.04, y radius=0.02] -- (0.04, 0.4) arc [start angle=180, end angle=120, radius=0.08] arc [start angle=-90, end angle=90, x radius=0.02, y radius=0.04] arc [start angle=240, end angle=180, radius=0.08] -- (0.04,0.75) arc [start angle=0, end angle=120 ,x radius=0.04, y radius=0.02] --cycle;
- \fill[\duck@stick!90!] (0.08, 0.51) ellipse [x radius=0.02, y radius=0.04] (0,0.75) ellipse [x radius=0.04, y radius=0.02] ;
- \draw[\duck@stick!90!red, line width=0.06] (0.08, 0.51) ellipse [x radius=0.016, y radius=0.032]
- ellipse [x radius=0.012, y radius=0.024] ellipse [x radius=0.008, y radius=0.016] (0,0.75) ellipse [y radius=0.016, x radius=0.032] ellipse [y radius=0.012, x radius=0.024] ellipse [y radius=0.008, x radius=0.016] ;
- \fill[\duck@stick!90!red] (0.08, 0.51) ellipse [x radius=0.004, y radius=0.008] (0,0.75) ellipse [x radius=0.008, y radius=0.004];
- \end{scope}
-\fi
-%
-% overleaf duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@overleaf
- \fill[white] \duckpathoverleaf;
-\fi
-%
-% wing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifduck@wing
- \fill[\duck@wing] \duckpathwing;
-\fi
-%
-% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\csname duckhookforeground\endcsname
-%
-%\draw (current bounding box.north west) rectangle (current bounding box.south east);% For debugging bounding boxes
-%
-%\endscope
-}% from `\def\duck@draw{` at the very beginning
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Random ducks
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\pgfmathdeclarerandomlist{head}{{shorthair}{longhair}{crazyhair}{mohican}{mullet}{beard}{alien}{hat}{cap}{santa}{chef}{graduate}{beret}{magichat}{witch}{crown}{bunny}{peakedcap}{tophat}{queencrown}{kingcrown}{harlequin}{strawhat}{parting}}
-\pgfmathdeclarerandomlist{accessories}{{glasses}{sunglasses}{icecream}{book}{signpost}{magicwand}{cricket}{rollingpin}{lightsaber}{cake}{pizza}{hockey}{baguette}{football}{mask}{necklace}{milkshake}{wine}{prison}{cape}{torch}{crozier}{easter}{stethoscope}{neckerchief}{cheese}{shovel}{pickaxe}{crystalball}}
-
-\def\shuffleducks{%
- \pgfmathrandomitem{\head}{head}%
- \edef\randomhead{\head}%
- \pgfmathrandomitem{\accessories}{accessories}%
- \edef\randomaccessories{\accessories}%
-}
-
-\newcommand*{\randuck}[1][]{%
- \shuffleducks%
- \duck[\randomhead, \randomaccessories, #1]%
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Defining some of the more complicate paths for easy reuse
-%
-% naming scheme is \duckpath<name>
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-% body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\def\duckpathbody{%
- (0.513,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
- (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
- (1.818,1.419) .. controls (0.938, 0.946) and ( 1.240,1.379) ..
- (0.513,1.145) -- cycle
-}
-
-\def\duckpathgrumpybill{%
- (0.406,1.472) .. controls (0.643,1.530) and (0.643,1.530) ..
- (0.800,1.300) .. controls (0.083,0.850) and (0.269,1.369) ..
- (0.406,1.472) -- cycle
-}
-
-\def\duckpathbill{%
- (0.406,1.472) .. controls (0.643,1.530) and (0.541,1.303) ..
- (0.910,1.370) .. controls (0.083,0.850) and (0.269,1.369) ..
- (0.406,1.472) -- cycle
-}
-
-\def\duckpathwing{%
- (1.47,0.56) .. controls (1.51,0.59) and (1.57,0.62) ..
- (1.60,0.66) .. controls (1.61,0.70) and (1.51,0.69) ..
- (1.47,0.69) .. controls (1.48,0.72) and (1.41,0.76) ..
- (1.37,0.74) .. controls (1.35,0.79) and (1.33,0.81) ..
- (1.25,0.80) .. controls (1.25,0.86) and (1.18,0.88) ..
- (1.15,0.88) .. controls (1.20,1.01) and (0.40,0.79) ..
- (0.52,0.57) .. controls (0.63,0.26) and (1.22,0.43) ..
- (1.47,0.56) -- cycle
-}
-
-% clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\def\duckpathtshirt{%
- (0.490,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
- (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
- (1.818,1.419) .. controls (0.938, 0.976) and ( 1.240,1.279) ..
- (0.590,1.000) -- cycle
-}
-
-\def\duckpathjacket{%
- (0.490,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
- (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
- (1.818,1.419) .. controls (0.880, 0.946) and ( 1.240,1.378) ..
- (0.513,0.700) -- cycle
-}
-
-% hair styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\def\duckpathshorthair{%
- (1.3947,1.4175) .. controls (1.4546,1.4518) and (1.4699,1.6566) ..
- (1.4343,1.7992) .. controls (1.2528,2.5033) and (0.2339,2.2710) ..
- (0.4151,1.5907) .. controls (0.4345,1.8709) and (0.7421,2.0999) ..
- (0.9494,1.9054) .. controls (1.2241,1.6476) and (1.3316,1.3814) ..
- (1.3947,1.4175) -- cycle
-}
-
-\def\duckpathlonghair{%
- (1.4508,0.7565) .. controls (1.5146,0.7888) and (1.5854,0.8216) ..
- (1.6247,0.8831) .. controls (1.5859,0.8847) and (1.4726,0.9457) ..
- (1.5587,0.9706) .. controls (1.6317,0.9685) and (1.7016,1.0046) ..
- (1.7314,1.0734) .. controls (1.7931,1.1660) and (1.6616,1.1176) ..
- (1.6277,1.1566) .. controls (1.6853,1.1741) and (1.7840,1.1829) ..
- (1.8123,1.2244) .. controls (1.7022,1.2488) and (1.5688,1.2663) ..
- (1.5063,1.3739) .. controls (1.4619,1.5143) and (1.4696,1.6649) ..
- (1.4340,1.8076) .. controls (1.2524,2.5117) and (0.2335,2.2794) ..
- (0.4060,1.5991) .. controls (0.4341,1.8793) and (0.6629,2.1130) ..
- (0.9011,1.9578) .. controls (1.2427,1.7382) and (1.3350,1.4214) ..
- (1.0905,1.0610) .. controls (1.0597,1.0109) and (1.1103,0.9166) ..
- (1.1805,0.8670) .. controls (1.2507,0.8174) and (1.3503,0.7853) ..
- (1.4508,0.7565) -- cycle
-}
-
-\def\duckpathcrazyhair{%
- (0.1977,1.9023) .. controls (0.2633,2.0599) and (0.4819,2.0547) ..
- (0.4713,2.0879) .. controls (0.4647,2.2106) and (0.2516,2.2392) ..
- (0.2516,2.2392) .. controls (0.4352,2.2933) and (0.7427,1.9304) ..
- (0.5743,2.3885) .. controls (0.6017,2.3633) and (0.8307,2.1739) ..
- (0.8082,2.4245) .. controls (0.8271,2.2885) and (0.9195,2.2400) ..
- (0.9933,2.2673) .. controls (1.0814,2.6593) and (0.9688,2.0034) ..
- (1.3350,2.3615) .. controls (1.3657,2.3292) and (1.1627,2.1043) ..
- (1.3424,2.1387) .. controls (1.3102,1.8312) and (1.5049,2.2623) ..
- (1.5049,2.2623) .. controls (1.5049,2.2623) and (1.4675,2.0493) ..
- (1.4287,1.9560) .. controls (1.4287,1.9560) and (1.6830,1.9470) ..
- (1.7178,1.8823) .. controls (1.1926,1.8054) and (2.0160,1.7277) ..
- (1.4923,1.7275) .. controls (1.5366,1.6685) and (1.3013,1.6009) ..
- (1.6500,1.5946) .. controls (0.8836,1.5797) and (1.2764,1.9221) ..
- (0.8957,2.0442) .. controls (0.5516,2.0958) and (0.5228,1.8527) ..
- (0.4695,1.7963) .. controls (0.4825,1.9607) and (0.3601,1.9095) ..
- (0.1977,1.9023) -- cycle
-}
-
-\def\duckpathrecedinghair{%
- (1.3385,1.4841) .. controls (1.4243,1.4529) and (1.4877,1.7127) ..
- (1.3964,1.8658) .. controls (1.1071,2.3511) and (0.5189,2.1609) ..
- (0.4381,1.6816) .. controls (0.4575,1.9618) and (0.9007,2.2059) ..
- (1.1308,2.0390) .. controls (1.4703,1.7469) and (1.0343,1.5949) ..
- (1.3385,1.4841) -- cycle
-}
-
-\def\duckpathmohican{%
- (0.7632,1.7935) .. controls (0.9223,2.3084) and (1.3870,1.8580) ..
- (1.3920,1.5854) .. controls (1.4233,2.1466) and (0.6812,2.5808) ..
- (0.6725,1.8166) .. controls (0.6725,1.8166) and (0.7615,1.7926) ..
- (0.7632,1.7935) -- cycle
-}
-
-\def\duckpathmullet{%
- (1.3723,1.2684) .. controls (1.3723,1.2684) and (1.5129,1.5571) ..
- (1.4435,1.7815) .. controls (1.2652,2.3572) and (0.3342,2.2633) ..
- (0.4106,1.5424) .. controls (0.4204,1.6825) and (0.5692,1.9195) ..
- (0.5692,1.9195) .. controls (0.5692,1.9195) and (0.8475,1.8402) ..
- (1.1031,1.7844) .. controls (1.0808,1.6260) and (1.1130,1.4754) ..
- (1.1130,1.4754) .. controls (1.1956,1.4198) and (1.3001,1.3369) ..
- (1.3723,1.2684) -- cycle
-}
-
-% Acessoires %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\def\duckpathqueencrown{%
- (0.7370,2.0732) .. controls (0.6966,2.2091) and (0.6769,2.3503) ..
- (0.6354,2.4859) .. controls (0.6149,2.5164) and (0.5958,2.5732) ..
- (0.6498,2.5808) .. controls (0.6973,2.5907) and (0.7091,2.5350) ..
- (0.6926,2.5016) .. controls (0.6967,2.4544) and (0.7188,2.4109) ..
- (0.7340,2.3665) .. controls (0.7415,2.3472) and (0.7619,2.2862) ..
- (0.7676,2.3381) .. controls (0.7755,2.3852) and (0.7871,2.4329) ..
- (0.7833,2.4808) .. controls (0.7597,2.5148) and (0.7834,2.5720) ..
- (0.8294,2.5570) .. controls (0.8775,2.5457) and (0.8536,2.4937) ..
- (0.8436,2.4638) .. controls (0.8502,2.3973) and (0.8640,2.3313) ..
- (0.8798,2.2664) .. controls (0.9047,2.2750) and (0.9168,2.3261) ..
- (0.9342,2.3514) .. controls (0.9492,2.3853) and (0.9714,2.4171) ..
- (0.9773,2.4540) .. controls (0.9645,2.4873) and (0.9766,2.5358) ..
- (1.0204,2.5303) .. controls (1.0646,2.5298) and (1.0691,2.4725) ..
- (1.0443,2.4460) .. controls (1.0440,2.3935) and (1.0580,2.3419) ..
- (1.0671,2.2905) .. controls (1.0706,2.2719) and (1.0788,2.2126) ..
- (1.0985,2.2554) .. controls (1.1269,2.3087) and (1.1558,2.3623) ..
- (1.1772,2.4187) .. controls (1.1697,2.4515) and (1.1716,2.5081) ..
- (1.2210,2.5018) .. controls (1.2706,2.4969) and (1.2686,2.4403) ..
- (1.2406,2.4126) .. controls (1.2279,2.3600) and (1.2211,2.3057) ..
- (1.2172,2.2518) .. controls (1.2296,2.2439) and (1.2538,2.2943) ..
- (1.2693,2.3112) .. controls (1.2908,2.3467) and (1.3228,2.3784) ..
- (1.3316,2.4200) .. controls (1.3203,2.4624) and (1.3708,2.5014) ..
- (1.4051,2.4678) .. controls (1.4448,2.4342) and (1.3945,2.3994) ..
- (1.3765,2.3710) .. controls (1.3022,2.2536) and (1.2440,2.1265) ..
- (1.1686,2.0097) .. controls (0.9649,1.9465) and (0.8367,1.9955) ..
- (0.7370,2.0732) -- cycle
-}
-
-\def\duckpathkingcrown{%
- (0.6572,2.0396) .. controls (0.6637,2.0838) and (0.6716,2.1289) ..
- (0.6684,2.1735) .. controls (0.6481,2.2496) and (0.5923,2.3131) ..
- (0.5818,2.3921) .. controls (0.5738,2.4607) and (0.6167,2.5343) ..
- (0.6862,2.5502) .. controls (0.7548,2.5703) and (0.8210,2.5304) ..
- (0.8720,2.4881) .. controls (0.8984,2.4712) and (0.9239,2.4324) ..
- (0.9486,2.4249) .. controls (0.9524,2.4691) and (0.9566,2.5158) ..
- (0.9844,2.5527) .. controls (1.0052,2.5845) and (1.0390,2.6282) ..
- (1.0820,2.6127) .. controls (1.1212,2.5899) and (1.1378,2.5421) ..
- (1.1478,2.5003) .. controls (1.1576,2.4639) and (1.1336,2.4180) ..
- (1.1349,2.3906) .. controls (1.2050,2.4269) and (1.2847,2.4629) ..
- (1.3654,2.4429) .. controls (1.4292,2.4285) and (1.4864,2.3679) ..
- (1.4793,2.2998) .. controls (1.4859,2.2404) and (1.4407,2.1925) ..
- (1.4006,2.1551) .. controls (1.3681,2.1232) and (1.3290,2.0951) ..
- (1.3072,2.0544) .. controls (1.2904,2.0121) and (1.2805,1.9674) ..
- (1.2738,1.9225) .. controls (1.1221,1.8892) and (0.9586,1.8836) ..
- (0.8112,1.9386) .. controls (0.7535,1.9608) and (0.6999,1.9945) ..
- (0.6572,2.0396) -- cycle
-}
-
-\def\duckpathdarthvader{%
- (0.4264,1.9092) .. controls (0.4347,1.9248) and (0.4612,1.9186) ..
- (0.4969,1.9783) .. controls (0.5499,2.0670) and (0.7559,2.2377) ..
- (0.9889,2.2057) .. controls (1.2691,2.1668) and (1.4075,1.8829) ..
- (1.4176,1.7421) .. controls (1.4279,1.5955) and (1.5246,1.3484) ..
- (1.5246,1.3484) --
- (0.9846,1.2036) .. controls (1.0898,1.2735) and (1.0667,1.5598) ..
- (1.0555,1.6034) .. controls (0.9758,1.9147) and (0.8121,1.8681) ..
- (0.7174,1.7694) .. controls (0.5671,2.0370) and (0.4103,1.7556) ..
- (0.4132,1.472) --
- (0.3529,1.415) .. controls (0.3529,1.43938) and (0.3893,1.8379)..
- (0.4264,1.9092) -- cycle
-}
-
-\def\duckpathhorsetail{%
- (1.7248,1.3553) .. controls (2.0530,1.3369) and (2.1427,1.1604) ..
- (2.2915,0.9970) .. controls (2.4759,0.7946) and (2.9531,0.8890) ..
- (2.7668,0.9003) .. controls (2.4670,0.9184) and (2.5158,1.1488) ..
- (2.3907,1.3152) .. controls (2.2788,1.4641) and (1.9414,1.5945) ..
- (1.7248,1.3553) -- cycle
-}
-
-\def\duckpathcape{%
- (0.225,0.966) .. controls (1.314,0.961) and (2.070,0.650) ..
- (2.042,1.245) .. controls (1.863,1.164) and (1.844,1.173) ..
- (1.792,1.340) .. controls (1.635,1.235) and (1.620,1.268) ..
- (1.567,1.393) .. controls (1.358,1.086) and (0.664,1.096) ..
- (0.460,1.110) .. controls (0.461,1.133) and (0.305,1.077) ..
- (0.235,0.966) -- cycle
-}
-
-\def\duckpathcrown{%
- (0.7365,2.0616) .. controls (0.7365,2.0616) and (0.7771,2.1763) ..
- (0.6959,2.4650) -- (0.8895,2.2378) -- (1.0391,2.3943) --
- (1.1260,2.1961) --
- (1.3938,2.3318) .. controls (1.1927,2.1132) and (1.2194,1.9764) ..
- (1.2194,1.9764) .. controls (1.0774,1.9202) and (0.8507,1.9601) ..
- (0.7365,2.0616) -- cycle
-}
-
-\def\duckpathtorch{%
- (1.4338,1.0258) .. controls (1.4308,0.8877) and (1.3468,0.8997) ..
- (1.2447,0.7481) .. controls (1.1427,0.8982) and (1.0721,0.8892) ..
- (1.0646,1.0243) .. controls (1.0541,1.1714) and (1.2642,1.1654) ..
- (1.2492,1.3860) .. controls (1.3093,1.3110) and (1.4383,1.2705) ..
- (1.4338,1.0258) -- cycle
-}
-
-\def\duckpathoverleaf{%
- (1.2699,0.6095) .. controls (1.2710,0.5992) and (1.2752,0.5910) .. (1.2822,0.5852) .. controls (1.2892,0.5793) and (1.2983,0.5763) .. (1.3095,0.5763) .. controls (1.3165,0.5762) and (1.3233,0.5778) .. (1.3295,0.5809) .. controls (1.3353,0.5840) and (1.3401,0.5885) .. (1.3436,0.5940) -- (1.3792,0.5940) .. controls (1.3731,0.5785) and (1.3640,0.5664) .. (1.3521,0.5578) .. controls (1.3398,0.5492) and (1.3252,0.5447) .. (1.3103,0.5449) .. controls (1.3002,0.5448) and (1.2902,0.5467) .. (1.2808,0.5505) .. controls (1.2718,0.5544) and (1.2636,0.5601) .. (1.2567,0.5672) .. controls (1.2500,0.5742) and (1.2446,0.5825) .. (1.2410,0.5915) .. controls (1.2372,0.6005) and (1.2353,0.6101) .. (1.2353,0.6198) .. controls (1.2352,0.6294) and (1.2370,0.6389) .. (1.2404,0.6479) .. controls (1.2438,0.6567) and (1.2489,0.6647) .. (1.2554,0.6715) .. controls (1.2625,0.6790) and (1.2709,0.6850) .. (1.2802,0.6892) .. controls (1.2891,0.6933) and (1.2988,0.6954) .. (1.3086,0.6955) .. controls (1.3207,0.6955) and (1.3325,0.6926) .. (1.3432,0.6871) .. controls (1.3540,0.6813) and (1.3633,0.6732) .. (1.3705,0.6634) .. controls (1.3751,0.6571) and (1.3786,0.6501) .. (1.3807,0.6427) .. controls (1.3831,0.6341) and (1.3842,0.6253) .. (1.3841,0.6164) .. controls (1.3840,0.6139) and (1.3839,0.6119) .. (1.3837,0.6092) .. controls (1.3458,0.6093) and (1.3079,0.6094) .. (1.2699,0.6095) -- cycle(1.3486,0.6358) .. controls (1.3458,0.6453) and (1.3410,0.6525) .. (1.3343,0.6575) .. controls (1.3276,0.6625) and (1.3192,0.6650) .. (1.3090,0.6650) .. controls (1.3004,0.6651) and (1.2920,0.6622) .. (1.2852,0.6570) .. controls (1.2783,0.6517) and (1.2733,0.6443) .. (1.2711,0.6359) .. controls (1.2969,0.6359) and (1.3228,0.6358) .. (1.3486,0.6358) -- cycle(1.5160,0.5487) -- (1.5160,0.5662) .. controls (1.5122,0.5593) and (1.5064,0.5538) .. (1.4992,0.5505) .. controls (1.4920,0.5471) and (1.4828,0.5455) .. (1.4715,0.5455) .. controls (1.4505,0.5455) and (1.4329,0.5527) .. (1.4187,0.5670) .. controls (1.4046,0.5814) and (1.3976,0.5993) .. (1.3975,0.6206) .. controls (1.3975,0.6303) and (1.3993,0.6401) .. (1.4029,0.6492) .. controls (1.4063,0.6580) and (1.4114,0.6661) .. (1.4180,0.6729) .. controls (1.4246,0.6801) and (1.4327,0.6857) .. (1.4416,0.6895) .. controls (1.4509,0.6932) and (1.4608,0.6950) .. (1.4708,0.6949) .. controls (1.4800,0.6951) and (1.4891,0.6933) .. (1.4976,0.6896) .. controls (1.5050,0.6862) and (1.5112,0.6807) .. (1.5156,0.6739) -- (1.5156,0.6911) -- (1.5480,0.6911) -- (1.5480,0.5485) -- (1.5160,0.5485) -- (1.5160,0.5487) -- cycle(1.4436,0.5910) .. controls (1.4513,0.5831) and (1.4619,0.5787) .. (1.4729,0.5789) .. controls (1.4833,0.5789) and (1.4926,0.5829) .. (1.5006,0.5911) .. controls (1.5083,0.5986) and (1.5126,0.6088) .. (1.5126,0.6196) .. controls (1.5127,0.6307) and (1.5084,0.6414) .. (1.5006,0.6494) .. controls (1.4926,0.6577) and (1.4833,0.6619) .. (1.4727,0.6619) .. controls (1.4618,0.6621) and (1.4514,0.6577) .. (1.4439,0.6499) .. controls (1.4361,0.6423) and (1.4318,0.6318) .. (1.4317,0.6205) .. controls (1.4315,0.6092) and (1.4355,0.5991) .. (1.4436,0.5910) -- cycle(1.6366,0.6913) -- (1.6366,0.6617) -- (1.6127,0.6617) -- (1.6127,0.5487) -- (1.5806,0.5487) -- (1.5806,0.6617) -- (1.5637,0.6617) -- (1.5637,0.6913) -- (1.5796,0.6913) -- (1.5796,0.6952) .. controls (1.5796,0.7102) and (1.5838,0.7214) .. (1.5922,0.7288) .. controls (1.6005,0.7362) and (1.6131,0.7399) .. (1.6300,0.7399) .. controls (1.6324,0.7398) and (1.6347,0.7396) .. (1.6370,0.7395) -- (1.6370,0.7097) -- (1.6347,0.7097) .. controls (1.6272,0.7097) and (1.6218,0.7084) .. (1.6186,0.7059) .. controls (1.6154,0.7034) and (1.6138,0.6993) .. (1.6138,0.6936) -- (1.6138,0.6910) .. controls (1.6214,0.6913) and (1.6290,0.6912) .. (1.6366,0.6913) -- cycle(1.1906,0.5487) -- (1.2231,0.5487) -- (1.2231,0.7374) -- (1.1906,0.7374) -- cycle(0.9820,0.6095) .. controls (0.9831,0.5992) and (0.9872,0.5910) .. (0.9943,0.5852) .. controls (1.0013,0.5793) and (1.0104,0.5763) .. (1.0216,0.5763) .. controls (1.0285,0.5762) and (1.0354,0.5778) .. (1.0416,0.5809) .. controls (1.0474,0.5839) and (1.0522,0.5885) .. (1.0556,0.5940) -- (1.0914,0.5940) .. controls (1.0854,0.5785) and (1.0763,0.5664) .. (1.0643,0.5578) .. controls (1.0522,0.5492) and (1.0382,0.5449) .. (1.0225,0.5449) .. controls (1.0124,0.5448) and (1.0024,0.5467) .. (0.9931,0.5505) .. controls (0.9840,0.5544) and (0.9758,0.5601) .. (0.9690,0.5672) .. controls (0.9622,0.5742) and (0.9569,0.5825) .. (0.9532,0.5915) .. controls (0.9495,0.6005) and (0.9475,0.6101) .. (0.9475,0.6198) .. controls (0.9475,0.6294) and (0.9492,0.6389) .. (0.9527,0.6479) .. controls (0.9560,0.6567) and (0.9611,0.6647) .. (0.9677,0.6715) .. controls (0.9747,0.6790) and (0.9830,0.6850) .. (0.9924,0.6892) .. controls (1.0012,0.6933) and (1.0109,0.6955) .. (1.0207,0.6955) .. controls (1.0327,0.6955) and (1.0446,0.6927) .. (1.0552,0.6871) .. controls (1.0660,0.6813) and (1.0753,0.6732) .. (1.0826,0.6634) .. controls (1.0871,0.6571) and (1.0906,0.6501) .. (1.0926,0.6427) .. controls (1.0949,0.6341) and (1.0960,0.6253) .. (1.0959,0.6164) .. controls (1.0959,0.6139) and (1.0957,0.6119) .. (1.0956,0.6092) .. controls (1.0577,0.6100) and (1.0199,0.6095) .. (0.9820,0.6095) -- cycle(1.0606,0.6358) .. controls (1.0578,0.6453) and (1.0531,0.6526) .. (1.0463,0.6575) .. controls (1.0397,0.6625) and (1.0312,0.6650) .. (1.0210,0.6650) .. controls (1.0124,0.6651) and (1.0041,0.6622) .. (0.9973,0.6570) .. controls (0.9903,0.6517) and (0.9853,0.6443) .. (0.9830,0.6359) .. controls (1.0089,0.6359) and (1.0348,0.6358) .. (1.0606,0.6358) -- cycle(1.1761,0.6624) .. controls (1.1632,0.6614) and (1.1542,0.6580) .. (1.1492,0.6523) .. controls (1.1441,0.6465) and (1.1415,0.6363) .. (1.1415,0.6214) -- (1.1415,0.5487) -- (1.1083,0.5487) -- (1.1083,0.6913) -- (1.1394,0.6913) -- (1.1394,0.6748) .. controls (1.1438,0.6808) and (1.1494,0.6856) .. (1.1559,0.6891) .. controls (1.1621,0.6923) and (1.1690,0.6938) .. (1.1760,0.6937) .. controls (1.1760,0.6833) and (1.1761,0.6728) .. (1.1761,0.6624) -- cycle(0.8646,0.8092) .. controls (0.8244,0.8248) and (0.6787,0.8306) .. (0.6784,0.7437) .. controls (0.6359,0.7165) and (0.6078,0.6721) .. (0.6078,0.6246) .. controls (0.6077,0.5410) and (0.7016,0.4916) .. (0.7705,0.5391) .. controls (0.8394,0.5866) and (0.8268,0.6919) .. (0.7486,0.7217) .. controls (0.7411,0.7246) and (0.7248,0.7297) .. (0.7117,0.7286) .. controls (0.6931,0.7168) and (0.6704,0.6924) .. (0.6597,0.6682) .. controls (0.6918,0.7064) and (0.7528,0.6983) .. (0.7737,0.6530) .. controls (0.7947,0.6076) and (0.7614,0.5559) .. (0.7115,0.5562) .. controls (0.6914,0.5562) and (0.6724,0.5649) .. (0.6594,0.5802) .. controls (0.6410,0.6019) and (0.6363,0.6254) .. (0.6400,0.6484) .. controls (0.6532,0.7289) and (0.7487,0.7748) .. (0.8197,0.7924) .. controls (0.7966,0.7801) and (0.7548,0.7600) .. (0.7255,0.7380) .. controls (0.8108,0.7051) and (0.8246,0.7770) .. (0.8646,0.8092) -- cycle(0.8731,0.5487) -- (0.8189,0.6913) -- (0.8542,0.6913) -- (0.8874,0.5965) -- (0.9217,0.6913) -- (0.9561,0.6913) -- (0.8991,0.5487) -- cycle
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Picture mode ducks
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\def\picduck{%
- % bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(6.5,29.5)(-1,17.5)(16.8,27.3)
- \qbezier(6.5,29.5)(9,30.5)(11.4,28.0)
- \qbezier(11.4,28.0)(13.5,26.5)(16.8,27.3)
- % head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(06.5,29.5)(6,41.5)(16.8,42.4)
- \qbezier(16.8,42.4)(29,41)(25.3,24)
- % body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(7.8,23.2)(8,22.8)(8,22.5)
- \qbezier(8,22.5)(-5,9)(8,3)
- \qbezier(8,3)(22,-2)(35,6.5)
- \qbezier(35,6.5)(46,15)(35,28.3)
- \qbezier(35,28.3)(30,25)(25.3,24)
- % right eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(13,32)(13.8,34.5)(16,34)
- \qbezier(16,34)(17.3,33.2)(16.7,31)
- \qbezier(16.7,31)(16,29.1)(14.5,29.3)
- \qbezier(14.5,29.3)(12.7,29.5)(13,32)
- \put(15.3,31.3){\circle*{1.8}}
- % left eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \qbezier(7.7,33.2)(8.4,35.7)(10.3,35)
- \qbezier(10.3,35)(11.2,34)(10.4,32.2)
- \qbezier(10.4,32.2)(9.7,30.7)(8.7,30.7)
- \qbezier(8.7,30.7)(7.2,30.9)(7.7,33.2)
- \put(9.5,32.7){\circle*{1.5}}
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% 32237378723223
-% 23737232212232237822
-% 3282232232232232232<3723
-% 382232232232232232232232232
-% 72232322323323223223223223282
-% 7503223223522332322322322322372
-% 9hklke23232<252<2322322322322323
-% 9jzltrg22320fklke23232232232232232
-% 0lzp ye252qkzliuk92323223223223223
-% 2dkfaw233<fzl, .g623232232232232282
-% 3<<432325<eklits9232322322322322322
-% ++#@o$;<32329edw22322322322322322323
-% o++oo@oooo%::12<<<<123223223223223223 328
-% o++o+oo+o+oooooO@=*:<32232232232232232 323782282
-% +o+oo+o+oooooo%-:12232232232232232232 23237322322373
-% ++@+++o o+%-:<32232232232232232232232 32237822322322322322
-% +oOoo&><<32232232232232232232232232282822322322322322322372
-% 37232232232232232232232232232232232232232232232232232237<
-% 728282232232232232232232232232232232232232232232232232232232
-% 282232232232232232232232232232232232232232232232232232232232232
-% 282232232232232232232232232232232232232232232232232232232232232282
-% 7322322322322322322322322322322322322322322322322322322322322322322
-% 23223223223223223223223223223223223223223223223223223223223223223223
-%322322322322322322322322322322322322322322322322322322322322322322322
-%322322322322322322322322322322322322322322322322322322322322322322322
-%232232232232232232232232232232232232232232232232232232232232232232282
-%82232232232232232232232232232232232232232232232232232232232232232282
-%3223223223223223223223223223223223223223223223223223223223223223282
-%273223223223223223223223223223223223223223223223223223223223223723
-% 273223223223223223223223223223223223223223223223223223223223723
-% 228223223223223223223223223223223223223223223223223223228232
-% 2822322322322322322322322322322322322322322322322378232
-% 2378223223223223223223223223223223223223223782232
-% 322378282232232232232232232232282878223223
-% 223232232282828282322322323223
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% stripes for sports jerseys
-%
-% code contributed by Carla Maggi
-% https://tex.stackexchange.com/a/387126/36296
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\tikzset{
- /stripes/.cd,
- color/.code = \def\stripes@color{#1},
- distance/.code = \def\stripes@distance{#1},
- width/.code = \def\stripes@width{#1},
- height/.code = \def\stripes@height{#1},
- initialx/.code = \def\stripes@initialx{#1},
- initialy/.code = \def\stripes@initialy{#1},
- rotate/.code = \def\stripes@rotate{#1},
- emblem/.code = \def\stripes@emblem{#1},
- % setting defaults %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- color = black,
- distance = 0.3,
- width = 0.15,
- height = 2.7,
- initialx = 0.1,
- initialy = -0.3,
- rotate = -10,
- emblem = \empty
-}
-
-\def\stripes@draw{%
- \path (0.1,0.1) rectangle (2.1,1.45);
- \pgfinterruptboundingbox
- \scope
- \clip \duckpathjacket;
- \foreach \shifta in {0,\stripes@distance,...,2.4}{%
- \fill[\stripes@color,rotate around={\stripes@rotate:(1.2,0.9)}]
- ($(\stripes@initialx,\stripes@initialy)+(\shifta,0)$) rectangle ($(\stripes@initialx,\stripes@initialy)+(\shifta,0)+(\stripes@width,\stripes@height)$);
- }
- \endscope
- \endpgfinterruptboundingbox
- \node at (wing) {\stripes@emblem };
-}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%.........................%%%%%%%%%%%%%%%%%%%.........................
-%....................%%%%%%%%%............%%%%%%%%....................
-%................%%%%%%....%%...................%%%%%%................
-%.............%%%%%.......%%%.......................%%%%%.............
-%...........%%%%........%%%%%%%%%...................%%%%%%%...........
-%.........%%%........%%%%%%%%%%%%%%%%..............%%%%%%%%%%.........
-%.......%%%.......%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.......
-%......%%%...%%%%%%%%%%%%%%%%%%%%%%%%%%..............%%%%%%%%%%%......
-%.....%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%................%%%%%%%%%%%.....
-%...%%%%........%%%%%%%%%%%%%%%%%%%%%...................%%%%%%%%%%%...
-%...%%%..........%%%%%%%%%%%%%%%%%%%.....................%%%%%%%%%%...
-%..%%%............%%%%%%%%%%%%%%%%%.......................%%%%%%%%%%..
-%.%%%%............%%%%%%%%%%%%%%%%%........................%%%%%%%%%%.
-%.%%%..............%%%%%%%.......%%%......................%%%.....%%%.
-%%%%..............%%...............%%%...................%%%.......%%%
-%%%..............%%.................%%%..................%%.........%%
-%%%%............%%%...................%%%...............%%..........%%
-%%%%...........%%%.....................%%%.............%%...........%%
-%%%%%..........%%........................%%%%%%%%%%%%%%%%...........%%
-%%%%%........%%%........................%%%%%%%%%%%%%%%%%%.........%%%
-%.%%%%%%%%%%%%%%%......................%%%%%%%%%%%%%%%%%%%.........%%.
-%.%%%%%%%%%%%%%%%%.....................%%%%%%%%%%%%%%%%%%%........%%%.
-%..%%%%%%%%%%%%%%%%...................%%%%%%%%%%%%%%%%%%%%%.......%%..
-%...%%%%%%%%%%%%%%%%%................%%%%%%%%%%%%%%%%%%%%%%......%%...
-%...%%%%%%%%%%%%%%%%%%............%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%....
-%.....%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%....%%%.....
-%......%%%%%%%%%%%%%%%%................%%%%%%%%%%%%%%%%......%%%......
-%.......%%%%%%%%%%%%%%....................%%%%%%%%%%........%%%.......
-%.........%%%%%%%%%%%........................%%%%.........%%%.........
-%...........%%%%%%%%%........................%%........%%%%...........
-%.............%%%%%%%%%.....................%%......%%%%%.............
-%................%%%%%%%%.................%%%...%%%%%%................
-%....................%%%%%%%%......%%%%%%%%%%%%%%%....................
-%..........................%%%%%%%%%%%%%%%%%..........................
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks-plain.tex b/graphics/pgf/contrib/tikzducks/tikzducks-plain.tex
deleted file mode 100644
index 9b01fb4d62..0000000000
--- a/graphics/pgf/contrib/tikzducks/tikzducks-plain.tex
+++ /dev/null
@@ -1,61 +0,0 @@
-% !TeX root = ./testing/plain_duck.tex
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% The tikzducks package
-% A package to bring rubber ducks into tikz
-% Maintained by samcarter
-%
-% Project repository and bug tracker:
-% https://github.com/samcarter/tikzducks
-%
-% Released under the LaTeX Project Public License v1.3c or later
-% See http://www.latex-project.org/lppl.txt
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\input miniltx
-\input graphicx.sty
-\input tikz.tex
-\usetikzlibrary{calc}%
-\usetikzlibrary{patterns}%
-
-\catcode`\@=11
-
-\let\pdfrandomseed\randomseed
-\font\tiny=cmr5
-
-% Duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\duck{\futurelet\next\doduck}
-\def\doduck{%
- \ifx[\next %]
- \expandafter\doduckopt
- \else
- \scope%%
- \tikzset{/duck/.cd}%
- \duck@draw%
- \endscope%%
- \fi
-}
-\def\doduckopt[#1]{%
- \scope%%
- \tikzset{/duck/.cd,#1}%
- \duck@draw%
- \endscope%%
-}
-
-% Stripes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\stripes{\futurelet\next\dostripes}
-\def\dostripes{
- \ifx[\next %]
- \expandafter\dostripesopt
- \else
- \tikzset{/stripes/.cd}\stripes@draw
- \fi
-}
-\def\dostripesopt[#1]{%
- \tikzset{/stripes/.cd,#1}\stripes@draw
-}
-
-\input tikzducks-generic.tex
-
-\catcode`\@=12 \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzducks/tikzducks.sty b/graphics/pgf/contrib/tikzducks/tikzducks.sty
index 786b0e269a..a2cc6c302f 100644
--- a/graphics/pgf/contrib/tikzducks/tikzducks.sty
+++ b/graphics/pgf/contrib/tikzducks/tikzducks.sty
@@ -9,25 +9,27 @@
% https://github.com/samcarter/tikzducks
%
% 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{tikzducks}[2024/04/27 version v1.8 Draw rubber ducks in TikZ]
+\ProvidesPackage{tikzducks}[2025/01/31 version v2.0 Draw rubber ducks in TikZ]
-\RequirePackage{expl3}
\RequirePackage{tikz}
-\usetikzlibrary{patterns} % for the wizard hat
+\usetikzlibrary{patterns.meta} % for the wizard hat
\usetikzlibrary{calc} % for the sports jerseys
+\usetikzlibrary{decorations.shapes} % for sombrero
+\usetikzlibrary{decorations.pathmorphing}
-\definecolor{duck@overleafcol}{RGB}{72,172,60}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% misc helper code
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand*{\duck}[1][]{%
- \begin{scope}%
- \tikzset{/duck/.cd,#1}%
- \duck@draw%
- \end{scope}%
-}
+% colour for the overleaf duck
+\definecolor{duck@overleafcol}{RGB}{72,172,60}
+% using a random seed, e.g. for randuck
\ExplSyntaxOn
\ifdefined\sys_rand_seed:
\pgfmathsetseed {\sys_rand_seed:}
@@ -44,9 +46,1849 @@
\fi
\ExplSyntaxOff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Options
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% for randomhead and randomaccessoires
+\def\duck@listhead{}
+\def\duck@listacces{}
+
+\ExplSyntaxOn
+% based on https://topanswers.xyz/tex?q=8082#a7698
+\NewDocumentCommand{\duck@ini}{om}{
+ \expandafter\newif\csname ifduck@#2\endcsname
+ \IfValueT{#1}{
+ \tl_put_right:cn { duck@list#1 } { {#2} }
+ }
+}
+\ExplSyntaxOff
+
+\duck@ini{name}
+\duck@ini{invisible}
+% Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\duck@ini{water}
+% body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\duck@ini{grumpy}
+\duck@ini{laughing}
+\duck@ini{parrot}
+% hair styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\duck@ini[head]{shorthair}
+\duck@ini[head]{longhair}
+\duck@ini[head]{crazyhair}
+\duck@ini[head]{recedinghair}
+\duck@ini{eyebrow}
+\duck@ini[head]{beard}
+\duck@ini[head]{mohican}
+\duck@ini[head]{mullet}
+\duck@ini[head]{parting}
+% clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\duck@ini{clothing}
+\duck@ini{tshirt}
+\duck@ini{jacket}
+\duck@ini{tie}
+\duck@ini[acces]{cape}
+\duck@ini{stripes}
+\duck@ini[acces]{bowtie}
+\duck@ini{lapel}
+\duck@ini{aodai}
+\duck@ini[acces]{scarf}
+% Headgear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\duck@ini[head]{alien}
+\duck@ini[head]{hat}
+\duck@ini[head]{cap}
+\duck@ini[head]{santa}
+\duck@ini{unicorn}
+\duck@ini[head]{magichat}
+\duck@ini[head]{chef}
+\duck@ini[head]{witch}
+\duck@ini[head]{graduate}
+\duck@ini[head]{beret}
+\duck@ini[head]{crown}
+\duck@ini[head]{queencrown}
+\duck@ini[head]{kingcrown}
+\duck@ini[head]{peakedcap}
+\duck@ini[head]{bunny}
+\duck@ini[head]{tophat}
+\duck@ini[head]{darthvader}
+\duck@ini[head]{harlequin}
+\duck@ini[head]{strawhat}
+\duck@ini[head]{helmet}
+\duck@ini[head]{viking}
+\duck@ini[head]{devil}
+\duck@ini[head]{conicalhat}
+\duck@ini[head]{sailor}
+\duck@ini[head]{bobblehat}
+\duck@ini[head]{sombrero}
+% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\duck@ini[acces]{glasses}
+\duck@ini[acces]{sunglasses}
+\duck@ini[acces]{squareglasses}
+\duck@ini[acces]{icecream}
+\duck@ini[acces]{book}
+\duck@ini[acces]{magicwand}
+\duck@ini[acces]{cricket}
+\duck@ini[acces]{rollingpin}
+\duck@ini[acces]{signpost}
+\duck@ini[acces]{lightsaber}
+\duck@ini[acces]{cake}
+\duck@ini[acces]{pizza}
+\duck@ini[acces]{hockey}
+\duck@ini[acces]{baguette}
+\duck@ini[acces]{football}
+\duck@ini[acces]{mask}
+\duck@ini[acces]{necklace}
+\duck@ini[acces]{milkshake}
+\duck@ini[acces]{wine}
+\duck@ini[acces]{prison}
+\duck@ini{speech}
+\duck@ini{think}
+\duck@ini[acces]{torch}
+\duck@ini[acces]{easter}
+\duck@ini[acces]{basket}
+\duck@ini{buttons}
+\duck@ini{sheep}
+\duck@ini{horsetail}
+\duck@ini[acces]{crozier}
+\duck@ini{davidlikespineapplepizza}
+\duck@ini{wing}
+\duck@ini[acces]{stethoscope}
+\duck@ini[acces]{neckerchief}
+\duck@ini{snowduck}
+\duck@ini{vampire}
+\duck@ini[acces]{crystalball}
+\duck@ini[acces]{cheese}
+\duck@ini[acces]{shovel}
+\duck@ini[acces]{pickaxe}
+\duck@ini[acces]{strawbroom}
+\duck@ini[acces]{broom}
+\duck@ini[acces]{umbrella}
+\duck@ini[acces]{umbrellaclosed}
+\duck@ini[acces]{handbag}
+\duck@ini[acces]{cocktail}
+\duck@ini{overleaf}
+\duck@ini[acces]{banana}
+\duck@ini[acces]{stick}
+\duck@ini{megaphone}
+
+\tikzset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Pass unknown keys on to tikz
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ /duck/.search also={/tikz,/pgf},
+ /duck/.cd,
+ name/.code = \duck@nametrue
+ \def\duck@name{#1},
+ invisible/.code = \duck@invisibletrue,
+ randomhead/.code = \shuffleducks,
+ randomhead/.forward to = /duck/\randomhead,
+ randomaccessories/.code = \shuffleducks,
+ randomaccessories/.forward to = /duck/\randomaccessories,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Environment
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ water/.code = \duck@watertrue
+ \def\duck@water{#1},
+ water/.default = blue,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ body/.code = \def\duck@body{#1},
+ body = yellow!70!brown,
+ head/.code = \def\duck@head{#1},
+ eye/.code = \def\duck@eye{#1},
+ eye = white!85!yellow,
+ pupil/.code = \def\duck@pupil{#1},
+ pupil = black,
+ bill/.code = \def\duck@bill{#1},
+ bill = orange!50!brown,
+ grumpy/.code = \duck@grumpytrue,
+ laughing/.code = \duck@laughingtrue,
+ parrot/.code = \duck@parrottrue,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % clothing
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ tshirt/.code = \duck@tshirttrue
+ \duck@clothingtrue
+ \def\duck@tshirt{#1},
+ tshirt/.default = white,
+ jacket/.code = \duck@jackettrue
+ \duck@clothingtrue
+ \def\duck@jacket{#1},
+ jacket/.default = blue,
+ tie/.code = \duck@tietrue
+ \def\duck@tie{#1},
+ tie/.default = blue,
+ cape/.code = \duck@capetrue
+ \duck@clothingtrue
+ \def\duck@cape{#1},
+ cape/.default = red,
+ stripes/.code = \duck@stripestrue
+ \duck@clothingtrue
+ \def\duck@stripes{#1},
+ stripes/.default = \stripes ,
+ bowtie/.code = \duck@bowtietrue
+ \def\duck@bowtie{#1},
+ bow tie/.forward to = /duck/bowtie,
+ bowtie/.default = black,
+ lapel/.code = \duck@lapeltrue
+ \def\duck@lapel{#1},
+ lapel/.default = black,
+ aodai/.code = \duck@aodaitrue
+ \duck@clothingtrue
+ \def\duck@aodai{#1},
+ ao dai/.forward to = /duck/aodai,
+ aodai/.default = blue!50!black,
+ scarf/.code = \duck@scarftrue
+ \def\duck@scarf{#1},
+ scarf/.default = red!70!black,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % hair styles
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ shorthair/.code = \duck@shorthairtrue
+ \def\duck@hair{#1},
+ short hair/.forward to = /duck/shorthair,
+ shorthair/.default = brown,
+ longhair/.code = \duck@longhairtrue
+ \def\duck@hair{#1},
+ long hair/.forward to = /duck/longhair,
+ longhair/.default = brown,
+ crazyhair/.code = \duck@crazyhairtrue
+ \def\duck@hair{#1},
+ crazy hair/.forward to = /duck/crazyhair,
+ crazyhair/.default = brown,
+ recedinghair/.code = \duck@recedinghairtrue
+ \def\duck@hair{#1},
+ receding hair/.forward to = /duck/recedinghair,
+ recedinghair/.default = brown,
+ eyebrow/.code = \duck@eyebrowtrue
+ \def\duck@eyebrow{#1},
+ eyebrow/.default = brown,
+ beard/.code = \duck@beardtrue
+ \def\duck@beard{#1},
+ beard/.default = brown,
+ mohican/.code = \duck@mohicantrue
+ \def\duck@hair{#1},
+ mohican/.default = brown,
+ mullet/.code = \duck@mullettrue
+ \def\duck@hair{#1},
+ mullet/.default = brown,
+ parting/.code = \duck@partingtrue
+ \def\duck@hair{#1},
+ parting/.default = brown,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Headgear
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ alien/.code = \duck@alientrue
+ \def\duck@alien{#1},
+ alien/.default = green,
+ hat/.code = \duck@hattrue
+ \def\duck@hat{#1},
+ hat/.default = brown,
+ cap/.code = \duck@captrue
+ \def\duck@cap{#1},
+ cap/.default = blue,
+ santa/.code = \duck@santatrue
+ \def\duck@santa{#1},
+ santa/.default = red!80!black,
+ chef/.code = \duck@cheftrue
+ \def\duck@chef{#1},
+ chef/.default = gray!20!white,
+ graduate/.code = \duck@graduatetrue
+ \def\duck@graduate{#1},
+ graduate/.default = black,
+ tassel/.code = \def\duck@tassel{#1},
+ tassel = red,
+ beret/.code = \duck@berettrue
+ \def\duck@beret{#1},
+ beret/.default = black,
+ unicorn/.code = \duck@unicorntrue
+ \def\duck@unicorn{#1},
+ unicorn/.default = pink,
+ magichat/.code = \duck@magichattrue
+ \def\duck@magichat{#1},
+ magic hat/.forward to = /duck/magichat,
+ magichat/.default = violet,
+ magicstars/.code = \def\duck@magicstars{#1},
+ magic stars/.forward to = /duck/magicstars,
+ magicstars = yellow!80!brown,
+ witch/.code = \duck@witchtrue
+ \def\duck@witch{#1},
+ witch/.default = black,
+ crown/.code = \duck@crowntrue
+ \def\duck@crown{#1},
+ crown/.default = yellow,
+ queencrown/.code = \duck@queencrowntrue
+ \def\duck@queencrown{#1},
+ queen crown/.forward to = /duck/queencrown,
+ queencrown/.default = yellow,
+ kingcrown/.code = \duck@kingcrowntrue
+ \def\duck@kingcrown{#1},
+ king crown/.forward to = /duck/kingcrown,
+ kingcrown/.default = gray,
+ bunny/.code = \duck@bunnytrue
+ \def\duck@bunny{#1},
+ bunny/.default = \duck@body,
+ inear/.code = \def\duck@inear{#1},
+ in ear/.forward to = /duck/inear,
+ inear = \duck@bunny!50!white,
+ peakedcap/.code = \duck@peakedcaptrue
+ \def\duck@peakedcap{#1},
+ peaked cap/.forward to = /duck/peakedcap,
+ peakedcap/.default = blue,
+ tophat/.code = \duck@tophattrue
+ \def\duck@tophat{#1},
+ top hat/.forward to = /duck/tophat,
+ tophat/.default = black,
+ darthvader/.code = \duck@darthvadertrue
+ \def\duck@darthvader{#1},
+ darth vader/.forward to = /duck/darthvader,
+ darthvader/.default = black,
+ harlequin/.code = \duck@harlequintrue
+ \def\duck@harlequin{#1},
+ harlequin/.default = blue,
+ niuqelrah/.code = \def\duck@niuqelrah{#1},
+ niuqelrah = red,
+ strawhat/.code = \duck@strawhattrue
+ \def\duck@strawhat{#1},
+ straw hat/.forward to = /duck/strawhat,
+ strawhat/.default = gray!30!white,
+ ribbon/.code = \def\duck@ribbon{#1},
+ ribbon = black,
+ helmet/.code = \duck@helmettrue
+ \def\duck@helmet{#1},
+ helmet/.default = gray,
+ devil/.code = \duck@deviltrue
+ \def\duck@devil{#1},
+ devil/.default = red,
+ viking/.code = \duck@vikingtrue
+ \def\duck@viking{#1}
+ \duck@deviltrue
+ \def\duck@devil{brown!20!white},
+ viking/.default = gray,
+ conicalhat/.code = \duck@conicalhattrue
+ \def\duck@conicalhat{#1},
+ conical hat/.forward to = /duck/conicalhat,
+ conicalhat/.default = brown!90!orange!90!white,
+ sailor/.code = \duck@sailortrue
+ \def\duck@sailor{#1},
+ sailor/.default = white!80!gray,
+ bobblehat/.code = \duck@bobblehattrue
+ \def\duck@bobblehat{#1},
+ bobble hat/.forward to = /duck/bobblehat,
+ bobblehat/.default = red!70!black,
+ sombrero/.code = \duck@sombrerotrue
+ \def\duck@sombrero{#1},
+ sombrero/.default = orange!70!yellow,
+ sombreroa/.code = \def\duck@sombreroa{#1},
+ sombreroa = green!70!blue,
+ sombrerob/.code = \def\duck@sombrerob{#1},
+ sombrerob = red,
+ sombreroc/.code = \def\duck@sombreroc{#1},
+ sombreroc = blue,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Accessories
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ glasses/.code = \duck@glassestrue
+ \def\duck@glasses{#1},
+ glasses/.default = black,
+ sunglasses/.code = \duck@sunglassestrue
+ \def\duck@sunglasses{#1},
+ sunglasses/.default = black,
+ squareglasses/.code = \duck@squareglassestrue
+ \def\duck@squareglasses{#1},
+ square glasses/.forward to = /duck/squareglasses,
+ squareglasses/.default = black,
+ icecream/.code = \duck@icecreamtrue
+ \def\duck@cone{#1},
+ ice cream/.forward to = /duck/icecream,
+ icecream/.default = brown!60!gray,
+ flavoura/.code = \def\duck@flavoura{#1},
+ flavour a/.forward to = /duck/flavoura,
+ flavoura = brown!50!black,
+ flavourb/.code = \def\duck@flavourb{#1},
+ flavour b/.forward to = /duck/flavourb,
+ flavourb = white!70!brown,
+ flavourc/.code = \def\duck@flavourc{#1},
+ flavour c/.forward to = /duck/flavourc,
+ flavourc = red!50!white,
+ book/.code = \duck@booktrue
+ \def\duck@book{#1},
+ bookcolour/.code = \def\duck@bookcolour{#1},
+ book colour/.forward to = /duck/bookcolour,
+ book color/.forward to = /duck/bookcolour,
+ bookcolor/.forward to = /duck/bookcolour,
+ bookcolour = brown,
+ signpost/.code = \duck@signposttrue
+ \def\duck@signpost{#1},
+ sign post/.forward to = /duck/signpost,
+ signcolour/.code = \def\duck@signcolour{#1},
+ sign colour/.forward to = /duck/signcolour,
+ sign color/.forward to = /duck/signcolour,
+ signcolor/.forward to = /duck/signcolour,
+ signcolour = brown!50!black,
+ signback/.code = \def\duck@signback{#1},
+ sign back/.forward to = /duck/signback,
+ signback = green!40!black,
+ magicwand/.code = \duck@magicwandtrue,
+ magic want/.forward to = /duck/magicwand,
+ cricket/.code = \duck@crickettrue
+ \def\duck@cricket{#1},
+ cricket/.default = brown,
+ rollingpin/.code = \duck@rollingpintrue
+ \def\duck@rollingpin{#1},
+ rolling pin/.forward to = /duck/rollingpin,
+ rollingpin/.default = brown,
+ lightsaber/.code = \duck@lightsabertrue
+ \def\duck@lightsaber{#1},
+ light saber/.forward to = /duck/lightsaber,
+ lightsaber/.default = green,
+ cake/.code = \duck@caketrue
+ \def\duck@cake{#1},
+ cake/.default = violet,
+ pizza/.code = \duck@pizzatrue,
+ hockey/.code = \duck@hockeytrue
+ \def\duck@hockey{#1},
+ hockey/.default = brown,
+ baguette/.code = \duck@baguettetrue
+ \def\duck@baguette{#1},
+ baguette/.default = brown,
+ football/.code = \duck@footballtrue
+ \def\duck@football{#1},
+ football/.default = white,
+ mask/.code = \duck@masktrue
+ \def\duck@mask{#1},
+ mask/.default = black,
+ necklace/.code = \duck@necklacetrue
+ \def\duck@necklace{#1},
+ necklace/.default = white!80!gray,
+ milkshake/.code = \duck@milkshaketrue
+ \def\duck@milkshake{#1},
+ milkshake/.default = red!20!white,
+ wine/.code = \duck@winetrue
+ \def\duck@wine{#1},
+ wine/.default = red!70!black,
+ prison/.code = \duck@prisontrue
+ \def\duck@prison{#1},
+ prison/.default = gray,
+ speech/.code = \duck@speechtrue
+ \def\duck@speech{#1},
+ think/.code = \duck@thinktrue
+ \def\duck@think{#1},
+ bubblecolour/.code = \def\duck@bubblecolour{#1},
+ bubble colour/.forward to = /duck/bubblecolour,
+ bubble color/.forward to = /duck/bubblecolour,
+ bubblecolor/.forward to = /duck/bubblecolour,
+ bubblecolour = gray!30!white,
+ torch/.code = \duck@torchtrue
+ \def\duck@torch{#1},
+ torch/.default = gray,
+ basket/.code = \duck@baskettrue
+ \def\duck@basket{#1},
+ basket/.default = brown!70!gray,
+ easter/.code = \duck@eastertrue
+ \duck@baskettrue
+ \def\duck@basket{#1},
+ easter/.default = brown!70!gray,
+ egga/.code = \def\duck@egga{#1},
+ egg a/.forward to = /duck/egga,
+ egga = blue,
+ eggb/.code = \def\duck@eggb{#1},
+ egg b/.forward to = /duck/eggb,
+ eggb = green,
+ eggc/.code = \def\duck@eggc{#1},
+ egg c/.forward to = /duck/eggc,
+ eggc = red,
+ buttons/.code = \duck@buttonstrue
+ \def\duck@buttons{#1},
+ buttons/.default = black,
+ sheep/.code = \duck@sheeptrue
+ \def\duck@sheep{#1},
+ sheep/.default = \duck@body,
+ horsetail/.code = \duck@horsetailtrue
+ \def\duck@horsetail{#1},
+ horsetail/.default = brown,
+ crozier/.code = \duck@croziertrue
+ \def\duck@crozier{#1},
+ crozier/.default = brown,
+ davidlikespineapplepizza/.code = \duck@davidlikespineapplepizzatrue
+ \duck@speechtrue
+ \def\duck@speech{\scalebox{\scalingfactor}{\scalebox{0.9}{\tiny ih, che schifo!}}},
+ david likes pineapple pizza/.forward to = /duck/davidlikespineapplepizza,
+ wing/.code = \duck@wingtrue
+ \def\duck@wing{#1},
+ wing/.default = yellow!50!brown,
+ stethoscope/.code = \duck@stethoscopetrue
+ \def\duck@stethoscope{#1},
+ stethoscope/.default = gray,
+ neckerchief/.code = \duck@neckerchieftrue
+ \def\duck@neckerchief{#1},
+ neckerchief/.default = brown,
+ woggle/.code = \def\duck@woggle{#1},
+ woggle = brown!50!black,
+ snowduck/.code = \duck@snowducktrue
+ \def\duck@snowduck{#1}
+ \def\duck@eye{#1}
+ \def\duck@body{#1}
+ \duck@tophattrue
+ \def\duck@tophat{black}
+ \duck@buttonstrue
+ \def\duck@buttons{black},
+ snow duck/.forward to = /duck/snowduck,
+ snowduck/.default = gray!15!white,
+ vampire/.code = \duck@vampiretrue
+ \def\duck@vampire{#1},
+ vampire/.default = white!85!yellow,
+ crystalball/.code = \duck@crystalballtrue
+ \def\duck@crystalball{#1},
+ crystal ball/.forward to = /duck/crystalball,
+ crystalball/.default = cyan,
+ cheese/.code = \duck@cheesetrue
+ \def\duck@cheese{#1},
+ cheese/.default = orange,
+ shovel/.code = \duck@shoveltrue
+ \def\duck@shovel{#1},
+ shovel/.default = gray,
+ pickaxe/.code = \duck@pickaxetrue
+ \def\duck@pickaxe{#1},
+ pickaxe/.default = gray,
+ strawbroom/.code = \duck@strawbroomtrue
+ \def\duck@strawbroom{#1},
+ strawbroom/.default = brown!50!white,
+ strawbroomstick/.code = \def\duck@strawbroomstick{#1},
+ strawbroomstick = brown,
+ strawbroomribbon/.code = \def\duck@strawbroomribbon{#1},
+ strawbroomribbon = red!50!black,
+ broom/.code = \duck@broomtrue
+ \def\duck@broom{#1},
+ broom/.default = brown,
+ broomstick/.code = \def\duck@broomstick{#1},
+ broomstick = gray!50!black,
+ umbrella/.code = \duck@umbrellatrue
+ \def\duck@umbrella{#1},
+ umbrella/.default = cyan,
+ umbrellaclosed/.code = \duck@umbrellaclosedtrue
+ \def\duck@umbrellaclosed{#1},
+ umbrellaclosed/.default = cyan,
+ umbrella closed/.forward to = /duck/umbrellaclosed,
+ handbag/.code = \duck@handbagtrue
+ \def\duck@handbag{#1},
+ handbag/.default = red!70!black,
+ cocktail/.code = \duck@cocktailtrue,
+ overleaf/.code = \duck@overleaftrue
+ \def\duck@body{duck@overleafcol}
+ \duck@graduatetrue
+ \def\duck@graduate{black}
+ \duck@squareglassestrue
+ \def\duck@squareglasses{black},
+ banana/.code = \duck@bananatrue
+ \def\duck@banana{#1},
+ banana/.default = yellow!80!orange,
+ stick/.code = \duck@sticktrue
+ \def\duck@stick{#1},
+ stick/.default = red!60!green,
+ leaf/.code = \def\duck@leaf{#1},
+ leaf = green!70!red,
+ megaphone/.code = \duck@megaphonetrue
+ \def\duck@megaphone{#1},
+ megaphone/.default = lightgray
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Hooks
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewHook{tikzducks/background}
+\NewHook{tikzducks/body}
+\NewHook{tikzducks/clothing}
+\NewHook{tikzducks/hair}
+\NewHook{tikzducks/hat}
+\NewHook{tikzducks/foreground}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Duck
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand*{\duck}[1][]{%
+\begin{scope}%
+\tikzset{/duck/.cd,#1}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% minimal bounding box size
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@invisible
+\else
+ \path (0.1,0.1) rectangle (2.1,2.12);
+\fi
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% defining some coordinates
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@name
+ \coordinate (\duck@name-wing) at (0.8,0.7);
+ \coordinate (\duck@name-head) at (0.9,2);
+ \coordinate (\duck@name-bill) at (0.5,1.3);
+ \coordinate (\duck@name-tail) at (1.82,1.41);
+\fi
+\coordinate (wing) at (0.8,0.7);
+\coordinate (head) at (0.9,2);
+\coordinate (bill) at (0.5,1.3);
+\coordinate (tail) at (1.82,1.41);
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% store the current scale factor
+% from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+\pgfmathsetmacro{\decoscalefactor}{sign(\tmpscaleA)*sign(\tmpscaleD)*\scalingfactor}%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Environment
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\UseHook{tikzducks/background}
+\csname duckhookbackground\endcsname
+%
+% water %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@water
+ \fill[\duck@water, even odd rule] (1.00,0.40) ellipse[x radius=0.88, y radius=0.35] (1.00,0.40) ellipse[x radius=0.75, y radius=0.25];
+ \fill[\duck@water, even odd rule] (1.00,0.40) ellipse[x radius=1.05, y radius=0.50] (1.00,0.40) ellipse[x radius=0.95, y radius=0.42];
+ \fill[\duck@water, even odd rule] (1.00,0.40) ellipse[x radius=1.23, y radius=0.63] (1.00,0.40) ellipse[x radius=1.17, y radius=0.57];
+ \fill[\duck@water, even odd rule] (1.00,0.40) ellipse[x radius=1.42, y radius=0.77] (1.00,0.40) ellipse[x radius=1.38, y radius=0.73];
+\fi
+%
+% sheep %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@sheep
+ \fill[\duck@sheep] (0.65,1.95) circle[radius=0.15] (0.50,1.75) circle[radius=0.15] (0.46,1.51) circle[radius=0.15] (0.37,1.00) circle[radius=0.15] (0.23,0.80) circle[radius=0.15] (0.20,0.60) circle[radius=0.15] (0.25,0.45) circle[radius=0.15] (0.35,0.30) circle[radius=0.15] (0.55,0.25) circle[radius=0.15] (0.75,0.20) circle[radius=0.15] (0.95,0.16) circle[radius=0.15] (1.15,0.20) circle[radius=0.15] (1.35,0.23) circle[radius=0.15] (1.55,0.30) circle[radius=0.15] (1.75,0.38) circle[radius=0.15] (1.95,0.50) circle[radius=0.15] (2.05,0.65) circle[radius=0.15] (2.10,0.85) circle[radius=0.15] (2.05,1.00) circle[radius=0.15] (2.00,1.15) circle[radius=0.15] (1.85,1.35) circle[radius=0.15] (1.60,1.25) circle[radius=0.15] (1.35,1.25) circle[radius=0.15] (1.30,1.50) circle[radius=0.15] (1.30,1.70) circle[radius=0.15] (1.20,1.90) circle[radius=0.15] (0.85,2.05) circle[radius=0.15] (1.05,2.00) circle[radius=0.15];
+\fi
+%
+% devil (back horn) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@devil
+ \fill[\duck@devil] (0.7723,2.3756) .. controls (0.6369,2.1184) and (0.7916,2.0228) .. (0.8360,1.9897) .. controls (0.8744,1.9675) and (0.8774,1.9511) .. (0.8853,1.9173) .. controls (0.8853,1.8595) and (0.8407,1.8127) .. (0.7856,1.8127) .. controls (0.7535,1.8178) and (0.7240,1.8231) .. (0.6965,1.8545) .. controls (0.6965,1.8545) and (0.4451,2.2259) .. (0.7723,2.3756) -- cycle;
+\fi
+%
+% Conical Hat (background) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@conicalhat
+ \fill[\duck@conicalhat!50!black,rotate=-21] (0.265,1.915) ellipse[x radius=0.79, y radius=0.1];
+ \fill[\duck@conicalhat!30!black] (0.5501,0.9739) -- (0.2002,1.9676) -- (0.2946,2.0008) -- (0.6445,1.0072) -- cycle;
+\fi
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% body parts
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@invisible
+\else
+%
+% body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\fill[\duck@body,overlay] \duckpathbody;
+%
+% head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifdefined\duck@head\else\let\duck@head=\duck@body\fi
+\fill[\duck@head]
+ (0.90,1.50) ellipse[x radius=0.50, y radius=0.625];
+%
+% bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@grumpy
+ \fill[\duck@bill] \duckpathgrumpybill;
+\else
+ \ifduck@laughing
+ \fill[\duck@bill!80!black,overlay] (0.40,1.20) .. controls (0.54,1.36) and (0.65,1.31) .. (0.91,1.37) .. controls (0.45,1.06) and (0.36,1.18) .. (0.40,1.20) -- cycle;
+ \fill[\duck@bill,overlay] (0.41,1.47) .. controls (0.64,1.53) and (0.54,1.30) .. (0.91,1.37) .. controls (-0.02,1.10) and (0.28,1.37) .. (0.41,1.47) -- cycle;
+ \else
+ \ifduck@parrot
+ \fill[\duck@bill!80!black]
+ (0.40,1.45) .. controls (0.51,1.48) and (0.54,1.44) .. (0.59,1.39) .. controls (0.63,1.34) and (0.69,1.34) .. (0.86,1.35) .. controls (0.43,1.15) and (0.37,1.13) .. (0.34,1.20) .. controls (0.52,1.27) and (0.34,1.40) .. (0.40,1.45) -- cycle;
+ \fill[\duck@bill]
+ (0.39,1.49) .. controls (0.50,1.52) and (0.54,1.44) .. (0.59,1.39) .. controls (0.63,1.34) and (0.68,1.34) .. (0.86,1.35) .. controls (0.43,1.15) and (0.54,1.40) .. (0.22,1.20) .. controls (0.24,1.52) and (0.39,1.49) .. (0.39,1.49) -- cycle;
+ \else
+ \fill[\duck@bill] \duckpathbill;
+ \fi
+ \fi
+\fi
+%
+% Superhero mask %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% has to be behind the eyes
+\ifduck@mask
+ \begin{scope}
+ \clip (0.90,1.50) ellipse[x radius=0.50, y radius=0.625];
+ \fill[\duck@mask,rotate=-15] (-0.1,1.59) rectangle (1.3,1.88);
+ \end{scope}
+\fi%
+%
+% right eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\fill[\duck@eye, rotate=-20]
+ (0.23,1.7675) ellipse[x radius=0.0893, y radius=0.125];
+\fill[\duck@pupil, rotate=-20]
+ (0.26,1.7575) ellipse[x radius=0.0357, y radius=0.0714];
+%
+% left eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\fill[\duck@eye, rotate=-20]
+ (-0.06,1.74) ellipse[x radius=0.0786, y radius=0.1143];
+\fill[\duck@pupil, rotate=-20]
+ (-0.03,1.73) ellipse[x radius=0.0286, y radius=0.0643];
+%
+\fi % from no duck
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\UseHook{tikzducks/body}
+\csname duckhookbody\endcsname
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% clothing
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Strap of the conical hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@conicalhat
+ \ifduck@clothing
+ \fill[\duck@conicalhat!30!black] (1.5943,1.5059) .. controls (1.4384,1.3576) and (1.2780,1.2120) .. (1.0987,1.0923) -- (1.0617,0.9549) .. controls (1.2151,1.0361) and (1.3476,1.1504) .. (1.4785,1.2630) .. controls (1.5417,1.3187) and (1.6038,1.3757) .. (1.6644,1.4344) -- cycle;
+ \else
+ \fill[\duck@conicalhat!30!black] (1.5943,1.5059) .. controls (1.4384,1.3576) and (1.2780,1.2120) .. (1.0987,1.0923) .. controls (0.9540,0.9995) and (0.7864,0.9875) .. (0.6358,1.0398) .. controls (0.6727,0.9043) and (0.9752,0.9113) .. (1.0617,0.9549) .. controls (1.2151,1.0361) and (1.3476,1.1504) .. (1.4785,1.2630) .. controls (1.5417,1.3187) and (1.6038,1.3757) .. (1.6644,1.4344) -- cycle;
+ \fi
+\fi
+%
+% tshirt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@tshirt
+ \fill[\duck@tshirt,overlay] \duckpathtshirt;
+\fi
+%
+% tie %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@tie
+ \fill[\duck@tie,rotate=-12] (0.32,0.7) rectangle (0.43,1.15);
+\fi
+%
+% jacket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@jacket
+ \fill[\duck@jacket,overlay] \duckpathjacket;
+\fi
+%
+% Áo dài %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@aodai
+ \fill[\duck@aodai,overlay] (1.819,1.419) .. controls (2.871,0.120) and (0.711,-0.145) .. (0.296,0.251) .. controls (-0.118,0.647) and (0.232,1.073) .. (0.440,1.128) -- (0.567,0.927) .. controls (0.567,0.927) and (0.543,0.906) .. (0.509,0.882) -- (0.481,0.929) -- (0.458,0.915) -- (0.487,0.868) .. controls (0.473,0.859) and (0.457,0.850) .. (0.441,0.842) -- (0.422,0.894) -- (0.397,0.885) -- (0.417,0.831) .. controls (0.404,0.826) and (0.391,0.821) .. (0.378,0.818) -- (0.364,0.869) -- (0.338,0.862) -- (0.351,0.815) .. controls (0.334,0.814) and (0.318,0.817) .. (0.304,0.825) .. controls (0.303,0.774) and (0.329,0.759) .. (0.365,0.763) -- (0.376,0.722) -- (0.402,0.729) -- (0.391,0.768) .. controls (0.405,0.772) and (0.420,0.778) .. (0.435,0.784) -- (0.447,0.750) -- (0.472,0.759) -- (0.459,0.796) .. controls (0.477,0.805) and (0.496,0.815) .. (0.512,0.825) -- (0.533,0.791) -- (0.556,0.805) -- (0.535,0.840) .. controls (0.567,0.860) and (0.590,0.877) .. (0.590,0.877) .. controls (1.011,1.168) and (0.887,0.936) .. (1.819,1.419) -- cycle;
+\fi
+%
+% lapel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@lapel
+ \fill[\duck@lapel] (0.490,1.145) .. controls (0.3984,1.13) and (0.3515,1.08) .. (0.3515,1.08) -- (0.4265,1.0192) -- (0.35,0.98) -- (0.513,0.700) -- (1.0089,0.9162) -- (0.9547,0.9868) -- (1.1194,0.9782) -- (1.0822,1.135) .. controls (0.9616,1.1) and (0.8648,1.0300) .. (0.513,0.700) -- cycle;
+\fi
+%
+% stripes for football jersey %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@stripes
+ \duck@stripes
+\fi
+%
+% superhero cape %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@cape
+ \fill[\duck@cape,overlay] \duckpathcape;
+\fi
+%
+% bowtie %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@bowtie
+ \fill[\duck@bowtie] (0.4382, 1.1105) .. controls (0.3984, 1.0671) and (0.3911, 0.9535) .. (0.4116, 0.9176) .. controls (0.4958, 0.9064) and (0.565, 0.9487) .. (0.565, 0.9487) -- (0.6448, 0.9398) .. controls (0.6448, 0.9398) and (0.6777, 0.8844) .. (0.804, 0.8689) .. controls (0.8323, 0.9056) and (0.8422, 1.0026) .. (0.8284, 1.0551) .. controls (0.7881, 1.0942) and (0.6537, 1.0285) .. (0.6537, 1.0285) -- (0.5739, 1.0374) .. controls (0.5739, 1.0374) and (0.5436, 1.0956) .. (0.4382, 1.1105) -- cycle;
+\fi
+%
+% necklace (not really clothing, but needs to be below the hair) %%%%%
+\ifduck@necklace
+ \fill[\duck@necklace] (0.5000,1.112) circle[radius=0.032] (0.5100,1.050) circle[radius=0.032] (0.5200,0.990) circle[radius=0.032] (0.5400,0.931) circle[radius=0.032] (0.5825,0.885) circle[radius=0.032] (0.6450,0.885) circle[radius=0.032] (0.7000,0.910) circle[radius=0.032] (0.7500,0.945) circle[radius=0.032] (0.8000,0.980) circle[radius=0.032] (0.8500,1.020) circle[radius=0.032] (0.9000,1.050) circle[radius=0.032] (0.9500,1.080) circle[radius=0.032] (1.0000,1.110) circle[radius=0.032] (1.0550,1.130) circle[radius=0.032] (1.1100,1.150) circle[radius=0.032] (1.1650,1.165) circle[radius=0.032] (1.2200,1.180) circle[radius=0.032] (1.2750,1.195) circle[radius=0.032] (1.3300,1.210) circle[radius=0.032];
+\fi
+%
+% Scout neckerchief %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@neckerchief
+ \fill[\duck@neckerchief]
+ (0.3650,1.0892) .. controls (0.4127,1.1589) and (0.4900,1.1450) .. (0.4900,1.1450) .. controls (0.6500,0.9300) and (1.1366,1.2400) .. (1.3675,1.2649) .. controls (1.4131,1.2533) and (1.4052,1.2446) .. (1.4099,1.2124) .. controls (1.3028,1.0810) and (0.7415,0.8930) .. (0.6807,0.9076) .. controls (0.8257,0.7387) and (0.6347,0.7168) .. (0.7151,0.4426) .. controls (0.6059,0.5672) and (0.5513,0.6588) .. (0.5938,0.8388) .. controls (0.5871,0.6953) and (0.4493,0.7565) .. (0.4716,0.4967) .. controls (0.3682,0.6697) and (0.3820,0.7984) .. (0.5321,0.9351) .. controls (0.4635,0.9699) and (0.4115,1.0215) .. (0.3650,1.0892) -- cycle;
+ \fill[\duck@woggle, rounded corners=\scalingfactor*1, rotate=-10] (0.33,1.05) rectangle (0.55,0.98);
+\fi
+%
+% Scarf %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@scarf
+ \fill[\duck@scarf] (1.3780,1.2876) .. controls (1.1405,1.0484) and (0.7278,0.8710) .. (0.4865,1.1319) .. controls (0.4312,1.1245) and (0.3749,1.1088) .. (0.3443,1.0553) .. controls (0.4097,0.9269) and (0.4360,0.9534) .. (0.5231,0.8623) -- (0.4780,0.5230) -- (0.5666,0.5486) -- (0.6442,0.5011) -- (0.6584,0.6852) -- (0.6881,0.3913) -- (0.7782,0.4358) -- (0.8543,0.4133) -- (0.7988,0.8309) .. controls (1.0539,0.8635) and (1.1298,0.8415) .. (1.4849,1.1302) .. controls (1.4898,1.1985) and (1.4313,1.2543) .. (1.3780,1.2876) -- cycle;
+\fi
+%
+% buttons (same argument as for the necklace)
+\ifduck@buttons
+ \ifduck@jacket
+ \fill[\duck@buttons] (0.49,0.6) circle[radius=0.05] (0.46,0.45) circle[radius=0.05] (0.45,0.3) circle[radius=0.05];
+ \else
+ \fill[\duck@buttons] (0.53,0.75) circle[radius=0.05] (0.5,0.6) circle[radius=0.05] (0.47,0.45) circle[radius=0.05];
+ \fi
+\fi
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\UseHook{tikzducks/clothing}
+\csname duckhookclothing\endcsname
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% hair styles
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% short hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@shorthair
+ \path (0.1,0.1) rectangle (2.1,2.25);
+ \fill[\duck@hair,overlay] \duckpathshorthair;
+\fi
+%
+% long hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@longhair
+ \path (0.1,0.1) rectangle (2.1,2.25);
+ \fill[\duck@hair,overlay] \duckpathlonghair;
+\fi
+%
+% crazy hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@crazyhair
+ \path (0.1,0.1) rectangle (2.1,2.4);
+ \fill[\duck@hair,overlay] \duckpathcrazyhair;
+\fi
+%
+% receding hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@recedinghair
+ \path (0.1,0.1) rectangle (2.1,2.18);
+ \fill[\duck@hair,overlay] \duckpathrecedinghair;
+\fi
+%
+% mohican hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@mohican
+ \path (0.1,0.1) rectangle (2.1,2.24);
+ \fill[\duck@hair,overlay] \duckpathmohican;
+\fi
+%
+% mullet hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@mullet
+ \path (0.1,0.1) rectangle (2.1,2.17);
+ \fill[\duck@hair,overlay] \duckpathmullet;
+\fi
+%
+% middle parting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@parting
+ \path (0.1,0.1) rectangle (2.1,2.22);
+ \fill[\duck@hair,overlay] (1.4053,1.5403) .. controls (1.5524,2.2939) and (0.3739,2.5180) .. (0.4084,1.6117) .. controls (0.4248,1.8921) and (0.7860,1.9734) .. (0.7860,1.9734) .. controls (1.1125,1.5754) and (1.3375,1.4715) .. (1.4053,1.5403) -- cycle;
+\fi
+%
+% eye brow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfkeys{/duck/eyebrow/.@def/.get=\duck@test}
+\ifx\duck@eyebrow\duck@test
+ \ifdefined\duck@hair\let\duck@eyebrow=\duck@hair\fi
+\fi%
+\ifduck@eyebrow
+ \fill[\duck@eyebrow, rounded corners=\scalingfactor*1, rotate=60] (1.92,0.21) rectangle (1.98,-0.01);
+ \fill[\duck@eyebrow, rounded corners=\scalingfactor*1, rotate=100] (1.67,-0.77) rectangle (1.73,-0.95);
+\fi
+%
+% beard %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfkeys{/duck/beard/.@def/.get=\duck@test}
+\ifx\duck@beard\duck@test
+ \ifdefined\duck@hair\let\duck@beard=\duck@hair\fi
+\fi%
+\ifduck@beard
+ \fill[\duck@beard] (1.3,1.3) circle[radius=0.12] (1.2,1.15) circle[radius=0.12] (0.5,1.05) circle[radius=0.1] (0.525,0.90) circle[radius=0.12] (0.525,0.75) circle[radius=0.12] (0.65,0.65) circle[radius=0.14] (0.75,0.75) circle[radius=0.12] (0.85,0.85) circle[radius=0.12] (0.95,0.95) circle[radius=0.12] (1.05,1.05) circle[radius=0.12] (1.15,1.25) circle[radius=0.12] (1,1.20) circle[radius=0.12] (0.85,1.20) circle[radius=0.12] (0.75,1.15) circle[radius=0.12] (0.65,1.10) circle[radius=0.12] (0.58,1.07) circle[radius=0.12] (0.44,1.46) circle[radius=0.06] (0.52,1.45) circle[radius=0.06] (0.6, 1.41) circle[radius=0.06] (0.68,1.36) circle[radius=0.06] (0.76,1.34) circle[radius=0.06] (0.86,1.26) circle[radius=0.12] (0.38,1.44) circle[radius=0.03] (1,1.28) circle[radius=0.12];
+ \fill[\duck@beard] (1.3,1.3) -- (0.5,1.05) -- (0.65,0.65) -- cycle;
+\fi%
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\UseHook{tikzducks/hair}
+\csname duckhookhair\endcsname
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Headgear
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% alien %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@alien
+ \fill[\duck@alien,rotate=-25] (0.09,2.1) rectangle (0.16,2.6);
+ \fill[\duck@alien,rotate=5] (0.79,1.86) rectangle (0.86,2.25);
+ \fill[\duck@alien] (1.20,2.30) circle[radius=0.07];
+ \fill[\duck@alien] (0.62,2.35) circle[radius=0.07];
+\fi
+%
+% hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@hat
+ \ifdefined\duck@hair % with hair
+ \fill[\duck@hat,rotate=-15] (0.44,2.1) ellipse[x radius=0.7, y radius=0.1];
+ \fill[\duck@hat,rotate=-15] (0.0,2.1) rectangle (0.88,2.4);
+ \fill[\duck@hat,rotate=-15] (0.44,2.4) ellipse[x radius=0.44, y radius=0.08];
+ \else % without hair
+ \fill[\duck@hat,rotate=-15] (0.44,2.1) ellipse[x radius=0.6, y radius=0.1];
+ \fill[\duck@hat,rotate=-15] (0.07,2.1) rectangle (0.81,2.4);
+ \fill[\duck@hat,rotate=-15] (0.44,2.4) ellipse[x radius=0.37, y radius=0.08];
+ \fi
+\fi
+%
+% cap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@cap
+ \fill[\duck@cap, start angle=0, end angle=150, radius=0.5] (1.4,1.75) arc;
+ \fill[\duck@cap,rotate=-15] (0.3,2.05) ellipse[x radius=0.6, y radius=0.15];
+\fi
+%
+% Santa %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@santa
+ \fill[\duck@santa]
+ (0.430,1.803) .. controls (0.590,2.174) and (0.837,2.065) ..
+ (1.118,1.954) .. controls (1.679,1.731) and (1.328,1.193) ..
+ (1.647,1.057) .. controls (1.638,1.255) and (1.745,2.104) ..
+ (1.168,2.270) .. controls (0.867,2.356) and (0.536,2.280) ..
+ (0.430,1.803) -- cycle;
+ \fill[white!80!brown]
+ (0.44,1.733) .. controls (0.211,2.299) and (1.082,2.188) ..
+ (1.456,1.759) .. controls (1.534,1.637) and (1.480,1.545) ..
+ (1.400,1.566) .. controls (1.265,1.714) and (0.577,2.267) ..
+ (0.44,1.733) -- cycle;
+ \fill[white!80!brown] (1.6,1.0) circle[radius=0.17];
+\fi
+%
+% Chef hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@chef
+ \fill[\duck@chef,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.08];
+ \fill[\duck@chef,rotate=-15] (0.07,2.1) rectangle (0.81,2.55);
+ \fill[\duck@chef] (1.01,2.47) circle[radius=0.17];
+ \fill[\duck@chef] (1.24,2.35) circle[radius=0.15];
+ \fill[\duck@chef] (0.77,2.40) circle[radius=0.12];
+ \fill[\duck@chef] (1.39,2.20) circle[radius=0.12];
+\fi
+%
+% graduate hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@graduate
+ \fill[\duck@graduate,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.1];
+ \fill[\duck@graduate,rotate=-15] (0.07,2.1) rectangle (0.81,2.3);
+ \fill[\duck@graduate] (0.3,2.25) -- (1.05,2.35) -- (1.7,1.95) -- (0.92,1.85) -- cycle;
+ \fill[\duck@tassel,rounded corners=\scalingfactor*1] (1.12,1.89) -- (1.01,2.1) -- (1.09,2.11) -- (1.2,1.9) -- (1.2,1.3) -- (1.12,1.3) -- cycle;
+ \fill[\duck@tassel] (1.16,1.3) ellipse[x radius=0.06, y radius=0.12];
+\fi
+%
+% beret %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@beret
+ \fill[\duck@beret,rotate=-25] (0.13,2.15) ellipse[x radius=0.5, y radius=0.17];
+ \fill[\duck@beret,rotate=-25] (0.13,2.25) ellipse[x radius=0.55, y radius=0.17];
+ \fill[\duck@beret,rotate=-25] (0.13,2.4) circle[radius=0.08];
+\fi
+%
+% unicorn %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@unicorn
+ \fill[\duck@unicorn,rotate=25] (1.48,1.4375)--(1.60,1.9)--(1.72,1.4375);
+ \fill[\duck@body!100,rotate=25] (1.50,1.43)--(1.60,1.8375)--(1.70,1.43);
+\fi
+%
+% magic hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@magichat
+ \path[preaction={fill, \duck@magichat!100},rotate=-5,
+ pattern={Stars[distance=1.7mm,radius=0.5mm,angle=32]}, pattern color=\duck@magicstars!100]
+ (0.36,1.95)--(0.86,2.95)--(1.20,1.85);
+\fi
+%
+% witch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@witch
+ \fill[\duck@witch,rotate=-15] (0.44,2.13) ellipse[x radius=0.75, y radius=0.17];
+ \fill[\duck@witch,rotate=-15] (0.05,2.2)--(0.45,3.2)--(0.82,2.2);
+\fi
+%
+% crown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@crown
+ \path (0.7,1.95) rectangle (1.4,2.45);
+ \fill[\duck@crown,overlay] \duckpathcrown;
+\fi
+%
+% Queen crown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@queencrown
+ \fill[\duck@queencrown] \duckpathqueencrown;
+\fi
+%
+% King crown %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@kingcrown
+ \fill[\duck@kingcrown] \duckpathkingcrown;
+\fi
+%
+% Bunny ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@bunny
+ \path (0.55,1.9) rectangle (1.2,2.55);
+ \begin{pgfinterruptboundingbox}
+ \begin{scope}
+ \clip[rotate=-5] (0.68,2.38) ellipse[x radius=0.3, y radius=0.4];
+ \fill[\duck@bunny,rotate=-5] (1.06,2.2) ellipse[x radius=0.3, y radius=0.4] (0.28,2.26) ellipse[x radius=0.3, y radius=0.4];
+ \end{scope}
+
+ \begin{scope}
+ \clip[rotate=-5] (0.68,2.38) ellipse[x radius=0.25, y radius=0.35];
+ \fill[\duck@inear,rotate=-5] (1.06,2.2) ellipse[x radius=0.25, y radius=0.35] (0.28,2.26) ellipse[x radius=0.25, y radius=0.35];
+ \end{scope}
+ \end{pgfinterruptboundingbox}
+\fi
+%
+% peaked cap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@peakedcap
+ \fill[\duck@peakedcap,rotate=-15] (0.35,2.05) ellipse[x radius=0.5, y radius=0.15];
+ \fill[\duck@peakedcap,rotate=-25] (0.13,2.15) ellipse[x radius=0.5, y radius=0.17];
+ \fill[\duck@peakedcap,rotate=-35] (-0.25,2.2) ellipse[x radius=0.55, y radius=0.17];
+\fi
+%
+% tophat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@tophat
+ \fill[\duck@tophat,rotate=-15] (0.44,2.1) ellipse[x radius=0.48, y radius=0.1];
+ \fill[\duck@tophat,rotate=-15] (0.12,2.1) -- (0.75,2.1) -- (0.81,2.55) -- (0.07,2.55) -- cycle;
+ \fill[\duck@tophat,rotate=-15] (0.44,2.55) ellipse[x radius=0.37, y radius=0.08];
+\fi
+%
+% darth vader %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@darthvader
+ \path (0.1,0.1) rectangle (2.1,2.22);
+ \fill[\duck@darthvader,overlay] \duckpathdarthvader;
+\fi
+%
+% Harlequin duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@harlequin
+ \path (0.19,1.85) rectangle (1.85,2.67);
+ \fill[\duck@harlequin,overlay] (0.6006,1.9719) .. controls (0.7432,1.8954) and (0.9320,1.8698) .. (0.9320,1.8698) -- (1.0404,2.3839) .. controls (0.9223,2.8873) and (0.1755,2.5634) .. (0.3019,2.2958) .. controls (0.5807,2.5024) and (0.7251,2.3376) .. (0.6006,1.9719) -- cycle;
+ \fill[\duck@niuqelrah,overlay] (1.2853,1.8902) .. controls (1.1177,1.8507) and (0.9278,1.8703) .. (0.9278,1.8703) -- (1.0404,2.3839) .. controls (1.3637,2.8347) and (1.9373,2.3532) .. (1.7049,2.1284) .. controls (1.5267,2.3895) and (1.3204,2.2666) .. (1.2853,1.8902) -- cycle;
+ \fill[\duck@harlequin] (1.7,2.07) circle[radius=0.1];
+ \fill[\duck@niuqelrah] (0.3,2.23) circle[radius=0.1];
+\fi
+%
+% Straw hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@strawhat
+ \fill[\duck@strawhat,rotate=-15] (0.44,2.0) ellipse[x radius=0.75, y radius=0.1];
+ \fill[\duck@strawhat,rotate=-15] (0.1,2.05) rectangle (0.78,2.5);
+ \fill[\duck@strawhat,rotate=-15] (0.44,2.5) ellipse[x radius=0.34, y radius=0.08];
+ \fill[\duck@strawhat,rotate=-15] (-0.3,2.02) -- (1.18,2.02) -- (0.78,2.2) -- (0.1,2.2) -- cycle;
+ \fill[\duck@ribbon,rotate=-15] (0.44,2.2) ellipse[x radius=0.34, y radius=0.08];
+ \fill[\duck@ribbon,rotate=-15] (0.1,2.2) rectangle (0.78,2.3);
+ \fill[\duck@strawhat,rotate=-15] (0.44,2.3) ellipse[x radius=0.34, y radius=0.08];
+\fi
+%
+% helmet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@helmet
+ \fill[\duck@helmet] (1.4331,1.5155) .. controls (1.4365,1.7226) and (1.3866,2.0493) .. (1.0429,2.1279) .. controls (0.7050,2.2052) and (0.4794,1.9294) .. (0.4481,1.8183) .. controls (0.6062,1.8381) and (1.1506,1.7480) .. (1.4331,1.5155) -- cycle;
+ \fill[\duck@helmet!70!black] (1.0282,2.1360) .. controls (0.9395,2.1312) and (0.8696,2.0652) .. (0.8152,2.0010) .. controls (0.7824,1.9609) and (0.7546,1.9169) .. (0.7309,1.8709) .. controls (0.6510,1.8859) and (0.5703,1.8971) .. (0.4892,1.9024) .. controls (0.4595,1.8831) and (0.4114,1.7962) .. (0.4743,1.7961) .. controls (0.5446,1.7868) and (0.6149,1.7767) .. (0.6845,1.7629) .. controls (0.6647,1.7052) and (0.6469,1.6454) .. (0.6401,1.5851) -- (0.6583,1.5355) -- (0.7069,1.5673) .. controls (0.7193,1.6285) and (0.7363,1.6889) .. (0.7590,1.7471) .. controls (0.9991,1.6922) and (1.2114,1.6182) .. (1.4111,1.4722) .. controls (1.4369,1.4960) and (1.4536,1.5229) .. (1.4475,1.5553) .. controls (1.4417,1.5927) and (1.4030,1.6066) .. (1.3766,1.6276) .. controls (1.2054,1.7408) and (1.0085,1.8089) .. (0.8095,1.8546) .. controls (0.8733,1.9674) and (0.9684,2.0703) .. (1.0932,2.1138) .. controls (1.0751,2.1288) and (1.0515,2.1362) .. (1.0282,2.1360) -- cycle;
+ \fill[\duck@helmet!50!white] (0.502,1.845) circle[radius=0.015] (0.586,1.835) circle[radius=0.015] (0.684,1.822) circle[radius=0.015] (0.791,1.799) circle[radius=0.015] (0.899,1.770) circle[radius=0.015] (1.003,1.741) circle[radius=0.015] (1.099,1.706) circle[radius=0.015] (1.185,1.673) circle[radius=0.015] (1.276,1.629) circle[radius=0.015] (1.360,1.581) circle[radius=0.015] (0.676,1.606) circle[radius=0.015] (0.695,1.666) circle[radius=0.015] (0.714,1.729) circle[radius=0.015] (0.784,1.889) circle[radius=0.015] (0.835,1.968) circle[radius=0.015] (0.896,2.034) circle[radius=0.015] (0.957,2.081) circle[radius=0.015] (1.020,2.115) circle[radius=0.015] (1.422,1.535) circle[radius=0.015] (0.502,1.845) circle[radius=0.015];
+\fi
+%
+% Viking %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@viking
+ \fill[\duck@viking] (1.4331,1.5155) .. controls (1.4365,1.7226) and (1.3866,2.0493) .. (1.0429,2.1279) .. controls (0.7050,2.2052) and (0.4794,1.9294) .. (0.4481,1.8183) .. controls (0.6062,1.8381) and (1.1506,1.7480) .. (1.4331,1.5155) -- cycle;
+ \fill[\duck@viking!70!black] (1.0282,2.1360) .. controls (0.9395,2.1312) and (0.8696,2.0652) .. (0.8152,2.0010) .. controls (0.7824,1.9609) and (0.7546,1.9169) .. (0.7309,1.8709) .. controls (0.6510,1.8859) and (0.5703,1.8971) .. (0.4892,1.9024) .. controls (0.4595,1.8831) and (0.4114,1.7962) .. (0.4743,1.7961) .. controls (0.5446,1.7868) and (0.6149,1.7767) .. (0.6845,1.7629) .. controls (0.6845,1.7629) and (0.6845,1.7629) .. (0.7590,1.7471) .. controls (0.9991,1.6922) and (1.2114,1.6182) .. (1.4111,1.4722) .. controls (1.4369,1.4960) and (1.4536,1.5229) .. (1.4475,1.5553) .. controls (1.4417,1.5927) and (1.4030,1.6066) .. (1.3766,1.6276) .. controls (1.2054,1.7408) and (1.0085,1.8089) .. (0.8095,1.8546) .. controls (0.8733,1.9674) and (0.9684,2.0703) .. (1.0932,2.1138) .. controls (1.0751,2.1288) and (1.0515,2.1362) .. (1.0282,2.1360) -- cycle;
+ \fill[\duck@viking!50!white] (0.502,1.845) circle[radius=0.015] (0.586,1.835) circle[radius=0.015] (0.684,1.822) circle[radius=0.015] (0.791,1.799) circle[radius=0.015] (0.899,1.770) circle[radius=0.015] (1.003,1.741) circle[radius=0.015] (1.099,1.706) circle[radius=0.015] (1.185,1.673) circle[radius=0.015] (1.276,1.629) circle[radius=0.015] (1.360,1.581) circle[radius=0.015] (0.784,1.889) circle[radius=0.015] (0.835,1.968) circle[radius=0.015] (0.896,2.034) circle[radius=0.015] (0.957,2.081) circle[radius=0.015] (1.020,2.115) circle[radius=0.015] (1.422,1.535) circle[radius=0.015];
+\fi
+%
+% devil (front horn) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@devil
+ \fill[\duck@devil] (1.2185,2.3521) .. controls (1.3540,2.0950) and (1.1993,1.9994) .. (1.1548,1.9663) .. controls (1.1165,1.9441) and (1.1134,1.9277) .. (1.1056,1.8938) .. controls (1.1056,1.8361) and (1.1502,1.7893) .. (1.2052,1.7893) .. controls (1.2373,1.7944) and (1.2669,1.7996) .. (1.2944,1.8311) .. controls (1.2944,1.8311) and (1.5458,2.2025) .. (1.2185,2.3521) -- cycle;
+\fi
+%
+% Conical Hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@conicalhat
+ \path (0.19,1.4) rectangle (1.68,2.32);
+ \fill[\duck@conicalhat,overlay] (1.6722,1.4137) .. controls (1.6722,1.4337) and (1.3592,1.6230) .. (0.9513,1.7735) .. controls (0.5433,1.9239) and (0.1948,1.9784) .. (0.1948,1.9754) .. controls (0.2049,2.0230) and (1.1428,2.36) .. (1.1428,2.3) .. controls (1.1428,2.35) and (1.6821,1.4784) .. (1.6722,1.4137) -- cycle;
+\fi
+%
+% Sailor hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@sailor
+ \fill[\duck@sailor] (1.0390,2.2743) .. controls (0.9475,2.2748) and (0.8569,2.2355) .. (0.7943,2.1690) .. controls (0.7147,2.1872) and (0.6335,2.2098) .. (0.5512,2.2029) .. controls (0.5524,2.1164) and (0.5536,2.0299) .. (0.5547,1.9434) .. controls (0.6637,1.9348) and (0.7679,1.8974) .. (0.8716,1.8653) .. controls (1.0321,1.8101) and (1.1932,1.7522) .. (1.3420,1.6697) .. controls (1.3671,1.6622) and (1.3911,1.6147) .. (1.4083,1.6518) .. controls (1.4623,1.7160) and (1.5163,1.7802) .. (1.5702,1.8444) .. controls (1.5154,1.8979) and (1.4433,1.9287) .. (1.3757,1.9624) .. controls (1.3666,2.1156) and (1.2403,2.2511) .. (1.0881,2.2707) .. controls (1.0718,2.2731) and (1.0554,2.2743) .. (1.0390,2.2743) -- cycle;
+\fi
+%
+% Bobble hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@bobblehat
+ \begin{pgfinterruptboundingbox}
+ \fill[\duck@bobblehat] (0.4639,1.7996) .. controls (0.5789,1.8438) and (1.3853,1.6023) .. (1.4046,1.4672) .. controls (1.4581,1.5025) and (1.5242,1.5917) .. (1.4544,1.6879) .. controls (1.5205,2.1879) and (0.7711,2.3780) .. (0.5562,1.9848) .. controls (0.4314,1.9650) and (0.4277,1.8625) .. (0.4639,1.7996) -- cycle;
+ \fill[\duck@bobblehat] (1.1,2.2) circle [radius=0.1];
+ \end{pgfinterruptboundingbox}
+ \path (0.43,1.3) rectangle (1.5,2.3);
+\fi
+%
+% sombrero %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@sombrero
+ \begin{scope}[rotate=-20,xshift=8,yshift=2]
+ \fill[\duck@sombrero] (-.45,2) to[in=200] (0,2.8) to[out=-20] (.45,2) -- cycle;
+ \fill[\duck@sombrero] (-0.65, 1.75) .. controls (-0.85, 1.7) and (-0.85, 1.9) .. (-0.85, 1.9) .. controls (-0.30, 2.2) and (0.30, 2.2) .. ( 0.85, 1.9) .. controls ( 0.85, 1.9) and (0.85, 1.7) .. ( 0.65, 1.75) .. controls ( 0.30, 1.95) and (-0.30, 1.95) .. (-0.65, 1.75) -- cycle;
+ \draw[\duck@sombrerob,line width=\scalingfactor*0.8pt] (-0.85, 1.9) .. controls (-0.30, 2.2) and (0.30, 2.2) .. ( 0.85, 1.9);
+ \draw[decorate, decoration={zigzag, amplitude=\decoscalefactor*1pt, segment length=\scalingfactor*6pt}, \duck@sombreroa, line width=\scalingfactor*1pt] (-0.81, 1.8) .. controls (-0.30, 2.1) and (0.30, 2.1) .. ( 0.82, 1.8);
+ \begin{scope}
+ \clip (-.45,2) to[in=200] (0,2.8) to[out=-20] (.45,2) -- cycle;
+ \draw[decorate,decoration={zigzag, amplitude=\decoscalefactor*1pt, segment length=\scalingfactor*3pt},\duck@sombreroa, line width=\scalingfactor*1pt] (-.4,2.4) to[bend left] (.4,2.4);
+ \fill[decorate,decoration={shape backgrounds,shape=circle, shape size=\scalingfactor*2pt, shape evenly spread=7}, \duck@sombreroc] (-.3,2.6) to[bend left] (.3,2.6);
+ \fill[decorate,decoration={shape backgrounds,shape=circle,shape size=\scalingfactor*2pt,shape evenly spread=9},\duck@sombreroc] (-.4,2.18) to[bend left] (.4,2.18);
+ \end{scope}
+ \end{scope}
+\fi
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\UseHook{tikzducks/hat}
+\csname duckhookhat\endcsname
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Accessories
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% sunglasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@sunglasses
+ \fill[\duck@sunglasses,rotate=-17] (0.42,1.8) rectangle (0.8,1.84);
+ \fill[\duck@sunglasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84);
+ \fill[\duck@sunglasses,rotate=-20] (0.23,1.7675) circle[radius=0.14];
+ \fill[\duck@sunglasses,rotate=-20] (-0.06,1.74) circle[radius=0.13];
+\fi
+%
+% glasses %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@glasses
+ \fill[\duck@glasses,rotate=-17] (0.42,1.8) rectangle (0.8,1.84);
+ \fill[\duck@glasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84);
+ \fill[\duck@glasses,rotate=-20,even odd rule] (0.23,1.7675) circle[radius=0.14] (0.23,1.7675) circle[radius=0.11];
+ \fill[\duck@glasses,rotate=-20,even odd rule] (-0.06,1.74) circle[radius=0.13] (-0.06,1.74) circle[radius=0.095];
+\fi
+%
+% square glasses
+\ifduck@squareglasses
+ \fill[\duck@squareglasses,rotate=-17] (0.43,1.8) rectangle (0.8,1.84);
+ \fill[\duck@squareglasses,rotate=-17] (0.12,1.8) rectangle (0.22,1.84);
+ \fill[\duck@squareglasses,rotate=-20,rounded corners=\scalingfactor*2,even odd rule] (-0.16,1.62) -- (-0.18,1.85) -- (0.05,1.87) -- (0.04,1.62) -- cycle [rounded corners=\scalingfactor*1.5] (-0.14,1.64) -- (-0.16,1.83) -- (0.03,1.85) -- (0.02,1.64) -- cycle;
+ \fill[\duck@squareglasses,rotate=-20,rounded corners=\scalingfactor*2,even odd rule] (0.12,1.63) -- (0.10,1.88) -- (0.36,1.90) -- (0.35,1.65) -- cycle [rounded corners=\scalingfactor*1.5] (0.14,1.65) -- (0.12,1.86) -- (0.34,1.88) -- (0.33,1.67) -- cycle;
+\fi
+%
+% icecream %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@icecream
+ \fill[\duck@cone,rotate=-20] (0.35,1.20)--(0.50,0.60)--(0.75,1.20);
+ \fill[\duck@flavoura] (0.85,1.03) circle[radius=0.12];
+ \fill[\duck@flavourb] (1.05,0.95) circle[radius=0.12];
+ \fill[\duck@flavourc] (0.95,1.1) circle[radius=0.12];
+\fi
+%
+% book %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@book
+ \fill[\duck@bookcolour,rotate=-20]
+ (0.40,1.20) rectangle (0.80,0.60);
+ \node[rotate=-20*\yscalefactor/\xscalefactor, color=white] at (0.88,0.70) {\duck@book};%
+\fi
+%
+% signpost %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@signpost
+ \fill[\duck@signcolour, rounded corners=\scalingfactor*1, rotate=-20] (0.8,0.75) rectangle (0.9,1.75);
+ \fill[\duck@signcolour, rounded corners=\scalingfactor*1, rotate=-20] (0.4,1.7) rectangle (1.3,2.4);
+ \fill[\duck@signback, rounded corners=\scalingfactor*1, rotate=-20] (0.45,1.75) rectangle (1.25,2.35);
+ \node[rotate=-20*\yscalefactor/\xscalefactor, color=white] at (1.5,1.65) {\duck@signpost};
+\fi
+%
+% speech bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@speech
+ \fill[\duck@bubblecolour] (-0.5,1.8) ellipse[x radius=0.7, y radius=0.3];
+ \fill[\duck@bubblecolour] (-0.2,1.54) -- (0.2,1.35) -- (0.0,1.6) -- cycle;
+ \node at (-0.5,1.8) {\duck@speech};
+\fi
+%
+% think bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@think
+ \fill[\duck@bubblecolour] (2,2.4) ellipse[x radius=0.7, y radius=0.35];
+ \fill[\duck@bubblecolour] (1.55,2.35) circle[radius=0.25] (2.0,2.15) circle[radius=0.25] (2.4,2.25) circle[radius=0.25] (1.6,2.55) circle[radius=0.25] (2.0,2.6) circle[radius=0.25] (2.35,2.5) circle[radius=0.25] (1.65,1.95) circle[radius=0.1] (1.55,1.80) circle[radius=0.06] (1.47,1.70) circle[radius=0.03];
+ \node at (2,2.4) {\duck@think};
+\fi
+%
+% magic wand %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@magicwand
+ \fill[black,rotate=-30] (0.27,1.23) rectangle (0.37,0.65);
+ \fill[white,rotate=-30] (0.27,1.13) rectangle (0.37,1.03);
+\fi
+%
+% cricket bat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@cricket
+ \fill[\duck@cricket, rounded corners=\scalingfactor*2, rotate=-30] (0.4,1.2) rectangle (0.7,2.2);
+ \fill[\duck@cricket, rounded corners=\scalingfactor*1, rotate=-30] (0.5,0.8) rectangle (0.6,1.3);
+\fi
+%
+% rollingpin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@rollingpin
+ \fill[\duck@rollingpin, rounded corners=\scalingfactor*2, rotate=-60] (-0.18,0.85) rectangle (0.08,1.75);
+ \fill[\duck@rollingpin, rounded corners=\scalingfactor*1, rotate=-60] (-0.1,0.65) rectangle (0.0,1.95);
+\fi
+%
+% lightsaber %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@lightsaber
+ \fill[\duck@lightsaber, rounded corners=\scalingfactor*1, rotate=-30] (0.5,0.9) rectangle (0.6,2.5);
+ \fill[gray!80!black, rounded corners=\scalingfactor*1, rotate=-30] (0.47,0.7) rectangle (0.63,1.2);
+\fi
+%
+% cake %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@cake
+ \fill[\duck@cake] (1.00,0.50) ellipse[x radius=0.4, y radius=0.2];
+ \fill[\duck@cake] (0.6,0.5) rectangle (1.4,0.7);
+ \fill[\duck@cake] (1.00,0.70) ellipse[x radius=0.4, y radius=0.2];
+ \fill[\duck@cake!50!white] (0.75,0.75) rectangle (0.8,0.95);
+ \fill[\duck@cake!50!white] (1.2,0.75) rectangle (1.25,0.95);
+ \fill[\duck@cake!50!white] (0.975,0.65) rectangle (1.025,0.85);
+ \fill[white!85!yellow] (1.0,0.93) ellipse[x radius=0.03, y radius=0.06];
+ \fill[white!85!yellow] (1.225,1.03) ellipse[x radius=0.03, y radius=0.06];
+ \fill[white!85!yellow] (0.775,1.03) ellipse[x radius=0.03, y radius=0.06];
+\fi
+%
+% pizza %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@pizza
+ \fill[brown] (1.00,0.60) ellipse[x radius=0.4, y radius=0.2];
+ \fill[red!70!black] (1.00,0.60) ellipse[x radius=0.34, y radius=0.16];
+ \fill[white!85!yellow] (1.15,0.65) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (0.81,0.57) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (0.95,0.68) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (1.02,0.54) ellipse[x radius=0.065, y radius=0.04];
+ \fill[green!40!brown] (1.09,0.54) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown,rotate=20] (1.0,0.34) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
+\fi
+%
+% no pizza %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@davidlikespineapplepizza
+ \fill[brown] (1.00,0.60) ellipse[x radius=0.4, y radius=0.2];
+ \fill[red!70!black] (1.00,0.60) ellipse[x radius=0.34, y radius=0.16];
+ \fill[yellow!70!brown] (1.15,0.65) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (1.15,0.65) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (0.81,0.57) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (0.81,0.57) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (0.95,0.68) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (0.95,0.68) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (1.02,0.54) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (1.02,0.54) ellipse[x radius=0.04, y radius=0.03];
+ \fill[green!40!brown] (1.09,0.54) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown,rotate=20] (1.0,0.34) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse[x radius=0.07, y radius=0.02];
+ \fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
+\fi
+%
+% Hockey stick %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@hockey
+ \fill[\duck@hockey, rounded corners=\scalingfactor*1, rotate=-30] (0.5,0.6) rectangle (0.6,2.1);
+ \fill[\duck@hockey, rounded corners=\scalingfactor*3] (0.2,0.2) rectangle (0.85,0.4);
+\fi
+%
+% baguette %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@baguette
+ \fill[\duck@baguette!70!white, rounded corners=\scalingfactor*4, rotate=-30] (0.4,0.72) rectangle (0.7,2.0);
+ \fill[\duck@baguette!80!black, rotate=5] (1.44,1.1) ellipse[x radius=0.1, y radius=0.03] (1.30,0.9) ellipse[x radius=0.1, y radius=0.03] (1.16,0.7) ellipse[x radius=0.1, y radius=0.03] (1.02,0.5) ellipse[x radius=0.1, y radius=0.03];
+\fi
+%
+% football %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@football
+ \fill[\duck@football] (1.2,0.33) circle[radius=0.32];
+ \begin{scope}
+ \clip (1.2,0.33) circle[radius=0.32];
+ \fill[black] (1.06,0.30) -- (1.01,0.17) -- (1.14,0.08) -- (1.26,0.14) -- (1.20,0.28) -- cycle (1.37,0.14) -- (1.46,0.27) -- (1.59,0.27) -- (1.41,0.04) -- cycle (1.28,0.38) -- (1.22,0.52) -- (1.33,0.61) -- (1.45,0.51) -- (1.43,0.37) -- cycle (0.87,0.44) -- (1.02,0.40) -- (1.10,0.53) -- (1.07,0.62) -- (0.94,0.57) -- cycle;
+ \end{scope}
+\fi
+%
+% milkshake %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@milkshake
+ \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
+ \begin{scope}
+ \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
+ \fill[cyan!10!white, rotate=-10] (0.8,0.94) ellipse[x radius=0.18, y radius=0.4];
+ \fill[\duck@milkshake, rotate=-10] (0.8,0.94) ellipse[x radius=0.15, y radius=0.36];
+ \end{scope}
+ \fill[white!85!yellow] (0.83,0.92) circle[radius=0.05] (0.88,0.9) circle[radius=0.05] (0.93,0.92) circle[radius=0.05] (0.99,0.91) circle[radius=0.05] (1.06,0.86) circle[radius=0.05] (1.13,0.87) circle[radius=0.05] (0.85,0.99) circle[radius=0.05] (0.9,0.98) circle[radius=0.07] (1.0,0.98) circle[radius=0.07] (1.1,0.95) circle[radius=0.07];
+ \fill[red!90!black] (1.0,1.1) circle[radius=0.05];
+ \fill[white!85!yellow] (0.94,1.05) circle[radius=0.05] (1.03,1.03) circle[radius=0.05];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
+ \fill[red!90!black,rotate=20] (1.2,0.58) rectangle (1.22,0.85);
+\fi
+%
+% wine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@wine
+ \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse[x radius=0.03, y radius=0.2];
+ \begin{scope}
+ \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
+ \fill[cyan!10!white, rotate=-10] (0.8,1.1) ellipse[x radius=0.18, y radius=0.4];
+ \end{scope}
+ \begin{scope}
+ \clip[rotate=-10] (0.58,0.5) rectangle (1.02,0.87);
+ \fill[\duck@wine, rotate=-10] (0.8,1.1) ellipse[x radius=0.15, y radius=0.36];
+ \end{scope}
+\fi
+%
+% prison duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@prison
+ \fill[\duck@prison] (1.5,0.25) circle[radius=0.3];
+ \fill[\duck@prison, even odd rule] (1.2,0.1) ellipse[x radius=0.10, y radius=0.07] (1.2,0.1) ellipse[x radius=0.06, y radius=0.04] (1.05,-0.05) ellipse[x radius=0.10, y radius=0.07] (1.05,-0.05) ellipse[x radius=0.06, y radius=0.04] (0.87,-0.2) ellipse[x radius=0.10, y radius=0.07] (0.87,-0.2) ellipse[x radius=0.06, y radius=0.04];
+ \fill[\duck@prison, even odd rule] (0.72,-0.2) ellipse[x radius=0.10, y radius=0.07] (0.72,-0.2) ellipse[x radius=0.06, y radius=0.04];
+ \fill[\duck@prison,even odd rule,rotate=70] (0.4,-1.05) ellipse[x radius=0.1, y radius=0.07] (0.4,-1.05) ellipse[x radius=0.06, y radius=0.04] (0.2,-0.95) ellipse[x radius=0.1, y radius=0.07] (0.2,-0.95) ellipse[x radius=0.06, y radius=0.04] (0.22,-0.58) ellipse[x radius=0.1, y radius=0.07] (0.22,-0.58) ellipse[x radius=0.06, y radius=0.04];
+ \fill[\duck@prison,even odd rule,rotate=110](-0.33,-0.55) ellipse[x radius=0.1, y radius=0.07] (-0.33,-0.55) ellipse[x radius=0.06, y radius=0.04];
+ \begin{scope}
+ \clip[rotate=-12] (0.45,0.15) rectangle (0.63,0.25);
+ \fill[\duck@prison,even odd rule,rotate=110](-0.07,-0.6) ellipse[x radius=0.1, y radius=0.07] (-0.07,-0.6) ellipse[x radius=0.06, y radius=0.04];
+ \end{scope}
+\fi
+%
+% torch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@torch
+ \fill[red!50!yellow] \duckpathtorch;
+ \fill[red!25!yellow, scale=0.67, xshift=17, yshift=15] \duckpathtorch;
+ \fill[white!50!yellow, scale=0.4, xshift=53.5, yshift=45.3] \duckpathtorch;
+ \fill[\duck@torch,rounded corners=\scalingfactor*1]
+ (1.1,0.96) -- (0.77,0.25) -- (0.83,0.25) -- (1.3,0.86) -- cycle;
+ \fill[\duck@torch,rotate=-28]
+ (0.62,1.32) ellipse[x radius=0.2, y radius=0.08];
+\fi%
+%
+% sheep %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@sheep
+ \begin{scope}
+ \clip[rotate=-5] (1.2,1.7) ellipse[x radius=0.3, y radius=0.4];
+ \fill[\duck@bill,rotate=-5] (0.8,1.5) ellipse[x radius=0.3, y radius=0.4];
+ \end{scope}
+\fi
+%
+% basket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@basket
+ \fill[\duck@basket, start angle=180, end angle=360, x radius=0.35, y radius=0.35] (0.65,0.61) arc -- cycle;
+ \fill[\duck@basket, start angle=180, end angle=0, even odd rule] [x radius=0.35, y radius=0.5] (0.65,0.6) arc -- cycle [x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle;
+ \fill[\duck@basket, even odd rule] (1,0.6) ellipse[x radius=0.35, y radius=0.1] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
+ \fill[\duck@basket!75!black] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
+\fi%
+%
+% easter basket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@easter
+ \begin{scope}
+ \clip [start angle=180, end angle=0, x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle [start angle=180, end angle=360, x radius=0.3, y radius=0.07] (0.7,0.6) arc -- cycle;
+ \fill[\duck@eggb, rotate=-5] (0.95,0.72) ellipse[x radius=0.09, y radius=0.13];
+ \fill[\duck@egga, rotate=10] (0.94,0.42) ellipse[x radius=0.09, y radius=0.13];
+ \fill[\duck@eggc, rotate=-30] (0.7,1.08) ellipse[x radius=0.09, y radius=0.13];
+ \end{scope}
+\fi%
+%
+% horse tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfkeys{/duck/horsetail/.@def/.get=\duck@test}
+\ifx\duck@horsetail\duck@test
+ \ifdefined\duck@hair\let\duck@horsetail=\duck@hair\fi
+\fi%
+\ifduck@horsetail
+ \path (0.1,0.1) rectangle (2.82,2.14);
+ \fill[\duck@horsetail,overlay] \duckpathhorsetail;
+\fi
+%
+% crozier %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@crozier
+ \begin{scope}
+ \clip [rotate=-20] (0.6,2.3) rectangle (1.1,1.999);
+ \fill[even odd rule,\duck@crozier] (1.5,1.6) circle[radius=0.2] (1.5,1.6) circle[radius=0.1];
+ \end{scope}
+ \fill[\duck@crozier,rotate=-20] (0.663,0.5) rectangle (0.763,2.0);
+\fi
+%
+% stethoscope %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@stethoscope
+ \fill[\duck@stethoscope,rounded corners=\scalingfactor*0.5,rotate=-18] (0.08,0.7) rectangle (0.13,1.24);
+ \fill[\duck@stethoscope] (0.35,0.7) circle[radius=0.1];
+ \begin{scope}
+ \fill[\duck@stethoscope,rounded corners=\scalingfactor*0.5,rotate=-30] (0.53,1.3) rectangle (0.58,1.72);
+ \clip[rotate=-30] (0.36,0.89) -- (0.36,1.36) -- (0.79,1.36) -- (0.79,0.89) -- (0.65,0.89) -- (0.65,0.96) -- (0.5,0.96) -- (0.5,0.89) -- cycle ;
+ \fill [\duck@stethoscope,rounded corners=\scalingfactor*3,rotate=-30,even odd rule] (0.775,1.35) rectangle (0.375,0.9) [rounded corners=\scalingfactor*2] (0.725,1.3) rectangle (0.425,0.95);
+ \end{scope}
+\fi
+%
+% snow duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@snowduck
+ \fill[black, rotate=-25] (0.65,0.65) rectangle (0.7,1.8);
+ \fill[black, rotate=35] (1.55,0.15) rectangle (1.6,0.5);
+ \fill[black, rotate=-35] (0.4,1.7) rectangle (0.45,2.0);
+ \fill[black, rotate=-60] (-0.3,2.0) rectangle (-0.35,1.65);
+\fi
+%
+% vampire %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@vampire
+ \ifduck@laughing
+ \fill[\duck@vampire] (0.55,1.28) -- (0.575,1.22) -- (0.6,1.29) -- cycle;
+ \else
+ \fill[\duck@vampire] (0.6,1.20) -- (0.625,1.16) -- (0.65,1.223) -- cycle;
+ \fi
+\fi
+%
+% crystal ball %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@crystalball
+ \shade[ball color=\duck@crystalball,opacity=0.7] (0.93,0.5) circle[radius=0.33];
+\fi
+%
+% Cheese %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@cheese
+ \begin{scope}[xshift=26,yshift=-2]
+ \fill[\duck@cheese] (-0.3200,0.8058) -- (0.0608,0.7220) -- (0.0608,0.6366) -- (-0.3200,0.5410) -- (0.2143,0.4236) .. controls (0.3395,0.4810) and (0.4241,0.5627) .. (0.4117,0.6253) -- (0.4117,0.7634) .. controls (0.4261,0.8618) and (0.2607,0.8954) .. (0.1907,0.8962) -- cycle;
+ \fill[\duck@cheese!35!white] (-0.3200,0.8057) -- (-0.3200,0.5410) -- (0.2143,0.4236) -- (0.2143,0.7381) -- cycle;
+ \fill[\duck@cheese] (-0.23,0.71) circle[radius=0.04] (0.0,0.55) circle[radius=0.04] (-0.23,0.58) circle[radius=0.02] (-0.15,0.6) circle[radius=0.02] (-0.1,0.7) circle[radius=0.02] (0.1,0.65) circle[radius=0.02] (0,0.65) circle[radius=0.02] (0.1,0.5) circle[radius=0.02] (0.07,0.55) circle[radius=0.01] (0.12,0.6) circle[radius=0.01] (-0.08,0.54) circle[radius=0.01];
+ \end{scope}
+\fi
+%
+% shovel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@shovel
+ \fill[brown!80!black,rotate around={-23:(0.91, 0.88)}] (0.87, 0.28) rectangle ++(0.1,1.4);
+ \fill[\duck@shovel] (0.6133, 0.9536) .. controls (0.8388, 0.8117) and (0.9253, 0.7517) .. (1.1962, 0.6696) -- (0.8332, 0.1263) .. controls (0.6458, 0.11) and (0.5417, 0.1644) .. (0.4517, 0.3034) -- cycle;
+\fi
+%
+% pickaxe %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@pickaxe
+ \fill[brown!80!black,rotate around={-23:(0.91, 0.88)}] (0.87, 0.28) rectangle ++(0.1,1.4);
+ \fill[\duck@pickaxe] (-0.0085, 0.6858) .. controls (0.6422, 0.3523) and (0.7609, 0.3068) .. (1.4114, 0.1108) .. controls (0.6589, 0.1246) and (0.5556, 0.1887) .. (-0.0085, 0.6858) -- cycle;
+\fi
+%
+% strawbroom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@strawbroom
+ \fill[\duck@strawbroomstick] (0.9160,0.5478) -- (1.2792,1.6574) .. controls (1.3063,1.6961) and (1.3956,1.6649) .. (1.3688,1.6176) -- (0.9508,0.5179) .. controls (0.9360,0.5142) and (0.9202,0.5331) .. (0.9160,0.5478) -- cycle;
+ \fill[\duck@strawbroom] (0.5528,0.2890) .. controls (0.6449,0.3598) and (0.7460,0.5693) .. (0.8911,0.6871) .. controls (0.9481,0.7215) and (1.0395,0.6925) .. (1.0553,0.6224) .. controls (1.1219,0.4385) and (0.9965,0.2147) .. (1.0056,0.1000) .. controls (0.8926,0.0241) and (0.5950,0.2078) .. (0.5528,0.2890) -- cycle;
+ \draw[\duck@strawbroomribbon,line width=\scalingfactor*0.4pt] (0.7916,0.5876) .. controls (0.7916,0.5876) and (0.8210,0.5404) .. (0.8451,0.5304) .. controls (0.8708,0.5197) and (0.9021,0.5419) .. (0.9284,0.5329) .. controls (0.9544,0.5240) and (0.9663,0.4903) .. (0.9919,0.4806) .. controls (1.0148,0.4720) and (1.0653,0.4781) .. (1.0653,0.4781);
+ \draw[\duck@strawbroomribbon,line width=\scalingfactor*0.4pt] (0.7565,0.5493) .. controls (0.7565,0.5493) and (0.7897,0.4961) .. (0.8169,0.4848) .. controls (0.8458,0.4727) and (0.8812,0.4978) .. (0.9109,0.4876) .. controls (0.9401,0.4776) and (0.9535,0.4396) .. (0.9824,0.4287) .. controls (1.0083,0.4189) and (1.0652,0.4259) .. (1.0652,0.4259);
+\fi
+%
+% broom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@broom
+ \begin{scope}[rotate=-10]
+ \draw[\duck@broomstick,line width=\scalingfactor*1.8pt] (0.9, 1.8) -- ++(0,-1.4);
+ \draw[\duck@broomstick,line width=\scalingfactor*1.8pt] (0.6, 0.42) -- ++(0.6,0);
+ \fill[\duck@broom] (0.6, 0.40) -- ++(-0.05,-0.1) -- ++(0.7,0) -- ++(-0.05, 0.1) -- cycle;
+ \end{scope}
+\fi
+%
+% umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@umbrella
+ \path (0.2,0.4) rectangle (2.22,2.7);
+ \fill[gray,overlay] (0.6922,0.5942) -- (0.7426,0.6103) .. controls (0.8276,0.3884) and (0.8855,0.4523) .. (0.9333,0.6543) -- (0.9334,0.6545) -- (0.9335,0.6547) .. controls (1.0347,1.0671) and (1.2906,1.9565) .. (1.2906,1.9565) -- (1.3415,1.9419) .. controls (1.3415,1.9419) and (1.0855,1.0519) .. (0.9849,0.6423) -- (0.9848,0.6420) .. controls (0.9240,0.3633) and (0.7874,0.3312) .. (0.6922,0.5942) -- cycle;
+ \fill[\duck@umbrella,overlay] (0.2185,1.9927) .. controls (0.3559,2.1962) and (0.6837,2.0720) .. (0.6761,1.8240) .. controls (0.8398,2.0111) and (1.1891,1.9216) .. (1.1685,1.6915) .. controls (1.3000,1.8765) and (1.6639,1.7626) .. (1.6607,1.5356) .. controls (1.7865,1.7271) and (2.1350,1.6950) .. (2.1626,1.4589) .. controls (2.4996,2.5771) and (0.5644,3.2631) .. (0.2185,1.9927) -- cycle;
+\fi
+%
+% closed umbrella %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@umbrellaclosed
+ \fill[gray] (1.3401,0.6996) -- (1.2872,0.7019) .. controls (1.2840,0.9395) and (1.2076,0.8995) .. (1.0930,0.7264) -- (1.0929,0.7262) -- (1.0928,0.7261) .. controls (0.8555,0.3739) and (0.9223,0.4608) .. (0.9223,0.4608) -- (0.8795,0.4920) .. controls (0.8795,0.4920) and (0.8131,0.4057) .. (1.0488,0.7554) -- (1.0489,0.7556) .. controls (1.2022,0.9963) and (1.3414,0.9793) .. (1.3401,0.6996) -- cycle;
+ \fill[\duck@umbrellaclosed] (0.6827,0.1263) -- (0.8038,0.6188) -- (0.9548,0.6494) -- (0.9520,0.8231) -- (1.1945,0.6529) -- (1.0218,0.5885) -- (1.0465,0.4566) -- cycle;
+\fi
+%
+% handbag %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@handbag
+ \fill[\duck@handbag] (0.7811,0.1751) -- (1.4913,0.3097) -- (1.3315,0.7086) -- (0.7832,0.6152) -- cycle;
+ \fill[\duck@handbag!70!black] (0.8857,0.4354) .. controls (0.7861,0.9811) and (1.1796,1.0719) .. (1.2866,0.5155) -- (1.2043,0.4996) .. controls (1.1247,0.8952) and (0.9051,0.8883) .. (0.9676,0.4536) -- cycle;
+\fi
+%
+% cocktail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@cocktail
+ \fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
+ \fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse[x radius=0.03, y radius=0.2];
+ \fill[cyan!10!white] (0.92,0.6) -- (0.75,0.9) -- (1.18,0.83) -- cycle;
+ \fill[gray!60!white] (0.928,0.64) -- (0.85,0.77) -- (1.08,0.77) -- cycle;
+ \fill[green!40!brown!60!white] (0.94,0.71) circle[radius=0.04];
+ \fill[red!80!black] (0.94,0.72) circle[radius=0.01];
+\fi
+%
+% banana %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@banana
+ \begin{scope}[yshift=10,xshift=19,rotate=-25,scale=1.3]
+ \fill[\duck@banana!30!] (0.02,0) .. controls (0.21,0.20) and (0.21,0.40) .. (0.02,0.6) arc [start angle=60,end angle=120, radius =0.04] .. controls (0.07,0.40) and (0.07,0.20) .. (-0.02,0) --cycle ;
+ %peel
+ \begin{scope}
+ \clip (-0.04,-0.01) rectangle (0.20,0.3);
+ \fill[\duck@banana] (0.03,0) .. controls (0.22,0.20) and (0.22,0.40) .. (0.03,0.6) arc [start angle=60,end angle=120, radius =0.06] .. controls (0.06,0.40) and (0.06,0.20) .. (-0.03,0);
+ \end{scope}
+ \fill[\duck@banana!60!] (0.12,0.3) arc [start angle=140, end angle=-100, y radius=0.20, x radius=0.06] arc [start angle=-90, end angle=90, y radius=0.15, x radius=0.02] (0.12,0.3) arc [start angle=60, end angle=270, y radius=0.15, x radius=0.1] arc [start angle=270, end angle=90, y radius=0.13, x radius=0.04];
+ \end{scope}
+\fi
+%
+% stick %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@stick
+ \begin{scope}[rotate=-30,yshift=16,xshift=12]
+ %leaf
+ \begin{scope}[rotate=60, xshift=8.2,yshift=8.1]
+ \fill[\duck@leaf] (-0.01,0) .. controls (-0.1,0) and (-0.02, 0.2) .. (0,0.2) .. controls (0.02, 0.2) and (0.1,0) .. (0.01,0.0);
+ \path[clip] (-0.04,-0.04)-- (-0.01,0) .. controls (-0.1,0) and (-0.02, 0.2) .. (0,0.2) .. controls (0.02, 0.2) and (0.1,0) .. (0.01,0)-- (0.04,-0.04) --cycle;
+ \draw[\duck@leaf!80!, line width=0.1] (0,-0.04) -- (0,0.2) \foreach \i in {0.02,0.04,...,0.2} {(0,\i) -- ++(0.1,\i) (0,\i) -- ++(-0.1,\i)} ;
+ \end{scope}
+ %stick itself
+ \fill[\duck@stick!90!red] (-0.04,0.8) -- (-0.04,0.4) arc[start angle=345,end angle=270,radius=0.03] -- ++(0,-0.01) arc[start angle=90,end angle=15,radius=0.03] -- (-0.04,0) arc [start angle=180, end angle=360 ,x radius=0.04, y radius=0.02] -- (0.04, 0.4) arc [start angle=180, end angle=120, radius=0.08] arc [start angle=-90, end angle=90, x radius=0.02, y radius=0.04] arc [start angle=240, end angle=180, radius=0.08] -- (0.04,0.75) arc [start angle=0, end angle=120 ,x radius=0.04, y radius=0.02] --cycle;
+ \fill[\duck@stick!90!] (0.08, 0.51) ellipse [x radius=0.02, y radius=0.04] (0,0.75) ellipse [x radius=0.04, y radius=0.02] ;
+ \draw[\duck@stick!90!red, line width=0.06] (0.08, 0.51) ellipse [x radius=0.016, y radius=0.032]
+ ellipse [x radius=0.012, y radius=0.024] ellipse [x radius=0.008, y radius=0.016] (0,0.75) ellipse [y radius=0.016, x radius=0.032] ellipse [y radius=0.012, x radius=0.024] ellipse [y radius=0.008, x radius=0.016] ;
+ \fill[\duck@stick!90!red] (0.08, 0.51) ellipse [x radius=0.004, y radius=0.008] (0,0.75) ellipse [x radius=0.008, y radius=0.004];
+ \end{scope}
+\fi
+%
+% megaphone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@megaphone
+ \fill[\duck@megaphone] (0.2,1.2) ellipse[x radius=0.05,y radius=0.1];
+ \fill[\duck@megaphone] (-0.4,1.2) ellipse[x radius=0.1,y radius=0.3];
+ \fill[\duck@megaphone] (0.2,1.3) -- (-0.4,1.5) -- (-0.4,0.9) -- (0.2,1.1) -- cycle;
+ \fill[\duck@megaphone!70!black] (-0.4,1.2) ellipse[x radius=0.07,y radius=0.25];
+ \draw[line width=\scalingfactor*2pt,\duck@megaphone] (-0.05,1.05) circle [radius=0.13];
+\fi
+%
+% overleaf duck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@overleaf
+ \fill[white] \duckpathoverleaf;
+\fi
+%
+% wing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifduck@wing
+ \fill[\duck@wing] \duckpathwing;
+\fi
+%
+% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\UseHook{tikzducks/foreground}
+\csname duckhookforeground\endcsname
+%
+%\draw (current bounding box.north west) rectangle (current bounding box.south east);% For debugging bounding boxes
+%
+\end{scope}%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Random ducks
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\pgfmathdeclarerandomlist{head}{\duck@listhead}
+\pgfmathdeclarerandomlist{accessories}{\duck@listacces}
+
+\def\shuffleducks{%
+ \pgfmathrandomitem{\head}{head}%
+ \edef\randomhead{\head}%
+ \pgfmathrandomitem{\accessories}{accessories}%
+ \edef\randomaccessories{\accessories}%
+}
+
+\newcommand*{\randuck}[1][]{%
+ \duck[randomhead, randomaccessories, #1]%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Defining some of the more complicate paths for easy reuse
+%
+% naming scheme is \duckpath<name>
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\duckpathbody{%
+ (0.513,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
+ (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
+ (1.818,1.419) .. controls (0.938, 0.946) and ( 1.240,1.379) ..
+ (0.513,1.145) -- cycle
+}
+
+\def\duckpathgrumpybill{%
+ (0.406,1.472) .. controls (0.643,1.530) and (0.643,1.530) ..
+ (0.800,1.300) .. controls (0.083,0.850) and (0.269,1.369) ..
+ (0.406,1.472) -- cycle
+}
+
+\def\duckpathbill{%
+ (0.406,1.472) .. controls (0.643,1.530) and (0.541,1.303) ..
+ (0.910,1.370) .. controls (0.083,0.850) and (0.269,1.369) ..
+ (0.406,1.472) -- cycle
+}
+
+\def\duckpathwing{%
+ (1.47,0.56) .. controls (1.51,0.59) and (1.57,0.62) ..
+ (1.60,0.66) .. controls (1.61,0.70) and (1.51,0.69) ..
+ (1.47,0.69) .. controls (1.48,0.72) and (1.41,0.76) ..
+ (1.37,0.74) .. controls (1.35,0.79) and (1.33,0.81) ..
+ (1.25,0.80) .. controls (1.25,0.86) and (1.18,0.88) ..
+ (1.15,0.88) .. controls (1.20,1.01) and (0.40,0.79) ..
+ (0.52,0.57) .. controls (0.63,0.26) and (1.22,0.43) ..
+ (1.47,0.56) -- cycle
+}
+
+% clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\duckpathtshirt{%
+ (0.490,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
+ (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
+ (1.818,1.419) .. controls (0.938, 0.976) and ( 1.240,1.279) ..
+ (0.590,1.000) -- cycle
+}
+
+\def\duckpathjacket{%
+ (0.490,1.145) .. controls (0.267, 1.102) and (-0.125,0.657) ..
+ (0.289,0.261) .. controls (0.704,-0.135) and ( 2.863,0.130) ..
+ (1.818,1.419) .. controls (0.880, 0.946) and ( 1.240,1.378) ..
+ (0.513,0.700) -- cycle
+}
+
+% hair styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\duckpathshorthair{%
+ (1.3947,1.4175) .. controls (1.4546,1.4518) and (1.4699,1.6566) ..
+ (1.4343,1.7992) .. controls (1.2528,2.5033) and (0.2339,2.2710) ..
+ (0.4151,1.5907) .. controls (0.4345,1.8709) and (0.7421,2.0999) ..
+ (0.9494,1.9054) .. controls (1.2241,1.6476) and (1.3316,1.3814) ..
+ (1.3947,1.4175) -- cycle
+}
+
+\def\duckpathlonghair{%
+ (1.4508,0.7565) .. controls (1.5146,0.7888) and (1.5854,0.8216) ..
+ (1.6247,0.8831) .. controls (1.5859,0.8847) and (1.4726,0.9457) ..
+ (1.5587,0.9706) .. controls (1.6317,0.9685) and (1.7016,1.0046) ..
+ (1.7314,1.0734) .. controls (1.7931,1.1660) and (1.6616,1.1176) ..
+ (1.6277,1.1566) .. controls (1.6853,1.1741) and (1.7840,1.1829) ..
+ (1.8123,1.2244) .. controls (1.7022,1.2488) and (1.5688,1.2663) ..
+ (1.5063,1.3739) .. controls (1.4619,1.5143) and (1.4696,1.6649) ..
+ (1.4340,1.8076) .. controls (1.2524,2.5117) and (0.2335,2.2794) ..
+ (0.4060,1.5991) .. controls (0.4341,1.8793) and (0.6629,2.1130) ..
+ (0.9011,1.9578) .. controls (1.2427,1.7382) and (1.3350,1.4214) ..
+ (1.0905,1.0610) .. controls (1.0597,1.0109) and (1.1103,0.9166) ..
+ (1.1805,0.8670) .. controls (1.2507,0.8174) and (1.3503,0.7853) ..
+ (1.4508,0.7565) -- cycle
+}
+
+\def\duckpathcrazyhair{%
+ (0.1977,1.9023) .. controls (0.2633,2.0599) and (0.4819,2.0547) ..
+ (0.4713,2.0879) .. controls (0.4647,2.2106) and (0.2516,2.2392) ..
+ (0.2516,2.2392) .. controls (0.4352,2.2933) and (0.7427,1.9304) ..
+ (0.5743,2.3885) .. controls (0.6017,2.3633) and (0.8307,2.1739) ..
+ (0.8082,2.4245) .. controls (0.8271,2.2885) and (0.9195,2.2400) ..
+ (0.9933,2.2673) .. controls (1.0814,2.6593) and (0.9688,2.0034) ..
+ (1.3350,2.3615) .. controls (1.3657,2.3292) and (1.1627,2.1043) ..
+ (1.3424,2.1387) .. controls (1.3102,1.8312) and (1.5049,2.2623) ..
+ (1.5049,2.2623) .. controls (1.5049,2.2623) and (1.4675,2.0493) ..
+ (1.4287,1.9560) .. controls (1.4287,1.9560) and (1.6830,1.9470) ..
+ (1.7178,1.8823) .. controls (1.1926,1.8054) and (2.0160,1.7277) ..
+ (1.4923,1.7275) .. controls (1.5366,1.6685) and (1.3013,1.6009) ..
+ (1.6500,1.5946) .. controls (0.8836,1.5797) and (1.2764,1.9221) ..
+ (0.8957,2.0442) .. controls (0.5516,2.0958) and (0.5228,1.8527) ..
+ (0.4695,1.7963) .. controls (0.4825,1.9607) and (0.3601,1.9095) ..
+ (0.1977,1.9023) -- cycle
+}
+
+\def\duckpathrecedinghair{%
+ (1.3385,1.4841) .. controls (1.4243,1.4529) and (1.4877,1.7127) ..
+ (1.3964,1.8658) .. controls (1.1071,2.3511) and (0.5189,2.1609) ..
+ (0.4381,1.6816) .. controls (0.4575,1.9618) and (0.9007,2.2059) ..
+ (1.1308,2.0390) .. controls (1.4703,1.7469) and (1.0343,1.5949) ..
+ (1.3385,1.4841) -- cycle
+}
+
+\def\duckpathmohican{%
+ (0.7632,1.7935) .. controls (0.9223,2.3084) and (1.3870,1.8580) ..
+ (1.3920,1.5854) .. controls (1.4233,2.1466) and (0.6812,2.5808) ..
+ (0.6725,1.8166) .. controls (0.6725,1.8166) and (0.7615,1.7926) ..
+ (0.7632,1.7935) -- cycle
+}
+
+\def\duckpathmullet{%
+ (1.3723,1.2684) .. controls (1.3723,1.2684) and (1.5129,1.5571) ..
+ (1.4435,1.7815) .. controls (1.2652,2.3572) and (0.3342,2.2633) ..
+ (0.4106,1.5424) .. controls (0.4204,1.6825) and (0.5692,1.9195) ..
+ (0.5692,1.9195) .. controls (0.5692,1.9195) and (0.8475,1.8402) ..
+ (1.1031,1.7844) .. controls (1.0808,1.6260) and (1.1130,1.4754) ..
+ (1.1130,1.4754) .. controls (1.1956,1.4198) and (1.3001,1.3369) ..
+ (1.3723,1.2684) -- cycle
+}
+
+% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\duckpathqueencrown{%
+ (0.7370,2.0732) .. controls (0.6966,2.2091) and (0.6769,2.3503) ..
+ (0.6354,2.4859) .. controls (0.6149,2.5164) and (0.5958,2.5732) ..
+ (0.6498,2.5808) .. controls (0.6973,2.5907) and (0.7091,2.5350) ..
+ (0.6926,2.5016) .. controls (0.6967,2.4544) and (0.7188,2.4109) ..
+ (0.7340,2.3665) .. controls (0.7415,2.3472) and (0.7619,2.2862) ..
+ (0.7676,2.3381) .. controls (0.7755,2.3852) and (0.7871,2.4329) ..
+ (0.7833,2.4808) .. controls (0.7597,2.5148) and (0.7834,2.5720) ..
+ (0.8294,2.5570) .. controls (0.8775,2.5457) and (0.8536,2.4937) ..
+ (0.8436,2.4638) .. controls (0.8502,2.3973) and (0.8640,2.3313) ..
+ (0.8798,2.2664) .. controls (0.9047,2.2750) and (0.9168,2.3261) ..
+ (0.9342,2.3514) .. controls (0.9492,2.3853) and (0.9714,2.4171) ..
+ (0.9773,2.4540) .. controls (0.9645,2.4873) and (0.9766,2.5358) ..
+ (1.0204,2.5303) .. controls (1.0646,2.5298) and (1.0691,2.4725) ..
+ (1.0443,2.4460) .. controls (1.0440,2.3935) and (1.0580,2.3419) ..
+ (1.0671,2.2905) .. controls (1.0706,2.2719) and (1.0788,2.2126) ..
+ (1.0985,2.2554) .. controls (1.1269,2.3087) and (1.1558,2.3623) ..
+ (1.1772,2.4187) .. controls (1.1697,2.4515) and (1.1716,2.5081) ..
+ (1.2210,2.5018) .. controls (1.2706,2.4969) and (1.2686,2.4403) ..
+ (1.2406,2.4126) .. controls (1.2279,2.3600) and (1.2211,2.3057) ..
+ (1.2172,2.2518) .. controls (1.2296,2.2439) and (1.2538,2.2943) ..
+ (1.2693,2.3112) .. controls (1.2908,2.3467) and (1.3228,2.3784) ..
+ (1.3316,2.4200) .. controls (1.3203,2.4624) and (1.3708,2.5014) ..
+ (1.4051,2.4678) .. controls (1.4448,2.4342) and (1.3945,2.3994) ..
+ (1.3765,2.3710) .. controls (1.3022,2.2536) and (1.2440,2.1265) ..
+ (1.1686,2.0097) .. controls (0.9649,1.9465) and (0.8367,1.9955) ..
+ (0.7370,2.0732) -- cycle
+}
+
+\def\duckpathkingcrown{%
+ (0.6572,2.0396) .. controls (0.6637,2.0838) and (0.6716,2.1289) ..
+ (0.6684,2.1735) .. controls (0.6481,2.2496) and (0.5923,2.3131) ..
+ (0.5818,2.3921) .. controls (0.5738,2.4607) and (0.6167,2.5343) ..
+ (0.6862,2.5502) .. controls (0.7548,2.5703) and (0.8210,2.5304) ..
+ (0.8720,2.4881) .. controls (0.8984,2.4712) and (0.9239,2.4324) ..
+ (0.9486,2.4249) .. controls (0.9524,2.4691) and (0.9566,2.5158) ..
+ (0.9844,2.5527) .. controls (1.0052,2.5845) and (1.0390,2.6282) ..
+ (1.0820,2.6127) .. controls (1.1212,2.5899) and (1.1378,2.5421) ..
+ (1.1478,2.5003) .. controls (1.1576,2.4639) and (1.1336,2.4180) ..
+ (1.1349,2.3906) .. controls (1.2050,2.4269) and (1.2847,2.4629) ..
+ (1.3654,2.4429) .. controls (1.4292,2.4285) and (1.4864,2.3679) ..
+ (1.4793,2.2998) .. controls (1.4859,2.2404) and (1.4407,2.1925) ..
+ (1.4006,2.1551) .. controls (1.3681,2.1232) and (1.3290,2.0951) ..
+ (1.3072,2.0544) .. controls (1.2904,2.0121) and (1.2805,1.9674) ..
+ (1.2738,1.9225) .. controls (1.1221,1.8892) and (0.9586,1.8836) ..
+ (0.8112,1.9386) .. controls (0.7535,1.9608) and (0.6999,1.9945) ..
+ (0.6572,2.0396) -- cycle
+}
+
+\def\duckpathdarthvader{%
+ (0.4264,1.9092) .. controls (0.4347,1.9248) and (0.4612,1.9186) ..
+ (0.4969,1.9783) .. controls (0.5499,2.0670) and (0.7559,2.2377) ..
+ (0.9889,2.2057) .. controls (1.2691,2.1668) and (1.4075,1.8829) ..
+ (1.4176,1.7421) .. controls (1.4279,1.5955) and (1.5246,1.3484) ..
+ (1.5246,1.3484) --
+ (0.9846,1.2036) .. controls (1.0898,1.2735) and (1.0667,1.5598) ..
+ (1.0555,1.6034) .. controls (0.9758,1.9147) and (0.8121,1.8681) ..
+ (0.7174,1.7694) .. controls (0.5671,2.0370) and (0.4103,1.7556) ..
+ (0.4132,1.472) --
+ (0.3529,1.415) .. controls (0.3529,1.43938) and (0.3893,1.8379)..
+ (0.4264,1.9092) -- cycle
+}
+
+\def\duckpathhorsetail{%
+ (1.7248,1.3553) .. controls (2.0530,1.3369) and (2.1427,1.1604) ..
+ (2.2915,0.9970) .. controls (2.4759,0.7946) and (2.9531,0.8890) ..
+ (2.7668,0.9003) .. controls (2.4670,0.9184) and (2.5158,1.1488) ..
+ (2.3907,1.3152) .. controls (2.2788,1.4641) and (1.9414,1.5945) ..
+ (1.7248,1.3553) -- cycle
+}
+
+\def\duckpathcape{%
+ (0.225,0.966) .. controls (1.314,0.961) and (2.070,0.650) ..
+ (2.042,1.245) .. controls (1.863,1.164) and (1.844,1.173) ..
+ (1.792,1.340) .. controls (1.635,1.235) and (1.620,1.268) ..
+ (1.567,1.393) .. controls (1.358,1.086) and (0.664,1.096) ..
+ (0.460,1.110) .. controls (0.461,1.133) and (0.305,1.077) ..
+ (0.235,0.966) -- cycle
+}
+
+\def\duckpathcrown{%
+ (0.7365,2.0616) .. controls (0.7365,2.0616) and (0.7771,2.1763) ..
+ (0.6959,2.4650) -- (0.8895,2.2378) -- (1.0391,2.3943) --
+ (1.1260,2.1961) --
+ (1.3938,2.3318) .. controls (1.1927,2.1132) and (1.2194,1.9764) ..
+ (1.2194,1.9764) .. controls (1.0774,1.9202) and (0.8507,1.9601) ..
+ (0.7365,2.0616) -- cycle
+}
+
+\def\duckpathtorch{%
+ (1.4338,1.0258) .. controls (1.4308,0.8877) and (1.3468,0.8997) ..
+ (1.2447,0.7481) .. controls (1.1427,0.8982) and (1.0721,0.8892) ..
+ (1.0646,1.0243) .. controls (1.0541,1.1714) and (1.2642,1.1654) ..
+ (1.2492,1.3860) .. controls (1.3093,1.3110) and (1.4383,1.2705) ..
+ (1.4338,1.0258) -- cycle
+}
+
+\def\duckpathoverleaf{%
+ (1.2699,0.6095) .. controls (1.2710,0.5992) and (1.2752,0.5910) .. (1.2822,0.5852) .. controls (1.2892,0.5793) and (1.2983,0.5763) .. (1.3095,0.5763) .. controls (1.3165,0.5762) and (1.3233,0.5778) .. (1.3295,0.5809) .. controls (1.3353,0.5840) and (1.3401,0.5885) .. (1.3436,0.5940) -- (1.3792,0.5940) .. controls (1.3731,0.5785) and (1.3640,0.5664) .. (1.3521,0.5578) .. controls (1.3398,0.5492) and (1.3252,0.5447) .. (1.3103,0.5449) .. controls (1.3002,0.5448) and (1.2902,0.5467) .. (1.2808,0.5505) .. controls (1.2718,0.5544) and (1.2636,0.5601) .. (1.2567,0.5672) .. controls (1.2500,0.5742) and (1.2446,0.5825) .. (1.2410,0.5915) .. controls (1.2372,0.6005) and (1.2353,0.6101) .. (1.2353,0.6198) .. controls (1.2352,0.6294) and (1.2370,0.6389) .. (1.2404,0.6479) .. controls (1.2438,0.6567) and (1.2489,0.6647) .. (1.2554,0.6715) .. controls (1.2625,0.6790) and (1.2709,0.6850) .. (1.2802,0.6892) .. controls (1.2891,0.6933) and (1.2988,0.6954) .. (1.3086,0.6955) .. controls (1.3207,0.6955) and (1.3325,0.6926) .. (1.3432,0.6871) .. controls (1.3540,0.6813) and (1.3633,0.6732) .. (1.3705,0.6634) .. controls (1.3751,0.6571) and (1.3786,0.6501) .. (1.3807,0.6427) .. controls (1.3831,0.6341) and (1.3842,0.6253) .. (1.3841,0.6164) .. controls (1.3840,0.6139) and (1.3839,0.6119) .. (1.3837,0.6092) .. controls (1.3458,0.6093) and (1.3079,0.6094) .. (1.2699,0.6095) -- cycle(1.3486,0.6358) .. controls (1.3458,0.6453) and (1.3410,0.6525) .. (1.3343,0.6575) .. controls (1.3276,0.6625) and (1.3192,0.6650) .. (1.3090,0.6650) .. controls (1.3004,0.6651) and (1.2920,0.6622) .. (1.2852,0.6570) .. controls (1.2783,0.6517) and (1.2733,0.6443) .. (1.2711,0.6359) .. controls (1.2969,0.6359) and (1.3228,0.6358) .. (1.3486,0.6358) -- cycle(1.5160,0.5487) -- (1.5160,0.5662) .. controls (1.5122,0.5593) and (1.5064,0.5538) .. (1.4992,0.5505) .. controls (1.4920,0.5471) and (1.4828,0.5455) .. (1.4715,0.5455) .. controls (1.4505,0.5455) and (1.4329,0.5527) .. (1.4187,0.5670) .. controls (1.4046,0.5814) and (1.3976,0.5993) .. (1.3975,0.6206) .. controls (1.3975,0.6303) and (1.3993,0.6401) .. (1.4029,0.6492) .. controls (1.4063,0.6580) and (1.4114,0.6661) .. (1.4180,0.6729) .. controls (1.4246,0.6801) and (1.4327,0.6857) .. (1.4416,0.6895) .. controls (1.4509,0.6932) and (1.4608,0.6950) .. (1.4708,0.6949) .. controls (1.4800,0.6951) and (1.4891,0.6933) .. (1.4976,0.6896) .. controls (1.5050,0.6862) and (1.5112,0.6807) .. (1.5156,0.6739) -- (1.5156,0.6911) -- (1.5480,0.6911) -- (1.5480,0.5485) -- (1.5160,0.5485) -- (1.5160,0.5487) -- cycle(1.4436,0.5910) .. controls (1.4513,0.5831) and (1.4619,0.5787) .. (1.4729,0.5789) .. controls (1.4833,0.5789) and (1.4926,0.5829) .. (1.5006,0.5911) .. controls (1.5083,0.5986) and (1.5126,0.6088) .. (1.5126,0.6196) .. controls (1.5127,0.6307) and (1.5084,0.6414) .. (1.5006,0.6494) .. controls (1.4926,0.6577) and (1.4833,0.6619) .. (1.4727,0.6619) .. controls (1.4618,0.6621) and (1.4514,0.6577) .. (1.4439,0.6499) .. controls (1.4361,0.6423) and (1.4318,0.6318) .. (1.4317,0.6205) .. controls (1.4315,0.6092) and (1.4355,0.5991) .. (1.4436,0.5910) -- cycle(1.6366,0.6913) -- (1.6366,0.6617) -- (1.6127,0.6617) -- (1.6127,0.5487) -- (1.5806,0.5487) -- (1.5806,0.6617) -- (1.5637,0.6617) -- (1.5637,0.6913) -- (1.5796,0.6913) -- (1.5796,0.6952) .. controls (1.5796,0.7102) and (1.5838,0.7214) .. (1.5922,0.7288) .. controls (1.6005,0.7362) and (1.6131,0.7399) .. (1.6300,0.7399) .. controls (1.6324,0.7398) and (1.6347,0.7396) .. (1.6370,0.7395) -- (1.6370,0.7097) -- (1.6347,0.7097) .. controls (1.6272,0.7097) and (1.6218,0.7084) .. (1.6186,0.7059) .. controls (1.6154,0.7034) and (1.6138,0.6993) .. (1.6138,0.6936) -- (1.6138,0.6910) .. controls (1.6214,0.6913) and (1.6290,0.6912) .. (1.6366,0.6913) -- cycle(1.1906,0.5487) -- (1.2231,0.5487) -- (1.2231,0.7374) -- (1.1906,0.7374) -- cycle(0.9820,0.6095) .. controls (0.9831,0.5992) and (0.9872,0.5910) .. (0.9943,0.5852) .. controls (1.0013,0.5793) and (1.0104,0.5763) .. (1.0216,0.5763) .. controls (1.0285,0.5762) and (1.0354,0.5778) .. (1.0416,0.5809) .. controls (1.0474,0.5839) and (1.0522,0.5885) .. (1.0556,0.5940) -- (1.0914,0.5940) .. controls (1.0854,0.5785) and (1.0763,0.5664) .. (1.0643,0.5578) .. controls (1.0522,0.5492) and (1.0382,0.5449) .. (1.0225,0.5449) .. controls (1.0124,0.5448) and (1.0024,0.5467) .. (0.9931,0.5505) .. controls (0.9840,0.5544) and (0.9758,0.5601) .. (0.9690,0.5672) .. controls (0.9622,0.5742) and (0.9569,0.5825) .. (0.9532,0.5915) .. controls (0.9495,0.6005) and (0.9475,0.6101) .. (0.9475,0.6198) .. controls (0.9475,0.6294) and (0.9492,0.6389) .. (0.9527,0.6479) .. controls (0.9560,0.6567) and (0.9611,0.6647) .. (0.9677,0.6715) .. controls (0.9747,0.6790) and (0.9830,0.6850) .. (0.9924,0.6892) .. controls (1.0012,0.6933) and (1.0109,0.6955) .. (1.0207,0.6955) .. controls (1.0327,0.6955) and (1.0446,0.6927) .. (1.0552,0.6871) .. controls (1.0660,0.6813) and (1.0753,0.6732) .. (1.0826,0.6634) .. controls (1.0871,0.6571) and (1.0906,0.6501) .. (1.0926,0.6427) .. controls (1.0949,0.6341) and (1.0960,0.6253) .. (1.0959,0.6164) .. controls (1.0959,0.6139) and (1.0957,0.6119) .. (1.0956,0.6092) .. controls (1.0577,0.6100) and (1.0199,0.6095) .. (0.9820,0.6095) -- cycle(1.0606,0.6358) .. controls (1.0578,0.6453) and (1.0531,0.6526) .. (1.0463,0.6575) .. controls (1.0397,0.6625) and (1.0312,0.6650) .. (1.0210,0.6650) .. controls (1.0124,0.6651) and (1.0041,0.6622) .. (0.9973,0.6570) .. controls (0.9903,0.6517) and (0.9853,0.6443) .. (0.9830,0.6359) .. controls (1.0089,0.6359) and (1.0348,0.6358) .. (1.0606,0.6358) -- cycle(1.1761,0.6624) .. controls (1.1632,0.6614) and (1.1542,0.6580) .. (1.1492,0.6523) .. controls (1.1441,0.6465) and (1.1415,0.6363) .. (1.1415,0.6214) -- (1.1415,0.5487) -- (1.1083,0.5487) -- (1.1083,0.6913) -- (1.1394,0.6913) -- (1.1394,0.6748) .. controls (1.1438,0.6808) and (1.1494,0.6856) .. (1.1559,0.6891) .. controls (1.1621,0.6923) and (1.1690,0.6938) .. (1.1760,0.6937) .. controls (1.1760,0.6833) and (1.1761,0.6728) .. (1.1761,0.6624) -- cycle(0.8646,0.8092) .. controls (0.8244,0.8248) and (0.6787,0.8306) .. (0.6784,0.7437) .. controls (0.6359,0.7165) and (0.6078,0.6721) .. (0.6078,0.6246) .. controls (0.6077,0.5410) and (0.7016,0.4916) .. (0.7705,0.5391) .. controls (0.8394,0.5866) and (0.8268,0.6919) .. (0.7486,0.7217) .. controls (0.7411,0.7246) and (0.7248,0.7297) .. (0.7117,0.7286) .. controls (0.6931,0.7168) and (0.6704,0.6924) .. (0.6597,0.6682) .. controls (0.6918,0.7064) and (0.7528,0.6983) .. (0.7737,0.6530) .. controls (0.7947,0.6076) and (0.7614,0.5559) .. (0.7115,0.5562) .. controls (0.6914,0.5562) and (0.6724,0.5649) .. (0.6594,0.5802) .. controls (0.6410,0.6019) and (0.6363,0.6254) .. (0.6400,0.6484) .. controls (0.6532,0.7289) and (0.7487,0.7748) .. (0.8197,0.7924) .. controls (0.7966,0.7801) and (0.7548,0.7600) .. (0.7255,0.7380) .. controls (0.8108,0.7051) and (0.8246,0.7770) .. (0.8646,0.8092) -- cycle(0.8731,0.5487) -- (0.8189,0.6913) -- (0.8542,0.6913) -- (0.8874,0.5965) -- (0.9217,0.6913) -- (0.9561,0.6913) -- (0.8991,0.5487) -- cycle
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Picture mode ducks
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\picduck{%
+ % bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(6.5,29.5)(-1,17.5)(16.8,27.3)
+ \qbezier(6.5,29.5)(9,30.5)(11.4,28.0)
+ \qbezier(11.4,28.0)(13.5,26.5)(16.8,27.3)
+ % head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(06.5,29.5)(6,41.5)(16.8,42.4)
+ \qbezier(16.8,42.4)(29,41)(25.3,24)
+ % body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(7.8,23.2)(8,22.8)(8,22.5)
+ \qbezier(8,22.5)(-5,9)(8,3)
+ \qbezier(8,3)(22,-2)(35,6.5)
+ \qbezier(35,6.5)(46,15)(35,28.3)
+ \qbezier(35,28.3)(30,25)(25.3,24)
+ % right eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(13,32)(13.8,34.5)(16,34)
+ \qbezier(16,34)(17.3,33.2)(16.7,31)
+ \qbezier(16.7,31)(16,29.1)(14.5,29.3)
+ \qbezier(14.5,29.3)(12.7,29.5)(13,32)
+ \put(15.3,31.3){\circle*{1.8}}
+ % left eye %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \qbezier(7.7,33.2)(8.4,35.7)(10.3,35)
+ \qbezier(10.3,35)(11.2,34)(10.4,32.2)
+ \qbezier(10.4,32.2)(9.7,30.7)(8.7,30.7)
+ \qbezier(8.7,30.7)(7.2,30.9)(7.7,33.2)
+ \put(9.5,32.7){\circle*{1.5}}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% stripes for sports jerseys
+%
+% code contributed by Carla Maggi
+% https://tex.stackexchange.com/a/387126/36296
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\tikzset{
+ /stripes/.cd,
+ color/.code = \def\stripes@color{#1},
+ distance/.code = \def\stripes@distance{#1},
+ width/.code = \def\stripes@width{#1},
+ height/.code = \def\stripes@height{#1},
+ initialx/.code = \def\stripes@initialx{#1},
+ initialy/.code = \def\stripes@initialy{#1},
+ rotate/.code = \def\stripes@rotate{#1},
+ emblem/.code = \def\stripes@emblem{#1},
+ % setting defaults %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ color = black,
+ distance = 0.3,
+ width = 0.15,
+ height = 2.7,
+ initialx = 0.1,
+ initialy = -0.3,
+ rotate = -10,
+ emblem = \empty
+}
+
\newcommand*{\stripes}[1][]{%
\tikzset{/stripes/.cd,#1}%
- \stripes@draw%
+ \path (0.1,0.1) rectangle (2.1,1.45);
+ \begin{pgfinterruptboundingbox}
+ \begin{scope}
+ \clip \duckpathjacket;
+ \foreach \shifta in {0,\stripes@distance,...,2.4}{%
+ \fill[\stripes@color,rotate around={\stripes@rotate:(1.2,0.9)}]
+ ($(\stripes@initialx,\stripes@initialy)+(\shifta,0)$) rectangle ($(\stripes@initialx,\stripes@initialy)+(\shifta,0)+(\stripes@width,\stripes@height)$);
+ }
+ \end{scope}
+ \end{pgfinterruptboundingbox}
+ \node at (wing) {\stripes@emblem };
}
-
-\input tikzducks-generic
diff --git a/graphics/pgf/contrib/tikzducks/tikzlibraryducks.code.tex b/graphics/pgf/contrib/tikzducks/tikzlibraryducks.code.tex
index 4c90b1f0e6..199d41c1db 100644
--- a/graphics/pgf/contrib/tikzducks/tikzlibraryducks.code.tex
+++ b/graphics/pgf/contrib/tikzducks/tikzlibraryducks.code.tex
@@ -8,7 +8,7 @@
% https://github.com/samcarter/tikzducks
%
% 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
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tikzducks}
@@ -16,7 +16,7 @@
% This is all that is needed ...
\tikzset{
duck/.pic={%
- \duck@draw
+ \duck
},
duck/.search also={,/tikz,/pgf},
}
diff --git a/graphics/pgf/contrib/tikzlings/DEPENDS.txt b/graphics/pgf/contrib/tikzlings/DEPENDS.txt
new file mode 100644
index 0000000000..c6f29e2964
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/DEPENDS.txt
@@ -0,0 +1,4 @@
+hard pgf
+hard pgf-blur
+hard iftex
+hard epstopdf-pkg \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzlings/README.md b/graphics/pgf/contrib/tikzlings/README.md
index d0586008b4..80ee80f485 100644
--- a/graphics/pgf/contrib/tikzlings/README.md
+++ b/graphics/pgf/contrib/tikzlings/README.md
@@ -1,11 +1,30 @@
+![](https://raw.githubusercontent.com/samcarter/tikzlings/main/ICON.png)
+
# TikZlings
-A collection of animals and other beings from the tikz world
-Current version: 2022/06/17 version v1.0
+[![License](https://img.shields.io/github/license/samcarter/tikzlings.svg?color=blue)](https://www.latex-project.org/lppl.txt)
+[![GitHub tag](https://img.shields.io/github/tag/samcarter/tikzlings.svg?label=current%20version&color=blue)](https://github.com/samcarter/tikzlings/releases/latest)
+[![CTAN](https://img.shields.io/ctan/v/tikzlings.svg?color=blue)](https://ctan.org/pkg/tikzlings)
+
+A collection of animals and other beings from the TikZ world.
+
+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/tikzlings .
+
+### Usage
-This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+```latex
+\documentclass{standalone}
+\usepackage{tikzlings}
-![tikzlings](https://raw.githubusercontent.com/samcarter/tikzlings/master/Examples/tikzlings.png)
+\begin{document}
+\begin{tikzpicture}
+ \penguin
+\end{tikzpicture}
+\end{document}
+```
+For more details, please consult the [package documentation](https://github.com/samcarter/tikzlings/blob/main/DOCUMENTATION.pdf).
diff --git a/graphics/pgf/contrib/tikzlings/README.pdf b/graphics/pgf/contrib/tikzlings/README.pdf
new file mode 100644
index 0000000000..8a112071b7
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/README.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzlings/tikzlibrarytikzlings.code.tex b/graphics/pgf/contrib/tikzlings/tikzlibrarytikzlings.code.tex
index 449b2ce5b1..7fcc0e8397 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlibrarytikzlings.code.tex
+++ b/graphics/pgf/contrib/tikzlings/tikzlibrarytikzlings.code.tex
@@ -8,7 +8,7 @@
% https://github.com/samcarter/tikzlings
%
% 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
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tikzlings}
@@ -29,6 +29,6 @@
\tikzset{
tikzling/.pic={\tikzling},
- tikzling/.search also={,/tikz,/pgf,/thing},
- thing/.search also={,/tikz,/pgf},
+ tikzling/.search also={,/tikz,/pgf,/thing},
+ thing/.search also={,/tikz,/pgf},
} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty b/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
index 9c41b7cfde..ef2fb63beb 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-addons.sty
@@ -9,13 +9,15 @@
% https://github.com/samcarter/tikzlings
%
% 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{tikzlings-addons}[2022/06/17 version v1.0 Draw additional items for the tikzlings]
+\ProvidesPackage{tikzlings-addons}[2025/01/05 version v2.2 Draw additional items for the tikzlings]
\RequirePackage{tikz}
\usetikzlibrary{patterns} % for the wizard hat
+\usetikzlibrary{decorations.shapes} % for sombrero
+\usetikzlibrary{decorations.pathmorphing}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -56,60 +58,81 @@
\end{scope}%
}
+\def\thing@listhead{}
+\def\thing@listacces{}
+\def\thing@headtext{head}
+\def\thing@accesstext{acess}
+
+\ExplSyntaxOn
+\NewDocumentCommand{\thing@ini}{om}{
+ \expandafter\newif\csname ifthing@#2\endcsname
+ \def\thing@tmp{#1}
+ \ifx\thing@headtext\thing@tmp
+ \tl_put_right:Nn \thing@listhead { {#2} }
+ \fi
+ \ifx\thing@accesstext\thing@tmp
+ \tl_put_right:Nn \thing@listacces { {#2} }
+ \fi
+}
+\ExplSyntaxOff
+
% Hats %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifthing@hat
-\newif\ifthing@tophat
-\newif\ifthing@beret
-\newif\ifthing@strawhat
-\newif\ifthing@harlequin
-\newif\ifthing@witch
-\newif\ifthing@magichat
-\newif\ifthing@crown
-\newif\ifthing@queencrown
-\newif\ifthing@kingcrown
-\newif\ifthing@santa
-\newif\ifthing@chef
-\newif\ifthing@graduate
-\newif\ifthing@alien
+\thing@ini[head]{hat}
+\thing@ini[head]{tophat}
+\thing@ini[head]{beret}
+\thing@ini[head]{strawhat}
+\thing@ini[head]{harlequin}
+\thing@ini[head]{witch}
+\thing@ini[head]{magichat}
+\thing@ini[head]{crown}
+\thing@ini[head]{queencrown}
+\thing@ini[head]{kingcrown}
+\thing@ini[head]{santa}
+\thing@ini[head]{chef}
+\thing@ini[head]{graduate}
+\thing@ini[head]{sombrero}
+\thing@ini[head]{alien}
% Communication %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifthing@book
-\newif\ifthing@signpost
+\thing@ini[acess]{book}
+\thing@ini[acess]{signpost}
\newif\ifthing@speech
\newif\ifthing@think
% Food %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifthing@pizza
+\thing@ini[acess]{pizza}
\newif\ifthing@davidlikespineapplepizza
-\newif\ifthing@cheese
-\newif\ifthing@baguette
-\newif\ifthing@cake
-\newif\ifthing@icecream
-\newif\ifthing@milkshake
-\newif\ifthing@wine
-\newif\ifthing@cocktail
+\thing@ini[acess]{cheese}
+\thing@ini[acess]{baguette}
+\thing@ini[acess]{cake}
+\thing@ini[acess]{icecream}
+\thing@ini[acess]{milkshake}
+\thing@ini[acess]{wine}
+\thing@ini[acess]{cocktail}
+\thing@ini[acess]{banana}
% Sport %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifthing@cricket
-\newif\ifthing@hockey
-\newif\ifthing@football
+\thing@ini[acess]{cricket}
+\thing@ini[acess]{hockey}
+\thing@ini[acess]{football}
% Other %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifthing@crystalball
-\newif\ifthing@magicwand
-\newif\ifthing@rollingpin
-\newif\ifthing@lightsaber
-\newif\ifthing@torch
-\newif\ifthing@basket
-\newif\ifthing@easter
-\newif\ifthing@crozier
-\newif\ifthing@shovel
-\newif\ifthing@pickaxe
-\newif\ifthing@strawbroom
-\newif\ifthing@broom
-\newif\ifthing@umbrella
-\newif\ifthing@umbrellaclosed
-\newif\ifthing@handbag
+\thing@ini[acess]{crystalball}
+\thing@ini[acess]{magicwand}
+\thing@ini[acess]{rollingpin}
+\thing@ini[acess]{lightsaber}
+\thing@ini[acess]{torch}
+\thing@ini[acess]{basket}
+\thing@ini[acess]{easter}
+\thing@ini[acess]{crozier}
+\thing@ini[acess]{shovel}
+\thing@ini[acess]{pickaxe}
+\thing@ini[acess]{strawbroom}
+\thing@ini[acess]{broom}
+\thing@ini[acess]{umbrella}
+\thing@ini[acess]{umbrellaclosed}
+\thing@ini[acess]{handbag}
+\thing@ini[acess]{stick}
\tikzset{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% General
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -121,62 +144,71 @@
% Hats
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- hat/.code = \thing@hattrue
+ hat/.code = \thing@hattrue
\def\thing@hat{#1},
- hat/.default = blue!40!black,
- tophat/.code = \thing@tophattrue
+ hat/.default = blue!40!black,
+ tophat/.code = \thing@tophattrue
\def\thing@tophat{#1},
top hat/.forward to = /thing/tophat,
tophat/.default = black!90!white,
- beret/.code = \thing@berettrue
+ beret/.code = \thing@berettrue
\def\thing@beret{#1},
- beret/.default = black,
+ beret/.default = black,
strawhat/.code = \thing@strawhattrue
\def\thing@strawhat{#1},
straw hat/.forward to = /thing/strawhat,
strawhat/.default = gray!30!white,
ribbon/.code = \def\thing@ribbon{#1},
ribbon = black,
- harlequin/.code = \thing@harlequintrue
+ harlequin/.code = \thing@harlequintrue
\def\thing@harlequin{#1},
harlequin/.default = blue,
- niuqelrah/.code = \def\thing@niuqelrah{#1},
- niuqelrah = red,
- witch/.code = \thing@witchtrue
- \def\thing@witch{#1},
- witch/.default = black,
- magichat/.code = \thing@magichattrue
+ niuqelrah/.code = \def\thing@niuqelrah{#1},
+ niuqelrah = red,
+ witch/.code = \thing@witchtrue
+ \def\thing@witch{#1},
+ witch/.default = black,
+ magichat/.code = \thing@magichattrue
\def\thing@magichat{#1},
magic hat/.forward to = /thing/magichat,
magichat/.default = violet,
magicstars/.code = \def\thing@magicstars{#1},
- magic stars/.forward to = /thing/magicstars,
- magicstars = yellow!80!brown,
- crown/.code = \thing@crowntrue
+ magic stars/.forward to = /thing/magicstars,
+ magicstars = yellow!80!brown,
+ crown/.code = \thing@crowntrue
\def\thing@crown{#1},
- crown/.default = yellow!90!orange,
- queencrown/.code = \thing@queencrowntrue
+ crown/.default = yellow!90!orange,
+ queencrown/.code = \thing@queencrowntrue
\def\thing@queencrown{#1},
queen crown/.forward to = /thing/queencrown,
queencrown/.default = yellow,
- kingcrown/.code = \thing@kingcrowntrue
+ kingcrown/.code = \thing@kingcrowntrue
\def\thing@kingcrown{#1},
king crown/.forward to = /thing/kingcrown,
kingcrown/.default = gray,
- santa/.code = \thing@santatrue
+ santa/.code = \thing@santatrue
\def\thing@santa{#1},
santa/.default = red!80!black,
- chef/.code = \thing@cheftrue
- \def\thing@chef{#1},
- chef/.default = gray!20!white,
- graduate/.code = \thing@graduatetrue
+ chef/.code = \thing@cheftrue
+ \def\thing@chef{#1},
+ chef/.default = gray!20!white,
+ graduate/.code = \thing@graduatetrue
\def\thing@graduate{#1},
graduate/.default = black,
- tassel/.code = \def\thing@tassel{#1},
+ tassel/.code = \def\thing@tassel{#1},
tassel = red,
- alien/.code = \thing@alientrue
+ sombrero/.code = \thing@sombrerotrue
+ \def\thing@sombrero{#1},
+ sombrero/.default = orange!70!yellow,
+ sombreroa/.code = \def\thing@sombreroa{#1},
+ sombreroa = green!70!blue,
+ sombrerob/.code = \def\thing@sombrerob{#1},
+ sombrerob = red,
+ sombreroc/.code = \def\thing@sombreroc{#1},
+ sombreroc = blue,
+ alien/.code = \thing@alientrue
\def\thing@alien{#1},
- alien/.default = green,
+ alien/.default = green,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Communication
@@ -189,17 +221,17 @@
book color/.forward to = /thing/bookcolour,
bookcolor/.forward to = /thing/bookcolour,
bookcolour = brown,
- signpost/.code = \thing@signposttrue
+ signpost/.code = \thing@signposttrue
\def\thing@signpost{#1},
sign post/.forward to = /thing/signpost,
signcolour/.code = \def\thing@signcolour{#1},
sign colour/.forward to = /thing/signcolour,
sign color/.forward to = /thing/signcolour,
- signcolor/.forward to = /thing/signcolour,
- signcolour = brown!50!black,
+ signcolor/.forward to = /thing/signcolour,
+ signcolour = brown!50!black,
signback/.code = \def\thing@signback{#1},
sign back/.forward to = /thing/signback,
- signback = green!40!black,
+ signback = green!40!black,
speech/.code = \thing@speechtrue
\def\thing@speech{#1},
think/.code = \thing@thinktrue
@@ -207,7 +239,7 @@
bubblecolour/.code = \def\thing@bubblecolour{#1},
bubble colour/.forward to = /thing/bubblecolour,
bubble color/.forward to = /thing/bubblecolour,
- bubblecolor/.forward to = /thing/bubblecolour,
+ bubblecolor/.forward to = /thing/bubblecolour,
bubblecolour = gray!30!white,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -216,12 +248,12 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pizza/.code = \thing@pizzatrue,
davidlikespineapplepizza/.code = \thing@davidlikespineapplepizzatrue
- \thing@speechtrue
+ \thing@speechtrue
\def\thing@speech{\scalebox{\scalingfactor}{\scalebox{0.9}{\tiny ih, che schifo!}}},
david likes pineapple pizza/.forward to = /thing/davidlikespineapplepizza,
cheese/.code = \thing@cheesetrue
\def\thing@cheese{#1},
- cheese/.default = yellow!30!orange!60!white,
+ cheese/.default = yellow!30!orange!60!white,
baguette/.code = \thing@baguettetrue
\def\thing@baguette{#1},
baguette/.default = brown,
@@ -240,14 +272,17 @@
flavourb = white!70!brown,
flavourc/.code = \def\thing@flavourc{#1},
flavour c/.forward to = /thing/flavourc,
- flavourc = red!50!white,
+ flavourc = red!50!white,
milkshake/.code = \thing@milkshaketrue
- \def\thing@milkshake{#1},
- milkshake/.default = red!20!white,
+ \def\thing@milkshake{#1},
+ milkshake/.default = red!20!white,
wine/.code = \thing@winetrue
- \def\thing@wine{#1},
- wine/.default = red!70!black,
- cocktail/.code = \thing@cocktailtrue,
+ \def\thing@wine{#1},
+ wine/.default = red!70!black,
+ cocktail/.code = \thing@cocktailtrue,
+ banana/.code = \thing@bananatrue
+ \def\thing@banana{#1},
+ banana/.default = yellow!80!orange,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Sport
@@ -269,11 +304,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
crystalball/.code = \thing@crystalballtrue
\def\thing@crystalball{#1},
- crystal ball/.forward to = /thing/crystalball,
- crystalball/.default = cyan,
+ crystal ball/.forward to = /thing/crystalball,
+ crystalball/.default = cyan,
magicwand/.code = \thing@magicwandtrue,
magic want/.forward to = /thing/magicwand,
- rollingpin/.code = \thing@rollingpintrue
+ rollingpin/.code = \thing@rollingpintrue
\def\thing@rollingpin{#1},
rolling pin/.forward to = /thing/rollingpin,
rollingpin/.default = brown,
@@ -330,7 +365,12 @@
umbrella closed/.forward to = /thing/umbrellaclosed,
handbag/.code = \thing@handbagtrue
\def\thing@handbag{#1},
- handbag/.default = red!70!black,
+ handbag/.default = red!70!black,
+ stick/.code = \thing@sticktrue
+ \def\thing@stick{#1},
+ stick/.default = brown!50!black,
+ leaf/.store in = \thing@leaf,
+ leaf = green!70!red,
}
\def\thing@draw{%
@@ -345,6 +385,7 @@
\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+\pgfmathsetmacro{\decoscalefactor}{sign(\tmpscaleA)*sign(\tmpscaleD)*\scalingfactor}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -355,15 +396,15 @@
% Hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@hat
\fill[\thing@hat,rotate around={-15:(-0.3,2.01)}] (-0.3,2.01) rectangle (0.46,2.31);
- \fill[\thing@hat] (0.05,1.92) ellipse[x radius=0.6, y radius=0.1, rotate=-15];
- \fill[\thing@hat] (0.14,2.2) ellipse[x radius=0.37, y radius=0.08, rotate=-15];
+ \fill[\thing@hat] (0.05,1.92) ellipse[x radius=0.6, y radius=0.1, rotate=-15];
+ \fill[\thing@hat] (0.14,2.2) ellipse[x radius=0.37, y radius=0.08, rotate=-15];
\fi
%
% Tophat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@tophat
\fill[\thing@tophat] (0.1,1.94) ellipse[x radius=0.48, y radius=0.1, rotate=-15];
\fill[\thing@tophat,rotate around={-15:(0.15,2.165)}] (-0.17, 1.94) -- (0.46, 1.94) -- (0.52, 2.39) -- (-0.22, 2.39) -- cycle;
- \fill[\thing@tophat] (0.21,2.385) ellipse[x radius=0.37, y radius=0.08, rotate=-15];
+ \fill[\thing@tophat] (0.21,2.385) ellipse[x radius=0.37, y radius=0.08, rotate=-15];
\fi
%
% Beret %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -378,13 +419,13 @@
% Straw hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@strawhat
\begin{scope}[xshift=-16,rotate=12,yshift=-1]
- \fill[\thing@strawhat,rotate=-15] (0.44,2.0) ellipse[x radius=0.75, y radius=0.1];
+ \fill[\thing@strawhat,rotate=-15] (0.44,2.0) ellipse[x radius=0.75, y radius=0.1];
\fill[\thing@strawhat,rotate=-15] (0.1,2.05) rectangle (0.78,2.5);
- \fill[\thing@strawhat,rotate=-15] (0.44,2.5) ellipse[x radius=0.34, y radius=0.08];
+ \fill[\thing@strawhat,rotate=-15] (0.44,2.5) ellipse[x radius=0.34, y radius=0.08];
\fill[\thing@strawhat,rotate=-15] (-0.3,2.02) -- (1.18,2.02) -- (0.78,2.2) -- (0.1,2.2) -- cycle;
- \fill[\thing@ribbon,rotate=-15] (0.44,2.2) ellipse[x radius=0.34, y radius=0.08];
+ \fill[\thing@ribbon,rotate=-15] (0.44,2.2) ellipse[x radius=0.34, y radius=0.08];
\fill[\thing@ribbon,rotate=-15] (0.1,2.2) rectangle (0.78,2.3);
- \fill[\thing@strawhat,rotate=-15] (0.44,2.3) ellipse[x radius=0.34, y radius=0.08];
+ \fill[\thing@strawhat,rotate=-15] (0.44,2.3) ellipse[x radius=0.34, y radius=0.08];
\end{scope}
\fi
%
@@ -401,8 +442,8 @@
%
% witch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@witch
- \begin{scope}[xshift=-26]
- \fill[\thing@witch,rotate=-15] (0.44,2.13) ellipse[x radius=0.75, y radius=0.17];
+ \begin{scope}[xshift=-26]
+ \fill[\thing@witch,rotate=-15] (0.44,2.13) ellipse[x radius=0.75, y radius=0.17];
\fill[\thing@witch,rotate=-15] (0.05,2.2)--(0.45,3.2)--(0.82,2.2);
\end{scope}
\fi
@@ -410,9 +451,7 @@
% magic hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@magichat
\begin{scope}[xshift=-26]
- \path[preaction={fill, \thing@magichat!100},rotate=-5,
- pattern=fivepointed stars, pattern color=\thing@magicstars!100]
- (0.36,1.95)--(0.86,2.95)--(1.20,1.85);
+ \path[preaction={fill, \thing@magichat!100},rotate=-5,pattern=fivepointed stars, pattern color=\thing@magicstars!100] (0.36,1.95)--(0.86,2.95)--(1.20,1.85);
\end{scope}
\fi
%
@@ -479,17 +518,8 @@
% Santa %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@santa
\begin{scope}[xshift=-26]
- \fill[\thing@santa]
- (0.430,1.803) .. controls (0.590,2.174) and (0.837,2.065) ..
- (1.118,1.954) .. controls (1.679,1.731) and (1.328,1.193) ..
- (1.647,1.057) .. controls (1.638,1.255) and (1.745,2.104) ..
- (1.168,2.270) .. controls (0.867,2.356) and (0.536,2.280) ..
- (0.430,1.803) -- cycle;
- \fill[white!80!brown]
- (0.44,1.733) .. controls (0.211,2.299) and (1.082,2.188) ..
- (1.456,1.759) .. controls (1.534,1.637) and (1.480,1.545) ..
- (1.400,1.566) .. controls (1.265,1.714) and (0.577,2.267) ..
- (0.44,1.733) -- cycle;
+ \fill[\thing@santa] (0.430,1.803) .. controls (0.590,2.174) and (0.837,2.065) .. (1.118,1.954) .. controls (1.679,1.731) and (1.328,1.193) .. (1.647,1.057) .. controls (1.638,1.255) and (1.745,2.104) .. (1.168,2.270) .. controls (0.867,2.356) and (0.536,2.280) .. (0.430,1.803) -- cycle;
+ \fill[white!80!brown] (0.44,1.733) .. controls (0.211,2.299) and (1.082,2.188) .. (1.456,1.759) .. controls (1.534,1.637) and (1.480,1.545) .. (1.400,1.566) .. controls (1.265,1.714) and (0.577,2.267) .. (0.44,1.733) -- cycle;
\fill[white!80!brown] (1.6,1.0) circle[radius=0.17];
\end{scope}
\fi
@@ -497,7 +527,7 @@
% Chef hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@chef
\begin{scope}[xshift=-26]
- \fill[\thing@chef,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.08];
+ \fill[\thing@chef,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.08];
\fill[\thing@chef,rotate=-15] (0.07,2.1) rectangle (0.81,2.55);
\fill[\thing@chef] (1.01,2.47) circle[radius=0.17];
\fill[\thing@chef] (1.24,2.35) circle[radius=0.15];
@@ -509,7 +539,7 @@
% graduate hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@graduate
\begin{scope}[xshift=-26]
- \fill[\thing@graduate,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.1];
+ \fill[\thing@graduate,rotate=-15] (0.44,2.1) ellipse[x radius=0.37, y radius=0.1];
\fill[\thing@graduate,rotate=-15] (0.07,2.1) rectangle (0.81,2.3);
\fill[\thing@graduate] (0.3,2.25) -- (1.05,2.35) -- (1.7,1.95) -- (0.92,1.85) -- cycle;
\fill[\thing@tassel,rounded corners=\scalingfactor*1] (1.12,1.89) -- (1.01,2.1) -- (1.09,2.11) -- (1.2,1.9) -- (1.2,1.3) -- (1.12,1.3) -- cycle;
@@ -517,6 +547,20 @@
\end{scope}
\fi
%
+% sombrero %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifthing@sombrero
+ \fill[\thing@sombrero] (-.45,2) to[in=200] (0,2.8) to[out=-20] (.45,2) -- cycle;
+ \fill[\thing@sombrero] (-0.65, 1.75) .. controls (-0.85, 1.7) and (-0.85, 1.9) .. (-0.85, 1.9) .. controls (-0.30, 2.2) and (0.30, 2.2) .. ( 0.85, 1.9) .. controls ( 0.85, 1.9) and (0.85, 1.7) .. ( 0.65, 1.75) .. controls ( 0.30, 1.95) and (-0.30, 1.95) .. (-0.65, 1.75) -- cycle;
+ \draw[\thing@sombrerob,line width=\scalingfactor*0.8pt] (-0.85, 1.9) .. controls (-0.30, 2.2) and (0.30, 2.2) .. ( 0.85, 1.9);
+ \draw[decorate,decoration={zigzag, amplitude=\decoscalefactor*1pt, segment length=\scalingfactor*6pt},\thing@sombreroa, line width=\scalingfactor*1pt] (-0.81, 1.8) .. controls (-0.30, 2.1) and (0.30, 2.1) .. ( 0.82, 1.8);
+ \begin{scope}
+ \clip (-.45,2) to[in=200] (0,2.8) to[out=-20] (.45,2) -- cycle;
+ \draw[decorate,decoration={zigzag, amplitude=\decoscalefactor*1pt, segment length=\scalingfactor*3pt},\thing@sombreroa, line width=\scalingfactor*1pt] (-.4,2.4) to[bend left] (.4,2.4);
+ \fill[decorate,decoration={shape backgrounds,shape=circle, shape size=\scalingfactor*2pt, shape evenly spread=7}, \thing@sombreroc] (-.3,2.6) to[bend left] (.3,2.6);
+ \fill[decorate,decoration={shape backgrounds,shape=circle,shape size=\scalingfactor*2pt,shape evenly spread=9},\thing@sombreroc] (-.4,2.18) to[bend left] (.4,2.18);
+ \end{scope}
+\fi
+%
% alien %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@alien
\fill[\thing@alien,rotate around={15:(-0.175,2.115)}] (-0.2,1.93) rectangle (-0.15,2.3);
@@ -534,8 +578,7 @@
% book %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@book
\begin{scope}[xshift=-25,yshift=1]
- \fill[\thing@bookcolour,rotate=-20]
- (0.40,1.20) rectangle (0.80,0.60);
+ \fill[\thing@bookcolour,rotate=-20] (0.40,1.20) rectangle (0.80,0.60);
\node[rotate=-20*\yscalefactor/\xscalefactor, color=white] at (0.88,0.70) {\thing@book};%
\end{scope}
\fi
@@ -562,7 +605,7 @@
% think bubble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@think
\begin{scope}[xshift=-26]
- \fill[\thing@bubblecolour] (2,2.4) ellipse[x radius=0.7, y radius=0.35];
+ \fill[\thing@bubblecolour] (2,2.4) ellipse[x radius=0.7, y radius=0.35];
\fill[\thing@bubblecolour] (1.55,2.35) circle[radius=0.25] (2.0,2.15) circle[radius=0.25] (2.4,2.25) circle[radius=0.25] (1.6,2.55) circle[radius=0.25] (2.0,2.6) circle[radius=0.25] (2.35,2.5) circle[radius=0.25] (1.65,1.95) circle[radius=0.1] (1.55,1.80) circle[radius=0.06] (1.47,1.70) circle[radius=0.03];
\node at (2,2.4) {\thing@think};
\end{scope}
@@ -579,9 +622,9 @@
\begin{scope}[xshift=-28,yshift=2]
\fill[brown] (1.00,0.60) ellipse[x radius=0.4, y radius=0.2];
\fill[red!70!black] (1.00,0.60) ellipse[x radius=0.34, y radius=0.16];
- \fill[white!85!yellow] (1.15,0.65) ellipse[x radius=0.065, y radius=0.04];
- \fill[white!85!yellow] (0.81,0.57) ellipse[x radius=0.065, y radius=0.04];
- \fill[white!85!yellow] (0.95,0.68) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (1.15,0.65) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (0.81,0.57) ellipse[x radius=0.065, y radius=0.04];
+ \fill[white!85!yellow] (0.95,0.68) ellipse[x radius=0.065, y radius=0.04];
\fill[white!85!yellow] (1.02,0.54) ellipse[x radius=0.065, y radius=0.04];
\fill[green!40!brown] (1.09,0.54) ellipse[x radius=0.07, y radius=0.02];
\fill[green!40!brown,rotate=20] (1.0,0.34) ellipse[x radius=0.07, y radius=0.02];
@@ -589,23 +632,23 @@
\fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
\end{scope}
\fi
-% no pizza %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% not pizza %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@davidlikespineapplepizza
\begin{scope}[xshift=-28,yshift=2]
\fill[brown] (1.00,0.60) ellipse[x radius=0.4, y radius=0.2];
\fill[red!70!black] (1.00,0.60) ellipse[x radius=0.34, y radius=0.16];
- \fill[yellow!70!brown] (1.15,0.65) ellipse[x radius=0.08, y radius=0.06];
- \fill[red!70!black] (1.15,0.65) ellipse[x radius=0.04, y radius=0.03];
- \fill[yellow!70!brown] (0.81,0.57) ellipse[x radius=0.08, y radius=0.06];
- \fill[red!70!black] (0.81,0.57) ellipse[x radius=0.04, y radius=0.03];
- \fill[yellow!70!brown] (0.95,0.68) ellipse[x radius=0.08, y radius=0.06];
- \fill[red!70!black] (0.95,0.68) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (1.15,0.65) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (1.15,0.65) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (0.81,0.57) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (0.81,0.57) ellipse[x radius=0.04, y radius=0.03];
+ \fill[yellow!70!brown] (0.95,0.68) ellipse[x radius=0.08, y radius=0.06];
+ \fill[red!70!black] (0.95,0.68) ellipse[x radius=0.04, y radius=0.03];
\fill[yellow!70!brown] (1.02,0.54) ellipse[x radius=0.08, y radius=0.06];
- \fill[red!70!black] (1.02,0.54) ellipse[x radius=0.04, y radius=0.03];
+ \fill[red!70!black] (1.02,0.54) ellipse[x radius=0.04, y radius=0.03];
\fill[green!40!brown] (1.09,0.54) ellipse[x radius=0.07, y radius=0.02];
\fill[green!40!brown,rotate=20] (1.0,0.34) ellipse[x radius=0.07, y radius=0.02];
\fill[green!40!brown,rotate=-20] (0.9,1.05) ellipse[x radius=0.07, y radius=0.02];
- \fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
+ \fill[green!40!brown] (1.00,0.60) ellipse[x radius=0.03, y radius=0.06];
\end{scope}
\fi
%
@@ -645,7 +688,7 @@
\fill[\thing@cone,rotate=-20] (0.35,1.20)--(0.50,0.60)--(0.75,1.20);
\fill[\thing@flavoura] (0.85,1.03) circle[radius=0.12];
\fill[\thing@flavourb] (1.05,0.95) circle[radius=0.12];
- \fill[\thing@flavourc] (0.95,1.1) circle[radius=0.12];
+ \fill[\thing@flavourc] (0.95,1.1) circle[radius=0.12];
\end{scope}
\fi
%
@@ -655,7 +698,7 @@
\fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
\fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
\begin{scope}
- \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
+ \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
\fill[cyan!10!white, rotate=-10] (0.8,0.94) ellipse[x radius=0.18, y radius=0.4];
\fill[\thing@milkshake, rotate=-10] (0.8,0.94) ellipse[x radius=0.15, y radius=0.36];
\end{scope}
@@ -663,7 +706,7 @@
\fill[red!90!black] (1.0,1.1) circle[radius=0.05];
\fill[white!85!yellow] (0.94,1.05) circle[radius=0.05] (1.03,1.03) circle[radius=0.05];
\fill[cyan!10!white, rotate=-10] (0.8,0.50) ellipse[x radius=0.17, y radius=0.05];
- \fill[red!90!black,rotate=20] (1.2,0.58) rectangle (1.22,0.85);
+ \fill[red!90!black,rotate=20] (1.2,0.58) rectangle (1.22,0.85);
\end{scope}
\fi
%
@@ -674,11 +717,11 @@
\fill[cyan!10!white, rotate=-10] (0.8,0.55) ellipse[x radius=0.12, y radius=0.03];
\fill[cyan!10!white, rotate=-10] (0.8,0.7) ellipse[x radius=0.03, y radius=0.2];
\begin{scope}
- \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
+ \clip[rotate=-10] (0.58,0.5) rectangle (1.02,1.03);
\fill[cyan!10!white, rotate=-10] (0.8,1.1) ellipse[x radius=0.18, y radius=0.4];
\end{scope}
\begin{scope}
- \clip[rotate=-10] (0.58,0.5) rectangle (1.02,0.87);
+ \clip[rotate=-10] (0.58,0.5) rectangle (1.02,0.87);
\fill[\thing@wine, rotate=-10] (0.8,1.1) ellipse[x radius=0.15, y radius=0.36];
\end{scope}
\end{scope}
@@ -697,6 +740,19 @@
\end{scope}
\fi
%
+% banana %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifthing@banana
+ \begin{scope}[yshift=27, xshift=7,rotate=25]
+ \fill[\thing@banana!30!] (0.02,0) .. controls (0.21,0.20) and (0.21,0.40) .. (0.02,0.6) arc [start angle=60,end angle=120, radius =0.04] .. controls (0.07,0.40) and (0.07,0.20) .. (-0.02,0) --cycle ;
+ %peel
+ \begin{scope}
+ \clip (-0.04,-0.01) rectangle (0.20,0.3);
+ \fill[\thing@banana] (0.03,0) .. controls (0.22,0.20) and (0.22,0.40) .. (0.03,0.6) arc [start angle=60,end angle=120, radius =0.06] .. controls (0.06,0.40) and (0.06,0.20) .. (-0.03,0);
+ \end{scope}
+ \fill[\thing@banana!60!] (0.12,0.3) arc [start angle=140, end angle=-100, y radius=0.20, x radius=0.06] arc [start angle=-90, end angle=90, y radius=0.15, x radius=0.02] (0.12,0.3) arc [start angle=60, end angle=270, y radius=0.15, x radius=0.1] arc [start angle=270, end angle=90, y radius=0.13, x radius=0.04];
+ \end{scope}
+\fi
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Sport
@@ -740,7 +796,7 @@
\ifthing@crystalball
\shade[ball color=\thing@crystalball,opacity=0.7] (0,0.8) circle[radius=0.33];
\fi
-%
+%
% magic wand %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@magicwand
\begin{scope}[xshift=-16,yshift=2]
@@ -768,51 +824,36 @@
% torch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@torch
\begin{scope}[xshift=-26]
- \fill[red!50!yellow]
- (1.4338,1.025) .. controls (1.4308,0.8877) and (1.3468,0.8997) ..
- (1.2447,0.748) .. controls (1.1427,0.8982) and (1.0721,0.8892) ..
- (1.0646,1.024) .. controls (1.0541,1.1714) and (1.2642,1.1654) ..
- (1.2492,1.386) .. controls (1.3093,1.3110) and (1.4383,1.2705) ..
- (1.4338,1.025) -- cycle;
- \fill[red!25!yellow, scale=0.67, xshift=17, yshift=15]
- (1.4338,1.025) .. controls (1.4308,0.8877) and (1.3468,0.8997) ..
- (1.2447,0.748) .. controls (1.1427,0.8982) and (1.0721,0.8892) ..
- (1.0646,1.024) .. controls (1.0541,1.1714) and (1.2642,1.1654) ..
- (1.2492,1.386) .. controls (1.3093,1.3110) and (1.4383,1.2705) ..
- (1.4338,1.025) -- cycle;
- \fill[white!50!yellow, scale=0.4, xshift=53.5, yshift=45.3]
- (1.4338,1.025) .. controls (1.4308,0.8877) and (1.3468,0.8997) ..
- (1.2447,0.748) .. controls (1.1427,0.8982) and (1.0721,0.8892) ..
- (1.0646,1.024) .. controls (1.0541,1.1714) and (1.2642,1.1654) ..
- (1.2492,1.386) .. controls (1.3093,1.3110) and (1.4383,1.2705) ..
- (1.4338,1.025) -- cycle;
+ \fill[red!50!yellow] (1.4338,1.025) .. controls (1.4308,0.8877) and (1.3468,0.8997) .. (1.2447,0.748) .. controls (1.1427,0.8982) and (1.0721,0.8892) .. (1.0646,1.024) .. controls (1.0541,1.1714) and (1.2642,1.1654) .. (1.2492,1.386) .. controls (1.3093,1.3110) and (1.4383,1.2705) .. (1.4338,1.025) -- cycle;
+ \fill[red!25!yellow, scale=0.67, xshift=17, yshift=15] (1.4338,1.025) .. controls (1.4308,0.8877) and (1.3468,0.8997) .. (1.2447,0.748) .. controls (1.1427,0.8982) and (1.0721,0.8892) .. (1.0646,1.024) .. controls (1.0541,1.1714) and (1.2642,1.1654) .. (1.2492,1.386) .. controls (1.3093,1.3110) and (1.4383,1.2705) .. (1.4338,1.025) -- cycle;
+ \fill[white!50!yellow, scale=0.4, xshift=53.5, yshift=45.3] (1.4338,1.025) .. controls (1.4308,0.8877) and (1.3468,0.8997) .. (1.2447,0.748) .. controls (1.1427,0.8982) and (1.0721,0.8892) .. (1.0646,1.024) .. controls (1.0541,1.1714) and (1.2642,1.1654) .. (1.2492,1.386) .. controls (1.3093,1.3110) and (1.4383,1.2705) .. (1.4338,1.025) -- cycle;
\fill[\thing@torch,rounded corners=\scalingfactor*1]
(1.1,0.96) -- (0.77,0.25) -- (0.83,0.25) -- (1.3,0.86) -- cycle;
\fill[\thing@torch,rotate=-28] (0.62,1.32) ellipse[x radius=0.2, y radius=0.08];
\end{scope}
\fi%
-%
+%
% basket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@basket
\begin{scope}[xshift=-28.5]
\fill[\thing@basket, start angle=180, end angle=360, x radius=0.35, y radius=0.35] (0.65,0.61) arc -- cycle;
\fill[\thing@basket, start angle=180, end angle=0, even odd rule] [x radius=0.35, y radius=0.5] (0.65,0.6) arc -- cycle [x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle;
- \fill[\thing@basket, even odd rule] (1,0.6) ellipse[x radius=0.35, y radius=0.1] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
+ \fill[\thing@basket, even odd rule] (1,0.6) ellipse[x radius=0.35, y radius=0.1] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
\fill[\thing@basket!75!black] (1,0.6) ellipse[x radius=0.3, y radius=0.07];
- \end{scope}
-\fi%
+ \end{scope}
+\fi%
%
% easter basket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@easter
\begin{scope}[xshift=-28.5]
\begin{scope}
- \clip [start angle=180, end angle=0, x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle [start angle=180, end angle=360, x radius=0.3, y radius=0.07] (0.7,0.6) arc -- cycle;
+ \clip [start angle=180, end angle=0, x radius=0.3, y radius=0.45] (0.7,0.6) arc -- cycle [start angle=180, end angle=360, x radius=0.3, y radius=0.07] (0.7,0.6) arc -- cycle;
\fill[\thing@eggb, rotate=-5] (0.95,0.72) ellipse[x radius=0.09, y radius=0.13];
\fill[\thing@egga, rotate=10] (0.94,0.42) ellipse[x radius=0.09, y radius=0.13];
\fill[\thing@eggc, rotate=-30] (0.7,1.08) ellipse[x radius=0.09, y radius=0.13];
\end{scope}
- \end{scope}
-\fi%
+ \end{scope}
+\fi%
%
% crozier %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifthing@crozier
@@ -821,7 +862,7 @@
\clip [rotate=-20] (0.6,2.3) rectangle (1.1,1.999);
\fill[even odd rule,\thing@crozier] (1.5,1.6) circle[radius=0.2] (1.5,1.6) circle[radius=0.1];
\end{scope}
- \fill[\thing@crozier,rotate=-20] (0.663,0.5) rectangle (0.763,2.0);
+ \fill[\thing@crozier,rotate=-20] (0.663,0.5) rectangle (0.763,2.0);
\end{scope}
\fi
%
@@ -877,4 +918,38 @@
\fill[\thing@handbag!70!black] (0.4143, 0.4354) .. controls (0.5139, 0.9811) and (0.1204, 1.0719) .. (0.0134, 0.5155) -- (0.0957, 0.4996) .. controls (0.1753, 0.8952) and (0.3949, 0.8883) .. (0.3324, 0.4536) -- cycle;
\fi
%
+% stick %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ifthing@stick
+ \begin{scope}[rotate=-30,yshift=26,xshift=-7]
+ %leaf
+ \begin{scope}[rotate=60, xshift=8.2,yshift=8.1]
+ \fill[\thing@leaf] (-0.01,0) .. controls (-0.1,0) and (-0.02, 0.2) .. (0,0.2) .. controls (0.02, 0.2) and (0.1,0) .. (0.01,0.0);
+ \path[clip] (-0.04,-0.04)-- (-0.01,0) .. controls (-0.1,0) and (-0.02, 0.2) .. (0,0.2) .. controls (0.02, 0.2) and (0.1,0) .. (0.01,0)-- (0.04,-0.04) --cycle;
+ \draw[\thing@leaf!80!, line width=0.1] (0,-0.04) -- (0,0.2) \foreach \i in {0.02,0.04,...,0.2} {(0,\i) -- ++(0.1,\i) (0,\i) -- ++(-0.1,\i)} ;
+ \end{scope}
+ %stick itself
+ \fill[\thing@stick!90!red] (-0.04,0.8) -- (-0.04,0.4) arc[start angle=345,end angle=270,radius=0.03] -- ++(0,-0.01) arc[start angle=90,end angle=15,radius=0.03] -- (-0.04,0) arc [start angle=180, end angle=360 ,x radius=0.04, y radius=0.02] -- (0.04, 0.4) arc [start angle=180, end angle=120, radius=0.08] arc [start angle=-90, end angle=90, x radius=0.02, y radius=0.04] arc [start angle=240, end angle=180, radius=0.08] -- (0.04,0.75) arc [start angle=0, end angle=120 ,x radius=0.04, y radius=0.02] --cycle;
+ \fill[\thing@stick!90!] (0.08, 0.51) ellipse [x radius=0.02, y radius=0.04] (0,0.75) ellipse [x radius=0.04, y radius=0.02] ;
+ \draw[\thing@stick!90!red, line width=0.06] (0.08, 0.51) ellipse [x radius=0.016, y radius=0.032]
+ ellipse [x radius=0.012, y radius=0.024] ellipse [x radius=0.008, y radius=0.016] (0,0.75) ellipse [y radius=0.016, x radius=0.032] ellipse [y radius=0.012, x radius=0.024] ellipse [y radius=0.008, x radius=0.016] ;
+ \fill[\thing@stick!90!red] (0.08, 0.51) ellipse [x radius=0.004, y radius=0.008] (0,0.75) ellipse [x radius=0.008, y radius=0.004];
+ \end{scope}
+\fi
+%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Random items
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\pgfmathdeclarerandomlist{head}{\thing@listhead}
+\pgfmathdeclarerandomlist{accessories}{\thing@listacces}
+
+\def\shufflethings{%
+ \pgfmathrandomitem{\head}{head}%
+ \edef\randomhead{\head}%
+ \pgfmathrandomitem{\accessories}{accessories}%
+ \edef\randomaccessories{\accessories}%
}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty b/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty
index 6e2b75b30e..a8dfafb0b6 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-anteaters.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-anteaters}[2022/06/17 version v1.0 Drawing anteaters in TikZ]
+\ProvidesPackage{tikzlings-anteaters}[2025/01/05 version v2.2 Drawing anteaters in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -31,6 +31,8 @@
\newif\ifanteater@threeD
\newif\ifanteater@back
\newif\ifanteater@contour
+\newif\ifanteater@leftstep
+\newif\ifanteater@rightstep
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -48,24 +50,28 @@
body/.store in = \anteater@body,
body = red!55!green!75!blue!66!white,
eye/.store in = \anteater@eye,
- eye = \anteater@body!70!brown!50!darkgray,
+ eye = \anteater@body!70!brown!50!darkgray,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \anteater@threeDtrue,
- back/.code = \anteater@backtrue,
+ 3D/.code = \anteater@threeDtrue,
+ leftstep/.code = \anteater@leftsteptrue,
+ left step/.forward to = /anteater/leftstep,
+ rightstep/.code = \anteater@rightsteptrue,
+ right step/.forward to = /anteater/rightstep,
+ back/.code = \anteater@backtrue,
contour/.code = \anteater@contourtrue
\def\anteater@contour{#1},
- contour/.default = black,
- outline/.forward to = /anteater/contour,
+ contour/.default = black,
+ outline/.forward to = /anteater/contour,
}
\def\anteater@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.75,0.1) rectangle (1.12,2.26);
@@ -83,7 +89,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -101,16 +107,25 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname anteaterhookbackground\endcsname
\csname tikzlinghookbackground\endcsname
- %
+ %
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \ifanteater@leftstep
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
+ %
+ \ifanteater@rightstep
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
%
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifanteater@back
@@ -125,9 +140,8 @@
%
% Collar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifanteater@back
- \anteater@part@draw[\anteater@body!45!white!95!orange] (-0,1.47) ellipse [x radius=0.36, y radius=0.28];
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray]
- (-0,1.47) ellipse [x radius=0.35, y radius=0.23];
+ \anteater@part@draw[\anteater@body!45!white!95!orange] (-0,1.47) ellipse [x radius=0.36, y radius=0.28];
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0,1.47) ellipse [x radius=0.35, y radius=0.23];
\else% back
\anteater@part@draw[\anteater@body!45!white!95!orange] (0.33, 1.55) -- (-0.33, 1.55) .. controls (-0.5, 1.05) and (-0.1, 0.95) .. (0, 0.60) .. controls (0.1, 0.95) and (0.5, 1.05) .. (0.33, 1.55) -- cycle;
\anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.33, 1.55) -- (-0.33, 1.55) .. controls (-0.45, 1.1) and (-0.1, 1) .. (0, 0.70) .. controls (0.1, 1) and (0.45, 1.1) .. (0.33, 1.55) -- cycle;
@@ -136,15 +150,15 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname anteaterhookbelly\endcsname
\csname tikzlinghookbelly\endcsname
- %
+ %
\ifanteater@back
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\anteater@part@draw[\anteater@body] (-0,1.73) ellipse [x radius=0.36, y radius=0.33];
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.5551, 2.2281) .. controls (0.4961, 2.2273) and (0.4390, 2.2093) .. (0.3831, 2.1919) .. controls (0.3282, 2.173) and (0.2725, 2.1539) .. (0.2231, 2.1228) .. controls (0.1875, 2.0984) and (0.1524, 2.0637) .. (0.1470, 2.0187) .. controls (0.1446, 2.0028) and (0.1518, 1.9881) .. (0.1584, 1.9744) .. controls (0.1706, 1.9343) and (0.2090, 1.9063) .. (0.25, 1.9017) .. controls (0.3079, 1.8943) and (0.3684, 1.9134) .. (0.4132, 1.9504) .. controls (0.4657, 1.9988) and (0.5111, 2.0545) .. (0.5513, 2.1133) .. controls (0.5692, 2.1404) and (0.5854, 2.1692) .. (0.5945, 2.2004) .. controls (0.5989, 2.2232) and (0.5717, 2.2282) .. (0.5551, 2.2281) -- cycle;
- \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.5551, 2.2281) .. controls (-0.4961, 2.2273) and (-0.4390, 2.2093) .. (-0.3831, 2.1919) .. controls (-0.3282, 2.173) and (-0.2725, 2.1539) .. (-0.2231, 2.1228) .. controls (-0.1875, 2.0984) and (-0.1524, 2.0637) .. (-0.1470, 2.0187) .. controls (-0.1446, 2.0028) and (-0.1518, 1.9881) .. (-0.1584, 1.9744) .. controls (-0.1706, 1.9343) and (-0.2090, 1.9063) .. (-0.25, 1.9017) .. controls (-0.3079, 1.8943) and (-0.3684, 1.9134) .. (-0.4132, 1.9504) .. controls (-0.4657, 1.9988) and (-0.5111, 2.0545) .. (-0.5513, 2.1133) .. controls (-0.5692, 2.1404) and (-0.5854, 2.1692) .. (-0.5945, 2.2004) .. controls (-0.5989, 2.2232) and (-0.5717, 2.2282) .. (-0.5551, 2.2281) -- cycle;
- %
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0.5551, 2.2281) .. controls (0.4961, 2.2273) and (0.4390, 2.2093) .. (0.3831, 2.1919) .. controls (0.3282, 2.173) and (0.2725, 2.1539) .. (0.2231, 2.1228) .. controls (0.1875, 2.0984) and (0.1524, 2.0637) .. (0.1470, 2.0187) .. controls (0.1446, 2.0028) and (0.1518, 1.9881) .. (0.1584, 1.9744) .. controls (0.1706, 1.9343) and (0.2090, 1.9063) .. (0.25, 1.9017) .. controls (0.3079, 1.8943) and (0.3684, 1.9134) .. (0.4132, 1.9504) .. controls (0.4657, 1.9988) and (0.5111, 2.0545) .. (0.5513, 2.1133) .. controls (0.5692, 2.1404) and (0.5854, 2.1692) .. (0.5945, 2.2004) .. controls (0.5989, 2.2232) and (0.5717, 2.2282) .. (0.5551, 2.2281) -- cycle;
+ \anteater@part@draw[\anteater@body!70!brown!50!darkgray] (-0.5551, 2.2281) .. controls (-0.4961, 2.2273) and (-0.4390, 2.2093) .. (-0.3831, 2.1919) .. controls (-0.3282, 2.173) and (-0.2725, 2.1539) .. (-0.2231, 2.1228) .. controls (-0.1875, 2.0984) and (-0.1524, 2.0637) .. (-0.1470, 2.0187) .. controls (-0.1446, 2.0028) and (-0.1518, 1.9881) .. (-0.1584, 1.9744) .. controls (-0.1706, 1.9343) and (-0.2090, 1.9063) .. (-0.25, 1.9017) .. controls (-0.3079, 1.8943) and (-0.3684, 1.9134) .. (-0.4132, 1.9504) .. controls (-0.4657, 1.9988) and (-0.5111, 2.0545) .. (-0.5513, 2.1133) .. controls (-0.5692, 2.1404) and (-0.5854, 2.1692) .. (-0.5945, 2.2004) .. controls (-0.5989, 2.2232) and (-0.5717, 2.2282) .. (-0.5551, 2.2281) -- cycle;
+ %
\else% back
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -154,19 +168,18 @@
(-0.4086, 1.9465) .. controls (-0.4679, 1.9952) and (-0.6205, 2.1813) .. (-0.5862, 2.2146) .. controls (-0.5517, 2.2477) and (-0.3434, 2.1152) .. (-0.2841, 2.0665) .. controls (-0.2249, 2.0177) and (-0.2048, 1.9515) .. (-0.2391, 1.9184) .. controls (-0.2736, 1.8853) and (-0.3494, 1.8979) .. (-0.40861, 1.9465) -- cycle;
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \anteater@part@draw[\anteater@body]
- (0.33, 1.71) .. controls (0.16, 1.52) and (0.1, 1.5) .. (0.08, 1.05) .. controls (0.07, 1) and (-0.07, 1) .. (-0.08, 1.05) .. controls (-0.1, 1.5) and (-0.16, 1.52) .. (-0.33, 1.7) .. controls (-0.45, 1.85) and (-0.22, 2.05) .. (0, 2.05) .. controls (0.22, 2.05) and (0.45, 1.85) .. (0.33, 1.7) -- cycle;
+ \anteater@part@draw[\anteater@body] (0.33, 1.71) .. controls (0.16, 1.52) and (0.1, 1.5) .. (0.08, 1.05) .. controls (0.07, 1) and (-0.07, 1) .. (-0.08, 1.05) .. controls (-0.1, 1.5) and (-0.16, 1.52) .. (-0.33, 1.7) .. controls (-0.45, 1.85) and (-0.22, 2.05) .. (0, 2.05) .. controls (0.22, 2.05) and (0.45, 1.85) .. (0.33, 1.7) -- cycle;
%
% Cheeks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\anteater@part@draw[\anteater@body!45!white!95!orange] (0.3508, 1.739) .. controls (0.3508, 1.739) and (0.2861, 1.8489) .. (0.1571, 1.7664) .. controls (0.0279, 1.684) and (0.0627, 1.0524) .. (0.0627, 1.0524) .. controls (0.0627, 1.0524) and (0.131, 1.3772) .. (0.2314, 1.44) .. controls (0.3599, 1.5206) and (0.3508, 1.739) .. (0.3508, 1.739) -- cycle
(-0.3508, 1.739) .. controls (-0.3508, 1.739) and (-0.2861, 1.8489) .. (-0.1571, 1.7664) .. controls (-0.0279, 1.684) and (-0.0627, 1.0524) .. (-0.0627, 1.0524) .. controls (-0.0627, 1.0524) and (-0.131, 1.3772) .. (-0.2314, 1.44) .. controls (-0.3599, 1.5206) and (-0.3508, 1.739) .. (-0.3508, 1.739) -- cycle;
- %
+ %
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\anteater@part@draw[\anteater@body!70!brown!50!darkgray] (0, 1.08) ellipse[x radius=0.08, y radius=0.05];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\anteater@part@draw[\anteater@eye] (0.23, 1.7) circle[radius=0.05];
- \anteater@part@draw[\anteater@eye] (-0.23, 1.7) circle[radius=0.05];
+ \anteater@part@draw[\anteater@eye] (-0.23, 1.7) circle[radius=0.05];
\fi% back
%
% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -177,7 +190,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname anteaterhookbody\endcsname
\csname tikzlinghookbody\endcsname
- %
+ %
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -190,41 +203,47 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-anteaters}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-anteaters}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic anteater}}
%\anteater
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic anteater can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\anteater[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of the eyes can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\anteater[eye=red]
%\end{tcblisting}
%
+%And the anteater can lift its legs:
+%\begin{tcblisting}{title={Walking}}
+%\anteater[leftstep]
+%\anteater[rightstep,xshift=2cm]
+%\end{tcblisting}
+%
%To view the anteater from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\anteater[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the anteater 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the anteater 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\anteater[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\anteater[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-apes.sty b/graphics/pgf/contrib/tikzlings/tikzlings-apes.sty
new file mode 100644
index 0000000000..58edf5c636
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-apes.sty
@@ -0,0 +1,401 @@
+ % !TeX root = ./examples/ape.tex
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See https://www.latex-project.org/lppl.txt
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{tikzlings-apes}[2025/01/05 version v2.2 Drawing apes in TikZ]
+
+\RequirePackage{tikz}
+\RequirePackage{tikzlings-addons}
+
+\newcommand*{\ape}[1][]{%
+ \begin{scope}%
+ \tikzset{/ape/.cd,#1}%
+ \ape@draw%
+ \end{scope}%
+ \thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname apehookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+}
+
+\newif\ifape@threeD
+\newif\ifape@handposition@hearnoevil
+\newif\ifape@handposition@seenoevil
+\newif\ifape@handposition@speaknoevil
+\newif\ifape@handposition@clap
+\newif\ifape@handposition@waving
+\newif\ifape@back
+\newif\ifape@contour
+\newif\ifape@openmouth
+
+\tikzset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Pass unknown keys on to tikz
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ /ape/.search also={/tikz,/pgf,/thing},
+ /ape/.cd,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % body
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ body/.store in = \ape@body,
+ body = red!15!brown!80!black,
+ eye/.store in = \ape@eye,
+ eye = \ape@body!40!black,
+ eyes/.forward to = /ape/eye,
+ skin/.store in = \ape@skin,
+ skin = \ape@body!50!gray,
+ nose/.store in = \ape@nose,
+ nose = \ape@skin!60!black,
+ mouth/.store in = \ape@mouth,
+ mouth = \ape@skin!50!black,
+ muzzle/.store in = \ape@muzzle,
+ muzzle = \ape@skin!80!white,
+ legs/.store in = \ape@legs,
+ legs = \ape@body!90!black,
+ arms/.store in = \ape@arms,
+ arms = \ape@body!95!black,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % options
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ 3D/.code = \ape@threeDtrue,
+ handposition/.code = \csname ape@handposition@#1true\endcsname,
+ kikazaru/.code = \ape@handposition@hearnoeviltrue,
+ mizaru/.code = \ape@handposition@seenoeviltrue,
+ iwazaru/.code = \ape@handposition@speaknoeviltrue,
+ %clap/.code = \ape@handposition@claptrue, %%% should we support this too?
+ %waving/.code = \ape@handposition@wavingtrue, %%% should we support this too?
+ hearnoevil/.code = \ape@handposition@hearnoeviltrue,
+ seenoevil/.code = \ape@handposition@seenoeviltrue,
+ speaknoevil/.code = \ape@handposition@speaknoeviltrue,
+ back/.code = \ape@backtrue,
+ openmouth/.code = \ape@openmouthtrue,
+ open mouth/.forward to = /ape/openmouth,
+ contour/.code = \ape@contourtrue
+ \def\ape@contour{#1}
+ \def\ape@mouth{#1},
+ contour/.default = black,
+ outline/.forward to = /ape/contour,
+}
+
+\def\ape@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \path (-1.435,0.1) rectangle (1.435, 2.27);
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifape@threeD
+ \def\ape@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifape@contour
+ \def\ape@part@draw[##1]{\draw[##1,\ape@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\ape@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname apehookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ % Draw backside partially in reversed order %%%%%%%%%%%%%%%%%%%%%%%%
+ \ifape@back
+ % arms / hand for hear-no-evil pose backside %%%%%%%%%%%%%%%%%%%%%
+ \ifape@handposition@hearnoevil%
+ \ape@part@draw[\ape@skin!90!white] (-0.45,1.9) ellipse [x radius=0.3, y radius=0.1,rotate=80];
+ \ape@part@draw[\ape@arms] (-0.55,1.73) {[rotate=-20] arc [start angle=35, end angle=350,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (-0.9,1.61) ellipse[x radius=0.15, y radius=0.6, rotate=-125];
+ \ape@part@draw[\ape@skin!90!white] (0.45,1.9) ellipse [x radius=0.3, y radius=0.1,rotate=100];
+ \ape@part@draw[\ape@arms] (0.55,1.73) {[rotate=20] arc [start angle=145, end angle=-170,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.9,1.61) ellipse[x radius=0.15, y radius=0.6, rotate=125];
+ % see-no-evil pose backside %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else\ifape@handposition@seenoevil%
+ \ape@part@draw[\ape@skin!90!white] (-0.325,1.91) ++(390:0.3 and 0.1) arc [start angle=390, end angle=150,x radius=0.3, y radius=0.1] {[rotate=10] arc [start angle=150, end angle=-60,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (-0.59,1.97) arc [start angle=25, end angle=335,x radius=0.475, y radius=0.15] --cycle;
+ \ape@part@draw[\ape@arms] (-0.93,1.70) ellipse[x radius=0.15, y radius=0.6, rotate=70];
+ \ape@part@draw[\ape@skin!90!white] (0.325,1.91) ++(150:0.3 and 0.1) arc [start angle=150, end angle=390,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=30, end angle=240,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (0.59,1.97) arc [start angle=155, end angle=-155,x radius=0.475, y radius=0.15] --cycle;
+ \ape@part@draw[\ape@arms] (0.93,1.70) ellipse[x radius=0.15, y radius=0.6, rotate=110];
+ % speak-no-evil pose backside %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else\ifape@handposition@speaknoevil%
+ \ape@part@draw[\ape@arms] (-0.85,1.55) ellipse[x radius=0.15, y radius=0.6, rotate=-100];
+ \ape@part@draw[\ape@skin!90!white] (-0.275,1.46) ++(390:0.3 and 0.1) arc [start angle=390, end angle=150,x radius=0.3, y radius=0.1] {[rotate=10] arc [start angle=150, end angle=-60,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (-0.53,1.52) {[rotate=-10] arc [start angle=15, end angle=335,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.85,1.55) ellipse[x radius=0.15, y radius=0.6, rotate=100];
+ \ape@part@draw[\ape@skin!90!white] (0.275,1.46) ++(150:0.3 and 0.1) arc [start angle=150, end angle=390,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=30, end angle=240,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (0.53,1.52) {[rotate=10] arc [start angle=165, end angle=-155,x radius=0.475, y radius=0.15]} --cycle;
+ % clapping hand pose backside %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else\ifape@handposition@clap%
+ \ape@part@draw[\ape@skin!90!white] (-0.115,2.85) ellipse [x radius=0.3, y radius=0.1,rotate=80];
+ \ape@part@draw[\ape@arms] (-0.23,2.65) {[rotate=10] arc [start angle=35, end angle=350,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (-0.75,1.95) ellipse[x radius=0.15, y radius=0.6, rotate=30];
+ \ape@part@draw[\ape@skin!90!white] (0.115,2.85) ellipse [x radius=0.3, y radius=0.1,rotate=100];
+ \ape@part@draw[\ape@arms] (0.23,2.65) {[rotate=-10] arc [start angle=145, end angle=-170,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.75,1.95) ellipse[x radius=0.15, y radius=0.6, rotate=150];
+ % waving left hand pose backside %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else\ifape@handposition@waving%
+ \ape@part@draw[\ape@arms] (-0.53,1.115) {[rotate=5] arc [start angle=25, end angle=335,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (-0.9,1.25) ellipse[x radius=0.15, y radius=0.6, rotate=-60];
+ \ape@part@draw[\ape@skin!90!white] (0.97,3.2) ++(390:0.3 and 0.1) {[rotate=90] arc [start angle=390, end angle=150,x radius=0.3, y radius=0.1] {[rotate=10] arc [start angle=150, end angle=-60,x radius=0.15, y radius=0.03] } -- cycle};
+ \ape@part@draw[\ape@arms] (1.35,2.74) {[rotate=100] arc [start angle=335, end angle=25,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.93,1.70) ellipse[x radius=0.15, y radius=0.6, rotate=-70];
+ % default pose backside %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else
+ \ape@part@draw[\ape@arms] (-0.53,1.115) {[rotate=5] arc [start angle=25, end angle=335,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (-0.9,1.25) ellipse[x radius=0.15, y radius=0.6, rotate=-60];
+ \ape@part@draw[\ape@arms] (0.53,1.115) {[rotate=-5] arc [start angle=155, end angle=-155,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.9,1.25) ellipse[x radius=0.15, y radius=0.6, rotate=60];
+ \fi\fi\fi\fi\fi
+ %
+ % legs / feet backside %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ape@part@draw[\ape@skin] (1.2,0.27) ++(210:0.3 and 0.1) {[rotate=180] arc [start angle=210, end angle=-30,x radius=0.3, y radius=0.1] {[rotate=10] arc [start angle=-30, end angle=-240,x radius=0.15, y radius=0.03]}-- cycle};
+ \ape@part@draw[\ape@legs] (0.7,0.67) ellipse[x radius=0.15, y radius=0.6, rotate=-30];
+ \ape@part@draw[\ape@legs] (0.52,0.68) ellipse[x radius=0.15, y radius=0.7, rotate=-45];
+ \ape@part@draw[\ape@skin] (-1.2,0.27) ++(-30:0.3 and 0.1) {[rotate=180] arc [start angle=-30, end angle=210,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=210, end angle=420,x radius=0.15, y radius=0.03]}-- cycle};
+ \ape@part@draw[\ape@legs] (-0.7,0.67) ellipse[x radius=0.15, y radius=0.6, rotate=30];
+ \ape@part@draw[\ape@legs] (-0.52,0.68) ellipse[x radius=0.15, y radius=0.7, rotate=45];
+ %
+ % head backside %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ape@part@draw[\ape@body] (0, 1.76) circle[x radius=0.4,y radius=0.5];
+ \fi% back
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ape@part@draw[\ape@body] ( 0.5, 0.8 ) .. controls ( 0.5 , 0.4) and ( 0.35, 0.17) .. ( 0.0, 0.17) .. controls (-0.35, 0.17) and (-0.5 , 0.4) .. (-0.5, 0.8 ) .. controls (-0.9 , 1.6) and (-0.4, 1.65) .. ( 0.0, 1.65) .. controls ( 0.4, 1.65) and ( 0.9 , 1.6) .. ( 0.5, 0.8) -- cycle;
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname apehookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifape@back
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ape@part@draw[\ape@body] (0, 1.76) circle[x radius=0.4,y radius=0.5];
+ \ape@part@draw[\ape@skin] (0, 1.76) circle[x radius=0.32,y radius=0.40];
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ape@part@draw[\ape@eye] (-0.08, 1.9) ellipse[x radius=0.04, y radius=0.04];
+ \ape@part@draw[\ape@eye] (0.08, 1.9) ellipse[x radius=0.04, y radius=0.04];
+ %
+ % muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ape@part@draw[\ape@muzzle] (0, 1.55) ellipse[x radius=0.28, y radius=0.2];
+ %
+ % mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifape@openmouth
+ \ifape@threeD
+ \fill[\ape@mouth] (0,1.5) ellipse[x radius=0.05,y radius=0.07];
+ \else
+ \ape@part@draw[\ape@mouth] (0,1.5) ellipse[x radius=0.05,y radius=0.07];
+ \fi
+ \else
+ \draw[\ape@mouth,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
+ \fi
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifape@threeD
+ \fill[\ape@nose] (-0.03, 1.63) ellipse[x radius=0.025, y radius=0.035, rotate=30 ];
+ \fill[\ape@nose] (0.03, 1.63) ellipse[x radius=0.025, y radius=0.035, rotate=-30 ];
+ \else
+ \ape@part@draw[\ape@nose] (-0.03, 1.63) ellipse[x radius=0.025, y radius=0.035, rotate=30 ];
+ \ape@part@draw[\ape@nose] (0.03, 1.63) ellipse[x radius=0.025, y radius=0.035, rotate=-30 ];
+ \fi
+ %
+ % Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ape@part@draw[\ape@skin] (0.675,0.2) ++(-30:0.3 and 0.1) arc [start angle=-30, end angle=210,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=210, end angle=420,x radius=0.15, y radius=0.03]}-- cycle;
+ \ape@part@draw[\ape@skin] (-0.675,0.2) ++(210:0.3 and 0.1) arc [start angle=210, end angle=-30,x radius=0.3, y radius=0.1] {[rotate=10] arc [start angle=-30, end angle=-240,x radius=0.15, y radius=0.03]}-- cycle;
+ %
+ % Legs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ape@part@draw[\ape@legs] (0.52,0.68) ellipse[x radius=0.15, y radius=0.7, rotate=-45];
+ \ape@part@draw[\ape@legs] (0.7,0.67) ellipse[x radius=0.15, y radius=0.6, rotate=-30];
+ \ape@part@draw[\ape@legs] (-0.52,0.68) ellipse[x radius=0.15, y radius=0.7, rotate=45];
+ \ape@part@draw[\ape@legs] (-0.7,0.67) ellipse[x radius=0.15, y radius=0.6, rotate=30];
+ %
+ % hear-no-evil pose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifape@handposition@hearnoevil
+ \ape@part@draw[\ape@arms] (-0.9,1.61) ellipse[x radius=0.15, y radius=0.6, rotate=-125];
+ \ape@part@draw[\ape@skin!90!white] (-0.45,1.9) ellipse [x radius=0.3, y radius=0.1,rotate=80];
+ \ape@part@draw[\ape@arms] (-0.55,1.73) {[rotate=-20] arc [start angle=35, end angle=350,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.9,1.61) ellipse[x radius=0.15, y radius=0.6, rotate=125];
+ \ape@part@draw[\ape@skin!90!white] (0.45,1.9) ellipse [x radius=0.3, y radius=0.1,rotate=100];
+ \ape@part@draw[\ape@arms] (0.55,1.73) {[rotate=20] arc [start angle=145, end angle=-170,x radius=0.475, y radius=0.15]} --cycle;
+ % see-no-evil pose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else\ifape@handposition@seenoevil
+ \ape@part@draw[\ape@arms] (-0.93,1.70) ellipse[x radius=0.15, y radius=0.6, rotate=70];
+ \ape@part@draw[\ape@skin!90!white] (-0.325,1.91) ++(390:0.3 and 0.1) arc [start angle=390, end angle=150,x radius=0.3, y radius=0.1] {[rotate=10] arc [start angle=150, end angle=-60,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (-0.59,1.97) arc [start angle=25, end angle=335,x radius=0.475, y radius=0.15] --cycle;
+ \ape@part@draw[\ape@arms] (0.93,1.70) ellipse[x radius=0.15, y radius=0.6, rotate=110];
+ \ape@part@draw[\ape@skin!90!white] (0.325,1.91) ++(150:0.3 and 0.1) arc [start angle=150, end angle=390,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=30, end angle=240,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (0.59,1.97) arc [start angle=155, end angle=-155,x radius=0.475, y radius=0.15] --cycle;
+ % speak-no-evil pose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else\ifape@handposition@speaknoevil%
+ \ape@part@draw[\ape@arms] (-0.85,1.55) ellipse[x radius=0.15, y radius=0.6, rotate=-100];
+ \ape@part@draw[\ape@skin!90!white] (-0.275,1.46) ++(390:0.3 and 0.1) arc [start angle=390, end angle=150,x radius=0.3, y radius=0.1] {[rotate=10] arc [start angle=150, end angle=-60,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (-0.53,1.52) {[rotate=-10] arc [start angle=15, end angle=335,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.85,1.55) ellipse[x radius=0.15, y radius=0.6, rotate=100];
+ \ape@part@draw[\ape@skin!90!white] (0.275,1.46) ++(150:0.3 and 0.1) arc [start angle=150, end angle=390,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=30, end angle=240,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (0.53,1.52) {[rotate=10] arc [start angle=165, end angle=-155,x radius=0.475, y radius=0.15]} --cycle;
+ % clapping pose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else\ifape@handposition@clap%
+ \ape@part@draw[\ape@arms] (-0.75,1.95) ellipse[x radius=0.15, y radius=0.6, rotate=30];
+ \ape@part@draw[\ape@skin!90!white] (-0.115,2.85) ellipse [x radius=0.3, y radius=0.1,rotate=80];
+ \ape@part@draw[\ape@arms] (-0.23,2.65) {[rotate=10] arc [start angle=35, end angle=350,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.75,1.95) ellipse[x radius=0.15, y radius=0.6, rotate=150];
+ \ape@part@draw[\ape@skin!90!white] (0.115,2.85) ellipse [x radius=0.3, y radius=0.1,rotate=100];
+ \ape@part@draw[\ape@arms] (0.23,2.65) {[rotate=-10] arc [start angle=145, end angle=-170,x radius=0.475, y radius=0.15]} --cycle;
+ % waving hand pose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else\ifape@handposition@waving%
+ \ape@part@draw[\ape@arms] (-0.93,1.70) ellipse[x radius=0.15, y radius=0.6, rotate=70];
+ \ape@part@draw[\ape@skin!90!white] (-0.97,3.2) ++(150:0.3 and 0.1) {[rotate=-90] arc [start angle=150, end angle=390,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=30, end angle=240,x radius=0.15, y radius=0.03] } -- cycle};
+ \ape@part@draw[\ape@arms] (-1.35,2.74) {[rotate=80] arc [start angle=25, end angle=335,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.9,1.25) ellipse[x radius=0.15, y radius=0.6, rotate=60];
+ \ape@part@draw[\ape@skin!90!white] (0.325,1.05) ++(150:0.3 and 0.1) arc [start angle=150, end angle=390,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=30, end angle=240,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (0.53,1.115) {[rotate=-5] arc [start angle=155, end angle=-155,x radius=0.475, y radius=0.15]} --cycle;
+ % normal pose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \else
+ \ape@part@draw[\ape@arms] (-0.9,1.25) ellipse[x radius=0.15, y radius=0.6, rotate=-60];
+ \ape@part@draw[\ape@skin!90!white] (-0.325,1.05) ++(390:0.3 and 0.1) arc [start angle=390, end angle=150,x radius=0.3, y radius=0.1] {[rotate=10] arc [start angle=150, end angle=-60,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (-0.53,1.115) {[rotate=5] arc [start angle=25, end angle=335,x radius=0.475, y radius=0.15]} --cycle;
+ \ape@part@draw[\ape@arms] (0.9,1.25) ellipse[x radius=0.15, y radius=0.6, rotate=60];
+ \ape@part@draw[\ape@skin!90!white] (0.325,1.05) ++(150:0.3 and 0.1) arc [start angle=150, end angle=390,x radius=0.3, y radius=0.1] {[rotate=-10] arc [start angle=30, end angle=240,x radius=0.15, y radius=0.03] } -- cycle;
+ \ape@part@draw[\ape@arms] (0.53,1.115) {[rotate=-5] arc [start angle=155, end angle=-155,x radius=0.475, y radius=0.15]} --cycle;
+ \fi\fi\fi\fi\fi%
+ \fi%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname apehookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Documentation
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Ape]{Sandra, the orangutan}
+%
+%\emph{The ape was kindly contributed by @NuzzleTOO. It is named after an orangutan who was freed from living alone in a zoo in Bueonos Aires and taken to a sanctuary for great apes after temporarily becoming legally a non-human person.}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-apes}
+%\end{samcode}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{title={Basic ape}}
+%\ape
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic ape can be modified by changing its colour:
+%\begin{tcblisting}{title={Body colour}}
+%\ape[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{title={Eye colour}}
+%\ape[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Nose colour}}
+%\ape[nose=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Mouth colour}}
+%\ape[mouth=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Muzzle colour}}
+%\ape[muzzle=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Skin colour}}
+%\ape[skin=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Arm colour}}
+%\ape[arms=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Leg colour}}
+%\ape[legs=red]
+%\end{tcblisting}
+%
+%The ape make can make use of it hands in different ways:
+%\begin{tcblisting}{title={Clapping ape}}
+%\ape[handposition=clap]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Waving ape}}
+%\ape[handposition=waving]
+%\end{tcblisting}
+%
+%Including the gestures of the three mystic apes \textbf{Mizaru} (see no evil), \textbf{Kikazaru} (hear no evil) and \textbf{Iwazaru} (speak no evil):
+%\begin{tcblisting}{title={See no evil}}
+%\ape[handposition=seenoevil]
+%\end{tcblisting}
+%\begin{tcblisting}{title={hear no evil}}
+%\ape[handposition=hearnoevil]
+%\end{tcblisting}
+%\begin{tcblisting}{title={speak no evil}}
+%\ape[handposition=speaknoevil]
+%\end{tcblisting}
+% As shortcuts, these three apes are also available via
+%\saminline|\ape[seenoevil]|, \saminline|\ape[hearnoevil]|, \saminline|\ape[speaknoevil]| and \saminline|\ape[mizaru]|, \saminline|\ape[kikazaru]|, \saminline|\ape[iwazaru]|.
+%
+%To see a hooting ape:
+%\begin{tcblisting}{title={Hooting ape}}
+%\ape[openmouth]
+%\end{tcblisting}
+%
+%To view the ape from behind:
+%\begin{tcblisting}{title={Back view}}
+%\ape[back]
+%\end{tcblisting}
+%
+%The key \saminline|3D| will make the ape 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
+%\ape[3D]
+%\end{tcblisting}
+%
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
+%\ape[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bats.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bats.sty
index 3d1bbb27fd..3c0880f950 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-bats.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bats.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-bats}[2022/06/17 version v1.0 Drawing bats in TikZ]
+\ProvidesPackage{tikzlings-bats}[2025/01/05 version v2.2 Drawing bats in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,13 +26,14 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname bathookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifbat@threeD
\newif\ifbat@back
\newif\ifbat@contour
\newif\ifbat@teeth
+\newif\ifbat@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -50,39 +51,41 @@
body/.store in = \bat@body,
body = black!75!white,
ears/.store in = \bat@ears,
- ears = \bat@body,
+ ears = \bat@body,
eye/.store in = \bat@eye,
eye = white,
pupil/.store in = \bat@pupil,
pupil = black,
mouth/.store in = \bat@mouth,
- mouth = black,
+ mouth = black,
feet/.store in = \bat@feet,
- feet = orange,
+ feet = orange,
wings/.store in = \bat@wings,
- wings = 1,
+ wings = 1,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- teeth/.code = \bat@teethtrue
- \def\bat@teeth{#1},
+ teeth/.code = \bat@teethtrue
+ \def\bat@teeth{#1},
teeth/.default = white,
- 3D/.code = \bat@threeDtrue,
- back/.code = \bat@backtrue,
+ openmouth/.code = \bat@openmouthtrue,
+ open mouth/.forward to = /bat/openmouth,
+ 3D/.code = \bat@threeDtrue,
+ back/.code = \bat@backtrue,
contour/.code = \bat@contourtrue
\def\bat@contour{#1}
\def\bat@antennas{#1}
\def\bat@mouth{#1},
- contour/.default = black,
- outline/.forward to = /bat/contour,
+ contour/.default = black,
+ outline/.forward to = /bat/contour,
}
\def\bat@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.44,0.0) rectangle (0.44, 2.2);
@@ -99,7 +102,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -117,7 +120,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -171,13 +174,17 @@
%
% Teeth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifbat@teeth
- \bat@part@draw[\bat@teeth] (-0.1,1.36) -- (-0.12,1.3) -- (-0.14,1.38) -- cycle;
- \bat@part@draw[\bat@teeth] (0.1,1.36) -- (0.12,1.3) -- (0.14,1.38) -- cycle;
+ \bat@part@draw[\bat@teeth] (-0.1,1.36) -- (-0.12,1.3) -- (-0.14,1.38) -- cycle;
+ \bat@part@draw[\bat@teeth] (0.1,1.36) -- (0.12,1.3) -- (0.14,1.38) -- cycle;
\fi
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\bat@mouth,line width=\scalingfactor*0.4pt] (0.18, 1.42) arc [start angle=-40, end angle=-140, radius=0.23];
- %
+ \ifbat@openmouth
+ \filldraw[\bat@mouth,line width=\scalingfactor*0.4pt] (0.18, 1.42) arc [start angle=-40, end angle=-140, radius=0.23];
+ \else
+ \draw[\bat@mouth,line width=\scalingfactor*0.4pt] (0.18, 1.42) arc [start angle=-40, end angle=-140, radius=0.23];
+ \fi
+ %
%
\fi% back
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -198,63 +205,68 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-bats}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-bats}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic bat}}
%\bat
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic bat can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\bat[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\bat[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\bat[pupil=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\bat[mouth=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Ear colour}}
%\bat[ears=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Foot colour}}
%\bat[feet=red]
%\end{tcblisting}
%
-%The spread of the wings can be adjusted by passing values between 0 and 1 to the \lstinline|wings| option:
-%\begin{tcblisting}{}
+% The bat can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\bat[openmouth]
+%\end{tcblisting}
+%
+%With the \saminline|wings| option, one can adjust the spread of the wings. It accepts values between~0 and~1:
+%\begin{tcblisting}{title={Wing span}}
%\bat[wings=0.5]
%\end{tcblisting}
%
-%To turn the bat into a vampire bat, the \lstinline|teeth| option can be used:
-%\begin{tcblisting}{}
+%To turn the bat into a vampire bat, the \saminline|teeth| option can be used:
+%\begin{tcblisting}{title={Vampire}}
%\bat[teeth=white]
%\end{tcblisting}
%
%To view the bat from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\bat[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the bat 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the bat 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\bat[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\bat[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
index 22fbe6c3f3..a85104c34e 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bears.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-bears}[2022/06/17 version v1.0 Draw teddy bears in TikZ]
+\ProvidesPackage{tikzlings-bears}[2025/01/05 version v2.2 Draw teddy bears in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -31,6 +31,7 @@
\newif\ifbear@threeD
\newif\ifbear@back
\newif\ifbear@contour
+\newif\ifbear@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -46,29 +47,31 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.store in = \bear@body,
- body = brown,
+ body = brown!70!black,
eye/.store in = \bear@eye,
- eye = \bear@body!30!black,
+ eye = \bear@body!42!black,
mouth/.store in = \bear@mouth,
- mouth = \bear@body!30!black,
+ mouth = \bear@body!42!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \bear@threeDtrue,
- back/.code = \bear@backtrue,
+ openmouth/.code = \bear@openmouthtrue,
+ open mouth/.forward to = /bear/openmouth,
+ 3D/.code = \bear@threeDtrue,
+ back/.code = \bear@backtrue,
contour/.code = \bear@contourtrue
\def\bear@contour{#1}
\def\bear@mouth{#1},
- contour/.default = black,
- outline/.forward to = /bear/contour,
+ contour/.default = black,
+ outline/.forward to = /bear/contour,
}
\def\bear@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.8, 0.0) rectangle (0.8, 2.13);
@@ -85,7 +88,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -102,8 +105,20 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+ % generating saturated/brighter version of body colour
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \extractcolorspecs{\bear@body}{\bear@model}{\bear@colorspec}
+ \convertcolorspec{\bear@model}{\bear@colorspec}{hsb}{\bear@hsbcolorspec}
+ \pgfmathsetmacro{\bear@hue}{(array({\bear@hsbcolorspec},0))}
+ \pgfmathsetmacro{\bear@sat}{(array({\bear@hsbcolorspec},1))-0.38}
+ \pgfmathsetmacro{\bear@bright}{(array({\bear@hsbcolorspec},2))+0.35}
+ \definecolor{bear@bright}{hsb}{\bear@hue,\bear@sat,\bear@bright}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -111,19 +126,19 @@
\csname tikzlinghookbackground\endcsname
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bear@part@draw[\bear@body!70!black] (0.525,0.9) ellipse[x radius=0.35, y radius=0.15, rotate=-50];
- \bear@part@draw[\bear@body!70!black] (-0.525,0.9) ellipse[x radius=0.35, y radius=0.15, rotate=50];
+ \bear@part@draw[\bear@body] (0.525,0.9) ellipse[x radius=0.35, y radius=0.15, rotate=-50];
+ \bear@part@draw[\bear@body] (-0.525,0.9) ellipse[x radius=0.35, y radius=0.15, rotate=50];
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifbear@back
- \bear@part@draw[\bear@body!70!black] (0.425, 0.3) circle[radius=0.28];
- \bear@part@draw[\bear@body!70!black] (-0.425, 0.3) circle[radius=0.28];
+ \bear@part@draw[\bear@body] (0.425, 0.3) circle[radius=0.28];
+ \bear@part@draw[\bear@body] (-0.425, 0.3) circle[radius=0.28];
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bear@part@draw[\bear@body!70!black] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
+ \bear@part@draw[\bear@body] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
\unless\ifbear@back
- \bear@part@draw[\bear@body!50!white] (0,0.7) ellipse[x radius=0.35, y radius=0.4];
+ \bear@part@draw[bear@bright] (0,0.7) ellipse[x radius=0.35, y radius=0.4];
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -132,36 +147,40 @@
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifbear@back
- \bear@part@draw[\bear@body!70!black] (0.425, 0.3) circle[radius=0.28];
- \bear@part@draw[\bear@body!70!black] (-0.425, 0.3) circle[radius=0.28];
- \bear@part@draw[\bear@body!50!white] (0.425, 0.3) circle[radius=0.17];
- \bear@part@draw[\bear@body!50!white] (-0.425, 0.3) circle[radius=0.17];
+ \bear@part@draw[\bear@body] (0.425, 0.3) circle[radius=0.28];
+ \bear@part@draw[\bear@body] (-0.425, 0.3) circle[radius=0.28];
+ \bear@part@draw[bear@bright] (0.425, 0.3) circle[radius=0.17];
+ \bear@part@draw[bear@bright] (-0.425, 0.3) circle[radius=0.17];
\fi% back
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bear@part@draw[\bear@body!70!black] (0.375, 1.95) circle[radius=0.15];
- \bear@part@draw[\bear@body!70!black] (-0.375, 1.95) circle[radius=0.15];
+ \bear@part@draw[\bear@body] (0.375, 1.95) circle[radius=0.15];
+ \bear@part@draw[\bear@body] (-0.375, 1.95) circle[radius=0.15];
\unless\ifbear@back
- \bear@part@draw[\bear@body!50!white] (0.375, 1.95) circle[radius=0.1];
- \bear@part@draw[\bear@body!50!white] (-0.375, 1.95) circle[radius=0.1];
+ \bear@part@draw[bear@bright] (0.375, 1.95) circle[radius=0.1];
+ \bear@part@draw[bear@bright] (-0.375, 1.95) circle[radius=0.1];
\fi% back
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bear@part@draw[\bear@body!70!black] (0, 1.55) circle[radius=0.5];
+ \bear@part@draw[\bear@body] (0, 1.55) circle[radius=0.5];
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifbear@back
%
% Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bear@part@draw[\bear@body!50!white] (0, 1.4) ellipse[x radius=0.28, y radius=0.2];
- \bear@part@draw[\bear@body!70!white!80!red] (0, 1.5) ellipse[x radius=0.15, y radius=0.08];
+ \bear@part@draw[bear@bright] (0, 1.4) ellipse[x radius=0.28, y radius=0.2];
+ \bear@part@draw[bear@bright!60!red] (0, 1.5) ellipse[x radius=0.15, y radius=0.08];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bear@part@draw[\bear@eye] (-0.155, 1.7) circle[radius=0.05];
- \bear@part@draw[\bear@eye] (0.155, 1.7) circle[radius=0.05];
+ \bear@part@draw[\bear@eye] (-0.155, 1.7) circle[radius=0.05];
+ \bear@part@draw[\bear@eye] (0.155, 1.7) circle[radius=0.05];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\bear@mouth,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
+ \ifbear@openmouth
+ \filldraw[\bear@mouth,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
+ \else
+ \draw[\bear@mouth,line width=\scalingfactor*0.4pt] (0.145, 1.38) arc [start angle=-20, end angle=-160, radius=0.16];
+ \fi
%
\fi% back
%
@@ -183,61 +202,66 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-bears}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-bears}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic bear}}
%\bear
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic teddy bear can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\bear[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\bear[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\bear[mouth=red]
%\end{tcblisting}
%
+% The bear can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\bear[openmouth]
+%\end{tcblisting}
+%
%To view the teddy bear from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\bear[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the teddy bear 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the teddy bear 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\bear[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\bear[contour=black]
%\end{tcblisting}
%
%\subsection{Extension}
%
-%The B\"ar and Ulrike Fischer wrote the fantastic \lstinline|bearwear| package, that provides many different clothing options for the \lstinline|TikZbears|. All the other \tikzlings admire them for the nice clothing!
+%The B\"ar and Ulrike Fischer wrote the fantastic \saminline|bearwear| package, that provides many different clothing options for the \saminline|TikZbears|. All the other \tikzlings admire them for the nice clothing!
%
%A short example:
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Bearwear example}}
%%\usepackage{bearwear}
%\bear
%\bearwear[
-% long sleeves,
+% long sleeves,
% shirt=red!80!black
%]
%\end{tcblisting}
%
-%Many more options and examples can be found in the package documentation \url{https://ctan.org/pkg/bearwear}.
+%Many more options and examples can be found in the package documentation \url{https://ctan.org/pkg/bearwear}.
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty
index 9fec259bdb..18d8ff9bcd 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bees.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-bees}[2022/06/17 version v1.0 Drawing bees in TikZ]
+\ProvidesPackage{tikzlings-bees}[2025/01/05 version v2.2 Drawing bees in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,12 +26,13 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname beehookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifbee@threeD
\newif\ifbee@back
\newif\ifbee@contour
+\newif\ifbee@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -49,36 +50,38 @@
body/.store in = \bee@body,
body = yellow!70!orange,
hands/.store in = \bee@hands,
- hands = black,
+ hands = black,
wings/.store in = \bee@wings,
- wings = blue!20!cyan!30!white,
+ wings = blue!20!cyan!30!white,
stripes/.store in = \bee@stripes,
- stripes = black,
+ stripes = black,
antennas/.store in = \bee@antennas,
- antennas = black,
+ antennas = black,
eye/.store in = \bee@eye,
- eye = black,
+ eye = black,
mouth/.store in = \bee@mouth,
- mouth = black,
+ mouth = black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \bee@threeDtrue,
- back/.code = \bee@backtrue,
+ openmouth/.code = \bee@openmouthtrue,
+ open mouth/.forward to = /bee/openmouth,
+ 3D/.code = \bee@threeDtrue,
+ back/.code = \bee@backtrue,
contour/.code = \bee@contourtrue
\def\bee@contour{#1}
\def\bee@antennas{#1}
\def\bee@mouth{#1},
- contour/.default = black,
- outline/.forward to = /bee/contour,
+ contour/.default = black,
+ outline/.forward to = /bee/contour,
}
\def\bee@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.88,0.1) rectangle (0.88, 2.4);
@@ -95,7 +98,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -113,11 +116,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \csname beeshookbackground\endcsname
+ \csname beehookbackground\endcsname
\csname tikzlinghookbackground\endcsname
%
\ifbee@back
@@ -141,18 +144,11 @@
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \begin{scope}
- \bee@part@draw[\bee@body] (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
- \clip (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
- % stripes
- \bee@part@draw[\bee@stripes] (-0.475,1.3) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
- (-0.475,1.0) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
- (-0.475,0.65) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle
- (-0.475,0.35) arc(180:360:0.5 and 0.1) -- ++ (0,-0.15) arc(360:180:0.5 and 0.1) -- cycle;
- \end{scope}
+ \bee@part@draw[\bee@body] (0,2.1) to[out=180,in=140,looseness=1.2] (-0.3,1.5) to[out=-110,in=180,looseness=1.2] (0,0.15) to[out=00,in=-65,looseness=1.2] (0.3,1.5) to[out=40,in=0,looseness=1.2] cycle;
+ \bee@part@draw[\bee@stripes] (-0.3845, 1.2427).. controls (-0.3978, 1.1967) and (-0.4102, 1.1508) .. (-0.4213, 1.1051).. controls (-0.339, 1.0724) and (-0.1703, 1.05) .. (0.025, 1.05).. controls (0.2024, 1.05) and (0.3578, 1.0685) .. (0.4466, 1.0964).. controls (0.4345, 1.1426) and (0.4206, 1.1889) .. (0.4053, 1.2351).. controls (0.3136, 1.2136) and (0.1774, 1.2) .. (0.025, 1.2).. controls (-0.1445, 1.2) and (-0.2941, 1.2169) .. (-0.3845, 1.2427) -- cycle(-0.4505, 0.9692).. controls (-0.4588, 0.9242) and (-0.4654, 0.88) .. (-0.4704, 0.8366).. controls (-0.4375, 0.7877) and (-0.2284, 0.75) .. (0.025, 0.75).. controls (0.2433, 0.75) and (0.4285, 0.778) .. (0.4966, 0.817).. controls (0.4925, 0.8629) and (0.4858, 0.9099) .. (0.4772, 0.9575).. controls (0.3973, 0.9236) and (0.2251, 0.9) .. (0.025, 0.9).. controls (-0.1973, 0.9) and (-0.3855, 0.929) .. (-0.4505, 0.9692) -- cycle(-0.475, 0.65) -- (-0.475, 0.5798).. controls (-0.4712, 0.5424) and (-0.465, 0.5067) .. (-0.4563, 0.4729).. controls (-0.3973, 0.4309) and (-0.2042, 0.4) .. (0.025, 0.4).. controls (0.2141, 0.4) and (0.3785, 0.421) .. (0.4635, 0.452).. controls (0.4809, 0.5028) and (0.4921, 0.5583) .. (0.4975, 0.6175).. controls (0.43, 0.5782) and (0.2442, 0.55) .. (0.025, 0.55).. controls (-0.2511, 0.55) and (-0.475, 0.5947) .. (-0.475, 0.65) -- cycle(-0.3628, 0.2869).. controls (-0.2871, 0.2009) and (-0.1703, 0.15) .. (-0.0, 0.15).. controls (0.1603, 0.15) and (0.2765, 0.1965) .. (0.3564, 0.2753).. controls (0.2681, 0.2596) and (0.1523, 0.25) .. (0.025, 0.25).. controls (-0.1315, 0.25) and (-0.2711, 0.2644) .. (-0.3628, 0.2869) -- cycle;
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \csname beeshookbelly\endcsname
+ \csname beehookbelly\endcsname
\csname tikzlinghookbelly\endcsname
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -171,16 +167,20 @@
\else% back
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bee@part@draw[\bee@eye] (-0.15,1.8) circle[radius=0.05];
- \bee@part@draw[\bee@eye] (0.15,1.8) circle[radius=0.05];
+ \bee@part@draw[\bee@eye] (-0.15,1.8) circle[radius=0.05];
+ \bee@part@draw[\bee@eye] (0.15,1.8) circle[radius=0.05];
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bee@part@draw[\bee@hands] (-0.25,0.88) circle[x radius=0.07,y radius=0.2, rotate=25];
\bee@part@draw[\bee@hands] (0.25,0.88) circle[x radius=0.07,y radius=0.2, rotate=-25];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\bee@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.6) arc [start angle=-40, end angle=-140, radius=0.16];
- %
+ \ifbee@openmouth
+ \filldraw[\bee@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.6) arc [start angle=-40, end angle=-140, radius=0.16];
+ \else
+ \draw[\bee@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.6) arc [start angle=-40, end angle=-140, radius=0.16];
+ \fi
+ %
% Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fill[\bee@antennas,rotate around={15:(-0.175,2.115)}] (-0.2,1.93) rectangle (-0.15,2.3);
\fill[\bee@antennas,rotate around={-15:(0.175,2.115)}] (0.2,1.93) rectangle (0.15,2.3);
@@ -190,7 +190,7 @@
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \csname beeshookbody\endcsname
+ \csname beehookbody\endcsname
\csname tikzlinghookbody\endcsname
%
}
@@ -207,15 +207,15 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-bees}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-bees}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic bee}}
%\bee
%\end{tcblisting}
%
@@ -227,36 +227,41 @@
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Antenna colour}}
%\bee[antennas=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\bee[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\bee[mouth=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Wing colour}}
%\bee[wings=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Hand colour}}
%\bee[hands=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Stripe colour}}
%\bee[stripes=red]
%\end{tcblisting}
%
+% The bee can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\bee[openmouth]
+%\end{tcblisting}
+%
%To view the bee from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={back view}}
%\bee[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the bee 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the bee 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\bee[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\bee[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty b/graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty
index 65febf3bbc..8f618899f5 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-bugs.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-bugs}[2022/06/17 version v1.0 Drawing bugs in TikZ]
+\ProvidesPackage{tikzlings-bugs}[2025/01/05 version v2.2 Drawing bugs in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,12 +26,15 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname bughookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifbug@threeD
+\newif\ifbug@leftstep
+\newif\ifbug@rightstep
\newif\ifbug@back
\newif\ifbug@contour
+\newif\ifbug@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -49,40 +52,46 @@
body/.store in = \bug@body,
body = black!90!white,
arms/.store in = \bug@arms,
- arms = red!80!black,
+ arms = red!80!black,
wings/.store in = \bug@wings,
- wings = red!80!black,
+ wings = red!80!black,
dots/.store in = \bug@dots,
- dots = black!90!white,
+ dots = black!90!white,
antennas/.store in = \bug@antennas,
- antennas = red!80!black,
+ antennas = red!80!black,
eye/.store in = \bug@eye,
eye = white,
pupil/.store in = \bug@pupil,
pupil = black,
mouth/.store in = \bug@mouth,
- mouth = red,
+ mouth = red,
feet/.store in = \bug@feet,
- feet = red!80!black,
+ feet = red!80!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \bug@threeDtrue,
- back/.code = \bug@backtrue,
+ 3D/.code = \bug@threeDtrue,
+ leftstep/.code = \bug@leftsteptrue,
+ left step/.forward to = /bug/leftstep,
+ rightstep/.code = \bug@rightsteptrue,
+ right step/.forward to = /bug/rightstep,
+ openmouth/.code = \bug@openmouthtrue,
+ open mouth/.forward to = /bug/openmouth,
+ back/.code = \bug@backtrue,
contour/.code = \bug@contourtrue
\def\bug@contour{#1}
\def\bug@antennas{#1}
\def\bug@mouth{#1},
- contour/.default = black,
- outline/.forward to = /bug/contour,
+ contour/.default = black,
+ outline/.forward to = /bug/contour,
}
\def\bug@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.92,0.02) rectangle (0.92, 2.36);
@@ -99,7 +108,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -117,33 +126,41 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \csname bugshookbackground\endcsname
+ \csname bughookbackground\endcsname
\csname tikzlinghookbackground\endcsname
%
\ifbug@back
- %
+ %
% Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[\bug@antennas,line width=\scalingfactor*0.8pt] (0.1134, 1.911) .. controls (0.0917, 2.0537) and (0.0986, 2.1999) .. (0.1608, 2.2816) .. controls (0.245, 2.3919) and (0.3278, 2.3011) .. (0.3272, 2.2192) .. controls (0.3266, 2.1341) and (0.2237, 2.0423) .. (0.1978, 2.1538);
\draw[\bug@antennas,line width=\scalingfactor*0.8pt] (-0.1134, 1.911) .. controls (-0.0917, 2.0537) and (-0.0986, 2.1999) .. (-0.1608, 2.2816) .. controls (-0.245, 2.3919) and (-0.3278, 2.3011) .. (-0.3272, 2.2192) .. controls (-0.3266, 2.1341) and (-0.2237, 2.0423) .. (-0.1978, 2.1538);
\else% back
%
% Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bug@part@draw[\bug@wings] (-0.0955, 1.4222) .. controls (-0.2086, 1.6765) and (-0.692, 1.2508) .. (-0.8174, 1.0023) .. controls (-0.9304, 0.7786) and (-0.9533, 0.379) .. (-0.7355, 0.2548) .. controls (-0.5988, 0.1768) and (-0.4043, 0.3269) .. (-0.3054, 0.4494) .. controls (-0.097, 0.7075) and (0.0589, 1.0749) .. (-0.0955, 1.4222) -- cycle;
+ \bug@part@draw[\bug@wings] (-0.0955, 1.4222) .. controls (-0.2086, 1.6765) and (-0.692, 1.2508) .. (-0.8174, 1.0023) .. controls (-0.9304, 0.7786) and (-0.9533, 0.379) .. (-0.7355, 0.2548) .. controls (-0.5988, 0.1768) and (-0.4043, 0.3269) .. (-0.3054, 0.4494) .. controls (-0.097, 0.7075) and (0.0589, 1.0749) .. (-0.0955, 1.4222) -- cycle;
\bug@part@draw[\bug@wings] (0.0955, 1.4222) .. controls (0.2086, 1.6765) and (0.692, 1.2508) .. (0.8174, 1.0023) .. controls (0.9304, 0.7786) and (0.9533, 0.379) .. (0.7355, 0.2548) .. controls (0.5988, 0.1768) and (0.4043, 0.3269) .. (0.3054, 0.4494) .. controls (0.097, 0.7075) and (-0.0589, 1.0749) .. (0.0955, 1.4222) -- cycle;
\ifbug@contour
- \bug@part@draw[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
- \else% contour
- \fill[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
+ \bug@part@draw[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
+ \else% contour
+ \fill[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
\fi% contour
\fi% back
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bug@part@draw[\bug@feet] (0.2,0.1) ellipse[x radius=0.18, y radius=0.06];
- \bug@part@draw[\bug@feet] (-0.2,0.1) ellipse[x radius=0.18, y radius=0.06];
+ \ifbug@leftstep
+ \bug@part@draw[\bug@feet] (-0.2,0.12) ellipse[x radius=0.18, y radius=0.06];
+ \else% step
+ \bug@part@draw[\bug@feet] (-0.2,0.1) ellipse[x radius=0.18, y radius=0.06];
+ \fi% step
+ \ifbug@rightstep
+ \bug@part@draw[\bug@feet] (0.2,0.12) ellipse[x radius=0.18, y radius=0.06];
+ \else% step
+ \bug@part@draw[\bug@feet] (0.2,0.1) ellipse[x radius=0.18, y radius=0.06];
+ \fi% step
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bug@part@draw[\bug@body] ( 0.55, 0.75) .. controls ( 0.55, 0.40) and ( 0.55, 0.08) .. ( 0.00, 0.08) .. controls (-0.55, 0.08) and (-0.55, 0.40) .. (-0.55, 0.75) .. controls (-0.55, 1.13) and (-0.30, 1.44) .. ( 0.00, 1.44) .. controls ( 0.30, 1.44) and ( 0.55, 1.13) .. ( 0.55, 0.75) -- cycle;
@@ -152,19 +169,19 @@
\bug@part@draw[\bug@body] (0,1.7) circle [radius=0.37];
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \csname bugshookbelly\endcsname
+ \csname bughookbelly\endcsname
\csname tikzlinghookbelly\endcsname
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifbug@back
%
% Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \bug@part@draw[\bug@wings] (-0.0955, 1.4222) .. controls (-0.2086, 1.6765) and (-0.692, 1.2508) .. (-0.8174, 1.0023) .. controls (-0.9304, 0.7786) and (-0.9533, 0.379) .. (-0.7355, 0.2548) .. controls (-0.5988, 0.1768) and (-0.4043, 0.3269) .. (-0.3054, 0.4494) .. controls (-0.097, 0.7075) and (0.0589, 1.0749) .. (-0.0955, 1.4222) -- cycle;
+ \bug@part@draw[\bug@wings] (-0.0955, 1.4222) .. controls (-0.2086, 1.6765) and (-0.692, 1.2508) .. (-0.8174, 1.0023) .. controls (-0.9304, 0.7786) and (-0.9533, 0.379) .. (-0.7355, 0.2548) .. controls (-0.5988, 0.1768) and (-0.4043, 0.3269) .. (-0.3054, 0.4494) .. controls (-0.097, 0.7075) and (0.0589, 1.0749) .. (-0.0955, 1.4222) -- cycle;
\bug@part@draw[\bug@wings] (0.0955, 1.4222) .. controls (0.2086, 1.6765) and (0.692, 1.2508) .. (0.8174, 1.0023) .. controls (0.9304, 0.7786) and (0.9533, 0.379) .. (0.7355, 0.2548) .. controls (0.5988, 0.1768) and (0.4043, 0.3269) .. (0.3054, 0.4494) .. controls (0.097, 0.7075) and (-0.0589, 1.0749) .. (0.0955, 1.4222) -- cycle;
\ifbug@contour
- \bug@part@draw[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
+ \bug@part@draw[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
\else% contour
- \fill[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
+ \fill[\bug@dots] (-0.2,0.85) circle [radius=0.08] (-0.5,0.8) circle [radius=0.08] (-0.8,0.75) circle [radius=0.08] (-0.35,0.6) circle [radius=0.08] (-0.65,0.5) circle [radius=0.08] (-0.3,1.05) circle [radius=0.08] (-0.6,1.1) circle [radius=0.08] (-0.35,1.35) circle [radius=0.08] (0.2,0.85) circle [radius=0.08] (0.5,0.8) circle [radius=0.08] (0.8,0.75) circle [radius=0.08] (0.35,0.6) circle [radius=0.08] (0.65,0.5) circle [radius=0.08] (0.3,1.05) circle [radius=0.08] (0.6,1.1) circle [radius=0.08] (0.35,1.35) circle [radius=0.08];
\fi% contour
\else% back
%
@@ -179,8 +196,12 @@
\bug@part@draw[\bug@arms] (0.25,0.88) circle[x radius=0.07,y radius=0.18, rotate=-35];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\bug@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.56) arc [start angle=-40, end angle=-140, radius=0.16];
- %
+ \ifbug@openmouth
+ \filldraw[\bug@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.56) arc [start angle=-40, end angle=-140, radius=0.16];
+ \else
+ \draw[\bug@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.56) arc [start angle=-40, end angle=-140, radius=0.16];
+ \fi
+ %
% Antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[\bug@antennas,line width=\scalingfactor*0.8pt] (0.1134, 1.911) .. controls (0.0917, 2.0537) and (0.0986, 2.1999) .. (0.1608, 2.2816) .. controls (0.245, 2.3919) and (0.3278, 2.3011) .. (0.3272, 2.2192) .. controls (0.3266, 2.1341) and (0.2237, 2.0423) .. (0.1978, 2.1538);
\draw[\bug@antennas,line width=\scalingfactor*0.8pt] (-0.1134, 1.911) .. controls (-0.0917, 2.0537) and (-0.0986, 2.1999) .. (-0.1608, 2.2816) .. controls (-0.245, 2.3919) and (-0.3278, 2.3011) .. (-0.3272, 2.2192) .. controls (-0.3266, 2.1341) and (-0.2237, 2.0423) .. (-0.1978, 2.1538);
@@ -188,7 +209,7 @@
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \csname bugshookbody\endcsname
+ \csname bughookbody\endcsname
\csname tikzlinghookbody\endcsname
%
}
@@ -205,59 +226,70 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-bugs}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-bugs}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic bug}}
%\bug
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic bug can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\bug[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Antenna Colour}}
%\bug[antennas=blue]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\bug[eye=blue]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\bug[pupil=blue]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\bug[mouth=blue]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Arm colour}}
%\bug[arms=blue]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Wing colour}}
%\bug[wings=blue]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Foot colour}}
%\bug[feet=blue]
%\end{tcblisting}
%
+% The bug can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\bug[openmouth]
+%\end{tcblisting}
+%
+%And the bug can lift its legs:
+%\begin{tcblisting}{title={Walking}}
+%\bug[leftstep]
+%\bug[rightstep,xshift=2cm]
+%\end{tcblisting}
+%
%To view the bug from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\bug[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the bug 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the bug 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\bug[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\bug[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty b/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
index d34599cd7a..41dc7521ad 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-cats.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-cats}[2022/06/17 version v1.0 Drawing cats in TikZ]
+\ProvidesPackage{tikzlings-cats}[2025/01/05 version v2.2 Drawing cats in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -24,13 +24,13 @@
\else
\ifdefined\pdfrandomseed % pdflatex
\else
- \ifdefined\randomseed
+ \ifdefined\randomseed
\let\pdfrandomseed\randomseed % post TL19 xelatex and lualatex
\else
\let\pdfrandomseed\time % pre TL19 xelatex
\fi
\fi
- \pgfmathsetseed{\number\pdfrandomseed}
+ \pgfmathsetseed{\number\pdfrandomseed}
\fi
\ExplSyntaxOff
@@ -59,6 +59,7 @@
\newif\ifcat@schroedinger
\newif\ifcat@back
\newif\ifcat@contour
+\newif\ifcat@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,21 +104,23 @@
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \cat@threeDtrue,
schroedinger/.code = \cat@schroedingertrue,
- back/.code = \cat@backtrue,
+ openmouth/.code = \cat@openmouthtrue,
+ open mouth/.forward to = /cat/openmouth,
+ 3D/.code = \cat@threeDtrue,
+ back/.code = \cat@backtrue,
contour/.code = \cat@contourtrue
\def\cat@contour{#1}
\def\cat@whiskers{#1},
- contour/.default = black,
- outline/.forward to = /cat/contour,
+ contour/.default = black,
+ outline/.forward to = /cat/contour,
}
\def\cat@draw{%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.56,0.1) rectangle (1.63, 2.22);
@@ -134,7 +137,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -152,7 +155,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -164,7 +167,7 @@
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifcat@back
- \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
+ \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
\cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
\fi% back
%
@@ -176,10 +179,8 @@
\csname tikzlinghookbelly\endcsname
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \cat@part@draw[\cat@body]
- (0.12, 2.0392) .. controls (0.16, 2.1584) and (0.37, 2.22) .. (0.37, 2.20) .. controls (0.37, 2.2) and (0.39, 1.9) .. (0.2721, 1.9) .. controls (0.1891, 1.88) and (0.12, 1.88) .. (0.12, 2.0392) -- cycle;
- \cat@part@draw[\cat@body]
- (-0.12, 2.0392) .. controls (-0.16, 2.1584) and (-0.37, 2.22) .. (-0.37, 2.20) .. controls (-0.37, 2.2) and (-0.39, 1.9) .. (-0.2721, 1.9) .. controls (-0.1891, 1.88) and (-0.12, 1.88) .. (-0.12, 2.0392) -- cycle;
+ \cat@part@draw[\cat@body] (0.12, 2.0392) .. controls (0.16, 2.1584) and (0.37, 2.22) .. (0.37, 2.20) .. controls (0.37, 2.2) and (0.39, 1.9) .. (0.2721, 1.9) .. controls (0.1891, 1.88) and (0.12, 1.88) .. (0.12, 2.0392) -- cycle;
+ \cat@part@draw[\cat@body] (-0.12, 2.0392) .. controls (-0.16, 2.1584) and (-0.37, 2.22) .. (-0.37, 2.20) .. controls (-0.37, 2.2) and (-0.39, 1.9) .. (-0.2721, 1.9) .. controls (-0.1891, 1.88) and (-0.12, 1.88) .. (-0.12, 2.0392) -- cycle;
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cat@part@draw[\cat@body] (0,1.64) circle[radius=0.44];
@@ -196,7 +197,11 @@
\cat@part@draw[\cat@pupil] ( 0.1720, 1.8071) .. controls ( 0.1720+\cat@pupil@width, 1.7827+\cat@pupil@offset) and ( 0.1720+\cat@pupil@width, 1.7584-\cat@pupil@offset) .. ( 0.1720, 1.7341) .. controls ( 0.1720-\cat@pupil@width, 1.7584-\cat@pupil@offset) and ( 0.1720-\cat@pupil@width, 1.7827+\cat@pupil@offset) .. ( 0.1720, 1.8071) -- cycle;
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\cat@whiskers,line width=\scalingfactor*0.2pt] (-0.16, 1.527) .. controls (-0.16, 1.527) and (-0.062, 1.420) .. ( 0.000, 1.556) .. controls ( 0.062, 1.420) and ( 0.16, 1.527) .. ( 0.16, 1.527);
+ \ifcat@openmouth
+ \filldraw[\cat@whiskers,line width=\scalingfactor*0.2pt] (-0.16, 1.527) .. controls (-0.16, 1.527) and (-0.062, 1.420) .. ( 0.000, 1.556) .. controls ( 0.062, 1.420) and ( 0.16, 1.527) .. ( 0.16, 1.527) (0.16,1.527) arc [start angle=-20, end angle=-160, radius=0.17];
+ \else
+ \draw[\cat@whiskers,line width=\scalingfactor*0.2pt] (-0.16, 1.527) .. controls (-0.16, 1.527) and (-0.062, 1.420) .. ( 0.000, 1.556) .. controls ( 0.062, 1.420) and ( 0.16, 1.527) .. ( 0.16, 1.527);
+ \fi
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cat@part@draw[\cat@nose] (-0.069, 1.6452) .. controls (-0.0524, 1.6613) and (0.0524, 1.6613) .. (0.069, 1.6452) .. controls (0.08, 1.625) and (0.0206, 1.55) .. (0, 1.55) .. controls (-0.0206, 1.55) and (-0.08, 1.625) .. (-0.069, 1.6452) -- cycle;
@@ -210,8 +215,8 @@
\fill[\cat@whiskers] (-0.0671, 1.6243) .. controls (-0.1414, 1.6725) and (-0.2182, 1.6964) .. (-0.2925, 1.6482) -- (-0.2925, 1.6582) .. controls (-0.2179, 1.7066) and (-0.1417, 1.6727) .. (-0.0671, 1.6243) -- cycle;
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
- \cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
+ \cat@part@draw[\cat@paws] (-0.255,0.3) circle[radius=0.18];
+ \cat@part@draw[\cat@paws] (0.255,0.3) circle[radius=0.18];
%
\fi% back
%
@@ -224,7 +229,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.55,0.39) rectangle (0.55, 2.06);
@@ -241,7 +246,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -257,7 +262,7 @@
\fi% 3D
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% Drawing the tomebstone
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -307,50 +312,55 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-cats}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-cats}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic cat}}
%\cat
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic cat can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\cat[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\cat[eye=green]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\cat[pupil=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Nose colour}}
%\cat[nose=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Whiskers colour}}
%\cat[whiskers=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Paw colour}}
%\cat[paws=red]
%\end{tcblisting}
%
-%The shape of the \lstinline|pupil| can be changed with the \lstinline|pupilwidth| option:
-%\begin{tcblisting}{}
+% The cat can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\cat[openmouth]
+%\end{tcblisting}
+%
+%The shape of the \saminline|pupil| can be changed with the \saminline|pupilwidth| option:
+%\begin{tcblisting}{title={Width of pupils}}
%\cat[pupilwidth=0.015]
%\end{tcblisting}
%
%Additionally several predefined widths exist:
-%\begin{tcolorbox}
-%\begin{lstlisting}[morekeywords={narrow,medium,wide,very,pupils}]
+%\begin{tcolorbox}[title={Predefined pupil widths}]
+%\begin{samcode}
%\cat[narrow pupils]
%
%\cat[medium pupils]
@@ -358,7 +368,7 @@
%\cat[wide pupils]
%
%\cat[very wide pupils]
-%\end{lstlisting}
+%\end{samcode}
%
%\tcblower
%\begin{tikzpicture}[yshift=2.4cm,xshift=1.8cm]
@@ -369,7 +379,7 @@
%\end{tikzpicture}
%\end{tcolorbox}
%
-%There is also the special option \lstinline|schroedinger|. This cat is both alive and dead as long as you did not compile your document.
+%There is also the special option \saminline|schroedinger|. This cat is both alive and dead as long as you did not compile your document.
%Be prepared for a possibly disturbing scene when you open the pdf, this option is not suited for sensitive \tikzlings.
%\begingroup
%\makeatletter
@@ -379,22 +389,22 @@
%}
%\renewcommand{\cathookbackground}{}
%\makeatother
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Schrödingers cat}}
%\cat[schroedinger]
%\end{tcblisting}
%\endgroup
%
%To view the cat from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\cat[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the cat 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the cat 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\cat[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\cat[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty b/graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty
index 1d96fc9d66..ff770860fd 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-chickens.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-chickens}[2022/06/17 version v1.0 Draw chickens in TikZ]
+\ProvidesPackage{tikzlings-chickens}[2025/01/05 version v2.2 Draw chickens in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -31,7 +31,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname chickenhookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifchicken@threeD
@@ -53,7 +53,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.store in = \chicken@body,
- body = brown!50!orange!70!yellow!80!white,
+ body = brown!90!orange!70!yellow!40!white,
eye/.store in = \chicken@eye,
eye = white!90!gray,
pupil/.store in = \chicken@pupil,
@@ -61,24 +61,24 @@
bill/.store in = \chicken@bill,
bill = yellow,
feet/.store in = \chicken@feet,
- feet = orange!90!yellow,
+ feet = orange!90!yellow,
comb/.store in = \chicken@comb,
- comb = red,
+ comb = red,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \chicken@threeDtrue,
- back/.code = \chicken@backtrue,
+ back/.code = \chicken@backtrue,
contour/.code = \chicken@contourtrue
\def\chicken@contour{#1},
- contour/.default = black,
- outline/.forward to = /chicken/contour,
+ contour/.default = black,
+ outline/.forward to = /chicken/contour,
baby/.code = \chicken@babytrue
\def\chicken@baby{#1}
\def\chicken@bill{\chicken@feet},
- baby/.default = yellow!80!orange,
+ baby/.default = yellow!80!orange,
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -89,7 +89,7 @@
\def\chicken@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.96, 0.08) rectangle (0.96, 2.35);
@@ -106,7 +106,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -123,8 +123,20 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+ % generating saturated version of body colour
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \extractcolorspecs{\chicken@body}{\chicken@model}{\chicken@colorspec}
+ \convertcolorspec{\chicken@model}{\chicken@colorspec}{hsb}{\chicken@hsbcolorspec}
+ \pgfmathsetmacro{\chicken@hue}{(array({\chicken@hsbcolorspec},0))}
+ \pgfmathsetmacro{\chicken@sat}{(array({\chicken@hsbcolorspec},1)+0.5)}
+ \pgfmathsetmacro{\chicken@bright}{(array({\chicken@hsbcolorspec},2))}
+ \definecolor{chicken@bodysat50}{hsb}{\chicken@hue,\chicken@sat,\chicken@bright}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -132,12 +144,12 @@
\csname tikzlinghookbackground\endcsname
%
% Wings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \chicken@part@draw[\chicken@body] (0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=-65];
- \chicken@part@draw[\chicken@body] (0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=-43];
- \chicken@part@draw[\chicken@body] (0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=-18];
- \chicken@part@draw[\chicken@body] (-0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=65];
- \chicken@part@draw[\chicken@body] (-0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=43];
- \chicken@part@draw[\chicken@body] (-0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=18];
+ \chicken@part@draw[chicken@bodysat50] (0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=-65];
+ \chicken@part@draw[chicken@bodysat50] (0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=-43];
+ \chicken@part@draw[chicken@bodysat50] (0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=-18];
+ \chicken@part@draw[chicken@bodysat50] (-0.57,0.95) ellipse[x radius=0.3, y radius=0.08, rotate=65];
+ \chicken@part@draw[chicken@bodysat50] (-0.64,1.07) ellipse[x radius=0.3, y radius=0.08, rotate=43];
+ \chicken@part@draw[chicken@bodysat50] (-0.66,1.18) ellipse[x radius=0.3, y radius=0.08, rotate=18];
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifchicken@back
@@ -152,8 +164,8 @@
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \chicken@part@draw[\chicken@body!50!white] ( 0.00, 0.33) .. controls (-0.60, 0.33) and (-0.55, 0.65) .. (-0.55, 0.90) .. controls (-0.55, 1.10) and (-0.48, 1.20) .. (-0.39, 1.40) .. controls (-0.32, 1.58) and (-0.32, 2.09) .. ( 0.00, 2.09) .. controls ( 0.32, 2.09) and ( 0.32, 1.58) .. ( 0.39, 1.40) .. controls ( 0.48, 1.20) and ( 0.55, 1.10) .. ( 0.55, 0.90) .. controls ( 0.55, 0.65) and ( 0.60, 0.33) .. ( 0, 0.33) -- cycle;
- \chicken@part@draw[\chicken@body,decoration={snake,amplitude=\scalingfactor*1.5pt,segment length=\scalingfactor*6.1pt}] ( -0.39, 1.40) .. controls (-0.32, 1.58) and (-0.32, 2.09) .. ( 0.00, 2.09) .. controls ( 0.32, 2.09) and ( 0.32, 1.58) .. ( 0.39, 1.40) decorate {arc [start angle=-60,end angle=-120,radius=0.77]} -- cycle;
+ \chicken@part@draw[\chicken@body] ( 0.00, 0.33) .. controls (-0.60, 0.33) and (-0.55, 0.65) .. (-0.55, 0.90) .. controls (-0.55, 1.10) and (-0.48, 1.20) .. (-0.39, 1.40) .. controls (-0.32, 1.58) and (-0.32, 2.09) .. ( 0.00, 2.09) .. controls ( 0.32, 2.09) and ( 0.32, 1.58) .. ( 0.39, 1.40) .. controls ( 0.48, 1.20) and ( 0.55, 1.10) .. ( 0.55, 0.90) .. controls ( 0.55, 0.65) and ( 0.60, 0.33) .. ( 0, 0.33) -- cycle;
+ \chicken@part@draw[chicken@bodysat50,decoration={snake,amplitude=\scalingfactor*1.5pt,segment length=\scalingfactor*6.1pt}] ( -0.39, 1.40) .. controls (-0.32, 1.58) and (-0.32, 2.09) .. ( 0.00, 2.09) .. controls ( 0.32, 2.09) and ( 0.32, 1.58) .. ( 0.39, 1.40) decorate {arc [start angle=-60,end angle=-120,radius=0.77]} -- cycle;
%
% Comb %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chicken@part@draw[\chicken@comb] (0.04,2.132) ellipse[x radius=0.22, y radius=0.06, rotate=70];
@@ -175,7 +187,7 @@
% Bill %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifchicken@back
\chicken@part@draw[\chicken@comb] (-0.04, 1.57) ellipse[x radius=0.04, y radius=0.08, rotate=-20];
- \chicken@part@draw[\chicken@comb] (0.04, 1.57) ellipse[x radius=0.04, y radius=0.08, rotate=20];
+ \chicken@part@draw[\chicken@comb] (0.04, 1.57) ellipse[x radius=0.04, y radius=0.08, rotate=20];
\chicken@part@draw[\chicken@bill] (-0.09, 1.7) -- (0, 1.58) -- (0.09, 1.7) arc [start angle=50, end angle=130, radius=0.14] -- cycle;
\fi% back
%
@@ -193,10 +205,10 @@
%
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifchicken@back
- \chicken@part@draw[\chicken@body] (0.12, 0.795) ellipse[x radius=0.20, y radius=0.06, rotate=58];
- \chicken@part@draw[\chicken@body] (0.04, 0.87) ellipse[x radius=0.25, y radius=0.06, rotate=80];
- \chicken@part@draw[\chicken@body] (-0.03, 0.83) ellipse[x radius=0.20, y radius=0.06, rotate=102];
- \chicken@part@draw[\chicken@body] (-0.082, 0.76) ellipse[x radius=0.17, y radius=0.06, rotate=130];
+ \chicken@part@draw[chicken@bodysat50] (0.12, 0.795) ellipse[x radius=0.20, y radius=0.06, rotate=58];
+ \chicken@part@draw[chicken@bodysat50] (0.04, 0.87) ellipse[x radius=0.25, y radius=0.06, rotate=80];
+ \chicken@part@draw[chicken@bodysat50] (-0.03, 0.83) ellipse[x radius=0.20, y radius=0.06, rotate=102];
+ \chicken@part@draw[chicken@bodysat50] (-0.082, 0.76) ellipse[x radius=0.17, y radius=0.06, rotate=130];
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -213,7 +225,7 @@
\def\chicken@drawbaby{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.53, 0.1) rectangle (0.53, 1.22);
@@ -230,7 +242,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -248,7 +260,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts (center: x=0.925)
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -341,62 +353,62 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-chickens}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-chickens}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic chicken}}
%\chicken
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic chicken can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\chicken[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Comb colour}}
%\chicken[comb=green]
%\end{tcblisting}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\chicken[eye=red]
%\end{tcblisting}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil color}}
%\chicken[pupil=red]
%\end{tcblisting}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Bill colour}}
%\chicken[bill=red]
%\end{tcblisting}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Foot colour}}
%\chicken[feet=red]
%\end{tcblisting}
%
-%There is also the special option \lstinline|baby| which will draw a baby chicken called \emph{Pio}:
-%\begin{tcblisting}{}
+%There is also the special option \saminline|baby| which will draw a baby chicken called \emph{Pio}:
+%\begin{tcblisting}{title={Baby chicken}}
%\chicken[baby=yellow]
%\end{tcblisting}
%
%To view the chicken from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\chicken[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the chicken 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the chicken 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\chicken[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\chicken[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty b/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
index d98c1398f2..1e5bba28a7 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-coatis.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-coatis}[2022/06/17 version v1.0 Drawing coatis in TikZ]
+\ProvidesPackage{tikzlings-coatis}[2025/01/05 version v2.2 Drawing coatis in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -30,6 +30,8 @@
\newif\ifcoati@threeD
\newif\ifcoati@sideward
+\newif\ifcoati@leftstep
+\newif\ifcoati@rightstep
\newif\ifcoati@back
\newif\ifcoati@contour
@@ -47,9 +49,9 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.store in = \coati@body,
- body = brown!50!darkgray!97!yellow,
+ body = brown!50!darkgray!97!yellow!50!darkgray,
eye/.store in = \coati@eye,
- eye = \coati@body!50!black,
+ eye = coati@bodybright!50!black,
rotatehead/.store in = \coati@rotatehead,
rotate head/.forward to = /coati/rotatehead,
rotatehead = 0,
@@ -58,19 +60,23 @@
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \coati@threeDtrue,
+ 3D/.code = \coati@threeDtrue,
sideward/.code = \coati@sidewardtrue,
- back/.code = \coati@backtrue,
+ leftstep/.code = \coati@leftsteptrue,
+ left step/.forward to = /coati/leftstep,
+ rightstep/.code = \coati@rightsteptrue,
+ right step/.forward to = /coati/rightstep,
+ back/.code = \coati@backtrue,
contour/.code = \coati@contourtrue
\def\coati@contour{#1},
- contour/.default = black,
- outline/.forward to = /coati/contour,
+ contour/.default = black,
+ outline/.forward to = /coati/contour,
}
\def\coati@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.84,0.1) rectangle (1.63,2.26);
@@ -87,7 +93,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -102,75 +108,93 @@
\fi% contour
\fi% 3D
%
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % generating saturated version of body colour
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \extractcolorspecs{\coati@body}{\coati@model}{\coati@colorspec}
+ \convertcolorspec{\coati@model}{\coati@colorspec}{hsb}{\coati@hsbcolorspec}
+ \pgfmathsetmacro{\coati@hue}{(array({\coati@hsbcolorspec},0))}
+ \pgfmathsetmacro{\coati@sat}{(array({\coati@hsbcolorspec},1)+0.1)}
+ \pgfmathsetmacro{\coati@bright}{(array({\coati@hsbcolorspec},2))+0.13}
+ \definecolor{coati@bodybright}{hsb}{\coati@hue,\coati@sat,\coati@bright}
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname coatihookbackground\endcsname
\csname tikzlinghookbackground\endcsname
- %
+ %
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!80!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
- \coati@part@draw[\coati@body!80!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \ifcoati@leftstep
+ \coati@part@draw[coati@bodybright!80!white] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \coati@part@draw[coati@bodybright!80!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
+ \ifcoati@rightstep
+ \coati@part@draw[coati@bodybright!80!white] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \coati@part@draw[coati@bodybright!80!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
%
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifcoati@back
- \coati@part@draw[\coati@body!50!darkgray] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
- \begin{scope}
- \clip (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.8,1.15)}] (0.6,1.1) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.9,1.35)}] (0.7,1.3) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-50:(1.0,1.5)}] (0.8,1.45) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-80:(1.2,1.6)}] (1.0,1.55) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-130:(1.5,1.5)}] (1.3,1.45) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.55,0.65)}] (0.35,0.6) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.65,0.9)}] (0.45,0.85) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-40:(0.35,0.45)}] (0.15,0.4) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-60:(0.05,0.3)}] (-0.15,0.25) rectangle ++(0.4,0.1);
- \end{scope}
+ \coati@part@draw[\coati@body] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (1.48, 1.554) -- (1.4139, 1.4752).. controls (1.4389, 1.4583) and (1.4649, 1.4375) .. (1.492, 1.4127) -- (1.5537, 1.4862).. controls (1.5333, 1.5087) and (1.5084, 1.5318) .. (1.48, 1.554) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (1.2166, 1.6794) -- (1.2121, 1.5329).. controls (1.2432, 1.5385) and (1.2764, 1.5364) .. (1.3119, 1.5258) -- (1.3158, 1.6501).. controls (1.2832, 1.6633) and (1.2498, 1.6736) .. (1.2166, 1.6794) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (1.0093, 1.6405).. controls (0.9821, 1.6229) and (0.9566, 1.6014) .. (0.9325, 1.5765) -- (1.0545, 1.4296).. controls (1.0777, 1.4572) and (1.1021, 1.4801) .. (1.1281, 1.4976) -- (1.0093, 1.6405) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange](0.8327, 1.4466).. controls (0.8154, 1.4193) and (0.7988, 1.3901) .. (0.7823, 1.3602) -- (0.9497, 1.2635).. controls (0.9655, 1.2946) and (0.9818, 1.3236) .. (0.9987, 1.3507) -- (0.8327, 1.4466) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.7253, 1.2508).. controls (0.7107, 1.2213) and (0.6961, 1.1912) .. (0.6814, 1.1607) -- (0.859, 1.0582).. controls (0.8717, 1.0897) and (0.8844, 1.1212) .. (0.8975, 1.1514) -- (0.7253, 1.2508) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.5972, 0.9882).. controls (0.5821, 0.9583) and (0.5665, 0.9288) .. (0.5505, 0.8997) -- (0.7501, 0.7845).. controls (0.7627, 0.8154) and (0.7754, 0.8463) .. (0.7878, 0.8781) -- (0.5972, 0.9882) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.464, 0.7574).. controls (0.4448, 0.7293) and (0.4248, 0.7022) .. (0.4037, 0.6767) -- (0.6357, 0.5427).. controls (0.6519, 0.5703) and (0.6676, 0.5997) .. (0.6828, 0.6311) -- (0.464, 0.7574) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange](0.2881, 0.5624).. controls (0.2869, 0.5615) and (0.2857, 0.5604) .. (0.2845, 0.5595).. controls (0.2564, 0.5378) and (0.2295, 0.521) .. (0.2036, 0.5074) -- (0.3683, 0.3141).. controls (0.4022, 0.3288) and (0.4337, 0.3442) .. (0.461, 0.3595) -- (0.2881, 0.5624) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.0822, 0.4628).. controls (0.0453, 0.4543) and (0.0123, 0.4501) .. (-0.0164, 0.445) -- (0.039, 0.2211).. controls (0.0701, 0.2242) and (0.1034, 0.23) .. (0.1379, 0.2379) -- (0.0822, 0.4628) -- cycle;
\fi% back
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!80!white] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70];
- \coati@part@draw[\coati@body!80!white] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
+ \coati@part@draw[coati@bodybright!80!white] (-0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=70];
+ \coati@part@draw[coati@bodybright!80!white] (0.625,1) ellipse[x radius=0.42, y radius=0.13, rotate=-70];
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!50!darkgray] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ \coati@part@draw[\coati@body] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname coatihookbelly\endcsname
\csname tikzlinghookbelly\endcsname
- %
+ %
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}[rotate around={\coati@rotatehead:(0,1.68)}]
%
% Sidewards head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifcoati@sideward
- %
+ %
% Left Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!45!white!95!orange] (-0.212, 2.135) ellipse[x radius=0.09, y radius=0.12, rotate=-16];
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (-0.212, 2.135) ellipse[x radius=0.09, y radius=0.12, rotate=-16];
\unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (-0.212, 2.135) ellipse[x radius=0.065, y radius=0.09, rotate=-16];
+ \coati@part@draw[coati@bodybright!80!white] (-0.212, 2.135) ellipse[x radius=0.065, y radius=0.09, rotate=-16];
\fi% back
- %
+ %
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifcoati@back
- \coati@part@draw[\coati@body!45!white!95!orange] (0.4569, 1.5608) .. controls (0.3680, 1.3594) and (0.0005, 1.2699) .. (-0.1826, 1.3507) .. controls (-0.3657, 1.4315) and (-0.5475, 1.7632) .. (-0.4587, 1.9646) .. controls (-0.1103, 2.3578) and (0.5123, 2.0832) .. (0.4569, 1.5608) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.4569, 1.5608) .. controls (0.3680, 1.3594) and (0.0005, 1.2699) .. (-0.1826, 1.3507) .. controls (-0.3657, 1.4315) and (-0.5475, 1.7632) .. (-0.4587, 1.9646) .. controls (-0.1103, 2.3578) and (0.5123, 2.0832) .. (0.4569, 1.5608) -- cycle;
\else% back
- \coati@part@draw[\coati@body!45!white!95!orange] (0.4808, 1.7911) .. controls (0.5682, 1.2837) and (-0.3468, 1.3575) .. (-0.6360, 1.3679) .. controls (-0.7582, 1.4729) and (-0.5198, 1.7911) .. (-0.5198, 1.7911) .. controls (-0.3597, 2.2914) and (0.3207, 2.2914) .. (0.4808, 1.7911) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.4808, 1.7911) .. controls (0.5682, 1.2837) and (-0.3468, 1.3575) .. (-0.6360, 1.3679) .. controls (-0.7582, 1.4729) and (-0.5198, 1.7911) .. (-0.5198, 1.7911) .. controls (-0.3597, 2.2914) and (0.3207, 2.2914) .. (0.4808, 1.7911) -- cycle;
\fi% back
- %
+ %
% Cheek %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (0.30, 1.4552) .. controls (0.30, 1.4552) and (0.1016, 1.7565) .. (-0.0005, 1.7581) -- (-0.6360, 1.3679) .. controls (-0.3083, 1.3437) and (0.0283, 1.332) .. (0.30, 1.4552) -- cycle (-0.4166, 1.9824) .. controls (-0.4166, 1.9824) and (-0.2413, 1.9758) .. (-0.2226, 1.9112) -- (-0.6875, 1.4906) .. controls (-0.6875, 1.4906) and (-0.5712, 1.7549) .. (-0.4166, 1.9824) -- cycle;
+ \coati@part@draw[coati@bodybright!80!white] (0.30, 1.4552) .. controls (0.30, 1.4552) and (0.1016, 1.7565) .. (-0.0005, 1.7581) -- (-0.6360, 1.3679) .. controls (-0.3083, 1.3437) and (0.0283, 1.332) .. (0.30, 1.4552) -- cycle (-0.4166, 1.9824) .. controls (-0.4166, 1.9824) and (-0.2413, 1.9758) .. (-0.2226, 1.9112) -- (-0.6875, 1.4906) .. controls (-0.6875, 1.4906) and (-0.5712, 1.7549) .. (-0.4166, 1.9824) -- cycle;
\fi% back
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifcoati@back
- \coati@part@draw[\coati@body!50!black] (-0.605, 1.453) circle[radius=0.09];
+ \coati@part@draw[coati@bodybright!50!black] (-0.605, 1.453) circle[radius=0.09];
\fi% back
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -180,29 +204,29 @@
\fi% back
%
% Right Ear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!45!white!95!orange] (0.417, 1.875) ellipse[x radius=0.1, y radius=0.14, rotate=-16];
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.417, 1.875) ellipse[x radius=0.1, y radius=0.14, rotate=-16];
\unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (0.417, 1.875) ellipse[x radius=0.07, y radius=0.10, rotate=-16];
+ \coati@part@draw[coati@bodybright!80!white] (0.417, 1.875) ellipse[x radius=0.07, y radius=0.10, rotate=-16];
\fi% back
%
% Normal Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else% sidewards
- %
+ %
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifcoati@back
- \coati@part@draw[\coati@body!45!white!95!orange] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
\else% back
- \coati@part@draw[\coati@body!45!white!95!orange] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
\fi% back
%
% Cheeks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (-0.4935, 1.7443) .. controls (-0.4935, 1.7443) and (-0.1917, 1.7798) .. (-0.1371, 1.7333) .. controls (-0.07, 1.2) and (-0.07, 1.2) .. (-0.07, 1.2) .. controls (-0.259, 1.3169) and (-0.46, 1.5665) .. (-0.4935, 1.7443) -- cycle (0.4935, 1.7443) .. controls (0.4935, 1.7443) and (0.1917, 1.7798) .. (0.1371, 1.7333) .. controls (0.07, 1.2) and (0.07, 1.2) .. (0.07, 1.2) .. controls (0.259, 1.3169) and (0.46, 1.5665) .. (0.4935, 1.7443) -- cycle;
+ \coati@part@draw[coati@bodybright!80!white] (-0.4935, 1.7443) .. controls (-0.4935, 1.7443) and (-0.1917, 1.7798) .. (-0.1371, 1.7333) .. controls (-0.07, 1.2) and (-0.07, 1.2) .. (-0.07, 1.2) .. controls (-0.259, 1.3169) and (-0.46, 1.5665) .. (-0.4935, 1.7443) -- cycle (0.4935, 1.7443) .. controls (0.4935, 1.7443) and (0.1917, 1.7798) .. (0.1371, 1.7333) .. controls (0.07, 1.2) and (0.07, 1.2) .. (0.07, 1.2) .. controls (0.259, 1.3169) and (0.46, 1.5665) .. (0.4935, 1.7443) -- cycle;
\fi% back
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!50!black] (0, 1.248) circle[radius=0.09];
+ \unless\ifcoati@back
+ \coati@part@draw[coati@bodybright!50!black] (0, 1.248) circle[radius=0.09];
\fi% back
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -212,37 +236,34 @@
\fi% back
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \coati@part@draw[\coati@body!45!white!95!orange] (0.44, 2.02) circle[radius=0.12];
- \coati@part@draw[\coati@body!45!white!95!orange] (-0.44, 2.02) circle[radius=0.12];
- \unless\ifcoati@back
- \coati@part@draw[\coati@body!80!white] (0.44, 2.02) circle[radius=0.09];
- \coati@part@draw[\coati@body!80!white] (-0.44, 2.02) circle[radius=0.09];
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.44, 2.02) circle[radius=0.12];
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (-0.44, 2.02) circle[radius=0.12];
+ \unless\ifcoati@back
+ \coati@part@draw[coati@bodybright!80!white] (0.44, 2.02) circle[radius=0.09];
+ \coati@part@draw[coati@bodybright!80!white] (-0.44, 2.02) circle[radius=0.09];
\fi% back
- %
+ %
\fi% sidewards
\end{scope}
%
% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifcoati@back
- \coati@part@draw[\coati@body!50!darkgray] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
- \begin{scope}
- \clip (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.8,1.15)}] (0.6,1.1) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.9,1.35)}] (0.7,1.3) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-50:(1.0,1.5)}] (0.8,1.45) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-80:(1.2,1.6)}] (1.0,1.55) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-130:(1.5,1.5)}] (1.3,1.45) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.55,0.65)}] (0.35,0.6) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-30:(0.65,0.9)}] (0.45,0.85) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-40:(0.35,0.45)}] (0.15,0.4) rectangle ++(0.4,0.1);
- \coati@part@draw[\coati@body!45!white!95!orange,rotate around={-60:(0.05,0.3)}] (-0.15,0.25) rectangle ++(0.4,0.1);
- \end{scope}
+ \coati@part@draw[\coati@body] (0.2845, 0.5595) .. controls (0.6382, 0.8326) and (0.7302, 1.5138) .. (1.0504, 1.6639) .. controls (1.3206, 1.7840) and (1.7609, 1.3537) .. (1.5608, 1.3437) .. controls (0.9203, 2.0442) and (0.8642, 0.6247) .. (0.5001, 0.3831) .. controls (0.3214, 0.2645) and (-0.1764, 0.1117) .. (-0.1408, 0.3245) .. controls (-0.1082, 0.5191) and (0.0508, 0.3791) .. (0.2845, 0.5595) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (1.48, 1.554) -- (1.4139, 1.4752).. controls (1.4389, 1.4583) and (1.4649, 1.4375) .. (1.492, 1.4127) -- (1.5537, 1.4862).. controls (1.5333, 1.5087) and (1.5084, 1.5318) .. (1.48, 1.554) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (1.2166, 1.6794) -- (1.2121, 1.5329).. controls (1.2432, 1.5385) and (1.2764, 1.5364) .. (1.3119, 1.5258) -- (1.3158, 1.6501).. controls (1.2832, 1.6633) and (1.2498, 1.6736) .. (1.2166, 1.6794) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (1.0093, 1.6405).. controls (0.9821, 1.6229) and (0.9566, 1.6014) .. (0.9325, 1.5765) -- (1.0545, 1.4296).. controls (1.0777, 1.4572) and (1.1021, 1.4801) .. (1.1281, 1.4976) -- (1.0093, 1.6405) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange](0.8327, 1.4466).. controls (0.8154, 1.4193) and (0.7988, 1.3901) .. (0.7823, 1.3602) -- (0.9497, 1.2635).. controls (0.9655, 1.2946) and (0.9818, 1.3236) .. (0.9987, 1.3507) -- (0.8327, 1.4466) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.7253, 1.2508).. controls (0.7107, 1.2213) and (0.6961, 1.1912) .. (0.6814, 1.1607) -- (0.859, 1.0582).. controls (0.8717, 1.0897) and (0.8844, 1.1212) .. (0.8975, 1.1514) -- (0.7253, 1.2508) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.5972, 0.9882).. controls (0.5821, 0.9583) and (0.5665, 0.9288) .. (0.5505, 0.8997) -- (0.7501, 0.7845).. controls (0.7627, 0.8154) and (0.7754, 0.8463) .. (0.7878, 0.8781) -- (0.5972, 0.9882) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.464, 0.7574).. controls (0.4448, 0.7293) and (0.4248, 0.7022) .. (0.4037, 0.6767) -- (0.6357, 0.5427).. controls (0.6519, 0.5703) and (0.6676, 0.5997) .. (0.6828, 0.6311) -- (0.464, 0.7574) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange](0.2881, 0.5624).. controls (0.2869, 0.5615) and (0.2857, 0.5604) .. (0.2845, 0.5595).. controls (0.2564, 0.5378) and (0.2295, 0.521) .. (0.2036, 0.5074) -- (0.3683, 0.3141).. controls (0.4022, 0.3288) and (0.4337, 0.3442) .. (0.461, 0.3595) -- (0.2881, 0.5624) -- cycle;
+ \coati@part@draw[coati@bodybright!45!white!95!orange] (0.0822, 0.4628).. controls (0.0453, 0.4543) and (0.0123, 0.4501) .. (-0.0164, 0.445) -- (0.039, 0.2211).. controls (0.0701, 0.2242) and (0.1034, 0.23) .. (0.1379, 0.2379) -- (0.0822, 0.4628) -- cycle;
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname coatihookbody\endcsname
\csname tikzlinghookbody\endcsname
- %
+ %
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -257,51 +278,57 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-coatis}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-coatis}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic coati}}
%\coati
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic coati can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\coati[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of the eyes can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\coati[eye=red]
%\end{tcblisting}
%
%The head of the coati can be rotated, but please don't overdo this, otherwise his neck might break!
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Rotate head}}
%\coati[rotatehead=-15]
%\end{tcblisting}
%
-%For the head an alternative sidewards facing head is available. It can be combined with the \lstinline|rotatehead| option.
-%\begin{tcblisting}{}
+%For the head an alternative sidewards facing head is available. It can be combined with the \saminline|rotatehead| option.
+%\begin{tcblisting}{title={Sidewards head}}
%\coati[sideward]
%\end{tcblisting}
%
+%And the coati can lift its legs:
+%\begin{tcblisting}{title={Walking}}
+%\coati[leftstep]
+%\coati[rightstep,xshift=2cm]
+%\end{tcblisting}
+%
%To view the coati from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\coati[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the coati 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the coati 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\coati[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\coati[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-doc-settings.sty b/graphics/pgf/contrib/tikzlings/tikzlings-doc-settings.sty
new file mode 100644
index 0000000000..dbe497f34b
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-doc-settings.sty
@@ -0,0 +1,159 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Personal helper theme for package documentations
+% Copyright samcarter
+%
+% This file may be distributed and/or modified
+% under the LaTeX Project Public License 1.3c or later
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Usage:
+% ln ~/Life/latex/beamertheme-sam/themesam.sty package-doc-settings.sty
+% \usepackage[
+% themecolor=samdblue
+% ]{\jobname-settings}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Colours
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{xcolor}
+\definecolor{samyellow}{RGB}{246,193,65}
+\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
+\definecolor{samlila}{RGB}{101,67,159}% Rainbow beamer theme
+\definecolor{samdblue}{RGB}{0,51,134}% beamer theme
+\definecolor{samlblue}{RGB}{22,89,155}% TikZducks
+\definecolor{samteal}{RGB}{25,143,157}% Tcolorbox beamer theme
+\definecolor{samlgreen}{RGB}{68,170,153}% Jigsaw
+\definecolor{samdgreen}{RGB}{78,178,125}
+\definecolor{samlgray}{RGB}{160,160,185}
+\definecolor{samdgray}{RGB}{60,60,85}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Package options
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{xkeyval}
+\DeclareOptionX{themecolor}[samdblue]{\colorlet{themecolor}{#1}}
+\DeclareOptionX{listingcolor}[samlblue]{\colorlet{listingcolor}{#1}}
+\ExecuteOptionsX{themecolor,listingcolor}
+\ProcessOptionsX
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Packages
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@ifclassloaded{beamer}{}{%
+ \RequirePackage[english]{babel}
+ \RequirePackage[paper=a4paper,margin=2.9cm]{geometry}
+ \RequirePackage{scrlayer-scrpage}
+ \let\hrulefillx\hrulefill
+ \RequirePackage[bitstream-charter]{mathdesign}
+ \let\hrulefill\hrulefillx
+ \RequirePackage[hang,flushmargin,bottom]{footmisc}
+ \RequirePackage{footnotehyper}
+ \makesavenoteenv{tcolorbox}
+ \RequirePackage[all]{nowidow}
+ \RequirePackage[colorlinks=true,breaklinks=true,allcolors=themecolor,hyperfootnotes=false]{hyperref}
+}
+\RequirePackage[T1]{fontenc}
+\RequirePackage{xspace}
+\RequirePackage{inconsolata}% mono font with bold, but italic is missing
+% \RequirePackage[scale=0.85]{cascadia-code}
+% \AddToHook{cmd/ttfamily/before}{\fontseries{sl}}
+\usepackage{synthslant}% to fake slented comments in inconsolata
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Listings
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage[cachedir=./.minted]{minted}
+
+\AddToHook{env/MintedVerbatim/before}{%
+ % optional arguments
+ \@namedef{PYG@tok@na}{\def\PYG@tc##1{\textcolor{black}{##1}}}%
+ % macros
+ \@namedef{PYG@tok@k}{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % curly brakets
+ \@namedef{PYG@tok@nb}{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % comments (italics won't work with the inconsolata font)
+ \@namedef{PYG@tok@c}{\def\PYG@tc##1{\textcolor{gray}{\textsynthslant{##1}}}}%
+}
+
+\usemintedstyle{default}
+\setminted{
+ breaksymbolleft={},
+ tabsize=2,
+ breaklines=true,
+}
+\newminted[samcode]{latex}{}
+\newmintinline[saminline]{latex}{}
+
+% use non-bold and all coloured for inline code in articles
+\ifdefined\insertaspectratio\else
+ \patchcmd{\minted@inputpyg@inline}{\minted@input}{\color{listingcolor}\renewcommand\textcolor[3][]{##3}\renewcommand\bfseries{}\minted@input}{}{}
+\fi
+
+\RequirePackage[most]{tcolorbox}
+\tcbuselibrary{minted}
+\tcbset{%
+ colframe=themecolor,
+ fonttitle=\bfseries,
+ sidebyside,
+ center lower,
+ righthand width=5.7cm,
+ bottom=2pt,
+ top=2pt,
+ left=3pt,
+ right=3pt,
+ sidebyside gap=10pt,
+ lower separated=false,
+ listing engine=minted,
+ minted language=latex,
+ colback=themecolor!10,
+ sharp corners,
+ boxrule=0pt,
+ before title={\strut}
+}
+
+% avoid page breaks right in front of the tcolorbox
+\@ifclassloaded{beamer}{}{
+ \tcbuselibrary{hooks}
+ \tcbset{before pre={\nopagebreak[4]}}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% document settings
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@ifclassloaded{scrartcl}{%
+ \KOMAoptions{parskip=half}
+ \addtokomafont{sectioning}{\color{themecolor}}
+ \addtokomafont{date}{\normalsize}
+ \addtokomafont{author}{\normalsize}
+ \setlength{\footnotemargin}{0.7em}
+}{}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Custom macros
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\providecommand*{\CTAN}{\textsc{CTAN}\xspace}
+\providecommand*{\TikZ}{Ti\emph{k}Z\xspace}
+\providecommand*{\miktex}{MiK\TeX\xspace}
+\providecommand*{\texlive}{\TeX{}Live\xspace}
+\providecommand*{\tikzbrick}{Ti\emph{k}Zbrick\xspace}
+\providecommand*{\tikzducks}{Ti\emph{k}Zducks\xspace}
+\providecommand*{\tikzlings}{Ti\emph{k}Zlings\xspace}
+\providecommand*{\tikzmarmots}{Ti\emph{k}Zmarmots\xspace}
+\providecommand*{\ConTeXt}{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf b/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf
index 06e80aa725..8fc71e8e20 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex b/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex
index 3740b1be81..e2f9a67f83 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-doc.tex
@@ -8,42 +8,39 @@
% https://github.com/samcarter/tikzlings
%
% 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
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\documentclass[parskip=half]{scrartcl}
+% arara: latexmk
+\documentclass{scrartcl}
+
+% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\title{The \texorpdfstring{\tikzlings}{tikzlings} package}
+\subtitle{drawing animals and beings in \TikZ}
+\author{%
+ \texorpdfstring{
+ \begin{tikzpicture}
+ \penguin
+ \end{tikzpicture}\\[0.8em]
+ \texttt{samcarter}\\
+ \url{https://github.com/samcarter/tikzlings}\\
+ \url{https://www.ctan.org/pkg/tikzlings}
+ }{samcarter}}
+\date{Version v2.2 \textendash{} 2025/01/05}
+
+\usepackage[
+ themecolor=samviolet
+]{\jobname-settings}
+
+\selectcolormodel{rgb}
+\colorlet{blue}{samlblue}
% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
-\usepackage[english]{babel}
-\usepackage[svgnames]{xcolor}
-\usepackage[bitstream-charter]{mathdesign}
\usepackage{tikzlings}
-\usepackage[most]{tcolorbox}
\usepackage{bearwear}
-\usepackage[paper=a4paper,margin=3cm]{geometry}
-\usepackage{url}
-\usepackage{xspace}
-\usepackage{scrlayer-scrpage}
-\usepackage[hang,flushmargin,bottom]{footmisc}
-\usepackage[%
- colorlinks=true,
- breaklinks=true,
- allcolors=SteelBlue!50!black
-]{hyperref}
\usetikzlibrary{3d}
\usetikzlibrary{tikzlings}
-% macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\CTAN}{\textsc{CTAN}\xspace}
-\newcommand{\TikZ}{Ti\emph{k}Z\xspace}
-\newcommand{\tikzducks}{Ti\emph{k}Zducks\xspace}
-\newcommand{\tikzmarmots}{Ti\emph{k}Zmarmots\xspace}
-\newcommand{\tikzlings}{Ti\emph{k}Zlings\xspace}
-\newcommand{\miktex}{MiK\TeX\xspace}
-\newcommand{\texlive}{\TeX{}Live\xspace}
-
% including commented lines from the .sty files %%%%%%%%%%%%%%%%%%%%%%
% thanks to Phelype Oleinik https://topanswers.xyz/tex?q=1861#a2092
\ExplSyntaxOn
@@ -107,18 +104,15 @@
\ExplSyntaxOff
% customisation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\addtokomafont{sectioning}{\color{SteelBlue}}
-\addtokomafont{date}{\normalsize}
-\addtokomafont{author}{\normalsize}
-
\deftocheading{toc}{}%
\setcounter{tocdepth}{1}
\newcommand*\gobbleentrynumber[1]{}
\newcommand*\mytocformat[1]{#1}
\newcommand*\mytocpageformat[1]{#1}
+\makeatletter
\RedeclareSectionCommand[
- toclinefill=\TOCLineLeaderFill,
+ toclinefill=\hyper@linkstart{link}{\Hy@tocdestname}\TOCLineLeaderFill\hyper@linkend,
tocnumwidth=0pt,
tocentrynumberformat=\gobbleentrynumber,
tocentryformat=\mytocformat,
@@ -126,7 +120,6 @@
tocbeforeskip=0.8ex plus 1pt minus 1pt
]{section}
-\makeatletter
\renewcommand{\sectionlinesformat}[4]{%
\Ifstr{#1}{section}{%
\parbox[t]{\linewidth}{%
@@ -134,98 +127,33 @@
\kern-.75\ht\strutbox\rule{\linewidth}{.8pt}%
}%
}{%
- \@hangfrom{\hskip #2#3}{#4}}%
+ \@hangfrom{\hskip #2#3}{#4}}%
}
\makeatother
\renewcommand*{\subsectionformat}{}
\renewcommand*{\sectionformat}{}
-\setlength{\footnotemargin}{0.7em}
-
-\colorlet{blue}{SteelBlue}
-
-\lstdefinestyle{duckstyle}{%
- language={[latex]TeX},
- tabsize=2,
- breaklines,
- basicstyle=\ttfamily,
- commentstyle={\color{green!50!black}\slshape},
- columns=fullflexible,
- alsodigit={-},
- alsoletter={3},
- emphstyle=\color{red!60!black},
- emph=[1]{
- % package names
- tikzlings, tikzlings-marmots, tikzlings-bears, tikzlings-coatis, tikzlings-koalas, tikzlings-marmots, tikzlings-owls, tikzlings-penguins, tikzlings-snowmen, tikzlings-mice, tikzlings-moles, tikzlings-sloths, tikzlings-pigs, tikzlings-cats, tikzlings-hippos, tikzlings-rhinos, tikzlings-pandas, tikzlings-bees, tikzlings-anteaters, tikzlings-squirrels, tikzlings-sheep, tikzlings-chickens, tikzlings-elephants, tikzlings-bugs, tikzlings-bats, tikzlings-wolves,
- % tikzlings options
- body, 3D, rotatehead, sideward, blush, sleeping, whiskers, teeth, shadow, askphil, leftstep, rightstep, eye, nose, pupil, bill, feet, belly, ask, phil, mouth, rotatearms, paws, back, pupilwidth, globalwarming, wings, antennas, stripes, arms, ears, tail, eyelid, hands, muzzle, schroedinger, toes, monocle, contour, comb, baby,
- % acessoires
- buttons, hat, tophat, beret, strawhat, ribbon, harlequin, niuqelrah, witch, magichat, magicstars, crown, queencrown, kingcrown, santa, chef, graduate, tassel, alien, book, bookcolour, signpost, signcolour, signback, speech, think, bubblecolour, pizza, cheese, baguette, cake, icecream, flavoura, flavourb, flavourc, milkshake, wine, cricket, hockey, football, crystalball, magicwand, rollingpin, lightsaber, torch, basket, easter, egga, eggb, eggc, crozier, shovel, pickaxe, umbrella, umbrellaclosed, handbag, cocktail, strawbroom, strawbroomstick, strawbroomribbon, broom, broomstick,
- % tikz options
- scale, yshift, xshift, rotate,
- % other
- figchild, standalone, document,
- },
- texcsstyle=*\color{SteelBlue!50!black}\bfseries,
- keywordstyle=\color{red!60!black}\bfseries,
- morekeywords={tikzpicture},
- moretexcs={
- % latex keywords
- usepackage, usetikzlibrary,
- % tikzlings names
- marmot, coati, bear, koala, owl, penguin, thing, tikzling, snowman, mouse, moles, sloth, pig, cat, hippo, rhino, panda, bee, anteater, squirrel, bearwear, sheep, chicken, elephant, bug, bat, wolf,
- % other
- tikzlinghookbackground, tikzlinghookbelly, tikzlinghookbody, tikzlinghookforeground, mousehookbelly
- },
- delim ={[s][\ttfamily\color{green!50!black}]{$}{$}},
- moredelim=[is][\footnotesize\ttfamily\color{orange!70!black}]{|}{|},
- index=[1][emph]
+\pgfmathsetseed{2}
+\setlength{\footheight}{50pt}
+
+\cfoot{\thepage}
+\cfoot{%
+ \begin{tikzpicture}[scale=0.5]
+ \tikzling[signpost={\thepage}]
+ \end{tikzpicture}
}
+\pagestyle{scrheadings}
\tcbset{%
- colframe=SteelBlue!50!black,
- arc=0mm,
- fonttitle=\bfseries,
- sidebyside,
- listing options={style=duckstyle},
- center lower,
- righthand width=6.5cm,
- bottom=0pt,
- top=0pt,
tikz lower,
height plus=3cm,
- colback=SteelBlue!30!white
}
-\lstset{style=duckstyle}
-
-\pgfmathsetseed{2}
-\setlength{\footheight}{50pt}
-
-\cfoot{\thepage}
-\pagestyle{scrheadings}
-
\newcommand{\coatihookbackground}{\path (-1.63,0.1) rectangle (1.63,2.26);}
\newcommand{\mousehookbackground}{\path (-1.6,0.1) rectangle (0.905, 2.17);}
\newcommand{\cathookbackground}{\path (-1.6,0.1) rectangle (0.905, 2.17);}
-\cfoot{%
- \begin{tikzpicture}[scale=0.5]
- \tikzling[signpost={\thepage}]
- \end{tikzpicture}
-}
-
-% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\title{The \texorpdfstring{\tikzlings}{tikzlings} package}
-\subtitle{drawing animals and beings in \TikZ}
-\author{%
- \texorpdfstring{\texttt{samcarter}\\[0.8em]
- \url{https://github.com/samcarter/tikzlings}\\
- \url{https://www.ctan.org/pkg/tikzlings}
- }{samcarter}}
-\date{Version v1.0 \textendash{} 2022/06/17}
-
\begin{document}
\maketitle
\thispagestyle{scrheadings}
@@ -233,12 +161,12 @@
\section*{Introduction}
\label{intro}
-The \tikzlings are a collection of little animals (and beings) drawn in \TikZ. It is the next evolutionary phase of the \tikzmarmots package extending it with further animals (and beings) and also adding the ability to natively use many of the accessories known from the \tikzducks package.
+The \tikzlings are a collection of little animals (and beings) drawn in \TikZ. It is the next evolutionary phase of the \tikzmarmots package extending it with further animals (and beings) and also adding the ability to natively use many of the accessories known from the \tikzducks package.
-This package is work in progress, therefore I would be happy to hear your feedback and ideas how to improve the package.
-The head version of the source code can be found on \url{github.com/samcarter/tikzlings}, including a bug tracker -- please make constructive use of it!
+This package is work in progress, therefore I would be happy to hear your feedback and ideas how to improve the package.
+The head version of the source code can be found on \url{github.com/samcarter/tikzlings}, including a bug tracker -- please make constructive use of it!
If you seek any other assistance (not bug reports/feature requests), I suggest asking a question at \url{topanswers.xyz/tex}.
-A more stable package version can be found on \CTAN (\url{https://www.ctan.org/pkg/tikzlings}) and is included in both \miktex and \texlive as \tikzlings.
+A more stable package version can be found on \CTAN (\url{https://www.ctan.org/pkg/tikzlings}) and is included in both \miktex and \texlive as \tikzlings.
\subsection*{Acknowledgements}
@@ -247,41 +175,44 @@ I'd like to thank the friendly and helpful community of \TeX{} users for their s
\subsection*{License}
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}.
+\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}.
\clearpage
\section*{The \tikzlings}
-The \tikzlings package is a collection of packages. It can either be loaded as a whole with \lstinline|\usepackage{tikzlings}| or the subpackages containing the individual animals (and beings) can be used separately, e.g.\ by loading \lstinline|\usepackage{tikzlings-marmots}|.
+The \tikzlings package is a collection of packages. It can either be loaded as a whole with \saminline|\usepackage{tikzlings}| or the subpackages containing the individual animals (and beings) can be used separately, e.g.\ by loading \saminline|\usepackage{tikzlings-marmots}|.
-The basic usage is the same for all animals (and beings). Inside a \lstinline|tikzpicture|, the \tikzlings can be added via \color{SteelBlue!50!black}\lstinline|\<name_of_the_tikzling>|\color{black}. For example
+The basic usage is the same for all animals (and beings). Inside a \saminline|tikzpicture|, the \tikzlings can be added via \saminline|\<name_of_the_tikzling>|. For example
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Basic Ti\emph{k}Zling}}
\marmot
\end{tcblisting}
-will produce a marmot. All usual \TikZ and \lstinline|pgf| keys can be passed as optional argument to change the appearance. For example scaling and rotating the \tikzlings can be done by
+will produce a marmot. All usual \TikZ and \saminline|pgf| keys can be passed as optional argument to change the appearance. For example scaling and rotating the \tikzlings can be done by
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Ti\emph{k}Zling with options}}
\penguin[rotate=30,scale=0.5]
\end{tcblisting}
-In addition to the standard options provided by \TikZ each \tikzlings also comes with some additional options which are listed in the following sections. If these additional options consist of multiple words they are available both with and without spaces, for example \lstinline|askphil| and \lstinline|ask phil| will be treated as the same.
+In addition to the standard options provided by \TikZ each \tikzlings also comes with some additional options which are listed in the following sections. If these additional options consist of multiple words they are available both with and without spaces, for example \saminline|askphil| and \saminline|ask phil| will be treated as the same.
To make customisation of the \tikzlings easier, some hooks are provided, which can be redefined by the user in order to add commands at specific layers:
\begin{itemize}
- \color{SteelBlue!50!black}
- \item \lstinline|\<name_of_the_tikzling>hookbackground|
- \item \lstinline|\<name_of_the_tikzling>hookbelly|
- \item \lstinline|\<name_of_the_tikzling>hookbody|
- \item \lstinline|\<name_of_the_tikzling>hookforeground|
+ \item \saminline|\<name_of_the_tikzling>hookbackground|
+ \item \saminline|\<name_of_the_tikzling>hookbelly|
+ \item \saminline|\<name_of_the_tikzling>hookbody|
+ \item \saminline|\<name_of_the_tikzling>hookforeground|
\end{itemize}
With regard to the individual components of the \tikzlings, they are located in the following z order:
-\begin{center}
-\begin{tikzpicture}[scale=1.05]
- \newcommand{\planes}{\fill[SteelBlue!30!white,opacity=0.9] (-1.9,-0.1) rectangle (1.9,2.4);}
- \newcommand{\hooks}{\draw[SteelBlue!50!black, rounded corners=3pt, line width=1pt] (-1.9,-0.1) rectangle (1.9,2.4);}
+
+\begingroup
+ \centering
+ \begin{tikzpicture}[scale=0.95]
+ \newcommand{\planewidth}{2.6}
+ \newcommand{\planeheight}{3.4}
+ \newcommand{\planes}{\fill[gray!20!white,opacity=0.9] (-\planewidth,-0.1) rectangle (\planewidth,\planeheight);}
+ \newcommand{\hooks}{\draw[themecolor, rounded corners=3pt, line width=1pt] (-\planewidth,-0.1) rectangle (\planewidth,\planeheight);}
\newcounter{layer}
\setcounter{layer}{0}
\begin{scope}[canvas is zy plane at x=\thelayer*1.8]
@@ -308,7 +239,7 @@ With regard to the individual components of the \tikzlings, they are located in
\newcommand{\rhinohookbackground}{
\pgfsetfillopacity{0}
\pgfsetstrokeopacity{0}
- }
+ }
\newcommand{\rhinohookbelly}{
\pgfsetfillopacity{1}
\pgfsetstrokeopacity{1}
@@ -331,24 +262,24 @@ With regard to the individual components of the \tikzlings, they are located in
\node[font=\footnotesize\ttfamily,rotate=45] at (0,0.1) {foreground};
\end{scope}
\end{tikzpicture}
-\end{center}
+ \par
+\endgroup
-{\raggedright In addition, the hooks \lstinline|\tikzlinghookbackground|, \lstinline|\tikzlinghookbelly|,\newline \lstinline|\tikzlinghookbody| and \lstinline|\tikzlinghookforeground| are available and will effect all\newline \tikzlings.}
+{\raggedright In addition, the hooks \saminline|\tikzlinghookbackground|, \saminline|\tikzlinghookbelly|,\newline \saminline|\tikzlinghookbody| and \saminline|\tikzlinghookforeground| are available and will effect all\newline \tikzlings.}
A short example how the hooks can be used:
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Hooks}}
\newcommand{\mousehookbelly}{%
-\fill[red!80!black]
-(0.55, 1.35) -- (0.65, 0.3) --
-(-0.65, 0.3) -- (-0.55, 1.35)
--- (0.0, 0.9) -- cycle;
+ \fill[red!80!black] (0.55, 1.35) --
+ (0.65, 0.3) -- (-0.65, 0.3) --
+ (-0.55, 1.35) -- (0.0, 0.9) -- cycle;
}
\mouse
\end{tcblisting}
-Another way to use the \tikzlings is the \TikZ library of the same name. By loading this library, all macros from the normal package can be used. In addition the \TikZ library also defines the \tikzlings as \lstinline|pic|'s:
-\begin{tcolorbox}
-\begin{lstlisting}[morekeywords={bear,penguin,coati,thing,cat,duck,standalone,tikz,document}]
+Another way to use the \tikzlings is the \TikZ library of the same name. By loading this library, all macros from the normal package can be used. In addition the \TikZ library also defines the \tikzlings as \saminline|pic|'s:
+\begin{tcolorbox}[title={Ti\emph{k}z library and \texttt{\textbackslash pic}}]
+\begin{samcode}
\documentclass{standalone}
\usepackage{tikz}
@@ -357,16 +288,16 @@ Another way to use the \tikzlings is the \TikZ library of the same name. By load
\begin{document}
\begin{tikzpicture}
\path (1,0) pic{bear}
- (2,1) pic[
- coati/body=blue,
- scale=0.5
- ]{coati}
- (3,2) pic[
- thing/hat=red
- ]{penguin};
+ (2,1) pic[
+ coati/body=blue,
+ scale=0.5
+ ]{coati}
+ (3,2) pic[
+ thing/hat=red
+ ]{penguin};
\end{tikzpicture}
-\end{document}
-\end{lstlisting}
+\end{document}
+\end{samcode}
\tcblower
\begin{tikzpicture}
@@ -385,7 +316,7 @@ Another way to use the \tikzlings is the \TikZ library of the same name. By load
\subsection*{List of all \tikzlings:}
\begingroup
- \hypersetup{hidelinks}
+ \hypersetup{hidelinks,linktoc=all}
\tableofcontents
\endgroup
@@ -396,7 +327,7 @@ Another way to use the \tikzlings is the \TikZ library of the same name. By load
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Random Tikzling
+% Random Tikzling
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
@@ -406,47 +337,47 @@ Another way to use the \tikzlings is the \TikZ library of the same name. By load
\subsection{Package name}
-\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
+\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth,title={Package usage}]
\vspace*{0.5cm}
-\lstinline|\usepackage{tikzlings}|
+\saminline|\usepackage{tikzlings}|
\vspace*{0.5cm}
\end{tcolorbox}
\subsection{Basic Usage}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Basic Ti\emph{k}Zling}}
\tikzling
\end{tcblisting}
\subsection{Options}
-Options common for all \tikzlings are supported for the \lstinline|\tikzling|. These are the ability to change the body colour
-\begin{tcblisting}{}
+Options common for all \tikzlings are supported for the \saminline|\tikzling|. These are the ability to change the body colour
+\begin{tcblisting}{title={Body colour}}
\tikzling[body=blue]
\end{tcblisting}
to view the \tikzlings from behind
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Back view}}
\tikzling[back]
\end{tcblisting}
-and the \lstinline|3D| key, which will make the Ti\emph{k}Zlings 3-dimensional:
-\begin{tcblisting}{}
+and the \saminline|3D| key, which will make the Ti\emph{k}Zlings 3-dimensional:
+\begin{tcblisting}{title={3D view}}
\tikzling[3D]
\end{tcblisting}
-And finally the \lstinline|contour| key will only draw the outlines:
-\begin{tcblisting}{}
+And finally the \saminline|contour| key will only draw the outlines:
+\begin{tcblisting}{title={Contours}}
\tikzling[contour=black]
\end{tcblisting}
-If an option of a specific Ti\emph{k}Zling is used (for example \lstinline|sleeping|, which only the koala and sloth can do) this option will only work for these \tikzlings. For all other \tikzlings, the option will be silently ignored.
+If an option of a specific Ti\emph{k}Zling is used (for example \saminline|sleeping|, which only the koala and sloth can do) this option will only work for these \tikzlings. For all other \tikzlings, the option will be silently ignored.
-In addition all usual \TikZ and \lstinline|pgf| keys can be used in the optional argument as well as the accessories presented in the following section.
+In addition all usual \TikZ and \saminline|pgf| keys can be used in the optional argument as well as the accessories presented in the following section.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Accessories
+% Accessories
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
@@ -454,125 +385,143 @@ In addition all usual \TikZ and \lstinline|pgf| keys can be used in the optional
To customise the \tikzlings the package provides a number of accessories which can be added to all the \tikzlings simply by adding the respective keyword as optional argument:
-\begin{tcblisting}{}
-\bear[hat]
+\begin{tcblisting}{title={Basic usage}}
+\bear[
+ hat
+]
\end{tcblisting}
-
+
For most of these items, the colour can be customised:
-\begin{tcblisting}{}
-\koala[crown=orange!50!yellow]
+\begin{tcblisting}{title={Customisation}}
+\koala[
+ crown=orange!50!yellow
+]
\end{tcblisting}
-Unfortunately it is very difficult to create accessories that will fit all the different shapes of the \tikzlings. Therefore it is also possible to add them separately as optional argument of the \lstinline|\thing| macro, which allows more control of their size and placement:
+Unfortunately it is very difficult to create accessories that will fit all the different shapes of the \tikzlings. Therefore it is also possible to add them separately as optional argument of the \saminline|\thing| macro, which allows more control of their size and placement:
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Further customisation}}
\owl
-\thing[tophat,scale=1.5,yshift=-0.6cm,xshift=-0.05cm]
+\thing[
+ tophat,
+ scale=1.5,
+ yshift=-0.6cm,
+ xshift=-0.05cm
+]
\end{tcblisting}
A list of all available accessories is given below. For completeness the default colours for each key are shown, but actually it is unnecessary unless it should be changed. In case more than one key is shown, all but the first are optional.
\subsection{Hats}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Hat}}
\penguin[
hat=blue!40!black
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Top hat}}
\snowman[
tophat=black!90!white
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Beret}}
\mouse[
beret=black
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Strawhat}}
\anteater[
strawhat=blue,
ribbon=black
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Harlequin hat}}
\coati[
harlequin=blue,
niuqelrah=red
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Witch hat}}
\cat[
witch=gray
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Magic hat}}
\bear[
magichat=violet,
magicstars=yellow!80!brown
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Crown}}
\sheep[
crown=yellow!90!orange
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Queen crown}}
\bat[
queencrown=yellow
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={King crown}}
\marmot[
kingcrown=gray
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Santa hat}}
\mouse[
santa=red!80!black
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Chefs hat}}
\bear[
chef=gray!20!white
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Graduate cap}}
\wolf[
graduate=black,
tassel=red
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Alien antennas}}
\penguin[
alien=green
]
\end{tcblisting}
+\begin{tcblisting}{title={Sombrero}}
+\marmot[
+ sombrero=orange!70!yellow,
+ sombreroa= green!70!blue,
+ sombrerob= red,
+ sombreroc= blue
+]
+\end{tcblisting}
+
\subsection{Communication}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Book}}
\coati[
book={\tiny\TeX},
bookcolour=brown
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Sign post}}
\pig[
signpost={\TeX},
signcolour= brown!50!black,
@@ -580,14 +529,14 @@ A list of all available accessories is given below. For completeness the default
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Speech bubble}}
\bear[
speech={\TeX},
bubblecolour=gray!30!white
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Thinking bubble}}
\penguin[
think={\TeX},
bubblecolour=gray!30!white
@@ -596,31 +545,31 @@ A list of all available accessories is given below. For completeness the default
\subsection{Food}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Pizza}}
\koala[
pizza
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Cheese}}
\mouse[
cheese=yellow!30!orange!60!white
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Baguette}}
\bug[
baguette=brown
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Cake}}
\moles[
cake=violet
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Ice cream}}
\marmot[
icecream=brown!60!gray,
flavoura=brown!50!black,
@@ -629,33 +578,45 @@ A list of all available accessories is given below. For completeness the default
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Milk shake}}
\penguin[
milkshake=red!20!white
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={wine}}
\owl[
wine=red!70!black
]
\end{tcblisting}
+\begin{tcblisting}{title={Cocktail}}
+\bear[
+ cocktail
+]
+\end{tcblisting}
+
+\begin{tcblisting}{title={Banana}}
+\ape[
+ banana=yellow!80!orange
+]
+\end{tcblisting}
+
\subsection{Sports}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Cricket bat}}
\coati[
cricket=brown
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Hockey stick}}
\bug[
hockey=brown
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Football}}
\elephant[
football=white
]
@@ -663,43 +624,43 @@ A list of all available accessories is given below. For completeness the default
\subsection{Other items}
-\begin{tcblisting}{}
-\marmot[
+\begin{tcblisting}{title={Crystal ball}}
+\meerkat[
crystalball=cyan
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Magic wand}}
\bear[
magicwand
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Rolling pin}}
\coati[
rollingpin=brown
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Light sabre}}
\penguin[
lightsaber=green
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Torch}}
\snowman[
torch=gray
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Basket}}
\mouse[
basket=brown!70!gray
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Easter Basket}}
\sloth[
easter=brown!70!gray,
egga=blue,
@@ -708,25 +669,25 @@ A list of all available accessories is given below. For completeness the default
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Crozier}}
\koala[
crozier=brown
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Shovel}}
\snowman[
shovel=gray
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Pick axe}}
\penguin[
pickaxe=gray
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Straw broom}}
\bug[
strawbroom=brown!50!white,
strawbroomstick=brown,
@@ -734,34 +695,49 @@ A list of all available accessories is given below. For completeness the default
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={broom}}
\chicken[
broom=brown,
broomstick=gray!50!black
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Open umbrella}}
\rhino[
umbrella=cyan
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Closed umbrella}}
\marmot[
umbrellaclosed=cyan
]
\end{tcblisting}
-\begin{tcblisting}{}
+\begin{tcblisting}{title={Handbag}}
\mouse[
handbag=red!70!black
]
\end{tcblisting}
-\begin{tcblisting}{}
-\bear[
- cocktail
+\begin{tcblisting}{title={Stick with leaf}}
+\ape[
+ stick=brown!50!black,
+ leaf=green!70!red
+]
+\end{tcblisting}
+
+\subsection{Random accessories}
+
+Given the number of available accessories, it can be hard to decide which ones to use.
+Luckily, one does not need to decide and pick random accessories instead.
+There are two macros for this purpose, \saminline|\randomhead| and \saminline|\randomaccessories|, which will choose a random headpiece and a random other accessories, respectively.
+Please note, that one needs to initialise these macros with \saminline|\shufflethings| to generate the random accessories.
+\begin{tcblisting}{title={Random accessories}}
+\shufflethings
+\coati[
+ \randomhead,
+ \randomaccessories
]
\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty b/graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty
index ffd517febd..d846c1d9d4 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-elephants.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-elephants}[2022/06/17 version v1.0 Draw teddy elephants in TikZ]
+\ProvidesPackage{tikzlings-elephants}[2025/01/05 version v2.2 Draw teddy elephants in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -48,24 +48,34 @@
body/.store in = \elephant@body,
body = gray,
eye/.store in = \elephant@eye,
- eye = \elephant@body!30!black,
+ eye = \elephant@body!30!black,
+ ears/.store in = \elephant@ears,
+ ears = \elephant@body!30!white,
+ feet/.store in = \elephant@feet,
+ feet = \elephant@body!30!white,
+ hands/.store in = \elephant@hands,
+ hands = \elephant@body!30!white,
+ belly/.store in = \elephant@belly,
+ belly = \elephant@body!30!white,
+ tail/.store in = \elephant@tail,
+ tail = \elephant@body!30!white,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \elephant@threeDtrue,
- back/.code = \elephant@backtrue,
+ 3D/.code = \elephant@threeDtrue,
+ back/.code = \elephant@backtrue,
contour/.code = \elephant@contourtrue
\def\elephant@contour{#1},
- contour/.default = black,
- outline/.forward to = /elephant/contour,
+ contour/.default = black,
+ outline/.forward to = /elephant/contour,
}
\def\elephant@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.86, 0.0) rectangle (0.86, 2.17);
@@ -82,7 +92,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -100,7 +110,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -113,16 +123,16 @@
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifelephant@back
- \elephant@part@draw[\elephant@body] (0.425, 0.3) circle[radius=0.28];
+ \elephant@part@draw[\elephant@body] (0.425, 0.3) circle[radius=0.28];
\elephant@part@draw[\elephant@body] (-0.425, 0.3) circle[radius=0.28];
\elephant@part@draw[\elephant@body] (0.57,0.74) circle [radius=0.20];
\elephant@part@draw[\elephant@body] (-0.57,0.74) circle [radius=0.20];
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \elephant@part@draw[\elephant@body] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
+ \elephant@part@draw[\elephant@body] (0,0.75) ellipse[x radius=0.55, y radius=0.65];
\unless\ifelephant@back
- \elephant@part@draw[\elephant@body!30!white] (0,0.7) ellipse[x radius=0.35, y radius=0.4];
+ \elephant@part@draw[\elephant@belly] (0,0.7) ellipse[x radius=0.35, y radius=0.4];
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -131,26 +141,26 @@
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifelephant@back
- \elephant@part@draw[\elephant@body] (0.425, 0.3) circle[radius=0.28];
+ \elephant@part@draw[\elephant@body] (0.425, 0.3) circle[radius=0.28];
\elephant@part@draw[\elephant@body] (-0.425, 0.3) circle[radius=0.28];
- \elephant@part@draw[\elephant@body!30!white] (0.425, 0.3) circle[radius=0.17];
- \elephant@part@draw[\elephant@body!30!white] (-0.425, 0.3) circle[radius=0.17];
- \elephant@part@draw[\elephant@body] (0.57,0.75) circle [radius=0.20];
- \elephant@part@draw[\elephant@body!30!white] (0.57,0.74) circle [radius=0.12];
+ \elephant@part@draw[\elephant@feet] (0.425, 0.3) circle[radius=0.17];
+ \elephant@part@draw[\elephant@feet] (-0.425, 0.3) circle[radius=0.17];
+ \elephant@part@draw[\elephant@body] (0.57,0.75) circle [radius=0.20];
+ \elephant@part@draw[\elephant@hands] (0.57,0.74) circle [radius=0.12];
\elephant@part@draw[\elephant@body] (-0.57,0.74) circle [radius=0.20];
- \elephant@part@draw[\elephant@body!30!white] (-0.57,0.74) circle [radius=0.12];
+ \elephant@part@draw[\elephant@hands] (-0.57,0.74) circle [radius=0.12];
\fi% back
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\elephant@part@draw[\elephant@body] (0.5, 1.7) ellipse [x radius=0.35,y radius=0.45];
\elephant@part@draw[\elephant@body] (-0.5, 1.7) ellipse [x radius=0.35,y radius=0.45];
\unless\ifelephant@back
- \elephant@part@draw[\elephant@body!30!white] (0.5, 1.7) ellipse [x radius=0.25,y radius=0.35];
- \elephant@part@draw[\elephant@body!30!white] (-0.5, 1.7) ellipse [x radius=0.25,y radius=0.35];
+ \elephant@part@draw[\elephant@ears] (0.5, 1.7) ellipse [x radius=0.25,y radius=0.35];
+ \elephant@part@draw[\elephant@ears] (-0.5, 1.7) ellipse [x radius=0.25,y radius=0.35];
\fi% back
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \elephant@part@draw[\elephant@body] (0, 1.55) circle[radius=0.5];
+ \elephant@part@draw[\elephant@body] (0, 1.55) circle[radius=0.5];
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifelephant@back
@@ -165,15 +175,15 @@
\fi% 3D
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \elephant@part@draw[\elephant@eye] (-0.155, 1.7) circle[radius=0.05];
- \elephant@part@draw[\elephant@eye] (0.155, 1.7) circle[radius=0.05];
+ \elephant@part@draw[\elephant@eye] (-0.155, 1.7) circle[radius=0.05];
+ \elephant@part@draw[\elephant@eye] (0.155, 1.7) circle[radius=0.05];
%
\fi% back
%
% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifelephant@back
- \draw[\elephant@body!30!white,line width=\scalingfactor*0.6pt] (0, 0.5904) .. controls (-0.1619, 0.4147) and (0.203, 0.4157) .. (0.2422, 0.2712);
- \elephant@part@draw[\elephant@body!30!white] (0.2008, 0.1949) .. controls (0.2452, 0.2121) and (0.2799, 0.242) .. (0.2691, 0.2755) .. controls (0.2611, 0.3005) and (0.2127, 0.3115) .. (0.1927, 0.2945) .. controls (0.1674, 0.2729) and (0.2082, 0.2383) .. (0.2008, 0.1949) -- cycle;
+ \draw[\elephant@tail,line width=\scalingfactor*0.6pt] (0, 0.5904) .. controls (-0.1619, 0.4147) and (0.203, 0.4157) .. (0.2422, 0.2712);
+ \elephant@part@draw[\elephant@tail] (0.2008, 0.1949) .. controls (0.2452, 0.2121) and (0.2799, 0.242) .. (0.2691, 0.2755) .. controls (0.2611, 0.3005) and (0.2127, 0.3115) .. (0.1927, 0.2945) .. controls (0.1674, 0.2729) and (0.2082, 0.2383) .. (0.2008, 0.1949) -- cycle;
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -194,41 +204,56 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-elephants}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-elephants}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic elephant}}
%\elephant
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic elephant can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\elephant[body=blue]
%\end{tcblisting}
%
-%In addition to the colour of the body, the colour of the eyes can be adjusted:
-%\begin{tcblisting}{}
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{title={Ear colour}}
+%\elephant[ears=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Eye colour}}
%\elephant[eye=red]
%\end{tcblisting}
+%\begin{tcblisting}{title={Hand colour}}
+%\elephant[hands=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Belly colour}}
+%\elephant[belly=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Foot colour}}
+%\elephant[feet=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Tail colour}}
+%\elephant[back,tail=red]
+%\end{tcblisting}
%
%To view the elephant from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\elephant[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the elephant 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the elephant 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\elephant[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\elephant[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty b/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
index 4761516d53..22f48a85c0 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-hippos.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-hippos}[2022/06/17 version v1.0 Drawing hippos in TikZ]
+\ProvidesPackage{tikzlings-hippos}[2025/01/05 version v2.2 Drawing hippos in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -31,6 +31,7 @@
\newif\ifhippo@threeD
\newif\ifhippo@back
\newif\ifhippo@contour
+\newif\ifhippo@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -46,33 +47,36 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.store in = \hippo@body,
- body = gray,
+ body = gray!55!white,
eye/.store in = \hippo@eye,
- eye = white,
+ eye = white,
pupil/.store in = \hippo@pupil,
- pupil = black,
+ pupil = black,
toes/.store in = \hippo@toes,
- toes = \hippo@body!55!white,
+ toes = \hippo@body,
mouth/.store in = \hippo@mouth,
- mouth = \hippo@body!70!black,
+ mouth = \hippo@body!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \hippo@threeDtrue,
+ openmouth/.code = \hippo@openmouthtrue,
+ open mouth/.forward to = /hippo/openmouth,
+ 3D/.code = \hippo@threeDtrue
+ \def\hippo@mouth{black},
back/.code = \hippo@backtrue,
contour/.code = \hippo@contourtrue
\def\hippo@contour{#1}
\def\hippo@mouth{#1},
- contour/.default = black,
- outline/.forward to = /hippo/contour,
+ contour/.default = black,
+ outline/.forward to = /hippo/contour,
}
\def\hippo@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.625,0.1) rectangle (0.625, 2.17);
@@ -89,7 +93,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -107,46 +111,43 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname hippohookbackground\endcsname
- \csname tikzlinghookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \hippo@part@draw[\hippo@body] (0.23,2.03) ellipse[x radius=0.09, y radius=0.13, rotate=-30];
- \hippo@part@draw[\hippo@body] (-0.23,2.03) ellipse[x radius=0.09, y radius=0.13, rotate=30];
+ \hippo@part@draw[\hippo@body!70!black] (0.23,2.03) ellipse[x radius=0.09, y radius=0.13, rotate=-30];
+ \hippo@part@draw[\hippo@body!70!black] (-0.23,2.03) ellipse[x radius=0.09, y radius=0.13, rotate=30];
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifhippo@back
- \begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \hippo@part@draw[\hippo@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \hippo@part@draw[\hippo@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \end{scope}
+ \hippo@part@draw[\hippo@body!70!black] (-0.08,0.13) arc [start angle=0, end angle=180, x radius=0.17, y radius=0.19] -- cycle;
+ \hippo@part@draw[\hippo@body!70!black](0.08,0.13) arc [start angle=180, end angle=0, x radius=0.17, y radius=0.19] -- cycle;
\fi% back
%
% Nose if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifhippo@back
- \hippo@part@draw[\hippo@body!80!white] (0, 1.55) ellipse[x radius=0.42, y radius=0.2];
+ \hippo@part@draw[\hippo@body!85!black] (0, 1.55) ellipse[x radius=0.42, y radius=0.2];
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \hippo@part@draw[\hippo@body!55!white] ( 0.6, 0.8 ) .. controls ( 0.6 , 0.4) and ( 0.35, 0.19) .. ( 0.0, 0.19) .. controls (-0.35, 0.19) and (-0.6 , 0.4) .. (-0.6, 0.8 ) .. controls (-0.6 , 1.3) and (-0.35, 1.65) .. ( 0.0, 1.65) .. controls ( 0.35, 1.65) and ( 0.6 , 1.3) .. ( 0.6, 0.8) -- cycle;
+ \hippo@part@draw[\hippo@body] ( 0.6, 0.8 ) .. controls ( 0.6 , 0.4) and ( 0.35, 0.19) .. ( 0.0, 0.19) .. controls (-0.35, 0.19) and (-0.6 , 0.4) .. (-0.6, 0.8 ) .. controls (-0.6 , 1.3) and (-0.35, 1.65) .. ( 0.0, 1.65) .. controls ( 0.35, 1.65) and ( 0.6 , 1.3) .. ( 0.6, 0.8) -- cycle;
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname hippohookbelly\endcsname
\csname tikzlinghookbelly\endcsname
- %
+ %
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifhippo@back
- \hippo@part@draw[\hippo@body] (0.35,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=90];
- \hippo@part@draw[\hippo@body] (-0.35,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=-90];
+ \hippo@part@draw[\hippo@body!70!black] (0.35,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=90];
+ \hippo@part@draw[\hippo@body!70!black] (-0.35,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=-90];
\fi% back
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \hippo@part@draw[\hippo@body!55!white] (0, 1.76) circle[radius=0.36];
+ \hippo@part@draw[\hippo@body] (0, 1.76) circle[radius=0.36];
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifhippo@back
@@ -165,29 +166,26 @@
\fi% contour
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \hippo@part@draw[\hippo@body!80!white] (0, 1.55) ellipse[x radius=0.42, y radius=0.2];
- \hippo@part@draw[\hippo@body!70!black] (-0.07, 1.63) circle[radius=0.035];
- \hippo@part@draw[\hippo@body!70!black] (0.07, 1.63) circle[radius=0.035];
+ \hippo@part@draw[\hippo@body!85!black] (0, 1.55) ellipse[x radius=0.42, y radius=0.2];
+ \hippo@part@draw[\hippo@mouth] (-0.07, 1.63) circle[radius=0.035];
+ \hippo@part@draw[\hippo@mouth] (0.07, 1.63) circle[radius=0.035];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \ifhippo@threeD
- \draw[black,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
- \else% 3D
+ \ifhippo@openmouth
+ \filldraw[\hippo@mouth,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2];
+ \else% open mouth
\draw[\hippo@mouth,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2];
- \fi% 3D
+ \fi% open mouth
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \hippo@part@draw[\hippo@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \hippo@part@draw[\hippo@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \hippo@part@draw[\hippo@toes] (0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (-0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (-0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
- \hippo@part@draw[\hippo@toes] (-0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
- \end{scope}
+ \hippo@part@draw[\hippo@body!70!black] (-0.08,0.13) arc [start angle=0, end angle=180, x radius=0.17, y radius=0.19] -- cycle;
+ \hippo@part@draw[\hippo@body!70!black](0.08,0.13) arc [start angle=180, end angle=0, x radius=0.17, y radius=0.19] -- cycle;
+ \hippo@part@draw[\hippo@toes] (-0.08,0.13) arc [start angle=0, end angle=180, x radius=0.05, y radius=0.08] -- cycle;
+ \hippo@part@draw[\hippo@toes] (-0.2,0.13) arc [start angle=0, end angle=180, x radius=0.05, y radius=0.1] -- cycle;
+ \hippo@part@draw[\hippo@toes] (-0.32,0.13) arc [start angle=0, end angle=180, x radius=0.05, y radius=0.08] -- cycle;
+ \hippo@part@draw[\hippo@toes] (0.08,0.13) arc [start angle=180, end angle=0, x radius=0.05, y radius=0.08] -- cycle;
+ \hippo@part@draw[\hippo@toes] (0.2,0.13) arc [start angle=180, end angle=0, x radius=0.05, y radius=0.1] -- cycle;
+ \hippo@part@draw[\hippo@toes] (0.32,0.13) arc [start angle=180, end angle=0, x radius=0.05, y radius=0.08] -- cycle;
%
\fi% back
%
@@ -209,52 +207,57 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-hippos}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-hippos}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic hippo}}
%\hippo
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic hippo can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\hippo[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\hippo[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\hippo[pupil=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\hippo[mouth=red]
%\end{tcblisting}
%
+% The hippo can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\hippo[openmouth]
+%\end{tcblisting}
+%
%The hippo can also do its nails:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Toe colour}}
%\hippo[toes=red]
%\end{tcblisting}
%
%To view the hippo from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\hippo[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the hippo 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the hippo 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\hippo[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\hippo[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty b/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
index 4968d7b516..3b3a297517 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-koalas.sty
@@ -9,15 +9,15 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-koalas}[2022/06/17 version v1.0 Drawing koalas in TikZ]
+\ProvidesPackage{tikzlings-koalas}[2025/01/05 version v2.2 Drawing koalas in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
\usetikzlibrary{shadows.blur}
-\usetikzlibrary{fadings}
+\usetikzlibrary{fadings}
\tikzfading[name=koala@blush,inner color=transparent!50,outer color=transparent!100]
@@ -38,6 +38,7 @@
\newif\ifkoala@threeD
\newif\ifkoala@back
\newif\ifkoala@contour
+\newif\ifkoala@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -55,7 +56,7 @@
body/.store in = \koala@body,
body = gray!75!white,
eye/.store in = \koala@eye,
- eye = black,
+ eye = black,
mouth/.store in = \koala@mouth,
mouth = \koala@body!40!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -65,23 +66,25 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
blush/.code = \koala@blushtrue
\def\koala@blushcolor{#1},
- blush/.default = red,
- sleeping/.code = \koala@sleepingtrue,
+ blush/.default = red,
+ sleeping/.code = \koala@sleepingtrue,
+ openmouth/.code = \koala@openmouthtrue,
+ open mouth/.forward to = /koala/openmouth,
3D/.code = \koala@threeDtrue
- \def\koala@mouth{black},
- back/.code = \koala@backtrue,
+ \def\koala@mouth{black},
+ back/.code = \koala@backtrue,
contour/.code = \koala@contourtrue
\def\koala@contour{#1}
\def\koala@blushcolor{#1}
\def\koala@mouth{#1},
- contour/.default = black,
- outline/.forward to = /koala/contour,
+ contour/.default = black,
+ outline/.forward to = /koala/contour,
}
\def\koala@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.88,0.1) rectangle (0.88, 2.35);
@@ -98,7 +101,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -116,7 +119,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -124,7 +127,7 @@
\csname tikzlinghookbackground\endcsname
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \koala@part@draw[\koala@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \koala@part@draw[\koala@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
\koala@part@draw[\koala@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -173,18 +176,22 @@
\fill[\koala@body!50!black,rotate around={-20:(-0.2925, 1.6925)}] (-0.29, 1.68) rectangle ++(-0.005, 0.03);
\fill[\koala@body!50!black,rotate around={20:(-0.2143, 1.6925)}] (-0.2168, 1.68) rectangle ++(-0.005, 0.03);
\fill[\koala@body!50!black,rotate around={-40:(-0.3255, 1.7025)}] (-0.323, 1.69) rectangle ++(-0.005, 0.03);
- \fill[\koala@body!50!black,rotate around={40:(-0.1813, 1.7025)}] (-0.1838, 1.69) rectangle ++(-0.005, 0.03);
+ \fill[\koala@body!50!black,rotate around={40:(-0.1813, 1.7025)}] (-0.1838, 1.69) rectangle ++(-0.005, 0.03);
\fill[\koala@body!50!black, even odd rule] (0.3331, 1.741) .. controls (0.3331, 1.685) and (0.1737, 1.685) .. (0.1737, 1.741) .. controls (0.1737, 1.848) and (0.3331, 1.848) .. (0.3331, 1.741) -- cycle (0.328, 1.741) .. controls (0.323, 1.705) and (0.184, 1.705) .. (0.179, 1.741) .. controls (0.184, 1.843) and (0.323, 1.843) .. (0.328, 1.741) -- cycle;
\fill[\koala@body!50!black, even odd rule] (-0.3331, 1.741) .. controls (-0.3331, 1.685) and (-0.1737, 1.685) .. (-0.1737, 1.741) .. controls (-0.1737, 1.848) and (-0.3331, 1.848) .. (-0.3331, 1.741) -- cycle (-0.328, 1.741) .. controls (-0.323, 1.705) and (-0.184, 1.705) .. (-0.179, 1.741) .. controls (-0.184, 1.843) and (-0.323, 1.843) .. (-0.328, 1.741) -- cycle;
\else% sleeping
- \koala@part@draw[\koala@eye] (-0.255, 1.74) circle[radius=0.08];
- \koala@part@draw[\koala@eye] (0.255, 1.74) circle[radius=0.08];
- \fill[white] (-0.27, 1.76) circle[radius=0.015];
- \fill[white] (0.24, 1.76) circle[radius=0.015];
+ \koala@part@draw[\koala@eye] (-0.255, 1.74) circle[radius=0.08];
+ \koala@part@draw[\koala@eye] (0.255, 1.74) circle[radius=0.08];
+ \fill[white] (-0.27, 1.76) circle[radius=0.015];
+ \fill[white] (0.24, 1.76) circle[radius=0.015];
\fi% sleeping
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\koala@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
+ \ifkoala@openmouth
+ \filldraw[\koala@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
+ \else
+ \draw[\koala@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.39) arc [start angle=-40, end angle=-140, radius=0.16];
+ \fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -194,7 +201,7 @@
%
% Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifkoala@blush
- \fill[\koala@blushcolor,path fading=koala@blush] (-0.3, 1.52) circle[radius=0.1];
+ \fill[\koala@blushcolor,path fading=koala@blush] (-0.3, 1.52) circle[radius=0.1];
\fill[\koala@blushcolor,path fading=koala@blush] (0.3, 1.52) circle[radius=0.1];
\fi% blush
%
@@ -218,54 +225,59 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-koalas}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-koalas}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic koala}}
%\koala
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic koala can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\koala[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\koala[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\koala[mouth=red]
%\end{tcblisting}
%
+% The koala can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\koala[openmouth]
+%\end{tcblisting}
+%
%It can also blush
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Blushing koala}}
%\koala[blush=red]
%\end{tcblisting}
%
%and if tired, it is going to take a nap:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Sleep}}
%\koala[sleeping]
%\end{tcblisting}
%
%To view the koala from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\koala[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the koala 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the koala 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\koala[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\koala[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-list.sty b/graphics/pgf/contrib/tikzlings/tikzlings-list.sty
index 09a0967f2c..b8cd2cdb38 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-list.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-list.sty
@@ -1,4 +1,4 @@
-\ProvidesPackage{tikzlings-list}[2022/06/17 version v1.0 Helper package for the tikzlings]
+\ProvidesPackage{tikzlings-list}[2025/01/05 version v2.2 Helper package for the tikzlings]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -11,6 +11,7 @@
\clist_const:Nn \c__tikzlings_clist
{
anteater / anteaters,
+ ape / apes,
bat / bats,
bear / bears,
bee / bees,
@@ -22,6 +23,7 @@
hippo / hippos,
koala / koalas,
marmot / marmots,
+ meerkat / meerkats,
mouse / mice,
moles / moles, % avoid conflict with siunitx's \mole
owl / owls,
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty b/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
index d67b9fb51d..8a274a550e 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-marmots.sty
@@ -9,15 +9,15 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-marmots}[2022/06/17 version v1.0 Drawing marmots in TikZ]
+\ProvidesPackage{tikzlings-marmots}[2025/01/05 version v2.2 Drawing marmots in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
\usetikzlibrary{shadows.blur}
-\usetikzlibrary{fadings}
+\usetikzlibrary{fadings}
\tikzfading[name=marmot@blush,inner color=transparent!50,outer color=transparent!100]
@@ -28,13 +28,13 @@
\else
\ifdefined\pdfrandomseed % pdflatex
\else
- \ifdefined\randomseed
+ \ifdefined\randomseed
\let\pdfrandomseed\randomseed % post TL19 xelatex and lualatex
\else
\let\pdfrandomseed\time % pre TL19 xelatex
\fi
\fi
- \pgfmathsetseed{\number\pdfrandomseed}
+ \pgfmathsetseed{\number\pdfrandomseed}
\fi
\ExplSyntaxOff
@@ -47,7 +47,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname marmothookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifmarmot@blush
@@ -60,6 +60,7 @@
\newif\ifmarmot@rightstep
\newif\ifmarmot@back
\newif\ifmarmot@contour
+\newif\ifmarmot@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -77,7 +78,7 @@
body/.store in = \marmot@body,
body = brown,
eye/.store in = \marmot@eye,
- eye = \marmot@body!50!black,
+ eye = \marmot@body!50!black,
mouth/.store in = \marmot@mouth,
mouth = \marmot@body!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -87,13 +88,15 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
blush/.code = \marmot@blushtrue
\def\marmot@blushcolor{#1},
- blush/.default = red,
- whiskers/.code = \marmot@whiskerstrue
+ blush/.default = red,
+ whiskers/.code = \marmot@whiskerstrue
\def\marmot@whiskers{#1},
whiskers/.default = gray,
- teeth/.code = \marmot@teethtrue
- \def\marmot@teeth{#1},
+ teeth/.code = \marmot@teethtrue
+ \def\marmot@teeth{#1},
teeth/.default = white,
+ openmouth/.code = \marmot@openmouthtrue,
+ open mouth/.forward to = /marmot/openmouth,
3D/.code = \marmot@threeDtrue,
shadow/.code = \marmot@shadowtrue,
askphil/.code = \marmot@askphiltrue,
@@ -101,20 +104,20 @@
leftstep/.code = \marmot@leftsteptrue,
left step/.forward to = /marmot/leftstep,
rightstep/.code = \marmot@rightsteptrue,
- right step/.forward to = /marmot/rightstep,
- back/.code = \marmot@backtrue,
+ right step/.forward to = /marmot/rightstep,
+ back/.code = \marmot@backtrue,
contour/.code = \marmot@contourtrue
\def\marmot@contour{#1}
\def\marmot@blushcolor{#1}
\def\marmot@mouth{#1},
- contour/.default = black,
- outline/.forward to = /marmot/contour,
+ contour/.default = black,
+ outline/.forward to = /marmot/contour,
}
\def\marmot@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.625,0.1) rectangle (0.905, 2.17);
@@ -131,7 +134,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -171,20 +174,20 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmarmot@leftstep
- \marmot@part@draw[\marmot@body!50!black] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \marmot@part@draw[\marmot@body!50!black] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
\else% step
- \marmot@part@draw[\marmot@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \marmot@part@draw[\marmot@body!50!black] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
\fi% step
%
\ifmarmot@rightstep
- \marmot@part@draw[\marmot@body!50!black] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \marmot@part@draw[\marmot@body!50!black] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
\else% step
- \marmot@part@draw[\marmot@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \marmot@part@draw[\marmot@body!50!black] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
\fi% step
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -221,17 +224,21 @@
\marmot@part@draw[\marmot@body!50!black] (-0.385,0.93) ellipse[x radius=0.24, y radius=0.13, rotate=-70];
%
% Muzzle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \marmot@part@draw[\marmot@body!50!white] (0,1.47) ellipse[x radius=0.23, y radius=0.13];
+ \marmot@part@draw[\marmot@body!50!white] (0,1.47) ellipse[x radius=0.23, y radius=0.13];
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\marmot@part@draw[\marmot@body!50!black] (0,1.6) circle[radius=0.08];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \marmot@part@draw[\marmot@eye] (-0.155,1.77) circle[radius=0.05];
- \marmot@part@draw[\marmot@eye] (0.155,1.77) circle[radius=0.05];
+ \marmot@part@draw[\marmot@eye] (-0.155,1.77) circle[radius=0.05];
+ \marmot@part@draw[\marmot@eye] (0.155,1.77) circle[radius=0.05];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \fill[\marmot@mouth] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] -- (-0.14,1.51) -- (-0.14,1.51) arc [start angle=-160, end angle=-20, radius=0.144] -- cycle ;
+ \ifmarmot@openmouth
+ \filldraw[\marmot@mouth, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.155] (-0.145,1.51) arc [start angle=-120, end angle=-60, radius=0.29];
+ \else
+ \draw[\marmot@mouth, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16];
+ \fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -241,8 +248,8 @@
%
% Blushed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmarmot@blush
- \fill[\marmot@blushcolor,path fading=marmot@blush] (-0.295,1.6) circle[radius=0.1];
- \fill[\marmot@blushcolor,path fading=marmot@blush] (0.295,1.6) circle[radius=0.1];
+ \fill[\marmot@blushcolor,path fading=marmot@blush] (-0.295,1.6) circle[radius=0.1];
+ \fill[\marmot@blushcolor,path fading=marmot@blush] (0.295,1.6) circle[radius=0.1];
\fi% blush
%
% Wiskers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -259,7 +266,7 @@
\ifmarmot@teeth
\fill[\marmot@body!50!black] (0.048,1.413) rectangle (-0.048,1.373);
\fill[\marmot@teeth] (-0.045,1.407) rectangle (-0.004,1.376);
- \fill[\marmot@teeth] (0.045,1.407) rectangle (0.004,1.376);
+ \fill[\marmot@teeth] (0.045,1.407) rectangle (0.004,1.376);
\fi% teeth
%
\fi% back
@@ -282,75 +289,80 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-marmots}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-marmots}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic marmot}}
%\marmot
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic marmot can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\marmot[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\marmot[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\marmot[mouth=red]
%\end{tcblisting}
%
+% The marmot can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\marmot[openmouth]
+%\end{tcblisting}
+%
%The marmot can also blush
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Blushing marmot}}
%\marmot[blush=red]
%\end{tcblisting}
%
%and whiskers can be added:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Whiskers colour}}
%\marmot[whiskers=gray]
%\end{tcblisting}
%
%Some marmots even show their chisel teeth:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Teeth colour}}
%\marmot[teeth=white]
%\end{tcblisting}
%
%or can cast a shadow:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Shadow}}
%\marmot[shadow]
%\end{tcblisting}
%
-%This ability is important if you want to ask Punxsutawney Phil\footnote{\url{https://en.wikipedia.org/wiki/Punxsutawney_Phil}} on Groundhog Day how the weather is going to be. With a probability derived from the statistics of 120 Groundhog Days\footnote{\hbadness=99999\url{https://www.livescience.com/32974-punxsutawney-phil-weather-prediction-accuracy.html}} the option \lstinline|askphil| might or might not result in a shadow.
-%\begin{tcblisting}{}
+%This ability is important if you want to ask Punxsutawney Phil\footnote{\url{https://en.wikipedia.org/wiki/Punxsutawney_Phil}} on Groundhog Day how the weather is going to be. With a probability derived from the statistics of 120 Groundhog Days\footnote{\hbadness=99999\url{https://www.livescience.com/32974-punxsutawney-phil-weather-prediction-accuracy.html}} the option \saminline|askphil| might or might not result in a shadow.
+%\begin{tcblisting}{title={Ask Phil}}
%\marmot[askphil]
%\end{tcblisting}
%
-%If a good weather prognosis is derived, the happy marmot can dance by lifting up its left and right foot:
-%\begin{tcblisting}{}
+%If a good weather prognosis is derived, the happy marmot can dance by lifting up its left and right foot:
+%\begin{tcblisting}{title={Walking}}
%\marmot[leftstep]
%\marmot[rightstep,xshift=2cm]
%\end{tcblisting}
%
%To view the marmot from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\marmot[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the marmot 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the marmot 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\marmot[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\marmot[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-meerkats.sty b/graphics/pgf/contrib/tikzlings/tikzlings-meerkats.sty
new file mode 100644
index 0000000000..42337105d6
--- /dev/null
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-meerkats.sty
@@ -0,0 +1,340 @@
+ % !TeX root = ./examples/meerkat.tex
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% This package is part of the TikZlings package
+%% A package to bring cute little animals and other beings into tikz
+%% Maintained by samcarter
+%%
+%% Project repository and bug tracker:
+%% https://github.com/samcarter/tikzlings
+%%
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See https://www.latex-project.org/lppl.txt
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{tikzlings-meerkats}[2025/01/05 version v2.2 Drawing meerkats in TikZ]
+
+\RequirePackage{tikz}
+\RequirePackage{tikzlings-addons}
+
+\newcommand*{\meerkat}[1][]{%
+ \begin{scope}%
+ \tikzset{/meerkat/.cd,#1}%
+ \meerkat@draw%
+ \end{scope}%
+ \thing[#1]%
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname meerkathookforeground\endcsname
+ \csname tikzlinghookforeground\endcsname
+ %
+}
+
+\newif\ifmeerkat@standing
+\newif\ifmeerkat@threeD
+\newif\ifmeerkat@back
+\newif\ifmeerkat@contour
+\newif\ifmeerkat@openmouth
+
+\def\meerkat@shift{0}
+
+\tikzset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Pass unknown keys on to tikz
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ /meerkat/.search also={/tikz,/pgf,/thing},
+ /meerkat/.cd,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % body
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ body/.store in = \meerkat@body,
+ body = brown,
+ upperbody/.store in = \meerkat@upperbody,
+ upperbody = \meerkat@body!70!white,
+ upper body/.forward to = /meerkat/upperbody,
+ chest/.store in = \meerkat@chest,
+ chest = \meerkat@body!45!white,
+ legs/.store in = \meerkat@legs,
+ legs = \meerkat@body,
+ tail/.store in = \meerkat@tail,
+ tail = \meerkat@body,
+ tip/.store in = \meerkat@tip,
+ tip = \meerkat@tail!50!black,
+ ears/.store in = \meerkat@ears,
+ ears = \meerkat@body!50!black,
+ eye/.store in = \meerkat@eye,
+ eye = black,
+ eyecircles/.store in = \meerkat@eyecircles,
+ eyecircles = \meerkat@body!75!black,
+ eye circles/.forward to = /meerkat/eyecircles,
+ muzzle/.store in = \meerkat@muzzle,
+ muzzle = \meerkat@body!45!white,
+ nose/.store in = \meerkat@nose,
+ nose = \meerkat@body!50!black,
+ mouth/.store in = \meerkat@mouth,
+ mouth = \meerkat@body!50!black,
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % options
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ openmouth/.code = \meerkat@openmouthtrue,
+ open mouth/.forward to = /meerkat/openmouth,
+ standing/.code = \meerkat@standingtrue
+ \def\meerkat@shift{15},
+ 3D/.code = \meerkat@threeDtrue,
+ back/.code = \meerkat@backtrue,
+ contour/.code = \meerkat@contourtrue
+ \def\meerkat@contour{#1}
+ \def\meerkat@blushcolor{#1}
+ \def\meerkat@mouth{#1},
+ contour/.default = black,
+ outline/.forward to = /meerkat/contour,
+}
+
+\def\meerkat@draw{%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % minimal bounding box size
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmeerkat@standing
+ \path (-0.55,0.05) rectangle (0.85, 2.65);
+ \else
+ \path (-0.55,0.05) rectangle (0.85, 2.13);
+ \fi
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % store the current scale factor
+ % from https://github.com/samcarter/tikzlings/issues/3#issuecomment-461373494
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \pgfgettransformentries{\tmpscaleA}{\tmpscaleB}{\tmpscaleC}{\tmpscaleD}{\tmp}{\tmp}%
+ \pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
+ \pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
+ \pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % switch between 2D, 3D and contours, from
+ % https://chat.stackexchange.com/transcript/message/45991801#45991801
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmeerkat@threeD
+ \def\meerkat@part@draw[##1]{\shade[ball color=##1]}
+ \else% 3D
+ \ifmeerkat@contour
+ \def\meerkat@part@draw[##1]{\draw[##1,\meerkat@contour,fill=white,line width=\scalingfactor*0.4pt]}
+ \else% contour
+ \def\meerkat@part@draw[##1]{\fill[##1]}
+ \fi% contour
+ \fi% 3D
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % Body parts
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname meerkathookbackground\endcsname
+ \csname tikzlinghookbackground\endcsname
+ %
+ \ifmeerkat@standing
+ %
+ \unless\ifmeerkat@back
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@tail] (0.0071, 1.0065).. controls (0.0949, 0.7556) and (0.2077, 0.5139) .. (0.3436, 0.2854).. controls (0.3809, 0.2966) and (0.4183, 0.3078) .. (0.4557, 0.319).. controls (0.3377, 0.5524) and (0.2434, 0.7968) .. (0.174, 1.049);
+ %
+ % Tip of tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@tip] (0.8483, 0.1284).. controls (0.7159, 0.1309) and (0.575, 0.1064) .. (0.4503, 0.163).. controls (0.3999, 0.1871) and (0.3617, 0.2328) .. (0.3436, 0.2854).. controls (0.3809, 0.2966) and (0.4183, 0.3078) .. (0.4557, 0.319).. controls (0.5224, 0.2163) and (0.6411, 0.1646) .. (0.7581, 0.145).. controls (0.7881, 0.1389) and (0.8182, 0.1337) .. (0.8483, 0.1284) -- cycle;
+ \fi %back
+ %
+ % Legs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@legs] (-0.3454, 1.3191).. controls (-0.3768, 1.128) and (-0.4158, 0.9325) .. (-0.3865, 0.7386).. controls (-0.3749, 0.6541) and (-0.3231, 0.5584) .. (-0.2285, 0.5516).. controls (-0.1819, 0.5615) and (-0.1524, 0.5219) .. (-0.1531, 0.48).. controls (-0.1406, 0.4015) and (-0.126, 0.3232) .. (-0.1147, 0.2446).. controls (-0.1149, 0.1841) and (-0.2292, 0.195) .. (-0.2042, 0.1256).. controls (-0.1635, 0.0562) and (-0.0406, 0.0684) .. (-0.021, 0.15).. controls (0.0009, 0.2391) and (-0.0108, 0.3319) .. (-0.0078, 0.4229).. controls (-0.0101, 0.4797) and (-0.0028, 0.5377) .. (-0.0126, 0.5937).. controls (-0.0473, 0.6539) and (-0.1009, 0.7107) .. (-0.0889, 0.7877).. controls (-0.0857, 0.8768) and (-0.0601, 0.963) .. (-0.0454, 1.0505);
+ \meerkat@part@draw[\meerkat@legs] (0.3522, 1.3191).. controls (0.3836, 1.128) and (0.4226, 0.9325) .. (0.3932, 0.7386).. controls (0.3817, 0.6541) and (0.3299, 0.5584) .. (0.2352, 0.5516).. controls (0.1887, 0.5615) and (0.1592, 0.5219) .. (0.1599, 0.48).. controls (0.1474, 0.4015) and (0.1327, 0.3232) .. (0.1215, 0.2446).. controls (0.1217, 0.1841) and (0.236, 0.195) .. (0.211, 0.1256).. controls (0.1702, 0.0562) and (0.0474, 0.0684) .. (0.0278, 0.15).. controls (0.0058, 0.2391) and (0.0176, 0.3319) .. (0.0146, 0.4229).. controls (0.0168, 0.4797) and (0.0095, 0.5377) .. (0.0194, 0.5937).. controls (0.0541, 0.6539) and (0.1077, 0.7107) .. (0.0956, 0.7877).. controls (0.0924, 0.8768) and (0.0668, 0.963) .. (0.0521, 1.0505);
+ %
+ \ifmeerkat@back
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@tail] (0.0071, 1.0065).. controls (0.0949, 0.7556) and (0.2077, 0.5139) .. (0.3436, 0.2854).. controls (0.3809, 0.2966) and (0.4183, 0.3078) .. (0.4557, 0.319).. controls (0.3377, 0.5524) and (0.2434, 0.7968) .. (0.174, 1.049);
+ %
+ % Tip of tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@tip] (0.8483, 0.1284).. controls (0.7159, 0.1309) and (0.575, 0.1064) .. (0.4503, 0.163).. controls (0.3999, 0.1871) and (0.3617, 0.2328) .. (0.3436, 0.2854).. controls (0.3809, 0.2966) and (0.4183, 0.3078) .. (0.4557, 0.319).. controls (0.5224, 0.2163) and (0.6411, 0.1646) .. (0.7581, 0.145).. controls (0.7881, 0.1389) and (0.8182, 0.1337) .. (0.8483, 0.1284) -- cycle;
+ \fi %back
+ \else % sitting meerkat
+ %
+ \unless\ifmeerkat@back
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@tail] (-0.0555, 0.5998).. controls (-0.0555, 0.4298) and (0.1812, 0.2011) .. (0.341, 0.143) -- (0.44, 0.253).. controls (0.3106, 0.3001) and (0.0959, 0.4717) .. (0.0959, 0.6094);
+ %
+ % Tip of the tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@tip] (0.836, 0.132).. controls (0.6422, 0.132) and (0.5231, 0.0767) .. (0.341, 0.143) -- (0.44, 0.253).. controls (0.5922, 0.1976) and (0.6765, 0.1601) .. (0.836, 0.132);
+ \fi % back
+ %
+ % Legs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@legs] (-0.2759, 0.6554).. controls (-0.2927, 0.7506) and (-0.3983, 0.77) .. (-0.4598, 0.77).. controls (-0.4793, 0.77) and (-0.4959, 0.7543) .. (-0.4971, 0.7349).. controls (-0.5094, 0.5297) and (-0.4208, 0.3526) .. (-0.2493, 0.2393).. controls (-0.2331, 0.2287) and (-0.236, 0.2231) .. (-0.2551, 0.22) -- (-0.4553, 0.1878).. controls (-0.4745, 0.1847) and (-0.5016, 0.1767) .. (-0.5153, 0.1629).. controls (-0.5208, 0.1574) and (-0.5208, 0.1081) .. (-0.5153, 0.1026).. controls (-0.5016, 0.0889) and (-0.4747, 0.0794) .. (-0.4553, 0.0796).. controls (-0.0935, 0.0833) and (-0.055, 0.0466) .. (-0.055, 0.1848).. controls (-0.055, 0.2042) and (-0.0521, 0.2354) .. (-0.0485, 0.2545) -- (-0.0187, 0.4185);
+ \meerkat@part@draw[\meerkat@legs] (0.2759, 0.6554).. controls (0.2927, 0.7506) and (0.3983, 0.77) .. (0.4598, 0.77).. controls (0.4793, 0.77) and (0.4959, 0.7543) .. (0.4971, 0.7349).. controls (0.5094, 0.5297) and (0.4208, 0.3526) .. (0.2493, 0.2393).. controls (0.2331, 0.2287) and (0.236, 0.2231) .. (0.2551, 0.22) -- (0.4553, 0.1878).. controls (0.4745, 0.1847) and (0.5016, 0.1767) .. (0.5153, 0.1629).. controls (0.5208, 0.1574) and (0.5208, 0.1081) .. (0.5153, 0.1026).. controls (0.5016, 0.0889) and (0.4747, 0.0794) .. (0.4553, 0.0796).. controls (0.0935, 0.0833) and (0.055, 0.0466) .. (0.055, 0.1848).. controls (0.055, 0.2042) and (0.0521, 0.2354) .. (0.0485, 0.2545) -- (0.0187, 0.4185);
+ %
+ \ifmeerkat@back
+ % Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@tail] (-0.0555, 0.5998).. controls (-0.0555, 0.4298) and (0.1812, 0.2011) .. (0.341, 0.143) -- (0.44, 0.253).. controls (0.3106, 0.3001) and (0.0959, 0.4717) .. (0.0959, 0.6094);
+ %
+ % Tip of the tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@tip] (0.836, 0.132).. controls (0.6422, 0.132) and (0.5231, 0.0767) .. (0.341, 0.143) -- (0.44, 0.253).. controls (0.5922, 0.1976) and (0.6765, 0.1601) .. (0.836, 0.132);
+ \fi % back
+ %
+ \fi % standling
+ %
+ \begin{scope}[yshift=\meerkat@shift]
+ %
+ % Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@body] (0,0.77) circle [radius=0.35];
+ %
+ % Upper body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmeerkat@back
+ \meerkat@part@draw[\meerkat@upperbody] (-0.374, 1.32).. controls (-0.3892, 1.1462) and (-0.2287, 0.903) .. (-0.0859, 0.7515).. controls (-0.0594, 0.7213) and (-0.031, 0.691) .. (0.0, 0.66).. controls (0.031, 0.691) and (0.0595, 0.7213) .. (0.0859, 0.7515).. controls (0.2399, 0.9179) and (0.3892, 1.1462) .. (0.374, 1.32).. controls (0.374, 1.4277) and (0.1868, 1.582) .. (0.0, 1.65).. controls (-0.1876, 1.5817) and (-0.374, 1.4271) .. (-0.374, 1.32) -- cycle;
+ \else
+ \meerkat@part@draw[\meerkat@upperbody] (-0.374, 1.32).. controls (-0.3974, 1.0521) and (-0.176, 0.9289) .. (-0.176, 0.66).. controls (-0.176, 0.467) and (-0.077, 0.467) .. (-0.077, 0.66).. controls (-0.077, 0.6924) and (-0.0803, 0.7227) .. (-0.0859, 0.7515).. controls (-0.0594, 0.7213) and (-0.031, 0.691) .. (-0.0, 0.66).. controls (0.031, 0.691) and (0.0595, 0.7213) .. (0.0859, 0.7515).. controls (0.0803, 0.7227) and (0.077, 0.6924) .. (0.077, 0.66).. controls (0.077, 0.467) and (0.176, 0.467) .. (0.176, 0.66).. controls (0.176, 0.9289) and (0.3974, 1.0521) .. (0.374, 1.32).. controls (0.374, 1.4277) and (0.1868, 1.582) .. (-0.0, 1.65).. controls (-0.1876, 1.5817) and (-0.374, 1.4271) .. (-0.374, 1.32) -- cycle;
+ \fi % back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname meerkathookbelly\endcsname
+ \csname tikzlinghookbelly\endcsname
+ %
+ % Chest %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \unless\ifmeerkat@back
+ \meerkat@part@draw[\meerkat@chest] (-0.0, 1.54).. controls (-0.1378, 1.54) and (-0.275, 1.4578) .. (-0.275, 1.32).. controls (-0.275, 1.1168) and (-0.1437, 1.0237) .. (-0.0, 0.88).. controls (0.1437, 1.0237) and (0.275, 1.1168) .. (0.275, 1.32).. controls (0.275, 1.4578) and (0.1378, 1.54) .. (-0.0, 1.54) -- cycle;
+ \fi % back
+ %
+ % Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@ears] (-0.35, 1.87) circle [radius=0.11];
+ \meerkat@part@draw[\meerkat@ears] (0.35, 1.87) circle [radius=0.11];
+ %
+ % Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmeerkat@back
+ \meerkat@part@draw[\meerkat@muzzle] (0,1.7) ellipse [x radius=0.38, y radius=0.21];
+ \meerkat@part@draw[\meerkat@body] (0,1.775) ellipse [x radius=0.34, y radius=0.32];
+ \else
+ \meerkat@part@draw[\meerkat@body] (0,1.85) ellipse [x radius=0.34, y radius=0.25];
+ \meerkat@part@draw[\meerkat@muzzle] (0,1.7) ellipse [x radius=0.38, y radius=0.21];
+ %
+ % Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@nose] (0.0176, 1.6987) -- (0.0437, 1.7439).. controls (0.0534, 1.7607) and (0.0455, 1.7743) .. (0.0261, 1.7743) -- (-0.0261, 1.7743).. controls (-0.0455, 1.7743) and (-0.0534, 1.7607) .. (-0.0437, 1.7439) -- (-0.0176, 1.6987).. controls (-0.0079, 1.6819) and (0.0079, 1.6819) .. (0.0176, 1.6987) -- cycle;
+ %
+ % Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmeerkat@openmouth
+ \filldraw[\meerkat@mouth,line width=\scalingfactor*0.4pt] (-0.16, 1.727) .. controls (-0.16, 1.727) and (-0.062, 1.62) .. (0, 1.7) .. controls (0.062, 1.62) and (0.16, 1.727) .. (0.16, 1.727) (0.16, 1.727) arc [start angle=-20, end angle=-160, radius=0.17];
+ \else
+ \draw[\meerkat@mouth,line width=\scalingfactor*0.4pt] (-0.16, 1.727) .. controls (-0.16, 1.727) and (-0.062, 1.62) .. (0, 1.7) .. controls (0.062, 1.62) and (0.16, 1.727) .. (0.16, 1.727);
+ \fi
+ %
+ % Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \meerkat@part@draw[\meerkat@eyecircles,rotate=30] (0.75,1.7) ellipse [x radius=0.14, y radius=0.08];
+ \meerkat@part@draw[\meerkat@eyecircles,rotate=-30] (-0.75,1.7) ellipse [x radius=0.14, y radius=0.08];
+ \meerkat@part@draw[\meerkat@eye] (0.18,1.86) circle [radius=0.055];
+ \meerkat@part@draw[\meerkat@eye] (-0.18,1.86) circle [radius=0.055];
+ \meerkat@part@draw[white] (0.165,1.88) circle [radius=0.01];
+ \meerkat@part@draw[white] (-0.195,1.88) circle [radius=0.01];
+ \fi % back
+ %
+ % adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \csname meerkathookbody\endcsname
+ \csname tikzlinghookbody\endcsname
+ %
+ \end{scope}% body shift
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Documentation
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\clearpage
+%\section[Meerkat]{Ambrogio, the meerkat}
+%
+%\emph{The Meerkat was first created by Carla for the Great TikZlings Extravanganza 2022\footnote{\url{https://github.com/TikZlings/Extravaganza2022}}. Ambrogio got his name from the patreon saint of his home town Milan, Saint Ambrogio}
+%
+%\subsection{Package name}
+%
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-meerkats}
+%\end{samcode}
+%\end{tcolorbox}
+%
+%\subsection{Basic Usage}
+%
+%\begin{tcblisting}{title={Basic meerkat}}
+%\meerkat
+%\end{tcblisting}
+%
+%\subsection{Options}
+%
+%The basic meerkat can be modified by changing its colour:
+%\begin{tcblisting}{title={Body colour}}
+%\meerkat[body=blue]
+%\end{tcblisting}
+%
+%In addition to the colour of the body, the colour of various body parts can be adjusted:
+%\begin{tcblisting}{title={Eye colour}}
+%\meerkat[eye=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Eye circle colour}}
+%\meerkat[eyecircles=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Ear colour}}
+%\meerkat[ears=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Muzzle colour}}
+%\meerkat[muzzle=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Nose colour}}
+%\meerkat[nose=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Mouth colour}}
+%\meerkat[mouth=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Upper body colour}}
+%\meerkat[upperbody=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Chest colour}}
+%\meerkat[chest=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Leg colour}}
+%\meerkat[legs=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Tail colour}}
+%\meerkat[tail=red]
+%\end{tcblisting}
+%\begin{tcblisting}{title={Tail tip colour}}
+%\meerkat[tip=red]
+%\end{tcblisting}
+%
+% The meerkat can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\meerkat[openmouth]
+%\end{tcblisting}
+%
+%The meerkat can also stand up
+%\begin{tcblisting}{title={Standing meerkat}}
+%\meerkat[standing]
+%\end{tcblisting}
+%
+%To view the meerkat from behind:
+%\begin{tcblisting}{title={Back view}}
+%\meerkat[back]
+%\end{tcblisting}
+%
+%The key \saminline|3D| will make the meerkat 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
+%\meerkat[3D]
+%\end{tcblisting}
+%
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
+%\meerkat[contour=black]
+%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty b/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
index b864d03fd6..f6bc29e3a1 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-mice.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-mice}[2022/06/17 version v1.0 Drawing mice in TikZ]
+\ProvidesPackage{tikzlings-mice}[2025/01/05 version v2.2 Drawing mice in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,7 +26,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname mousehookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifmouse@threeD
@@ -52,7 +52,7 @@
body/.store in = \mouse@body,
body = gray!90!white,
eye/.store in = \mouse@eye,
- eye = \mouse@body!50!black,
+ eye = \mouse@body!50!black,
whiskers/.store in = \mouse@whiskers,
whiskers = \mouse@body!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -68,19 +68,19 @@
leftstep/.code = \mouse@leftsteptrue,
left step/.forward to = /mouse/leftstep,
rightstep/.code = \mouse@rightsteptrue,
- right step/.forward to = /mouse/rightstep,
- back/.code = \mouse@backtrue,
+ right step/.forward to = /mouse/rightstep,
+ back/.code = \mouse@backtrue,
contour/.code = \mouse@contourtrue
\def\mouse@contour{#1}
\def\mouse@whiskers{#1},
- contour/.default = black,
- outline/.forward to = /mouse/contour,
+ contour/.default = black,
+ outline/.forward to = /mouse/contour,
}
\def\mouse@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.625,0.1) rectangle (0.905, 2.17);
@@ -97,7 +97,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -115,24 +115,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname mousehookbackground\endcsname
\csname tikzlinghookbackground\endcsname
- %
+ %
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmouse@leftstep
- \mouse@part@draw[\mouse@body!65!white] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \mouse@part@draw[\mouse@body!65!white] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
\else% step
- \mouse@part@draw[\mouse@body!65!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \mouse@part@draw[\mouse@body!65!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
\fi% step
%
\ifmouse@rightstep
- \mouse@part@draw[\mouse@body!65!white] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \mouse@part@draw[\mouse@body!65!white] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
\else% step
- \mouse@part@draw[\mouse@body!65!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \mouse@part@draw[\mouse@body!65!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
\fi% step
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -154,7 +154,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname mousehookbelly\endcsname
\csname tikzlinghookbelly\endcsname
- %
+ %
% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmouse@back
\mouse@part@draw[\mouse@body!65!white] (1.0825, 1.6326) .. controls (1.3527, 1.7527) and (1.6609, 1.3164) .. (1.5928, 1.3124) .. controls (0.9164, 2.186) and (0.8338, 0.6325) .. (0.3708, 0.4451) .. controls (0.2529, 0.3974) and (-0.0064, 0.3874) .. (-0.0064, 0.3874) .. controls (-0.0776, 0.3765) and (-0.0862, 0.5026) .. (-0.0092, 0.5034) .. controls (-0.0092, 0.5034) and (0.0363, 0.4591) .. (0.3516, 0.54360) .. controls (0.6710, 0.6988) and (0.7613, 1.4825) .. (1.0825, 1.6326) -- cycle;
@@ -162,11 +162,7 @@
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmouse@back
- \mouse@part@draw[\mouse@body!65!white]
- (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) ..
- (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) ..
- (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) ..
- (0.5, 1.8) -- cycle;
+ \mouse@part@draw[\mouse@body!65!white] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
\else% back
\mouse@part@draw[\mouse@body!65!white] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
\fi% back
@@ -198,7 +194,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname mousehookbody\endcsname
\csname tikzlinghookbody\endcsname
- %
+ %
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -213,55 +209,55 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-mice}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-mice}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic mouse}}
%\mouse
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic mouse can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\mouse[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\mouse[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Whiskers colour}}
%\mouse[whiskers=red]
%\end{tcblisting}
%
%The rotation angle of its arms can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Rotating the arms}}
%\mouse[rotatearms=40]
%\end{tcblisting}
%
%And the mouse can lift its legs:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Walking}}
%\mouse[leftstep]
%\mouse[rightstep,xshift=2cm]
%\end{tcblisting}
%
%To view the mouse from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\mouse[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the mouse 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the mouse 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\mouse[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\mouse[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty b/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
index a64afa5720..6363a8944c 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-moles.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-moles}[2022/06/17 version v1.0 Drawing moles in TikZ]
+\ProvidesPackage{tikzlings-moles}[2025/01/05 version v2.2 Drawing moles in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,12 +26,15 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname moleshookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifmoles@threeD
+\newif\ifmoles@leftstep
+\newif\ifmoles@rightstep
\newif\ifmoles@back
\newif\ifmoles@contour
+\newif\ifmoles@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -49,13 +52,13 @@
body/.store in = \moles@body,
body = gray,
eye/.store in = \moles@eye,
- eye = \moles@body!60!black,
+ eye = \moles@body!60!black,
feet/.store in = \moles@feet,
feet = red!20!white!50!brown,
hands/.store in = \moles@hands,
- hands = red!20!white!50!brown,
+ hands = red!20!white!50!brown,
muzzle/.store in = \moles@muzzle,
- muzzle = red!20!white!50!brown,
+ muzzle = red!20!white!50!brown,
mouth/.store in = \moles@mouth,
mouth = \moles@body!60!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -63,20 +66,26 @@
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \moles@threeDtrue,
- back/.code = \moles@backtrue,
+ openmouth/.code = \moles@openmouthtrue,
+ open mouth/.forward to = /moles/openmouth,
+ 3D/.code = \moles@threeDtrue,
+ leftstep/.code = \moles@leftsteptrue,
+ left step/.forward to = /moles/leftstep,
+ rightstep/.code = \moles@rightsteptrue,
+ right step/.forward to = /moles/rightstep,
+ back/.code = \moles@backtrue,
contour/.code = \moles@contourtrue
\def\moles@contour{#1}
\def\moles@mouth{#1}
\def\moles@eye{#1},
- contour/.default = black,
- outline/.forward to = /moles/contour,
+ contour/.default = black,
+ outline/.forward to = /moles/contour,
}
\def\moles@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.625,0.1) rectangle (0.905, 2.17);
@@ -93,7 +102,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -111,7 +120,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -119,8 +128,16 @@
\csname tikzlinghookbackground\endcsname
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \moles@part@draw[\moles@feet] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
- \moles@part@draw[\moles@feet] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \ifmoles@leftstep
+ \moles@part@draw[\moles@feet] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \moles@part@draw[\moles@feet] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
+ \ifmoles@rightstep
+ \moles@part@draw[\moles@feet] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \moles@part@draw[\moles@feet] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
%
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifmoles@back
@@ -173,15 +190,19 @@
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifmoles@threeD
- \fill[\moles@eye] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
- \fill[\moles@eye!50!black] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
+ \fill[\moles@eye] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
+ \fill[\moles@eye!50!black] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
\else% 3D
- \fill[\moles@eye] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
- \fill[\moles@eye] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
+ \fill[\moles@eye] (-0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=-15];
+ \fill[\moles@eye] (0.165,1.79) ellipse[x radius=0.055, y radius=0.015, rotate=15];
\fi% 3D
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\moles@mouth, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] ;
+ \ifmoles@openmouth
+ \filldraw[\moles@mouth, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16] ;
+ \else
+ \draw[\moles@mouth, line width=\scalingfactor*0.4pt] (0.145,1.51) arc [start angle=-20, end angle=-160, radius=0.16];
+ \fi
%
\fi% back
%
@@ -203,58 +224,65 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-moles}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-moles}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\textcolor{red!60!black}{\textbf{Attention:} In contrast to the other \tikzlings the macro name is the plural form to avoid conflicts with \lstinline|siunitx| and similar packages.}
-%\begin{tcblisting}{}
+%\textcolor{samred}{\textbf{Attention:} In contrast to the other \tikzlings the macro name is the plural form to avoid conflicts with \saminline|siunitx| and similar packages.}
+%\begin{tcblisting}{title={Basic mole}}
%\moles
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic mole can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\moles[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\moles[eye=red]
%\end{tcblisting}
-%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Muzzle colour}}
%\moles[muzzle=red]
%\end{tcblisting}
-%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Hand colour}}
%\moles[hands=red]
%\end{tcblisting}
-%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Foot colour}}
%\moles[feet=red]
%\end{tcblisting}
-%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\moles[mouth=red]
%\end{tcblisting}
%
+% The mole can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\moles[openmouth]
+%\end{tcblisting}
+%
+%And the mole can lift its legs:
+%\begin{tcblisting}{title={Walking}}
+%\moles[leftstep]
+%\moles[rightstep,xshift=2cm]
+%\end{tcblisting}
+%
%To view the mole from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\moles[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the mole 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the mole 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\moles[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\moles[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty b/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
index cf57616cc8..23b9f0ff8e 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-owls.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-owls}[2022/06/17 version v1.0 Draw owls in TikZ]
+\ProvidesPackage{tikzlings-owls}[2025/01/05 version v2.2 Draw owls in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,7 +26,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname owlhookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifowl@threeD
@@ -55,24 +55,24 @@
bill/.store in = \owl@bill,
bill = orange,
feet/.store in = \owl@feet,
- feet = orange,
+ feet = orange,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3D/.code = \owl@threeDtrue,
- back/.code = \owl@backtrue,
+ back/.code = \owl@backtrue,
contour/.code = \owl@contourtrue
\def\owl@contour{#1},
- contour/.default = black,
- outline/.forward to = /owl/contour,
+ contour/.default = black,
+ outline/.forward to = /owl/contour,
}
\def\owl@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.73, 0.08) rectangle (0.73, 2.24);
@@ -89,7 +89,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -107,7 +107,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -116,7 +116,7 @@
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\owl@part@draw[\owl@body] (0.575,0.8) ellipse[x radius=0.38, y radius=0.1, rotate=-80];
- \owl@part@draw[\owl@body] (-0.575,0.8) ellipse[x radius=0.38, y radius=0.1, rotate=80];
+ \owl@part@draw[\owl@body] (-0.575,0.8) ellipse[x radius=0.38, y radius=0.1, rotate=80];
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifowl@back
@@ -194,50 +194,50 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-owls}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-owls}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic owl}}
%\owl
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic owl can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\owl[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\owl[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\owl[pupil=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Bill colour}}
%\owl[bill=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Foot colour}}
%\owl[feet=red]
%\end{tcblisting}
%
%To view the owl from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\owl[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the owl 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the owl 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\owl[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\owl[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty b/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
index f746d880e1..241f76a2a2 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-pandas.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-pandas}[2022/06/17 version v1.0 Drawing pandas in TikZ]
+\ProvidesPackage{tikzlings-pandas}[2025/01/05 version v2.2 Drawing pandas in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,12 +26,13 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname pandahookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifpanda@threeD
\newif\ifpanda@back
\newif\ifpanda@contour
+\newif\ifpanda@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -47,31 +48,33 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.store in = \panda@body,
- body = white!90!black,
+ body = white!90!gray,
eye/.store in = \panda@eye,
- eye = white,
+ eye = white,
pupil/.store in = \panda@pupil,
- pupil = black,
+ pupil = black,
mouth/.store in = \panda@mouth,
- mouth = black,
+ mouth = black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \panda@threeDtrue,
- back/.code = \panda@backtrue,
+ openmouth/.code = \panda@openmouthtrue,
+ open mouth/.forward to = /panda/openmouth,
+ 3D/.code = \panda@threeDtrue,
+ back/.code = \panda@backtrue,
contour/.code = \panda@contourtrue
\def\panda@contour{#1}
\def\panda@mouth{#1},
- contour/.default = black,
- outline/.forward to = /panda/contour,
+ contour/.default = black,
+ outline/.forward to = /panda/contour,
}
\def\panda@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.62,0.05) rectangle (0.62, 2.18);
@@ -88,7 +91,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -106,7 +109,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -115,12 +118,12 @@
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpanda@back
- \panda@part@draw[black] (0.32, 0.27) circle[radius=0.2];
+ \panda@part@draw[black] (0.32, 0.27) circle[radius=0.2];
\panda@part@draw[black] (-0.32, 0.27) circle[radius=0.2];
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \panda@part@draw[\panda@body!55!white] (0,0.78) ellipse[x radius=0.57, y radius=0.65];
+ \panda@part@draw[\panda@body] (0,0.78) ellipse[x radius=0.57, y radius=0.65];
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname pandahookbelly\endcsname
@@ -136,7 +139,7 @@
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifpanda@back
- \panda@part@draw[black] (0.32, 0.27) circle[radius=0.2];
+ \panda@part@draw[black] (0.32, 0.27) circle[radius=0.2];
\panda@part@draw[black] (-0.32, 0.27) circle[radius=0.2];
\fi% back
%
@@ -145,7 +148,7 @@
\panda@part@draw[black] (-0.32, 2) circle[radius=0.15];
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \panda@part@draw[\panda@body!55!white] (0.4897, 1.5886) .. controls (0.4614, 1.8238) and (0.25, 2.1172) .. (0, 2.1134) .. controls (-0.25, 2.1172) and (-0.4614, 1.8238) .. (-0.4897, 1.5886) .. controls (-0.5261, 1.3269) and (-0.2748, 1.2377) .. (0, 1.2377) .. controls (0.2748, 1.2377) and (0.5261, 1.3269) .. (0.4897, 1.5886) -- cycle;
+ \panda@part@draw[\panda@body] (0.4897, 1.5886) .. controls (0.4614, 1.8238) and (0.25, 2.1172) .. (0, 2.1134) .. controls (-0.25, 2.1172) and (-0.4614, 1.8238) .. (-0.4897, 1.5886) .. controls (-0.5261, 1.3269) and (-0.2748, 1.2377) .. (0, 1.2377) .. controls (0.2748, 1.2377) and (0.5261, 1.3269) .. (0.4897, 1.5886) -- cycle;
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifpanda@back
@@ -159,7 +162,11 @@
\panda@part@draw[\panda@pupil] (-0.17, 1.695) circle[radius=0.02];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\panda@mouth,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506) .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477);
+ \ifpanda@openmouth
+ \filldraw[\panda@mouth,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506) .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477) (0.16,1.477) arc [start angle=-20, end angle=-160, radius=0.17];
+ \else
+ \draw[\panda@mouth,line width=\scalingfactor*0.2pt] (-0.16, 1.477) .. controls (-0.16, 1.477) and (-0.062, 1.37) .. (0, 1.506) .. controls (0.062, 1.37) and (0.16, 1.477) .. (0.16, 1.477);
+ \fi
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\panda@part@draw[black] (0,1.55) ellipse[x radius=0.07, y radius=0.04];
@@ -184,47 +191,52 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-pandas}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-pandas}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic panda}}
%\panda
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic panda can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\panda[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\panda[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\panda[pupil=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\panda[mouth=red]
%\end{tcblisting}
%
+% The panda can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\panda[openmouth]
+%\end{tcblisting}
+%
%To view the panda from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\panda[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the panda 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the panda 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\panda[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\panda[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty b/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
index 8bceea8a19..93a76e7ab0 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-penguins.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-penguins}[2022/06/17 version v1.0 Draw penguins in TikZ]
+\ProvidesPackage{tikzlings-penguins}[2025/01/05 version v2.2 Draw penguins in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,7 +26,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname penguinhookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifpenguin@threeD
@@ -53,28 +53,28 @@
feet/.store in = \penguin@feet,
feet = yellow!50!orange,
bill/.store in = \penguin@bill,
- bill = orange,
+ bill = orange,
eye/.store in = \penguin@eye,
eye = white!95!black,
pupil/.store in = \penguin@pupil,
- pupil = black,
+ pupil = black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \penguin@threeDtrue,
- back/.code = \penguin@backtrue,
+ 3D/.code = \penguin@threeDtrue,
+ back/.code = \penguin@backtrue,
contour/.code = \penguin@contourtrue
\def\penguin@contour{#1},
- contour/.default = black,
- outline/.forward to = /penguin/contour,
+ contour/.default = black,
+ outline/.forward to = /penguin/contour,
}
\def\penguin@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.865, 0.15) rectangle (0.865, 2.13);
@@ -91,7 +91,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -109,7 +109,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -118,14 +118,12 @@
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\penguin@part@draw[\penguin@body] (0.575,1.2) ellipse[x radius=0.38, y radius=0.1, rotate=-50];
- \penguin@part@draw[\penguin@body] (-0.575,1.2) ellipse[x radius=0.38, y radius=0.1, rotate=50];
+ \penguin@part@draw[\penguin@body] (-0.575,1.2) ellipse[x radius=0.38, y radius=0.1, rotate=50];
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpenguin@back
- \penguin@part@draw[\penguin@feet]
- (-0.265, 0.3941) .. controls (-0.283, 0.4505) and (-0.373, 0.6014) .. (-0.470, 0.6533) .. controls (-0.571, 0.7075) and (-0.576, 0.6369) .. (-0.554, 0.596) .. controls (-0.526, 0.5416) and (-0.573, 0.5302) .. (-0.602, 0.5384) .. controls (-0.695, 0.5653) and (-0.767, 0.5169) .. (-0.684, 0.434) .. controls (-0.664, 0.4137) and (-0.587, 0.3557) .. (-0.699, 0.3492) .. controls (-0.772, 0.345) and (-0.779, 0.268) .. (-0.689, 0.2445) .. controls (-0.597, 0.2206) and (-0.476, 0.2043) .. (-0.34, 0.2096) .. controls (-0.252, 0.2131) and (-0.237, 0.3059) .. (-0.265, 0.3941) -- cycle;
- \penguin@part@draw[\penguin@feet]
- (0.265, 0.3941) .. controls (0.283, 0.4505) and (0.3725, 0.6014) .. (0.469, 0.6533) .. controls (0.571, 0.7075) and (0.5756, 0.6369) .. (0.554, 0.596) .. controls (0.526, 0.5416) and (0.5733, 0.5302) .. (0.602, 0.5384) .. controls (0.695, 0.5653) and (0.7672, 0.5169) .. (0.684, 0.434) .. controls (0.663, 0.4137) and (0.587, 0.3557) .. (0.699, 0.3492) .. controls (0.772, 0.345) and (0.7789, 0.268) .. (0.689, 0.2445) .. controls (0.597, 0.2206) and (0.4764, 0.2043) .. (0.34, 0.2096) .. controls (0.252, 0.2131) and (0.2368, 0.3059) .. (0.265, 0.3941) -- cycle;
+ \penguin@part@draw[\penguin@feet] (-0.265, 0.3941) .. controls (-0.283, 0.4505) and (-0.373, 0.6014) .. (-0.470, 0.6533) .. controls (-0.571, 0.7075) and (-0.576, 0.6369) .. (-0.554, 0.596) .. controls (-0.526, 0.5416) and (-0.573, 0.5302) .. (-0.602, 0.5384) .. controls (-0.695, 0.5653) and (-0.767, 0.5169) .. (-0.684, 0.434) .. controls (-0.664, 0.4137) and (-0.587, 0.3557) .. (-0.699, 0.3492) .. controls (-0.772, 0.345) and (-0.779, 0.268) .. (-0.689, 0.2445) .. controls (-0.597, 0.2206) and (-0.476, 0.2043) .. (-0.34, 0.2096) .. controls (-0.252, 0.2131) and (-0.237, 0.3059) .. (-0.265, 0.3941) -- cycle;
+ \penguin@part@draw[\penguin@feet] (0.265, 0.3941) .. controls (0.283, 0.4505) and (0.3725, 0.6014) .. (0.469, 0.6533) .. controls (0.571, 0.7075) and (0.5756, 0.6369) .. (0.554, 0.596) .. controls (0.526, 0.5416) and (0.5733, 0.5302) .. (0.602, 0.5384) .. controls (0.695, 0.5653) and (0.7672, 0.5169) .. (0.684, 0.434) .. controls (0.663, 0.4137) and (0.587, 0.3557) .. (0.699, 0.3492) .. controls (0.772, 0.345) and (0.7789, 0.268) .. (0.689, 0.2445) .. controls (0.597, 0.2206) and (0.4764, 0.2043) .. (0.34, 0.2096) .. controls (0.252, 0.2131) and (0.2368, 0.3059) .. (0.265, 0.3941) -- cycle;
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -142,10 +140,8 @@
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifpenguin@back
- \penguin@part@draw[\penguin@feet]
- (-0.265, 0.3941) .. controls (-0.283, 0.4505) and (-0.373, 0.6014) .. (-0.470, 0.6533) .. controls (-0.571, 0.7075) and (-0.576, 0.6369) .. (-0.554, 0.596) .. controls (-0.526, 0.5416) and (-0.573, 0.5302) .. (-0.602, 0.5384) .. controls (-0.695, 0.5653) and (-0.767, 0.5169) .. (-0.684, 0.434) .. controls (-0.664, 0.4137) and (-0.587, 0.3557) .. (-0.699, 0.3492) .. controls (-0.772, 0.345) and (-0.779, 0.268) .. (-0.689, 0.2445) .. controls (-0.597, 0.2206) and (-0.476, 0.2043) .. (-0.34, 0.2096) .. controls (-0.252, 0.2131) and (-0.237, 0.3059) .. (-0.265, 0.3941) -- cycle;
- \penguin@part@draw[\penguin@feet]
- (0.265, 0.3941) .. controls (0.283, 0.4505) and (0.3725, 0.6014) .. (0.469, 0.6533) .. controls (0.571, 0.7075) and (0.5756, 0.6369) .. (0.554, 0.596) .. controls (0.526, 0.5416) and (0.5733, 0.5302) .. (0.602, 0.5384) .. controls (0.695, 0.5653) and (0.7672, 0.5169) .. (0.684, 0.434) .. controls (0.663, 0.4137) and (0.587, 0.3557) .. (0.699, 0.3492) .. controls (0.772, 0.345) and (0.7789, 0.268) .. (0.689, 0.2445) .. controls (0.597, 0.2206) and (0.4764, 0.2043) .. (0.34, 0.2096) .. controls (0.252, 0.2131) and (0.2368, 0.3059) .. (0.265, 0.3941) -- cycle;
+ \penguin@part@draw[\penguin@feet] (-0.265, 0.3941) .. controls (-0.283, 0.4505) and (-0.373, 0.6014) .. (-0.470, 0.6533) .. controls (-0.571, 0.7075) and (-0.576, 0.6369) .. (-0.554, 0.596) .. controls (-0.526, 0.5416) and (-0.573, 0.5302) .. (-0.602, 0.5384) .. controls (-0.695, 0.5653) and (-0.767, 0.5169) .. (-0.684, 0.434) .. controls (-0.664, 0.4137) and (-0.587, 0.3557) .. (-0.699, 0.3492) .. controls (-0.772, 0.345) and (-0.779, 0.268) .. (-0.689, 0.2445) .. controls (-0.597, 0.2206) and (-0.476, 0.2043) .. (-0.34, 0.2096) .. controls (-0.252, 0.2131) and (-0.237, 0.3059) .. (-0.265, 0.3941) -- cycle;
+ \penguin@part@draw[\penguin@feet] (0.265, 0.3941) .. controls (0.283, 0.4505) and (0.3725, 0.6014) .. (0.469, 0.6533) .. controls (0.571, 0.7075) and (0.5756, 0.6369) .. (0.554, 0.596) .. controls (0.526, 0.5416) and (0.5733, 0.5302) .. (0.602, 0.5384) .. controls (0.695, 0.5653) and (0.7672, 0.5169) .. (0.684, 0.434) .. controls (0.663, 0.4137) and (0.587, 0.3557) .. (0.699, 0.3492) .. controls (0.772, 0.345) and (0.7789, 0.268) .. (0.689, 0.2445) .. controls (0.597, 0.2206) and (0.4764, 0.2043) .. (0.34, 0.2096) .. controls (0.252, 0.2131) and (0.2368, 0.3059) .. (0.265, 0.3941) -- cycle;
\fi% back
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -186,53 +182,53 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-penguins}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-penguins}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic penguin}}
%\penguin
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic penguin can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\penguin[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\penguin[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\penguin[pupil=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Bill colour}}
%\penguin[bill=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Belly colour}}
%\penguin[belly=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Foot colour}}
%\penguin[feet=red]
%\end{tcblisting}
%
%To view the penguin from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\penguin[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the penguin 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the penguin 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\penguin[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\penguin[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty b/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
index d551f0a060..13845d8671 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-pigs.sty
@@ -9,14 +9,14 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-pigs}[2022/06/17 version v1.0 Drawing pigs in TikZ]
+\ProvidesPackage{tikzlings-pigs}[2025/01/05 version v2.2 Drawing pigs in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
-\definecolor{pigdark}{RGB}{241,164,142}
+\definecolor{piglight}{RGB}{247,205,193}
\newcommand*{\pig}[1][]{%
\begin{scope}%
@@ -27,12 +27,13 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname pighookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifpig@threeD
\newif\ifpig@back
\newif\ifpig@contour
+\newif\ifpig@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -48,11 +49,11 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.store in = \pig@body,
- body = pigdark,
+ body = piglight,
eye/.store in = \pig@eye,
- eye = gray,
+ eye = gray,
tail/.store in = \pig@tail,
- tail = \pig@body,
+ tail = pig@bodysat22,
mouth/.store in = \pig@mouth,
mouth = gray,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -60,21 +61,23 @@
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ openmouth/.code = \pig@openmouthtrue,
+ open mouth/.forward to = /pig/openmouth,
3D/.code = \pig@threeDtrue
- \def\pig@mouth{gray!70!black},
- back/.code = \pig@backtrue,
+ \def\pig@mouth{gray!70!black},
+ back/.code = \pig@backtrue,
contour/.code = \pig@contourtrue
\def\pig@contour{#1}
\def\pig@mouth{#1}
\def\pig@tail{#1},
- contour/.default = black,
- outline/.forward to = /pig/contour,
+ contour/.default = black,
+ outline/.forward to = /pig/contour,
}
\def\pig@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.625,0.1) rectangle (0.905, 2.27);
@@ -91,7 +94,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -108,8 +111,20 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+ % generating saturated version of body colour
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \extractcolorspecs{\pig@body}{\pig@model}{\pig@colorspec}
+ \convertcolorspec{\pig@model}{\pig@colorspec}{hsb}{\pig@hsbcolorspec}
+ \pgfmathsetmacro{\pig@hue}{(array({\pig@hsbcolorspec},0))}
+ \pgfmathsetmacro{\pig@sat}{(array({\pig@hsbcolorspec},1)+0.22)}
+ \pgfmathsetmacro{\pig@bright}{(array({\pig@hsbcolorspec},2))}
+ \definecolor{pig@bodysat22}{hsb}{\pig@hue,\pig@sat,\pig@bright}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -123,12 +138,12 @@
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpig@back
- \pig@part@draw[\pig@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
- \pig@part@draw[\pig@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
+ \pig@part@draw[pig@bodysat22] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
+ \pig@part@draw[pig@bodysat22] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \pig@part@draw[\pig@body!55!white] ( 0.6, 0.8 ) .. controls ( 0.6 , 0.4) and ( 0.35, 0.16) .. ( 0.0, 0.16) .. controls (-0.35, 0.16) and (-0.6 , 0.4) .. (-0.6, 0.8 ) .. controls (-0.6 , 1.3) and (-0.35, 1.5) .. ( 0.0, 1.5) .. controls ( 0.35, 1.5) and ( 0.6 , 1.3) .. ( 0.6, 0.75) -- cycle;
+ \pig@part@draw[\pig@body] ( 0.6, 0.8 ) .. controls ( 0.6 , 0.4) and ( 0.35, 0.16) .. ( 0.0, 0.16) .. controls (-0.35, 0.16) and (-0.6 , 0.4) .. (-0.6, 0.8 ) .. controls (-0.6 , 1.3) and (-0.35, 1.5) .. ( 0.0, 1.5) .. controls ( 0.35, 1.5) and ( 0.6 , 1.3) .. ( 0.6, 0.75) -- cycle;
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname pighookbelly\endcsname
@@ -136,12 +151,12 @@
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifpig@back
- \pig@part@draw[\pig@body] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
- \pig@part@draw[\pig@body] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
+ \pig@part@draw[pig@bodysat22] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
+ \pig@part@draw[pig@bodysat22] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
\fi% back
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \pig@part@draw[\pig@body!55!white] (0,1.64) ellipse[x radius=.5, y radius=.5];
+ \pig@part@draw[\pig@body] (0,1.64) ellipse[x radius=.5, y radius=.5];
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifpig@back
@@ -151,28 +166,32 @@
\pig@part@draw[\pig@eye] ( 0.09, 1.82) circle[radius=0.02];
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \pig@part@draw[\pig@body] (0, 1.62) ellipse[x radius=0.18, y radius=0.14];
+ \pig@part@draw[pig@bodysat22] (0, 1.62) ellipse[x radius=0.18, y radius=0.14];
\pig@part@draw[gray] (-0.06, 1.62) circle[radius=0.035];
\pig@part@draw[gray] ( 0.06, 1.62) circle[radius=0.035];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\pig@mouth,line width=\scalingfactor*0.4pt] (0.105, 1.46) arc [start angle=-50, end angle=-130, radius=0.16] ;
+ \ifpig@openmouth
+ \filldraw[\pig@mouth,line width=\scalingfactor*0.4pt] (0.105, 1.46) arc [start angle=-50, end angle=-130, radius=0.16];
+ \else
+ \draw[\pig@mouth,line width=\scalingfactor*0.4pt] (0.105, 1.46) arc [start angle=-50, end angle=-130, radius=0.16];
+ \fi
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \pig@part@draw[\pig@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
- \pig@part@draw[\pig@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
+ \pig@part@draw[pig@bodysat22] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
+ \pig@part@draw[pig@bodysat22] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
%
\fi% back
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \pig@part@draw[\pig@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
- \pig@part@draw[\pig@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
- \pig@part@draw[\pig@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
- \pig@part@draw[\pig@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
- %
+ \pig@part@draw[pig@bodysat22] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
+ \pig@part@draw[\pig@body] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \pig@part@draw[pig@bodysat22] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
+ \pig@part@draw[\pig@body] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpig@back
- \draw[\pig@tail,line width=\scalingfactor*0.8pt] (0.8431, 0.583) .. controls (0.8609, 0.4063) and (0.7006, 0.361) .. (0.6384, 0.4293) .. controls (0.5762, 0.4976) and (0.5613, 0.6052) .. (0.6551, 0.629) .. controls (0.7537, 0.6541) and (0.7759, 0.5628) .. (0.7455, 0.4948) .. controls (0.6412, 0.2697) and (0.3543, 0.356) .. (0.2638, 0.4238) .. controls (0.1967, 0.4779) and (0.1788, 0.6076) .. (0.3192, 0.633) .. controls (0.6000, 0.6836) and (0.5130, 0.3048) .. (0.2098, 0.3322) .. controls (0.0809, 0.3438) and (0.0809, 0.5236) .. (0.0809, 0.5236);
+ \draw[\pig@tail,line width=\scalingfactor*0.8pt] (0.8431, 0.583) .. controls (0.8609, 0.4063) and (0.7006, 0.361) .. (0.6384, 0.4293) .. controls (0.5762, 0.4976) and (0.5613, 0.6052) .. (0.6551, 0.629) .. controls (0.7537, 0.6541) and (0.7759, 0.5628) .. (0.7455, 0.4948) .. controls (0.6412, 0.2697) and (0.3543, 0.356) .. (0.2638, 0.4238) .. controls (0.1967, 0.4779) and (0.1788, 0.6076) .. (0.3192, 0.633) .. controls (0.6000, 0.6836) and (0.5130, 0.3048) .. (0.2098, 0.3322) .. controls (0.0809, 0.3438) and (0.0809, 0.5236) .. (0.0809, 0.5236);
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -193,47 +212,52 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-pigs}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-pigs}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic pig}}
%\pig
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic pig can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\pig[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\pig[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Tail colour}}
%\pig[tail=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\pig[mouth=red]
%\end{tcblisting}
%
+% The pig can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\pig[openmouth]
+%\end{tcblisting}
+%
%To view the pig from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\pig[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the pig 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the pig 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\pig[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\pig[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty b/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
index 5ce10d34be..47f868b0b7 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-rhinos.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-rhinos}[2022/06/17 version v1.0 Drawing rhinos in TikZ]
+\ProvidesPackage{tikzlings-rhinos}[2025/01/05 version v2.2 Drawing rhinos in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,12 +26,13 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname rhinohookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifrhino@threeD
\newif\ifrhino@back
\newif\ifrhino@contour
+\newif\ifrhino@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -47,34 +48,38 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.store in = \rhino@body,
- body = gray,
+ body = gray!55!white,
toes/.store in = \rhino@toes,
- toes = \rhino@body!55!white,
+ toes = \rhino@body,
eye/.store in = \rhino@eye,
- eye = white,
+ eye = white,
pupil/.store in = \rhino@pupil,
- pupil = black,
+ pupil = black,
mouth/.store in = \rhino@mouth,
- mouth = \rhino@body!70!black,
+ mouth = \rhino@body!50!black,
+ horn/.store in = \rhino@horn,
+ horn = white!95!yellow,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ openmouth/.code = \rhino@openmouthtrue,
+ open mouth/.forward to = /rhino/openmouth,
3D/.code = \rhino@threeDtrue
- \def\rhino@mouth{black},
- back/.code = \rhino@backtrue,
+ \def\rhino@mouth{black},
+ back/.code = \rhino@backtrue,
contour/.code = \rhino@contourtrue
\def\rhino@contour{#1}
\def\rhino@mouth{#1},
- contour/.default = black,
- outline/.forward to = /rhino/contour,
+ contour/.default = black,
+ outline/.forward to = /rhino/contour,
}
\def\rhino@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.625,0.1) rectangle (0.625, 2.17);
@@ -91,7 +96,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -109,7 +114,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -117,25 +122,22 @@
\csname tikzlinghookbackground\endcsname
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \rhino@part@draw[\rhino@body] (-0.1772, 2.0686) .. controls (-0.2057, 2.1602) and (-0.3552, 2.2076) .. (-0.3552, 2.1922) .. controls (-0.3552, 2.1922) and (-0.3694, 1.9615) .. (-0.2855, 1.9615) .. controls (-0.2264, 1.9462) and (-0.1772, 1.9462) .. (-0.1772, 2.0686) -- cycle;
- \rhino@part@draw[\rhino@body] (0.1772, 2.0686) .. controls (0.2057, 2.1602) and (0.3552, 2.2076) .. (0.3552, 2.1922) .. controls (0.3552, 2.1922) and (0.3694, 1.9615) .. (0.2855, 1.9615) .. controls (0.2264, 1.9462) and (0.1772, 1.9462) .. (0.1772, 2.0686) -- cycle;
+ \rhino@part@draw[\rhino@body!70!black] (-0.1772, 2.0686) .. controls (-0.2057, 2.1602) and (-0.3552, 2.2076) .. (-0.3552, 2.1922) .. controls (-0.3552, 2.1922) and (-0.3694, 1.9615) .. (-0.2855, 1.9615) .. controls (-0.2264, 1.9462) and (-0.1772, 1.9462) .. (-0.1772, 2.0686) -- cycle;
+ \rhino@part@draw[\rhino@body!70!black] (0.1772, 2.0686) .. controls (0.2057, 2.1602) and (0.3552, 2.2076) .. (0.3552, 2.1922) .. controls (0.3552, 2.1922) and (0.3694, 1.9615) .. (0.2855, 1.9615) .. controls (0.2264, 1.9462) and (0.1772, 1.9462) .. (0.1772, 2.0686) -- cycle;
%
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifrhino@back
- \begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \rhino@part@draw[\rhino@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \rhino@part@draw[\rhino@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \end{scope}
+ \rhino@part@draw[\rhino@body!70!black] (-0.08,0.13) arc [start angle=0, end angle=180, x radius=0.17, y radius=0.19] -- cycle;
+ \rhino@part@draw[\rhino@body!70!black](0.08,0.13) arc [start angle=180, end angle=0, x radius=0.17, y radius=0.19] -- cycle;
\fi% back
%
% Nose if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifrhino@back
- \rhino@part@draw[\rhino@body!80!white] (0, 1.55) ellipse[x radius=0.36, y radius=0.2];
+ \rhino@part@draw[\rhino@body!83!black] (0, 1.55) ellipse[x radius=0.36, y radius=0.2];
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \rhino@part@draw[\rhino@body!55!white] ( 0.55, 0.8 ) .. controls ( 0.55 , 0.4) and ( 0.35, 0.19) .. ( 0.0, 0.19) .. controls (-0.35, 0.19) and (-0.55 , 0.4) .. (-0.55, 0.8 ) .. controls (-0.55 , 1.3) and (-0.35, 1.65) .. ( 0.0, 1.65) .. controls ( 0.35, 1.65) and ( 0.55 , 1.3) .. ( 0.55, 0.75) -- cycle;
+ \rhino@part@draw[\rhino@body] ( 0.55, 0.8 ) .. controls ( 0.55 , 0.4) and ( 0.35, 0.19) .. ( 0.0, 0.19) .. controls (-0.35, 0.19) and (-0.55 , 0.4) .. (-0.55, 0.8 ) .. controls (-0.55 , 1.3) and (-0.35, 1.65) .. ( 0.0, 1.65) .. controls ( 0.35, 1.65) and ( 0.55 , 1.3) .. ( 0.55, 0.75) -- cycle;
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname rhinohookbelly\endcsname
@@ -143,12 +145,12 @@
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifrhino@back
- \rhino@part@draw[\rhino@body] (0.3,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=90];
- \rhino@part@draw[\rhino@body] (-0.3,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=-90];
+ \rhino@part@draw[\rhino@body!70!black] (0.3,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=90];
+ \rhino@part@draw[\rhino@body!70!black] (-0.3,1.0) ellipse[x radius=0.24, y radius=0.13, rotate=-90];
\fi% back
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \rhino@part@draw[\rhino@body!55!white] (0, 1.76) circle[radius=0.36];
+ \rhino@part@draw[\rhino@body] (0, 1.76) circle[radius=0.36];
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifrhino@back
@@ -167,26 +169,27 @@
\fi% contour
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \rhino@part@draw[\rhino@body!80!white] (0, 1.55) ellipse[x radius=0.36, y radius=0.2];
+ \rhino@part@draw[\rhino@body!83!black] (0, 1.55) ellipse[x radius=0.36, y radius=0.2];
%
% Horn %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \rhino@part@draw[white!95!yellow] (0, 1.7911) .. controls (-0.0231, 1.7372) and (-0.0463, 1.6832) .. (-0.0642, 1.6274) .. controls (-0.0687, 1.6132) and (-0.0724, 1.5981) .. (-0.0678, 1.5834) .. controls (-0.0603, 1.552) and (-0.0287, 1.5287) .. (0, 1.531) .. controls (0.0287, 1.5287) and (0.0603, 1.552) .. (0.0678, 1.5834) .. controls (0.0724, 1.5981) and (0.0687, 1.6132) .. (0.0642, 1.6274) .. controls (0.0463, 1.6832) and (0.0231, 1.7372) .. (0, 1.7911) -- cycle;
+ \rhino@part@draw[\rhino@horn] (0, 1.7911) .. controls (-0.0231, 1.7372) and (-0.0463, 1.6832) .. (-0.0642, 1.6274) .. controls (-0.0687, 1.6132) and (-0.0724, 1.5981) .. (-0.0678, 1.5834) .. controls (-0.0603, 1.552) and (-0.0287, 1.5287) .. (0, 1.531) .. controls (0.0287, 1.5287) and (0.0603, 1.552) .. (0.0678, 1.5834) .. controls (0.0724, 1.5981) and (0.0687, 1.6132) .. (0.0642, 1.6274) .. controls (0.0463, 1.6832) and (0.0231, 1.7372) .. (0, 1.7911) -- cycle;
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\rhino@mouth,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2] ;
+ \ifrhino@openmouth
+ \filldraw[\rhino@mouth,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2];
+ \else
+ \draw[\rhino@mouth,line width=\scalingfactor*0.4pt] (0.125, 1.5) arc [start angle=-50, end angle=-130, radius=0.2];
+ \fi
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \begin{scope}
- \clip (-0.5,0.4) rectangle (0.5,0.13);
- \rhino@part@draw[\rhino@body] (-0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \rhino@part@draw[\rhino@body] (0.25,0.15) ellipse[x radius=0.16, y radius=0.17];
- \rhino@part@draw[\rhino@toes] (0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (-0.25,0.13) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (-0.13,0.11) ellipse[x radius=0.05, y radius=0.1];
- \rhino@part@draw[\rhino@toes] (-0.37,0.11) ellipse[x radius=0.05, y radius=0.1];
- \end{scope}
+ \rhino@part@draw[\rhino@body!70!black] (-0.08,0.13) arc [start angle=0, end angle=180, x radius=0.17, y radius=0.19] -- cycle;
+ \rhino@part@draw[\rhino@toes] (-0.08,0.13) arc [start angle=0, end angle=180, x radius=0.05, y radius=0.08] -- cycle;
+ \rhino@part@draw[\rhino@toes] (-0.2,0.13) arc [start angle=0, end angle=180, x radius=0.05, y radius=0.1] -- cycle;
+ \rhino@part@draw[\rhino@toes] (-0.32,0.13) arc [start angle=0, end angle=180, x radius=0.05, y radius=0.08] -- cycle;
+ \rhino@part@draw[\rhino@body!70!black](0.08,0.13) arc [start angle=180, end angle=0, x radius=0.17, y radius=0.19] -- cycle;
+ \rhino@part@draw[\rhino@toes] (0.08,0.13) arc [start angle=180, end angle=0, x radius=0.05, y radius=0.08] -- cycle;
+ \rhino@part@draw[\rhino@toes] (0.2,0.13) arc [start angle=180, end angle=0, x radius=0.05, y radius=0.1] -- cycle;
+ \rhino@part@draw[\rhino@toes] (0.32,0.13) arc [start angle=180, end angle=0, x radius=0.05, y radius=0.08] -- cycle;
%
\fi% back
%
@@ -208,52 +211,60 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-rhinos}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-rhinos}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic rhino}}
%\rhino
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic rhino can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\rhino[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\rhino[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\rhino[pupil=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\rhino[mouth=red]
%\end{tcblisting}
+%\begin{tcblisting}{title={Horn colour}}
+%\rhino[horn=red]
+%\end{tcblisting}
+%
+% The rhino can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\rhino[openmouth]
+%\end{tcblisting}
%
%The hippo can also do its nails:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Toe colour}}
%\rhino[toes=red]
%\end{tcblisting}
%
%To view the rhino from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\rhino[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the rhino 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the rhino 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\rhino[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\rhino[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty b/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
index 5c8cd7e6bc..c412796adc 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-sheep.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-sheep}[2022/06/17 version v1.0 Drawing sheep in TikZ]
+\ProvidesPackage{tikzlings-sheep}[2025/01/05 version v2.2 Drawing sheep in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -52,11 +52,11 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body/.store in = \sheep@body,
- body = brown!50!darkgray!97!yellow,
+ body = brown!50!darkgray!97!yellow!50!darkgray,
eye/.store in = \sheep@eye,
- eye = \sheep@body!50!black,
+ eye = sheep@bright!50!black,
nose/.store in = \sheep@nose,
- nose = \sheep@body!50!black,
+ nose = sheep@bright!50!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -64,22 +64,22 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
blush/.code = \sheep@blushtrue
\def\sheep@blushcolor{#1},
- blush/.default = red,
+ blush/.default = red,
monocle/.code = \sheep@monocletrue,
- 3D/.code = \sheep@threeDtrue,
- back/.code = \sheep@backtrue,
+ 3D/.code = \sheep@threeDtrue,
+ back/.code = \sheep@backtrue,
contour/.code = \sheep@contourtrue
\def\sheep@contour{#1}
\def\sheep@blushcolor{#1}
\def\sheep@nose{#1},
- contour/.default = black,
- outline/.forward to = /sheep/contour,
+ contour/.default = black,
+ outline/.forward to = /sheep/contour,
}
\def\sheep@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.7,0.08) rectangle (0.7,2.33);
@@ -94,9 +94,10 @@
\pgfmathsetmacro{\scalingfactor}{sqrt(abs(\tmpscaleA*\tmpscaleD-\tmpscaleB*\tmpscaleC))*sqrt(abs((\pgf@xx/1cm)*(\pgf@yy/1cm)-(\pgf@xy/1cm)*(\pgf@yx/1cm)))}%
\pgfmathsetmacro{\xscalefactor}{\tmpscaleA}
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
+ \pgfmathsetmacro{\decoscalefactor}{sign(\tmpscaleA)*sign(\tmpscaleD)*\scalingfactor}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -113,28 +114,40 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+ % generating saturated/brighter version of body colour
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \extractcolorspecs{\sheep@body}{\sheep@model}{\sheep@colorspec}
+ \convertcolorspec{\sheep@model}{\sheep@colorspec}{hsb}{\sheep@hsbcolorspec}
+ \pgfmathsetmacro{\sheep@hue}{(array({\sheep@hsbcolorspec},0))}
+ \pgfmathsetmacro{\sheep@sat}{(array({\sheep@hsbcolorspec},1))}
+ \pgfmathsetmacro{\sheep@bright}{(array({\sheep@hsbcolorspec},2))+0.1}
+ \definecolor{sheep@bright}{hsb}{\sheep@hue,\sheep@sat,\sheep@bright}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname sheephookbackground\endcsname
\csname tikzlinghookbackground\endcsname
- %
+ %
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
- \sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
- \sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
- \sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
- %
+ \sheep@part@draw[sheep@bright] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[sheep@bright!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[sheep@bright] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
+ \sheep@part@draw[sheep@bright!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
% Feet if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsheep@back
- \sheep@part@draw[\sheep@body] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
- \sheep@part@draw[\sheep@body] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
+ \sheep@part@draw[sheep@bright] (0.3216,0.15) arc (-15:195:0.12) -- (0.16,0.15) to [bend left] (0.25,0.15) -- cycle;
+ \sheep@part@draw[sheep@bright] (-0.3216,0.15) arc (195:-15:0.12) -- (-0.16,0.15) to[bend right] (-0.25,0.15) --cycle;
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
+ \sheep@part@draw[\sheep@body,decorate,decoration={bumps,amplitude=\decoscalefactor*2.5pt,segment length=\scalingfactor*10pt}] (0.595, 0.92) .. controls (0.595, 0.26) and (0.355, 0.18) .. (0, 0.18) .. controls (-0.355, 0.18) and (-0.595, 0.26) .. (-0.595, 0.92) .. controls (-0.605, 1.58) and (-0.335, 2.11) .. (0, 2.11) .. controls (0.335, 2.11) and (0.605, 1.58) .. (0.595, 0.92) -- cycle;
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname sheephookbelly\endcsname
@@ -142,30 +155,30 @@
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifsheep@back
- \sheep@part@draw[\sheep@body!45!white!95!orange] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
+ \sheep@part@draw[sheep@bright!45!white!95!orange] (-0.2402, 0.9823) .. controls (-0.2994, 1.0582) and (-0.3721, 1.0651) .. (-0.4024, 0.9978) .. controls (-0.4327, 0.9305) and (-0.4092, 0.8145) .. (-0.35, 0.7386) .. controls (-0.3311, 0.7145) and (-0.3101, 0.6964) .. (-0.289, 0.6862) .. controls (-0.2755, 0.7023) and (-0.2498, 0.7563) .. (-0.2498, 0.7563) .. controls (-0.2498, 0.7563) and (-0.1790, 0.731) .. (-0.1611, 0.746) .. controls (-0.1611, 0.746) and (-0.1809, 0.9064) .. (-0.2402, 0.9823) -- cycle;
+ \sheep@part@draw[sheep@bright!45!white!95!orange] (0.2402, 0.9823) .. controls (0.2994, 1.0582) and (0.3721, 1.0651) .. (0.4024, 0.9978) .. controls (0.4327, 0.9305) and (0.4092, 0.8145) .. (0.35, 0.7386) .. controls (0.3311, 0.7145) and (0.3101, 0.6964) .. (0.289, 0.6862) .. controls (0.2755, 0.7023) and (0.2498, 0.7563) .. (0.2498, 0.7563) .. controls (0.2498, 0.7563) and (0.1790, 0.731) .. (0.1611, 0.746) .. controls (0.1611, 0.746) and (0.1809, 0.9064) .. (0.2402, 0.9823) -- cycle;
\fi% back
%
% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+ \sheep@part@draw[\sheep@body,decorate,decoration={bumps,amplitude=\decoscalefactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
%
% Tail if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsheep@back
- \sheep@part@draw[\sheep@body!45!white!95!orange,rounded corners=\scalingfactor*0.1pt] (0,0.7) -- (0.08, 0.3236) arc (0:-180:\scalingfactor*2pt) -- cycle;
+ \sheep@part@draw[sheep@bright!45!white!95!orange,rounded corners=\scalingfactor*0.1pt] (0,0.7) -- (0.08, 0.3236) arc (0:-180:\scalingfactor*2pt) -- cycle;
\fi% back
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifsheep@back
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.4, 1.8) .. controls (0.4, 1.5) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.4, 1.5) .. (-0.4, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.4, 1.8) -- cycle;
+ \sheep@part@draw[sheep@bright!45!white!95!orange] (0.4, 1.8) .. controls (0.4, 1.5) and (0.2, 1.25) .. (0, 1.16) .. controls (-0.2, 1.25) and (-0.4, 1.5) .. (-0.4, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.4, 1.8) -- cycle;
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sheep@part@draw[\sheep@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
- \sheep@part@draw[\sheep@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
- \sheep@part@draw[\sheep@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
- \sheep@part@draw[\sheep@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
- %
+ \sheep@part@draw[sheep@bright] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[sheep@bright!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \sheep@part@draw[sheep@bright] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
+ \sheep@part@draw[sheep@bright!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifsheep@back
\sheep@part@draw[\sheep@eye] (0.2, 1.66) circle[radius=0.06];
@@ -176,15 +189,15 @@
\draw[\sheep@nose,line width=\scalingfactor*0.8pt,line cap=round] (0.16,1.43) arc [start angle=-30, end angle=-150, radius=0.185] (0.0,1.335) -- (0,1.175);
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sheep@part@draw[\sheep@body!45!white!95!orange] (0.3216,0.13) arc (-15:195:0.10) -- (0.16,0.13) to [bend left] (0.25,0.13) -- cycle;
- \sheep@part@draw[\sheep@body!45!white!95!orange] (-0.3216,0.13) arc (195:-15:0.10) -- (-0.16,0.13) to[bend right] (-0.25,0.13) --cycle;
+ \sheep@part@draw[sheep@bright!45!white!95!orange] (0.3216,0.13) arc (-15:195:0.10) -- (0.16,0.13) to [bend left] (0.25,0.13) -- cycle;
+ \sheep@part@draw[sheep@bright!45!white!95!orange] (-0.3216,0.13) arc (195:-15:0.10) -- (-0.16,0.13) to[bend right] (-0.25,0.13) --cycle;
%
% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sheep@part@draw[\sheep@body!50!darkgray,decorate,decoration={bumps,amplitude=\scalingfactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
+ \sheep@part@draw[\sheep@body,decorate,decoration={bumps,amplitude=\decoscalefactor*2.5pt,segment length=\scalingfactor*10pt}] (-0.275,1.98) -- (-0.2,2.2) -- (-0.008,2.2) -- (0.2,2.2) -- (0.275,1.98) -- cycle;
%
% Blush %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsheep@blush
- \fill[\sheep@blushcolor,path fading=sheep@blush] (-0.25, 1.5) circle[radius=0.1];
+ \fill[\sheep@blushcolor,path fading=sheep@blush] (-0.25, 1.5) circle[radius=0.1];
\fill[\sheep@blushcolor,path fading=sheep@blush] (0.25, 1.5) circle[radius=0.1];
\fi% blush
%
@@ -199,7 +212,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname sheephookbody\endcsname
\csname tikzlinghookbody\endcsname
- %
+ %
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -214,54 +227,54 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-sheep}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-sheep}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic sheep}}
%\sheep
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic sheep can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\sheep[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\sheep[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Nose colour}}
%\sheep[nose=red]
%\end{tcblisting}
%
%The sheep can also blush
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Blushing sheep}}
%\sheep[blush=red]
%\end{tcblisting}
%
%and put on a monocle
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Monocle}}
%\sheep[monocle]
%\end{tcblisting}
%
%To view the sheep from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\sheep[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the sheep 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the sheep 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\sheep[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\sheep[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty b/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
index fc7658629d..514fd72731 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-sloths.sty
@@ -9,15 +9,15 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-sloths}[2022/06/17 version v1.0 Drawing sloths in TikZ]
+\ProvidesPackage{tikzlings-sloths}[2025/01/05 version v2.2 Drawing sloths in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
-\definecolor{slothcol}{RGB}{168,156,123}
+\definecolor{slothcol}{RGB}{143,133,105}
\newcommand*{\sloth}[1][]{%
\begin{scope}%
@@ -28,13 +28,14 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname slothhookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifsloth@sleeping
\newif\ifsloth@threeD
\newif\ifsloth@back
\newif\ifsloth@contour
+\newif\ifsloth@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -52,31 +53,33 @@
body/.store in = \sloth@body,
body = slothcol,
eye/.store in = \sloth@eye,
- eye = black,
+ eye = black,
eyelid/.store in = \sloth@eyelid,
- eyelid = \sloth@body!50!white,
+ eyelid = sloth@bright10!50!white,
mouth/.store in = \sloth@mouth,
- mouth = \sloth@body!40!black,
+ mouth = sloth@bright10!40!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- sleeping/.code = \sloth@sleepingtrue,
- 3D/.code = \sloth@threeDtrue,
- back/.code = \sloth@backtrue,
+ sleeping/.code = \sloth@sleepingtrue,
+ openmouth/.code = \sloth@openmouthtrue,
+ open mouth/.forward to = /sloth/openmouth,
+ 3D/.code = \sloth@threeDtrue,
+ back/.code = \sloth@backtrue,
contour/.code = \sloth@contourtrue
\def\sloth@contour{#1}
\def\sloth@mouth{#1}
\def\sloth@eyelid{#1},
- contour/.default = black,
- outline/.forward to = /sloth/contour,
+ contour/.default = black,
+ outline/.forward to = /sloth/contour,
}
\def\sloth@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.7,0.12) rectangle (0.7, 2.27);
@@ -93,7 +96,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -110,8 +113,20 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+ % generating saturated/brighter version of body colour
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \extractcolorspecs{\sloth@body}{\sloth@model}{\sloth@colorspec}
+ \convertcolorspec{\sloth@model}{\sloth@colorspec}{hsb}{\sloth@hsbcolorspec}
+ \pgfmathsetmacro{\sloth@hue}{(array({\sloth@hsbcolorspec},0))}
+ \pgfmathsetmacro{\sloth@sat}{(array({\sloth@hsbcolorspec},1))}
+ \pgfmathsetmacro{\sloth@bright}{(array({\sloth@hsbcolorspec},2))+0.1}
+ \definecolor{sloth@bright10}{hsb}{\sloth@hue,\sloth@sat,\sloth@bright}
+ %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -120,29 +135,28 @@
%
% Arms if back %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsloth@back
- \sloth@part@draw[\sloth@body] (0.53,0.95) ellipse[x radius=0.1, y radius=0.27, rotate=10];
- \sloth@part@draw[\sloth@body] (-0.53,0.95) ellipse[x radius=0.1, y radius=0.27, rotate=-10];
+ \sloth@part@draw[sloth@bright10] (0.53,0.95) ellipse[x radius=0.1, y radius=0.27, rotate=10];
+ \sloth@part@draw[sloth@bright10] (-0.53,0.95) ellipse[x radius=0.1, y radius=0.27, rotate=-10];
\fi% back
%
% Feet if back%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsloth@back
- \fill[\sloth@body!50!black] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019,rotate=-10];
- \fill[\sloth@body!50!black] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
- \fill[\sloth@body!50!black] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
- \fill[\sloth@body!50!black] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
- \fill[\sloth@body!50!black] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
- \fill[\sloth@body!50!black] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
- \sloth@part@draw[\sloth@body] (0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=25];
- \sloth@part@draw[\sloth@body] (-0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=-25];
+ \fill[sloth@bright10!50!black] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019,rotate=-10];
+ \fill[sloth@bright10!50!black] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
+ \fill[sloth@bright10!50!black] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
+ \fill[sloth@bright10!50!black] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
+ \fill[sloth@bright10!50!black] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
+ \fill[sloth@bright10!50!black] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
+ \sloth@part@draw[sloth@bright10] (0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=25];
+ \sloth@part@draw[sloth@bright10] (-0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=-25];
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sloth@part@draw[\sloth@body!85!black] (0.53,0.85) .. controls (0.53,0.29) and (0.32,0.22) .. (0,0.22) .. controls (-0.32,0.22) and (-0.53,0.29) ..
- (-0.53,0.85) .. controls (-0.53,1.41) and (-0.32,1.87) .. (0,1.87) .. controls (0.33,1.87) and (0.53,1.41) .. (0.53,0.85) -- cycle;
+ \sloth@part@draw[\sloth@body] (0.53,0.85) .. controls (0.53,0.29) and (0.32,0.22) .. (0,0.22) .. controls (-0.32,0.22) and (-0.53,0.29) .. (-0.53,0.85) .. controls (-0.53,1.41) and (-0.32,1.87) .. (0,1.87) .. controls (0.33,1.87) and (0.53,1.41) .. (0.53,0.85) -- cycle;
%
% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifsloth@back
- \sloth@part@draw[\sloth@body!70!white] (0.36, 0.74) .. controls (0.36, 0.49) and (0.22, 0.41) .. (0, 0.41) .. controls (-0.22, 0.41) and (-0.36, 0.49) .. (-0.36, 0.74) .. controls (-0.36, 1) and (-0.22, 1.16) .. (0, 1.16) .. controls (0.22, 1.16) and (0.36, 1) .. (0.36, 0.74) -- cycle;
+ \sloth@part@draw[sloth@bright10!70!white] (0.36, 0.74) .. controls (0.36, 0.49) and (0.22, 0.41) .. (0, 0.41) .. controls (-0.22, 0.41) and (-0.36, 0.49) .. (-0.36, 0.74) .. controls (-0.36, 1) and (-0.22, 1.16) .. (0, 1.16) .. controls (0.22, 1.16) and (0.36, 1) .. (0.36, 0.74) -- cycle;
\fi% back
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -150,46 +164,42 @@
\csname tikzlinghookbelly\endcsname
%
% Hair %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sloth@part@draw[\sloth@body] (-0.1128,2.0724) .. controls (-0.1128,2.0724) and (-0.1499,2.2329) .. (-0.0972,2.2525) .. controls (-0.1082,2.1318) and (-0.0047,2.0839) .. (-0.0047,2.0839) .. controls (-0.0047,2.0839) and (-0.0219,2.1866) .. (0.0145,2.1933) .. controls (0.0142,2.1159) and (0.0770,2.0884) .. (0.0770,2.0884) -- cycle;
+ \sloth@part@draw[sloth@bright10] (-0.1128,2.0724) .. controls (-0.1128,2.0724) and (-0.1499,2.2329) .. (-0.0972,2.2525) .. controls (-0.1082,2.1318) and (-0.0047,2.0839) .. (-0.0047,2.0839) .. controls (-0.0047,2.0839) and (-0.0219,2.1866) .. (0.0145,2.1933) .. controls (0.0142,2.1159) and (0.0770,2.0884) .. (0.0770,2.0884) -- cycle;
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sloth@part@draw[\sloth@body]
- ( 0.50,1.67) .. controls ( 0.50,1.91) and ( 0.27,2.10) ..
- ( 0.00,2.10) .. controls (-0.27,2.10) and (-0.50,1.91) .. (-0.50,1.67) .. controls (-0.50,1.43) and (-0.33,1.28) ..
- ( 0.00,1.28) .. controls ( 0.33,1.28) and ( 0.50,1.43) ..
- ( 0.50,1.67) -- cycle;
+ \sloth@part@draw[sloth@bright10] ( 0.50,1.67) .. controls ( 0.50,1.91) and ( 0.27,2.10) .. ( 0.00,2.10) .. controls (-0.27,2.10) and (-0.50,1.91) .. (-0.50,1.67) .. controls (-0.50,1.43) and (-0.33,1.28) .. ( 0.00,1.28) .. controls ( 0.33,1.28) and ( 0.50,1.43) .. ( 0.50,1.67) -- cycle;
%
% Show details only from the front %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifsloth@back
%
% Inner part of hat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sloth@part@draw[\sloth@body!50!white] ( 0.40,1.67) .. controls ( 0.40,1.90) and ( 0.12,2.09) .. ( 0.00,1.93) .. controls (-0.12,2.09) and (-0.40,1.90) .. (-0.40,1.67) .. controls (-0.40,1.45) and (-0.25,1.38) .. ( 0.00,1.38) .. controls ( 0.25,1.38) and ( 0.40,1.45) .. ( 0.40,1.67) -- cycle;
+ \sloth@part@draw[sloth@bright10!50!white] ( 0.40,1.67) .. controls ( 0.40,1.90) and ( 0.12,2.09) .. ( 0.00,1.93) .. controls (-0.12,2.09) and (-0.40,1.90) .. (-0.40,1.67) .. controls (-0.40,1.45) and (-0.25,1.38) .. ( 0.00,1.38) .. controls ( 0.25,1.38) and ( 0.40,1.45) .. ( 0.40,1.67) -- cycle;
%
% behind the eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsloth@contour
\draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.3785,1.5336) .. controls (0.3012,1.5864) and (0.1829,1.6693) .. (0.1377,1.7234) .. controls (0.1184,1.7464) and (0.1624,1.8242) .. (0.1906,1.8137) .. controls (0.2673,1.7851) and (0.3597,1.7125) .. (0.3994,1.6531) .. controls (0.4129,1.6328) and (0.3785,1.5336) .. (0.3785,1.5336) -- cycle;
\draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.3785,1.5336) .. controls (-0.3012,1.5864) and (-0.1829,1.6693) .. (-0.1377,1.7234) .. controls (-0.1184,1.7464) and (-0.1624,1.8242) .. (-0.1906,1.8137) .. controls (-0.2673,1.7851) and (-0.3597,1.7125) .. (-0.3994,1.6531) .. controls (-0.4129,1.6328) and (-0.3785,1.5336) .. (-0.3785,1.5336) -- cycle;
\else% contour
- \fill[\sloth@body!60!black] (0.3785,1.5336) .. controls (0.3012,1.5864) and (0.1829,1.6693) .. (0.1377,1.7234) .. controls (0.1184,1.7464) and (0.1624,1.8242) .. (0.1906,1.8137) .. controls (0.2673,1.7851) and (0.3597,1.7125) .. (0.3994,1.6531) .. controls (0.4129,1.6328) and (0.3785,1.5336) .. (0.3785,1.5336) -- cycle;
- \fill[\sloth@body!60!black] (-0.3785,1.5336) .. controls (-0.3012,1.5864) and (-0.1829,1.6693) .. (-0.1377,1.7234) .. controls (-0.1184,1.7464) and (-0.1624,1.8242) .. (-0.1906,1.8137) .. controls (-0.2673,1.7851) and (-0.3597,1.7125) .. (-0.3994,1.6531) .. controls (-0.4129,1.6328) and (-0.3785,1.5336) .. (-0.3785,1.5336) -- cycle;
+ \fill[sloth@bright10!60!black] (0.3785,1.5336) .. controls (0.3012,1.5864) and (0.1829,1.6693) .. (0.1377,1.7234) .. controls (0.1184,1.7464) and (0.1624,1.8242) .. (0.1906,1.8137) .. controls (0.2673,1.7851) and (0.3597,1.7125) .. (0.3994,1.6531) .. controls (0.4129,1.6328) and (0.3785,1.5336) .. (0.3785,1.5336) -- cycle;
+ \fill[sloth@bright10!60!black] (-0.3785,1.5336) .. controls (-0.3012,1.5864) and (-0.1829,1.6693) .. (-0.1377,1.7234) .. controls (-0.1184,1.7464) and (-0.1624,1.8242) .. (-0.1906,1.8137) .. controls (-0.2673,1.7851) and (-0.3597,1.7125) .. (-0.3994,1.6531) .. controls (-0.4129,1.6328) and (-0.3785,1.5336) .. (-0.3785,1.5336) -- cycle;
\fi% contour
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsloth@sleeping
- \fill[\sloth@eyelid] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@eyelid,rotate around={22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@eyelid,rotate around={44:(0.195, 1.76)}] (0.195, 1.701) rectangle ++(0.005, 0.02);
- \fill[\sloth@eyelid,rotate around={-22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@eyelid,rotate around={-44:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={44:(0.195, 1.76)}] (0.195, 1.701) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={-22:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={-44:(0.195, 1.76)}] (0.195, 1.705) rectangle ++(0.005, 0.02);
%
- \fill[\sloth@eyelid] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@eyelid,rotate around={22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@eyelid,rotate around={44:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@eyelid,rotate around={-22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
- \fill[\sloth@eyelid,rotate around={-44:(-0.195, 1.76)}] (-0.195, 1.701) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid] (-0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={44:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={-22:(-0.195, 1.76)}] (-0.195, 1.705) rectangle ++(0.005, 0.02);
+ \fill[\sloth@eyelid,rotate around={-44:(-0.195, 1.76)}] (-0.195, 1.701) rectangle ++(0.005, 0.02);
%
\sloth@part@draw[\sloth@eyelid] (0.237, 1.743) .. controls (0.237, 1.712) and (0.157, 1.712) .. (0.157, 1.743) .. controls (0.157, 1.802) and (0.237, 1.802) .. (0.237, 1.743) -- cycle;
- \sloth@part@draw[\sloth@eyelid] (-0.237, 1.743) .. controls (-0.237, 1.712) and (-0.157, 1.712) .. (-0.157, 1.743) .. controls (-0.157, 1.802) and (-0.237, 1.802) .. (-0.237, 1.743) -- cycle;
+ \sloth@part@draw[\sloth@eyelid] (-0.237, 1.743) .. controls (-0.237, 1.712) and (-0.157, 1.712) .. (-0.157, 1.743) .. controls (-0.157, 1.802) and (-0.237, 1.802) .. (-0.237, 1.743) -- cycle;
\else% sleeping
\sloth@part@draw[\sloth@eye] (0.193,1.75) circle[radius=0.04];
\sloth@part@draw[\sloth@eye] (-0.193,1.75) circle[radius=0.04];
@@ -198,14 +208,18 @@
\fi% sleeping
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sloth@part@draw[\sloth@body!40!black] (0,1.665) ellipse[x radius=0.078, y radius=0.048];
+ \sloth@part@draw[sloth@bright10!40!black] (0,1.665) ellipse[x radius=0.078, y radius=0.048];
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \draw[\sloth@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.55) arc [start angle=-40, end angle=-140, radius=0.16];
+ \ifsloth@openmouth
+ \filldraw[\sloth@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.55) arc [start angle=-40, end angle=-140, radius=0.16];
+ \else
+ \draw[\sloth@mouth,line width=\scalingfactor*0.4pt] (0.115, 1.55) arc [start angle=-40, end angle=-140, radius=0.16];
+ \fi
%
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sloth@part@draw[\sloth@body] (-0.50, 1.24) .. controls (-0.54, 1.24) and (-0.55, 1.20) .. (-0.56, 1.17) .. controls (-0.61, 1.06) and (-0.63, 0.95) .. (-0.64, 0.83) .. controls (-0.64, 0.80) and (-0.64, 0.77) .. (-0.63, 0.74) .. controls (-0.57, 0.66) and (-0.47, 0.60) .. (-0.38, 0.56) .. controls (-0.31, 0.54) and (-0.23, 0.52) .. (-0.16, 0.54) .. controls (-0.12, 0.54) and (-0.10, 0.59) .. (-0.13, 0.61) .. controls (-0.17, 0.68) and (-0.24, 0.73) .. (-0.30, 0.77) .. controls (-0.34, 0.79) and (-0.38, 0.81) .. (-0.42, 0.83) .. controls (-0.41, 0.92) and (-0.41, 1.01) .. (-0.42, 1.09) .. controls (-0.43, 1.14) and (-0.44, 1.19) .. (-0.48, 1.23) .. controls (-0.48, 1.24) and (-0.49, 1.24) .. (-0.50, 1.24) -- cycle;
- \sloth@part@draw[\sloth@body] (0.50, 1.24) .. controls (0.54, 1.24) and (0.55, 1.20) .. (0.56, 1.17) .. controls (0.61, 1.06) and (0.63, 0.95) .. (0.64, 0.83) .. controls (0.64, 0.80) and (0.64, 0.77) .. (0.63, 0.74) .. controls (0.57, 0.66) and (0.47, 0.60) .. (0.38, 0.56) .. controls (0.31, 0.54) and (0.23, 0.52) .. (0.16, 0.54) .. controls (0.12, 0.54) and (0.10, 0.59) .. (0.13, 0.61) .. controls (0.17, 0.68) and (0.24, 0.73) .. (0.30, 0.77) .. controls (0.34, 0.79) and (0.38, 0.81) .. (0.42, 0.83) .. controls (0.41, 0.92) and (0.41, 1.01) .. (0.42, 1.09) .. controls (0.43, 1.14) and (0.44, 1.19) .. (0.48, 1.23) .. controls (0.48, 1.24) and (0.49, 1.24) .. (0.50, 1.24) -- cycle;
+ \sloth@part@draw[sloth@bright10] (-0.50, 1.24) .. controls (-0.54, 1.24) and (-0.55, 1.20) .. (-0.56, 1.17) .. controls (-0.61, 1.06) and (-0.63, 0.95) .. (-0.64, 0.83) .. controls (-0.64, 0.80) and (-0.64, 0.77) .. (-0.63, 0.74) .. controls (-0.57, 0.66) and (-0.47, 0.60) .. (-0.38, 0.56) .. controls (-0.31, 0.54) and (-0.23, 0.52) .. (-0.16, 0.54) .. controls (-0.12, 0.54) and (-0.10, 0.59) .. (-0.13, 0.61) .. controls (-0.17, 0.68) and (-0.24, 0.73) .. (-0.30, 0.77) .. controls (-0.34, 0.79) and (-0.38, 0.81) .. (-0.42, 0.83) .. controls (-0.41, 0.92) and (-0.41, 1.01) .. (-0.42, 1.09) .. controls (-0.43, 1.14) and (-0.44, 1.19) .. (-0.48, 1.23) .. controls (-0.48, 1.24) and (-0.49, 1.24) .. (-0.50, 1.24) -- cycle;
+ \sloth@part@draw[sloth@bright10] (0.50, 1.24) .. controls (0.54, 1.24) and (0.55, 1.20) .. (0.56, 1.17) .. controls (0.61, 1.06) and (0.63, 0.95) .. (0.64, 0.83) .. controls (0.64, 0.80) and (0.64, 0.77) .. (0.63, 0.74) .. controls (0.57, 0.66) and (0.47, 0.60) .. (0.38, 0.56) .. controls (0.31, 0.54) and (0.23, 0.52) .. (0.16, 0.54) .. controls (0.12, 0.54) and (0.10, 0.59) .. (0.13, 0.61) .. controls (0.17, 0.68) and (0.24, 0.73) .. (0.30, 0.77) .. controls (0.34, 0.79) and (0.38, 0.81) .. (0.42, 0.83) .. controls (0.41, 0.92) and (0.41, 1.01) .. (0.42, 1.09) .. controls (0.43, 1.14) and (0.44, 1.19) .. (0.48, 1.23) .. controls (0.48, 1.24) and (0.49, 1.24) .. (0.50, 1.24) -- cycle;
%
\ifsloth@contour
\draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=110];
@@ -216,18 +230,18 @@
\draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=-117];
\draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=-125];
\else% contour
- \fill[\sloth@body!50!black] (0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=110];
- \fill[\sloth@body!50!black] (0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=117];
- \fill[\sloth@body!50!black] (0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=125];
+ \fill[sloth@bright10!50!black] (0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=110];
+ \fill[sloth@bright10!50!black] (0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=117];
+ \fill[sloth@bright10!50!black] (0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=125];
%
- \fill[\sloth@body!50!black] (-0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=-110];
- \fill[\sloth@body!50!black] (-0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=-117];
- \fill[\sloth@body!50!black] (-0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=-125];
+ \fill[sloth@bright10!50!black] (-0.15, 0.61) ellipse[x radius=0.017, y radius=0.07, rotate=-110];
+ \fill[sloth@bright10!50!black] (-0.17, 0.57) ellipse[x radius=0.015, y radius=0.07, rotate=-117];
+ \fill[sloth@bright10!50!black] (-0.19, 0.53) ellipse[x radius=0.012, y radius=0.062, rotate=-125];
\fi% contour
%
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \sloth@part@draw[\sloth@body] (0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=25];
- \sloth@part@draw[\sloth@body] (-0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=-25];
+ \sloth@part@draw[sloth@bright10] (0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=25];
+ \sloth@part@draw[sloth@bright10] (-0.33,0.31) ellipse[x radius=0.25, y radius=0.13, rotate=-25];
%
\ifsloth@contour
\draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=-10];
@@ -237,12 +251,12 @@
\draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
\draw[\sloth@contour,fill=white,line width=\scalingfactor*0.4pt] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
\else% contour
- \fill[\sloth@body!50!black] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=-10];
- \fill[\sloth@body!50!black] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
- \fill[\sloth@body!50!black] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
- \fill[\sloth@body!50!black] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
- \fill[\sloth@body!50!black] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
- \fill[\sloth@body!50!black] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
+ \fill[sloth@bright10!50!black] (-0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=-10];
+ \fill[sloth@bright10!50!black] (-0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=-16];
+ \fill[sloth@bright10!50!black] (-0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=-22];
+ \fill[sloth@bright10!50!black] (0.125,0.265) ellipse[x radius=0.07, y radius=0.019, rotate=10];
+ \fill[sloth@bright10!50!black] (0.14,0.21) ellipse[x radius=0.07, y radius=0.017, rotate=16];
+ \fill[sloth@bright10!50!black] (0.16,0.165) ellipse[x radius=0.07, y radius=0.015, rotate=22];
\fi% contour
%
\fi% back
@@ -265,52 +279,57 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-sloths}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-sloths}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic sloth}}
%\sloth
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic sloth can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\sloth[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\sloth[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\sloth[mouth=red]
%\end{tcblisting}
%
+% The sloth can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\sloth[openmouth]
+%\end{tcblisting}
+%
%If tired, the sloth can take a nap:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Sleep}}
%\sloth[sleeping]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eyelid colour}}
%\sloth[sleeping,eyelid=red]
%\end{tcblisting}
%
%To view the sloth from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\sloth[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the sloth 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the sloth 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\sloth[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\sloth[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty b/graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty
index a95bda001c..600b17227a 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-snowmen.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-snowmen}[2022/06/17 version v1.0 Draw snowmen in TikZ]
+\ProvidesPackage{tikzlings-snowmen}[2025/01/05 version v2.2 Draw snowmen in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -26,13 +26,14 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname snowmanhookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifsnowman@threeD
\newif\ifsnowman@back
\newif\ifsnowman@globalwarming
\newif\ifsnowman@contour
+\newif\ifsnowman@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -56,29 +57,31 @@
mouth/.store in = \snowman@mouth,
mouth = black,
buttons/.store in = \snowman@buttons,
- buttons = black,
+ buttons = black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \snowman@threeDtrue,
+ openmouth/.code = \snowman@openmouthtrue,
+ open mouth/.forward to = /snowman/openmouth,
+ 3D/.code = \snowman@threeDtrue,
back/.code = \snowman@backtrue,
globalwarming/.code= \snowman@globalwarmingtrue
\def\snowman@globalwarming{#1},
- globalwarming/.default = blue!10!white,
+ globalwarming/.default = blue!10!white,
global warming/.forward to = /snowman/globalwarming,
contour/.code = \snowman@contourtrue
\def\snowman@contour{#1}
\def\snowman@mouth{#1},
- contour/.default = black,
- outline/.forward to = /snowman/contour,
+ contour/.default = black,
+ outline/.forward to = /snowman/contour,
}
\def\snowman@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.75, 0.0) rectangle (0.75, 2.13);
@@ -95,7 +98,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -113,7 +116,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -135,25 +138,25 @@
\csname tikzlinghookbelly\endcsname
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \fill[\snowman@mouth] (0,1.23) circle[radius=0.025];
- \fill[\snowman@mouth] (0.06,1.3) circle[radius=0.025];
- \fill[\snowman@mouth] (-0.06,1.27) circle[radius=0.025];
- \fill[\snowman@mouth] (0.09,1.37) circle[radius=0.025];
- \fill[\snowman@mouth] (-0.18,1.28) circle[radius=0.025];
- \fill[\snowman@mouth] (0.2,1.28) circle[radius=0.025];
+ \fill[\snowman@mouth] (0,1.23) circle[radius=0.025];
+ \fill[\snowman@mouth] (0.06,1.3) circle[radius=0.025];
+ \fill[\snowman@mouth] (-0.06,1.27) circle[radius=0.025];
+ \fill[\snowman@mouth] (0.09,1.37) circle[radius=0.025];
+ \fill[\snowman@mouth] (-0.18,1.28) circle[radius=0.025];
+ \fill[\snowman@mouth] (0.2,1.28) circle[radius=0.025];
\fill[\snowman@mouth] (-0.25,1.2) circle[radius=0.025];
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@eye] (-0.5,1.75) circle[radius=0.06];
- \snowman@part@draw[\snowman@eye] (-0.1,1.55) circle[radius=0.06];
+ \snowman@part@draw[\snowman@eye] (-0.5,1.75) circle[radius=0.06];
+ \snowman@part@draw[\snowman@eye] (-0.1,1.55) circle[radius=0.06];
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@nose] (-0.6,1.4) -- (-0.8,1.42) -- (-0.6,1.54) (-0.6,1.4) arc[radius=0.07, start angle=-90, end angle=90];
+ \snowman@part@draw[\snowman@nose] (-0.6,1.4) -- (-0.8,1.42) -- (-0.6,1.54) (-0.6,1.4) arc[radius=0.07, start angle=-90, end angle=90];
%
% Buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\snowman@part@draw[\snowman@buttons] (0.1,0.8) circle[radius=0.06];
\snowman@part@draw[\snowman@buttons] (-0.15,0.55) circle[radius=0.06];
- \snowman@part@draw[\snowman@buttons] (0,0.25) circle[radius=0.06];
+ \snowman@part@draw[\snowman@buttons] (0,0.25) circle[radius=0.06];
%
% normal snowman %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else% global warming
@@ -165,7 +168,7 @@
% Body + Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\snowman@part@draw[\snowman@body] (0,0.5) ellipse[x radius=0.6, y radius=0.5];
\snowman@part@draw[\snowman@body] (0,1.1) ellipse[x radius=0.5, y radius=0.4];
- \snowman@part@draw[\snowman@body] (0,1.7) circle[radius=0.4];
+ \snowman@part@draw[\snowman@body] (0,1.7) circle[radius=0.4];
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname snowmanhookbelly\endcsname
@@ -182,18 +185,25 @@
\fill[\snowman@mouth] (-0.08,1.522) circle[radius=0.016];
\fill[\snowman@mouth] (0.12,1.543) circle[radius=0.016];
\fill[\snowman@mouth] (-0.12,1.543) circle[radius=0.016];
+ \ifsnowman@openmouth
+ \fill[\snowman@mouth] (0,1.57) circle[radius=0.016];
+ \fill[\snowman@mouth] (-0.04,1.565) circle[radius=0.016];
+ \fill[\snowman@mouth] (-0.08,1.56) circle[radius=0.016];
+ \fill[\snowman@mouth] (0.04,1.565) circle[radius=0.016];
+ \fill[\snowman@mouth] (0.08,1.56) circle[radius=0.016];
+ \fi
%
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@eye] (-0.155,1.8) circle[radius=0.04];
- \snowman@part@draw[\snowman@eye] (0.155,1.8) circle[radius=0.04];
+ \snowman@part@draw[\snowman@eye] (-0.155,1.8) circle[radius=0.04];
+ \snowman@part@draw[\snowman@eye] (0.155,1.8) circle[radius=0.04];
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\snowman@part@draw[\snowman@nose] (0,1.72) arc [radius=0.05, start angle=90, end angle=270] (0,1.62) -- (0.15,1.64) -- (0,1.72);
%
% Buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \snowman@part@draw[\snowman@buttons] (0,1.15) circle[radius=0.04];
- \snowman@part@draw[\snowman@buttons] (0,0.95) circle[radius=0.04];
- \snowman@part@draw[\snowman@buttons] (0,0.75) circle[radius=0.04];
+ \snowman@part@draw[\snowman@buttons] (0,1.15) circle[radius=0.04];
+ \snowman@part@draw[\snowman@buttons] (0,0.95) circle[radius=0.04];
+ \snowman@part@draw[\snowman@buttons] (0,0.75) circle[radius=0.04];
%
\fi% back
%
@@ -217,55 +227,60 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-snowmen}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-snowmen}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic snowman}}
%\snowman
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic snowman can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\snowman[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of various body parts can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\snowman[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Nose colour}}
%\snowman[nose=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Mouth colour}}
%\snowman[mouth=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Button colour}}
%\snowman[buttons=red]
%\end{tcblisting}
%
+% The snowman can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\snowman[openmouth]
+%\end{tcblisting}
+%
%The biggest enemy of the snowman are raising temperatures:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Global warming}}
%\snowman[globalwarming,tophat]
%\end{tcblisting}
%
%To view the snowman from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\snowman[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the snowman 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the snowman 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\snowman[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\snowman[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty b/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty
index 0852a3fd92..7f132d7585 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-squirrels.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-squirrels}[2022/06/17 version v1.0 Drawing squirrels in TikZ]
+\ProvidesPackage{tikzlings-squirrels}[2025/01/05 version v2.2 Drawing squirrels in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -29,8 +29,11 @@
}
\newif\ifsquirrel@threeD
+\newif\ifsquirrel@leftstep
+\newif\ifsquirrel@rightstep
\newif\ifsquirrel@back
\newif\ifsquirrel@contour
+\newif\ifsquirrel@openmouth
\tikzset{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -48,16 +51,25 @@
body/.store in = \squirrel@body,
body = brown!40!gray!90!red,
eye/.store in = \squirrel@eye,
- eye = white,
+ eye = white,
pupil/.store in = \squirrel@pupil,
- pupil = black,
+ pupil = black,
+ mouth/.store in = \squirrel@mouth,
+ mouth = \squirrel@body!70!brown!60!black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- 3D/.code = \squirrel@threeDtrue,
- back/.code = \squirrel@backtrue,
+ openmouth/.code = \squirrel@openmouthtrue,
+ open mouth/.forward to = /squirrel/openmouth,
+ 3D/.code = \squirrel@threeDtrue
+ \def\squirrel@mouth{\squirrel@body!40!black},
+ leftstep/.code = \squirrel@leftsteptrue,
+ left step/.forward to = /squirrel/leftstep,
+ rightstep/.code = \squirrel@rightsteptrue,
+ right step/.forward to = /squirrel/rightstep,
+ back/.code = \squirrel@backtrue,
contour/.code = \squirrel@contourtrue
\def\squirrel@contour{#1},
contour/.default = black,
@@ -67,7 +79,7 @@
\def\squirrel@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.53,0.1) rectangle (1.12,2.15);
%
@@ -83,7 +95,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -101,16 +113,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname squirrelhookbackground\endcsname
\csname tikzlinghookbackground\endcsname
- %
+ %
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
- \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \ifsquirrel@leftstep
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
+ \ifsquirrel@rightstep
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \else% step
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \fi% step
%
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifsquirrel@back
@@ -119,8 +139,7 @@
\fi% back
%
% Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \squirrel@part@draw[\squirrel@body]
- (0.5,0.5) .. controls (0.5,0.09) and (-0.5,0.09) .. (-0.5,0.5) .. controls (-0.5,0.85) and (-0.25,1.6) .. (0,1.7) .. controls (0.25,1.6) and (0.5,0.85) .. (0.5,0.5) -- cycle;
+ \squirrel@part@draw[\squirrel@body] (0.5,0.5) .. controls (0.5,0.09) and (-0.5,0.09) .. (-0.5,0.5) .. controls (-0.5,0.85) and (-0.25,1.6) .. (0,1.7) .. controls (0.25,1.6) and (0.5,0.85) .. (0.5,0.5) -- cycle;
%
% Belly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifsquirrel@back
@@ -132,17 +151,16 @@
\csname tikzlinghookbelly\endcsname
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.1920,1.9906) .. controls (0.1657,2.0780) and (0.1839,2.1332) .. (0.1839,2.1332) .. controls (0.1839,2.1332) and (0.1123,2.1773) .. (0.0941,2.0720) .. controls (0.0716,2.0156) and (0.0753,1.9519) .. (0.1023,1.9293) .. controls (0.1293,1.9068) and (0.1696,1.9342) .. (0.1920,1.9906) -- cycle;
- \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray]
- (-0.1920,1.9906) .. controls (-0.1657,2.0780) and (-0.1839,2.1332) .. (-0.1839,2.1332) .. controls (-0.1839,2.1332) and (-0.1123,2.1773) .. (-0.0941,2.0720) .. controls (-0.0716,2.0156) and (-0.0753,1.9519) .. (-0.1023,1.9293) .. controls (-0.1293,1.9068) and (-0.1696,1.9342) .. (-0.1920,1.9906) -- cycle;
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.1920,1.9906) .. controls (0.1657,2.0780) and (0.1839,2.1332) .. (0.1839,2.1332) .. controls (0.1839,2.1332) and (0.1123,2.1773) .. (0.0941,2.0720) .. controls (0.0716,2.0156) and (0.0753,1.9519) .. (0.1023,1.9293) .. controls (0.1293,1.9068) and (0.1696,1.9342) .. (0.1920,1.9906) -- cycle;
+ \squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.1920,1.9906) .. controls (-0.1657,2.0780) and (-0.1839,2.1332) .. (-0.1839,2.1332) .. controls (-0.1839,2.1332) and (-0.1123,2.1773) .. (-0.0941,2.0720) .. controls (-0.0716,2.0156) and (-0.0753,1.9519) .. (-0.1023,1.9293) .. controls (-0.1293,1.9068) and (-0.1696,1.9342) .. (-0.1920,1.9906) -- cycle;
%
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsquirrel@contour
- \squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3];
- \squirrel@part@draw[\squirrel@body] (0.2,1.6) circle[radius=0.15];
+ \squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3];
+ \squirrel@part@draw[\squirrel@body] (0.2,1.6) circle[radius=0.15];
\squirrel@part@draw[\squirrel@body] (-0.2,1.6) circle[radius=0.15];
\ifsquirrel@back
- \squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3];
+ \squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3];
\fi% back
\else% contour
\squirrel@part@draw[\squirrel@body] (0,1.75) circle[radius=0.3] (0.2,1.6) circle[radius=0.15] (-0.2,1.6) circle[radius=0.15];
@@ -156,7 +174,7 @@
%
% Nose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\squirrel@part@draw[\squirrel@body!70!brown!60!black] (0,1.66) ellipse[x radius=0.06, y radius=0.03];
- %
+ %
% Eyes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\squirrel@part@draw[\squirrel@eye] (0.07,1.78) ellipse[x radius=0.05, y radius=0.07];
\squirrel@part@draw[\squirrel@eye] (-0.07,1.78) ellipse[x radius=0.05, y radius=0.07];
@@ -165,15 +183,19 @@
%
% Mouth %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifsquirrel@contour
+ \draw[\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61) (0.15,1.61) arc [start angle=-20, end angle=-160, radius=0.16];
\draw[\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt] (-0.025,1.567) rectangle ++(0.02,0.03);
\draw[\squirrel@contour,fill=white,line width=\scalingfactor*0.4pt] (0.025,1.567) rectangle ++(-0.02,0.03);
\draw[\squirrel@contour,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61);
\else% contour
+ \ifsquirrel@openmouth
+ \filldraw[\squirrel@mouth,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61) (0.15,1.61) arc [start angle=-20, end angle=-160, radius=0.16];
+ \fi% open mouth
\fill[white] (-0.025,1.567) rectangle ++(0.02,0.03);
\fill[white] (0.025,1.567) rectangle ++(-0.02,0.03);
- \draw[\squirrel@body!70!brown!60!black,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61);
+ \draw[\squirrel@mouth,line width=\scalingfactor*0.4pt] (-0.15,1.61) .. controls (-0.15,1.61) and (-0.15,1.52) .. (0.0,1.61) .. controls (0.15,1.52) and (0.15,1.61) .. (0.15,1.61);
\fi% contour
- %
+ %
% Arms %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (0.2,0.85) ellipse[x radius=0.22, y radius=0.11, rotate=70];
\squirrel@part@draw[\squirrel@body!70!brown!50!darkgray] (-0.2,0.85) ellipse[x radius=0.22, y radius=0.11, rotate=-70];
@@ -183,7 +205,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname squirrelhookbody\endcsname
\csname tikzlinghookbody\endcsname
- %
+ %
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -198,44 +220,58 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-squirrels}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-squirrels}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic squirrel}}
%\squirrel
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic squirrel can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\squirrel[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of the eyes can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\squirrel[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil colour}}
%\squirrel[pupil=red]
%\end{tcblisting}
+%\begin{tcblisting}{title={Mouth colour}}
+%\squirrel[mouth=red]
+%\end{tcblisting}
+%
+% The squirrel can open its mouth:
+%\begin{tcblisting}{title={Open mouth}}
+%\squirrel[openmouth]
+%\end{tcblisting}
+%
+%And the squirrel can lift its legs:
+%\begin{tcblisting}{title={Walking}}
+%\squirrel[leftstep]
+%\squirrel[rightstep,xshift=2cm]
+%\end{tcblisting}
%
%To view the squirrel from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\squirrel[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the squirrel 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the squirrel 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\squirrel[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\squirrel[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings-wolves.sty b/graphics/pgf/contrib/tikzlings/tikzlings-wolves.sty
index 060e7b21f2..f4bf79719a 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings-wolves.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings-wolves.sty
@@ -9,10 +9,10 @@
%% https://github.com/samcarter/tikzlings
%%
%% 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{tikzlings-wolves}[2022/06/17 version v1.0 Drawing wolves in TikZ]
+\ProvidesPackage{tikzlings-wolves}[2025/01/05 version v2.2 Drawing wolves in TikZ]
\RequirePackage{tikz}
\RequirePackage{tikzlings-addons}
@@ -27,7 +27,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname wolfhookforeground\endcsname
\csname tikzlinghookforeground\endcsname
- %
+ %
}
\newif\ifwolf@threeD
@@ -53,9 +53,9 @@
body/.store in = \wolf@body,
body = gray!90!white,
eye/.store in = \wolf@eye,
- eye = white,
+ eye = white,
pupil/.store in = \wolf@pupil,
- pupil = black,
+ pupil = black,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% options
@@ -69,18 +69,18 @@
leftstep/.code = \wolf@leftsteptrue,
left step/.forward to = /wolf/leftstep,
rightstep/.code = \wolf@rightsteptrue,
- right step/.forward to = /wolf/rightstep,
- back/.code = \wolf@backtrue,
+ right step/.forward to = /wolf/rightstep,
+ back/.code = \wolf@backtrue,
contour/.code = \wolf@contourtrue
\def\wolf@contour{#1},
- contour/.default = black,
- outline/.forward to = /wolf/contour,
+ contour/.default = black,
+ outline/.forward to = /wolf/contour,
}
\def\wolf@draw{%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- % minimal bounding box size
+ % minimal bounding box size
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (-0.625,0.1) rectangle (0.905, 2.17);
@@ -97,7 +97,7 @@
\pgfmathsetmacro{\yscalefactor}{\tmpscaleD}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
+ %
% switch between 2D, 3D and contours, from
% https://chat.stackexchange.com/transcript/message/45991801#45991801
%
@@ -115,32 +115,32 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Body parts
- %
+ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname wolfhookbackground\endcsname
\csname tikzlinghookbackground\endcsname
- %
+ %
% Feet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifwolf@leftstep
- \wolf@part@draw[\wolf@body!65!white] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \wolf@part@draw[\wolf@body!65!white] (-0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
\else% step
- \wolf@part@draw[\wolf@body!65!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \wolf@part@draw[\wolf@body!65!white] (-0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
\fi% step
%
\ifwolf@rightstep
- \wolf@part@draw[\wolf@body!65!white] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
+ \wolf@part@draw[\wolf@body!65!white] (0.255,0.25) ellipse[x radius=0.23, y radius=0.09];
\else% step
- \wolf@part@draw[\wolf@body!65!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
+ \wolf@part@draw[\wolf@body!65!white] (0.255,0.2) ellipse[x radius=0.23, y radius=0.09];
\fi% step
%
% Ears %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\wolf@part@draw[\wolf@body] (0.22, 2.0392) .. controls (0.22, 2.1584) and (0.49460, 2.255) .. (0.49460, 2.255) .. controls (0.49460, 2.255) and (0.5300, 1.86) .. (0.3721, 1.86) .. controls (0.2891, 1.86) and (0.22, 1.9201) .. (0.22, 2.0392) -- cycle;
- \wolf@part@draw[\wolf@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
+ \wolf@part@draw[\wolf@body!55!white] (0.22, 2.0392) .. controls (0.26, 2.1584) and (0.47, 2.22) .. (0.47, 2.20) .. controls (0.47, 2.2) and (0.49, 1.9) .. (0.3721, 1.9) .. controls (0.2891, 1.88) and (0.22, 1.88) .. (0.22, 2.0392) -- cycle;
\wolf@part@draw[\wolf@body] (-0.22, 2.0392) .. controls (-0.22, 2.1584) and (-0.49460, 2.255) .. (-0.49460, 2.255) .. controls (-0.49460, 2.255) and (-0.5300, 1.86) .. (-0.3721, 1.86) .. controls (-0.2891, 1.86) and (-0.22, 1.9201) .. (-0.22, 2.0392) -- cycle;
- \wolf@part@draw[\wolf@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
- %
+ \wolf@part@draw[\wolf@body!55!white] (-0.22, 2.0392) .. controls (-0.26, 2.1584) and (-0.47, 2.22) .. (-0.47, 2.20) .. controls (-0.47, 2.2) and (-0.49, 1.9) .. (-0.3721, 1.9) .. controls (-0.2891, 1.88) and (-0.22, 1.88) .. (-0.22, 2.0392) -- cycle;
+ %
% Tail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\unless\ifwolf@back
\wolf@part@draw[\wolf@body!50!darkgray] (1.0893, 1.5779) .. controls (0.3433, 1.6612) and (0.4863, 0.6062) .. (-0.0243, 0.348) .. controls (1.0671, 0.068) and (0.8133, 1.1808) .. (1.0893, 1.5779) -- cycle;
@@ -161,7 +161,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname wolfhookbelly\endcsname
\csname tikzlinghookbelly\endcsname
- %
+ %
% Head %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifwolf@back
\wolf@part@draw[\wolf@body!70!white!95!brown] (0.5, 1.8) .. controls (0.5, 1.58) and (0.2, 1.35) .. (0, 1.35) .. controls (-0.2, 1.35) and (-0.5, 1.58) .. (-0.5, 1.8) .. controls (-0.34, 2.3) and (0.34, 2.3) .. (0.5, 1.8) -- cycle;
@@ -202,7 +202,7 @@
% adding hook for users to customise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\csname wolfhookbody\endcsname
\csname tikzlinghookbody\endcsname
- %
+ %
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -217,55 +217,55 @@
%
%\subsection{Package name}
%
-%\begin{tcolorbox}[lower separated=false, lefthand width=.8\linewidth]
-%\vspace*{0.5cm}
-%\lstinline|\usepackage{tikzlings-wolves}|
-%\vspace*{0.5cm}
+%\begin{tcolorbox}[title={Package usage}]
+%\begin{samcode}
+%\usepackage{tikzlings-wolves}
+%\end{samcode}
%\end{tcolorbox}
%
%\subsection{Basic Usage}
%
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Basic wolf}}
%\wolf
%\end{tcblisting}
%
%\subsection{Options}
%
%The basic wolf can be modified by changing its colour:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Body colour}}
%\wolf[body=blue]
%\end{tcblisting}
%
%In addition to the colour of the body, the colour of the eyes can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Eye colour}}
%\wolf[eye=red]
%\end{tcblisting}
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Pupil Colour}}
%\wolf[pupil=red]
%\end{tcblisting}
%
%The rotation angle of its arms can be adjusted:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Rotating the arms}}
%\wolf[rotatearms=40]
%\end{tcblisting}
%
%And the wolf can lift its legs:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Walking}}
%\wolf[leftstep]
%\wolf[rightstep,xshift=2cm]
%\end{tcblisting}
%
%To view the wolf from behind:
-%\begin{tcblisting}{}
+%\begin{tcblisting}{title={Back view}}
%\wolf[back]
%\end{tcblisting}
%
-%The key \lstinline|3D| will make the wolf 3-dimensional:
-%\begin{tcblisting}{}
+%The key \saminline|3D| will make the wolf 3-dimensional:
+%\begin{tcblisting}{title={3D view}}
%\wolf[3D]
%\end{tcblisting}
%
-%And finally the \lstinline|contour| key will only draw the outlines:
-%\begin{tcblisting}{}
+%And finally the \saminline|contour| key will only draw the outlines:
+%\begin{tcblisting}{title={Contours}}
%\wolf[contour=black]
%\end{tcblisting}
diff --git a/graphics/pgf/contrib/tikzlings/tikzlings.sty b/graphics/pgf/contrib/tikzlings/tikzlings.sty
index ecd7562fb8..4db7af570a 100644
--- a/graphics/pgf/contrib/tikzlings/tikzlings.sty
+++ b/graphics/pgf/contrib/tikzlings/tikzlings.sty
@@ -9,10 +9,10 @@
% https://github.com/samcarter/tikzlings
%
% 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{tikzlings}[2022/06/17 version v1.0 Collection of packages to draw animals and other beings in TikZ]
+\ProvidesPackage{tikzlings}[2025/01/05 version v2.2 Collection of packages to draw animals and other beings in TikZ]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -49,13 +49,13 @@
\else
\ifdefined\pdfrandomseed % pdflatex
\else
- \ifdefined\randomseed
+ \ifdefined\randomseed
\let\pdfrandomseed\randomseed % post TL19 xelatex and lualatex
\else
\let\pdfrandomseed\time % pre TL19 xelatex
\fi
\fi
- \pgfmathsetseed{\number\pdfrandomseed}
+ \pgfmathsetseed{\number\pdfrandomseed}
\fi
% #1: tikzling name.
diff --git a/graphics/pgf/contrib/tikzmarmots/README.md b/graphics/pgf/contrib/tikzmarmots/README.md
index f9c865db22..eb987721e6 100644
--- a/graphics/pgf/contrib/tikzmarmots/README.md
+++ b/graphics/pgf/contrib/tikzmarmots/README.md
@@ -2,15 +2,15 @@
# TikZmarmots
-[![GitHub](https://img.shields.io/github/license/samcarter/tikzmarmots.svg?color=blue)](http://www.latex-project.org/lppl.txt)
-[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/samcarter/tikzmarmots.svg?label=current%20version)](https://github.com/samcarter/tikzmarmots/releases/latest)
-[![CTAN](https://img.shields.io/ctan/v/tikzmarmots.svg)](https://ctan.org/pkg/tikzmarmots)
+[![License](https://img.shields.io/github/license/samcarter/tikzmarmots.svg?color=blue)](https://www.latex-project.org/lppl.txt)
+[![GitHub tag](https://img.shields.io/github/tag/samcarter/tikzmarmots.svg?label=current%20version&color=blue)](https://github.com/samcarter/tikzmarmots/releases/latest)
+[![CTAN](https://img.shields.io/ctan/v/tikzmarmots.svg?color=blue)](https://ctan.org/pkg/tikzmarmots)
This is a little LaTeX package to draw marmots with TikZ.
> *Notice: this package has been merged into the TikZlings package and, starting with version 2.0, is now a wrapper around the `tikzlings-marmots` package. The previous version can be accessed via `\usepackage{tikzmarmots}[v1]`.*
-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/tikzmarmots .
diff --git a/graphics/pgf/contrib/tikzmarmots/tikzlibrarymarmots.code.tex b/graphics/pgf/contrib/tikzmarmots/tikzlibrarymarmots.code.tex
index 41b7f854c2..4b3e80e64b 100644
--- a/graphics/pgf/contrib/tikzmarmots/tikzlibrarymarmots.code.tex
+++ b/graphics/pgf/contrib/tikzmarmots/tikzlibrarymarmots.code.tex
@@ -8,7 +8,7 @@
% https://github.com/samcarter/tikzmarmots
%
% 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
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tikzmarmots}
diff --git a/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc-settings.sty b/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc-settings.sty
index 3042db1f4a..dbe497f34b 100644
--- a/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc-settings.sty
+++ b/graphics/pgf/contrib/tikzmarmots/tikzmarmots-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
@@ -58,72 +58,37 @@
\RequirePackage[bitstream-charter]{mathdesign}
\let\hrulefill\hrulefillx
\RequirePackage[hang,flushmargin,bottom]{footmisc}
- \RequirePackage[colorlinks=true,breaklinks=true,allcolors=themecolor]{hyperref}
+ \RequirePackage{footnotehyper}
+ \makesavenoteenv{tcolorbox}
\RequirePackage[all]{nowidow}
+ \RequirePackage[colorlinks=true,breaklinks=true,allcolors=themecolor,hyperfootnotes=false]{hyperref}
}
\RequirePackage[T1]{fontenc}
\RequirePackage{xspace}
\RequirePackage{inconsolata}% mono font with bold, but italic is missing
% \RequirePackage[scale=0.85]{cascadia-code}
% \AddToHook{cmd/ttfamily/before}{\fontseries{sl}}
+\usepackage{synthslant}% to fake slented comments in inconsolata
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Listings
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage[
- cachedir=./build/
-]{minted}
-
-% smuggling custom pygmentize style in cache folder
-% (a real pygmentise style would need installtion in some python folder)
-\begin{filecontents*}[noheader]{./build/sam.pygstyle}
-\makeatletter
-\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
- \let\PYG@ul=\relax \let\PYG@tc=\relax%
- \let\PYG@bc=\relax \let\PYG@ff=\relax}
-\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
-\def\PYG@toks#1+{\ifx\relax#1\empty\else%
- \PYG@tok{#1}\expandafter\PYG@toks\fi}
-\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
- \PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
-\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
-
-% optional arguments
-\expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor{black}{##1}}}
-
-% macros
-\expandafter\def\csname PYG@tok@k\endcsname{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}
-% curly brakets
-\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}}}
-
-\def\PYGZbs{\char`\\}
-\def\PYGZus{\char`\_}
-\def\PYGZob{\char`\{}
-\def\PYGZcb{\char`\}}
-\def\PYGZca{\char`\^}
-\def\PYGZam{\char`\&}
-\def\PYGZlt{\char`\<}
-\def\PYGZgt{\char`\>}
-\def\PYGZsh{\char`\#}
-\def\PYGZpc{\char`\%}
-\def\PYGZdl{\char`\$}
-\def\PYGZhy{\char`\-}
-\def\PYGZsq{\char`\'}
-\def\PYGZdq{\char`\"}
-\def\PYGZti{\char`\~}
-% for compatibility with earlier versions
-\def\PYGZat{@}
-\def\PYGZlb{[}
-\def\PYGZrb{]}
-\makeatother
-\end{filecontents*}
+\RequirePackage[cachedir=./.minted]{minted}
+
+\AddToHook{env/MintedVerbatim/before}{%
+ % optional arguments
+ \@namedef{PYG@tok@na}{\def\PYG@tc##1{\textcolor{black}{##1}}}%
+ % macros
+ \@namedef{PYG@tok@k}{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % curly brakets
+ \@namedef{PYG@tok@nb}{\def\PYG@tc##1{\textcolor{listingcolor}{\bfseries ##1}}}%
+ % comments (italics won't work with the inconsolata font)
+ \@namedef{PYG@tok@c}{\def\PYG@tc##1{\textcolor{gray}{\textsynthslant{##1}}}}%
+}
-\usemintedstyle{sam}
+\usemintedstyle{default}
\setminted{
breaksymbolleft={},
tabsize=2,
diff --git a/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.pdf b/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.pdf
index 708c67b774..7dec03ac3b 100644
--- a/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.pdf
+++ b/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.tex b/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.tex
index 6a0d533bd1..f3cdeb1da1 100644
--- a/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.tex
+++ b/graphics/pgf/contrib/tikzmarmots/tikzmarmots-doc.tex
@@ -8,18 +8,10 @@
% https://github.com/samcarter/tikzmarmots
%
% 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
-% arara: latexmk: {
-% arara: --> engine: pdflatex,
-% arara: --> options: [
-% arara: --> '-shell-escape',
-% arara: --> '-synctex=1',
-% arara: --> '-interaction=nonstopmode',
-% arara: --> ]
-% arara: --> }
+% arara: latexmk
\documentclass{scrartcl}
% meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -34,7 +26,7 @@
\url{https://github.com/samcarter/tikzmarmots}\\
\url{https://www.ctan.org/pkg/tikzmarmots}
}{samcarter}}
-\date{Version v2.1 \textendash{} 2024/04/24}
+\date{Version v2.2 \textendash{} 2024/12/11}
\usepackage[
themecolor=sammagenta
@@ -147,7 +139,7 @@ A more stable package version can be found on \CTAN (\url{www.ctan.org/pkg/tikzm
If you seek any other assistance (not bug reports/feature requests), I suggest asking on \href{https://tex.stackexchange.com}{TeX.Stackexchange}.
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}.
+\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}.
The shown example marmots are purely fictional characters, any resemblance to real marmots or persons is purely coincidental and no copyright infringement is intended.
@@ -229,9 +221,7 @@ The above list of available customisations does not sound very exhaustive, but t
As already said in the introduction, this package focuses on the marmots themselves and does not provide additional accessories.
However there is no need to despair! There are many accessories available from the \saminline|tikzlings-addons| package (\url{https://www.ctan.org/pkg/tikzlings}).
-\addtocounter{footnote}{1}
-\footnotetext[\thefootnote]{The Marmot Queen is inspired by \href{http://www.ilregnodeifanes.it/inglese/summary.htm}{The Fanes' saga}}
-\begin{tcblisting}{title={Marmot Queen$^{\thefootnote}$}}
+\begin{tcblisting}{title={Marmot Queen\footnote{The Marmot Queen is inspired by \href{http://www.ilregnodeifanes.it/inglese/summary.htm}{The Fanes' saga}}}}
%\usepackage{tikzlings-addons}
\begin{tikzpicture}
\marmot
@@ -250,6 +240,6 @@ The items can be modified with the usual \TikZ keys and come with additional opt
\end{tikzpicture}
\end{tcblisting}
- Please consult the \href{http://mirrors.ctan.org/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf}{\tikzlings package documentation} for an exhaustive list of options.
+ Please consult the \href{https://mirrors.ctan.org/graphics/pgf/contrib/tikzlings/tikzlings-doc.pdf}{\tikzlings package documentation} for an exhaustive list of options.
\end{document}
diff --git a/graphics/pgf/contrib/tikzmarmots/tikzmarmots-v1.sty b/graphics/pgf/contrib/tikzmarmots/tikzmarmots-v1.sty
index 7651accdfb..6ec62bacf0 100644
--- a/graphics/pgf/contrib/tikzmarmots/tikzmarmots-v1.sty
+++ b/graphics/pgf/contrib/tikzmarmots/tikzmarmots-v1.sty
@@ -9,7 +9,7 @@
% https://github.com/samcarter/tikzmarmots
%
% 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{tikzmarmots}
diff --git a/graphics/pgf/contrib/tikzmarmots/tikzmarmots.sty b/graphics/pgf/contrib/tikzmarmots/tikzmarmots.sty
index 7a929dd930..a0562c35fc 100644
--- a/graphics/pgf/contrib/tikzmarmots/tikzmarmots.sty
+++ b/graphics/pgf/contrib/tikzmarmots/tikzmarmots.sty
@@ -9,9 +9,9 @@
% https://github.com/samcarter/tikzmarmots
%
% 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{tikzmarmots}[2024/04/24 version v2.1 Drawing marmots in TikZ]
+\ProvidesPackage{tikzmarmots}[2024/12/11 version v2.2 Drawing marmots in TikZ]
\RequirePackage{tikzlings-marmots}
diff --git a/graphics/pgf/contrib/tikzpingus/README.md b/graphics/pgf/contrib/tikzpingus/README.md
index d3661f480e..edee8b85c0 100644
--- a/graphics/pgf/contrib/tikzpingus/README.md
+++ b/graphics/pgf/contrib/tikzpingus/README.md
@@ -2,8 +2,8 @@
[![made-with-latex](https://img.shields.io/badge/Made%20with-LaTeX-1f425f.svg)](https://www.latex-project.org/) [![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/GPL-3.0) [![PR's Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![CTAN](https://badgen.net/badge/On/CTAN/cyan)](https://www.ctan.org/pkg/tikzpingus) [![build](https://github.com/EagleoutIce/tikzpingus/actions/workflows/compile.yaml/badge.svg)](https://github.com/EagleoutIce/tikzpingus/actions/workflows/compile.yaml)
-This package is a work-in-progress package allowing you to typeset little penguins in LaTeX with PGF/Ti*k*Z.
-The [documentation](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/doc/build/tikzpingus-doc.pdf) will constantly evolve.
+This package allows you to typeset (cute) little penguins in LaTeX with PGF/Ti*k*Z.
+The [documentation](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/doc/build/tikzpingus-doc.pdf) contains a reference for all currently available options. See the examples below for a quick overview.
----
@@ -26,7 +26,7 @@ Currently, most options I have added arose from concrete situations and are not
[![Penguin Tech](https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/hey-pingu-4.png?raw=true)](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/hey-pingu.pdf#page=4)
-If you just load the library by `\usepackage{tikzpingus}` all options will work, and you might want to use the `glows`-option (`\usepackage[glows]{tikzpingus}`) so that lightsabers and other glowing elements look waaay nicer (but may produce artifacts in some pdf-viewers). However, if loading the library takes too long for you, using the `bare` option will drastically reduce the default options available while allowing you to load specific libraries with `\pinguloadlibraries{<list of libraries>}`.
+If you just load the library by `\usepackage{tikzpingus}` all options will work, and you might want to use the `glows`-option (`\usepackage[glows]{tikzpingus}`) so that lightsabers and other glowing elements look waaay nicer (but may produce artifacts in some pdf-viewers).
[![Penguin Cake](https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/hey-pingu-5.png?raw=true)](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/hey-pingu.pdf#page=5)
@@ -40,6 +40,6 @@ Clothes are a work in progress for a long time now. While there are pants, shirt
## More Fun
-For the title image of a computer-science course on software-product-lines, I created a small and incomplete but really fun feature model:
+For the title image of a computer science course on software product lines, I created a small and incomplete but really fun feature model:
[![Penguin-SPL](https://github.com/EagleoutIce/tikzpingus/blob/gh-pages/spl-1.png?raw=true)](https://media.githubusercontent.com/media/EagleoutIce/tikzpingus/gh-pages/examples/build/spl.pdf)
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-bee.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-bee.lib.tex
deleted file mode 100644
index 66e613445d..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-bee.lib.tex
+++ /dev/null
@@ -1,64 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-% TODO: integrate?
-% TODO: allow to specify rotation anchor
-
-\pingu@create@extra{bee}{%
- bee/.code = {\pingu@set@extra{bee}{true}\pingu@color{bee}{#1}},
- bee/.default = pingu@yellow!60!pingu@white,%
- bee body/.code = \pingu@color{bee@body}{#1},
- bee eyes/.code = \pingu@color{bee@eyes}{#1},
- bee wings/.code = \pingu@color{bee@wings}{#1},
- bee mouth/.code = \pingu@color{bee@mouth}{#1},
- bee blush/.code = \pingu@color{bee@blush}{#1},
- bee position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@bee@angle{#1}\def\pingu@x@bee@xshift{#2}\def\pingu@x@bee@yshift{#3}\def\pingu@x@bee@scale{#4}},
-}{bee body=pingu@black!82!gray,bee wings=pingu@blue!8!pingu@white,bee mouth=\pingu@color@bee@body,bee eyes=\pingu@color@bee@body,bee blush=pingu@red!21!\pingu@color@bee,bee position={-27.5:(8mm,15mm){.875}}}
-
-\def\pingu@bee@x@lbody{ (left) to[out=270,in=150] (0,-.725) to[out=30,in=270] (right)}
-
-\def\pingu@draw@ea@bee{%
-\scope[very path/.append style={line join=round},rotate around={\pingu@x@bee@angle:(\pingu@name-head)},shift={(\pingu@name-head)},shift={(\pingu@x@bee@xshift,\pingu@x@bee@yshift)},scale=\pingu@x@bee@scale]
-% wings
-\coordinate (wl) at(20:2.55mm);
-\coordinate (wr) at(160:2.55mm);
-\pingu@draw[fill=\pingu@color@bee@wings!80!white,rotate around=-32:(wl)]{\pingu@color@bee@body} (wl) ellipse [x radius=6.15mm, y radius=2.75mm];
-\pingu@draw[fill=\pingu@color@bee@wings!80!white,rotate around=32:(wr)]{\pingu@color@bee@body} (wr) ellipse [x radius=6.15mm, y radius=2.75mm];
-\pingu@draw[fill=\pingu@color@bee@wings,rotate around=19:(wl)]{\pingu@color@bee@body} (wl) ellipse [x radius=6.55mm, y radius=3.125mm];
-\pingu@draw[fill=\pingu@color@bee@wings,rotate around=-19:(wr)]{\pingu@color@bee@body} (wr) ellipse [x radius=6.55mm, y radius=3.125mm];
-% body
-\path (-.375,0) coordinate (left) -- (.375,0) coordinate (right);
-% TODO: block draw?
-\pingu@block[draw=\pingu@color@bee@body]{\pingu@color@bee@body} \pingu@bee@x@lbody;
-\scope\clip\pingu@bee@x@lbody;
-\foreach \angl in {30,1} {
-\pingu@block{\pingu@color@bee} (-\angl:.75) to[bend left=14] (180+\angl:.75) -- ++(0,-1.75mm)
- to[bend right=14] (-\angl-14:.75) -- cycle;
-}\endscope
-% left and right arm
-\foreach\m/\s/\k in {right/-2.45/95,left/-.75/80} {
-\scope[shift=(\m),yshift=\s,rotate around=\k:(\m),scale=.166]
-\pingu@block{\pingu@color@bee@body} (-.965,0) arc(270:90:.29) -- ++(1.233,0) arc (90:-90:.29) -- cycle;
-\endscope}
-% sting
-\pingu@draw[line cap=round,thick]{\pingu@color@bee@body} (0,-.725) -- ++(0,-.035);
-% head
-\pingu@draw[fill=\pingu@color@bee,rounded corners=1.5pt]{\pingu@color@bee@body} (.85mm,-.55mm) to[bend right=30,looseness=.9] ([xshift=1.45mm,yshift=1.35mm]right) arc(0:180:{(.75cm+2*1.45mm)/2} and {(.75cm+2*1.45mm)/2.05}) to[bend right=30,looseness=.9] (-.85mm,-.55mm) -- cycle;
-% eyes [intersect with left and right]
-\pingu@block{\pingu@color@bee@eyes} (left|-0,2.265mm)++(.6mm,0) coordinate (el) circle[radius=.6mm];
-\coordinate (ell) at ([yshift=-.8mm]el);
-\pingu@block[rotate around=3:(ell)]{\pingu@color@bee@blush} ([yshift=-.8mm]el) ellipse[x radius=.412mm, y radius=.165mm];
-\pingu@block{\pingu@color@bee@eyes} (right|-0,2.265mm)++(-.6mm,0) coordinate (er) circle[radius=.6mm];
-\coordinate (err) at ([yshift=-.8mm]er);
-\pingu@block[rotate around=-1:(err)]{\pingu@color@bee@blush} ([yshift=-.8mm]er) ellipse[x radius=.4mm, y radius=.155mm];
-% mouth
-\scope[yshift=1mm]
-\pingu@draw[semithick,line cap=round]{\pingu@color@bee@mouth} (-.6mm,0) arc (180:360:.6mm and .415mm);
-% antenna
-\pingu@draw[line cap=round]{\pingu@color@bee@body} (123:4mm) to[out=110,in=-41] ++(-1mm,3mm) coordinate (@);
-\pingu@block[rotate around=-41:(@)]{\pingu@color@bee@body} ([xshift=-.1mm,yshift=-.185mm]@) ellipse[x radius=.55mm,y radius=.35mm];
-\pingu@draw[line cap=round]{\pingu@color@bee@body} (57:4mm) to[out=70,in=180+41] ++(1mm,3mm) coordinate (@);
-\pingu@block[rotate around=41:(@)]{\pingu@color@bee@body} ([xshift=-.1mm,yshift=-.2mm]@) ellipse[x radius=.55mm,y radius=.35mm];
-\endscope
-\endscope
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-christmas.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-christmas.lib.tex
deleted file mode 100644
index b86e799d79..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-christmas.lib.tex
+++ /dev/null
@@ -1,153 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{santahat}{%
- santa hat/.code = \pingu@set@extra{santahat}{true}\pingu@color{santahat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none},
- santa hat/.default = pingu@red!87!pingu@black,
- santa hat second/.code = \pingu@color{santahat@second}{#1},
- santa hat bobble/.code = \pingu@color{santahat@bobble}{#1}
-}{santa hat second={pingu@white!97!\pingu@color@santahat},santa hat bobble={\pingu@color@santahat@second}}
-\def\pingu@draw@ea@santahat{%
-\path (\pingu@name-head-center)+(152:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-santa-right);
-\path (\pingu@name-head-center)+(5:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-santa-left);
-\pingu@layer{middle}[]
-\pingu@block{\pingu@color@santahat@second} (\pingu@name-santa-right) to[out=48,in=132] (\pingu@name-santa-left) to[out=30,in=-45,looseness=1.325] ++(0,3.2mm)
-to[out=135,in=47,looseness=1.025] coordinate[pos=.915] (\pingu@name-santa-ur) coordinate[pos=.055] (\pingu@name-santa-ul) ([yshift=2mm]\pingu@name-santa-right) to[out=240,in=140] cycle;
-\endpingu@layer
-\pingu@layer{background}[]
-\pingu@block{\pingu@color@santahat} (\pingu@name-santa-ur) arc(145:-25:11.85mm and 14.915mm)
- to[bend right=7] coordinate[pos=.5] (\pingu@name-santa-lc) ++(-1.11mm,.375mm) to[bend right=11] (\pingu@name-santa-ul) to[bend right=15] cycle;
-\pingu@block{\pingu@color@santahat@bobble} (\pingu@name-santa-lc) circle[radius=2.625mm];
-\endpingu@layer
-}
-\pingu@create@extra{santabeard}{%
- santa beard/.code = \pingu@set@extra{santabeard}{true}\pingu@color{santabeard}{#1},
- santa beard/.default = pingu@white!96!pingu@red!98!pingu@black!92!gray,
- santa beard string/.code = \pingu@color{santabeard@string}{#1}
-}{santa beard string=\pingu@color@body@main!85!pingu@black}
-\def\pingu@draw@ea@santabeard{%
-% \coordinate (\pingu@name-santa-beard-center) at ([yshift=1.25mm]\pingu@name-belly-center);
-\pingu@block{\pingu@color@santabeard@string} ([xshift=-.35mm,yshift=.575mm]\pingu@name-head-back-con-right) to[bend right=28,edge node={foreach[count=\i] \l in {0.03,0.085,...,0.992} {coordinate[pos=\l-rand*.015,yshift=-.85pt] (\pingu@name-santa-beard-\i)}}]
-([yshift=.575mm,xshift=.35mm]\pingu@name-head-back-con-left) arc(20:110:.05mm and .15mm) to[bend left=26] ([yshift=.575mm+.15mm,xshift=-.35mm]\pingu@name-head-back-con-right) to[bend right] cycle;
-\ifx\pingu@color@santabeard\@pingu@none\else% to allow for random
-\xdef\@pmaxY{18}\xdef\@pmaxYI{17}%
-\foreach[evaluate=\j as \maxj using int(\@pmaxY-\j),evaluate=\j as \widthred using \j/23pt] \j in {0,...,\@pmaxYI} {
-\foreach[remember=\i as \li (initially 0)] \i in {1,...,\maxj} {
- \pgfmathsetmacro\@ptmp{94+rand*2.6}
- \pingu@block{\pingu@color@santabeard!\@ptmp!pingu@black} (\pingu@name-santa-beard-\i) circle [radius=1.85pt-\widthred pt+rand*.35pt];
- \ifnum\li>0 % make middle of last
- \path (\pingu@name-santa-beard-\li) -- (\pingu@name-santa-beard-\i) coordinate[pos=.5,yshift=-1.1pt,xshift=.133pt] (\pingu@name-santa-beard-\li); % smoll shift
- \fi
-}}\fi
-}
-
-\pingu@create@extra{woolhat}{%
- wool hat/.code = \pingu@set@extra{woolhat}{true}\pingu@color{woolhat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none},
- wool hat/.default = pingu@blue!57!pingu@black,
- wool hat second/.code = \pingu@color{woolhat@second}{#1},
- wool hat bobble/.code = \pingu@color{woolhat@bobble}{#1}
-}{wool hat second={\pingu@color@woolhat!55!pingu@white},wool hat bobble={\pingu@color@woolhat@second}}
-\def\pingu@draw@ea@woolhat{%
-\path ([yshift=.5mm,xshift=.165mm]\pingu@name-head-center)+(165:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-wool-right);
-\path ([yshift=.5mm,xshift=-.045mm]\pingu@name-head-center)+(4:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-wool-left);
-\pingu@layer{middle}[]
-\pingu@block{\pingu@color@woolhat@second} (\pingu@name-wool-right) to[out=37,in=170] (\pingu@name-wool-left) to[out=50,in=-55] ++(0,1.52mm) coordinate (\pingu@name-wool-left-up)
-to[out=167,in=38] coordinate[pos=.915] (\pingu@name-wool-ur) coordinate[pos=.055] (\pingu@name-wool-ul) ([yshift=1.5mm]\pingu@name-wool-right) coordinate (\pingu@name-wool-right-up) to[out=240,in=140] cycle;
-\endpingu@layer
-\path (\pingu@name-wool-left-up) -- (\pingu@name-wool-right-up) coordinate[pos=.455,yshift=9.75mm] (@mid);
-\pingu@block{\pingu@color@woolhat} (\pingu@name-wool-right-up) to[out=71,in=203] [rounded corners=2pt] (@mid) to[out=-34,in=100] [sharp corners] (\pingu@name-wool-left-up) to[in=37,out=172] cycle;
-\pingu@layer{background}[]
-\pingu@block{\pingu@color@woolhat@bobble} (@mid) circle [radius=1.25mm];
-\endpingu@layer
-}
-
-
-\pingu@create@extra{deerhat}{%
- deer hat/.code = \pingu@set@extra{deerhat}{true}\pingu@color{deerhat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none},
- deer hat/.default = pingu@bronze!57!pingu@black,
- deer hat b/.code = \pingu@color{deerhat@b}{#1},
- deer hat band/.code = \pingu@color{deerhat@band}{#1},
-}{deer hat band={\pingu@color@deerhat!85!pingu@black},deer hat b=\pingu@color@deerhat}
-\pgfmathsetmacro\pingu@deerhat@baseang@l{90-360*(1-\pinguanglehl)}
-\pgfmathsetmacro\pingu@deerhat@baseang@r{90-360*(1-\pinguanglehr)}
-\def\pingu@deerhat@baseoff{47}
-\def\pingu@deerhat@yshift{.15mm}
-\def\pingu@deerhat@linewidth{1.32mm}
-\def\pingu@deerhat@headoff@l{22}
-\def\pingu@deerhat@headoff@r{19}
-\def\pingu@draw@ea@deerhat{%
-\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-left) arc (\pingu@deerhat@baseang@l:\pingu@deerhat@baseang@l-\pingu@deerhat@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate[yshift=.05mm] (@target);
-\pingu@draw[line width=.7mm]{\pingu@color@deerhat@band} ([xshift=-.8mm]@target) arc (\pingu@deerhat@baseang@l-\pingu@deerhat@baseoff:360+\pingu@deerhat@baseang@r+\pingu@deerhat@baseoff:\pingu@w@half{}-.8mm and \pingu@head@h@half);
-
-\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-top) arc (90:90-\pingu@deerhat@headoff@l:\pingu@w@half{} and \pingu@head@h@half) coordinate (@left);
-\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-top) arc (90:90+\pingu@deerhat@headoff@r:\pingu@w@half{} and \pingu@head@h@half) coordinate (@right);
-
-\pgfonlayer{background}
-\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat} (@left) to[bend right=4] ++(.85mm,1.5mm) coordinate (@a) -- ++(3.15mm,.5mm) coordinate (@b) -- ++(4.65mm,4.35mm) coordinate[pos=.5] (@c) to[bend right=10] ++(-.75mm,2.55mm);
-\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat} ([xshift=-.135mm,yshift=-.425mm]@a) to[bend left=3] ++(1mm,3.9mm) ([xshift=-.4mm,yshift=-.05mm]@b) to[bend right=2] ++(3.75mm,.1mm) (@c) to[bend left=12] ++(-1mm,3.5mm);
-\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat@b} (@right) to[bend left=4] ++(-.85mm,1.5mm) coordinate (@a) -- ++(-3.15mm,.5mm) coordinate (@b) -- ++(-4.65mm,4.35mm) coordinate[pos=.5] (@c) to[bend left=10] ++(.75mm,2.55mm);
-\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat@b} ([yshift=-.425mm,xshift=.135mm]@a) to[bend right=3] ++(-1mm,3.9mm) ([xshift=.4mm,yshift=-.05mm]@b) to[bend right=2] ++(-3.75mm,.1mm) (@c) to[bend right=12] ++(1mm,3.5mm);
-\endpgfonlayer
-}
-
-\pingu@create@wing@extra{present}{%
- present \@lr/.code = {\pingu@set@extra{present\@lr}{true}\pingu@color{present\@lr}{##1}},
- present \@lr/.default = pingu@red!50!pingu@black!60!red,
- present \@lr\space width/.code = \@namedef{pingu@present@\@lr @width}{##1},
- present \@lr\space height/.code = \@namedef{pingu@present@\@lr @height}{##1},
- present \@lr\space ribbon/.code = \pingu@color{present\@lr @ribbon}{##1},%
- present \@lr\space band/.code = \pingu@color{present\@lr @band}{##1},%
- present \@lr\space band width/.code = \@namedef{pingu@present@\@lr @band@width}{##1},
- present \@lr\space xshift/.code = \@namedef{pingu@present@\@lr @xshift}{##1},
- present \@lr\space yshift/.code = \@namedef{pingu@present@\@lr @yshift}{##1},
- present \@lr\space band second height/.code = \@namedef{pingu@present@\@lr @band@second@height}{##1},
- present \@lr\space band second yshift/.code = \@namedef{pingu@present@\@lr @band@second@yshift}{##1},
- present \@lr\space lid/.code = \pingu@color{present\@lr @lid}{##1},%
- present \@lr\space lid height/.code = \@namedef{pingu@present@\@lr @lid@height}{##1},
- present \@lr\space lid overhang/.code = \@namedef{pingu@present@\@lr @lid@overhang}{##1},
- present \@lr\space lid yshift/.code = \@namedef{pingu@present@\@lr @lid@yshift}{##1},
- present \@lr\space lid band/.code = \pingu@color{present\@lr @lid@band}{##1},%
-}{present \@lr\space band=pingu@green!70!pingu@black!90!pingu@white,present \@lr\space width=7.75mm,present \@lr\space band width=1.75mm,present \@lr\space height=7mm,present \@lr\space yshift=-0.25*(\csname pingu@present@\@lr @height\endcsname),present \@lr\space band second height=\csname pingu@present@\@lr @band@width\endcsname, present \@lr\space band second yshift=0.5*(\csname pingu@present@\@lr @height\endcsname),present \@lr\space xshift=-0.25*(\csname pingu@present@\@lr @width\endcsname),present \@lr\space lid=\csname pingu@color@present\@lr\endcsname!92!pingu@black,present \@lr\space lid height=1.33mm,present \@lr\space lid overhang=.125mm,present \@lr\space lid yshift=0,present \@lr\space lid band=\csname pingu@color@present\@lr @band\endcsname!98!pingu@black,present \@lr\space ribbon=\csname pingu@color@present\@lr @band\endcsname!97!pingu@black}
-
-% TODO: more ribbon color control
-% #1 wing
-\def\pingu@draw@wi@present#1{%
- \pingu@setup@wing{present}{#1}%
- \scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
- \pingu@block[rounded corners=2pt]{\@col}(\pingu@name-wing-#1)++(-{0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@#1@xshift\endcsname},{\csname pingu@present@#1@yshift\endcsname}) coordinate (@ll) rectangle ++({\csname pingu@present@#1@width\endcsname},{\csname pingu@present@#1@height\endcsname}) coordinate (@ur);
- % vert band
- \pingu@block{\csname pingu@color@present#1@band\endcsname}(@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)-0.5*(\csname pingu@present@#1@band@width\endcsname)},0) rectangle ++({\csname pingu@present@#1@band@width\endcsname},{\csname pingu@present@#1@height\endcsname});
- % horiz band
- \pingu@block{\csname pingu@color@present#1@band\endcsname}(@ll)++(0,{\csname pingu@present@#1@band@second@yshift\endcsname-0.5*(\csname pingu@present@#1@band@second@height\endcsname)}) rectangle ++({\csname pingu@present@#1@width\endcsname},{\csname pingu@present@#1@band@second@height\endcsname});
- % lid
- \pingu@block[rounded corners=.75pt]{\csname pingu@color@present#1@lid\endcsname} ([yshift={\csname pingu@present@\@lr @lid@yshift\endcsname},xshift=\csname pingu@present@\@lr @lid@overhang\endcsname]@ur) rectangle ++({-\csname pingu@present@#1@width\endcsname-2*(\csname pingu@present@\@lr @lid@overhang\endcsname)},-\csname pingu@present@#1@lid@height\endcsname) coordinate (@ll);
- % upper lid band
- \pingu@block{\csname pingu@color@present#1@lid@band\endcsname}(@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)-0.5*(\csname pingu@present@#1@band@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname},0) rectangle ++({\csname pingu@present@#1@band@width\endcsname},{\csname pingu@present@#1@lid@height\endcsname});
- % ribbon
- \path (@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname+0.2*(\csname pingu@present@#1@band@width\endcsname)},{\csname pingu@present@#1@lid@height\endcsname+.25mm}) coordinate (@top);
- \pingu@block[even odd rule]{\csname pingu@color@present#1@ribbon\endcsname} (@top) to[out=40,in=110] ++(4mm,1mm)
- to[out=-70,in=-20] ++(-4mm,-1.5mm) to[bend left=55] cycle ([xshift=.5mm]@top) to[out=40,in=110] ++(2.55mm,.5mm)
- to[out=-70,in=-20] [rounded corners=1pt] ++(-2.85mm,-.835mm) -- cycle;
- \path (@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname-0.2*(\csname pingu@present@#1@band@width\endcsname)},{\csname pingu@present@#1@lid@height\endcsname+.25mm}) coordinate (@top);
- \pingu@block[even odd rule]{\csname pingu@color@present#1@ribbon\endcsname} (@top) to[out=180-40,in=180-110] ++(-3.6mm,1mm)
- to[out=-110,in=-160] ++(3.6mm,-1.5mm) to[bend right=55] cycle ([xshift=-.5mm]@top) to[out=140,in=70] ++(-2.55mm,.5mm)
- to[out=-110,in=-160] [rounded corners=1pt] ++(2.55mm,-.75mm) -- cycle;
- \pingu@block[rounded corners=.5pt]{\csname pingu@color@present#1@ribbon\endcsname} (@top)++(-.3mm,-.65mm) rectangle ++(1.3mm,.65mm); % TODO: make that round? (i.e., bend edges)
- \endscope
-}
-
-\pingu@create@wing@extra{snowball}{%
- snowball \@lr/.code = {\pingu@set@extra{snowball\@lr}{true}\pingu@color{snowball\@lr}{##1}},
- snowball \@lr/.default = pingu@white!90!pingu@black,
- snowball \@lr\space size/.code = \expandafter\def\csname pingu@snowball@\@lr @size\endcsname{##1},
- snowball \@lr\space xshift/.code = \expandafter\def\csname pingu@snowball@\@lr @xshift\endcsname{##1},
- snowball \@lr\space yshift/.code = \expandafter\def\csname pingu@snowball@\@lr @yshift\endcsname{##1}
-}{snowball \@lr\space size=2.33mm, snowball \@lr\space xshift=0pt, snowball \@lr\space yshift=0pt}
-
-% #1 wing
-% TODO: shifts
-\def\pingu@draw@wi@snowball#1{%
-\pingu@setup@wing{snowball}{#1}%
- \pingu@draw[opacity=.35]{\@col} ([xshift=\csname pingu@snowball@#1@xshift\endcsname,yshift=\csname pingu@snowball@#1@yshift\endcsname]\pingu@name-wing-#1) coordinate (@) circle[radius=\csname pingu@snowball@#1@size\endcsname];
- \pingu@block[rotate around={\@angle-1:(\pingu@name-wing-#1)},decoration={random steps,segment length=1pt,amplitude=.075pt},decorate,rounded corners=.35pt,save path=\snowball@outer]{\@col}(@) circle[radius=\csname pingu@snowball@#1@size\endcsname];
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-cloak.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-cloak.lib.tex
deleted file mode 100644
index cef863291e..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-cloak.lib.tex
+++ /dev/null
@@ -1,78 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\newif\if@pingu@x@cloak@wings
-\pingu@create@extra{cloak}{%
- cloak/.code = \pingu@set@extra{cloak}{true}\pingu@color{cloak}{#1},
- cloak/.default = pingu@bronze,
- cloak cap/.code = \pingu@color{cloak@cap}{#1},
- cloak wings color/.code = \pingu@color{cloak@wings}{#1},
- cloak bottom color/.code = \pingu@color{cloak@bottom}{#1},
- cloak front color/.code = \pingu@color{cloak@front}{#1},
- cloak padding/.code = \def\pingu@x@cloak@padding{#1},
- cloak wings/.is if = @pingu@x@cloak@wings,
- cape/.style = {/pingu/cloak=#1, /pingu/cloak wings=false,/pingu/cloak front color=\@pingu@none, /pingu/cloak cap=\@pingu@none,/pingu/cloak front color=\@pingu@none},
- cape/.default = pingu@bronze,
-}{cloak padding=1.95mm,cloak bottom color=\pingu@color@cloak!90!black,cloak cap=\pingu@color@cloak!98!pingu@black,cloak front color=\pingu@color@cloak!90!white,cloak wings color=\pingu@color@cloak@front!94!pingu@black,cloak wings=true}
-\def\pingu@draw@cloth@cloak@behind{%
- \pingu@block[bottom color=\pingu@color@cloak@bottom,top color=\pingu@color@cloak]{\pingu@color@cloak} (\pingu@name-bottom-center)++(-\pingu@x@cloak@padding-\pingu@w@half,-.5mm) arc (180:0:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend left=1] (\pingu@name-wings-side-left) arc(0:180:\pingu@w@half{} and .75mm) to[bend left=1] cycle;
-}
-
-\def\pingu@draw@cloth@cloak@middle{\pingu@block[rounded corners=.7mm]{\pingu@color@cloak@front}
-(\pingu@name-bottom-center)++(-\pingu@x@cloak@padding-\pingu@w@half,-.5mm) arc (180:250:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend right=6]
-([xshift=1.3mm,yshift=.4mm]\pingu@name-wings-side-right) to[bend right=3] ([yshift=.65mm]\pingu@name-wings-side-right);
-\pingu@block[rounded corners=.7mm]{\pingu@color@cloak@front}
-(\pingu@name-bottom-center)++(\pingu@x@cloak@padding+\pingu@w@half,-.5mm) arc (0:-70:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend left=6]
-([xshift=-1.3mm,yshift=.4mm]\pingu@name-wings-side-left) to[bend left=3] ([yshift=.65mm]\pingu@name-wings-side-left);}
-
-% TODO: if flags to draw parts
-\def\pingu@draw@cloth@cloak{%
-\scope[rounded corners=.6\p@]
- % wings
- \if@pingu@x@cloak@wings
- \edef\@la{\csname @pingu@wingdown@\@pingu@select@leftwing@ @\endcsname}
- \ifnum\@la>0 % wing is going inverted up or down / \ => left
- \pingu@layer{foreground}[]
- \ifnum\@la>70
- \pingu@block[right color=\pingu@color@cloak@front,left color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-left-start)++(.5mm,-3.5mm) to[bend left=10] (\pingu@name-wing-left-low) to[bend right=13] (\pingu@name-wing-left-up) to[bend left=3] (\pingu@name-wing-left-start-up) to[bend left] ([xshift=.35mm,yshift=1mm]\pingu@name-wing-left-start);
- \else % down
- \pingu@block[right color=\pingu@color@cloak@front,left color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-left-start)++(.5mm,-3.5mm) to[bend left=10] (\pingu@name-wing-left-low) to[bend right=13] (\pingu@name-wing-left-up) to[bend left=3] ([xshift=1mm,yshift=1mm]\pingu@name-wing-left-start-up) to[bend left=4.5] ([xshift=.5mm,yshift=-3.5mm]\pingu@name-wing-left-start);
- \fi
- \endpingu@layer
- \else
- \ifnum\@la<-90% normal up \ / => left side
- \pingu@block[upper right=\pingu@color@cloak@wings,lower right=\pingu@color@cloak@front,lower left=\pingu@color@cloak@front,upper left=\pingu@color@cloak@front]{\pingu@color@cloak@wings} ([xshift=.25mm]\pingu@name-wing-left-start-low) to[bend right=14] (\pingu@name-wing-left-low) to[bend left=8] ([yshift=-.5mm]\pingu@name-wing-left-up) to[bend right=17] ([yshift=1.6mm]\pingu@name-wing-left-start-up) to[bend right=13] ([xshift=-.15mm,yshift=.15mm]\pingu@name-waist-left) -- cycle;
- \else % normal and hugging down => right
- \pingu@block[top color=\pingu@color@cloak@front,middle color=\pingu@color@cloak,bottom color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} plot[smooth] coordinates {([xshift=-1.38mm]\pingu@name-wings-side-left) (\pingu@name-wing-left-start-low) ([yshift=.65mm,xshift=-.65mm]\pingu@name-wing-left-low) ([yshift=.65mm,xshift=-.65mm]\pingu@name-wing-left-up) ([xshift=.68mm]\pingu@name-wings-side-left) ([xshift=-1.38mm]\pingu@name-wings-side-left)};
- \fi
- \fi
- \edef\@ra{\csname @pingu@wingdown@\@pingu@select@rightwing@ @\endcsname}
- \ifnum\@ra>0 % wing is going inverted up or down => right
- \pingu@layer{foreground}[]
- \ifnum\@ra>70
- \pingu@block[left color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,right color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-right-start-low) to[bend right=10] (\pingu@name-wing-right-low) to[bend left=13] (\pingu@name-wing-right-up) to[bend right=3] (\pingu@name-wing-right-start-up) -- ++(-.25mm,0mm) to[bend right=11] cycle;
- \else
- \pingu@block[left color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,right color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} ([xshift=1mm,yshift=-1mm]\pingu@name-wing-right-start-low) to[bend right=10] (\pingu@name-wing-right-low) to[bend left=13] (\pingu@name-wing-right-up) to[bend right=3] ([xshift=-1mm,yshift=1mm]\pingu@name-wing-right-start-up) to[bend right=4.5] ([xshift=-.5mm,yshift=-3.5mm]\pingu@name-wing-right-start);
- \fi
- \endpingu@layer
- \else
- \ifnum\@ra<-90% normal up => right side
- \pingu@block[upper left=\pingu@color@cloak@wings,lower left=\pingu@color@cloak@front,lower right=\pingu@color@cloak@front,upper right=\pingu@color@cloak@front]{\pingu@color@cloak@wings} ([xshift=.25mm]\pingu@name-wing-right-start-low) to[bend left=14] (\pingu@name-wing-right-low) to[bend right=8] ([yshift=-.5mm]\pingu@name-wing-right-up) to[bend left=17] ([yshift=1.6mm]\pingu@name-wing-right-start-up) to[bend left=13] ([xshift=.15mm,yshift=.15mm]\pingu@name-waist-right) -- cycle;
- \else % normal and hugging down => left
- \pingu@block[top color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,bottom color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} plot[smooth] coordinates {([xshift=1.38mm]\pingu@name-wings-side-right) (\pingu@name-wing-right-start-low) ([yshift=.85mm,xshift=-.35mm]\pingu@name-wing-right-low) ([yshift=.85mm,xshift=.35mm]\pingu@name-wing-right-up) ([xshift=-.68mm]\pingu@name-wings-side-right) ([xshift=1.38mm]\pingu@name-wings-side-right)};
- \fi
- \fi
-\fi
- % cape
- \pingu@block[rounded corners=.8mm]{\pingu@color@cloak@cap} ([xshift=.85mm,yshift=-2.75mm]\pingu@name-wing-left-start) to[bend left=4] ([xshift=-.45mm,yshift=-.65mm]\pingu@name-wings-side-left) to[bend right=3]
- (\pingu@name-head)
- to[bend right=3]
- ([xshift=.4mm,yshift=-.65mm]\pingu@name-wings-side-right) [rounded corners=.15mm] to[bend left=3] ([xshift=-.85mm,yshift=-2.75mm]\pingu@name-wing-right-start)
- to[bend left=8]
- ([xshift=-.66mm]\pingu@name-wings-side-right)
- [rounded corners=.15mm]
- to[bend left=32] ++(\pingu@w@half+.66mm,\pingu@w@half+1.2\pingu@one)
- to[bend left=32] ++(\pingu@w@half+.66mm,-\pingu@w@half-1.2\pingu@one)
- to[bend left=8] cycle;
-\endscope
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-devil.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-devil.lib.tex
deleted file mode 100644
index a1ec5f9a55..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-devil.lib.tex
+++ /dev/null
@@ -1,90 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{devilhorns}{%
- devilhorns/.forward to = /pingu/devil horns,
- devil-horns/.forward to = /pingu/devil horns,
- devil horns/.code = \pingu@set@extra{devilhorns}{true}\pingu@color{devilhorns}{#1},
- devil horns/.default = pingu@purple,
- devil horns b/.code = \pingu@color{devilhorns@b}{#1},
- devilhorns b/.forward to = /pingu/devil horns b,
- devil-horns b/.forward to = /pingu/devil horns b
-}{devil horns b=\pingu@color@devilhorns}
-
-\pgfmathsetmacro\pingu@devilhorns@baseang@l{90-360*(1-\pinguanglehl)}
-\pgfmathsetmacro\pingu@devilhorns@baseang@r{90-360*(1-\pinguanglehr)}
-\def\pingu@devilhorns@baseoff{12}
-\def\pingu@devilhorns@yshift{.65mm}
-\def\pingu@draw@ea@devilhorns{%
- % 90 - 360*.06
- \pingu@block{\pingu@color@devilhorns} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) arc (\pingu@devilhorns@baseang@l:\pingu@devilhorns@baseang@l-\pingu@devilhorns@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-devilhorns-left-goal) to[out=32,in=-32,looseness=.9] ++(.3mm,2.65mm) to[bend left=17] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) -- cycle;
- \pingu@block{\pingu@color@devilhorns} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) to [bend right=38] (\pingu@name-devilhorns-left-goal) to[bend right=30] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) -- cycle;
- \pingu@block{\pingu@color@devilhorns@b} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) arc (\pingu@devilhorns@baseang@r:\pingu@devilhorns@baseang@r+\pingu@devilhorns@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-devilhorns-right-goal) to[out=148,in=-148,looseness=.9] ++(-.3mm,2.65mm) to[bend right=17] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) -- cycle;
- \pingu@block{\pingu@color@devilhorns@b} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) to [bend left=38] (\pingu@name-devilhorns-right-goal) to[bend left=30] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) -- cycle;
-}
-
-% wip hack
-\colorlet{pingu@devil@ring}{pingu@black}
-\def\pingu@devil@x@opacity{.75}
-\pingu@eyes@s{devil}{%
-\pingu@layer{foreground}[]
- \pingu@block{pingu@devil@ring} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=.1535cm, y radius=.1575cm];
- \pingu@block{\pingu@color@eye@second@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=.1325cm, y radius=.1375cm];
- \fill[\pingu@color@eye@left,/pingu/@glow] (\pingu@name-eye-left) circle [radius=1.325mm];
- \pingu@block[fill opacity=\pingu@devil@x@opacity]{\pingu@color@eye@left} (\pingu@name-eye-left)++(0,.36) to[bend right=58] ++(.36,-.36) to[bend right=58] ++(-.36,-.36) to[bend right=58] ++(-.36,.36) to[bend right=58] cycle;
- \fill[/pingu/@glow,fill=\pingu@color@eye@left!20!pingu@yellow!15!pingu@white] (\pingu@name-eye-left)++(0,.10) to[bend right=60] ++(.10,-.10) to[bend right=60] ++(-.10,-.10) to[bend right=60] ++(-.10,.10) to[bend right=60] cycle;
- \fill[\pingu@color@eye@left!20!pingu@yellow!7!pingu@white] (\pingu@name-eye-left) circle [radius=.5pt]; %
- \pingu@block{pingu@white} (\pingu@name-eye-left) circle [radius=.15pt];
-\endpingu@layer
-}{%
-\pingu@layer{foreground}[]
- \pingu@block{pingu@black} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate (\pingu@name-eye-right) ellipse [x radius=.1535cm, y radius=.1575cm];
- \pingu@block{\pingu@color@eye@second@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate (\pingu@name-eye-right) ellipse [x radius=.1325cm, y radius=.1375cm];
- \fill[\pingu@color@eye@right,/pingu/@glow] (\pingu@name-eye-right) circle [radius=1.325mm];
- \pingu@block[fill opacity=.75]{\pingu@color@eye@right} (\pingu@name-eye-right)++(0,.36) to[bend right=58] ++(.36,-.36) to[bend right=58] ++(-.36,-.36) to[bend right=58] ++(-.36,.36) to[bend right=58] cycle;
- \fill[/pingu/@glow,fill=\pingu@color@eye@right!20!pingu@yellow!15!pingu@white] (\pingu@name-eye-right)++(0,.10) to[bend right=60] ++(.10,-.10) to[bend right=60] ++(-.10,-.10) to[bend right=60] ++(-.10,.10) to[bend right=60] cycle;
- \fill[\pingu@color@eye@right!20!pingu@yellow!7!pingu@white] (\pingu@name-eye-right) circle [radius=.5pt]; %
- \pingu@block{pingu@white} (\pingu@name-eye-right) circle [radius=.15pt];
-\endpingu@layer
-}[pingu@purple]
-
-\pingu@create@wing@extra{devilfork}{%
- devil fork \@lr/.code = {\pingu@set@extra{devilfork\@lr}{true}\pingu@color{devilfork\@lr}{##1}},
- devil fork \@lr/.default = pingu@red,
- devil fork \@lr\space second/.code= \pingu@color{devilfork\@lr @second}{##1},
- devil fork \@lr\space length/.code =\expandafter\def\csname pingu@devilfork@\@lr @length\endcsname{##1}
-}{devil fork \@lr\space length=20mm,devil fork \@lr\space second=pingu@bronze!10!black}
-\def\pingu@draw@wi@devilfork#1{%
- \pingu@setup@wing{devilfork}{#1}%
-\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
- \pingu@block{\csname pingu@color@devilfork#1@second\endcsname} (\pingu@name-wing-#1)++(\@sidesign*-.2mm,-7mm) -- ++(0,\csname pingu@devilfork@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-devilfork-#1-top) -- ++(0,-\csname pingu@devilfork@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
- \pingu@block{\@col} ([yshift=4mm]\pingu@name-devilfork-#1-top) to[out=240,in=90] ++(-.65mm,-4mm) to[out=180,in=-60] ++(-1mm,5.5mm) to[out=240,in=90] ++(-.65mm,-5.9mm) to[bend right] ++(4.4mm,0) to[out=90,in=-60] ++(-.65mm,5.9mm) to[out=240,in=0] ++(-1mm,-5.5mm) to[out=90,in=-60] cycle;
-\endscope
-}
-
-\pingu@create@extra{devilwings}{%
- devilwings/.forward to = /pingu/devil wings,
- devil-wings/.forward to = /pingu/devil wings,
- devil wings/.code = \pingu@set@extra{devilwings}{true}\pingu@color{devilwings}{#1},
- devil wings/.default = pingu@black,
- devil wings b/.code = \pingu@color{devilwings@b}{#1},
- devilwings b/.forward to = /pingu/devil wings b,
- devil-wings b/.forward to = /pingu/devil wings b
-}{devil wings b=\pingu@color@devilwings}
-
-% taken over and adapted from the old penguins
-% lower wing based on https://tex.stackexchange.com/a/464828
-\def\@pingu@devilwings@lower@wing@code{(0,0.2) -- (0,1.4) -- (-2,1.4) .. controls (-4,0.8) .. (-4.3,0.2) .. controls (-4.48,0.08) .. (-4.5,-0.15) .. controls (-4.9,-0.5) and (-4.9,-0.7) .. (-4.7,-0.9) .. controls (-4.7,-1) .. (-4.6,-1.1) .. controls (-4.9,-1.8) .. (-4.2,-2) -- (-4,-2.4) .. controls (-4.1,-3) .. (-3.6,-3.1) -- (-3.25,-3.7) .. controls (-3.5,-4.5) .. (-4.1,-5.4) .. controls (-4.2,-5.9) and (-3.6,-5.9) .. (-3.5,-5.4) .. controls (-3.55,-5.1) and (-3.4,-4.8) .. (-3,-4.1) -- (-2.6,-4.1) .. controls (-2.35,-4.35) .. (-2,-4.2) .. controls (-1.75,-4.6) and (-1.25,-4.6) .. (-1.25,-3.90) .. controls (-0.9,-4) .. (-0.6,-2.8) -- (-0.3,-1) -- (0,0.2)}
-
-\def\pingu@draw@eb@devilwings{%
-\pgfonlayer{background}
- \scope[scale=0.225,shift={(\pingu@name-head-back-con-right)}]
- \pingu@block[thick,rounded corners=.75mm]{\pingu@color@devilwings} \@pingu@devilwings@lower@wing@code;
- \pingu@block[thick]{\pingu@color@devilwings} (0,1) -- (0,2.2) [rounded corners=5mm] parabola[bend at end] (-6,6) -- (-5,1) -- (0,1);
- \endscope
- \scope[scale=0.225,shift={(\pingu@name-head-back-con-left)},xscale=-1]
- \pingu@block[thick,rounded corners=0.75mm]{\pingu@color@devilwings@b} \@pingu@devilwings@lower@wing@code;
- \pingu@block[thick]{\pingu@color@devilwings@b} (0,1) -- (0,2.2) [rounded corners=5mm] parabola[bend at end] (-6,6) -- (-5,1) -- (0,1);
- \endscope
-\endpgfonlayer
-}
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-doc.pdf b/graphics/pgf/contrib/tikzpingus/tikzpingus-doc.pdf
index c46bbc7fe2..e528ff38a7 100644
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-doc.pdf
+++ b/graphics/pgf/contrib/tikzpingus/tikzpingus-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-doc.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-doc.tex
index 68581ee966..d78d3aaae9 100644
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-doc.tex
+++ b/graphics/pgf/contrib/tikzpingus/tikzpingus-doc.tex
@@ -2,7 +2,8 @@
% Licensed under GNU General Public License version 3
% https://opensource.org/licenses/gpl-3.0.html
\errorcontextlines9999
-\documentclass[parskip=half,english,numbers=noenddot,footnotes=nomultiple,oneside]{scrartcl}
+\documentclass[parskip=half,english,numbers=noenddot,footnotes=nomultiple,oneside,fontsize=10pt,DIV=14]{scrartcl}
+%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
@@ -24,8 +25,9 @@
\usepackage[hyper]{listings}
\usepackage[skins,breakable,hooks,xparse,listingsutf8,external]{tcolorbox}
-\usepackage{lmodern}
-\usepackage{CrimsonPro}
+\usepackage[sfdefault,scale=.9]{FiraSans}
+% fitting math font
+\usepackage{newtxsf}
\usepackage{imakeidx}
\usepackage{tikz}
@@ -68,7 +70,7 @@
\let\say\enquote
\def\DTLlistformatoxford{,}\def\DTLandname{and}
% TODO: do guard against same keys for different selectors
-\long\def\ParseDTLListElement#1"#2"\@nil{\textsuperscript{\smash{\raisebox{2pt}{\ifcsname pingu@@lib@#2@\CurrentList @\endcsname\index[\current@indexfile]{Libraries!\textit{\csname pingu@@lib@#2@\CurrentList @\endcsname}!#2?\hyperref[expl-list:\CurrentList]{\protect\lpingu{#2} {\tiny\sffamily(\MapDTLList{\CurrentList})}}}~$\underset{\text{\tiny\smash{\raisebox{3pt}{\textsf{\hyperref[Libraries]{\@declaredcolor{gray}Library}}}}}}{\text{\textit{\tiny\strut\csname pingu@@lib@#2@\CurrentList @\endcsname}}}$\fi}}}}
+\long\def\ParseDTLListElement#1"#2"\@nil{}
\def\DTLlistformatitem#1{\textit{#1\expandafter\ParseDTLListElement :#1\@nil}}
\newcommand*\typesetselection[1][]{\begingroup\ifx!#1!\else\def\DTLlistformatitem##1{#1}\fi\dotypesetselection}
\def\dotypesetselection#1{\label{expl-list:#1}\def\CurrentList{#1}\expandafter\DTLformatlist\expandafter{\csname @pingu@#1@\endcsname}\endgroup}
@@ -216,8 +218,8 @@
\def\@toggle@showcase{\ifx\@showcase@cur\@showcase@pre\global\let\@showcase@cur\@empty\else \global\let\@showcase@cur\@showcase@pre\fi}
\newcommand\ShowcaseThis[2][]{\ifx\@showcase@cur\@showcase@pre \global\let\@showcase@cur\@empty\expandafter\gpreto\else \global\let\@showcase@cur\@showcase@pre\expandafter\gappto\fi\pengu@all@showcases{{#2=#1},}}
-\RedeclareSectionCommand[runin=false,afterskip=-2mm]{section}
-\RedeclareSectionCommand[runin=false,afterskip=-2mm]{subsection}
+\RedeclareSectionCommand[runin=false,beforeskip=3mm,afterskip=-2mm]{section}
+\RedeclareSectionCommand[runin=false,beforeskip=3mm,afterskip=-2mm]{subsection}
\RedeclareSectionCommand[runin=false,beforeskip=2mm,afterskip=-2mm]{subsubsection}
\tcbset{%
@@ -244,6 +246,9 @@
% allow the oxes to have minor overlaps
\newcommand\DefineKey[2][/pingu/]{%
\StrSubstitute{#2}{ }{-}[\keyexternalname]%
+ % create valid artifact path names for github
+ \StrSubstitute{\keyexternalname}{:}{_}[\keyexternalname]%
+ \StrSubstitute{\keyexternalname}{*}{_}[\keyexternalname]%
% only use _ to keep the length intact when replace with the backslash
\StrSubstitute{\keyexternalname}{\\}{_}[\keyexternalname]%
{\def\\{_}\protected@xdef\@key{#2}}%
@@ -278,7 +283,7 @@
\ifx\@tmpb\@empty\lpingu{#1#2}\@explainsuff\else\lpingu{#1#2 =\ }\texttt{<\textit{\@tmpb}>}\fi\hfill
\ifx\@tmp\@empty\else{\@declaredcolor{gray}(}#4{\@declaredcolor{gray})}\fi
}
- }\ifcsname pingu@@lib@\@key @\endcsname\index[\current@indexfile]{Libraries!\textit{\csname pingu@@lib@#2@\endcsname}!\@idxkey?\hyperref[pk:#1\@key]{\protect\lpingu{#2}}}\rlap{~\quad\raisebox{2.75pt}{$\underset{\text{\tiny\smash{\raisebox{3pt}{\textsf{\hyperref[Libraries]{\@declaredcolor{gray}Library}}}}}}{\text{\textit{\footnotesize\parbox{4em}{\null\hfill\strut\csname pingu@@lib@#2@\endcsname\hfill\null}}}}$}}\fi\kern-\linewidth\par\endgroup
+ }\kern-\linewidth\par\endgroup
}
{\endminipage\smallskip\par}
@@ -361,8 +366,6 @@
{\@declaredcolor{gray}\small This is an alias for \keyref[#1]{#3}.}%
\endkeyexplain\endgroup}
-\def\lib#1{\tikz[baseline=-.6ex]\node[draw=teal,fill=teal!3!white,very thick,rounded corners=2pt,inner ysep=0pt]{\sffamily\strut#1};}
-
\def\TikZ{Ti\textit{k}Z}
\def\tikzpingus{\TikZ pingus}
@@ -410,7 +413,7 @@
\texorpdfstring{Florian Sihler\\*
\url{https://github.com/EagleoutIce/tikzpingus}
}{Florian Sihler}}
-\date{Version v1.1 \textendash{} 2023/09/17}
+\date{Version v1.2 \textendash{} 2024/11/27}
\begin{document}
\maketitle
@@ -438,7 +441,7 @@
\node[above=3mm,font=\bfseries\sffamily\Large] at(current bounding box.north) {Motivation};
\end{tikzpicture}\vspace*{-\baselineskip}
\end{center}
-\footnotetext{Why \say{pingu} and not \say{pengu}? Well, this is the third try on achieving cute penguins without using any templates or vector formats as a basis. As a German, the short form \say{pingu} was merely a typo that originated from the German word \say{pinguin} for \say{penguin}. It somewhat stuck\ldots}
+\footnotetext{Why \say{pingu} and not \say{pengu}? Well, this is the third try on achieving cute penguins without using any templates or vector formats as a basis. As a German, the short form \say{pingu} was merely a typo that originated from the German word \say{pinguin} for \say{penguin}. It somewhat stuck\ldots{}}
\endgroup\vfill
\begin{center}
@@ -538,6 +541,7 @@ Please note, that \say{left} and \say{right} have been chosen from the penguin-p
\begin{commandexplain}{pingu}{\opt{penguin keys}}
The command to draw the penguin!
+ If you want to use |\pengu| instead, you can use |\let\pengu\pingu| in your preamble to create an alias.
\end{commandexplain}
\clearpage Besides the keys defined by this package, you can use the keys of \TikZ\ and |pgf| as well (the duck was generated by the lovely \href{https://github.com/samcarter/tikzducks}{tikzducks} package):
@@ -622,8 +626,8 @@ changed with the name option:
This view excluded a lot of special data collected on the wings!
While there is more information stored for each wing, the following five coordinates are the most important to place items into penguins hand:\vspace*{-1.5em}
\begin{center}
- \null\hfill\parbox[c]{2.5\wd\pinguwingright}{\scalebox{2.5}{\usebox\pinguwingright}}\hfill\parbox[c]{4cm}{\centering\small\@declaredcolor{gray}\sffamily And yes, the wings are deliberately placed asymmetrical.\endgraf}\hfill
- \parbox[c]{2.5\wd\pinguwingleft}{\scalebox{2.5}{\usebox\pinguwingleft}}\hfill\null
+ \null\hfill\parbox[c]{2.6\wd\pinguwingright}{\scalebox{2.5}{\usebox\pinguwingright}}\hfill\parbox[c]{3.5cm}{\centering\small\@declaredcolor{gray}\sffamily And yes, the wings are deliberately placed asymmetrical.\endgraf}\hfill
+ \parbox[c]{2.6\wd\pinguwingleft}{\scalebox{2.5}{\usebox\pinguwingleft}}\hfill\null
\end{center}
\paragraph{The Body} Similarly to the wing position, different
@@ -683,28 +687,6 @@ With \cmdref{pingudefaults} and \cmdref{pingudefaultsappend} (similar, but exten
To overwrite these keys, see \cmdref{pingudefaults}.
\end{commandexplain}
-\subsection{Libraries}
-\label{Libraries}\index{Libraries}I've split the penguin features into a set of libraries. While all of them are loaded by default, the |bare| package-option disables the automatic loading of all libraries. They can be loaded (locally to the current group) using \cmdref{pinguloadlibrary} and \cmdref{pinguloadlibraries} passing on a comma separated list of desired libraries.
-See the full reference or the index to learn which key comes from which library.
-Please note that~--- at the moment~--- not all components of a library are labeled correctly.
-% TODO: already count that? % global let?
-\foreach[count=\i] \l/\xs in \pingu@defaultlibs{\xdef\pingu@defaultlibs@count{\i}}%
-Currently there are the following libraries:
-\foreach[count=\i] \l/\xs in \pingu@defaultlibs{%
- \ifx\l\empty\else
- \index[\current@indexfile]{Libraries!\textit{\l}}\textit{\l}\ifnum\numexpr\pingu@defaultlibs@count-1>\i,\space\else
- \ifnum\pingu@defaultlibs@count=\i\else,~and\space\fi\fi
- \fi
-}.
-
-\begin{commandexplain}{pinguloadlibrary}{\mand{library}}
- Load a penguin library (actually, due to the implementation, you can use this command just like \cmdref{pinguloadlibraries} and load multiple libraries).
-\end{commandexplain}
-
-\begin{commandexplain}{pinguloadlibraries}{\mand{libraries}}
- Load multiple penguin libraries, separated by a comma. For example: \texttt{\cmdref{pinguloadlibraries}\{shirts, glasses\}}.
-\end{commandexplain}
-
\subsection{Changing the wings}
\label{subsec:wings}As already demonstrated, it is possible to change the wing positions!
All selected wing-items will adapt to the wing-position (although not all wing-items will make sense with every wing-position).
@@ -768,7 +750,7 @@ So I have started to create some predefined styles, that do change some of the p
\itemsep0pt
\foreach \tx/\s in {{draw everything with a line}/{:line}, {fill main penguin}/{:fill}, {draw components with transparency}/{:ghost parts}, {draw all layers with transparency}/{:ghost}, {set main \say{devil}-components}/{:devil},{flip the penguin (swaps left \& right)}/{:back},{do not draw main pingu}/{:hide},{mix the main penguin with a given color}/{:mix},{mix the main penguin completely with a given color}/{:mix-draw},{mix everything with a given color}/{:mix-all}} {
\item \parbox[t]{.8\linewidth}{\raggedright\expandafter\dkeyref\expandafter{\s}, \tx.} \hfill
- \parbox[t]{.175\linewidth}{\scalebox{.4}{%
+ \parbox[t]{.175\linewidth}{\scalebox{.4}{%git@github.com:EagleoutIce/tikzpingus.git
\begin{tikzpicture}[baseline=.35\baselineskip]%
\pingu[\s]
\end{tikzpicture}%
@@ -2554,6 +2536,165 @@ Currently, this is a very cumbersome command to change various hat parameters at
\end{tcblisting}
\endsubkeyexplain
+\subsubsection{The graduate cap}
+\showkeyexplain{graduate}{color}{pingu@black!95!white}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endshowkeyexplain
+
+\keyalias{graduate cap}{graduate}
+
+{\def\pingu@color@graduate{<graduate-color>}
+\subkeyexplain{graduate}{graduate top}{color}{\pingu@color@graduate@top}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate, graduate top=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap top}{graduate top}{graduate}
+}
+
+{
+\subkeyexplain{graduate}{graduate tilt}{length}{\pingu@x@graduate@tilt}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate, graduate tilt=5mm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap tilt}{graduate tilt}{graduate}
+}
+
+{\def\pingu@color@graduate{<graduate-color>}
+\def\pingu@color@graduate@tassel{<graduate-tassel-color>}
+\subkeyexplain{graduate}{graduate tassel}{color}{\pingu@color@graduate@tassel}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate, graduate tassel=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap tassel}{graduate tassel}{graduate}
+}
+
+{\def\pingu@color@graduate{<graduate-color>}
+\def\pingu@color@graduate@tassel{<graduate-tassel-color>}
+\subkeyexplain{graduate}{graduate tassel drop}{color}{\pingu@color@graduate@tassel@drop}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate, graduate tassel,
+ graduate tassel drop=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap tassel drop}{graduate tassel drop}{graduate}
+}
+
+{\def\pingu@color@graduate{<graduate-color>}
+\def\pingu@color@graduate@tassel{<graduate-tassel-color>}
+\subkeyexplain{graduate}{graduate tassel start}{coordinate}{\pingu@x@tassel@start}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate, graduate tassel,
+ graduate tassel start={(2mm,4mm)}]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap tassel start}{graduate tassel start}{graduate}
+}
+
+{\def\pingu@color@graduate{<graduate-color>}
+\def\pingu@color@graduate@tassel{<graduate-tassel-color>}
+\subkeyexplain{graduate}{graduate tassel width}{length}{\pingu@x@tassel@width}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate, graduate tassel,
+ graduate tassel width=2mm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap tassel width}{graduate tassel width}{graduate}
+}
+
+{\def\pingu@color@graduate{<graduate-color>}
+\def\pingu@color@graduate@tassel{<graduate-tassel-color>}
+\subkeyexplain{graduate}{graduate tassel length}{length}{\pingu@x@tassel@length}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate, graduate tassel,
+ graduate tassel length=12mm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap tassel length}{graduate tassel length}{graduate}
+}
+
+{\def\pingu@color@graduate{<graduate-color>}
+\def\pingu@color@graduate@tassel{<graduate-tassel-color>}
+\def\pingu@x@tassel@width{<graduate-tassel-width>}
+\subkeyexplain{graduate}{graduate tassel drop size}{length}{\pingu@x@tassel@length}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate, graduate tassel,
+ graduate tassel drop size=4mm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap tassel drop size}{graduate tassel drop size}{graduate}
+}
+
+\subkeyexplain{graduate}{graduate position}{angle>:(<x>,<y>)<scale}{\pingu@x@graduate@angle:(\pingu@x@graduate@xshift,\pingu@x@graduate@yshift)\{\pingu@x@graduate@scale\}}
+Currently, this is a very cumbersome command to change various graduate parameters at the same time:
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[graduate,
+ graduate position={1:(0cm,-.09cm){1.33}}]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyalias{graduate cap position}{graduate position}{graduate}
+
+
+
+\subsubsection{The space helmet}
+\showkeyexplain{space helmet}{color}{pingu@black!45!white}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[space helmet=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endshowkeyexplain
+
+\subkeyexplain{space helmet}{space helmet glass}{color}{\pingu@color@spacehelmet@glass}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[space helmet, space helmet glass=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{space helmet}{space helmet glass opacity}{factor}{\pingu@x@spacehelmet@glass@opacity}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[space helmet, space helmet glass opacity=1]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{space helmet}{space helmet position}{angle>:(<x>,<y>)<scale}{\pingu@x@spacehelmet@angle:(\pingu@x@spacehelmet@xshift,\pingu@x@spacehelmet@yshift)\{\pingu@x@spacehelmet@scale\}}
+Currently, this is a very cumbersome command to change various space helmet parameters at the same time:
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[space helmet, space helmet position={1:(0cm,-.09cm){1.33}}]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+
\subsubsection{The mitra}
\showkeyexplain{mitra}{color}{pingu@red!67!pingu@black}
\begin{tcblisting}{@}
@@ -2580,7 +2721,7 @@ Currently, this is a very cumbersome command to change various hat parameters at
\end{tcblisting}
\endsubkeyexplain
-\subkeyexplain{mitra}{mitra overset}{lenght}{\pingu@x@mitra@overset}
+\subkeyexplain{mitra}{mitra overset}{length}{\pingu@x@mitra@overset}
\begin{tcblisting}{@}
\begin{tikzpicture}
\pingu[mitra,mitra overset=2.5mm]
@@ -4188,7 +4329,7 @@ Changes the banners right stick length:
\end{tcblisting}
\endsubkeyexplain
-\subkeyexplain{banner}{banner sticks length}{color}{\pingu@banner@stick@left@l}
+\subkeyexplain{banner}{banner sticks length}{length}{\pingu@banner@stick@left@l}
Calls \keyref{banner stick left length} and \keyref{banner stick right length} with the same length:
\begin{tcblisting}{@}
\begin{tikzpicture}
@@ -4344,6 +4485,202 @@ Change the bending of the banner:
\end{tcblisting}
\endsubkeyexplain
+\subsubsection{The flower}
+
+\showkeyexplain{flower left}{color}{pingu@white!80!pingu@black}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endshowkeyexplain
+
+\subkeyexplain{flower left}{flower left size}{length}{\pingu@flower@left@size}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left size=12mm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left center}{color}{\pingu@color@flower@left@center}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left center=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left center size}{length}{\pingu@flower@left@center@size}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left center size=1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyexplain{flower left}{flower left stem}{color}{\pingu@color@flower@left@stem}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left stem=purple]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left stem length}{length}{\pingu@flower@left@stem@length}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left stem length=1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left stem width}{length}{\pingu@flower@left@stem@width}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left stem width=1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left stem tilt}{length}{\pingu@flower@left@stem@tilt}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left stem tilt=-1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left petal count}{count}{\pingu@flower@left@petals}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left petal count=8]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left petal width}{length}{\pingu@flower@left@petals@width}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left petal width=1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left petal start angle}{length}{\pingu@flower@left@petals@start@angle}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left petal start angle=-40]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower left}{flower left petal peak}{factor}{\pingu@flower@left@petals@peak}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower left, flower left petal peak=12]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+
+\showkeyexplain{flower right}{color}{pingu@white!80!pingu@black}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endshowkeyexplain
+
+\subkeyexplain{flower right}{flower right size}{length}{\pingu@flower@right@size}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right size=12mm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right center}{color}{\pingu@color@flower@right@center}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right center=green]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right center size}{length}{\pingu@flower@right@center@size}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right center size=1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+\subkeyexplain{flower right}{flower right stem}{color}{\pingu@color@flower@right@stem}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right stem=purple]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right stem length}{length}{\pingu@flower@right@stem@length}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right stem length=1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right stem width}{length}{\pingu@flower@right@stem@width}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right stem width=1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right stem tilt}{length}{\pingu@flower@right@stem@tilt}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right stem tilt=-1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right petal count}{count}{\pingu@flower@right@petals}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right petal count=8]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right petal width}{length}{\pingu@flower@right@petals@width}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right petal width=1cm]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right petal start angle}{length}{\pingu@flower@right@petals@start@angle}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right petal start angle=-40]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+\subkeyexplain{flower right}{flower right petal peak}{factor}{\pingu@flower@right@petals@peak}
+\begin{tcblisting}{@}
+\begin{tikzpicture}
+ \pingu[flower right, flower right petal peak=12]
+\end{tikzpicture}
+\end{tcblisting}
+\endsubkeyexplain
+
+
+
+
\subsubsection{The cane}
\showkeyexplain{cane left}{color}{pingu@bronze}
@@ -7098,11 +7435,11 @@ As another example, this is the definition of the \say{flat bill} (\keyref{bill
% \end{commandexplain}
\begin{commandexplain}{pingu@headcon@x}{}
- This dimension holds a hardcoded value defining the x-position offseting the connection point of the penguin head. Its default value is \the\pingu@headcon@x. It may be removed in the future (or replaced by an option).
+ This dimension holds a hardcoded value defining the x-position offsetting the connection point of the penguin head. Its default value is \the\pingu@headcon@x. It may be removed in the future (or replaced by an option).
\end{commandexplain}
\begin{commandexplain}{pingu@headcon@y}{}
- This dimension holds a hardcoded value defining the y-position offseting the connection point of the penguin head. Its default value is \the\pingu@headcon@y. It may be removed in the future (or replaced by an option).
+ This dimension holds a hardcoded value defining the y-position offsetting the connection point of the penguin head. Its default value is \the\pingu@headcon@y. It may be removed in the future (or replaced by an option).
\end{commandexplain}
\subsubsection{The Code}
@@ -7114,9 +7451,9 @@ This code, defines three commands: \cmddef{pingu@bodytype@select}, \cmddef{pingu
The macro \cmddef{pingu@x@bodytype@none} is defined as follows:
\includecode{pingu@x@bodytype@none}
-\important\space Please note, that when writing the initial penguin, i did not intend to allow additional body shapes. Therefore, most of the defaults and \say{globals} are must be defined here (alongside a lot of hardcoding).
+\important\space Please note, that when writing the initial penguin, I did not intend to allow additional body shapes. Therefore, most of the defaults and \say{globals} must be defined here (alongside a lot of hardcoding).
-Within the initialization of all penguin options, we defuine the main colors:
+Within the initialization of all penguin options, we define the main colors:
% \pgfqkeys{/pingu}{
\includecode{bodytype\ keys}
With this, the body has three colors to work with: \cmdcoldef{body@main}, \cmdcoldef{body@head}, and \cmdcoldef{body@front}.
@@ -7162,7 +7499,7 @@ With this, the body has three colors to work with: \cmdcoldef{body@main}, \cmdco
\subsubsection{The Code}
-Similary to the eyes, the feet of the penguin are controlled by two selections for the left, and the right foot. There are no extra coordinates necessary, therefore \cmdref{pingu@create@selection} receives no argument for the \textit{none}-version:
+Similarly to the eyes, the feet of the penguin are controlled by two selections for the left, and the right foot. There are no extra coordinates necessary, therefore \cmdref{pingu@create@selection} receives no argument for the \textit{none}-version:
\includecode{feet\ selectors}
This defines the six commands: \cmddef{pingu@leftfoot@select}, \cmddef{pingu@leftfoot@add}, \cmddef{@pingu@drawer@leftfoot@}, \cmddef{pingu@rightfoot@select}, \cmddef{pingu@rightfoot@add}, and \cmddef{@pingu@drawer@rightfoot@}.
@@ -7181,7 +7518,7 @@ Now on how to add new feet. While it is possible to use \cmdref{pingu@leftfoot@a
For this, i created the command \cmdref{pingu@feet@s}\ldots
\begin{commandexplain}{pingu@feet@s}{\mand{name}\mand{left-foot}\mand{right-foot}\opt[pingu@yellow]{default color}}
- Allows to easily add new feet.
+ Allows easily adding new feet.
\end{commandexplain}
The macro \cmdref{pingu@feet@s} is defined with the help of \cmddef{pingu@feet@s@} like this:
\includecode{pingu@feet@s}
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-emotions.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-emotions.lib.tex
deleted file mode 100644
index b482ccb220..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-emotions.lib.tex
+++ /dev/null
@@ -1,56 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@eyes@s{sad}{%
- \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left);
- \pingu@block{\pingu@color@eye@left} (\pingu@name-eye-left)++(15:.1225cm and .1275cm) arc (15:-245:.1225cm and .1275cm) to[out=-45,in=175] cycle;
-}{%
- \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right);
- \pingu@block{\pingu@color@eye@right} (\pingu@name-eye-right)++(165:.1225cm and .1275cm) arc (165:425:.1225cm and .1275cm) to[out=225,in=5] cycle;
-}
-
-\pingu@eyes@s{angry}{%
- \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left);
- \pingu@block{\pingu@color@eye@left} (\pingu@name-eye-left) ellipse [x radius=.1225cm, y radius=.1275cm];
- \pingu@block{\pingu@color@body@front} (\pingu@name-eye-left) ++(120:.1225cm and .1275cm) ellipse [x radius=1.5mm,y radius=.5mm];
-}{%
- \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right);
- \pingu@block{\pingu@color@eye@right} (\pingu@name-eye-right) ellipse [x radius=.1225cm, y radius=.1275cm];
- \pingu@block{\pingu@color@body@front} (\pingu@name-eye-right) ++(60:.1225cm and .1275cm) ellipse [x radius=1.5mm,y radius=.5mm];
-}
-
-\pingu@bill@s{angry}{%
-\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0)
- to[out=-90,in=170] ++(1.9mm,-2.25mm) coordinate (\pingu@name-bill-bottom)
- to[out=10,in=-90] ++(1.9mm,2.25mm)
- to[bend right=.25cm] cycle;
-}
-
-\pingu@create@extra{blush}{%
- blush/.code = \pingu@set@extra{blush}{true}\pingu@color{blush}{#1},
- blush/.default = pingu@red,
- blush second/.code = \pingu@color{blush@second}{#1},
- blush opacity/.code = \def\pingu@x@blush@opacity{#1},
-}{blush opacity=.35,blush second=\pingu@color@blush}
-\def\pingu@draw@eb@blush{%
- \pingu@block[/pingu/@glow,opacity=\pingu@x@blush@opacity]{\pingu@color@blush} ([yshift=-2.7mm,xshift=-1.85mm]\pingu@name-eye-right) ellipse [x radius=2.66mm,y radius=2.25mm];
- \pingu@block[/pingu/@glow,opacity=\pingu@x@blush@opacity]{\pingu@color@blush@second} ([yshift=-2.7mm,xshift=1.85mm]\pingu@name-eye-left) ellipse [x radius=2.66mm,y radius=2.25mm];
-}
-
-\pingu@eyes@s{hearts}{%
- \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left);
- \pingu@block[rounded corners=0pt]{\pingu@color@eye@left} ([yshift=.3mm]\pingu@name-eye-left) arc(0:180:.065cm)
- to[out=270,in=110] ++(.13cm,-.2cm) to[out=70,in=270] ++(.13cm,.2cm) arc (0:180:.065cm) -- cycle;
-}{%
- \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right);
- \pingu@block{\pingu@color@eye@right} ([yshift=.3mm]\pingu@name-eye-right) arc(0:180:.065cm)
- to[out=270,in=110] ++(.13cm,-.2cm) to[out=70,in=270] ++(.13cm,.2cm) arc (0:180:.065cm) -- cycle;
-}
-
-\pingu@eyes@s{critical}{%
- \pingu@block{\pingu@color@eye@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=1.13mm, y radius=.145cm];
- \pingu@draw[thick]{\pingu@color@eye@left} (\pingu@name-eye-left)++(45:1.35mm and 1.85mm) arc(45:135:1.35mm and 1.85mm);
-}{%
- \pingu@block{\pingu@color@eye@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate(\pingu@name-eye-right) ellipse [x radius=1.13mm, y radius=.145cm];
- \pingu@draw[thick]{\pingu@color@eye@right} (\pingu@name-eye-right)++(45:1.35mm and 1.85mm) arc(45:135:1.35mm and 1.85mm);
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-flags.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-flags.lib.tex
deleted file mode 100644
index 3e1955bb1a..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-flags.lib.tex
+++ /dev/null
@@ -1,45 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@wing@extra{flag}{%
- flag \@lr/.code = {\pingu@set@extra{flag\@lr}{true}\pingu@color{flag\@lr}{##1}},
- flag \@lr/.default = pingu@purple,
- flag \@lr\space pole/.code = \pingu@color{flag\@lr @pole}{##1},
- flag \@lr\space code/.code = \expandafter\def\csname pingu@flag@\@lr @code\endcsname{##1},
- flag \@lr\space bobble/.code = {\pingu@color{flag\@lr @bobble}{##1}},
- pride flag \@lr/.style = {%
- /pingu/flag \@lr\space code = {%
- \noexpand\node[/pingu/@flag@first,/pingu/@flag={{rgb:yellow,1;red,5;magenta,2;black,1}}{1.9mm}] (a) at (0,0) {};
- \noexpand\node[below,/pingu/@flag={{rgb:yellow,5;red,5;green,1;white,1}}{1.9mm}] (b) at (a.south) {};
- \noexpand\node[below,/pingu/@flag={yellow}{1.9mm}] (c) at (b.south) {};
- \noexpand\node[below,/pingu/@flag={{rgb:blue,1;cyan,1;green,4;black,2}}{1.9mm}] (d) at (c.south) {};
- \noexpand\node[below,/pingu/@flag={{rgb:magenta,3;blue,5;cyan,4;black,3}}{1.9mm}] (e) at (d.south) {};
- \noexpand\node[below,/pingu/@flag={{rgb:red,2;magenta,2;blue,5}}{1.9mm}] (f) at (e.south) {};
- }, /pingu/flag \@lr, /pingu/flag \@lr\space pole={##1}%
- },%
- @flag/.style 2 args={tape bend height=.5mm,shape=tape,minimum height=##2, minimum width=15mm,outer sep=\z@,inner sep=\z@,fill=##1,draw=##1,rotate=\noexpand\@angle},
- pride flag \@lr/.default = pingu@bronze,%
- german flag \@lr/.style = {%
- /pingu/flag \@lr\space code = {%
- \noexpand\node[/pingu/@flag@first,/pingu/@flag={black}{3.33mm}] (a) at (0,0) {};
- \noexpand\node[below,/pingu/@flag={red}{3.33mm}] (b) at (a.south) {};
- \noexpand\node[below,/pingu/@flag={yellow}{3.33mm}] (c) at (b.south) {};
- }, /pingu/flag \@lr, /pingu/flag \@lr\space pole={##1}%
- },%
- german flag \@lr/.default = pingu@bronze%
-}{flag \@lr\space bobble=pingu@bronze, flag \@lr\space pole=pingu@bronze, flag \@lr\space code = {%
- \noexpand\node[/pingu/@flag@first,/pingu/@flag={\noexpand\@col}{9.75mm}] (a) at (0,0) {};
-}}
-\def\pingu@draw@wi@flag#1{%
- \pingu@setup@wing{flag}{#1}%
-\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
- % NOTE: not full foreground if placed under the wing
- \pingu@layer{foreground}[shift={(\pingu@name-wing-#1)},shift={(\@sidesign*.15mm,17.5mm-3.5\p@)}]
- \if@pingu@wing@item@side@left@\pgfqkeys{/pingu}{@flag@first/.style={below right}}\else\pgfqkeys{/pingu}{@flag@first/.style={below left}}\fi
- \csname pingu@flag@#1@code\endcsname
- \pingu@block[thick]{\csname pingu@color@flag#1@pole\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.15mm,3mm) -- ++(0,13.65mm) -| ++(\@sidesign*.6mm,-13.65mm) -- cycle;
- \endpingu@layer
- \pingu@block[thick]{\csname pingu@color@flag#1@pole\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.15mm,-3mm) -- ++(0,20mm) arc(180:0:\@sidesign*.3mm and .375mm) -- ++(0,-20mm) arc(360:180:\@sidesign*.3mm and .375mm) -- cycle;
- \pingu@block{\csname pingu@color@flag#1@bobble\endcsname} (\pingu@name-wing-#1)++(\@sidesign*.15mm,17.5mm) circle [radius=2.15\p@];
-\endscope
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-formal.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-formal.lib.tex
deleted file mode 100644
index 7e058876b9..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-formal.lib.tex
+++ /dev/null
@@ -1,116 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{tie}{%
- tie/.code = \pingu@set@extra{tie}{true}\pingu@color{tie}{#1},
- tie/.default = pingu@green,
- tie knot/.code = \pingu@color{tie@knot}{#1},
- tie length/.code = \def\pingu@x@tie@length{#1},
- tie offset/.code = \def\pingu@x@tie@offset{#1},
- tie width/.code = \def\pingu@x@tie@width{#1},
- tie pattern/.code = \def\pingu@x@tie@pattern{#1},
- tie dots/.style = {%
- tie pattern={%
- \pingu@block[postaction={pattern={Dots[angle=40,distance=1.5pt,radius=.35pt]},pattern color=#1}]{\pingu@color@tie} \pingupathxtie;
- \pingu@block[postaction={pattern={Dots[angle=-30,distance=1.45pt,radius=.35pt@]},pattern color=#1}]{\pingu@color@tie@knot} \pingupathxtieknot;
- }%
- },
- tie dots/.default={pingu@white}%
-}{% defaults
- tie length=.625\pingu@side@h@half, tie offset=.399cm,%
- tie knot=\pingu@color@tie!92!black, tie width=.21cm,%
- tie pattern={%
- \pingu@block{\pingu@color@tie} \pingupathxtie;
- \pingu@block{\pingu@color@tie@knot} \pingupathxtieknot;
- }%
-}
-\def\pingupathxtie{[rounded corners=.15mm] (\pingu@name-tie-start)++(-.4mm,-.25mm) -- ++(-\pingu@x@tie@width/2, -\pingu@x@tie@length+.125cm) -- ++(\pingu@x@tie@width/2+.4mm,-.125cm) -- ++(\pingu@x@tie@width/2+.4mm,.125cm) -- +(-\pingu@x@tie@width/2, \pingu@x@tie@length-.125cm) -- cycle}
-\def\pingupathxtieknot{[rounded corners=.25mm] (\pingu@name-tie-start)++(-.095cm-.02*\pingu@x@tie@width,\z@) -- ++(.3mm,-.15cm-.01*\pingu@x@tie@width) -- ++(.13cm+.04*\pingu@x@tie@width,\z@) -- ++(.3mm,.15cm+.01*\pingu@x@tie@width) -- cycle}
-\def\pingu@draw@eb@tie{%
- \path (\pingu@name-bill)++(0,-\pingu@x@tie@offset) coordinate(\pingu@name-tie-start);
- \pingu@x@tie@pattern
-}
-
-\pingu@create@extra{bowtie}{%
- bowtie/.forward to = /pingu/bow tie,
- bow-tie/.forward to = /pingu/bow tie,
- bow tie/.code = \pingu@set@extra{bowtie}{true}\pingu@color{bowtie}{#1},
- bow tie/.default = pingu@blue,
- bow tie b/.code = \pingu@color{bowtie@b}{#1},
- bowtie b/.forward to = /pingu/bow tie b,
- bow-tie b/.forward to = /pingu/bow tie b,
- bowtie offset/.forward to = /pingu/bow tie offset,
- bow-tie offset/.forward to = /pingu/bow tie offset,
- bow tie offset/.code = \def\pingu@x@bowtie@offset{#1},
- bowtie knot/.forward to = /pingu/bow tie knot,
- bow-tie knot/.forward to = /pingu/bow tie knot,
- bow tie knot/.code = \pingu@color{bowtie@knot}{#1},
-}{% defaults
- bow tie knot=\pingu@color@bowtie!92!black,bow tie offset=.315cm,%
- bow tie b=\pingu@color@bowtie%
-}
-
-\def\pingupathxbowtieknot{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(-.0625cm,-.35mm) to[bend right=10] ++(.125cm,0) -- ++(0,-.13cm) to[bend right=10] ++(-.125cm, 0) -- cycle}
-\def\pingupathxbowtieleft{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(-.15mm,-.06cm) to[out=155,in=-5] ++(-.25cm,.065cm) to[bend right=15] ++(0,-.21cm) to[in=-155,out=5] ++(.25cm,.065cm) -- cycle}
-\def\pingupathxbowtieright{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(.15mm,-.06cm) to[out=25,in=-175] ++(.25cm,.065cm) to[bend left=15] ++(0,-.21cm) to[in=-25,out=175] ++(-.25cm,.065cm) -- cycle}
-\def\pingu@draw@eb@bowtie{%
- \path (\pingu@name-bill)++(0,-\pingu@x@bowtie@offset) coordinate(\pingu@name-bow-tie-start);
- \pingu@block{\pingu@color@bowtie} \pingupathxbowtieleft;
- \pingu@block{\pingu@color@bowtie@b} \pingupathxbowtieright;
- \pingu@block{\pingu@color@bowtie@knot} \pingupathxbowtieknot;
-}
-
-\newif\if@pingu@x@pants@bands
-\pingu@create@extra{pants}{%
- pants/.code = \pingu@set@extra{pants}{true}\pingu@color{pants}{#1},
- pants/.default = pingu@red,
- pants bands/.is if = @pingu@x@pants@bands,
- pants button left/.code = \pingu@color{pants@button@left}{#1},
- pants button right/.code = \pingu@color{pants@button@right}{#1},
- pants buttons/.style = {/pingu/pants button left={#1}, /pingu/pants button right={#1}},
- pants button left shade/.code = \pingu@color{pants@button@left@shade}{#1},
- pants button right shade/.code = \pingu@color{pants@button@right@shade}{#1},
- pants buttons shade/.style = {/pingu/pants button left shade={#1}, /pingu/pants button right shade={#1}},
- pants without buttons/.forward to=/pingu/pants no buttons,
- pants no buttons/.style = {/pingu/pants buttons=\@pingu@none, /pingu/pants buttons shade=\@pingu@none},
- pants extra height/.code = \def\pingu@x@pants@extra@height{#1},
-}{pants extra height=1.5mm,pants buttons=pingu@black,pants button left shade=\pingu@color@pants@button@left!70!white,pants button right shade=\pingu@color@pants@button@right!70!white}
-
-\def\pingu@draw@eb@pants{%
-\pingu@block[rounded corners=\p@]{\pingu@color@pants} ([xshift=.85mm,yshift=\pingu@x@pants@extra@height]\pingu@name-waist-right) coordinate(@tmp) to[bend right=6] ([xshift=-.85mm,yshift=\pingu@x@pants@extra@height]\pingu@name-waist-left) coordinate(@tmpb) -- ++(0,-\pingu@x@pants@extra@height) arc(180:270:.85mm and 2.25mm) to[bend left=\pingu@bend] (\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=15] ([yshift=-.15mm]\pingu@name-bottom-center) to[bend left=15] (\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=6] ([yshift=-2.5mm]\pingu@name-waist-right) arc (-90:0:.85mm and 2.25mm) -- cycle;
-\if@pingu@x@pants@bands
-\pingu@layer{middle}[]
-% draw stripes
-\scope
-\clip \pingu@path@lowerpingu;
-\pingu@block{\pingu@color@pants} (@tmp)++(.55mm,-\pingu@one) to[bend right=3] ([yshift=1.65mm]\pingu@name-wings-side-right) -- ++(-.25mm,-.25mm) to[bend left=3] ([yshift=-\pingu@one]@tmp) -- cycle;
-\pingu@block{\pingu@color@pants} (@tmpb)++(-.55mm,-\pingu@one) to[bend left=3] ([yshift=1.65mm]\pingu@name-wings-side-left) -- ++(.25mm,-.25mm) to[bend right=3] ([yshift=-\pingu@one]@tmpb) -- cycle;
-\endscope
-\fi
-\pingu@block{\pingu@color@pants@button@right}(@tmp)++(.25mm,-.25mm)circle[radius=.7mm];
-\pingu@block{\pingu@color@pants@button@left}(@tmpb)++(-.25mm,-.25mm)circle[radius=.7mm];
-\pingu@block[even odd rule]{\pingu@color@pants@button@right@shade}(@tmp)++(.25mm,-.25mm)circle[radius=.7mm] circle[radius=.615mm];
-\pingu@block[even odd rule]{\pingu@color@pants@button@left@shade}(@tmpb)++(-.25mm,-.25mm)circle[radius=.7mm] circle[radius=.615mm];
-\@for\i:={0,90,180,270}\do{
- \pingu@block{\pingu@color@pants@button@right@shade} (@tmp)++(.25mm,-.25mm)++(\i:.
- 35mm) circle[radius=.1mm];
- \pingu@block{\pingu@color@pants@button@left@shade} (@tmpb)++(-.25mm,-.25mm)++(\i:.35mm) circle[radius=.1mm];
-}%
-\if@pingu@x@pants@bands \endpingu@layer \fi
-}
-
-
-\pingu@create@extra{belt}{%
- belt/.code = \pingu@set@extra{belt}{true}\pingu@color{belt}{#1},
- belt/.default = pingu@bronze!80!black,
- belt knot color/.code = \pingu@color{belt@knot}{#1}
-}{% defaults
- belt knot color = pingu@silver
-}
-
-\def\pingu@draw@eb@belt@wh{1.25mm}
-\def\pingu@draw@eb@belt{%
- \path ([yshift=-1.66mm/2]\pingu@name-waist-left) -- ([yshift=-1.66mm/2]\pingu@name-waist-right) coordinate[pos=.5] (\pingu@name @belt@center);
- \pingu@block[rounded corners=.5pt]{\pingu@color@belt} (\pingu@name-waist-left) coordinate (@) to[bend left=5] (\pingu@name-waist-right) -- ++(0,-1.66mm) to[bend right=5] ([yshift=-1.66mm]@) -- cycle;
- \pingu@block[rounded corners=1.5pt]{\pingu@color@belt@knot} ([xshift=-1mm,yshift=-.7mm-1.66mm/2]\pingu@name @belt@center) rectangle ++(2mm,2mm);
-}
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-fun.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-fun.lib.tex
deleted file mode 100644
index f4d49e5cad..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-fun.lib.tex
+++ /dev/null
@@ -1,309 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{cakehat}{%
- cake-hat/.code = \pingu@set@extra{cakehat}{true}\pingu@color{cakehat}{#1},
- cake-hat/.default = pingu@white!92!\pingu@color@cakehat@top,
- cake-hat top/.code = \pingu@color{cakehat@top}{#1},
- cake-hat shade/.code = \pingu@color{cakehat@shade}{#1},
- cake-hat candle/.code = \pingu@color{cakehat@candle}{#1},
- cake-hat candle fire/.code = \pingu@color{cakehat@candle@fire}{#1},
- cake-hat candle fire 2/.code = \pingu@color{cakehat@candle@fire@b}{#1},
- cake-hat candle fire 3/.code = \pingu@color{cakehat@candle@fire@c}{#1},
- cake-hat candle wick/.code = \pingu@color{cakehat@candle@wick}{#1},
- cake-hat candle shade/.code = \pingu@color{cakehat@candle@shade}{#1},
- cake-hat candle back/.code = \pingu@color{cakehat@candle@back}{#1},
- cake-hat outline/.code = \pingu@color{cakehat@outline}{#1},
- cake-hat outline width/.code = \def\pingu@x@cakehat@outline@w{#1},
- cake-hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@cakehat@angle{#1}\def\pingu@x@cakehat@xshift{#2}\def\pingu@x@cakehat@yshift{#3}\def\pingu@x@cakehat@scale{#4}}
-}{cake-hat position={-9:(1mm,0mm)1},cake-hat outline=pingu@black!80!\pingu@color@cakehat,cake-hat outline width=.25pt,cake-hat top=pingu@purple,cake-hat candle=pingu@purple!60!pingu@black,cake-hat candle back=\pingu@color@cakehat@candle!85!black,cake-hat candle wick=pingu@black,cake-hat candle fire=pingu@red,cake-hat candle fire 2=\pingu@color@cakehat@candle@fire!50!yellow,cake-hat candle fire 3=\pingu@color@cakehat@candle@fire@b!50!white,cake-hat shade=gray,cake-hat candle shade=gray!80!\pingu@color@cakehat@candle@back}
-
-\def\pingu@p@cake@outline{(-6.25mm,-.25cm) to[bend left=2] (\pingu@name-cake-tl) arc (180:0:1.375cm/2+.01mm and 1.41mm) to[bend left=2] ++(0,-3.125mm*.97) to[bend left=20] (-6mm,-.26cm) -- cycle}
-\def\pingu@draw@ea@cakehat{%
-\scope[rotate around={\pingu@x@cakehat@angle:(\pingu@name-head-top)},%
-shift={(\pingu@name-head-top)},
-shift={(\pingu@x@cakehat@xshift,\pingu@x@cakehat@yshift)},
-scale=\pingu@x@cakehat@scale]
- \pingu@block{\pingu@color@cakehat} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend left=2] coordinate[pos=.97] (\pingu@name-cake-tl) ++(0,3.125mm) to[bend right=20]
- ++(1.375cm,0) to[bend left=2] coordinate[pos=.03] (\pingu@name-cake-tr) ++(0,-3.125mm) to[bend left=20] (-6mm,-.26cm) -- cycle;
- \pingu@block[fill opacity=.1]{\pingu@color@cakehat@shade} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend right=20]
- ++(1.375cm,0) to[bend right=2] ++(0,3.125mm) [sharp corners] to[bend left=20] (-6.25mm,-.225cm) [rounded corners=.2mm] -- cycle;
- \path (\pingu@name-cake-tl) -- (\pingu@name-cake-tr) coordinate[pos=.5] (\pingu@name-cake-tc);
- % cake side
- \scope
- \clip\pingu@p@cake@outline;
- \path (\pingu@name-cake-tl) arc (180:360:1.375cm/2+.01mm and 1.41mm) foreach[count=\i] \a in {0,.19,.295,.375,.485,.625,.72,.85,1} {coordinate[pos=\a] (\pingu@name-cake-\i)};
- \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-1) ellipse [x radius=.255mm,y radius=2mm];
- \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-9) ellipse [x radius=.265mm,y radius=1.45mm];
- \foreach \i in {2,...,9} {
- \pgfmathsetmacro\@tmprand{rand}
- \pingu@draw[opacity=.5]{gray} (\pingu@name-cake-\i)++(-.02mm,0) to[bend left=1] ++(+.145mm,{-1.075mm-(\@tmprand+.15)*.5125mm}) arc(370:300:.145mm);
- \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\i)++(0,.1mm) -- ++(-.125mm,0) to[bend left=1] ++(0,{-1.2mm-(\@tmprand+.15)*.5125mm}) arc(170:370:.145mm) to[bend right=1] cycle;
- }
- \foreach \i in {2,...,9} {
- \ifnum\i=2\relax
- \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.5mm) to[bend left=8] ([xshift=-.05mm,yshift=-.25mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax);
- \else\ifnum\i=9\relax
- \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.25mm) to[bend left=8] ([xshift=-.05mm,yshift=-.5mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax);
- \else
- \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.25mm) to[bend left=9.5+2*rand] ([xshift=-.05mm,yshift=-.25mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax);
- \fi\fi
- }
- \endscope
- \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-tc) ellipse [x radius=1.375cm/2+.01mm, y radius=1.41mm];
- % outline
- \pingu@draw[line width=\pingu@x@cakehat@outline@w,rounded corners=.075mm]{\pingu@color@cakehat@outline} \pingu@p@cake@outline;
-% % 3d sides
-% \pingu@block[rounded corners=.04mm]{\pingu@color@cakehat@top} ([xshift=.1mm,yshift=.125mm]\pingu@name-cake-tl) to[out=246,in=97] ++(-.11mm,-2.125mm) -- ++(.04mm,0) to[bend right=12] (\pingu@name-cake-ttl) -- cycle;
-% \pingu@block[rounded corners=.09mm]{green} ([xshift=-.1mm]\pingu@name-cake-ttr) to[out=294,in=83] ++(.125mm,-2.125mm) to[bend left=12] ([xshift=-.11mm,yshift=.125mm]\pingu@name-cake-tr) -- cycle;
- % candle
- \pingu@block{\pingu@color@cakehat@candle@back} (\pingu@name-cake-tc)++(.8mm,2.66mm) to[bend right=7] ++(-1.1mm,-.1mm) to[bend right=30]++(1.1mm,0) -- cycle;
- % wick
- \pingu@draw[very thin]{\pingu@color@cakehat@candle@wick} (\pingu@name-cake-tc)++(.25mm,2mm) to[out=75,in=-95] coordinate[pos=.8] (\pingu@name-wick-1) ++(0,1mm) coordinate(\pingu@name-wick-top);
- \pingu@block{\pingu@color@cakehat@candle@fire} (\pingu@name-wick-1)++(-.045mm,0) to[out=115,in=240] ++(0,1.5mm) to[out=300,in=65] ([xshift=.045mm]\pingu@name-wick-1) -- cycle;
- \pingu@block{\pingu@color@cakehat@candle@fire@b} (\pingu@name-wick-1)++(-.045mm,0) to[out=105,in=240] ++(0,1.3mm) to[out=300,in=75] ([xshift=.045mm]\pingu@name-wick-1) -- cycle;
- \pingu@block{\pingu@color@cakehat@candle@fire@c} (\pingu@name-wick-1)++(-.035mm,0) to[out=95,in=250] ++(0,1.1mm) to[out=290,in=85] ([xshift=.035mm]\pingu@name-wick-1) -- cycle;
- % front
- \pingu@block{\pingu@color@cakehat@candle} (\pingu@name-cake-tc)++(.25mm,0) ++(.55mm,0) to[bend left=0.5] ++(0,2.66mm) to[bend left=20] ++(-1.1mm,-.1mm) to[bend right=0.5] ++(0,-2.66mm) to[bend right=20] cycle;
- \pingu@block[fill opacity=.125]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(-.3mm,-.1mm) to[bend right=20] ++(1.1mm,0) to[bend left=.5] ++(0,2.66mm) to[bend left=15] ++(-1.1mm,-2.5mm) -- cycle;
- \pingu@block[fill opacity=.225]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(-.3mm,-.1mm) to[bend left=2] ++(1.1mm,-1.1mm) to[bend left=5] ++(1.1mm,0) to[bend left=2] ++(-1.1mm,1.2mm) to[bend left =15] cycle;
- \pingu@block[fill opacity=.225]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(1.35mm,-1.25mm) circle [radius=.1mm];
-\endscope
-}
-\pingu@create@extra{pumpkinhat}{%
- pumpkin-hat/.code = \pingu@set@extra{pumpkinhat}{true}\pingu@color{pumpkinhat}{#1},
- pumpkin-hat/.default = pingu@bronze!97!white,
- pumpkin-hat stalk/.code = \pingu@color{pumpkinhat@stalk}{#1},
- pumpkin-hat stalk top/.code = \pingu@color{pumpkinhat@stalk@top}{#1},
- pumpkin-hat stripe a/.code = \pingu@color{pumpkinhat@stripe@a}{#1},
- pumpkin-hat stripe b/.code = \pingu@color{pumpkinhat@stripe@b}{#1},
- pumpkin-hat stripe c/.code = \pingu@color{pumpkinhat@stripe@c}{#1},
- pumpkin-hat outline/.code = \pingu@color{pumpkinhat@outline}{#1},
- pumpkin-hat outline width/.code = \def\pingu@x@pumpkinhat@outline@w{#1},
- pumpkin-hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@pumpkinhat@angle{#1}\def\pingu@x@pumpkinhat@xshift{#2}\def\pingu@x@pumpkinhat@yshift{#3}\def\pingu@x@pumpkinhat@scale{#4}}
-}{pumpkin-hat position={-9:(1.65mm,.25mm)1.05},pumpkin-hat stalk=pingu@green!95!\pingu@color@pumpkinhat!45!pingu@black,pumpkin-hat stalk top=\pingu@color@pumpkinhat@stalk!95!pingu@black,pumpkin-hat stripe a=pingu@black,pumpkin-hat stripe b=\pingu@color@pumpkinhat@stripe@a,pumpkin-hat stripe c=\pingu@color@pumpkinhat@stripe@b,pumpkin-hat outline=pingu@black,pumpkin-hat outline width=.7pt}
-
-\def\pingu@pumpkinhat@outerpath{(0,.125cm)++(-60:6.75mm and 5.5mm) arc(-60:86: 6.75mm and 5.5mm) to[bend left=3] ++(-1.75mm,0) arc(95:242:6.75mm and 5.5mm) to[bend left=5] cycle;}
-\def\pingu@draw@ea@pumpkinhat{%
-\scope[rotate around={\pingu@x@pumpkinhat@angle:(\pingu@name-head-top)},%
-shift={(\pingu@name-head-top)},
-shift={(\pingu@x@pumpkinhat@xshift,\pingu@x@pumpkinhat@yshift)},
-scale=\pingu@x@pumpkinhat@scale]
- % give it a small cut
- \pingu@block{\pingu@color@pumpkinhat} (0,.125cm)++(-60:6.75mm and 5.5mm) coordinate (@pkll) arc(-60:86: 6.75mm and 5.5mm) coordinate (@pkl) to[bend left=3] coordinate[pos=.5] (@pkuc) ++(-1.75mm,0) coordinate (@pkr) arc(95:242:6.75mm and 5.5mm) coordinate (@pklr) to[bend left=5] coordinate[pos=.5] (@pklc) cycle;
- \pingu@draw[line join=round,line width=\pingu@x@pumpkinhat@outline@w]{\pingu@color@pumpkinhat@outline} \pingu@pumpkinhat@outerpath;
-\scope
-\clip (0,.125cm)++(-60:6.75mm and 5.5mm) coordinate (@pkll) arc(-60:86: 6.75mm and 5.5mm) coordinate (@pkl) to[bend left=3] ++(-1.75mm,0) coordinate (@pkr) arc(95:242:6.75mm and 5.5mm) coordinate (@pklr) to[bend left=5] cycle;
- \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@a} (@pklr) to[bend left=55] (@pkr);
- \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@c} (@pkll) to[bend right=55] (@pkl);
- \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@b} (@pklc) to[bend right=5] (@pkuc);
-\endscope
-\pingu@block{\pingu@color@pumpkinhat@stalk} ([yshift=-.5*\pingu@x@pumpkinhat@outline@w]@pkl) to[bend left=3] ([yshift=-.5*\pingu@x@pumpkinhat@outline@w]@pkr) to[bend right=8] ++(.85mm,2mm) -- ++(.65mm,0) coordinate[pos=.5] (@pkc) to[bend right=3] cycle;
-\pingu@block{\pingu@color@pumpkinhat@stalk@top} (@pkc) ellipse[x radius=.65mm/2, y radius=.085mm];
-\endscope
-}
-
-\pingu@create@wing@extra{lollipop}{%
- lollipop \@lr/.code = {\pingu@set@extra{lollipop\@lr}{true}\pingu@color{lollipop\@lr}{##1}},
- lollipop \@lr/.default = pingu@green,
- lollipop \@lr\space handle/.code = \pingu@color{lollipop\@lr @handle}{##1},%
- lollipop \@lr\space second/.code = \pingu@color{lollipop\@lr @second}{##1}%
-}{lollipop \@lr\space handle=pingu@bronze,lollipop \@lr\space second={\csname pingu@color@lollipop\@lr\endcsname!86!white}}
-
-% #1 wing
-\def\pingu@draw@wi@lollipop#1{%
- \pingu@setup@wing{lollipop}{#1}%
- \pingu@draw[thick,rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@lollipop#1@handle\endcsname}(\pingu@name-wing-#1)++(0,4.75mm) -- ++(0,-6.25mm);
- \pingu@block[thick,rotate around={\@angle:(\pingu@name-wing-#1)}]{\@col}(\pingu@name-wing-#1)++(0,4.75mm) coordinate (\pingu@name-lollipop-#1-top) circle[radius=1.4mm];
- \pingu@block[thick,rotate around={\@angle-1:(\pingu@name-lollipop-#1-top)}]{\csname pingu@color@lollipop#1@second\endcsname} (\pingu@name-lollipop-#1-top) ellipse [x radius=1.57mm, y radius=1.5\p@];
- \pingu@block[thick,rotate around={\@angle-1:(\pingu@name-lollipop-#1-top)}]{\@col} (\pingu@name-lollipop-#1-top)++(0,.5\p@) ellipse [x radius=1.4mm, y radius=\p@];
-}
-
-\pingu@create@extra{heart}{%
- heart/.code = {\pingu@set@extra{heart}{true}\pingu@color{heart}{#1}},
- heart/.default = lightgray
-}{}
-
-\def\pingu@draw@eb@heart{%
- \pingu@block[sharp corners]{\pingu@color@heart}
- ([yshift=1mm]\pingu@name-belly-center) arc(0:180:.13cm)
- to[out=270,in=110] ++(.26cm,-.36cm) to[out=70,in=270] ++(.26cm,.36cm) arc (0:180:.13cm) -- cycle;
-}
-
-\pingu@create@extra{vampireteeth}{%
- vampire teeth/.code = {\pingu@set@extra{vampireteeth}{true}\pingu@color{vampireteeth}{#1}},
- vampire teeth/.default = pingu@yellow!10!pingu@black!70!lightgray
-}{}
-
-\def\pingu@draw@eb@vampireteeth{%
- \pingu@block{\pingu@color@vampireteeth} (\pingu@name-bill) ++(-1.35mm,-2.5mm)
- arc(180:0:1.35mm and 2.5mm)
- arc(0:180:1.35mm and .95mm);
-}
-
-\pingu@create@wing@extra{broom}{%
- broom \@lr/.code = {\pingu@set@extra{broom\@lr}{true}\pingu@color{broom\@lr}{##1}},
- broom \@lr/.default = pingu@bronze,
- broom \@lr\space length/.code = \expandafter\def\csname pingu@broom@\@lr @length\endcsname{##1},
- broom \@lr\space shift/.code = \expandafter\def\csname pingu@broom@\@lr @shift\endcsname{##1},
- broom \@lr\space band/.code = \pingu@color{broom@\@lr @band}{##1},
- broom \@lr\space bristles a/.code = \pingu@color{broom@\@lr @bristles@a}{##1},
- broom \@lr\space bristles b/.code = \pingu@color{broom@\@lr @bristles@b}{##1},
- broom \@lr\space bristles c/.code = \pingu@color{broom@\@lr @bristles@c}{##1},
-}{broom \@lr\space length=22mm,broom \@lr\space shift=8mm, broom \@lr\space band=pingu@red!80!pingu@black!80!pingu@bronze, broom \@lr\space bristles a=pingu@bronze!16!pingu@yellow!41!pingu@white!80!brown!95!\csname pingu@color@broom\@lr\endcsname, broom \@lr\space bristles b=\csname pingu@color@broom@\@lr @bristles@a\endcsname!83!pingu@white, broom \@lr\space bristles c=\csname pingu@color@broom@\@lr @bristles@b\endcsname!83!pingu@white}
-\def\pingu@draw@wi@broom#1{%
- \pingu@setup@wing{broom}{#1}%
- % TODO: mirror on other wing?
-\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
- \pingu@block{\csname pingu@color@broom#1\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,-\csname pingu@broom@#1@shift\endcsname) -- ++(0,\csname pingu@broom@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-broom-#1-top) -- ++(0,-\csname pingu@broom@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
- \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] ++(1mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle;
- \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] ++(1.66mm,9.75mm) to[out=300,in=65] coordinate[pos=.81] (@l) coordinate[pos=.79] (@l2) ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle;
- \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] coordinate[pos=.17] (@r) coordinate[pos=.19] (@r2) ++(.25mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle;
- \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@b\endcsname} (\pingu@name-broom-#1-top)++(-.75mm,-1.75mm) to[out=115,in=240] ++(1.35mm,9.25mm) to[out=300,in=65] ([xshift=.75mm,yshift=-1.75mm]\pingu@name-broom-#1-top) -- cycle;
- \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@b\endcsname} (\pingu@name-broom-#1-top)++(-.75mm,-1.75mm) to[out=115,in=240] ++(0mm,9.65mm) to[out=300,in=65] ([xshift=.75mm,yshift=-1.75mm]\pingu@name-broom-#1-top) -- cycle;
- \pingu@block{\csname pingu@color@broom@#1@bristles@c\endcsname} (\pingu@name-broom-#1-top)++(-.5mm,-1.5mm) to[out=115,in=240] ++(.5mm,9.5mm) to[out=300,in=65] ([xshift=.5mm,yshift=-1.5mm]\pingu@name-broom-#1-top) -- cycle;
- % TODO: broom cap color etc
- \pingu@block{\csname pingu@color@broom@#1@band\endcsname} (@r) to[bend right=10] (@l) -- (@l2) to[bend left=10] (@r2);
-\endscope
-}
-
-\tikzset{pingu@clip even odd rule/.code={\pgfseteorule}, % Credit to Andrew Stacey
-pingu@invclip/.style={
- clip,insert path=
- [pingu@clip even odd rule]{
- [reset cm](-\maxdimen,-\maxdimen)rectangle(\maxdimen,\maxdimen)
- }
-}}
-\pingu@create@extra{jackolantern}{%
- jack o lantern/.code = \pingu@set@extra{jackolantern}{true}\pingu@color{jackolantern}{#1},
- jack o lantern/.default = pingu@bronze!97!pingu@black,
- jack o lantern helmet/.style = {jack o lantern=#1,jack o lantern background=none,jack o lantern position={-2.15:(2.05mm,-11.35mm){1.5}},jack o lantern back stripe a=\@pingu@none, jack o lantern back stripe b=\@pingu@none,jack o lantern back stripe c=\@pingu@none,jack o lantern height=6.25mm,jack o lantern width=6.1mm,hair=\@pingu@none},
- jack o lantern helmet/.default = pingu@bronze!97!pingu@black,
- jack o lantern stalk/.code = \pingu@color{jackolantern@stalk}{#1},
- jack o lantern stalk top/.code = \pingu@color{jackolantern@stalk@top}{#1},
- jack o lantern background/.code= \pingu@color{jackolantern@background}{#1},
- jack o lantern stripe a/.code = \pingu@color{jackolantern@stripe@a}{#1},
- jack o lantern stripe b/.code = \pingu@color{jackolantern@stripe@b}{#1},
- jack o lantern stripe c/.code = \pingu@color{jackolantern@stripe@c}{#1},
- jack o lantern back stripe a/.code = \pingu@color{jackolantern@backstripe@a}{#1},
- jack o lantern back stripe b/.code = \pingu@color{jackolantern@backstripe@b}{#1},
- jack o lantern back stripe c/.code = \pingu@color{jackolantern@backstripe@c}{#1},
- jack o lantern outline/.code = \pingu@color{jackolantern@outline}{#1},
- jack o lantern outline width/.code = \def\pingu@x@jackolantern@outline@w{#1},
- jack o lantern height/.code = \def\pingu@x@jackolantern@height{#1},
- jack o lantern width/.code = \def\pingu@x@jackolantern@width{#1},
- jack o lantern position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@jackolantern@angle{#1}\def\pingu@x@jackolantern@xshift{#2}\def\pingu@x@jackolantern@yshift{#3}\def\pingu@x@jackolantern@scale{#4}}
-}{jack o lantern position={-9:(3.15mm,.95mm){1.3}},jack o lantern stripe a=pingu@black,jack o lantern stripe b=\pingu@color@jackolantern@stripe@a,jack o lantern stripe c=\pingu@color@jackolantern@stripe@b,jack o lantern back stripe a=pingu@black,jack o lantern back stripe b=\pingu@color@jackolantern@stripe@a,jack o lantern back stripe c=\pingu@color@jackolantern@stripe@b,jack o lantern outline=pingu@black,jack o lantern outline width=.7pt,jack o lantern stalk=pingu@green!95!\pingu@color@jackolantern!45!pingu@black,jack o lantern stalk top=\pingu@color@jackolantern@stalk!95!pingu@black,jack o lantern background=\pingu@color@jackolantern!85!pingu@black,jack o lantern height=5.5mm,jack o lantern width=5.75mm}
-
-\def\pingu@jackolantern@outerpath{(0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) arc(-60:86:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend right=3] ++(-3.75mm,0) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend left=5] cycle;}
-\def\pingu@x@jackolantern{(-5.15mm,.6mm) to[bend right] ++(1.5mm,-.5mm) -- ++(.33mm,.33mm) to[bend right=10] ++(1.5mm,0) -- ++(.66mm,-.75mm) -- ++(.66mm,.75mm) to[bend right=10] ++(1.5mm,0) -- ++(.33mm,-.33mm) to[bend right] ++(1.5mm,.5mm) to[bend left] ++(-1.5mm,-2.15mm) to[bend left=10] ++(-.33mm,.33mm) to[bend left=10] ++(-1.5mm,0) -- ++(-.66mm,-.5mm) -- ++(-.66mm,.5mm) to[bend left=10] ++(-1.5mm,0) -- ++(-.33mm,-.33mm) to[bend left] cycle}
-
-\def\pingu@x@jackolantern@eye@left{(0.9mm,2mm) -- ++(2mm,-.15mm) to[bend right=40] ++(-.5mm,2mm) -- cycle}
-\def\pingu@x@jackolantern@eye@right{(-3mm,2mm) -- ++(-2mm,-.15mm) to[bend left=40] ++(.5mm,2mm) -- cycle}
-\def\pingu@x@jackolantern@nose{(0.965mm*0.5-3.225mm*0.5,1mm) -- ++(1mm,1.2mm) to[bend right=10] ++(-2mm,0) -- cycle}
-
-\def\pingu@draw@ea@jackolantern{%
-\scope[rotate around={\pingu@x@jackolantern@angle:(\pingu@name-head-top)},%
-shift={(\pingu@name-head-top)},
-shift={(\pingu@x@jackolantern@xshift,\pingu@x@jackolantern@yshift)},
-scale=\pingu@x@jackolantern@scale]
-\scope
-\pgfinterruptboundingbox
-\path[pingu@invclip]\pingu@x@jackolantern \pingu@x@jackolantern@eye@left \pingu@x@jackolantern@eye@right \pingu@x@jackolantern@nose;
- % give it a small cut
- \pingu@block{\pingu@color@jackolantern} (0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pkll) arc(-60:86: {\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pkl) to[bend right=3] coordinate[pos=.5] (@pkuc) coordinate[pos=.225] (@pksl) coordinate[pos=.775] (@pksr) ++(-3.75mm,0) coordinate (@pkr) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pklr) to[bend left=5] coordinate[pos=.5] (@pklc) cycle;
- \pingu@draw[line join=round,line width=\pingu@x@jackolantern@outline@w]{\pingu@color@jackolantern@outline} \pingu@jackolantern@outerpath;
-\endpgfinterruptboundingbox
-\scope
-\clip (0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) arc(-60:86:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend right=3] ++(-3.75mm,0) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend left=5] cycle;
- \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@a} (@pklr) to[bend left=42] (@pkr);
- \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@c} (@pkll) to[bend right=54] (@pkl);
- \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@b} (@pklc) to[bend right=6] (@pkuc);
-\endscope
-\endscope
- \pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@eye@left;
- \pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@eye@right;
-
- \pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@nose;
-
- \pingu@draw[fill=\pingu@color@jackolantern@background]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern;
- \scope
- \clip\pingu@x@jackolantern \pingu@x@jackolantern@eye@left \pingu@x@jackolantern@eye@right \pingu@x@jackolantern@nose;
- \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@a} ([xshift=1.6mm]@pklr) to[bend left=18] (@pkr);
- \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@c} ([xshift=-1.6mm]@pkll) to[bend right=22] (@pkl);
- \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@b} (@pklc) to[bend right=1] (@pkuc);
- \endscope
- \pingu@block{\pingu@color@jackolantern@stalk} ([yshift=-.5*\pingu@x@jackolantern@outline@w]@pksl) to[bend left=3] ([yshift=-.5*\pingu@x@jackolantern@outline@w]@pksr) to[bend right=8] ++(.85mm,2mm) -- ++(.65mm,0) coordinate[pos=.5] (@pkc) to[bend right=3] cycle;
-\pingu@block{\pingu@color@jackolantern@stalk@top} (@pkc) ellipse[x radius=.65mm/2, y radius=.085mm];
-\endscope
-}
-
-\pingu@create@wing@extra{hammer}{%
- hammer \@lr/.code = {\pingu@set@extra{hammer\@lr}{true}\pingu@color{hammer\@lr}{##1}},
- hammer \@lr/.default = pingu@silver,
- hammer \@lr\space handle length/.code = \expandafter\def\csname pingu@hammer@\@lr @length\endcsname{##1},
- hammer \@lr\space handle shift/.code = \expandafter\def\csname pingu@hammer@\@lr @shift\endcsname{##1},
- hammer \@lr\space width/.code = \expandafter\def\csname pingu@hammer@\@lr @width\endcsname{##1},
- hammer \@lr\space height/.code = \expandafter\def\csname pingu@hammer@\@lr @height\endcsname{##1},
- hammer \@lr\space xshift/.code = \expandafter\def\csname pingu@hammer@\@lr @xshift\endcsname{##1},
- hammer \@lr\space yshift/.code = \expandafter\def\csname pingu@hammer@\@lr @yshift\endcsname{##1},
- hammer \@lr\space handle/.code = \pingu@color{hammer@\@lr @handle}{##1},%
- hammer \@lr\space with knob/.style = {hammer \@lr=##1, hammer \@lr\space handle length=\dimexpr9mm+\csname pingu@hammer@\@lr @height\endcsname+.5mm,hammer \@lr\space yshift=\dimexpr-.5mm-\csname pingu@hammer@\@lr @height\endcsname},
- hammer \@lr\space with knob/.default = pingu@silver
-}{hammer \@lr\space handle length=9mm, hammer \@lr\space handle=pingu@bronze, hammer \@lr\space handle shift=-4mm, hammer \@lr\space width=7mm,hammer \@lr\space height=3.5mm, hammer \@lr\space xshift=-0.5*\csname pingu@hammer@\@lr @width\endcsname,hammer \@lr\space yshift=-1mm}
-\def\pingu@draw@wi@hammer#1{%
- \pingu@setup@wing{hammer}{#1}%
-\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
-% \csname pingu@color@hammer#1\endcsname
- \pingu@block{\csname pingu@color@hammer@#1@handle\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,\csname pingu@hammer@#1@shift\endcsname) -- ++(0,\csname pingu@hammer@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-hammer-#1-top) -- ++(0,-\csname pingu@hammer@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
- \pingu@block[rounded corners=2pt]{\csname pingu@color@hammer#1\endcsname} (\pingu@name-hammer-#1-top)++(\csname pingu@hammer@#1@xshift\endcsname,\csname pingu@hammer@#1@yshift\endcsname) rectangle ++(\csname pingu@hammer@#1@width\endcsname,\csname pingu@hammer@#1@height\endcsname);
-\endscope
-}
-
-\pingu@create@wing@extra{plank}{%
- plank \@lr/.code = {\pingu@set@extra{plank\@lr}{true}\pingu@color{plank\@lr}{##1}},
- plank \@lr/.default = pingu@bronze!80!pingu@black,
- plank \@lr\space width/.code = \expandafter\def\csname pingu@plank@\@lr @width\endcsname{##1},
- plank \@lr\space height/.code = \expandafter\def\csname pingu@plank@\@lr @height\endcsname{##1},
- plank \@lr\space xshift/.code = \expandafter\def\csname pingu@plank@\@lr @xshift\endcsname{##1},
- plank \@lr\space yshift/.code = \expandafter\def\csname pingu@plank@\@lr @yshift\endcsname{##1}
-}{plank \@lr\space width=7mm,plank \@lr\space height=16.5mm, plank \@lr\space xshift=0mm,plank \@lr\space yshift=-1mm}
-\def\pingu@draw@wi@plank#1{%
- \pingu@setup@wing{plank}{#1}%
-\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
-\pingu@block[rounded corners=2pt]{\@col}([xshift=\csname pingu@plank@#1@xshift\endcsname,yshift=\csname pingu@plank@#1@yshift\endcsname]\pingu@name-wing-#1)++({-.5*(\csname pingu@plank@#1@width\endcsname)},{-.5*(\csname pingu@plank@#1@height\endcsname)}) rectangle ++({\csname pingu@plank@#1@width\endcsname},{\csname pingu@plank@#1@height\endcsname});
-\endscope
-}
-
-% \usetikzlibrary{spy}
-
-\pingu@create@wing@extra{magnifier}{%
- magnifier \@lr/.code = {\pingu@set@extra{magnifier\@lr}{true}\pingu@color{magnifier\@lr}{##1}}, % \noexpand\tikzset{/pingu/@pingu/.append style={spy scope={circle,draw,magnification=4,size=1cm}}}
- magnifier \@lr/.default = pingu@bronze,
- magnifier \@lr\space handle length/.code = \expandafter\def\csname pingu@magnifier@\@lr @length\endcsname{##1},
- magnifier \@lr\space handle shift/.code = \expandafter\def\csname pingu@magnifier@\@lr @shift\endcsname{##1},
- magnifier \@lr\space size/.code = \expandafter\def\csname pingu@magnifier@\@lr @size\endcsname{##1},
- magnifier \@lr\space glass/.code = \pingu@color{magnifier@\@lr @glass}{##1},
- magnifier \@lr\space opacity/.code = \expandafter\def\csname pingu@magnifier@\@lr @opacity\endcsname{##1},
- magnifier \@lr\space thick/.code = \expandafter\def\csname pingu@magnifier@\@lr @thick\endcsname{##1},
- magnifier \@lr\space xshift/.code = \expandafter\def\csname pingu@magnifier@\@lr @xshift\endcsname{##1},
- magnifier \@lr\space yshift/.code = \expandafter\def\csname pingu@magnifier@\@lr @yshift\endcsname{##1},
- magnifier \@lr\space handle/.code = \pingu@color{magnifier@\@lr @handle}{##1}%
-}{magnifier \@lr\space handle length=3.5mm, magnifier \@lr\space handle shift=-4mm, magnifier \@lr\space xshift=0mm,magnifier \@lr\space yshift=1mm,magnifier \@lr\space size=2.5mm,magnifier \@lr\space thick=.5mm,magnifier \@lr\space glass=pingu@blue!90!pingu@yellow,magnifier \@lr\space opacity=0.24}
-\def\pingu@draw@wi@magnifier#1{%
- \pingu@setup@wing{magnifier}{#1}%
- \scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
-% \csname pingu@color@magnifier#1\endcsname
- \path ([yshift=\csname pingu@magnifier@#1@yshift\endcsname+\csname pingu@magnifier@#1@size\endcsname,xshift=\csname pingu@magnifier@\@lr @xshift\endcsname]\pingu@name-wing-#1) coordinate (@);
-
- % \spy[draw=green] on (@) in node at (@);
-% \pgfonlayer{foreground}
- \pingu@block[even odd rule]{\@col} (@) circle[radius=\csname pingu@magnifier@#1@size\endcsname] circle[radius=\csname pingu@magnifier@#1@size\endcsname-\csname pingu@magnifier@#1@thick\endcsname];
-
- \pingu@block[opacity=\csname pingu@magnifier@#1@opacity\endcsname]{\csname pingu@color@magnifier@#1@glass\endcsname} (@) circle[radius=\csname pingu@magnifier@#1@size\endcsname-\csname pingu@magnifier@#1@thick\endcsname];
-
- \pingu@block{\@col} % TODO: adapt size
- (@) ([shift={(-70:2.5mm)}]@) to[out=230,in=90] ++(-.5mm,-\csname pingu@magnifier@#1@length\endcsname) arc(360:180:.33mm) to[out=90,in=-50] ++(-.5mm,\csname pingu@magnifier@#1@length\endcsname);%
-% \endpgfonlayer
-\endscope
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-glasses.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-glasses.lib.tex
deleted file mode 100644
index 609adcb71d..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-glasses.lib.tex
+++ /dev/null
@@ -1,105 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{glasses}{%
- glasses/.code = \pingu@set@extra{glasses}{true}\pingu@color{glasses}{#1},
- glasses/.default = pingu@black,
- glasses left fill/.code = \pingu@color{glasses@fill@l}{#1},
- glasses right fill/.code = \pingu@color{glasses@fill@r}{#1},
- glasses left opacity/.code = \def\pingu@x@glasses@op@l{#1},
- glasses right opacity/.code = \def\pingu@x@glasses@op@r{#1},
- glasses fill/.style = {/pingu/glasses left fill=#1, /pingu/glasses right fill=#1},
- glasses opacity/.style = {/pingu/glasses left opacity=#1, /pingu/glasses right opacity=#1},
- glasses line width/.code = \def\pingu@x@glasses@lw{#1},
- sunglasses/.forward to = /pingu/sun glasses,
- glasses bend left/.code = \def\pingu@x@glasses@bend@l{#1},
- glasses bend right/.code = \def\pingu@x@glasses@bend@r{#1},
- glasses bend/.style = {/pingu/glasses bend left=#1,/pingu/glasses bend right=#1},
- sun glasses/.style = {/pingu/glasses, /pingu/glasses fill=#1},
- sun glasses/.default = pingu@black,
-}{glasses line width=1.125\p@,glasses fill=\@pingu@none,glasses opacity=.825,glasses bend left=32.5,glasses bend right=32.5}
-
-\def\pingu@draw@ea@glasses{% fact: 1.33; modified first shift and ht
- \pingu@block[opacity=\pingu@x@glasses@op@l]{\pingu@color@glasses@fill@l} (\pingu@name-eye-left)++(-2.66mm,1.75mm) to[bend left=8] ++(5.586mm,0) to[out=-80,in=70] ++(-.266mm,-3.6mm) to[bend left=\pingu@x@glasses@bend@l] ++(-4.8545mm,\z@) to[out=135,in=-90] ++(-1.064mm,3.5mm) -- cycle;
- \pingu@block[opacity=\pingu@x@glasses@op@r]{\pingu@color@glasses@fill@r} (\pingu@name-eye-right)++(2.66mm,1.75mm) to[bend right=8] ++(-5.586mm,0) to[out=-100,in=110] ++(.266mm,-3.6mm) to[bend right=\pingu@x@glasses@bend@r] ++(4.8545mm,\z@) to[out=45,in=-90] ++(1.064mm,3.5mm) -- cycle;
- \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} [rounded corners=.25mm](\pingu@name-eye-left)++(-2.66mm,1.75mm) coordinate (\pingu@name-glasses-left-mid) to[bend left=8] ++(5.586mm,0) coordinate (\pingu@name-glasses-left-outer) to[out=-80,in=70] ++(-.266mm,-3.6mm) to[bend left=\pingu@x@glasses@bend@l] ++(-4.8545mm,\z@) to[out=135,in=-90] coordinate[pos=.9] (\pingu@name-glasses-left-mid-b) ++(-1.064mm,3.5mm) -- cycle;
- \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} [rounded corners=.25mm] (\pingu@name-eye-right)++(2.66mm,1.75mm) coordinate (\pingu@name-glasses-right-mid) to[bend right=8] ++(-5.586mm,0) coordinate (\pingu@name-glasses-right-outer) to[out=-100,in=110] ++(.266mm,-3.6mm) to[bend right=\pingu@x@glasses@bend@r] ++(4.8545mm,\z@) to[out=45,in=-90] coordinate[pos=.9] (\pingu@name-glasses-right-mid-b) ++(1.064mm,3.5mm) -- cycle;
- \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} (\pingu@name-glasses-right-mid) to[bend right=10] (\pingu@name-glasses-left-mid);
- \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} (\pingu@name-glasses-right-mid-b) to[bend left=20] (\pingu@name-glasses-left-mid-b);
- \scope
- \clip[use path=\pingu@upperpingu];
- \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses}
- (\pingu@name-glasses-right-mid) to[bend right=8] ++(-5.586mm,0) -- ++(-5mm,.5mm);
- \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses}
- (\pingu@name-glasses-left-mid) to[bend left=8] ++(5.586mm,0) -- ++(5mm,.5mm);
- \endscope
-}
-\pingu@create@extra{glassesround}{%
- glasses round/.code = \pingu@set@extra{glassesround}{true}\pingu@color{glassesround}{#1},
- glasses round/.default = pingu@black,
- glasses round left fill/.code = \pingu@color{glassesround@fill@l}{#1},
- glasses round right fill/.code = \pingu@color{glassesround@fill@r}{#1},
- glasses round fill/.style = {/pingu/glasses round left fill=#1, /pingu/glasses round right fill=#1},
- glasses round left opacity/.code = \def\pingu@x@glassesround@op@l{#1},
- glasses round right opacity/.code = \def\pingu@x@glassesround@op@r{#1},
- glasses round opacity/.style = {/pingu/glasses round left opacity=#1, /pingu/glasses round right opacity=#1},
- glasses round left radius/.code = \def\pingu@x@glassesround@r@l{#1},
- glasses round right radius/.code = \def\pingu@x@glassesround@r@r{#1},
- glasses round radius/.style = {/pingu/glasses round left radius=#1, /pingu/glasses round right radius=#1},
- glasses round line width/.code = \def\pingu@x@glassesround@lw{#1},
- sunglasses round/.forward to = /pingu/sun glasses round,
- sun glasses round/.style = {/pingu/glasses round, /pingu/glasses round fill=#1},
- sun glasses round/.default = pingu@black,
- % todo: width/radius allow for different
-}{glasses round line width=.75\p@,glasses round fill=\@pingu@none,glasses round opacity=.825,glasses round radius=3.15mm}
-\def\pingu@draw@ea@glassesround{% fact: 1.33; modified first shift and ht
- \pingu@block[opacity=\pingu@x@glassesround@op@l]{\pingu@color@glassesround@fill@l} (\pingu@name-eye-left) circle [radius=\pingu@x@glassesround@r@l];
- \pingu@block[opacity=\pingu@x@glassesround@op@r]{\pingu@color@glassesround@fill@r} (\pingu@name-eye-right) circle [radius=\pingu@x@glassesround@r@r];
- \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} [rounded corners=.25mm](\pingu@name-eye-left) ++(150:\pingu@x@glassesround@r@l) coordinate (\pingu@name-glassesround-left-mid) arc (150:510:\pingu@x@glassesround@r@l);
- \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} [rounded corners=.25mm] (\pingu@name-eye-right) ++(30:\pingu@x@glassesround@r@r) coordinate (\pingu@name-glassesround-right-mid) arc (30:390:\pingu@x@glassesround@r@r);
- \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} (\pingu@name-glassesround-left-mid) to[bend right=30] (\pingu@name-glassesround-right-mid);
- \scope
- \clip[use path=\pingu@upperpingu];
- \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround}
- (\pingu@name-glassesround-right-mid) arc(30:150:\pingu@x@glassesround@r@l) -- ++(-5mm,.65mm);
- \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround}
- (\pingu@name-glassesround-left-mid) arc(150:30:\pingu@x@glassesround@r@r) -- ++(5mm,.65mm);
- \endscope
-}
-\pingu@create@extra{monocleleft}{%
- monocle left/.code = \pingu@set@extra{monocleleft}{true}\pingu@color{monocleleft}{#1},
- monocle left/.default = pingu@black,
- monocle left glass/.code = \pingu@color{monocleleft@glass}{#1},
- monocle left fill/.forward to = /pingu/monocle left glass,
- monocle left opacity/.code = \def\pingu@x@monocleleft@opacity{#1},
- monocle left fill opacity/.forward to = /pingu/monocle left opacity,
- monocle left string/.code = \pingu@color{monocleleft@string}{#1},
- monocle left string length/.code= \def\pingu@x@monocleleft@string@l{#1},
- monocle left blob/.code = \pingu@color{monocleleft@blob}{#1},
-}{monocle left glass=pingu@blue,monocle left opacity=.155,monocle left string=\pingu@color@monocleleft,monocle left blob=\pingu@color@monocleleft,monocle left string length=5.55mm}
-
-\def\pingu@draw@eb@monocle@l{%
- \pingu@block[/pingu/glow,opacity=\pingu@x@monocleleft@opacity]{\pingu@color@monocleleft@glass} (\pingu@name-eye-left) circle[radius=2mm];
- \pingu@draw[thin]{\pingu@color@monocleleft@string} (\pingu@name-eye-left)++(2mm,0)
- to[out=-75,in=100] ++(0,-\pingu@x@monocleleft@string@l);
- \pingu@block{\pingu@color@monocleleft@blob} (\pingu@name-eye-left)++(2mm,-\pingu@x@monocleleft@string@l) circle [radius=.65\p@];
- \pingu@draw[semithick]{\pingu@color@monocleleft} (\pingu@name-eye-left) circle[radius=2mm];
-}
-\pingu@create@extra{monocleright}{%
- monocle right/.code = \pingu@set@extra{monocleright}{true}\pingu@color{monocleright}{#1},
- monocle right/.default = pingu@black,
- monocle right glass/.code = \pingu@color{monocleright@glass}{#1},
- monocle right fill/.forward to = /pingu/monocle right glass,
- monocle right opacity/.code = \def\pingu@x@monocleright@opacity{#1},
- monocle right fill opacity/.forward to = /pingu/monocle right opacity,
- monocle right string/.code = \pingu@color{monocleright@string}{#1},
- monocle right string length/.code= \def\pingu@x@monocleright@string@r{#1},
- monocle right blob/.code = \pingu@color{monocleright@blob}{#1},
-}{monocle right glass=pingu@blue,monocle right opacity=.155,monocle right string=\pingu@color@monocleright,monocle right blob=\pingu@color@monocleright,monocle right string length=5.55mm}
-\def\pingu@draw@eb@monocle@r{%
- \pingu@block[/pingu/glow,opacity=\pingu@x@monocleright@opacity]{\pingu@color@monocleright@glass} (\pingu@name-eye-right) circle[radius=2mm];
- \pingu@draw[thin]{\pingu@color@monocleright@string} (\pingu@name-eye-right)++(-2mm,0)
- to[out=-105,in=80] ++(0,-\pingu@x@monocleright@string@r);
- \pingu@block{\pingu@color@monocleright@blob} (\pingu@name-eye-right)++(-2mm,-\pingu@x@monocleright@string@r) circle [radius=.65\p@];
- \pingu@draw[semithick]{\pingu@color@monocleright} (\pingu@name-eye-right) circle[radius=2mm];
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-hats.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-hats.lib.tex
deleted file mode 100644
index f37d2c3363..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-hats.lib.tex
+++ /dev/null
@@ -1,173 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{strawhat}{%
- % extra strawhat (tikzducks basis)
- straw hat/.forward to = /pingu/strawhat,
- strawhat/.default = brown!50!white,
- strawhat/.code = \pingu@set@extra{strawhat}{true}\pingu@color{strawhat}{#1},
- straw hat ribbon/.forward to = /pingu/strawhat ribbon,
- strawhat ribbon/.code = \pingu@color{strawhat@ribbon}{#1},
- straw hat position/.forward to= /pingu/strawhat position,
- strawhat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@strawhat@angle{#1}\def\pingu@x@strawhat@xshift{#2}\def\pingu@x@strawhat@yshift{#3}\def\pingu@x@strawhat@scale{#4}},
-}{strawhat ribbon= gray!85!black,strawhat position={-26.5:(-.185cm,.14cm){1.375}}}
-
-\def\pingu@draw@ea@strawhat{%
-\scope[rotate around={\pingu@x@strawhat@angle:(\pingu@name-head)},shift={(\pingu@name-head)},shift={(\pingu@x@strawhat@xshift,\pingu@x@strawhat@yshift)},scale=\pingu@x@strawhat@scale]
-\pingu@block{\pingu@color@strawhat} (.34cm,0) ellipse[x radius=.75cm, y radius=\pingu@one];
-\pingu@block{\pingu@color@strawhat} (0,.5mm) rectangle (.68cm,5mm);
-\pingu@block{\pingu@color@strawhat} (.34cm,5mm) ellipse[x radius=.34cm, y radius=.8mm];
-\pingu@block{\pingu@color@strawhat} (-.3955cm,.2mm) -- (1.0755cm,.2mm) -- (.68cm,2mm) -- (0,2mm) -- cycle;
-\pingu@block{\pingu@color@strawhat@ribbon} (.34cm,2mm) ellipse[x radius=.34cm, y radius=.8mm];
-\pingu@block{\pingu@color@strawhat@ribbon} (0,2mm) rectangle (.68cm,3mm);
-\pingu@block{\pingu@color@strawhat} (.34cm,3mm) ellipse[x radius=.34cm, y radius=.8mm];
-\endscope}
-
-\pingu@create@extra{hat}{%
- hat/.default = pingu@black!90!black,
- hat/.code = \pingu@set@extra{hat}{true}\pingu@color{hat}{#1},
- hat base/.code = \pingu@color{hat@base}{#1},
- hat coronal/.code = \pingu@color{hat@coronal}{#1},
- hat ribbon/.code = \pingu@color{hat@ribbon}{#1},
- hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@hat@angle{#1}\def\pingu@x@hat@xshift{#2}\def\pingu@x@hat@yshift{#3}\def\pingu@x@hat@scale{#4}},
-}{hat position={-2:(.35mm,0)1},hat base=\pingu@color@hat,hat coronal=\pingu@color@hat!91!white,hat ribbon=\pingu@color@hat!87!white}
-
-\newdimen\pingu@hat@w@half \pingu@hat@w@half=.925cm
-\newdimen\pingu@hat@h \pingu@hat@h=.625cm
-\def\pingupathhatupper{[rounded corners=.25mm](-.65cm,-.25cm) to[out=90,in=200] ++(.35cm,\pingu@hat@h) to[bend left=11] ++(.25cm,0) to[bend right=2.5] ++(\pingu@one,0) to[bend left=11] ++(.25cm,0) to[out=-20,in=90] ++(.35cm,-\pingu@hat@h) to[bend left=12] (-.65cm,-.25cm) -- cycle}
-\def\pingu@draw@ea@hat{%
-\scope[rotate around={\pingu@x@hat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@hat@xshift,\pingu@x@hat@yshift)},scale=\pingu@x@hat@scale]
-\pingu@block[/pingu/@draw=\pingu@color@hat@coronal,thick]{\pingu@color@hat@base} (0,-.25cm)++(180:\pingu@hat@w@half{} and .15cm) arc (180:360:\pingu@hat@w@half{} and .15cm) arc (0:180:\pingu@hat@w@half{} and .115cm) -- cycle;
-\pingu@block{\pingu@color@hat} \pingupathhatupper;
-\scope
-\clip\pingupathhatupper;
-\pingu@block{\pingu@color@hat@ribbon} (\z@,.2mm) ellipse [x radius=.95\pingu@hat@w@half, y radius=.13cm];
-\pingu@block{\pingu@color@hat} (\z@,.134cm) ellipse [x radius=.95\pingu@hat@w@half, y radius=.13cm];
-\endscope\endscope}
-
-\pingu@create@extra{cap}{%
- cap/.default = pingu@bronze,
- cap/.code = \pingu@set@extra{cap}{true}\pingu@color{cap}{#1},
- cap padding/.code = {\def\pingu@x@cap@padding{#1}},
- cap extra height/.code = {\def\pingu@x@cap@height{#1}},
-}{cap padding=.8mm, cap extra height=0pt}
-
-\def\pingu@draw@ea@cap{%
-\pingu@layer{foreground}[]
-\pingu@block[rounded corners=.7mm]{\pingu@color@cap} ([xshift=.25mm]\pingu@name-wing-left-start) to[bend left=4] ([xshift=-\pingu@x@cap@padding]\pingu@name-wings-side-left) to[bend right=3]
-([yshift=\pingu@x@cap@height]\pingu@name-head)
-to[bend right=3]
-([xshift=\pingu@x@cap@padding]\pingu@name-wings-side-right) [rounded corners=.15mm] to[bend left=4] ([xshift=-.25mm]\pingu@name-wing-right-start)
-to[bend left=8]
-([xshift=-\pingu@x@cap@padding]\pingu@name-wings-side-right)
-[rounded corners=.15mm]
-to[bend left=32] ++(\pingu@w@half+\pingu@x@cap@padding,\pingu@w@half+\pingu@one)
-to[bend left=32] ++(\pingu@w@half+\pingu@x@cap@padding,-\pingu@w@half-\pingu@one)
-to[bend left=8] cycle;
-\endpingu@layer
-}
-
-\pingu@create@extra{constructionhelmet}{%
- construction helmet/.default = pingu@yellow,
- construction helmet/.code = \pingu@set@extra{constructionhelmet}{true}\pingu@color{constructionhelmet}{#1},
- construction helmet padding/.code = {\def\pingu@x@constructionhelmet@padding{#1}},
- construction helmet extra height/.code = {\def\pingu@x@constructionhelmet@height{#1}},
- construction helmet position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@constructionhelmet@angle{#1}\def\pingu@x@constructionhelmet@xshift{#2}\def\pingu@x@constructionhelmet@yshift{#3}\def\pingu@x@constructionhelmet@scale{#4}},
-}{construction helmet padding=.325cm, construction helmet extra height=0pt,construction helmet position={-.5:(.05mm,-1.25mm)1}}
-
-\newdimen\pingu@constructionhelmet@w@half \pingu@constructionhelmet@w@half=.85cm
-\def\pingu@draw@ea@constructionhelmet{%
-\scope[rotate around={\pingu@x@constructionhelmet@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@constructionhelmet@xshift,\pingu@x@constructionhelmet@yshift)},scale=\pingu@x@constructionhelmet@scale]
-\pingu@block{\pingu@color@constructionhelmet} (0,-.25cm)++(180:\pingu@constructionhelmet@w@half{} and \pingu@x@constructionhelmet@padding) arc (180:360:\pingu@constructionhelmet@w@half{} and \pingu@x@constructionhelmet@padding) arc (0:180:\pingu@constructionhelmet@w@half{} and .2cm) -- cycle;
-\scope
-\pingu@block{\pingu@color@constructionhelmet!93!pingu@black} (0,-.25cm)++(0:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (0:180:{.95\pingu@constructionhelmet@w@half} and .675cm) coordinate[pos=.212] (@a) coordinate[pos=.256] (@aa) coordinate[pos=.788] (@b) coordinate[pos=.744] (@bb) arc (180:360:{.95\pingu@constructionhelmet@w@half} and .125cm) -- cycle;
-\clip (0,-.25cm)++(0:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (0:180:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (180:360:{.95\pingu@constructionhelmet@w@half} and .125cm) -- cycle;
-\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.75mm,-.25cm-.125cm) to[bend left=1] ++ (0,.675cm+.125cm) -- ++(1.5mm,0) to[bend right=1] ++(0,-.675cm-.125cm) -- cycle;
-\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.95mm,-.25cm-.125cm) to[bend left=3] ++ (-8mm,.675cm+.125cm) -- ++(1.5mm,0) to[bend right=3] ++(8mm,-.675cm-.125cm) -- cycle;
-\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.55mm,-.25cm-.125cm) to[bend right=3] ++ (8mm,.675cm+.125cm) -- ++(1.5mm,0) to[bend left=3] ++(-8mm,-.675cm-.125cm) -- cycle;
-\endscope
-% get the 3d wobbles
-\pingu@block[rounded corners=.03mm]{\pingu@color@constructionhelmet!99!pingu@black} (-.75mm,-.25cm+.675cm-.25mm) -- ++(0,.3mm) -| ++(1.5mm,-.3mm) -- cycle;
-\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (@a) to[bend right=14] (@aa);
-\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (@bb) to[bend right=14] (@b);
-\endscope
-}
-
-\pingu@create@extra{conicalhat}{%
- conical hat/.default = pingu@bronze,
- conical hat/.code = \pingu@set@extra{conicalhat}{true}\pingu@color{conicalhat}{#1},
- conical hat rounding/.code = {\def\pingu@x@conicalhat@rounding{#1}},
- conical hat shade/.code = {\def\pingu@x@conicalhat@shade{#1}},
- conical hat height/.code = {\def\pingu@x@conicalhat@height{#1}},
- conical hat width/.code = {\def\pingu@x@conicalhat@width{#1}},
- conical hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@conicalhat@angle{#1}\def\pingu@x@conicalhat@xshift{#2}\def\pingu@x@conicalhat@yshift{#3}\def\pingu@x@conicalhat@scale{#4}},
-}{conical hat position={-15:(2mm,-3mm)1}, conical hat height=8mm, conical hat width=2.25cm,conical hat shade=\pingu@color@conicalhat!80!pingu@black, conical hat rounding=.4pt}
-
-\def\pingu@draw@ea@conicalhat{%
-\scope[rotate around={\pingu@x@conicalhat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@conicalhat@xshift,\pingu@x@conicalhat@yshift)},scale=\pingu@x@conicalhat@scale]
-
-\pingu@layer{background}[]
-\pingu@block[rounded corners=\pingu@x@conicalhat@rounding]{\pingu@x@conicalhat@shade} (0,-.22cm)++(180:{\pingu@x@conicalhat@width/2+.05mm} and 1mm) coordinate (@) arc (180:360:{\pingu@x@conicalhat@width/2+.05mm} and 1mm) -- ++(.15mm,.3mm) to[bend right=5] ++(-\pingu@x@conicalhat@width/2, \pingu@x@conicalhat@height-.025cm) to[bend right=5] ([xshift=-.15mm,yshift=.3mm]@) -- cycle;
-\endpingu@layer
-
-\pingu@block[rounded corners=\pingu@x@conicalhat@rounding]{\pingu@color@conicalhat} (0,-.25cm)++(180:\pingu@x@conicalhat@width/2 and 1mm) coordinate (@) arc (180:0:\pingu@x@conicalhat@width/2 and 1mm) -- ++(.225mm,.6mm) to[bend right=5] ++(-\pingu@x@conicalhat@width/2, \pingu@x@conicalhat@height) to[bend right=5] ([xshift=-.225mm,yshift=.6mm]@) -- cycle;
-\endscope
-}
-
-\pingu@create@extra{witchhat}{%
- witch hat/.code = \pingu@set@extra{witchhat}{true}\pingu@color{witchhat}{#1},
- witch hat/.default = pingu@purple!40!black,
- witch hat base/.code = \pingu@color{witchhat@base}{#1},
- witch hat coronal/.code = \pingu@color{witchhat@coronal}{#1},
- witch hat ribbon/.code = \pingu@color{witchhat@ribbon}{#1},
- witch hat band/.code = \pingu@color{witchhat@band}{#1},
- witch hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@witchhat@angle{#1}\def\pingu@x@witchhat@xshift{#2}\def\pingu@x@witchhat@yshift{#3}\def\pingu@x@witchhat@scale{#4}},
-}{witch hat position={-7:(.625mm,.45mm){1.15}},witch hat base=\pingu@color@witchhat,witch hat coronal=\pingu@color@witchhat!91!white,witch hat ribbon=\pingu@color@witchhat!87!white,witch hat band=!hide}
-
-\newdimen\pingu@witchhat@w@half \pingu@witchhat@w@half=1.125cm
-\newdimen\pingu@witchhat@h \pingu@witchhat@h=1.3cm
-\def\pingupathwitchhatupper{[rounded corners=.65mm](-.625cm,-.25cm) -- ++(.8cm,\pingu@witchhat@h-4.5mm) -- ++(6.5mm,4.5mm) -- ++(-1.5mm,-4.5mm) -- ++(-1.25mm,-\pingu@witchhat@h+4.5mm)}
-\def\pingu@draw@ea@witchhat{%
-\scope[rotate around={\pingu@x@witchhat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@witchhat@xshift,\pingu@x@witchhat@yshift)},scale=\pingu@x@witchhat@scale]
-\pingu@draw[semithick]{\pingu@color@witchhat@band} (-.615cm,-.25cm) to[out=-100,in=180] ++(.5cm,-1.1cm) to[bend right=5] ++(3.5mm,.1mm) to[out=0,in=-78] ++(.433cm,1.1cm);
-\pingu@block[/pingu/@draw=\pingu@color@witchhat@coronal,thick]{\pingu@color@witchhat@base} (0,-.25cm)++(180:\pingu@witchhat@w@half{} and .15cm) arc (180:360:\pingu@witchhat@w@half{} and .15cm) arc (0:180:\pingu@witchhat@w@half{} and .115cm) -- cycle;
-\pingu@block{\pingu@color@witchhat} \pingupathwitchhatupper;
-\clip\pingupathwitchhatupper;
-\pingu@block{\pingu@color@witchhat@ribbon} (\z@,.2mm) ellipse [x radius=.95\pingu@witchhat@w@half, y radius=.12cm];
-\pingu@block{\pingu@color@witchhat} (\z@,.134cm) ellipse [x radius=.95\pingu@witchhat@w@half, y radius=.12cm];
-\endscope
-}
-
-
-\pingu@create@extra{mitra}{%
- mitra/.default = pingu@red!67!pingu@black,%pingu@black!90!black,
- mitra/.code = \pingu@set@extra{mitra}{true}\pingu@color{mitra}{#1},
- mitra height/.code = {\def\pingu@x@mitra@height{#1}},
- mitra background/.code = \pingu@color{mitra@background}{#1},
- mitra overset/.code = {\def\pingu@x@mitra@overset{#1}},
- mitra lower angle/.code = {\def\pingu@x@mitra@lowerangle{#1}},
- mitra upper angle/.code = {\def\pingu@x@mitra@upperangle{#1}},
- mitra lower band/.code = \pingu@color{mitra@lower@band}{#1},
- mitra lower band height/.code = {\def\pingu@x@mitra@lowerband@height{#1}},
- mitra upper band/.code = \pingu@color{mitra@upper@band}{#1},
- mitra upper band height/.code = {\def\pingu@x@mitra@upperband@height{#1}},
- mitra center band/.code = \pingu@color{mitra@center@band}{#1},
- mitra center band width/.code = {\def\pingu@x@mitra@centerband@width{#1}},
- mitra position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@mitra@angle{#1}\def\pingu@x@mitra@xshift{#2}\def\pingu@x@mitra@yshift{#3}\def\pingu@x@mitra@scale{#4}},
-}{mitra position={0:(0,0)1},mitra height=1.125cm,mitra overset=1.25mm,mitra lower angle=125,mitra upper angle=-35,mitra lower band=pingu@yellow!75!pingu@black,mitra center band=\pingu@color@mitra@lower@band,mitra lower band height=.2,mitra center band width={2*\pingu@x@mitra@lowerband@height},mitra upper band=\pingu@color@mitra@lower@band,mitra upper band height={1.5*\pingu@x@mitra@lowerband@height},mitra background=\pingu@color@mitra!80!pingu@black}
-
-\newdimen\pingu@mitra@w@half \pingu@mitra@w@half=.625cm
-\def\pingu@x@mitra@path{(0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) [rounded corners=1pt] -- ++(\pingu@x@mitra@overset,.3*\pingu@x@mitra@height) to[out=\pingu@x@mitra@lowerangle,in=\pingu@x@mitra@upperangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half,.7*\pingu@x@mitra@height)
-to[out=180-\pingu@x@mitra@upperangle,in=180-\pingu@x@mitra@lowerangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half,-.7*\pingu@x@mitra@height) [sharp corners] -- cycle}
-\def\pingu@draw@ea@mitra{%
-\scope[rotate around={\pingu@x@mitra@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@mitra@xshift,\pingu@x@mitra@yshift)},scale=\pingu@x@mitra@scale]
-\pingu@block{\pingu@color@mitra@background} (0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) [rounded corners=1pt] -- ++(\pingu@x@mitra@overset,.3*\pingu@x@mitra@height) to[out=\pingu@x@mitra@lowerangle,in=\pingu@x@mitra@upperangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half-.66mm,.7*\pingu@x@mitra@height-.1mm)
-to[out=180-\pingu@x@mitra@upperangle+2,in=180-\pingu@x@mitra@lowerangle-2] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half+.66mm,-.7*\pingu@x@mitra@height+.1mm) [sharp corners] -- cycle;
-\pingu@block{\pingu@color@mitra} \pingu@x@mitra@path;
-% \pingu@block{\pingu@color@mitra} \pingupathmitraupper;
-\scope\clip\pingu@x@mitra@path;
-% TODO: switch to factors non relative to \pingu@x@mitra@overset
-\pingu@block{\pingu@color@mitra@lower@band} (0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) -- ++(\pingu@x@mitra@lowerband@height*\pingu@x@mitra@overset,\pingu@x@mitra@lowerband@height*.3*\pingu@x@mitra@height) arc (0:-180:{\pingu@x@mitra@lowerband@height*\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- cycle;
-\pingu@block{\pingu@color@mitra@center@band} (\pingu@x@mitra@centerband@width*\pingu@x@mitra@overset+.1mm,-.2185cm) to[bend right=4] ++(0,\pingu@x@mitra@height) to[bend right] ++(-2*\pingu@x@mitra@centerband@width*\pingu@x@mitra@overset-.1mm,0) to[bend left=4] ++(0,-\pingu@x@mitra@height) -- cycle;
-\pingu@block{\pingu@color@mitra@upper@band} (0,.3*\pingu@x@mitra@height-.2185cm-0.5*\pingu@x@mitra@upperband@height*.3*\pingu@x@mitra@height)++(180:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) arc (180:360:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- ++(0,\pingu@x@mitra@upperband@height*.3*\pingu@x@mitra@height) arc (0:-180:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- cycle;
-\endscope\endscope} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-horse.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-horse.lib.tex
deleted file mode 100644
index 1fefbf8c48..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-horse.lib.tex
+++ /dev/null
@@ -1,229 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-% TODO: get all of this customizable
-\colorlet{base@a}{lightgray!95!black}
-\colorlet{base@b}{lightgray!79!black}
-
-\colorlet{a}{lightgray!63!black}
-\colorlet{b}{lightgray!81!black}
-\def\basew{12}
-\def\pingu@@horse@scale{.1}
-
-\def\pingu@@horse@@main{(1.275,.55) -- ++(\if@pingu@@horse@@donkey@.05\else.1\fi,.2) -- ++(\if@pingu@@horse@@donkey@-.2\else-.25\fi,.25) to[bend right=4] ++(-.425,1.75) to[bend left=15] ++(.05,.2) to[bend right=30] ++(-.1,1.9) to[bend left=30] ++(0,1.65) coordinate(@back) to[bend left=30] ++(2,.625) to[bend right=18,looseness=.8] ++(3.25,-.1) [rounded corners=2*\pingu@@horse@scale] coordinate(@hair) to[out=34,in=185] ++(3,1.3) to[bend left=19] coordinate[pos=.5](@ear) ++(.85,-.4) to[bend left=5] ++(.24,-.45) to[bend right=20] ++(\if@pingu@@horse@@donkey@.25\else0\fi,\if@pingu@@horse@@donkey@-1.2\else-.7\fi) to[bend left=2] ++(.1,-.55) to[out=-85,in=-60,looseness=.75] ++(\if@pingu@@horse@@donkey@-.55\else-.475\fi,\if@pingu@@horse@@donkey@-.45\else-.35\fi) coordinate(@mouth) to[out=-135,in=-120] ++(\if@pingu@@horse@@donkey@-.4\else-.37\fi,\if@pingu@@horse@@donkey@.2\else.25\fi) -- ++(0,.1)
-to[out=125,in=-68] ++(-.58,.615) coordinate (@mouth-low)
-to[out=215,in=80] ++(-1.25,-2) to[bend left=24] ++(-.65,-1) to[out=258,in=86] ++(-.42,-1.25) to[bend left=3] ++(-.2,-.6) to[bend right=10] ++(-.14,-1.15) to[bend left=2] coordinate[pos=.62] (@hooffront) ++(.355,-.565) to[bend left=15] ++(-.4,-.075) to[bend left=10] ++(-.28,.1) to[bend left=9] ++(.06,.3) to[bend right=9] ++(-.2,.4) to[out=80,in=-80] ++(.138,1.4) to[out=70,in=-103] ++(.2,1.3) to[bend right=10] ++(-.225,.44) coordinate (@frontleg) to[out=196,in=\if@pingu@@horse@@donkey@-65\else-25\fi] ++(-3.3,\if@pingu@@horse@@donkey@.4\else.575\fi) coordinate (@backleg) to[bend right=\if@pingu@@horse@@donkey@16\else10\fi] ++(-.8,\if@pingu@@horse@@donkey@-1.375\else-1.5\fi) to[bend right=\if@pingu@@horse@@donkey@9\else20\fi] ++(.1,-2.35) -- ++(\if@pingu@@horse@@donkey@.1\else.2\fi,-.25)
-coordinate (@hoofback) to[bend right=\if@pingu@@horse@@donkey@9\else8\fi] ++(.15,-.26) to[bend left=10] ++(\if@pingu@@horse@@donkey@-.66\else-.55\fi,\if@pingu@@horse@@donkey@-.15\else-.05\fi) -- cycle}
-
-% #1 is the wing for the color and key assignments
-\def\pingu@@drawer@horse#1{
-% this ensures all coordinates are set in place
-% i know this i inefficient, but atm this is of no greater
-% concern -- i can not use layers as they would clash with that
-% of the penguin and who wants that... no one does!
-% penguins deserve freedom!
-\path \pingu@@horse@@main;
-
-% no we draw "behind" the horse:
-
-% Sockel
-\csname if@pingu@x@horse@#1@base@\endcsname
-\pingu@block[draw=\csname pingu@color@horse#1@base@shade@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@base@shade\endcsname} (4.35-\basew/2,.433) -- ++(0,-.5) arc(180:360:\basew/2 and 1) -- ++(0,.5) arc(360:180:\basew/2 and 1);
-\pingu@block[draw=\csname pingu@color@horse#1@base@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@base\endcsname} (4.35,.433) ellipse[x radius=\basew/2,y radius=1];
-\fi
-% background front leg
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale](@frontleg) to[out=266,in=85] ++(.09,-.5) to[bend left=10] ++(-.15,-.8)
-to[bend right=7] ++(-.05,-.2) to[bend left=13] ++(-.2,-1.15) to[bend right=13] ++(.15,-.2) to[bend left=10] ++(-.07,-.3) to[bend right=100] ++(.45,-.1) to[bend right=10] coordinate[pos=0.08](@hooffront@) ([yshift=5mm,xshift=3mm]@frontleg) -- cycle;
-\pingu@block[draw=\csname pingu@color@horse#1@fr@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale,rounded corners=.12]{\csname pingu@color@horse#1@fr@hoof\endcsname} (@hooffront@) to[bend left=2] ++(0,-.565*.665) to[bend left=59] ++(-.225,-.08) -- ++(-.02,.03) to[bend left=20] ++(-.315,.11) to[bend right=6] ++(.092,.2) to[bend right=25] cycle;
-% background back le0
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale](@backleg) to[out=-115,in=\if@pingu@@horse@@donkey@120\else130\fi] ++(-.3,-3.5) -- ++(.2,-.3) coordinate(@hoofback@) to[bend left] ++(-.5,-.1)
--- ++(\if@pingu@@horse@@donkey@-.2\else-.05\fi,.15) -- ++(0,.15) to[bend left=\if@pingu@@horse@@donkey@45\else60\fi] cycle;
-\pingu@block[draw=\csname pingu@color@horse#1@br@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@br@hoof\endcsname} (@hoofback@) to[bend right=\if@pingu@@horse@@donkey@9\else9\fi] ++(.206,-.265) to[bend left=10] ++(\if@pingu@@horse@@donkey@-.66\else-.55\fi,\if@pingu@@horse@@donkey@-.15\else-.05\fi) -- ++(-1.73mm,2.42mm) to[bend right=6] cycle;
-
-\if@pingu@@horse@@donkey@
-\pingu@block[draw=\csname pingu@color@horse#1@tail@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@tail\endcsname} [rounded corners=1*\pingu@@horse@scale](@back) to[out=215,in=95] ++(-.1,-2) to[out=270,in=92] ++(0,-.75) [sharp corners] to[bend right=20] coordinate[pos=.5] (@) ++(.15,0) to[bend right=10] cycle;
-% TODO: hide support
-%\node[draw=\csname pingu@color@horse#1@tail@draw\endcsname,fill=\csname pingu@color@horse#1@tail\endcsname,cloud,cloud puffs=30,cloud ignores aspect,scale=1.33*\pingu@@horse@scale,yshift=16mm,rotate=-5,line width=\@pingu@@horse@lw*\pingu@@horse@scale] at (@) {\rotatebox{90}{\phantom{A}\hskip7.5em}};
-\scope[rotate around={180:(@)}] % adapted from the broom
-\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname} (@)++(-1mm,-2mm) to[out=115,in=240] ++(3mm,12.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]@) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]@) -- cycle;
-\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname} (@)++(-1mm,-2mm) to[out=115,in=240] coordinate[pos=.17] (@r) coordinate[pos=.19] (@r2) ++(-.75mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]@) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]@) -- cycle;
-\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname}(@)++(-.5mm,-1.5mm) to[out=115,in=240] ++(.5mm,12mm) to[out=300,in=65] ([xshift=.5mm,yshift=-1.5mm]@) -- cycle;
-\endscope
-\else
-\pingu@block[draw=\csname pingu@color@horse#1@tail@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@tail\endcsname} [rounded corners=1*\pingu@@horse@scale](@back) to[out=215,in=90] ++(-.4,-2.5) to[out=270,in=92] ++(0,-2.8) [sharp corners] to[bend right=20] ++(.6,0) to[bend right=10] cycle;
-\fi
-
-% back ear
-\if@pingu@@horse@@donkey@
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=.2mm,yshift=-1.5mm]@ear) to[bend left=20] ++(.373,1.465) coordinate(@) to[bend left=10] ++(-.15,-1.5);
-\else
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=.2mm,yshift=-1.5mm]@ear) to[bend left=20] ++(.373,.565) coordinate(@) to[bend left=10] ++(-.15,-.75);
-\fi
-% and here comes the wheeee (imagine-horse-sound)
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale] \pingu@@horse@@main;
-
-\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.1mm]@mouth-low) to[bend left=12] ++(.06,.65);
-\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mouth\endcsname} ([yshift=-.115mm]@mouth) -- ++(-.035,.225);
-
-\edef\pingu@tmp{\if@pingu@@horse@@donkey@4.5mm\else3.85mm\fi}%
-\edef\pingu@tmpb{\if@pingu@@horse@@donkey@3.65mm\else2.45mm\fi}%
-\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale,line join=round]{\csname pingu@color@horse#1@nose\endcsname} ([xshift=\pingu@tmp,yshift=\pingu@tmpb]@mouth) to[out=140,in=10] ++(-.17,-.074) to[bend right=49] cycle;
-
-\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.35mm]@frontleg) to[bend left=12] ++(.01,.325);
-\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.2mm]@backleg) to[bend right=13] ++(.25,.425);
-
-\if@pingu@@horse@@donkey@
-\pingu@block[draw=\csname pingu@color@horse#1@mane@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mane\endcsname} [rounded corners=1*\pingu@@horse@scale](@hair) to[out=34,in=185] ++(3,1.3) to[bend left=10] ++(.415,-.1) -- ++(-.1,-.25) to[out=186,in=35] ([yshift=-4mm,xshift=1.5mm]@hair) -- cycle;
-
-\pingu@block[draw=\csname pingu@color@horse#1@thatch@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@thatch\endcsname} [rounded corners=1*\pingu@@horse@scale]([xshift=2.1mm,yshift=-1.05mm]@ear) -- ++(-.1,-.2) to[bend left=4] ++(.45,-.275) to[bend right=9] cycle;
-\else
-\pingu@block[draw=\csname pingu@color@horse#1@mane@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mane\endcsname} [rounded corners=1*\pingu@@horse@scale](@hair) to[out=34,in=185] ++(3,1.3) to[bend left=10] ++(.415,-.1) -- ++(-.1,-.4) to[out=194,in=30] ([yshift=-11.5mm,xshift=1.5mm]@hair) -- cycle;
-
-\pingu@block[draw=\csname pingu@color@horse#1@thatch@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@thatch\endcsname} [rounded corners=1*\pingu@@horse@scale]([xshift=2mm,yshift=-1mm]@ear) -- ++(-.1,-.3275) to[bend left=4] ++(.455,-.175) to[bend right=9] cycle;
-\fi
-
-% ear
-\if@pingu@@horse@@donkey@
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=-1mm,yshift=-1mm]@ear) to[bend left=15] ++(.393,1.685) coordinate(@) to[bend right=17] ++(-.15,-1.8);
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} (@) to[bend right=17] ++(-.15,-1.8) to[bend right=14] cycle;
-\else
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=-.75mm,yshift=-1mm]@ear) to[bend left=20] ++(.393,.585) coordinate(@) to[bend right=10] ++(-.15,-.7);
-\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} (@) to[bend right=7] ++(-.15,-.7) to[bend right=14] cycle;
-\fi
-
-% the eye; this is no error it has draw as fill
-\pingu@block{\csname pingu@color@horse#1@eyes\endcsname} [rounded corners=.25*\pingu@@horse@scale] ([xshift=3mm,yshift=-7.5mm]@ear) to[bend right=20] ++(.125,-.2) to[bend right=50] ++(.1,.125) to[bend left=15] cycle;
-
-\pingu@block[draw=\csname pingu@color@horse#1@fl@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@fl@hoof\endcsname} (@hooffront) to[bend left=2] ++(.355*.49,-.545*.49) to[bend left=11] ++(-.45-.295,-.05+0.033)to[bend right=2] ++(.046,.29) to[bend right=10] cycle;
-\pingu@block[draw=\csname pingu@color@horse#1@bl@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@bl@hoof\endcsname} (@hoofback) to[bend right=\if@pingu@@horse@@donkey@9\else8\fi] ++(.15,-.26) to[bend left=10] ++(\if@pingu@@horse@@donkey@-.66\else-.55\fi,\if@pingu@@horse@@donkey@-.15\else-.05\fi) -- ++(-1.73mm,2.42mm) to[bend right=6] cycle; %to[bend left=2] ++(.355*.65,-.565*.65) to[bend left=15] ++(-.395,-.075) to[bend left=10] ++(-.293,.105) to[bend left=9] ++(.06,.3) to[bend left=5] cycle;
-}
-
-% universal switch for all three positions
-\newif\if@pingu@@horse@@donkey@
-
-\newif\if@pingu@x@horse@left@flip@
-\newif\if@pingu@x@horse@right@flip@
-\newif\if@pingu@x@horse@left@base@
-\newif\if@pingu@x@horse@right@base@
-\newif\if@pingu@x@horse@left@donkey@
-\newif\if@pingu@x@horse@right@donkey@
-\pingu@create@wing@extra{horse}{%
- horse \@lr/.code = {\pingu@set@extra{horse\@lr}{true}\pingu@color{horse\@lr}{##1}},
- horse \@lr/.default = pingu@bronze!80!pingu@black,
- horse \@lr\space flip/.is if = @pingu@x@horse@\@lr @flip@,
- horse \@lr\space donkey/.is if = @pingu@x@horse@\@lr @donkey@,
- horse \@lr\space has base/.is if = @pingu@x@horse@\@lr @base@,
- horse \@lr\space draw/.code = \pingu@color{horse\@lr @draw}{##1},%
- horse \@lr\space line width/.code = \@namedef{pingu@horse\@lr @x@line@width}{##1},%
- horse \@lr\space mane/.code = \pingu@color{horse\@lr @mane}{##1},%
- horse \@lr\space mane draw/.code = \pingu@color{horse\@lr @mane@draw}{##1},%
- horse \@lr\space thatch/.code = \pingu@color{horse\@lr @thatch}{##1},%
- horse \@lr\space thatch draw/.code = \pingu@color{horse\@lr @thatch@draw}{##1},%
- horse \@lr\space tail/.code = \pingu@color{horse\@lr @tail}{##1},%
- horse \@lr\space tail draw/.code = \pingu@color{horse\@lr @tail@draw}{##1},%
- horse \@lr\space eyes/.code = \pingu@color{horse\@lr @eyes}{##1},%
- horse \@lr\space eye/.forward to = /pingu/horse \@lr\space eyes,%
- horse \@lr\space mouth/.code = \pingu@color{horse\@lr @mouth}{##1},%
- horse \@lr\space nose/.code = \pingu@color{horse\@lr @nose}{##1},%
- horse \@lr\space ears/.code = \pingu@color{horse\@lr @ears}{##1},%
- horse \@lr\space base/.code = \pingu@color{horse\@lr @base}{##1},%
- horse \@lr\space base draw/.code = \pingu@color{horse\@lr @base@draw}{##1},%
- horse \@lr\space base shade/.code = \pingu@color{horse\@lr @base@shade}{##1},%
- horse \@lr\space base shade draw/.code = \pingu@color{horse\@lr @base@shade@draw}{##1},%
- horse \@lr\space front left hoof/.code = \pingu@color{horse\@lr @fl@hoof}{##1},%
- horse \@lr\space front right hoof/.code= \pingu@color{horse\@lr @fr@hoof}{##1},%
- horse \@lr\space back left hoof/.code = \pingu@color{horse\@lr @bl@hoof}{##1},%
- horse \@lr\space back right hoof/.code = \pingu@color{horse\@lr @br@hoof}{##1},%
- horse \@lr\space front hoofs/.style = {/pingu/horse \@lr\space front left hoof=##1,/pingu/horse \@lr\space front right hoof=##1},
- horse \@lr\space back hoofs/.style = {/pingu/horse \@lr\space back left hoof=##1,/pingu/horse \@lr\space back right hoof=##1},
- horse \@lr\space hoofs/.style = {/pingu/horse \@lr\space front hoofs=##1,/pingu/horse \@lr\space back hoofs=##1},
- horse \@lr\space hoofs/.default = gray!80!white,
- % TODO: allow colors to be styles?
- horse \@lr\space xshift/.code = \@namedef{pingu@x@horse\@lr @xshift}{##1},
- horse \@lr\space yshift/.code = \@namedef{pingu@x@horse\@lr @yshift}{##1},
- horse \@lr\space on base/.style ={/pingu/horse \@lr\space yshift=4cm},
-}{horse \@lr\space draw=\csname pingu@color@horse\@lr\endcsname!80!pingu@black,horse \@lr\space mane=\csname pingu@color@horse\@lr\endcsname!86!pingu@white,horse \@lr\space mane draw=\csname pingu@color@horse\@lr @mane\endcsname!80!pingu@black,horse \@lr\space eyes=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space mouth=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space nose=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space ears=\csname pingu@color@horse\@lr\endcsname,horse \@lr\space thatch=\csname pingu@color@horse\@lr @mane\endcsname,horse \@lr\space thatch draw=\csname pingu@color@horse\@lr @thatch\endcsname!80!pingu@black,horse \@lr\space tail=\csname pingu@color@horse\@lr @mane\endcsname,horse \@lr\space tail draw=\csname pingu@color@horse\@lr @tail\endcsname!80!pingu@black,horse \@lr\space has base=false,horse \@lr\space base=lightgray!90!black,horse \@lr\space base draw=\csname pingu@color@horse\@lr @base\endcsname!91!pingu@black,horse \@lr\space base shade=lightgray!80!black,horse \@lr\space base shade draw=\csname pingu@color@horse\@lr @base@shade\endcsname!91!pingu@black,horse \@lr\space xshift=0pt,horse \@lr\space yshift=0pt,horse \@lr\space flip=\ifx\@lr\pingu@str@wing@left true\else false\fi,horse \@lr\space donkey=false,horse \@lr\space line width=1.75pt,horse \@lr\space hoofs=\@pingu@none}
-
-\def\pingu@draw@wi@horse#1{%
- \pingu@setup@wing{horse}{#1}%
-\scope[scale=\pingu@@horse@scale,every path/.append style={line cap=round, line join=round},shift=(\pingu@name-wing-#1),rotate around={\@angle-5:(\pingu@name-wing-#1)}]
-\csname if@pingu@x@horse@#1@flip@\endcsname
-\scope[xshift=-4cm-\csname pingu@x@horse#1@xshift\endcsname,yshift=-42mm+\csname pingu@x@horse#1@yshift\endcsname]
-\else
-\scope[xshift=4cm+\csname pingu@x@horse#1@xshift\endcsname,yshift=-42mm+\csname pingu@x@horse#1@yshift\endcsname,xscale=-1]
-\fi
-\csname if@pingu@x@horse@#1@donkey@\endcsname
- \@pingu@@horse@@donkey@true
-\fi
- \edef\@pingu@@horse@lw{\csname pingu@horse#1@x@line@width\endcsname}
- \pingu@@drawer@horse{#1}
- % TODO-SET: hoof
-\endscope\endscope
-}
-% todo: make statue extra
-% todo: make horse hat
-
-% to get on horse we create some kind of third wing item: 'on'
-% that will be used to initialize all of the colors and keys
-\newif\if@pingu@x@horse@on@flip@
-\newif\if@pingu@x@horse@on@base@
-\newif\if@pingu@x@horse@on@boundingbox@
-\newif\if@pingu@x@horse@on@donkey@
-% TODO: select keys
-% TODO: option so it does not affect the bounding box (default!)
-\pingu@create@extra{horseon}{%
- on horse/.code = {\pingu@set@extra{horseon}{true}\pingu@color{horseon}{#1}},
- on horse/.default = pingu@bronze!80!pingu@black,
- horse behind/.style = {on horse=#1, on horse scale=.325, on horse yshift=6.15cm},
- horse behind/.default = pingu@bronze!80!pingu@black,
- on horse flip/.is if = @pingu@x@horse@on@flip@,
- on horse donkey/.is if = @pingu@x@horse@on@donkey@,
- on horse has base/.is if = @pingu@x@horse@on@base@,
- on horse has bounding box/.is if = @pingu@x@horse@on@boundingbox@,
- on horse draw/.code = \pingu@color{horseon@draw}{#1},%
- on horse line width/.code = \@namedef{pingu@horseon@x@line@width}{#1},%
- on horse mane/.code = \pingu@color{horseon@mane}{#1},%
- on horse mane draw/.code = \pingu@color{horseon@mane@draw}{#1},%
- on horse thatch/.code = \pingu@color{horseon@thatch}{#1},%
- on horse thatch draw/.code = \pingu@color{horseon@thatch@draw}{#1},%
- on horse tail/.code = \pingu@color{horseon@tail}{#1},%
- on horse tail draw/.code = \pingu@color{horseon@tail@draw}{#1},%
- on horse eyes/.code = \pingu@color{horseon@eyes}{#1},%
- on horse eye/.forward to = /pingu/on horse eyes,%
- on horse mouth/.code = \pingu@color{horseon@mouth}{#1},%
- on horse nose/.code = \pingu@color{horseon@nose}{#1},%
- on horse ears/.code = \pingu@color{horseon@ears}{#1},%
- on horse base/.code = \pingu@color{horseon@base}{#1},%
- on horse base draw/.code = \pingu@color{horseon@base@draw}{#1},%
- on horse base shade/.code = \pingu@color{horseon@base@shade}{#1},%
- on horse base shade draw/.code = \pingu@color{horseon@base@shade@draw}{#1},%
- on horse front left hoof/.code = \pingu@color{horseon@fl@hoof}{#1},%
- on horse front right hoof/.code = \pingu@color{horseon@fr@hoof}{#1},%
- on horse back left hoof/.code = \pingu@color{horseon@bl@hoof}{#1},%
- on horse back right hoof/.code = \pingu@color{horseon@br@hoof}{#1},%
- on horse front hoofs/.style = {/pingu/on horse front left hoof=#1,/pingu/on horse front right hoof=#1},
- on horse back hoofs/.style = {/pingu/on horse back left hoof=#1,/pingu/on horse back right hoof=#1},
- on horse hoofs/.style = {/pingu/on horse front hoofs=#1,/pingu/on horse back hoofs=#1},
- on horse hoofs/.default = gray!80!white,
- on horse xshift/.code = \@namedef{pingu@x@horseon@xshift}{#1},
- on horse yshift/.code = \@namedef{pingu@x@horseon@yshift}{#1},
- on horse scale/.code = \@namedef{pingu@x@horseon@scale}{#1}
-}{on horse draw=\pingu@color@horseon!80!pingu@black,on horse mane=\pingu@color@horseon!86!pingu@white,on horse mane draw=\pingu@color@horseon@mane!80!pingu@black,on horse eyes=\pingu@color@horseon@draw,on horse mouth=\pingu@color@horseon@draw,on horse nose=\pingu@color@horseon@draw,on horse ears=\pingu@color@horseon,on horse thatch=\pingu@color@horseon@mane,on horse thatch draw=\pingu@color@horseon@thatch!80!pingu@black,on horse tail=\pingu@color@horseon@mane,on horse tail draw=\pingu@color@horseon@tail!80!pingu@black,on horse has base=false,on horse base=lightgray!90!black,on horse base draw=\pingu@color@horseon@base!91!pingu@black,on horse base shade=lightgray!80!black,on horse base shade draw=\pingu@color@horseon@base@shade!91!pingu@black,on horse xshift=0pt,on horse yshift=0pt,on horse flip=false,on horse scale=0.75,on horse has bounding box=false,on horse donkey=false,on horse line width=1.75pt,on horse hoofs=\@pingu@none}
-
-
-\def\pingu@draw@eb@horseon{%
-\pingu@layer{background}[scale=\pingu@x@horseon@scale,every path/.append style={line cap=round, line join=round},shift=(\pingu@name-bottom-center)]
-\if@pingu@x@horse@on@donkey@
- \@pingu@@horse@@donkey@true
-\fi
-\if@pingu@x@horse@on@flip@
- \scope[xshift=-45mm-\pingu@x@horseon@xshift,yshift=-67mm+\pingu@x@horseon@yshift,xscale=\if@pingu@x@horse@on@donkey@ 1.1\else1\fi,yscale=\if@pingu@@horse@@donkey@.9\else1\fi]
- \else
- \scope[xshift=45mm+\pingu@x@horseon@xshift,yshift=-67mm+\pingu@x@horseon@yshift,xscale=\if@pingu@x@horse@on@donkey@-1.1\else-1\fi,yscale=\if@pingu@@horse@@donkey@.9\else1\fi]
- \fi
-\edef\@pingu@@horse@lw{\pingu@horseon@x@line@width}
-\if@pingu@x@horse@on@boundingbox@\else\pgfinterruptboundingbox\fi
- \pingu@@drawer@horse{on}
-\if@pingu@x@horse@on@boundingbox@\else\endpgfinterruptboundingbox\fi
-\endscope\endpingu@layer
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-magic.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-magic.lib.tex
deleted file mode 100644
index a5e3fb2ddc..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-magic.lib.tex
+++ /dev/null
@@ -1,14 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@wing@extra{handcast}{%
- handcast \@lr/.forward to = /pingu/hand cast \@lr,
- hand cast \@lr/.code = {\pingu@set@extra{handcast\@lr}{true}\@namedef{pingu@handcast@\@lr}{##1}},
- hand cast \@lr/.default = {X},
- handcast \@lr\space color/.forward to = /pingu/hand cast \@lr\space color,
- hand cast \@lr\space color/.code = \pingu@color{handcast@\@lr @color}{##1},%
-}{hand cast \@lr\space color=pingu@purple}
-\def\pingu@draw@wi@handcast#1{%
- \pingu@setup@wing{handcast}{#1}%
- \path[rotate around={\@angle:(\pingu@name-wing-#1)}] (\pingu@name-wing-#1)++(0,5mm) node[\csname pingu@color@handcast@#1@color\endcsname] {\@nameuse{pingu@handcast@#1}};
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-medieval.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-medieval.lib.tex
deleted file mode 100644
index 4e81c4416c..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-medieval.lib.tex
+++ /dev/null
@@ -1,205 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\newif\if@pingu@x@rook@draw@hatch@
-\pingu@create@extra{rook}{%
- rook/.code = \pingu@set@extra{rook}{true}\pingu@color{rook}{#1},
- rook/.default = pingu@silver,
- rook back/.code = \pingu@color{rook@back}{#1},
- rook hatch/.is if = @pingu@x@rook@draw@hatch@,
- rook hatch/.default = true,
- rook shade/.code = \pingu@color{rook@shade}{#1},
-}{rook back=\pingu@color@rook!85!black,rook shade=\pingu@color@rook!92!black,rook hatch}
-\def\pingu@draw@ea@rook{%
-\if@pingu@do@back@\else\if@pingu@x@rook@draw@hatch@\else\pingu@layer{foreground}[]\fi\fi
- \pingu@block[even odd rule]{\pingu@color@rook} ([xshift=-.2mm]\pingu@name-wings-side-right|-\pingu@name-foot-right) [rounded corners=\p@] to[bend right=9] coordinate[pos=.15] (@tmpe) ([xshift=.2mm]\pingu@name-wings-side-left|-\pingu@name-foot-left) [sharp corners] to[bend right=1.5*\pingu@bend] (\pingu@name-wings-side-left|-\pingu@name-head-top) coordinate (@tmp) to[bend left=3] coordinate[pos=.3] (@tmpc) coordinate[pos=.7] (@tmpd) (\pingu@name-wings-side-right|-\pingu@name-head-top) [rounded corners=\p@] coordinate (@tmpb) to[bend right=1.5*\pingu@bend] cycle \if@pingu@x@rook@draw@hatch@ (\pingu@name-head-center) ellipse[x radius=.8\pingu@w@half, y radius=.45\pingu@w@half]\fi;
- \pingu@block{\pingu@color@rook} (@tmp) to[bend right=2] ++(0,2mm) [rounded corners=.25mm] to[bend left=1] ++(-2mm,-.1mm) -- ++(0,-2.25mm);
- \pingu@block{\pingu@color@rook} (@tmpb) to[bend left=2] ++(0,2mm) [rounded corners=.25mm] to[bend right=1] ++(2mm,-.1mm) -- ++(0,-2.25mm);
-
- \pingu@block{\pingu@color@rook} (@tmpc)++(-2mm,-.25mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend right=1] ++(4mm,.05mm) -- ++(0,-2.25mm);
- \pingu@block{\pingu@color@rook} (@tmpd)++(2mm,-.25mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend left=1] ++(-4mm,-.05mm) -- ++(0,-2.25mm);
-
- % custom shade boi (or gurl, wateva)
- \scope
- \clip ([xshift=-.2mm]\pingu@name-wings-side-right|-\pingu@name-foot-right) [rounded corners=\p@] to[bend right=5] ([xshift=.2mm]\pingu@name-wings-side-left|-\pingu@name-foot-left) [sharp corners] to[bend right=1.5*\pingu@bend] (\pingu@name-wings-side-left|-\pingu@name-head-top) -- ++(0,2mm) to[bend left=3] (\pingu@name-wings-side-right|-\pingu@name-head-top) to[bend right=1.5*\pingu@bend] cycle;
- \if@pingu@x@rook@draw@hatch@
- \clip[/pingu/@invclip] (\pingu@name-head-center) ellipse[x radius=.8\pingu@w@half, y radius=.45\pingu@w@half];
- \fi
- \pingu@block{\pingu@color@rook@shade} (@tmpe) to[bend right=5] ([xshift=.2mm]@tmpe-|@tmp) to[bend right=1.5*\pingu@bend] ([yshift=2mm]@tmp) to[bend left=10] cycle;
- \endscope
- \if@pingu@do@back@\else\if@pingu@x@rook@draw@hatch@\else\endpingu@layer\fi\fi
-
- \pingu@layer{background}[]
- \pingu@block{\pingu@color@rook@back} (@tmp) to[bend right=3] coordinate[pos=.3] (@tmpc) coordinate[pos=.7] (@tmpd) (@tmpb) to[bend right=30] cycle;
- \pingu@block{\pingu@color@rook@back} (@tmpb) to[bend left=2] ++(0,2mm) [rounded corners=.25mm] to[bend left=1] ++(2mm,.1mm) -- ++(0,-2.25mm);
- \pingu@block{\pingu@color@rook@back} (@tmp) to[bend right=2] ++(0,2mm) [rounded corners=.25mm] to[bend right=1] ++(-2mm,.1mm) -- ++(0,-2.25mm);
-
- \pingu@block{\pingu@color@rook@back} (@tmpc)++(-2mm,-.49mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend right=1] ++(4mm,.05mm) -- ++(0,-2.25mm);
- \pingu@block{\pingu@color@rook@back} (@tmpd)++(2mm,-.49mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend left=1] ++(-4mm,-.05mm) -- ++(0,-2.25mm);
- \endpingu@layer
-}
-
-\newif\if@pingu@x@crown@ddd@ % 3d
-\newif\if@pingu@x@crown@shade@ % 3d
-\pingu@create@extra{crown}{%
- crown/.code = \pingu@set@extra{crown}{true}\pingu@color{crown}{#1},
- crown/.default = pingu@yellow,
- crown 3d/.is if = @pingu@x@crown@ddd@, crown 3d/.default = true,
- crown 2d/.style = {crown=#1, crown 3d=false},
- crown 2d/.default = pingu@yellow,
- crown back/.code = \pingu@color{crown@back}{#1},
- crown front bend/.code = \def\pingu@x@crown@f@bend{#1},
- crown back bend/.code = \def\pingu@x@crown@b@bend{#1},
- crown gem shade/.is if = @pingu@x@crown@shade@, crown gem shade/.default = true,
- crown gem colors/.code n args = 7{\pingu@color{crown@gem@a}{#1}\pingu@color{crown@gem@b}{#2}\pingu@color{crown@gem@c}{#3}\pingu@color{crown@gem@d}{#4}\pingu@color{crown@gem@e}{#5}\pingu@color{crown@gem@f}{#6}\pingu@color{crown@gem@g}{#7}},
- crown gem ring/.code = \pingu@color{crown@gem@ring}{#1},
- crown position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@crown@angle{#1}\def\pingu@x@crown@xshift{#2}\def\pingu@x@crown@yshift{#3}\def\pingu@x@crown@scale{#4}},
-}{crown position={-9:(1mm,0mm)1},crown front bend=16,crown back bend=9,crown back=\pingu@color@crown!93!black,crown 3d,crown gem colors={pingu@purple}{pingu@blue}{pingu@green}{pingu@purple}{pingu@green}{pingu@blue}{pingu@purple},crown gem ring=\pingu@color@crown!85!white,crown gem shade}
-
-% color | bend1 | bend1
-\def\pingu@draw@ea@crown@s#1#2#3{
-\pingu@block{#1} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend left=2] ++(0,3.125mm) to[bend #2=\pingu@x@crown@f@bend]
- coordinate[pos=0] (r2) coordinate[pos=.07] (r1)
- coordinate[pos=.14-.07] (a1) coordinate[pos=.14] (a2) coordinate[pos=.14+.07] (a3)
- coordinate[pos=.30-.08] (b1) coordinate[pos=.30] (b2) coordinate[pos=.30+.08] (b3)
- coordinate[pos=.50- .1] (c1) coordinate[pos=.50] (x2) coordinate[pos=.50+ .1] (c3)
- coordinate[pos=.69-.08] (d1) coordinate[pos=.69] (d2) coordinate[pos=.69+.08] (d3)
- coordinate[pos=.85-.07] (e1) coordinate[pos=.85] (e2) coordinate[pos=.85+.07] (e3)
- coordinate[pos=1] (l2) coordinate[pos=.93] (l1)
- ++(1.375cm,0) to[bend left=2] ++(0,-3.125mm) to[bend #3=\pingu@x@crown@f@bend] (-6mm,-.25cm) -- cycle;
-\path (x2)++(0,.9mm) coordinate (c2);
-\@for\a:={a,b,c,d,e}\do{
- \pingu@block{#1} ([yshift=-.1mm]\a1) to[bend right=\pingu@x@crown@f@bend] ([yshift=-.1mm]\a3) to[bend right=2] ([yshift=1.85mm]\a2) to[bend right=2] ([yshift=-.1mm]\a1) -- cycle;
-}
-\pingu@block{#1} (l2)++(0,-.2mm) to[bend right=2] ++(0,1.95mm) -- (l1) -- cycle;
-\pingu@block{#1} (r2)++(0,-.2mm) to[bend left=2] ++(0,1.95mm) -- (r1) -- cycle;
-}
-
-% color | at | shift | scale
-\def\pingu@draw@ea@crown@g#1#2#3#4{
-\scope[shift={(#22)},shift={(#3,-.33mm)}]
- \pingu@block{\pingu@color@crown@gem@ring} ellipse [x radius=.715mm*#4, y radius=.925mm*#4];
- \pingu@block{#1} ellipse [x radius=.633mm*#4, y radius=.85mm*#4];
- \protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else
- \if@pingu@x@crown@shade@
- \shade[ball color=#1,fill opacity=.45,shading angle=-95] ellipse [x radius=.633mm*#4, y radius=.85mm*#4];
- \else
- \pingu@block[rotate around={7:(42:.3mm*#4 and .4mm*#4)}]{#1!45!pingu@white} (42:.3mm*#4 and .4mm*#4) ellipse[x radius=.17mm*#4, y radius=.24mm*#4];
- \pingu@block[rotate around={7:(232:.275mm*#4 and .35mm*#4)}]{#1!45!pingu@white} (232:.275mm*#4 and .35mm*#4) ellipse[x radius=.06mm*#4, y radius=.085mm*#4];
- \fi\fi
-\endscope
-}
-\def\pingu@draw@ea@crown{%
-\scope[rotate around={\pingu@x@crown@angle:(\pingu@name-head-top)},%
- shift={(\pingu@name-head-top)},
- shift={(\pingu@x@crown@xshift,\pingu@x@crown@yshift)},
- scale=\pingu@x@crown@scale]
-% draw front
-\if@pingu@x@crown@ddd@
- \pingu@draw@ea@crown@s{\pingu@color@crown}{right}{left}
- \def\@tmpa{.05mm}\def\@tmpb{.025mm}
-\else
- \pingu@draw@ea@crown@s{\pingu@color@crown}{left}{right}
- \def\@tmpa{-.015mm}\def\@tmpb{-.035mm}
-\fi
-% draw the emeralds
-\pingu@draw@ea@crown@g{\pingu@color@crown@gem@b}{a}{-\@tmpa}1
-\pingu@draw@ea@crown@g{\pingu@color@crown@gem@c}{b}{-\@tmpb}1
-\pingu@draw@ea@crown@g{\pingu@color@crown@gem@d}{x}{\z@}{1.35}
-\pingu@draw@ea@crown@g{\pingu@color@crown@gem@e}{d}{\@tmpb}1
-\pingu@draw@ea@crown@g{\pingu@color@crown@gem@f}{e}{\@tmpa}1
-\pingu@layer{background}[]
-\pingu@block{\pingu@color@crown@gem@a} (r2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm];
-\pingu@block{\pingu@color@crown@gem@ring} (r2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm];
-\pingu@block{\pingu@color@crown@gem@g} (l2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm];
-\pingu@block{\pingu@color@crown@gem@ring} (l2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm];
-% draw back if 3d
-\if@pingu@x@crown@ddd@
- \pingu@draw@ea@crown@s{\pingu@color@crown@back}{left}{right}
-\fi
-\endpingu@layer
-\endscope
-}
-
-\newif\if@pingu@x@princesscrown@ddd@
-\newif\if@pingu@x@princesscrown@shade@
-\newif\if@pingu@x@princesscrown@bobbles@
-\pingu@create@extra{princesscrown}{%
- princess crown/.code = \pingu@set@extra{princesscrown}{true}\pingu@color{princesscrown}{#1},
- princess crown/.default = pingu@yellow,
- princess crown 3d/.is if= @pingu@x@princesscrown@ddd@, princess crown 3d/.default = true,
- princess crown 2d/.style = {princess crown=#1, princess crown 3d=false},
- princess crown 2d/.default = pingu@yellow,
- princess crown back/.code = \pingu@color{princesscrown@back}{#1},
- princess crown front bend/.code = \def\pingu@x@princesscrown@f@bend{#1},
- princess crown back bend/.code = \def\pingu@x@princesscrown@b@bend{#1},
- princess crown gem shade/.is if = @pingu@x@princesscrown@shade@,
- princess crown bobbles/.is if = @pingu@x@princesscrown@bobbles@,
- princess crown gem shade/.default = true,
- princess crown gem colors/.code n args = 5{\pingu@color{princesscrown@gem@a}{#1}\pingu@color{princesscrown@gem@b}{#2}\pingu@color{princesscrown@gem@c}{#3}\pingu@color{princesscrown@gem@d}{#4}\pingu@color{princesscrown@gem@e}{#5}},
- princess crown gem ring/.code = \pingu@color{princesscrown@gem@ring}{#1},
- princess crown position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@princesscrown@angle{#1}\def\pingu@x@princesscrown@xshift{#2}\def\pingu@x@princesscrown@yshift{#3}\def\pingu@x@princesscrown@scale{#4}},
-}{princess crown position={-9:(1mm,0mm)1},princess crown front bend=12,princess crown back bend=7,princess crown back=\pingu@color@princesscrown!93!black,princess crown 3d,princess crown gem colors={pingu@purple}{pingu@blue}{pingu@green}{pingu@blue}{pingu@purple},princess crown gem ring=\pingu@color@princesscrown!85!white,princess crown gem shade,princess crown bobbles}
-
-% color | bend1 | bend2
-\def\pingu@draw@ea@princesscrown@s#1#2#3{
-\pingu@block{#1} [rounded corners=.2mm](-3.25mm,-.15cm) to[bend left=2] ++(0,2.32mm) to[bend #2=\pingu@x@princesscrown@f@bend]
- coordinate[pos=0] (r2) coordinate[pos=.065] (r1)
- coordinate[pos=.11] (a1) coordinate[pos=.2] (a2) coordinate[pos=.29] (a3)
- coordinate[pos=.35] (b1) coordinate[pos=.50] (x2) coordinate[pos=.65] (b3)
- coordinate[pos=.71] (c1) coordinate[pos=.8] (c2) coordinate[pos=.89] (c3)
- coordinate[pos=1] (l2) coordinate[pos=.93] (l1)
- ++(8mm,0) to[bend left=2] ++(0,-2.32mm) to[bend #3=\pingu@x@princesscrown@f@bend] (-3mm,-.15cm) -- cycle;
-\path (x2)++(0,.9mm) coordinate (b2);
-\@for\a:={a,b,c}\do{
- \pingu@block{#1} ([yshift=-.1mm]\a1) to[bend right=\pingu@x@princesscrown@f@bend] ([yshift=-.1mm]\a3) to[bend left=2] ([yshift=2.15mm]\a2) to[bend left=2] ([yshift=-.1mm]\a1) -- cycle;
- \if@pingu@x@princesscrown@bobbles@\pingu@block{#1} ([yshift=2.15mm]\a2) circle [radius=.45\p@];\fi
-}
-\pingu@block{#1} (l2)++(0,-.2mm) to[bend left=2] ++(0,2.25mm) -- (l1) -- cycle;
-\pingu@block{#1} (r2)++(0,-.2mm) to[bend right=2] ++(0,2.25mm) -- (r1) -- cycle;
-\if@pingu@x@princesscrown@bobbles@\pingu@block{#1} (l2)++(0,2.05mm) circle [radius=.45\p@];
-\pingu@block{#1} (r2)++(0,2.05mm) circle [radius=.45\p@];\fi
-}
-
-% draw single gem; color | at | shift | scale
-\def\pingu@draw@ea@princesscrown@g#1#2#3#4{
-\scope[shift={(#22)},shift={(#3,-.33mm)}]
- \pingu@block{\pingu@color@princesscrown@gem@ring} ellipse [x radius=.715mm*#4, y radius=.925mm*#4];
- \pingu@block{#1} ellipse [x radius=.633mm*#4, y radius=.85mm*#4];
- \protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else
- \if@pingu@x@princesscrown@shade@
- \shade[ball color=#1,fill opacity=.45,shading angle=-95] ellipse [x radius=.633mm*#4, y radius=.85mm*#4];
- \else
- \pingu@block[rotate around={7:(42:.3mm*#4 and .4mm*#4)}]{#1!45!pingu@white} (42:.3mm*#4 and .4mm*#4) ellipse[x radius=.17mm*#4, y radius=.24mm*#4];
- \pingu@block[rotate around={7:(232:.275mm*#4 and .35mm*#4)}]{#1!45!pingu@white} (232:.275mm*#4 and .35mm*#4) ellipse[x radius=.06mm*#4, y radius=.085mm*#4];
- \fi\fi
-\endscope}
-\def\pingu@draw@ea@princesscrown{%
-\scope[rotate around={\pingu@x@princesscrown@angle:(\pingu@name-head-top)},%
- shift={(\pingu@name-head-top)},
- shift={(\pingu@x@princesscrown@xshift,\pingu@x@princesscrown@yshift)},
- scale=\pingu@x@princesscrown@scale]
-% draw front
-\if@pingu@x@princesscrown@ddd@
- \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown}{right}{left}
- \def\@tmpa{.05mm}
-\else
- \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown}{left}{right}
- \def\@tmpa{-.015mm}
-\fi
-% draw the emaralds
-\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@b}{a}{-\@tmpa}{.95}
-\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@c}{x}{\z@}{1.3}
-\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@d}{c}{\@tmpa}{.95}
-\pingu@layer{background}[]
-\pingu@block{\pingu@color@princesscrown@gem@a} (r2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm];
-\pingu@block{\pingu@color@princesscrown@gem@ring} (r2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm];
-\pingu@block{\pingu@color@princesscrown@gem@e} (l2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm];
-\pingu@block{\pingu@color@princesscrown@gem@ring} (l2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm];
-% draw back if 3d
-\if@pingu@x@princesscrown@ddd@
- \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown@back}{left}{right}
-\fi
-\endpingu@layer
-\endscope
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-movement.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-movement.lib.tex
deleted file mode 100644
index 0916cda347..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-movement.lib.tex
+++ /dev/null
@@ -1,75 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@bodytype@add{tilt-right}{%
-\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off)
-% left side
-to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off)
-% feety stuff
-arc (180:270:\pingu@foot@outer@w{}-1mm and \pingu@foot@outer@h) coordinate[yshift=-.2mm] (\pingu@name-foot-right)
-arc (270:332:\pingu@foot@inner@w{}+1mm and 2.5*\pingu@foot@inner@h)
-coordinate (\pingu@name-bottom-center)
-arc (208:270:\pingu@foot@inner@w{} and 1.25*\pingu@foot@inner@h) coordinate[yshift=-.4mm] (\pingu@name-foot-left)
-arc (270:360:\pingu@foot@outer@w{} and 1.125*\pingu@foot@outer@h)%
-% right side
-to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off)
-% coordinate
-coordinate (\pingu@name-wings-side-left)
--- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle;
-
-\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center)
-++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top)
-arc(90:450:\pingu@w@half{} and \pingu@head@h@half)
-coordinate[pos=\pinguanglehr] (\pingu@name-head-right)
-coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
-
-\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm);
-\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half);
-\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-belly-back)++(-\pingu@w@half+\pingu@one,\pingu@lower@off) to[bend right=.8\pingu@bend] ++(-.05mm,1.05cm-\pingu@side@h@half-\pingu@lower@off) arc (180:270:3.7mm and 2mm) arc (270:331:5mm and 3*.85mm) arc (207:270:5.3mm and 1.125*.85mm) arc (270:360:4.025mm and 1.25*2mm) to[bend right=.8\pingu@bend] ++(0,\pingu@side@h@half-1.05cm+\pingu@lower@off) arc (0:180:\pingu@w@half-.96mm and \pingu@w@half-\pingu@one) -- cycle;
-
-\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center);
-\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center);
-
-\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right);
-\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left);
-
-\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm];
-\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm];
-}
-
-
-\pingu@bodytype@add{tilt-left}{%
-\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off)
-% left side
-to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off)
-% feety stuff
-arc (180:270:\pingu@foot@outer@w{}-1mm and 1.25*\pingu@foot@outer@h) coordinate[yshift=-.2mm] (\pingu@name-foot-right)
-arc (270:332:\pingu@foot@inner@w{}+1mm and 1.125*\pingu@foot@inner@h)
-coordinate (\pingu@name-bottom-center)
-arc (208:270:\pingu@foot@inner@w{} and 2.5*\pingu@foot@inner@h) coordinate[yshift=-.4mm] (\pingu@name-foot-left)
-arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)%
-% right side
-to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off)
-% coordinate
-coordinate (\pingu@name-wings-side-left)
--- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle;
-
-\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center)
-++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top)
-arc(90:450:\pingu@w@half{} and \pingu@head@h@half)
-coordinate[pos=\pinguanglehr] (\pingu@name-head-right)
-coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
-
-\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm);
-\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half);
-\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-belly-back)++(-\pingu@w@half+\pingu@one,\pingu@lower@off) to[bend right=.8\pingu@bend] ++(-.05mm,1.05cm-\pingu@side@h@half-\pingu@lower@off) arc (180:270:4.025mm and 1.25*2mm) arc (270:331:5.25mm and 1.125*.85mm) arc (207:270:5mm and 3*.85mm) arc (270:360:3.75mm and 2mm) to[bend right=.8\pingu@bend] ++(0,\pingu@side@h@half-1.05cm+\pingu@lower@off) arc (0:180:\pingu@w@half-.96mm and \pingu@w@half-\pingu@one) -- cycle;
-
-\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center);
-\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center);
-
-\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right);
-\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left);
-
-\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm];
-\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm];
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-safe.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-safe.lib.tex
deleted file mode 100644
index d25913d3cd..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-safe.lib.tex
+++ /dev/null
@@ -1,30 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{mask}{%
- mask/.code = {\pingu@set@extra{mask}{true}\pingu@color{mask}{#1}},
- mask/.default = pingu@white!61!gray,%
- mask band/.code = \pingu@color{mask@band}{#1},%
- mask line width/.code = \def\pingu@x@mask@line@width{#1},%
- mask band inner/.code = \pingu@color{mask@band@inner}{#1},%
- mask band outer/.code = \pingu@color{mask@band@outer}{#1}%
-}{mask band=\pingu@color@body@main, mask band inner=\pingu@color@mask@band!60!\pingu@color@mask, mask band outer=\pingu@color@mask@band!82!\pingu@color@mask,mask line width=.565pt}
-
-\def\pingu@draw@ea@mask{%
-\pingu@block{\pingu@color@mask} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm]\pingu@name-bill) coordinate (@ul) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) coordinate (@ur) -- ++(0,-4.25mm)[rounded corners=.8mm] coordinate (@lr) -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) coordinate (@ll) -- cycle;
-\scope
-\clip[use path=\pingu@upperpingu];
-\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=-.1mm,xshift=.2mm]@ul) to[bend left=3] ([yshift=-1.1mm]\pingu@name-wings-side-right);
-\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=-.1mm,xshift=-.2mm]@ur) to[bend right=3] ([yshift=-1.1mm]\pingu@name-wings-side-left);
-\endscope\scope
-\clip[use path=\pingu@lowerpingu];
-\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=.01mm,xshift=.2mm]@ll) to[bend left=3] ([yshift=2mm]\pingu@name-wing-right-start);
-\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=.01mm,xshift=-.2mm]@lr) to[bend right=3] ([yshift=2mm]\pingu@name-wing-left-start);
-\endscope
-% TODO: fix this sloppy overwrite
-\pingu@block{\pingu@color@mask} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm]\pingu@name-bill) coordinate (@ul) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) coordinate (@ur) -- ++(0,-4.25mm)[rounded corners=.8mm] coordinate (@lr) -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) coordinate (@ll) -- cycle;
-\pingu@draw[very thin]{\pingu@color@mask@band@inner} ([xshift=-5mm,yshift=.75mm-4.25mm/2]\pingu@name-bill) to[bend right=1] ++(10mm,0);
-\foreach \i/\b/\c in {1.6mm/very thin/\pingu@color@mask@band@inner,.8mm/very thin/\pingu@color@mask@band@inner,0mm//\pingu@color@mask@band@outer} {
-\pingu@draw[\b]{\c} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm-\i]\pingu@name-bill) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) -- ++(0,-4.25mm+2*\i)[rounded corners=.8mm] -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) -- cycle;
-}
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-science-fiction.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-science-fiction.lib.tex
deleted file mode 100644
index 226a4645b8..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-science-fiction.lib.tex
+++ /dev/null
@@ -1,190 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\newif\if@pingu@x@lightsaber@glow@left
-\newif\if@pingu@x@lightsaber@glow@right
-\newif\if@pingu@x@lightsaber@double@left
-\newif\if@pingu@x@lightsaber@double@right
-\def\pingu@x@saberglow@w@half{.9mm}
-\def\pingulightsaberfactor{.013}
-\pingu@create@wing@extra{lightsaber}{%
- lightsaber \@lr/.code = {\pingu@set@extra{lightsaber\@lr}{true}\pingu@color{lightsaber\@lr}{##1}},
- lightsaber \@lr/.default = pingu@blue,
- lightsaber \@lr\space handle/.code = \pingu@color{lightsaber\@lr @handle}{##1},%
- lightsaber \@lr\space deco/.code = \pingu@color{lightsaber\@lr @deco}{##1},%
- lightsaber \@lr\space ribbs/.code = \pingu@color{lightsaber\@lr @ribbs}{##1},%
- lightsaber \@lr\space button/.code = \pingu@color{lightsaber\@lr @button}{##1},%
- lightsaber \@lr\space button b/.code = \pingu@color{lightsaber\@lr @button@b}{##1},%
- lightsaber \@lr\space color b/.code = \pingu@color{lightsaber\@lr @color@b}{##1},%
- lightsaber \@lr\space length/.code = {\@namedef{pingu@x@lightsaber@length@\@lr}{##1}},%
- lightsaber \@lr\space length b/.code = {\@namedef{pingu@x@lightsaber@length@b@\@lr}{##1}},%
- lightsaber \@lr\space yshift/.code = {\@namedef{pingu@x@lightsaber@yshift@\@lr}{##1}},%
- lightsaber \@lr\space glow/.is if = @pingu@x@lightsaber@glow@\@lr,%
- lightsaber \@lr\space double/.is if = @pingu@x@lightsaber@double@\@lr,%
- lightsaber \@lr\space glow core/.code = \pingu@color{lightsaber\@lr @glow@core}{##1},%
- lightsaber \@lr\space solid/.style = {/pingu/lightsaber \@lr\space glow=false},
- lightsaber \@lr\space disabled/.style = {/pingu/lightsaber \@lr\space solid,/pingu/lightsaber \@lr=\@pingu@none},
- lightsaber \@lr\space outer glow factor/.code = {\@namedef{pingu@x@lightsaber@ogf@\@lr}{##1}}%
-}{lightsaber \@lr\space handle=pingu@silver, lightsaber \@lr\space deco=pingu@silver!12!pingu@black, lightsaber \@lr\space button=pingu@red!85!pingu@black,lightsaber \@lr\space button b=pingu@red!85!pingu@black, lightsaber \@lr\space ribbs=pingu@silver!50!pingu@black,lightsaber \@lr\space length=2cm,lightsaber \@lr\space glow=\ifpengu@setup@glows@ true\else false\fi,lightsaber \@lr\space glow core=white,lightsaber \@lr\space outer glow factor=\pingulightsaberfactor,lightsaber \@lr\space yshift=0pt,lightsaber \@lr\space length b=\csname pingu@x@lightsaber@length@\@lr\endcsname,lightsaber \@lr\space color b=\noexpand\@col}
-
-% #region lightsaber base
-\def\pingu@draw@wi@lightsaber@base#1{%
-% deco-elements
- % base
- \pingu@block{\csname pingu@color@lightsaber#1@deco\endcsname}(\pingu@name-wing-#1)++(-.4mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) -- ++(0,-5mm) -- ++(.8mm,0) |- cycle;
- \if@pingu@wing@item@side@left@
- % ribbs; single path saves memory :D
- \pingu@block{\csname pingu@color@lightsaber#1@ribbs\endcsname}(\pingu@name-wing-#1)++(-.40mm,2.225mm+\csname pingu@x@lightsaber@yshift@#1\endcsname)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
- arc(90:270:.075mm) -- ++(.8mm,0) |- cycle;
- % button
- \pingu@block{\csname pingu@color@lightsaber#1@button@b\endcsname}(\pingu@name-wing-#1)++(.49mm,-1.75mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm];
- \pingu@block{\csname pingu@color@lightsaber#1@button\endcsname}(\pingu@name-wing-#1)++(.49mm,1.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm];
- % cover
- \pingu@block{\csname pingu@color@lightsaber#1@handle\endcsname}(\pingu@name-wing-#1)++(-.5mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) arc(180:90:.15mm) -- ++(.7mm,0) arc(90:0:.16mm) -- ++(0,-5mm) arc(360:270:.15mm) -- ++(-.7mm,0) arc (270:180:.15mm) -- ++(0,.25mm) arc(270:360:.33mm and .2mm) -- ++(0,4.1mm) arc(0:90:.33mm and .2mm) -- ++(0,.25mm) -- cycle;
- \else
- % ribbs; single path saves memory :D (the second)
- \pingu@block{\csname pingu@color@lightsaber#1@ribbs\endcsname}(\pingu@name-wing-#1)++(.40mm,2.225mm+\csname pingu@x@lightsaber@yshift@#1\endcsname)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
- arc(90:-90:.075mm) -- ++(-.8mm,0) |- cycle;
- % buttons
- \pingu@block{\csname pingu@color@lightsaber#1@button@b\endcsname}(\pingu@name-wing-#1)++(-.49mm,-1.75mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm];
- \pingu@block{\csname pingu@color@lightsaber#1@button\endcsname}(\pingu@name-wing-#1)++(-.49mm,1.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm];
- % cover
- \pingu@block{\csname pingu@color@lightsaber#1@handle\endcsname}(\pingu@name-wing-#1)++(.5mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) arc(0:90:.15mm) -- ++(-.7mm,0) arc(90:180:.16mm) -- ++(0,-5mm) arc(180:270:.15mm) -- ++(.7mm,0) arc (270:360:.15mm) -- ++(0,.25mm) arc(270:180:.33mm and .2mm) -- ++(0,4.1mm) arc(180:90:.33mm and .2mm) -- ++(0,.25mm) -- cycle;
- \fi
-}
-% #endregion
-% #1 wing, #2 yshift, #3 angle, #4 length, #5 color
-\def\pingu@draw@wi@lightsaber@pre#1#2#3#4#5{
- \scope[rotate around={#3:(\pingu@name-wing-#1)}]
- \csname if@pingu@x@lightsaber@glow@#1\endcsname
- \@for\i:={0,2,4,6,7,8,9,10,11,12,13,14,15,16,17}\do{
- \pingu@block[fill opacity=\ifnum\i>14 .225\else.1\fi*\i/20]{#5} (\pingu@name-wing-#1)++(-\pingu@x@saberglow@w@half+\i*\i mm/440,#2) -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@w@half-.05mm-\i*\i mm/440 and \ifnum\i>14 .85mm\else\pingu@one\fi-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm);
- }
- \else % draw solid
- \pingu@block{#5} (\pingu@name-wing-#1)++(-.425mm,#2-.1mm) -- ++(.05mm,#4) arc(180:0:.375mm and .375mm) -- ++(.05mm,-#4) arc (0:-180:.425mm and .05mm);
- \fi
- \endscope
-}
-
-% #1 wing, #2 yshift, #3 angle, #4 length, #5 color
-\def\pingu@draw@wi@lightsaber@post#1#2#3#4#5{
- \scope[rotate around={#3:(\pingu@name-wing-#1)}]
- \csname if@pingu@x@lightsaber@glow@#1\endcsname
- \ifdim\csname pingu@x@lightsaber@ogf@#1\endcsname pt>\z@
- \pingu@layer{foreground}[]
- \pgfinterruptboundingbox
- \path[clip,/pingu/@invclip] (\pingu@name-wing-#1)++(-.275mm,#2-.1mm) -- ++(.1mm,#4) arc(180:0:.175mm and .25mm) -- ++(.1mm,-#4) arc (0:-180:.275mm and .065mm);
- \@for\i:={1,1.1,1.2,1.3,1.4}\do{
- \pingu@block[fill opacity=\csname pingu@x@lightsaber@ogf@#1\endcsname/\i]{#5} (\pingu@name-wing-#1) ++(.05mm,#2+#4/2) circle[radius=\i*#4];
- }
- \endpgfinterruptboundingbox
- \endpingu@layer
- \fi
- % fadings had a rotation angle bug
- \@for\i:={1,2}\do{
- \pingu@block[fill opacity=.125*\i/10]{#5} (\pingu@name-wing-#1)++(-\pingu@x@saberglow@w@half+\i*\i mm/440,#2) -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@w@half-.05mm-\i*\i mm/440 and \pingu@one-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm);
- }
- \pingu@block{\csname pingu@color@lightsaber#1@glow@core\endcsname} (\pingu@name-wing-#1)++(-.275mm,#2-.1mm) -- ++(.1mm,#4) arc(180:0:.175mm and .25mm) -- ++(.1mm,-#4) arc (0:-180:.275mm and .065mm);
- \fi
- \endscope
-}
-
-% #1 wing
-\def\pingu@draw@wi@lightsaber#1{%
- \pingu@setup@wing{lightsaber}{#1}%
- \scope[rotate around={\@angle:([yshift=+\csname pingu@x@lightsaber@yshift@#1\endcsname]\pingu@name-wing-#1)},xscale=1.2]
- \pingu@draw@wi@lightsaber@pre{#1}{2.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname}{0}{\csname pingu@x@lightsaber@length@#1\endcsname}{\@col}
- \csname if@pingu@x@lightsaber@double@#1\endcsname
- \pingu@draw@wi@lightsaber@pre{#1}{2.65mm-\csname pingu@x@lightsaber@yshift@#1\endcsname}{180}{\csname pingu@x@lightsaber@length@b@#1\endcsname}{\csname pingu@color@lightsaber#1@color@b\endcsname}
- \fi
- \pingu@draw@wi@lightsaber@base{#1}
- % afterglow (whuile watching everglow :D)
- \pingu@draw@wi@lightsaber@post{#1}{2.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname}{0}{\csname pingu@x@lightsaber@length@#1\endcsname}{\@col}
- \csname if@pingu@x@lightsaber@double@#1\endcsname
- \pingu@draw@wi@lightsaber@post{#1}{2.65mm-\csname pingu@x@lightsaber@yshift@#1\endcsname}{180}{\csname pingu@x@lightsaber@length@b@#1\endcsname}{\csname pingu@color@lightsaber#1@color@b\endcsname}
- \fi
- \endscope
-}
-
-
-\newif\if@pingu@x@lightstaff@glow@left
-\newif\if@pingu@x@lightstaff@glow@right
-\pingu@create@wing@extra{lightstaff}{%
- light-staff \@lr/.code = {\pingu@set@extra{lightstaff\@lr}{true}\pingu@color{lightstaff\@lr}{##1}},
- light-staff \@lr/.default = pingu@green,
- light-staff \@lr\space length/.code =\expandafter\def\csname pingu@lightstaff@\@lr @length\endcsname{##1},
- light-staff \@lr\space glow length/.code =\expandafter\def\csname pingu@lightstaff@\@lr @glow@length\endcsname{##1},
- light-staff \@lr\space head/.code = \pingu@color{lightstaff\@lr}{##1},%
- light-staff \@lr\space staff/.code = \pingu@color{lightstaff@\@lr @staff}{##1},%
- light-staff \@lr\space core/.code = \pingu@color{lightstaff@\@lr @head@core}{##1},%
- light-staff \@lr\space core width/.code = \expandafter\def\csname pingu@lightstaff@\@lr @core@width\endcsname{##1},%
- light-staff \@lr\space glow/.is if = @pingu@x@lightstaff@glow@\@lr,%
- light-staff \@lr\space outer glow factor/.code = {\@namedef{pingu@x@lightstaff@ogf@\@lr}{##1}},%
-}{light-staff \@lr\space length=28mm,light-staff \@lr\space staff=pingu@bronze,light-staff \@lr\space head=pingu@green,light-staff \@lr\space core=pingu@white,light-staff \@lr\space glow=\ifpengu@setup@glows@ true\else false\fi,light-staff \@lr\space outer glow factor=.022,light-staff \@lr\space glow length=13mm,light-staff \@lr\space core width=.44mm}
-\def\pingu@draw@wi@lightstaff#1{%
- \pingu@setup@wing{lightstaff}{#1}%
-\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
- \pingu@block{\csname pingu@color@lightstaff@#1@staff\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,-11mm) -- ++(0,\csname pingu@lightstaff@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-lightstaff-#1-top) -- ++(0,-\csname pingu@lightstaff@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
- \pingu@draw@wi@lightstaff@pre{#1}{[yshift=-1.1mm]\pingu@name-lightstaff-#1-top}{\@col}
- \pingu@block{\csname pingu@color@lightstaff@#1@head@core\endcsname} ([yshift=-1.1mm]\pingu@name-lightstaff-#1-top) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(0,2mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,-1mm) -- ++(0,-2mm) -- cycle;
- \pingu@draw@wi@lightstaff@post{#1}{[yshift=-1.1mm]\pingu@name-lightstaff-#1-top}{\@col}
-\endscope
-}
-
-% #1 wing, #2 start, #3 color
-\def\pingu@draw@wi@lightstaff@pre#1#2#3{
-\csname if@pingu@x@lightstaff@glow@#1\endcsname
-\@for\i:={0,1,2,3,6,7,9,10,13}\do{
- \pingu@block[fill opacity=\ifnum\i>14 .225\else.1\fi*\i/20]{#3} (#2)++(0,-\i mm/15) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname-\i mm/30,1mm+\i mm/30) -- ++(0,2mm+\i mm/15) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,1mm+\i mm/30) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,-1mm-\i mm/30) -- ++(0,-2mm-\i mm/15) -- cycle;
- % -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@w@half-.05mm-\i*\i mm/440 and \ifnum\i>14 .85mm\else\pingu@one\fi-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm);
-}
-\else % draw solid
- \pingu@block{#3} (#2) -- ++(-.55mm,1mm) -- ++(0,2mm) -- ++(.55mm,1mm) -- ++(.55mm,-1mm) -- ++(0,-2mm) -- cycle;
-\fi
-}
-
-\def\pingu@draw@wi@lightstaff@post#1#2#3{
-\csname if@pingu@x@lightstaff@glow@#1\endcsname
-\ifdim\csname pingu@x@lightstaff@ogf@#1\endcsname pt>\z@
-\pingu@layer{foreground}[]
-\pgfinterruptboundingbox
-\@for\i:={1,1.1,1.2,1.3,1.4}\do{
- \pingu@block[fill opacity=\csname pingu@x@lightstaff@ogf@#1\endcsname/\i]{#3} (#2)++(0,2mm) circle[radius=\i*\csname pingu@lightstaff@#1@glow@length\endcsname];
-}
-\endpgfinterruptboundingbox
-\pingu@block[opacity=.65]{\csname pingu@color@lightstaff@#1@head@core\endcsname} (#2)++(0,.5mm) -- ++(-.20mm,.75mm) -- ++(0,1.5mm) -- ++(.20mm,.75mm) -- ++(.20mm,-.75mm) -- ++(0,-1.5mm) -- cycle;
-\endpingu@layer
-\fi
-% fadings hat a rotation angle bug
-\@for\i:={1,2}\do{
- \pingu@block[fill opacity=.125*\i/10]{#3} (#2)++(0,-\i mm/15+2mm) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname-\i mm/30,1mm+\i mm/30) -- ++(0,2mm+\i mm/15) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,1mm+\i mm/30) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,-1mm-\i mm/30) -- ++(0,-2mm-\i mm/15) -- cycle;
-}
-\pingu@block{\csname pingu@color@lightstaff@#1@head@core\endcsname} (#2) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(0,2mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,-1mm) -- ++(0,-2mm) -- cycle;
-\fi
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-shirts.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-shirts.lib.tex
deleted file mode 100644
index ce337dd4b1..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-shirts.lib.tex
+++ /dev/null
@@ -1,63 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\newif\if@pingu@shirt@above
-\pingu@create@extra{shirt}{%
- shirt/.code = \pingu@set@extra{shirt}{true}\pingu@color{shirt}{#1},
- shirt/.default = pingu@bronze,
- shirt above/.is if = @pingu@shirt@above,
- shirt raise/.code = \def\pingu@shirt@raise{#1},
- shirt padding/.code = \def\pingu@shirt@padding{#1},
- shirt button top/.code = \pingu@color{shirt@button@top}{#1},
- shirt button middle/.code = \pingu@color{shirt@button@middle}{#1},
- shirt button bottom/.code = \pingu@color{shirt@button@bottom}{#1},
- shirt buttons/.style = {/pingu/shirt button top={#1}, /pingu/shirt button middle={#1}, /pingu/shirt button bottom={#1}},
- shirt button top shade/.code = \pingu@color{shirt@button@top@shade}{#1},
- shirt button middle shade/.code = \pingu@color{shirt@button@middle@shade}{#1},
- shirt button bottom shade/.code = \pingu@color{shirt@button@bottom@shade}{#1},
- shirt buttons shade/.style = {/pingu/shirt button top shade={#1}, /pingu/shirt button middle shade={#1}, /pingu/shirt button bottom shade={#1}},
- shirt without buttons/.forward to=/pingu/shirt no buttons,
- shirt no buttons/.style = {/pingu/shirt buttons=\@pingu@none, /pingu/shirt buttons shade=\@pingu@none},
-}{shirt buttons=pingu@black,shirt padding=0mm,shirt button top shade=\pingu@color@shirt@button@top!70!\pingu@color@shirt!70!white,shirt button middle shade=\pingu@color@shirt@button@middle!70!\pingu@color@shirt!70!white,shirt button bottom shade=\pingu@color@shirt@button@bottom!70!\pingu@color@shirt!70!white,shirt raise=2.25mm,shirt above=false}
-\def\pingu@draw@cloth@shirt@behind{}
-
-\def\pingu@draw@cloth@shirt@middle{\if@pingu@shirt@above\else\pingu@draw@cloth@shirt@main\fi}
-
-\def\pingu@draw@cloth@shirt@main{%
-\coordinate (\pingu@name-shirt-low) at ([yshift=\pingu@shirt@raise]\pingu@name-belly-center);
-\pingu@block{\pingu@color@shirt} [rounded corners=.131mm] ([xshift=.2mm,yshift=.18mm]\pingu@name-head-back-con-right) -- (\pingu@name-shirt-low) -- ([xshift=-.1mm,yshift=.24mm]\pingu@name-head-back-con-left) to[bend left=12] (\pingu@name-waist-left) to[bend left=3] ([xshift=\pingu@shirt@padding]\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=10] ([yshift=-1.1\pingu@one]\pingu@name-bottom-center) to[bend left=10] ([xshift=-\pingu@shirt@padding]\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=3] (\pingu@name-waist-right) to[bend left=12] (\pingu@name-head-back-con-right) -- cycle;
-
-\coordinate (\pingu@name-shirt-bt) at ([yshift=-\pingu@one]\pingu@name-shirt-low);
-\pingu@block{\pingu@color@shirt@button@top}(\pingu@name-shirt-bt) circle[radius=.4mm];
-\pingu@block{\pingu@color@shirt@button@middle}(\pingu@name-shirt-bt)++(0,-1.35mm)circle[radius=.4mm];
-\pingu@block{\pingu@color@shirt@button@bottom}(\pingu@name-shirt-bt)++(0,2*-1.35mm)circle[radius=.4mm];
-\pingu@block[even odd rule]{\pingu@color@shirt@button@top@shade}(\pingu@name-shirt-bt) circle[radius=.4mm] circle[radius=.465mm];
-\pingu@block[even odd rule]{\pingu@color@shirt@button@middle@shade}(\pingu@name-shirt-bt)++(0,-1.35mm)circle[radius=.4mm] circle[radius=.465mm];
-\pingu@block[even odd rule]{\pingu@color@shirt@button@bottom@shade}(\pingu@name-shirt-bt)++(0,2*-1.35mm)circle[radius=.4mm] circle[radius=.465mm];
-\@for\i:={0,90,180,270}\do{
- \pingu@block{\pingu@color@shirt@button@top@shade} (\pingu@name-shirt-bt)++(\i:.
- 25mm) circle[radius=.065mm];
- \pingu@block{\pingu@color@shirt@button@middle@shade} (\pingu@name-shirt-bt)++(0,-1.35mm)++(\i:.25mm) circle[radius=.065mm];
- \pingu@block{\pingu@color@shirt@button@bottom@shade} (\pingu@name-shirt-bt)++(0,2*-1.35mm)++(\i:.25mm) circle[radius=.065mm];
-}}
-
-% TODO: if flags to draw parts
-\def\pingu@draw@cloth@shirt{\if@pingu@shirt@above\pingu@draw@cloth@shirt@main\fi}
-
-\pingu@create@extra{secondshirt}{%
- second shirt/.code = \pingu@set@extra{secondshirt}{true}\pingu@color{secondshirt}{#1},
- second shirt raise/.code = \def\pingu@secondshirt@raise{#1},
- second shirt neck/.code = \pingu@color{secondshirt@neck}{#1},
- second shirt/.default = purple,
-}{second shirt raise=3.35mm,second shirt neck=\pingu@color@secondshirt!32!pingu@white}
-\def\pingu@draw@cloth@secondshirt@behind{}
-
-\def\pingu@draw@cloth@secondshirt@middle{%
-\coordinate (\pingu@name-secondshirt-low) at ([yshift=\pingu@secondshirt@raise]\pingu@name-belly-center);
-\pingu@block{\pingu@color@secondshirt} [rounded corners=.131mm] ([xshift=.2mm,yshift=.05mm]\pingu@name-head-back-con-right) -- (\pingu@name-secondshirt-low) -- ([xshift=-.16mm,yshift=.09mm]\pingu@name-head-back-con-left) to[bend left=12] (\pingu@name-waist-left) to[bend left=3] ([xshift=-.22mm]\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=10] ([yshift=-1\pingu@one]\pingu@name-bottom-center) to[bend left=10] ([xshift=.22mm]\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=3] (\pingu@name-waist-right) to[bend left=12] (\pingu@name-head-back-con-right) -- cycle;
-\pingu@draw{\pingu@color@secondshirt@neck} [rounded corners=.131mm] ([xshift=.025mm,yshift=-.09mm]\pingu@name-head-back-con-right) -- ([xshift=.2mm,yshift=.05mm]\pingu@name-head-back-con-right) -- (\pingu@name-secondshirt-low) -- ([xshift=-.19mm,yshift=.09mm]\pingu@name-head-back-con-left) -- ([xshift=-.02mm,yshift=-.02mm]\pingu@name-head-back-con-left);
-}
-
-% TODO: if flags to draw parts
-\def\pingu@draw@cloth@secondshirt{%
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-signs.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-signs.lib.tex
deleted file mode 100644
index f1a42a0556..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-signs.lib.tex
+++ /dev/null
@@ -1,53 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@wing@extra{signpost}{%
- signpost \@lr/.forward to = /pingu/sign post \@lr,
- sign post \@lr/.code = {\pingu@set@extra{signpost\@lr}{true}\@namedef{pingu@signpost@\@lr}{##1}},
- sign post \@lr/.default = {},
- signpost \@lr\space color/.forward to = /pingu/sign post \@lr\space color,
- sign post \@lr\space color/.code = \pingu@color{signpost\@lr}{##1},
- signpost \@lr\space fontcolor/.forward to = /pingu/sign post \@lr\space font color,
- sign post \@lr\space font color/.code = \pingu@color{signpost\@lr @font}{##1},
-}{sign post \@lr\space color=brown!70!black, sign post \@lr\space font color=white!90!brown}
-\def\pingu@draw@wi@signpost#1{%
- \pingu@setup@wing{signpost}{#1}%
- \def\@rot{\if@pingu@wing@item@side@left@-5\else+5\fi}%
-\scope[rotate around={\@angle+\@rot:(\pingu@name-wing-#1)}]
- \pingu@block[thick]{\@col}(\pingu@name-wing-#1)++(\@sidesign*-.225mm,-2mm) -- ++(0,15mm) arc(180:0:\@sidesign*.45mm and .375mm) -- ++(0,-15mm) arc(360:180:\@sidesign*.45mm and .375mm) -- cycle;
- \path (\pingu@name-wing-#1)++(\@sidesign*.225mm,13mm) node[fill=\@col,rounded corners=2\p@,minimum width=14mm,minimum height=8mm,align=center,rotate=\@angle+\@rot,text=\csname pingu@color@signpost#1@font\endcsname] {\csname pingu@signpost@#1\endcsname};
-\endscope
-}
-
-\pingu@create@extra{banner}{%
- banner/.code = \pingu@set@extra{banner}{true}\@namedef{pingu@banner}{#1},
- banner/.default = Bannertext,
- banner band/.code = \pingu@color{banner@band}{#1},
- banner text color/.code = \pingu@color{banner@text@color}{#1},
- banner sticks color/.style={/pingu/banner stick left color=#1,/pingu/banner stick right color=#1},
- banner stick left color/.code = \pingu@color{banner@stick@left}{#1},
- banner stick right color/.code = \pingu@color{banner@stick@right}{#1},
- banner sticks length/.style={/pingu/banner stick left length=#1,/pingu/banner stick right length=#1},
- banner stick left length/.code = \@namedef{pingu@banner@stick@left@l}{#1},
- banner stick right length/.code = \@namedef{pingu@banner@stick@right@l}{#1},
- banner raise/.code = \@namedef{pingu@banner@raise}{#1},
- banner height/.code = \@namedef{pingu@banner@height}{#1},
- banner font/.code = \@namedef{pingu@banner@font}{#1},
- banner bent/.code = \@namedef{pingu@banner@bent}{#1}
-}{banner band=pingu@white!91!pingu@black,banner text color=pingu@black,banner sticks color=pingu@bronze,banner stick left length=20mm, banner stick right length=20mm,banner bent=30,banner raise=-1mm,banner height=4mm,banner font=\bfseries}
-
-\usetikzlibrary{decorations.text}
-\def\pingu@draw@ea@banner{%
-\pingu@setup@wing{staff}{left}% we do not need the staff color, but we will use it
-\scope[rotate around={\@angle:(\pingu@name-wing-left)}]
- \pingu@block{\pingu@color@banner@stick@left}(\pingu@name-wing-left)++(\@sidesign*-.2mm,-7mm) -- ++(0,\pingu@banner@stick@left@l) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-s-left) -- ++(0,-\pingu@banner@stick@left@l) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
- \path (\pingu@name-s-left)++(.5mm,\pingu@banner@height) coordinate (\pingu@name-s-left-top) ++(0,-2*\pingu@banner@height) coordinate (\pingu@name-s-left-bot);
-\endscope
-\pingu@setup@wing{staff}{right}% we do not need the staff color, but we will use it
-\scope[rotate around={\@angle:(\pingu@name-wing-right)}]
- \pingu@block{\pingu@color@banner@stick@right}(\pingu@name-wing-right)++(\@sidesign*-.2mm,-7mm) -- ++(0,\pingu@banner@stick@right@l) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-s-right) -- ++(0,-\pingu@banner@stick@right@l) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
- \path (\pingu@name-s-right)++(-.5mm,\pingu@banner@height) coordinate (\pingu@name-s-right-top) ++(0,-2*\pingu@banner@height) coordinate (\pingu@name-s-right-bot);
-\endscope
-\pingu@block[rounded corners=.3mm]{\pingu@color@banner@band} (\pingu@name-s-left-top) to[bend right=\pingu@banner@bent] (\pingu@name-s-right-top) -- (\pingu@name-s-right-bot) to[bend left=\pingu@banner@bent] (\pingu@name-s-left-bot) -- cycle;
-\path[postaction={decorate},decoration={text color=\pingu@color@banner@text@color,text along path, raise=\pingu@banner@raise, text={|\pingu@banner@font|\pingu@banner},text align={center,left indent=1mm,right indent=1mm}}] (\pingu@name-s-right) to[bend left=\pingu@banner@bent+3] (\pingu@name-s-left);
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-sport.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-sport.lib.tex
deleted file mode 100644
index 257f8685da..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-sport.lib.tex
+++ /dev/null
@@ -1,79 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{medal}{%
- medal/.code = {\pingu@set@extra{medal}{true}\pingu@color{medal}{#1}},
- medal/.default = pingu@yellow,%
- gold medal/.style = {medal, medal text=#1}, gold medal/.default={1},
- silver medal/.style = {medal=pingu@silver, medal text=#1}, silver medal/.default={2},
- bronze medal/.style = {medal=pingu@bronze, medal text=#1}, bronze medal/.default={3},
- medal band/.code = \pingu@color{medal@band}{#1},%
- medal shade/.code = \pingu@color{medal@shade}{#1},%
- medal shade width/.code = \def\pingu@medal@shade@w{#1},%
- medal text/.code = \def\pingu@x@medal@text{#1},%
- medal text style/.style = {\pingu@color@medal!65!pingu@white},
-}{medal band=pingu@red,medal text={},medal shade={\pingu@color@medal!65!pingu@white},medal shade width=.75\p@}
-
-\def\pingu@draw@eb@medal{%
-\coordinate (\pingu@name-medal-center) at ([yshift=1.25mm]\pingu@name-belly-center);
-\pingu@block{\pingu@color@medal@band} [rounded corners=.15mm] (\pingu@name-head-back-con-right) -- (\pingu@name-medal-center) -- (\pingu@name-head-back-con-left) to[bend left=11] ++(-1.35mm,-.5mm) -- ([yshift=.7mm]\pingu@name-medal-center) -- ([xshift=1.35mm,yshift=-.5mm]\pingu@name-head-back-con-right) to[bend left=11] (\pingu@name-head-back-con-right) -- cycle;
-\pingu@block{\pingu@color@medal} (\pingu@name-medal-center) circle [radius=2.35mm];
-\pingu@draw[line width=\pingu@medal@shade@w]{\pingu@color@medal@shade} (\pingu@name-medal-center) circle [radius=2.35mm];
-\node[/pingu/@text,/pingu/medal text style] at (\pingu@name-medal-center) {\pingu@x@medal@text};
-}
-\newif\if@pingu@x@headband@knot@
-\newif\if@pingu@x@headband@bands@
-\pingu@create@extra{headband}{%
- headband/.forward to = /pingu/head band,
- head-band/.forward to = /pingu/head band,
- head band/.code = \pingu@set@extra{headband}{true}\pingu@color{headband}{#1},
- head band/.default = pingu@red,
- headband bend/.forward to = /pingu/head band bend,
- head-band bend/.forward to = /pingu/head band bend,
- head band bend/.code = \def\pingu@x@headband@bend{#1},
- headband angle/.forward to = /pingu/head band angle,
- head-band angle/.forward to = /pingu/head band angle,
- head band angle/.code = \def\pingu@x@headband@angle{#1},
- headband upper angle/.forward to = /pingu/head band upper angle,
- head-band upper angle/.forward to = /pingu/head band upper angle,
- head band upper angle/.code = \def\pingu@x@headband@upangle{#1},
- % knot
- headband knot/.forward to = /pingu/head band knot,
- head-band knot/.forward to = /pingu/head band knot,
- head band knot/.is if = @pingu@x@headband@knot@,
- headband knot color/.forward to = /pingu/head band knot color,
- head-band knot color/.forward to = /pingu/head band knot color,
- head band knot color/.code = \pingu@color{headband@knot}{#1},
- headband knot a color/.forward to = /pingu/head band knot a color,
- head-band knot a color/.forward to = /pingu/head band knot a color,
- head band knot a color/.code = \pingu@color{headband@knot@a}{#1},
- headband knot b color/.forward to = /pingu/head band knot b color,
- head-band knot b color/.forward to = /pingu/head band knot b color,
- head band knot b color/.code = \pingu@color{headband@knot@b}{#1},
- headband bands/.forward to = /pingu/head band bands,
- head-band bands/.forward to = /pingu/head band bands,
- head band bands/.is if = @pingu@x@headband@bands@,
- headband bands a color/.forward to = /pingu/head band bands a color,
- head-band bands a color/.forward to = /pingu/head band bands a color,
- head band bands a color/.code = \pingu@color{headband@bands@a}{#1},
- headband bands b color/.forward to = /pingu/head band bands b color,
- head-band bands b color/.forward to = /pingu/head band bands b color,
- head band bands b color/.code = \pingu@color{headband@bands@b}{#1},
-}{head band bend=9, head band angle=16,head band upper angle=49, head band knot color=\pingu@color@headband!78!black,head band knot a color=\pingu@color@headband@knot!90!black,head band knot b color=\pingu@color@headband@knot@a,head band bands,head band bands a color=\pingu@color@headband!78!black,head band bands b color=\pingu@color@headband}
-
-\def\pingu@draw@ea@headband@wh{1.25mm}
-\def\pingu@draw@ea@headband{%
- \path (\pingu@name-head-center)+(\pingu@x@headband@upangle-\pingu@x@headband@angle:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-head-band-lower);
- \path (\pingu@name-head-center)+(\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-head-band-upper);
- \if@pingu@x@headband@bands@
- \pingu@block{\pingu@color@headband@bands@a} (\pingu@name-head-band-lower) to[out=-50,in=75] ++(2.75mm,-4mm) to[bend right] ++(.6mm,0) to[out=80,in=-5] (\pingu@name-head-band-upper) -- cycle;
- \pingu@block{\pingu@color@headband@bands@b} (\pingu@name-head-band-lower) to[out=-80,in=80] ++(1.75mm,-3.35mm) to[bend right] ++(.45mm,0) to[out=80,in=-8] (\pingu@name-head-band-upper) -- cycle;
- \fi
- \pingu@block{\pingu@color@headband} (\pingu@name-head-center)+(\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) to[bend left=\pingu@x@headband@bend] coordinate[pos=.5] (\pingu@name-headband-center-a) +(180-\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) arc(180-\pingu@x@headband@upangle:180-\pingu@x@headband@upangle+\pingu@x@headband@angle:\pingu@w@half{} and \pingu@head@h@half) to[bend right=\pingu@x@headband@bend] coordinate[pos=.5] (\pingu@name-headband-center-b) (\pingu@name-head-band-lower) arc(\pingu@x@headband@upangle-\pingu@x@headband@angle:\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) -- cycle;
- \path (\pingu@name-headband-center-a) -- (\pingu@name-headband-center-b) coordinate[pos=.5] (\pingu@name-headband-center);
- \if@pingu@x@headband@knot@
- \pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot@a} (\pingu@name-headband-center-a)++(-.15mm,-.6mm) to[out=155,in=-5] ++(-3mm,\pingu@one) to[bend right=15] ([xshift=-3mm,yshift=-.2mm]\pingu@name-headband-center-b) to[in=-155,out=5] ++(.285cm,.8mm) -- cycle;
- \pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot@b} (\pingu@name-headband-center-a)++(.15mm,-.6mm) to[out=25,in=-175] ++(3mm,\pingu@one) to[bend left=15] ([xshift=3mm,yshift=-.2mm]\pingu@name-headband-center-b) to[in=-25,out=175] ++(-.285cm,.8mm) -- cycle;
- \pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot} (\pingu@name-headband-center-a)++(-\pingu@draw@ea@headband@wh,.12mm) to[bend right=9] ++(2*\pingu@draw@ea@headband@wh,0) -- ([xshift=\pingu@draw@ea@headband@wh,yshift=-.12mm]\pingu@name-headband-center-b) to[bend right=9] ++(-2*\pingu@draw@ea@headband@wh, 0) -- cycle;
- \fi
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus-technology.lib.tex b/graphics/pgf/contrib/tikzpingus/tikzpingus-technology.lib.tex
deleted file mode 100644
index fbb2f48419..0000000000
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus-technology.lib.tex
+++ /dev/null
@@ -1,126 +0,0 @@
-% Florian Sihler, 2022
-% Licensed under GNU General Public License version 3
-% https://opensource.org/licenses/gpl-3.0.html
-\pingu@create@extra{vrheadset}{%
- vr-headset/.code = \pingu@set@extra{vrheadset}{true}\pingu@color{vrheadset}{#1},
- vr-headset/.default = pingu@black!92!gray,
- vr-headset band/.code = \pingu@color{vrheadset@band}{#1},
- vr-headset band top/.code = \pingu@color{vrheadset@band@top}{#1},
- vr-headset text/.code = \def\pingu@x@vrheadset@text{#1},
- vr-headset text color/.code = \pingu@color{vrheadset@text@color}{#1},
- vr-headset hair/.style = {/pingu/hair 2=!hide,/pingu/hair 3=!hide,/pingu/hair 4=!hide}
-}{vr-headset band=\pingu@color@vrheadset!92!gray,vr-headset text={\textit{\textsf{VR\thinspace\texttrademark}}},vr-headset text color=pingu@white,vr-headset band top=\pingu@color@vrheadset!96!gray}
-
-\def\pingu@draw@ea@vrheadset{%
-\pingu@layer{middle}[]
- \pingu@block{\pingu@color@vrheadset} [rounded corners=1.25mm]([yshift=3.45mm]\pingu@name-waist-right|-\pingu@name-eye-right) to[bend left=2] coordinate[pos=.5] (@) ([yshift=3.45mm]\pingu@name-waist-left|-\pingu@name-eye-left) to[bend left=3] coordinate (\pingu@name-vrh-ol) ++(0,-6.25mm) to[bend left=13] ([yshift=-1mm]\pingu@name-head-center) to[bend left=13] ([yshift=3.45mm-6.25mm]\pingu@name-waist-right|-\pingu@name-eye-right) -- cycle;
- \path (\pingu@name-vrh-ol)++(-2.25mm,2mm) node[text=\pingu@color@vrheadset@text@color,scale=.25] {\pingu@x@vrheadset@text};
-\endpingu@layer
-\if@pingu@do@back@\else
- % top band
- \pingu@block[rounded corners=1pt]{\pingu@color@vrheadset@band@top} (@)++(-1.05mm+.15mm,0) to[bend right=2] ([xshift=-.85mm+.3mm,yshift=.3mm]\pingu@name-head-top) to[bend left=2] ++(1.6mm,0) to[bend left=2] ([xshift=1.25mm+.15mm]@);
-\fi
- % we draw a band for the background
-\pingu@layer{background}[]
-\pingu@block[line cap=round]{\pingu@color@vrheadset@band} ([yshift=1mm]\pingu@name-waist-right|-\pingu@name-eye-right) to[bend left=3] coordinate[pos=.5] (@b) ([yshift=1mm]\pingu@name-waist-left|-\pingu@name-eye-left) arc(90:-90:.25mm and 1mm) to[bend right=3] ([yshift=-1mm]\pingu@name-waist-right|-\pingu@name-eye-right) arc (270:90:.25mm and 1mm);
-\pingu@block[rounded corners=1pt]{\pingu@color@vrheadset@band@top} (@b)++(-1.25mm+.2mm,-1.25mm) to[bend right=2] ([xshift=-.85mm+.3mm,yshift=.3mm]\pingu@name-head-top) to[bend right=2] ++(1.6mm,0) to[bend right=2] ([xshift=1.15mm+.2mm,yshift=-1.25mm]@b) -- cycle;
-\endpingu@layer
-}
-\pingu@create@extra{headphone}{%
- headphones/.forward to = /pingu/headphone,
- headphone/.code = \pingu@set@extra{headphone}{true}\pingu@color{headphone}{#1},
- headphone/.default = pingu@blue!80!pingu@black,
- headphone left/.code = \pingu@color{headphone@left}{#1},
- headphone right/.code = \pingu@color{headphone@right}{#1},
- headphones outer/.forward to = /pingu/headphone outer,
- headphone outer/.style = {/pingu/headphone left outer=#1,/pingu/headphone right outer=#1}, headphone outer/.default = pingu@black,
- headphone left outer/.code = \pingu@color{headphone@left@p}{#1}, headphone left outer/.default =pingu@black,
- headphone right outer/.code = \pingu@color{headphone@right@p}{#1}, headphone right outer/.default=pingu@black,
- headphones inner/.forward to = /pingu/headphone inner,
- headphone inner/.style = {/pingu/headphone left inner=#1,/pingu/headphone right inner=#1}, headphone inner/.default = pingu@black,
- headphone left inner/.code = \pingu@color{headphone@left@i}{#1}, headphone left inner/.default = pingu@black,
- headphone right inner/.code = \pingu@color{headphone@right@i}{#1}, headphone right inner/.default=pingu@black,
-}{headphone left=\pingu@color@headphone!65!pingu@black,headphone right=\pingu@color@headphone@left,headphone left outer=\@pingu@none,
-,headphone right outer=\@pingu@none,,headphone left inner=\@pingu@none,
-,headphone right inner=\@pingu@none}
-
-\def\pingu@draw@ea@headphone{%
-\if@pingu@do@back@ \pingu@layer{background}[] \fi
- \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right@p} ([xshift=-\pingu@one,yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (93:273:.565mm and 2.11mm) -- ++(.8mm,.075mm) -- ++(0,4.075mm);
- \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right@i} ([xshift=\pingu@one-.366mm,yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (87:-93:.565mm and 2.14mm) -- ++(-.8mm,.075mm) -- ++(0,4.075mm) -- cycle;
- \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right} ([xshift=-\pingu@one+.2mm,yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (92:272:.565mm and 2.1mm) -- ++(.8mm,-.05mm) arc (270:450:.425mm and 2.1mm) -- cycle;
- \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left@p} ([xshift=\pingu@one,yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (87:-93:.565mm and 2.11mm) -- ++(-.8mm,.075mm) -- ++(0,4.075mm) -- cycle;
- \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left@i} ([xshift=-\pingu@one+.366mm,yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (93:273:.565mm and 2.14mm) -- ++(.8mm,.075mm) -- ++(0,4.075mm);
- \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left} ([xshift=\pingu@one-.2mm,yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (88:-92:.565mm and 2.1mm) -- ++(-.8mm,-.05mm) arc (270:90:.425mm and 2.1mm) -- cycle;
- \pingu@block{\pingu@color@headphone} ([xshift=-\pingu@one,yshift=\pingu@one]\pingu@name-wings-side-right|-\pingu@name-eye-right)
- arc(180:0:{\pingu@one+\pingu@w@half} and {\pingu@head@h@half-.5\pingu@one}) arc(0:-180:.65mm and .33mm)
- arc(0:180:{\pingu@one+\pingu@w@half-2*.65mm} and {\pingu@head@h@half+.33\pingu@one-2*.6mm-1.1\pingu@one})
- arc(0:-180:.65mm and .33mm) -- cycle;
-\if@pingu@do@back@ \endpingu@layer \fi
-}
-
-\pingu@create@wing@extra{vrcontroller}{%
-vr-controller \@lr/.code = {\pingu@set@extra{vrcontroller\@lr}{true}\pingu@color{vrcontroller\@lr}{##1}},
-vr-controller \@lr/.default = pingu@green,
-vr-controller \@lr\space handle/.code = \pingu@color{vrcontroller\@lr @handle}{##1},%
-vr-controller \@lr\space second/.code = \pingu@color{vrcontroller\@lr @second}{##1},%
-vr-controller \@lr\space second shade/.code = \pingu@color{vrcontroller\@lr @second@shade}{##1}%
-}{vr-controller \@lr\space handle={\csname pingu@color@vrcontroller\@lr\endcsname!76!pingu@black},vr-controller \@lr\space second={\csname pingu@color@vrcontroller\@lr\endcsname!56!pingu@black},vr-controller \@lr\space second shade={\csname pingu@color@vrcontroller\@lr\endcsname!96!pingu@black}}
-
-% #1 wing
-\def\pingu@draw@wi@vrcontroller#1{%
- \pingu@setup@wing{vrcontroller}{#1}%
- \pingu@block[rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@handle\endcsname}(\pingu@name-wing-#1)++(.5mm,5mm) to[bend right=1] ++(-.25mm,-5.5mm) arc (0:-180:.325mm and .1mm) to[bend right=1] ++(-.7mm,5.5mm) -- cycle coordinate[pos=.5] (@);
- \def\@y{2.06mm} \def\@@y{.78mm}
- \pingu@block[rotate around={\@angle:(\pingu@name-wing-#1)},even odd rule]{\csname pingu@color@vrcontroller#1@second\endcsname}([yshift=.1mm]@) arc (90:450:{\@y} and 1mm) coordinate[pos=.25] (@r) coordinate[pos=.75] (@l) ([yshift=-.6mm]@) arc (90:0:{\@@y} and .25mm) arc (0:-180:{\@@y} and .35mm) arc (180:90:{\@@y} and .25mm);
- % \pingu@draw[rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@second@shade\endcsname} ([yshift=-.9mm]@)++(180:{\@@y} and .3mm) arc (180:0:{\@@y} and .3mm);
- \def\@toruslow{(@l) to[bend left=7] ++(-.2mm,-.875mm) to[bend left=15] coordinate[pos=.95] (@c) ++(-2*\@y+.4mm,0) [sharp corners] to[bend left=7] ++(-.2mm,.875mm) to[bend right=30] cycle}
- \pingu@block[rounded corners=.1mm,rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@second\endcsname} \@toruslow;
- \scope[rounded corners=.1mm,rotate around={\@angle:(\pingu@name-wing-#1)}]
- \clip \@toruslow;
- \pingu@block[opacity=.1]{black} (@l) to[bend left=14] (@c) -- ++(0,-2mm) -| cycle;
- \endscope
-}
-
-
-\pingu@create@wing@extra{laptop}{%
- laptop \@lr/.code = {\pingu@set@extra{laptop\@lr}{true}\pingu@color{laptop\@lr}{##1}},
- laptop \@lr/.default = gray!80!pingu@white,
- laptop \@lr\space bracket/.code = \pingu@color{laptop\@lr @bracket}{##1},
- laptop \@lr\space lower/.code = \pingu@color{laptop\@lr @lower}{##1},
- laptop \@lr\space key/.code = \pingu@color{laptop\@lr @key}{##1},
- laptop \@lr\space display/.code = \pingu@color{laptop\@lr @display}{##1},
- laptop \@lr\space content/.code = \@namedef{pingu@x@laptop\@lr @content}{##1}, % tikz content
- laptop \@lr\space mid/.code = \@namedef{pingu@x@laptop\@lr @mid}{##1}, % tikz content
-}{laptop \@lr\space bracket=pingu@black!80!\csname pingu@color@laptop\@lr\endcsname,laptop \@lr\space lower=\csname pingu@color@laptop\@lr\endcsname!95!pingu@black,laptop \@lr\space key=\csname pingu@color@laptop\@lr\endcsname!92!pingu@white,laptop \@lr\space display=\csname pingu@color@laptop\@lr\endcsname!32!pingu@white,laptop \@lr\space content={},laptop \@lr\space mid={}}
-
-% #1 wing
-\def\pingu@draw@wi@laptop#1{%
- \pingu@setup@wing{laptop}{#1}%
- \scope[rotate around={\@angle+5:(\pingu@name-wing-#1)},shift={(\pingu@name-wing-#1)}]
- \pingu@block[rounded corners=1pt]{\csname pingu@color@laptop#1@lower\endcsname}(-6.9mm,0) -- ++(-.1mm,-4.75mm) -- ++(14mm,0) -- ++(-.1mm,4.75mm) -- cycle;
- \pingu@block[rounded corners=1pt]{\@col}(-6.9mm,0) -- ++(0,7mm) -- ++(13.8mm,0) -- ++(0,-7mm) -- cycle;
- \pingu@block[rounded corners=.125mm]{\csname pingu@color@laptop#1@bracket\endcsname}(-6.4mm,.125mm) -- ++(0,-.25mm) -- ++(12.8mm,0) -- ++(0,.25mm) -- cycle;
- % keys
- \foreach[count=\y from 0,evaluate=\y as \extpadding using 0.005*\y,evaluate=\y as \rextpadding using 0.05*\y] \row in {
- % manually account for padding
- {0,1,1,1,1,1,1,1,1,1,1,1,1,1},
- {.63,1.5,1,1,1,1,1,1,1,1,1,1,1},
- {0,1,1,1,1,1,1,1,1,1,1,1,1,1},
- {0,1,1,1,1,1,4.62,1,1,1,1},
- } {
- \def\lengthincr{-\rextpadding mm}
- \foreach[count=\i from 0,evaluate=\len as \l using 0.85*\len] \len in \row {
- \ifnum\i=0 \else % first one is silent:
- \pingu@block[rounded corners=.125mm]{\csname pingu@color@laptop#1@key\endcsname}(\lengthincr-6.4mm,-\y mm-.5mm) rectangle ++(\l mm,-.75mm) node[midway,centered,text=\@col,scale=.3] {\textbullet};
- \fi
- \xdef\lengthincr{\the\dimexpr\lengthincr+\l mm+.13mm+\extpadding mm}
- }
- }
- % display, we modify the lower shift to adjust height offset
- \pingu@block[rounded corners=1pt]{\csname pingu@color@laptop#1@display\endcsname}(-6.7mm,.25mm+.05mm) rectangle ++(13.4mm,6.45mm) node[midway,centered,rotate=\@angle+5,text width=13.2mm,align=center,minimum height=6.2mm] {\csname pingu@x@laptop#1@mid\endcsname};
- \scope[shift={(-6.7mm,.25mm+.05mm)}]
- \csname pingu@x@laptop#1@content\endcsname
- \endscope
- \endscope
-} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikzpingus/tikzpingus.sty b/graphics/pgf/contrib/tikzpingus/tikzpingus.sty
index 903d95a98f..49d8108223 100644
--- a/graphics/pgf/contrib/tikzpingus/tikzpingus.sty
+++ b/graphics/pgf/contrib/tikzpingus/tikzpingus.sty
@@ -2,13 +2,13 @@
% Licensed under GNU General Public License version 3
% https://opensource.org/licenses/gpl-3.0.html
\def\tikzpingus@filename{tikzpingus}
-\ProvidesPackage{\tikzpingus@filename}[2023/09/17 version v1.1 Penguins in TikZ]
+\ProvidesPackage{\tikzpingus@filename}[2024/11/27 version v1.2 Penguins in TikZ]
\newif\ifpengu@setup@glows@
\DeclareOption{glows}{\pengu@setup@glows@true}\DeclareOption{noglows}{\pengu@setup@glows@false}
\newif\ifpengu@setup@manual@layers@
\DeclareOption{manual-layers}{\pengu@setup@manual@layers@true}\DeclareOption{nomanual-layers}{\pengu@setup@manual@layers@false}
-\newif\ifpengu@setup@bare@
-\DeclareOption{bare}{\pengu@setup@bare@true}\DeclareOption{nobare}{\pengu@setup@bare@false}
+% \newif\ifpengu@setup@bare@
+% \DeclareOption{bare}{\pengu@setup@bare@true}\DeclareOption{nobare}{\pengu@setup@bare@false}
\ProcessOptions*
\RequirePackage{etoolbox}
@@ -364,26 +364,23 @@
\ifpengu@setup@manual@layers@\pgfsetlayers{background,main,middle,foreground}\fi\begingroup
\@pingu@do@back@false
\pgfqkeys{/pingu}{defaults, #1}%
+\let\pingu@path@lowerpingu\pingu@default@path@lowerpingu\relax
+\let\pingu@path@upperpingu\pingu@default@path@upperpingu\relax
\ifdim\pingu@side@h@half<10.33mm \PackageWarning{\tikzpingus@filename}{Penguins with a height below 10.33mm may have unwanted artifacts.}\fi
\scope[/pingu/@pingu,/pingu/@pingu@main]
\scope[/pingu/@body]
\@pingu@drawer@bodytype@
\pingu@body@app
\endscope
-
-\path (\pingu@name-head-center)++(0,-.05mm-\pingu@outer@off) coordinate (\pingu@name-bill);
-
+\path(\pingu@name-head-center)++(0,-.05mm-\pingu@outer@off) coordinate (\pingu@name-bill);
\scope[shift=(\pingu@name-belly-center),/pingu/@belly]
\clip[use path=\pingu@whitepingu]; \pingu@belly@raw
\endscope
-\coordinate (\pingu@name-head) at (\pingu@w@half,.7375cm);
-
+\coordinate(\pingu@name-head) at (\pingu@w@half,.7375cm);
\scope[/pingu/@eyes]
\@pingu@drawer@lefteye@ \@pingu@drawer@righteye@
\endscope
-
\pingu@layer{background}[]\pingu@draw@clothing@behind\endpingu@layer
-
\pingu@draw@clothing@middle
\scope[/pingu/@extras,/pingu/@extras@below]
\pingu@draw@extras@below
@@ -444,7 +441,7 @@
% #region lower-pingu
% Note: to be used in clippies
-\def\pingu@path@lowerpingu{(0,\pingu@outer@off)
+\def\pingu@default@path@lowerpingu{(0,\pingu@outer@off)
% left side
to[bend right=\pingu@bend] ++(0,-\pingu@side@h@half-\pingu@outer@off)
% feety stuff
@@ -453,8 +450,9 @@ arc (208:270:\pingu@foot@inner@w{} and \pingu@foot@inner@h) arc (270:360:\pingu@
% right side
to[bend right=\pingu@bend] ++(0,\pingu@side@h@half+\pingu@outer@off)
arc(0:180:\pingu@w@half{} and \pingu@head@h@half) -- cycle}% arc clip to secure wings
-\def\pingu@path@upperpingu{(\pingu@name-head-center) ellipse [x radius=\pingu@w@half, y radius=\pingu@head@h@half]}
-
+\def\pingu@default@path@upperpingu{(\pingu@name-head-center) ellipse [x radius=\pingu@w@half, y radius=\pingu@head@h@half]}
+\let\pingu@path@lowerpingu\pingu@default@path@lowerpingu
+\let\pingu@path@upperpingu\pingu@default@path@upperpingu
% #endregion
% #endregion
@@ -601,6 +599,21 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
% #endregion
% #region legacy
\pingu@bodytype@add{legacy}{%
+\gdef\pingu@path@lowerpingu{%
+(0,\pingu@outer@off)
+% left side
+to[bend right=1.25*\pingu@bend] ++(0,-.95\pingu@side@h@half-\pingu@outer@off+.65\pingu@one)%
+% feety stuff
+to[out=270,in=270]
+++(2*\pingu@w@half,0)
+% right side
+to[bend right=1.25*\pingu@bend] ++(0,.95\pingu@side@h@half+\pingu@outer@off-.65\pingu@one)
+arc(0:180:\pingu@w@half{} and \pingu@head@h@half) -- cycle
+}
+\gdef\pingu@path@upperpingu{(\pingu@name-head-center)
+++(0,\pingu@head@h@half)
+arc(90:450:\pingu@w@half{} and \pingu@head@h@half);
+}
\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off)
% left side
to[bend right=1.25*\pingu@bend] coordinate[pos=.77] (\pingu@name-waist-right) ++(0,-.95\pingu@side@h@half-\pingu@outer@off+.65\pingu@one) coordinate (@b) % for bottom clip
@@ -753,6 +766,9 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\def\@pingu@wingangle@items@none@{90}
\def\@pingu@wingdown@none@{90}
+% to hide it with the glow
+\def\pingu@wing@compensator#1{#1}
+
% #region wings-normal
\@pingu@wings@s{normal}{%
\coordinate (\pingu@name-wing-left-start) at ([yshift=-6.5mm]\pingu@name-wings-side-left);
@@ -778,8 +794,8 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\path[/pingu/@invclip] \pingu@path@lowerpingu;
\endpgfinterruptboundingbox
\pingu@block[rotate around={-39:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=2.2mm, y radius=9.35mm] +(90:.22cm and .935cm) coordinate (\pingu@name-wing-left-tip) +(150:.22cm and .935cm) coordinate (\pingu@name-wing-left-cap-up) +(-3:.22cm and .935cm) coordinate (\pingu@name-wing-left-cap-down) +(90:.175cm and .75cm) coordinate (\pingu@name-wing-left);
- \pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.03mm,4.6mm) to[out=-80,in=220] (\pingu@name-wing-left-cap-up) -- (\pingu@name-wing-left-start) -- cycle;
- \pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.085mm,-4.4mm) to[out=80,in=-131] (\pingu@name-wing-left-cap-down) -- (\pingu@name-wing-left-start) -- cycle;
+ \pingu@wing@compensator{\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.03mm,4.6mm) to[out=-80,in=220] (\pingu@name-wing-left-cap-up) -- (\pingu@name-wing-left-start) -- cycle;
+ \pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.085mm,-4.4mm) to[out=80,in=-131] (\pingu@name-wing-left-cap-down) -- (\pingu@name-wing-left-start) -- cycle;}
\endscope}{%
\coordinate (\pingu@name-wing-right-start) at ([yshift=-5.85mm]\pingu@name-wings-side-right);
\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers
@@ -787,8 +803,8 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\path[/pingu/@invclip] \pingu@path@lowerpingu;
\endpgfinterruptboundingbox
\pingu@block[rotate around={39:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.22cm, y radius=.935cm] +(90:.22cm and .935cm) coordinate (\pingu@name-wing-right-tip) +(30:.22cm and .935cm) coordinate (\pingu@name-wing-right-cap-up) +(177:.22cm and .935cm) coordinate (\pingu@name-wing-right-cap-down) +(90:.175cm and .775cm) coordinate (\pingu@name-wing-right);
- \pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.03mm,4.6mm) to[out=-100,in=-45] (\pingu@name-wing-right-cap-up) -- (\pingu@name-wing-right-start) -- cycle;
- \pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.1mm,-4.4mm) to[out=100,in=-50] (\pingu@name-wing-right-cap-down) -- (\pingu@name-wing-right-start) -- cycle;
+ \pingu@wing@compensator{\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.03mm,4.6mm) to[out=-100,in=-45] (\pingu@name-wing-right-cap-up) -- (\pingu@name-wing-right-start) -- cycle;
+ \pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.1mm,-4.4mm) to[out=100,in=-50] (\pingu@name-wing-right-cap-down) -- (\pingu@name-wing-right-start) -- cycle;}
\endscope}{\pingu@wi@above}{-10}{-110}
% #endregion
% #region wings-raise
@@ -845,8 +861,8 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\path[/pingu/@invclip] \pingu@path@lowerpingu;
\endpgfinterruptboundingbox
\pingu@block[rotate around={-128:(\pingu@name-wing-left-start)}]{\pingu@color@left@wing} (\pingu@name-wing-left-start) ellipse [x radius=.235cm, y radius=.925cm] +(90:.235cm and .935cm) coordinate (\pingu@name-wing-left-tip) +(175:.235cm and .935cm) coordinate (\pingu@name-wing-left-cap-up) +(22:.235cm and .935cm) coordinate (\pingu@name-wing-left-cap-down) +(90:.175cm and .775cm) coordinate (\pingu@name-wing-left);
-\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.03mm,4.6mm) to[out=-80,in=140] (\pingu@name-wing-left-cap-up) -- (\pingu@name-wing-left-start) -- cycle;
-\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.085mm,-4.4mm) to[out=82,in=155] (\pingu@name-wing-left-cap-down) -- (\pingu@name-wing-left-start) -- cycle;
+\pingu@wing@compensator{\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.03mm,4.6mm) to[out=-80,in=140] (\pingu@name-wing-left-cap-up) -- (\pingu@name-wing-left-start) -- cycle;
+\pingu@block{\pingu@color@left@wing} (\pingu@name-wing-left-start)++(.085mm,-4.4mm) to[out=82,in=155] (\pingu@name-wing-left-cap-down) -- (\pingu@name-wing-left-start) -- cycle;}
\endscope}{%
\coordinate (\pingu@name-wing-right-start) at ([yshift=-6.25mm]\pingu@name-wings-side-right);
\scope[xshift=\p@] % shift to avoid rounding errors in pdf viewers
@@ -854,8 +870,8 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\path[/pingu/@invclip] \pingu@path@lowerpingu;
\endpgfinterruptboundingbox
\pingu@block[rotate around={128:(\pingu@name-wing-right-start)}]{\pingu@color@right@wing} (\pingu@name-wing-right-start) ellipse [x radius=.235cm, y radius=.935cm] +(90:.235cm and .935cm) coordinate (\pingu@name-wing-right-tip) +(5:.235cm and .935cm) coordinate (\pingu@name-wing-right-cap-up) +(160:.235cm and .935cm) coordinate (\pingu@name-wing-right-cap-down) +(90:.175cm and .775cm) coordinate (\pingu@name-wing-right);
-\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.03mm,4.6mm) to[out=-100,in=40] (\pingu@name-wing-right-cap-up) -- (\pingu@name-wing-right-start) -- cycle;
-\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.085mm,-4.4mm) to[out=92,in=20] (\pingu@name-wing-right-cap-down) -- (\pingu@name-wing-right-start) -- cycle;
+\pingu@wing@compensator{\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.03mm,4.6mm) to[out=-100,in=40] (\pingu@name-wing-right-cap-up) -- (\pingu@name-wing-right-start) -- cycle;
+\pingu@block{\pingu@color@right@wing} (\pingu@name-wing-right-start)++(-.085mm,-4.4mm) to[out=92,in=20] (\pingu@name-wing-right-cap-down) -- (\pingu@name-wing-right-start) -- cycle;}
\endscope}{\pingu@wi@above}{-30}{-62}
\let\@pingu@wings@s\relax
% #endregion
@@ -1075,6 +1091,7 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\pingu@xif@eb{devilwings}{devilwings}%
\pingu@xif@eb{glow}{glow}%
\pingu@xif@eb{belt}{belt}%
+ \pingu@xif@eb{santabeard}{santabeard}%
\pingu@xif@eb{tie}{tie}%
\pingu@xif@eb{pants}{pants}%
\pingu@xif@eb{medal}{medal}%
@@ -1161,9 +1178,11 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\pingu@layer{background}[]
\@for\i:={\pingu@x@extra@glow@steps}\do{
\scope[/pingu/@block/.append style={draw=\pingu@color@glow,line width=\pingu@x@extra@glow@width@func},/pingu/@draw/.append style={draw=\pingu@color@glow,line width=\pingu@x@extra@glow@width@func},opacity=\pingu@x@extra@glow@func,transparency group]
- \pingu@draw{\pingu@color@glow} \pingu@path@lowerpingu;
+ \pingu@draw[sharp corners]{\pingu@color@glow} \pingu@path@lowerpingu;
+ \pingu@draw[sharp corners]{\pingu@color@glow} \pingu@path@upperpingu;
% todo: disable re set of coordinates
- % only draw, if not ofset
+ % only draw, if not offset
+ \tikzset{rounded corners/.style={}}\def\pingu@wing@compensator##1{}%
\csname @pingu@wingitem@\@pingu@select@leftwing@ @\endcsname\@pingu@drawer@leftwing@\fi
\csname @pingu@wingitem@\@pingu@select@rightwing@ @\endcsname\@pingu@drawer@rightwing@\fi
\endscope
@@ -1185,8 +1204,11 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\pingu@xif@ea{glassesround}{glassesround}%
\pingu@xif@ea{devilhorns}{devilhorns}%
\pingu@xif@ea{headband}{headband}%
+ \pingu@xif@ea{vrheadset}{vrheadset}%
\pingu@xif@ea{strawhat}{strawhat}%
+ \pingu@xif@ea{graduate}{graduate}%
\pingu@xif@ea{hat}{hat}%
+ \pingu@xif@ea{spacehelmet}{spacehelmet}%
\pingu@xif@ea{mitra}{mitra}%
\pingu@xif@ea{witchhat}{witchhat}%
\pingu@xif@ea{constructionhelmet}{constructionhelmet}%
@@ -1198,13 +1220,11 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
\pingu@xif@ea{princesscrown}{princesscrown}%
\pingu@xif@ea{rook}{rook}%
\pingu@xif@ea{halo}{halo}%
- \pingu@xif@ea{vrheadset}{vrheadset}%
\pingu@xif@ea{headphone}{headphone}%
\pingu@xif@ea{sheriffstar}{sheriffstar}%
\pingu@xif@ea{santahat}{santahat}%
\pingu@xif@ea{woolhat}{woolhat}%
\pingu@xif@ea{deerhat}{deerhat}%
- \pingu@xif@ea{santabeard}{santabeard}%
\pingu@xif@ea{banner}{banner}%
\pingu@xif@ea{bee}{bee}%
}
@@ -1381,69 +1401,2345 @@ coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
}
% #endregion
-\def\pingu@@dummy@lib#1#2{%
- \pgfqkeys{/pingu}{#1/.code={\PackageError{\tikzpingus@filename}{To use '#1' you need to load the '#2' library via '\string\pinguloadlibrary{#2}'}}}%
- \expandafter\def\csname pingu@@lib@#1@\endcsname{#2}%
-}
-\def\pingu@@dummy@selector#1#2#3{%
- \expandafter\csname pingu@#3@add\endcsname{#1}{\PackageError{\tikzpingus@filename}{To use '#1' with '#3' you need to load the '#2' library via '\string\pinguloadlibrary{#2}'}}%
- \expandafter\def\csname pingu@@lib@#1@#3@\endcsname{#2}%
-}
-\def\pingu@dummy@lib#1#2{\edef\tmp@list{#2}\@for\@current:=\tmp@list\do{\expandafter\pingu@@dummy@lib\expandafter{\@current}{#1}}\xappto\pingu@defaultlibs{,{#1}/{#2}}\xappto\pingu@@defaultlibs{,#1}}%
-% library | selector | keys
-\def\pingu@dummy@selector#1#2#3{\edef\tmp@list{#3}\@for\@current:=\tmp@list\do{\expandafter\pingu@@dummy@selector\expandafter{\@current}{#1}{#2}}}
-\def\pingu@defaultlibs{}\def\pingu@@defaultlibs{}
-\providecommand\pingulibpathprefix{}
-\def\pingu@load@library#1{%
-% store common catcodes
-\expandafter\edef\csname pingu@lib@#1@atcode\endcsname{\the\catcode`\@}%
-\expandafter\edef\csname pingu@lib@#1@barcode\endcsname{\the\catcode`\|}%
-\expandafter\edef\csname pingu@lib@#1@dollarcode\endcsname{\the\catcode`\$}%
-\catcode`\@=11 \catcode`\|=12 \catcode`\$=3\relax
-\def\pingu@tmp{\pingulibpathprefix tikzpingus-#1.lib.tex}\relax
-\InputIfFileExists{\pingu@tmp}{}{\PackageError{\tikzpingus@filename}{There is no '#1' library (searched: '\pingu@tmp')}}
-% restore catcodes
-\catcode`\@=\csname pingu@lib@#1@atcode\endcsname
-\catcode`\|=\csname pingu@lib@#1@barcode\endcsname
-\catcode`\$=\csname pingu@lib@#1@dollarcode\endcsname
-}
-\def\pingu@loadlibrary#1{%
-\ifcsname pingu@lib@#1@loaded\endcsname\else% do not load again
- \expandafter\let\csname pingu@lib@#1@loaded\endcsname=\@empty
- \pingu@load@library{#1}\relax
+
+% #region bee-lib
+\pingu@create@extra{bee}{%
+ bee/.code = {\pingu@set@extra{bee}{true}\pingu@color{bee}{#1}},
+ bee/.default = pingu@yellow!60!pingu@white,%
+ bee body/.code = \pingu@color{bee@body}{#1},
+ bee eyes/.code = \pingu@color{bee@eyes}{#1},
+ bee wings/.code = \pingu@color{bee@wings}{#1},
+ bee mouth/.code = \pingu@color{bee@mouth}{#1},
+ bee blush/.code = \pingu@color{bee@blush}{#1},
+ bee position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@bee@angle{#1}\def\pingu@x@bee@xshift{#2}\def\pingu@x@bee@yshift{#3}\def\pingu@x@bee@scale{#4}},
+}{bee body=pingu@black!82!gray,bee wings=pingu@blue!8!pingu@white,bee mouth=\pingu@color@bee@body,bee eyes=\pingu@color@bee@body,bee blush=pingu@red!21!\pingu@color@bee,bee position={-27.5:(8mm,15mm){.875}}}
+
+\def\pingu@bee@x@lbody{ (left) to[out=270,in=150] (0,-.725) to[out=30,in=270] (right)}
+
+\def\pingu@draw@ea@bee{%
+\scope[very path/.append style={line join=round},rotate around={\pingu@x@bee@angle:(\pingu@name-head)},shift={(\pingu@name-head)},shift={(\pingu@x@bee@xshift,\pingu@x@bee@yshift)},scale=\pingu@x@bee@scale]
+% wings
+\coordinate (wl) at(20:2.55mm);
+\coordinate (wr) at(160:2.55mm);
+\pingu@draw[fill=\pingu@color@bee@wings!80!white,rotate around=-32:(wl)]{\pingu@color@bee@body} (wl) ellipse [x radius=6.15mm, y radius=2.75mm];
+\pingu@draw[fill=\pingu@color@bee@wings!80!white,rotate around=32:(wr)]{\pingu@color@bee@body} (wr) ellipse [x radius=6.15mm, y radius=2.75mm];
+\pingu@draw[fill=\pingu@color@bee@wings,rotate around=19:(wl)]{\pingu@color@bee@body} (wl) ellipse [x radius=6.55mm, y radius=3.125mm];
+\pingu@draw[fill=\pingu@color@bee@wings,rotate around=-19:(wr)]{\pingu@color@bee@body} (wr) ellipse [x radius=6.55mm, y radius=3.125mm];
+% body
+\path (-.375,0) coordinate (left) -- (.375,0) coordinate (right);
+% TODO: block draw?
+\pingu@block[draw=\pingu@color@bee@body]{\pingu@color@bee@body} \pingu@bee@x@lbody;
+\scope\clip\pingu@bee@x@lbody;
+\foreach \angl in {30,1} {
+\pingu@block{\pingu@color@bee} (-\angl:.75) to[bend left=14] (180+\angl:.75) -- ++(0,-1.75mm)
+ to[bend right=14] (-\angl-14:.75) -- cycle;
+}\endscope
+% left and right arm
+\foreach\m/\s/\k in {right/-2.45/95,left/-.75/80} {
+\scope[shift=(\m),yshift=\s,rotate around=\k:(\m),scale=.166]
+\pingu@block{\pingu@color@bee@body} (-.965,0) arc(270:90:.29) -- ++(1.233,0) arc (90:-90:.29) -- cycle;
+\endscope}
+% sting
+\pingu@draw[line cap=round,thick]{\pingu@color@bee@body} (0,-.725) -- ++(0,-.035);
+% head
+\pingu@draw[fill=\pingu@color@bee,rounded corners=1.5pt]{\pingu@color@bee@body} (.85mm,-.55mm) to[bend right=30,looseness=.9] ([xshift=1.45mm,yshift=1.35mm]right) arc(0:180:{(.75cm+2*1.45mm)/2} and {(.75cm+2*1.45mm)/2.05}) to[bend right=30,looseness=.9] (-.85mm,-.55mm) -- cycle;
+% eyes [intersect with left and right]
+\pingu@block{\pingu@color@bee@eyes} (left|-0,2.265mm)++(.6mm,0) coordinate (el) circle[radius=.6mm];
+\coordinate (ell) at ([yshift=-.8mm]el);
+\pingu@block[rotate around=3:(ell)]{\pingu@color@bee@blush} ([yshift=-.8mm]el) ellipse[x radius=.412mm, y radius=.165mm];
+\pingu@block{\pingu@color@bee@eyes} (right|-0,2.265mm)++(-.6mm,0) coordinate (er) circle[radius=.6mm];
+\coordinate (err) at ([yshift=-.8mm]er);
+\pingu@block[rotate around=-1:(err)]{\pingu@color@bee@blush} ([yshift=-.8mm]er) ellipse[x radius=.4mm, y radius=.155mm];
+% mouth
+\scope[yshift=1mm]
+\pingu@draw[semithick,line cap=round]{\pingu@color@bee@mouth} (-.6mm,0) arc (180:360:.6mm and .415mm);
+% antenna
+\pingu@draw[line cap=round]{\pingu@color@bee@body} (123:4mm) to[out=110,in=-41] ++(-1mm,3mm) coordinate (@);
+\pingu@block[rotate around=-41:(@)]{\pingu@color@bee@body} ([xshift=-.1mm,yshift=-.185mm]@) ellipse[x radius=.55mm,y radius=.35mm];
+\pingu@draw[line cap=round]{\pingu@color@bee@body} (57:4mm) to[out=70,in=180+41] ++(1mm,3mm) coordinate (@);
+\pingu@block[rotate around=41:(@)]{\pingu@color@bee@body} ([xshift=-.1mm,yshift=-.2mm]@) ellipse[x radius=.55mm,y radius=.35mm];
+\endscope
+\endscope
+}
+
+\pingu@create@wing@extra{flower}{%
+ flower \@lr/.code = {\pingu@set@extra{flower\@lr}{true}\pingu@color{flower\@lr}{##1}},
+ flower \@lr/.default = pingu@purple!80!pingu@yellow,
+ flower \@lr\space center/.code = \pingu@color{flower@\@lr @center}{##1},
+ flower \@lr\space center size/.code = \expandafter\def\csname pingu@flower@\@lr @center@size\endcsname{##1},
+ flower \@lr\space stem/.code = \pingu@color{flower@\@lr @stem}{##1},
+ flower \@lr\space stem length/.code = \expandafter\def\csname pingu@flower@\@lr @stem@length\endcsname{##1},
+ flower \@lr\space stem width/.code = \expandafter\def\csname pingu@flower@\@lr @stem@width\endcsname{##1},
+ flower \@lr\space stem tilt/.code = \expandafter\def\csname pingu@flower@\@lr @stem@tilt\endcsname{##1},
+ flower \@lr\space size/.code = \expandafter\def\csname pingu@flower@\@lr @size\endcsname{##1},
+ flower \@lr\space petal count/.code = \expandafter\def\csname pingu@flower@\@lr @petals\endcsname{##1},
+ flower \@lr\space petal width/.code = \expandafter\def\csname pingu@flower@\@lr @petals@width\endcsname{##1},
+ flower \@lr\space petal start angle/.code = \expandafter\def\csname pingu@flower@\@lr @petals@start@angle\endcsname{##1},
+ flower \@lr\space petal peak/.code = \expandafter\def\csname pingu@flower@\@lr @petals@peak\endcsname{##1},
+}{flower \@lr\space size=.3mm, flower \@lr\space center=brown!50!pingu@yellow, flower \@lr\space center size=.65mm, flower \@lr\space stem=green!90!pingu@yellow!70!pingu@black, flower \@lr\space stem length=6mm,flower \@lr\space stem width=.15mm,flower \@lr\space stem tilt=-.5mm, flower \@lr\space petal count=5, flower \@lr\space petal start angle=27, flower \@lr\space petal width=4.5pt, flower \@lr\space petal peak=2}
+
+% #1 wing
+\def\pingu@draw@wi@flower#1{%
+\pingu@setup@wing{flower}{#1}%
+ \pingu@draw[line width=\csname pingu@flower@#1@stem@width\endcsname]{\csname pingu@color@flower@#1@stem\endcsname} ([yshift=-.5mm]\pingu@name-wing-#1) to[out=80,in=-20] ++(\csname pingu@flower@#1@stem@tilt\endcsname,\csname pingu@flower@#1@stem@length\endcsname) coordinate (\pingu@name-flower-center-#1) coordinate (@);
+\pgfmathsetmacro\AnglePerPetal{360/\csname pingu@flower@#1@petals\endcsname}
+\edef\@currwidth{\csname pingu@flower@#1@petals@width\endcsname}%
+\foreach \i in {1,...,\csname pingu@flower@#1@petals\endcsname} {
+ \pgfmathsetmacro{\@currrot}{\i*\AnglePerPetal+\csname pingu@flower@#1@petals@start@angle\endcsname}%
+ \scope[rotate around={\@currrot:(@)}]
+\pingu@block{\@col} (@) to[bend right=4] ++(\@currwidth,.5*\csname pingu@flower@#1@size\endcsname) arc(-9:189:\@currwidth\space and \@currwidth*\csname pingu@flower@#1@petals@peak\endcsname) to[bend right=4] ++(\@currwidth,-.5*\csname pingu@flower@#1@size\endcsname) -- cycle;
+\endscope
+\pingu@block{\csname pingu@color@flower@#1@center\endcsname} (\pingu@name-flower-center-#1) circle[radius=\csname pingu@flower@#1@center@size\endcsname];
+}
+}
+% #endregion
+% #endregion
+
+% #region christmas-lib
+\pingu@create@extra{santahat}{%
+ santa hat/.code = \pingu@set@extra{santahat}{true}\pingu@color{santahat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none},
+ santa hat/.default = pingu@red!87!pingu@black,
+ santa hat second/.code = \pingu@color{santahat@second}{#1},
+ santa hat bobble/.code = \pingu@color{santahat@bobble}{#1}
+}{santa hat second={pingu@white!97!\pingu@color@santahat},santa hat bobble={\pingu@color@santahat@second}}
+\def\pingu@draw@ea@santahat{%
+\path (\pingu@name-head-center)+(152:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-santa-right);
+\path (\pingu@name-head-center)+(5:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-santa-left);
+\pingu@layer{middle}[]
+\pingu@block{\pingu@color@santahat@second} (\pingu@name-santa-right) to[out=48,in=132] (\pingu@name-santa-left) to[out=30,in=-45,looseness=1.325] ++(0,3.2mm)
+to[out=135,in=47,looseness=1.025] coordinate[pos=.915] (\pingu@name-santa-ur) coordinate[pos=.055] (\pingu@name-santa-ul) ([yshift=2mm]\pingu@name-santa-right) to[out=240,in=140] cycle;
+\endpingu@layer
+\pingu@layer{background}[]
+\pingu@block{\pingu@color@santahat} (\pingu@name-santa-ur) arc(145:-25:11.85mm and 14.915mm)
+ to[bend right=7] coordinate[pos=.5] (\pingu@name-santa-lc) ++(-1.11mm,.375mm) to[bend right=11] (\pingu@name-santa-ul) to[bend right=15] cycle;
+\pingu@block{\pingu@color@santahat@bobble} (\pingu@name-santa-lc) circle[radius=2.625mm];
+\endpingu@layer
+}
+\pingu@create@extra{santabeard}{%
+ santa beard/.code = \pingu@set@extra{santabeard}{true}\pingu@color{santabeard}{#1},
+ santa beard/.default = pingu@white!96!pingu@red!98!pingu@black!92!gray,
+ santa beard string/.code = \pingu@color{santabeard@string}{#1}
+}{santa beard string=\pingu@color@body@main!85!pingu@black}
+\def\pingu@draw@eb@santabeard{%
+% \coordinate (\pingu@name-santa-beard-center) at ([yshift=1.25mm]\pingu@name-belly-center);
+\pingu@block{\pingu@color@santabeard@string} ([xshift=-.35mm,yshift=.575mm]\pingu@name-head-back-con-right) to[bend right=28,edge node={foreach[count=\i] \l in {0.03,0.085,...,0.992} {coordinate[pos=\l-rand*.015,yshift=-.85pt] (\pingu@name-santa-beard-\i)}}]
+([yshift=.575mm,xshift=.35mm]\pingu@name-head-back-con-left) arc(20:110:.05mm and .15mm) to[bend left=26] ([yshift=.575mm+.15mm,xshift=-.35mm]\pingu@name-head-back-con-right) to[bend right] cycle;
+\ifx\pingu@color@santabeard\@pingu@none\else% to allow for random
+\xdef\@pmaxY{18}\xdef\@pmaxYI{17}%
+\foreach[evaluate=\j as \maxj using int(\@pmaxY-\j),evaluate=\j as \widthred using \j/23pt] \j in {0,...,\@pmaxYI} {
+\foreach[remember=\i as \li (initially 0)] \i in {1,...,\maxj} {
+ \pgfmathsetmacro\@ptmp{94+rand*2.6}
+ \pingu@block{\pingu@color@santabeard!\@ptmp!pingu@black} (\pingu@name-santa-beard-\i) circle [radius=1.85pt-\widthred pt+rand*.35pt];
+ \ifnum\li>0 % make middle of last
+ \path (\pingu@name-santa-beard-\li) -- (\pingu@name-santa-beard-\i) coordinate[pos=.5,yshift=-1.1pt,xshift=.133pt] (\pingu@name-santa-beard-\li); % smoll shift
+ \fi
+}}\fi
+}
+
+\pingu@create@extra{woolhat}{%
+ wool hat/.code = \pingu@set@extra{woolhat}{true}\pingu@color{woolhat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none},
+ wool hat/.default = pingu@blue!57!pingu@black,
+ wool hat second/.code = \pingu@color{woolhat@second}{#1},
+ wool hat bobble/.code = \pingu@color{woolhat@bobble}{#1}
+}{wool hat second={\pingu@color@woolhat!55!pingu@white},wool hat bobble={\pingu@color@woolhat@second}}
+\def\pingu@draw@ea@woolhat{%
+\path ([yshift=.5mm,xshift=.165mm]\pingu@name-head-center)+(165:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-wool-right);
+\path ([yshift=.5mm,xshift=-.045mm]\pingu@name-head-center)+(4:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-wool-left);
+\pingu@layer{middle}[]
+\pingu@block{\pingu@color@woolhat@second} (\pingu@name-wool-right) to[out=37,in=170] (\pingu@name-wool-left) to[out=50,in=-55] ++(0,1.52mm) coordinate (\pingu@name-wool-left-up)
+to[out=167,in=38] coordinate[pos=.915] (\pingu@name-wool-ur) coordinate[pos=.055] (\pingu@name-wool-ul) ([yshift=1.5mm]\pingu@name-wool-right) coordinate (\pingu@name-wool-right-up) to[out=240,in=140] cycle;
+\endpingu@layer
+\path (\pingu@name-wool-left-up) -- (\pingu@name-wool-right-up) coordinate[pos=.455,yshift=9.75mm] (@mid);
+\pingu@block{\pingu@color@woolhat} (\pingu@name-wool-right-up) to[out=71,in=203] [rounded corners=2pt] (@mid) to[out=-34,in=100] [sharp corners] (\pingu@name-wool-left-up) to[in=37,out=172] cycle;
+\pingu@layer{background}[]
+\pingu@block{\pingu@color@woolhat@bobble} (@mid) circle [radius=1.25mm];
+\endpingu@layer
+}
+
+
+\pingu@create@extra{deerhat}{%
+ deer hat/.code = \pingu@set@extra{deerhat}{true}\pingu@color{deerhat}{#1}\pgfqkeys{/pingu}{hair=\@pingu@none},
+ deer hat/.default = pingu@bronze!57!pingu@black,
+ deer hat b/.code = \pingu@color{deerhat@b}{#1},
+ deer hat band/.code = \pingu@color{deerhat@band}{#1},
+}{deer hat band={\pingu@color@deerhat!85!pingu@black},deer hat b=\pingu@color@deerhat}
+\pgfmathsetmacro\pingu@deerhat@baseang@l{90-360*(1-\pinguanglehl)}
+\pgfmathsetmacro\pingu@deerhat@baseang@r{90-360*(1-\pinguanglehr)}
+\def\pingu@deerhat@baseoff{47}
+\def\pingu@deerhat@yshift{.15mm}
+\def\pingu@deerhat@linewidth{1.32mm}
+\def\pingu@deerhat@headoff@l{22}
+\def\pingu@deerhat@headoff@r{19}
+\def\pingu@draw@ea@deerhat{%
+\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-left) arc (\pingu@deerhat@baseang@l:\pingu@deerhat@baseang@l-\pingu@deerhat@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate[yshift=.05mm] (@target);
+\pingu@draw[line width=.7mm]{\pingu@color@deerhat@band} ([xshift=-.8mm]@target) arc (\pingu@deerhat@baseang@l-\pingu@deerhat@baseoff:360+\pingu@deerhat@baseang@r+\pingu@deerhat@baseoff:\pingu@w@half{}-.8mm and \pingu@head@h@half);
+
+\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-top) arc (90:90-\pingu@deerhat@headoff@l:\pingu@w@half{} and \pingu@head@h@half) coordinate (@left);
+\path ([yshift=-\pingu@deerhat@yshift]\pingu@name-head-top) arc (90:90+\pingu@deerhat@headoff@r:\pingu@w@half{} and \pingu@head@h@half) coordinate (@right);
+
+\pgfonlayer{background}
+\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat} (@left) to[bend right=4] ++(.85mm,1.5mm) coordinate (@a) -- ++(3.15mm,.5mm) coordinate (@b) -- ++(4.65mm,4.35mm) coordinate[pos=.5] (@c) to[bend right=10] ++(-.75mm,2.55mm);
+\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat} ([xshift=-.135mm,yshift=-.425mm]@a) to[bend left=3] ++(1mm,3.9mm) ([xshift=-.4mm,yshift=-.05mm]@b) to[bend right=2] ++(3.75mm,.1mm) (@c) to[bend left=12] ++(-1mm,3.5mm);
+\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat@b} (@right) to[bend left=4] ++(-.85mm,1.5mm) coordinate (@a) -- ++(-3.15mm,.5mm) coordinate (@b) -- ++(-4.65mm,4.35mm) coordinate[pos=.5] (@c) to[bend left=10] ++(.75mm,2.55mm);
+\pingu@draw[line width=\pingu@deerhat@linewidth,rounded corners=2pt,line cap=round]{\pingu@color@deerhat@b} ([yshift=-.425mm,xshift=.135mm]@a) to[bend right=3] ++(-1mm,3.9mm) ([xshift=.4mm,yshift=-.05mm]@b) to[bend right=2] ++(-3.75mm,.1mm) (@c) to[bend right=12] ++(1mm,3.5mm);
+\endpgfonlayer
+}
+
+\pingu@create@wing@extra{present}{%
+ present \@lr/.code = {\pingu@set@extra{present\@lr}{true}\pingu@color{present\@lr}{##1}},
+ present \@lr/.default = pingu@red!50!pingu@black!60!red,
+ present \@lr\space width/.code = \@namedef{pingu@present@\@lr @width}{##1},
+ present \@lr\space height/.code = \@namedef{pingu@present@\@lr @height}{##1},
+ present \@lr\space ribbon/.code = \pingu@color{present\@lr @ribbon}{##1},%
+ present \@lr\space band/.code = \pingu@color{present\@lr @band}{##1},%
+ present \@lr\space band width/.code = \@namedef{pingu@present@\@lr @band@width}{##1},
+ present \@lr\space xshift/.code = \@namedef{pingu@present@\@lr @xshift}{##1},
+ present \@lr\space yshift/.code = \@namedef{pingu@present@\@lr @yshift}{##1},
+ present \@lr\space band second height/.code = \@namedef{pingu@present@\@lr @band@second@height}{##1},
+ present \@lr\space band second yshift/.code = \@namedef{pingu@present@\@lr @band@second@yshift}{##1},
+ present \@lr\space lid/.code = \pingu@color{present\@lr @lid}{##1},%
+ present \@lr\space lid height/.code = \@namedef{pingu@present@\@lr @lid@height}{##1},
+ present \@lr\space lid overhang/.code = \@namedef{pingu@present@\@lr @lid@overhang}{##1},
+ present \@lr\space lid yshift/.code = \@namedef{pingu@present@\@lr @lid@yshift}{##1},
+ present \@lr\space lid band/.code = \pingu@color{present\@lr @lid@band}{##1},%
+}{present \@lr\space band=pingu@green!70!pingu@black!90!pingu@white,present \@lr\space width=7.75mm,present \@lr\space band width=1.75mm,present \@lr\space height=7mm,present \@lr\space yshift=-0.25*(\csname pingu@present@\@lr @height\endcsname),present \@lr\space band second height=\csname pingu@present@\@lr @band@width\endcsname, present \@lr\space band second yshift=0.5*(\csname pingu@present@\@lr @height\endcsname),present \@lr\space xshift=-0.25*(\csname pingu@present@\@lr @width\endcsname),present \@lr\space lid=\csname pingu@color@present\@lr\endcsname!92!pingu@black,present \@lr\space lid height=1.33mm,present \@lr\space lid overhang=.125mm,present \@lr\space lid yshift=0,present \@lr\space lid band=\csname pingu@color@present\@lr @band\endcsname!98!pingu@black,present \@lr\space ribbon=\csname pingu@color@present\@lr @band\endcsname!97!pingu@black}
+
+% TODO: more ribbon color control
+% #1 wing
+\def\pingu@draw@wi@present#1{%
+ \pingu@setup@wing{present}{#1}%
+ \scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
+ \pingu@block[rounded corners=2pt]{\@col}(\pingu@name-wing-#1)++(-{0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@#1@xshift\endcsname},{\csname pingu@present@#1@yshift\endcsname}) coordinate (@ll) rectangle ++({\csname pingu@present@#1@width\endcsname},{\csname pingu@present@#1@height\endcsname}) coordinate (@ur);
+ % vert band
+ \pingu@block{\csname pingu@color@present#1@band\endcsname}(@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)-0.5*(\csname pingu@present@#1@band@width\endcsname)},0) rectangle ++({\csname pingu@present@#1@band@width\endcsname},{\csname pingu@present@#1@height\endcsname});
+ % horiz band
+ \pingu@block{\csname pingu@color@present#1@band\endcsname}(@ll)++(0,{\csname pingu@present@#1@band@second@yshift\endcsname-0.5*(\csname pingu@present@#1@band@second@height\endcsname)}) rectangle ++({\csname pingu@present@#1@width\endcsname},{\csname pingu@present@#1@band@second@height\endcsname});
+ % lid
+ \pingu@block[rounded corners=.75pt]{\csname pingu@color@present#1@lid\endcsname} ([yshift={\csname pingu@present@\@lr @lid@yshift\endcsname},xshift=\csname pingu@present@\@lr @lid@overhang\endcsname]@ur) rectangle ++({-\csname pingu@present@#1@width\endcsname-2*(\csname pingu@present@\@lr @lid@overhang\endcsname)},-\csname pingu@present@#1@lid@height\endcsname) coordinate (@ll);
+ % upper lid band
+ \pingu@block{\csname pingu@color@present#1@lid@band\endcsname}(@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)-0.5*(\csname pingu@present@#1@band@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname},0) rectangle ++({\csname pingu@present@#1@band@width\endcsname},{\csname pingu@present@#1@lid@height\endcsname});
+ % ribbon
+ \path (@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname+0.2*(\csname pingu@present@#1@band@width\endcsname)},{\csname pingu@present@#1@lid@height\endcsname+.25mm}) coordinate (@top);
+ \pingu@block[even odd rule]{\csname pingu@color@present#1@ribbon\endcsname} (@top) to[out=40,in=110] ++(4mm,1mm)
+ to[out=-70,in=-20] ++(-4mm,-1.5mm) to[bend left=55] cycle ([xshift=.5mm]@top) to[out=40,in=110] ++(2.55mm,.5mm)
+ to[out=-70,in=-20] [rounded corners=1pt] ++(-2.85mm,-.835mm) -- cycle;
+ \path (@ll)++({0.5*(\csname pingu@present@#1@width\endcsname)+\csname pingu@present@\@lr @lid@overhang\endcsname-0.2*(\csname pingu@present@#1@band@width\endcsname)},{\csname pingu@present@#1@lid@height\endcsname+.25mm}) coordinate (@top);
+ \pingu@block[even odd rule]{\csname pingu@color@present#1@ribbon\endcsname} (@top) to[out=180-40,in=180-110] ++(-3.6mm,1mm)
+ to[out=-110,in=-160] ++(3.6mm,-1.5mm) to[bend right=55] cycle ([xshift=-.5mm]@top) to[out=140,in=70] ++(-2.55mm,.5mm)
+ to[out=-110,in=-160] [rounded corners=1pt] ++(2.55mm,-.75mm) -- cycle;
+ \pingu@block[rounded corners=.5pt]{\csname pingu@color@present#1@ribbon\endcsname} (@top)++(-.3mm,-.65mm) rectangle ++(1.3mm,.65mm); % TODO: make that round? (i.e., bend edges)
+ \endscope
+}
+
+\pingu@create@wing@extra{snowball}{%
+ snowball \@lr/.code = {\pingu@set@extra{snowball\@lr}{true}\pingu@color{snowball\@lr}{##1}},
+ snowball \@lr/.default = pingu@white!90!pingu@black,
+ snowball \@lr\space size/.code = \expandafter\def\csname pingu@snowball@\@lr @size\endcsname{##1},
+ snowball \@lr\space xshift/.code = \expandafter\def\csname pingu@snowball@\@lr @xshift\endcsname{##1},
+ snowball \@lr\space yshift/.code = \expandafter\def\csname pingu@snowball@\@lr @yshift\endcsname{##1}
+}{snowball \@lr\space size=2.33mm, snowball \@lr\space xshift=0pt, snowball \@lr\space yshift=0pt}
+
+% #1 wing
+% TODO: shifts
+\def\pingu@draw@wi@snowball#1{%
+\pingu@setup@wing{snowball}{#1}%
+ \pingu@draw[opacity=.35]{\@col} ([xshift=\csname pingu@snowball@#1@xshift\endcsname,yshift=\csname pingu@snowball@#1@yshift\endcsname]\pingu@name-wing-#1) coordinate (@) circle[radius=\csname pingu@snowball@#1@size\endcsname];
+ \pingu@block[rotate around={\@angle-1:(\pingu@name-wing-#1)},decoration={random steps,segment length=1pt,amplitude=.075pt},decorate,rounded corners=.35pt,save path=\snowball@outer]{\@col}(@) circle[radius=\csname pingu@snowball@#1@size\endcsname];
+}
+% #endregion
+
+% #region cloak-lib
+\newif\if@pingu@x@cloak@wings
+\pingu@create@extra{cloak}{%
+ cloak/.code = \pingu@set@extra{cloak}{true}\pingu@color{cloak}{#1},
+ cloak/.default = pingu@bronze,
+ cloak cap/.code = \pingu@color{cloak@cap}{#1},
+ cloak wings color/.code = \pingu@color{cloak@wings}{#1},
+ cloak bottom color/.code = \pingu@color{cloak@bottom}{#1},
+ cloak front color/.code = \pingu@color{cloak@front}{#1},
+ cloak padding/.code = \def\pingu@x@cloak@padding{#1},
+ cloak wings/.is if = @pingu@x@cloak@wings,
+ cape/.style = {/pingu/cloak=#1, /pingu/cloak wings=false,/pingu/cloak front color=\@pingu@none, /pingu/cloak cap=\@pingu@none,/pingu/cloak front color=\@pingu@none},
+ cape/.default = pingu@bronze,
+}{cloak padding=1.95mm,cloak bottom color=\pingu@color@cloak!90!black,cloak cap=\pingu@color@cloak!98!pingu@black,cloak front color=\pingu@color@cloak!90!white,cloak wings color=\pingu@color@cloak@front!94!pingu@black,cloak wings=true}
+\def\pingu@draw@cloth@cloak@behind{%
+ \pingu@block[bottom color=\pingu@color@cloak@bottom,top color=\pingu@color@cloak]{\pingu@color@cloak} (\pingu@name-bottom-center)++(-\pingu@x@cloak@padding-\pingu@w@half,-.5mm) arc (180:0:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend left=1] (\pingu@name-wings-side-left) arc(0:180:\pingu@w@half{} and .75mm) to[bend left=1] cycle;
+}
+
+\def\pingu@draw@cloth@cloak@middle{\pingu@block[rounded corners=.7mm]{\pingu@color@cloak@front}
+(\pingu@name-bottom-center)++(-\pingu@x@cloak@padding-\pingu@w@half,-.5mm) arc (180:250:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend right=6]
+([xshift=1.3mm,yshift=.4mm]\pingu@name-wings-side-right) to[bend right=3] ([yshift=.65mm]\pingu@name-wings-side-right);
+\pingu@block[rounded corners=.7mm]{\pingu@color@cloak@front}
+(\pingu@name-bottom-center)++(\pingu@x@cloak@padding+\pingu@w@half,-.5mm) arc (0:-70:{\pingu@x@cloak@padding+\pingu@w@half} and \pingu@one) to[bend left=6]
+([xshift=-1.3mm,yshift=.4mm]\pingu@name-wings-side-left) to[bend left=3] ([yshift=.65mm]\pingu@name-wings-side-left);}
+
+% TODO: if flags to draw parts
+\def\pingu@draw@cloth@cloak{%
+\scope[rounded corners=.6\p@]
+ % wings
+ \if@pingu@x@cloak@wings
+ \edef\@la{\csname @pingu@wingdown@\@pingu@select@leftwing@ @\endcsname}
+ \ifnum\@la>0 % wing is going inverted up or down / \ => left
+ \pingu@layer{foreground}[]
+ \ifnum\@la>70
+ \pingu@block[right color=\pingu@color@cloak@front,left color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-left-start)++(.5mm,-3.5mm) to[bend left=10] (\pingu@name-wing-left-low) to[bend right=13] (\pingu@name-wing-left-up) to[bend left=3] (\pingu@name-wing-left-start-up) to[bend left] ([xshift=.35mm,yshift=1mm]\pingu@name-wing-left-start);
+ \else % down
+ \pingu@block[right color=\pingu@color@cloak@front,left color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-left-start)++(.5mm,-3.5mm) to[bend left=10] (\pingu@name-wing-left-low) to[bend right=13] (\pingu@name-wing-left-up) to[bend left=3] ([xshift=1mm,yshift=1mm]\pingu@name-wing-left-start-up) to[bend left=4.5] ([xshift=.5mm,yshift=-3.5mm]\pingu@name-wing-left-start);
+ \fi
+ \endpingu@layer
+ \else
+ \ifnum\@la<-90% normal up \ / => left side
+ \pingu@block[upper right=\pingu@color@cloak@wings,lower right=\pingu@color@cloak@front,lower left=\pingu@color@cloak@front,upper left=\pingu@color@cloak@front]{\pingu@color@cloak@wings} ([xshift=.25mm]\pingu@name-wing-left-start-low) to[bend right=14] (\pingu@name-wing-left-low) to[bend left=8] ([yshift=-.5mm]\pingu@name-wing-left-up) to[bend right=17] ([yshift=1.6mm]\pingu@name-wing-left-start-up) to[bend right=13] ([xshift=-.15mm,yshift=.15mm]\pingu@name-waist-left) -- cycle;
+ \else % normal and hugging down => right
+ \pingu@block[top color=\pingu@color@cloak@front,middle color=\pingu@color@cloak,bottom color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} plot[smooth] coordinates {([xshift=-1.38mm]\pingu@name-wings-side-left) (\pingu@name-wing-left-start-low) ([yshift=.65mm,xshift=-.65mm]\pingu@name-wing-left-low) ([yshift=.65mm,xshift=-.65mm]\pingu@name-wing-left-up) ([xshift=.68mm]\pingu@name-wings-side-left) ([xshift=-1.38mm]\pingu@name-wings-side-left)};
+ \fi
+ \fi
+ \edef\@ra{\csname @pingu@wingdown@\@pingu@select@rightwing@ @\endcsname}
+ \ifnum\@ra>0 % wing is going inverted up or down => right
+ \pingu@layer{foreground}[]
+ \ifnum\@ra>70
+ \pingu@block[left color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,right color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} (\pingu@name-wing-right-start-low) to[bend right=10] (\pingu@name-wing-right-low) to[bend left=13] (\pingu@name-wing-right-up) to[bend right=3] (\pingu@name-wing-right-start-up) -- ++(-.25mm,0mm) to[bend right=11] cycle;
+ \else
+ \pingu@block[left color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,right color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} ([xshift=1mm,yshift=-1mm]\pingu@name-wing-right-start-low) to[bend right=10] (\pingu@name-wing-right-low) to[bend left=13] (\pingu@name-wing-right-up) to[bend right=3] ([xshift=-1mm,yshift=1mm]\pingu@name-wing-right-start-up) to[bend right=4.5] ([xshift=-.5mm,yshift=-3.5mm]\pingu@name-wing-right-start);
+ \fi
+ \endpingu@layer
+ \else
+ \ifnum\@ra<-90% normal up => right side
+ \pingu@block[upper left=\pingu@color@cloak@wings,lower left=\pingu@color@cloak@front,lower right=\pingu@color@cloak@front,upper right=\pingu@color@cloak@front]{\pingu@color@cloak@wings} ([xshift=.25mm]\pingu@name-wing-right-start-low) to[bend left=14] (\pingu@name-wing-right-low) to[bend right=8] ([yshift=-.5mm]\pingu@name-wing-right-up) to[bend left=17] ([yshift=1.6mm]\pingu@name-wing-right-start-up) to[bend left=13] ([xshift=.15mm,yshift=.15mm]\pingu@name-waist-right) -- cycle;
+ \else % normal and hugging down => left
+ \pingu@block[top color=\pingu@color@cloak@front,middle color=\pingu@color@cloak@front,bottom color=\pingu@color@cloak@wings]{\pingu@color@cloak@wings} plot[smooth] coordinates {([xshift=1.38mm]\pingu@name-wings-side-right) (\pingu@name-wing-right-start-low) ([yshift=.85mm,xshift=-.35mm]\pingu@name-wing-right-low) ([yshift=.85mm,xshift=.35mm]\pingu@name-wing-right-up) ([xshift=-.68mm]\pingu@name-wings-side-right) ([xshift=1.38mm]\pingu@name-wings-side-right)};
+ \fi
+ \fi
+\fi
+ % cape
+ \pingu@block[rounded corners=.8mm]{\pingu@color@cloak@cap} ([xshift=.85mm,yshift=-2.75mm]\pingu@name-wing-left-start) to[bend left=4] ([xshift=-.45mm,yshift=-.65mm]\pingu@name-wings-side-left) to[bend right=3]
+ (\pingu@name-head)
+ to[bend right=3]
+ ([xshift=.4mm,yshift=-.65mm]\pingu@name-wings-side-right) [rounded corners=.15mm] to[bend left=3] ([xshift=-.85mm,yshift=-2.75mm]\pingu@name-wing-right-start)
+ to[bend left=8]
+ ([xshift=-.66mm]\pingu@name-wings-side-right)
+ [rounded corners=.15mm]
+ to[bend left=32] ++(\pingu@w@half+.66mm,\pingu@w@half+1.2\pingu@one)
+ to[bend left=32] ++(\pingu@w@half+.66mm,-\pingu@w@half-1.2\pingu@one)
+ to[bend left=8] cycle;
+\endscope
+}
+% #endregion
+
+% #region devil-lib
+\pingu@create@extra{devilhorns}{%
+ devilhorns/.forward to = /pingu/devil horns,
+ devil-horns/.forward to = /pingu/devil horns,
+ devil horns/.code = \pingu@set@extra{devilhorns}{true}\pingu@color{devilhorns}{#1},
+ devil horns/.default = pingu@purple,
+ devil horns b/.code = \pingu@color{devilhorns@b}{#1},
+ devilhorns b/.forward to = /pingu/devil horns b,
+ devil-horns b/.forward to = /pingu/devil horns b
+}{devil horns b=\pingu@color@devilhorns}
+
+\pgfmathsetmacro\pingu@devilhorns@baseang@l{90-360*(1-\pinguanglehl)}
+\pgfmathsetmacro\pingu@devilhorns@baseang@r{90-360*(1-\pinguanglehr)}
+\def\pingu@devilhorns@baseoff{12}
+\def\pingu@devilhorns@yshift{.65mm}
+\def\pingu@draw@ea@devilhorns{%
+ % 90 - 360*.06
+ \pingu@block{\pingu@color@devilhorns} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) arc (\pingu@devilhorns@baseang@l:\pingu@devilhorns@baseang@l-\pingu@devilhorns@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-devilhorns-left-goal) to[out=32,in=-32,looseness=.9] ++(.3mm,2.65mm) to[bend left=17] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) -- cycle;
+ \pingu@block{\pingu@color@devilhorns} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) to [bend right=38] (\pingu@name-devilhorns-left-goal) to[bend right=30] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-left) -- cycle;
+ \pingu@block{\pingu@color@devilhorns@b} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) arc (\pingu@devilhorns@baseang@r:\pingu@devilhorns@baseang@r+\pingu@devilhorns@baseoff:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-devilhorns-right-goal) to[out=148,in=-148,looseness=.9] ++(-.3mm,2.65mm) to[bend right=17] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) -- cycle;
+ \pingu@block{\pingu@color@devilhorns@b} ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) to [bend left=38] (\pingu@name-devilhorns-right-goal) to[bend left=30] ([yshift=-\pingu@devilhorns@yshift]\pingu@name-head-right) -- cycle;
+}
+
+% wip hack
+\colorlet{pingu@devil@ring}{pingu@black}
+\def\pingu@devil@x@opacity{.75}
+\pingu@eyes@s{devil}{%
+\pingu@layer{foreground}[]
+ \pingu@block{pingu@devil@ring} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=.1535cm, y radius=.1575cm];
+ \pingu@block{\pingu@color@eye@second@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=.1325cm, y radius=.1375cm];
+ \fill[\pingu@color@eye@left,/pingu/@glow] (\pingu@name-eye-left) circle [radius=1.325mm];
+ \pingu@block[fill opacity=\pingu@devil@x@opacity]{\pingu@color@eye@left} (\pingu@name-eye-left)++(0,.36) to[bend right=58] ++(.36,-.36) to[bend right=58] ++(-.36,-.36) to[bend right=58] ++(-.36,.36) to[bend right=58] cycle;
+ \fill[/pingu/@glow,fill=\pingu@color@eye@left!20!pingu@yellow!15!pingu@white] (\pingu@name-eye-left)++(0,.10) to[bend right=60] ++(.10,-.10) to[bend right=60] ++(-.10,-.10) to[bend right=60] ++(-.10,.10) to[bend right=60] cycle;
+ \fill[\pingu@color@eye@left!20!pingu@yellow!7!pingu@white] (\pingu@name-eye-left) circle [radius=.5pt]; %
+ \pingu@block{pingu@white} (\pingu@name-eye-left) circle [radius=.15pt];
+\endpingu@layer
+}{%
+\pingu@layer{foreground}[]
+ \pingu@block{pingu@black} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate (\pingu@name-eye-right) ellipse [x radius=.1535cm, y radius=.1575cm];
+ \pingu@block{\pingu@color@eye@second@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate (\pingu@name-eye-right) ellipse [x radius=.1325cm, y radius=.1375cm];
+ \fill[\pingu@color@eye@right,/pingu/@glow] (\pingu@name-eye-right) circle [radius=1.325mm];
+ \pingu@block[fill opacity=.75]{\pingu@color@eye@right} (\pingu@name-eye-right)++(0,.36) to[bend right=58] ++(.36,-.36) to[bend right=58] ++(-.36,-.36) to[bend right=58] ++(-.36,.36) to[bend right=58] cycle;
+ \fill[/pingu/@glow,fill=\pingu@color@eye@right!20!pingu@yellow!15!pingu@white] (\pingu@name-eye-right)++(0,.10) to[bend right=60] ++(.10,-.10) to[bend right=60] ++(-.10,-.10) to[bend right=60] ++(-.10,.10) to[bend right=60] cycle;
+ \fill[\pingu@color@eye@right!20!pingu@yellow!7!pingu@white] (\pingu@name-eye-right) circle [radius=.5pt]; %
+ \pingu@block{pingu@white} (\pingu@name-eye-right) circle [radius=.15pt];
+\endpingu@layer
+}[pingu@purple]
+
+\pingu@create@wing@extra{devilfork}{%
+ devil fork \@lr/.code = {\pingu@set@extra{devilfork\@lr}{true}\pingu@color{devilfork\@lr}{##1}},
+ devil fork \@lr/.default = pingu@red,
+ devil fork \@lr\space second/.code= \pingu@color{devilfork\@lr @second}{##1},
+ devil fork \@lr\space length/.code =\expandafter\def\csname pingu@devilfork@\@lr @length\endcsname{##1}
+}{devil fork \@lr\space length=20mm,devil fork \@lr\space second=pingu@bronze!10!black}
+\def\pingu@draw@wi@devilfork#1{%
+ \pingu@setup@wing{devilfork}{#1}%
+\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
+ \pingu@block{\csname pingu@color@devilfork#1@second\endcsname} (\pingu@name-wing-#1)++(\@sidesign*-.2mm,-7mm) -- ++(0,\csname pingu@devilfork@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-devilfork-#1-top) -- ++(0,-\csname pingu@devilfork@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
+ \pingu@block{\@col} ([yshift=4mm]\pingu@name-devilfork-#1-top) to[out=240,in=90] ++(-.65mm,-4mm) to[out=180,in=-60] ++(-1mm,5.5mm) to[out=240,in=90] ++(-.65mm,-5.9mm) to[bend right] ++(4.4mm,0) to[out=90,in=-60] ++(-.65mm,5.9mm) to[out=240,in=0] ++(-1mm,-5.5mm) to[out=90,in=-60] cycle;
+\endscope
+}
+
+\pingu@create@extra{devilwings}{%
+ devilwings/.forward to = /pingu/devil wings,
+ devil-wings/.forward to = /pingu/devil wings,
+ devil wings/.code = \pingu@set@extra{devilwings}{true}\pingu@color{devilwings}{#1},
+ devil wings/.default = pingu@black,
+ devil wings b/.code = \pingu@color{devilwings@b}{#1},
+ devilwings b/.forward to = /pingu/devil wings b,
+ devil-wings b/.forward to = /pingu/devil wings b
+}{devil wings b=\pingu@color@devilwings}
+
+% taken over and adapted from the old penguins
+% lower wing based on https://tex.stackexchange.com/a/464828
+\def\@pingu@devilwings@lower@wing@code{(0,0.2) -- (0,1.4) -- (-2,1.4) .. controls (-4,0.8) .. (-4.3,0.2) .. controls (-4.48,0.08) .. (-4.5,-0.15) .. controls (-4.9,-0.5) and (-4.9,-0.7) .. (-4.7,-0.9) .. controls (-4.7,-1) .. (-4.6,-1.1) .. controls (-4.9,-1.8) .. (-4.2,-2) -- (-4,-2.4) .. controls (-4.1,-3) .. (-3.6,-3.1) -- (-3.25,-3.7) .. controls (-3.5,-4.5) .. (-4.1,-5.4) .. controls (-4.2,-5.9) and (-3.6,-5.9) .. (-3.5,-5.4) .. controls (-3.55,-5.1) and (-3.4,-4.8) .. (-3,-4.1) -- (-2.6,-4.1) .. controls (-2.35,-4.35) .. (-2,-4.2) .. controls (-1.75,-4.6) and (-1.25,-4.6) .. (-1.25,-3.90) .. controls (-0.9,-4) .. (-0.6,-2.8) -- (-0.3,-1) -- (0,0.2)}
+
+\def\pingu@draw@eb@devilwings{%
+\pgfonlayer{background}
+ \scope[scale=0.225,shift={(\pingu@name-head-back-con-right)}]
+ \pingu@block[thick,rounded corners=.75mm]{\pingu@color@devilwings} \@pingu@devilwings@lower@wing@code;
+ \pingu@block[thick]{\pingu@color@devilwings} (0,1) -- (0,2.2) [rounded corners=5mm] parabola[bend at end] (-6,6) -- (-5,1) -- (0,1);
+ \endscope
+ \scope[scale=0.225,shift={(\pingu@name-head-back-con-left)},xscale=-1]
+ \pingu@block[thick,rounded corners=0.75mm]{\pingu@color@devilwings@b} \@pingu@devilwings@lower@wing@code;
+ \pingu@block[thick]{\pingu@color@devilwings@b} (0,1) -- (0,2.2) [rounded corners=5mm] parabola[bend at end] (-6,6) -- (-5,1) -- (0,1);
+ \endscope
+\endpgfonlayer
+}
+% #endregion
+
+% #region emotions-lib
+\pingu@eyes@s{sad}{%
+ \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left);
+ \pingu@block{\pingu@color@eye@left} (\pingu@name-eye-left)++(15:.1225cm and .1275cm) arc (15:-245:.1225cm and .1275cm) to[out=-45,in=175] cycle;
+}{%
+ \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right);
+ \pingu@block{\pingu@color@eye@right} (\pingu@name-eye-right)++(165:.1225cm and .1275cm) arc (165:425:.1225cm and .1275cm) to[out=225,in=5] cycle;
+}
+
+\pingu@eyes@s{angry}{%
+ \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left);
+ \pingu@block{\pingu@color@eye@left} (\pingu@name-eye-left) ellipse [x radius=.1225cm, y radius=.1275cm];
+ \pingu@block{\pingu@color@body@front} (\pingu@name-eye-left) ++(120:.1225cm and .1275cm) ellipse [x radius=1.5mm,y radius=.5mm];
+}{%
+ \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right);
+ \pingu@block{\pingu@color@eye@right} (\pingu@name-eye-right) ellipse [x radius=.1225cm, y radius=.1275cm];
+ \pingu@block{\pingu@color@body@front} (\pingu@name-eye-right) ++(60:.1225cm and .1275cm) ellipse [x radius=1.5mm,y radius=.5mm];
+}
+
+\pingu@bill@s{angry}{%
+\pingu@block{\pingu@color@bill} (\pingu@name-bill)++(-.19cm,0)
+ to[out=-90,in=170] ++(1.9mm,-2.25mm) coordinate (\pingu@name-bill-bottom)
+ to[out=10,in=-90] ++(1.9mm,2.25mm)
+ to[bend right=.25cm] cycle;
+}
+
+\pingu@create@extra{blush}{%
+ blush/.code = \pingu@set@extra{blush}{true}\pingu@color{blush}{#1},
+ blush/.default = pingu@red,
+ blush second/.code = \pingu@color{blush@second}{#1},
+ blush opacity/.code = \def\pingu@x@blush@opacity{#1},
+}{blush opacity=.35,blush second=\pingu@color@blush}
+\def\pingu@draw@eb@blush{%
+ \pingu@block[/pingu/@glow,opacity=\pingu@x@blush@opacity]{\pingu@color@blush} ([yshift=-2.7mm,xshift=-1.85mm]\pingu@name-eye-right) ellipse [x radius=2.66mm,y radius=2.25mm];
+ \pingu@block[/pingu/@glow,opacity=\pingu@x@blush@opacity]{\pingu@color@blush@second} ([yshift=-2.7mm,xshift=1.85mm]\pingu@name-eye-left) ellipse [x radius=2.66mm,y radius=2.25mm];
+}
+
+\pingu@eyes@s{hearts}{%
+ \path (\pingu@name-eye-back-left)++(\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-left);
+ \pingu@block[rounded corners=0pt]{\pingu@color@eye@left} ([yshift=.3mm]\pingu@name-eye-left) arc(0:180:.065cm)
+ to[out=270,in=110] ++(.13cm,-.2cm) to[out=70,in=270] ++(.13cm,.2cm) arc (0:180:.065cm) -- cycle;
+}{%
+ \path (\pingu@name-eye-back-right)++(-\pingu@eye@shift,.75mm) coordinate (\pingu@name-eye-right);
+ \pingu@block{\pingu@color@eye@right} ([yshift=.3mm]\pingu@name-eye-right) arc(0:180:.065cm)
+ to[out=270,in=110] ++(.13cm,-.2cm) to[out=70,in=270] ++(.13cm,.2cm) arc (0:180:.065cm) -- cycle;
+}
+
+\pingu@eyes@s{critical}{%
+ \pingu@block{\pingu@color@eye@left} ([yshift=.75mm,xshift=\pingu@eye@shift]\pingu@name-eye-back-left) coordinate (\pingu@name-eye-left) ellipse [x radius=1.13mm, y radius=.145cm];
+ \pingu@draw[thick]{\pingu@color@eye@left} (\pingu@name-eye-left)++(45:1.35mm and 1.85mm) arc(45:135:1.35mm and 1.85mm);
+}{%
+ \pingu@block{\pingu@color@eye@right} ([yshift=.75mm,xshift=-\pingu@eye@shift]\pingu@name-eye-back-right) coordinate(\pingu@name-eye-right) ellipse [x radius=1.13mm, y radius=.145cm];
+ \pingu@draw[thick]{\pingu@color@eye@right} (\pingu@name-eye-right)++(45:1.35mm and 1.85mm) arc(45:135:1.35mm and 1.85mm);
+}
+% #endregion
+
+% #region flags-lib
+\pingu@create@wing@extra{flag}{%
+ flag \@lr/.code = {\pingu@set@extra{flag\@lr}{true}\pingu@color{flag\@lr}{##1}},
+ flag \@lr/.default = pingu@purple,
+ flag \@lr\space pole/.code = \pingu@color{flag\@lr @pole}{##1},
+ flag \@lr\space code/.code = \expandafter\def\csname pingu@flag@\@lr @code\endcsname{##1},
+ flag \@lr\space bobble/.code = {\pingu@color{flag\@lr @bobble}{##1}},
+ pride flag \@lr/.style = {%
+ /pingu/flag \@lr\space code = {%
+ \noexpand\node[/pingu/@flag@first,/pingu/@flag={{rgb:yellow,1;red,5;magenta,2;black,1}}{1.9mm}] (a) at (0,0) {};
+ \noexpand\node[below,/pingu/@flag={{rgb:yellow,5;red,5;green,1;white,1}}{1.9mm}] (b) at (a.south) {};
+ \noexpand\node[below,/pingu/@flag={yellow}{1.9mm}] (c) at (b.south) {};
+ \noexpand\node[below,/pingu/@flag={{rgb:blue,1;cyan,1;green,4;black,2}}{1.9mm}] (d) at (c.south) {};
+ \noexpand\node[below,/pingu/@flag={{rgb:magenta,3;blue,5;cyan,4;black,3}}{1.9mm}] (e) at (d.south) {};
+ \noexpand\node[below,/pingu/@flag={{rgb:red,2;magenta,2;blue,5}}{1.9mm}] (f) at (e.south) {};
+ }, /pingu/flag \@lr, /pingu/flag \@lr\space pole={##1}%
+ },%
+ @flag/.style 2 args={tape bend height=.5mm,shape=tape,minimum height=##2, minimum width=15mm,outer sep=\z@,inner sep=\z@,fill=##1,draw=##1,rotate=\noexpand\@angle},
+ pride flag \@lr/.default = pingu@bronze,%
+ german flag \@lr/.style = {%
+ /pingu/flag \@lr\space code = {%
+ \noexpand\node[/pingu/@flag@first,/pingu/@flag={black}{3.33mm}] (a) at (0,0) {};
+ \noexpand\node[below,/pingu/@flag={red}{3.33mm}] (b) at (a.south) {};
+ \noexpand\node[below,/pingu/@flag={yellow}{3.33mm}] (c) at (b.south) {};
+ }, /pingu/flag \@lr, /pingu/flag \@lr\space pole={##1}%
+ },%
+ german flag \@lr/.default = pingu@bronze%
+}{flag \@lr\space bobble=pingu@bronze, flag \@lr\space pole=pingu@bronze, flag \@lr\space code = {%
+ \noexpand\node[/pingu/@flag@first,/pingu/@flag={\noexpand\@col}{9.75mm}] (a) at (0,0) {};
+}}
+\def\pingu@draw@wi@flag#1{%
+ \pingu@setup@wing{flag}{#1}%
+\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
+ % NOTE: not full foreground if placed under the wing
+ \pingu@layer{foreground}[shift={(\pingu@name-wing-#1)},shift={(\@sidesign*.15mm,17.5mm-3.5\p@)}]
+ \if@pingu@wing@item@side@left@\pgfqkeys{/pingu}{@flag@first/.style={below right}}\else\pgfqkeys{/pingu}{@flag@first/.style={below left}}\fi
+ \csname pingu@flag@#1@code\endcsname
+ \pingu@block[thick]{\csname pingu@color@flag#1@pole\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.15mm,3mm) -- ++(0,13.65mm) -| ++(\@sidesign*.6mm,-13.65mm) -- cycle;
+ \endpingu@layer
+ \pingu@block[thick]{\csname pingu@color@flag#1@pole\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.15mm,-3mm) -- ++(0,20mm) arc(180:0:\@sidesign*.3mm and .375mm) -- ++(0,-20mm) arc(360:180:\@sidesign*.3mm and .375mm) -- cycle;
+ \pingu@block{\csname pingu@color@flag#1@bobble\endcsname} (\pingu@name-wing-#1)++(\@sidesign*.15mm,17.5mm) circle [radius=2.15\p@];
+\endscope
+}
+% #endregion
+
+% #region formal-lib
+\pingu@create@extra{tie}{%
+ tie/.code = \pingu@set@extra{tie}{true}\pingu@color{tie}{#1},
+ tie/.default = pingu@green,
+ tie knot/.code = \pingu@color{tie@knot}{#1},
+ tie length/.code = \def\pingu@x@tie@length{#1},
+ tie offset/.code = \def\pingu@x@tie@offset{#1},
+ tie width/.code = \def\pingu@x@tie@width{#1},
+ tie pattern/.code = \def\pingu@x@tie@pattern{#1},
+ tie dots/.style = {%
+ tie pattern={%
+ \pingu@block[postaction={pattern={Dots[angle=40,distance=1.5pt,radius=.35pt]},pattern color=#1}]{\pingu@color@tie} \pingupathxtie;
+ \pingu@block[postaction={pattern={Dots[angle=-30,distance=1.45pt,radius=.35pt@]},pattern color=#1}]{\pingu@color@tie@knot} \pingupathxtieknot;
+ }%
+ },
+ tie dots/.default={pingu@white}%
+}{% defaults
+ tie length=.625\pingu@side@h@half, tie offset=.399cm,%
+ tie knot=\pingu@color@tie!92!black, tie width=.21cm,%
+ tie pattern={%
+ \pingu@block{\pingu@color@tie} \pingupathxtie;
+ \pingu@block{\pingu@color@tie@knot} \pingupathxtieknot;
+ }%
+}
+\def\pingupathxtie{[rounded corners=.15mm] (\pingu@name-tie-start)++(-.4mm,-.25mm) -- ++(-\pingu@x@tie@width/2, -\pingu@x@tie@length+.125cm) -- ++(\pingu@x@tie@width/2+.4mm,-.125cm) -- ++(\pingu@x@tie@width/2+.4mm,.125cm) -- +(-\pingu@x@tie@width/2, \pingu@x@tie@length-.125cm) -- cycle}
+\def\pingupathxtieknot{[rounded corners=.25mm] (\pingu@name-tie-start)++(-.095cm-.02*\pingu@x@tie@width,\z@) -- ++(.3mm,-.15cm-.01*\pingu@x@tie@width) -- ++(.13cm+.04*\pingu@x@tie@width,\z@) -- ++(.3mm,.15cm+.01*\pingu@x@tie@width) -- cycle}
+\def\pingu@draw@eb@tie{%
+ \path (\pingu@name-bill)++(0,-\pingu@x@tie@offset) coordinate(\pingu@name-tie-start);
+ \pingu@x@tie@pattern
+}
+
+\pingu@create@extra{bowtie}{%
+ bowtie/.forward to = /pingu/bow tie,
+ bow-tie/.forward to = /pingu/bow tie,
+ bow tie/.code = \pingu@set@extra{bowtie}{true}\pingu@color{bowtie}{#1},
+ bow tie/.default = pingu@blue,
+ bow tie b/.code = \pingu@color{bowtie@b}{#1},
+ bowtie b/.forward to = /pingu/bow tie b,
+ bow-tie b/.forward to = /pingu/bow tie b,
+ bowtie offset/.forward to = /pingu/bow tie offset,
+ bow-tie offset/.forward to = /pingu/bow tie offset,
+ bow tie offset/.code = \def\pingu@x@bowtie@offset{#1},
+ bowtie knot/.forward to = /pingu/bow tie knot,
+ bow-tie knot/.forward to = /pingu/bow tie knot,
+ bow tie knot/.code = \pingu@color{bowtie@knot}{#1},
+}{% defaults
+ bow tie knot=\pingu@color@bowtie!92!black,bow tie offset=.315cm,%
+ bow tie b=\pingu@color@bowtie%
+}
+
+\def\pingupathxbowtieknot{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(-.0625cm,-.35mm) to[bend right=10] ++(.125cm,0) -- ++(0,-.13cm) to[bend right=10] ++(-.125cm, 0) -- cycle}
+\def\pingupathxbowtieleft{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(-.15mm,-.06cm) to[out=155,in=-5] ++(-.25cm,.065cm) to[bend right=15] ++(0,-.21cm) to[in=-155,out=5] ++(.25cm,.065cm) -- cycle}
+\def\pingupathxbowtieright{[rounded corners=.25mm] (\pingu@name-bow-tie-start)++(.15mm,-.06cm) to[out=25,in=-175] ++(.25cm,.065cm) to[bend left=15] ++(0,-.21cm) to[in=-25,out=175] ++(-.25cm,.065cm) -- cycle}
+\def\pingu@draw@eb@bowtie{%
+ \path (\pingu@name-bill)++(0,-\pingu@x@bowtie@offset) coordinate(\pingu@name-bow-tie-start);
+ \pingu@block{\pingu@color@bowtie} \pingupathxbowtieleft;
+ \pingu@block{\pingu@color@bowtie@b} \pingupathxbowtieright;
+ \pingu@block{\pingu@color@bowtie@knot} \pingupathxbowtieknot;
+}
+
+\newif\if@pingu@x@pants@bands
+\pingu@create@extra{pants}{%
+ pants/.code = \pingu@set@extra{pants}{true}\pingu@color{pants}{#1},
+ pants/.default = pingu@red,
+ pants bands/.is if = @pingu@x@pants@bands,
+ pants button left/.code = \pingu@color{pants@button@left}{#1},
+ pants button right/.code = \pingu@color{pants@button@right}{#1},
+ pants buttons/.style = {/pingu/pants button left={#1}, /pingu/pants button right={#1}},
+ pants button left shade/.code = \pingu@color{pants@button@left@shade}{#1},
+ pants button right shade/.code = \pingu@color{pants@button@right@shade}{#1},
+ pants buttons shade/.style = {/pingu/pants button left shade={#1}, /pingu/pants button right shade={#1}},
+ pants without buttons/.forward to=/pingu/pants no buttons,
+ pants no buttons/.style = {/pingu/pants buttons=\@pingu@none, /pingu/pants buttons shade=\@pingu@none},
+ pants extra height/.code = \def\pingu@x@pants@extra@height{#1},
+}{pants extra height=1.5mm,pants buttons=pingu@black,pants button left shade=\pingu@color@pants@button@left!70!white,pants button right shade=\pingu@color@pants@button@right!70!white}
+
+\def\pingu@draw@eb@pants{%
+\pingu@block[rounded corners=\p@]{\pingu@color@pants} ([xshift=.85mm,yshift=\pingu@x@pants@extra@height]\pingu@name-waist-right) coordinate(@tmp) to[bend right=6] ([xshift=-.85mm,yshift=\pingu@x@pants@extra@height]\pingu@name-waist-left) coordinate(@tmpb) -- ++(0,-\pingu@x@pants@extra@height) arc(180:270:.85mm and 2.25mm) to[bend left=\pingu@bend] (\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=15] ([yshift=-.15mm]\pingu@name-bottom-center) to[bend left=15] (\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=6] ([yshift=-2.5mm]\pingu@name-waist-right) arc (-90:0:.85mm and 2.25mm) -- cycle;
+\if@pingu@x@pants@bands
+\pingu@layer{middle}[]
+% draw stripes
+\scope
+\clip \pingu@path@lowerpingu;
+\pingu@block{\pingu@color@pants} (@tmp)++(.55mm,-\pingu@one) to[bend right=3] ([yshift=1.65mm]\pingu@name-wings-side-right) -- ++(-.25mm,-.25mm) to[bend left=3] ([yshift=-\pingu@one]@tmp) -- cycle;
+\pingu@block{\pingu@color@pants} (@tmpb)++(-.55mm,-\pingu@one) to[bend left=3] ([yshift=1.65mm]\pingu@name-wings-side-left) -- ++(.25mm,-.25mm) to[bend right=3] ([yshift=-\pingu@one]@tmpb) -- cycle;
+\endscope
\fi
+\pingu@block{\pingu@color@pants@button@right}(@tmp)++(.25mm,-.25mm)circle[radius=.7mm];
+\pingu@block{\pingu@color@pants@button@left}(@tmpb)++(-.25mm,-.25mm)circle[radius=.7mm];
+\pingu@block[even odd rule]{\pingu@color@pants@button@right@shade}(@tmp)++(.25mm,-.25mm)circle[radius=.7mm] circle[radius=.615mm];
+\pingu@block[even odd rule]{\pingu@color@pants@button@left@shade}(@tmpb)++(-.25mm,-.25mm)circle[radius=.7mm] circle[radius=.615mm];
+\@for\i:={0,90,180,270}\do{
+ \pingu@block{\pingu@color@pants@button@right@shade} (@tmp)++(.25mm,-.25mm)++(\i:.
+ 35mm) circle[radius=.1mm];
+ \pingu@block{\pingu@color@pants@button@left@shade} (@tmpb)++(-.25mm,-.25mm)++(\i:.35mm) circle[radius=.1mm];
+}%
+\if@pingu@x@pants@bands \endpingu@layer \fi
+}
+
+
+\pingu@create@extra{belt}{%
+ belt/.code = \pingu@set@extra{belt}{true}\pingu@color{belt}{#1},
+ belt/.default = pingu@bronze!80!black,
+ belt knot color/.code = \pingu@color{belt@knot}{#1}
+}{% defaults
+ belt knot color = pingu@silver
+}
+
+\def\pingu@draw@eb@belt@wh{1.25mm}
+\def\pingu@draw@eb@belt{%
+ \path ([yshift=-1.66mm/2]\pingu@name-waist-left) -- ([yshift=-1.66mm/2]\pingu@name-waist-right) coordinate[pos=.5] (\pingu@name @belt@center);
+ \pingu@block[rounded corners=.5pt]{\pingu@color@belt} (\pingu@name-waist-left) coordinate (@) to[bend left=5] (\pingu@name-waist-right) -- ++(0,-1.66mm) to[bend right=5] ([yshift=-1.66mm]@) -- cycle;
+ \pingu@block[rounded corners=1.5pt]{\pingu@color@belt@knot} ([xshift=-1mm,yshift=-.7mm-1.66mm/2]\pingu@name @belt@center) rectangle ++(2mm,2mm);
+}
+% #endregion
+
+% #region fun-lib
+\pingu@create@extra{cakehat}{%
+ cake-hat/.code = \pingu@set@extra{cakehat}{true}\pingu@color{cakehat}{#1},
+ cake-hat/.default = pingu@white!92!\pingu@color@cakehat@top,
+ cake-hat top/.code = \pingu@color{cakehat@top}{#1},
+ cake-hat shade/.code = \pingu@color{cakehat@shade}{#1},
+ cake-hat candle/.code = \pingu@color{cakehat@candle}{#1},
+ cake-hat candle fire/.code = \pingu@color{cakehat@candle@fire}{#1},
+ cake-hat candle fire 2/.code = \pingu@color{cakehat@candle@fire@b}{#1},
+ cake-hat candle fire 3/.code = \pingu@color{cakehat@candle@fire@c}{#1},
+ cake-hat candle wick/.code = \pingu@color{cakehat@candle@wick}{#1},
+ cake-hat candle shade/.code = \pingu@color{cakehat@candle@shade}{#1},
+ cake-hat candle back/.code = \pingu@color{cakehat@candle@back}{#1},
+ cake-hat outline/.code = \pingu@color{cakehat@outline}{#1},
+ cake-hat outline width/.code = \def\pingu@x@cakehat@outline@w{#1},
+ cake-hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@cakehat@angle{#1}\def\pingu@x@cakehat@xshift{#2}\def\pingu@x@cakehat@yshift{#3}\def\pingu@x@cakehat@scale{#4}}
+}{cake-hat position={-9:(1mm,0mm)1},cake-hat outline=pingu@black!80!\pingu@color@cakehat,cake-hat outline width=.25pt,cake-hat top=pingu@purple,cake-hat candle=pingu@purple!60!pingu@black,cake-hat candle back=\pingu@color@cakehat@candle!85!black,cake-hat candle wick=pingu@black,cake-hat candle fire=pingu@red,cake-hat candle fire 2=\pingu@color@cakehat@candle@fire!50!yellow,cake-hat candle fire 3=\pingu@color@cakehat@candle@fire@b!50!white,cake-hat shade=gray,cake-hat candle shade=gray!80!\pingu@color@cakehat@candle@back}
+
+\def\pingu@p@cake@outline{(-6.25mm,-.25cm) to[bend left=2] (\pingu@name-cake-tl) arc (180:0:1.375cm/2+.01mm and 1.41mm) to[bend left=2] ++(0,-3.125mm*.97) to[bend left=20] (-6mm,-.26cm) -- cycle}
+\def\pingu@draw@ea@cakehat{%
+\scope[rotate around={\pingu@x@cakehat@angle:(\pingu@name-head-top)},%
+shift={(\pingu@name-head-top)},
+shift={(\pingu@x@cakehat@xshift,\pingu@x@cakehat@yshift)},
+scale=\pingu@x@cakehat@scale]
+ \pingu@block{\pingu@color@cakehat} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend left=2] coordinate[pos=.97] (\pingu@name-cake-tl) ++(0,3.125mm) to[bend right=20]
+ ++(1.375cm,0) to[bend left=2] coordinate[pos=.03] (\pingu@name-cake-tr) ++(0,-3.125mm) to[bend left=20] (-6mm,-.26cm) -- cycle;
+ \pingu@block[fill opacity=.1]{\pingu@color@cakehat@shade} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend right=20]
+ ++(1.375cm,0) to[bend right=2] ++(0,3.125mm) [sharp corners] to[bend left=20] (-6.25mm,-.225cm) [rounded corners=.2mm] -- cycle;
+ \path (\pingu@name-cake-tl) -- (\pingu@name-cake-tr) coordinate[pos=.5] (\pingu@name-cake-tc);
+ % cake side
+ \scope
+ \clip\pingu@p@cake@outline;
+ \path (\pingu@name-cake-tl) arc (180:360:1.375cm/2+.01mm and 1.41mm) foreach[count=\i] \a in {0,.19,.295,.375,.485,.625,.72,.85,1} {coordinate[pos=\a] (\pingu@name-cake-\i)};
+ \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-1) ellipse [x radius=.255mm,y radius=2mm];
+ \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-9) ellipse [x radius=.265mm,y radius=1.45mm];
+ \foreach \i in {2,...,9} {
+ \pgfmathsetmacro\@tmprand{rand}
+ \pingu@draw[opacity=.5]{gray} (\pingu@name-cake-\i)++(-.02mm,0) to[bend left=1] ++(+.145mm,{-1.075mm-(\@tmprand+.15)*.5125mm}) arc(370:300:.145mm);
+ \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\i)++(0,.1mm) -- ++(-.125mm,0) to[bend left=1] ++(0,{-1.2mm-(\@tmprand+.15)*.5125mm}) arc(170:370:.145mm) to[bend right=1] cycle;
+ }
+ \foreach \i in {2,...,9} {
+ \ifnum\i=2\relax
+ \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.5mm) to[bend left=8] ([xshift=-.05mm,yshift=-.25mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax);
+ \else\ifnum\i=9\relax
+ \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.25mm) to[bend left=8] ([xshift=-.05mm,yshift=-.5mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax);
+ \else
+ \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-\the\numexpr\i-1\relax)++(-.05mm,-.25mm) to[bend left=9.5+2*rand] ([xshift=-.05mm,yshift=-.25mm]\pingu@name-cake-\i) -- ++(0,.33mm) to[bend right=30] (\pingu@name-cake-\the\numexpr\i-1\relax);
+ \fi\fi
+ }
+ \endscope
+ \pingu@block{\pingu@color@cakehat@top} (\pingu@name-cake-tc) ellipse [x radius=1.375cm/2+.01mm, y radius=1.41mm];
+ % outline
+ \pingu@draw[line width=\pingu@x@cakehat@outline@w,rounded corners=.075mm]{\pingu@color@cakehat@outline} \pingu@p@cake@outline;
+% % 3d sides
+% \pingu@block[rounded corners=.04mm]{\pingu@color@cakehat@top} ([xshift=.1mm,yshift=.125mm]\pingu@name-cake-tl) to[out=246,in=97] ++(-.11mm,-2.125mm) -- ++(.04mm,0) to[bend right=12] (\pingu@name-cake-ttl) -- cycle;
+% \pingu@block[rounded corners=.09mm]{green} ([xshift=-.1mm]\pingu@name-cake-ttr) to[out=294,in=83] ++(.125mm,-2.125mm) to[bend left=12] ([xshift=-.11mm,yshift=.125mm]\pingu@name-cake-tr) -- cycle;
+ % candle
+ \pingu@block{\pingu@color@cakehat@candle@back} (\pingu@name-cake-tc)++(.8mm,2.66mm) to[bend right=7] ++(-1.1mm,-.1mm) to[bend right=30]++(1.1mm,0) -- cycle;
+ % wick
+ \pingu@draw[very thin]{\pingu@color@cakehat@candle@wick} (\pingu@name-cake-tc)++(.25mm,2mm) to[out=75,in=-95] coordinate[pos=.8] (\pingu@name-wick-1) ++(0,1mm) coordinate(\pingu@name-wick-top);
+ \pingu@block{\pingu@color@cakehat@candle@fire} (\pingu@name-wick-1)++(-.045mm,0) to[out=115,in=240] ++(0,1.5mm) to[out=300,in=65] ([xshift=.045mm]\pingu@name-wick-1) -- cycle;
+ \pingu@block{\pingu@color@cakehat@candle@fire@b} (\pingu@name-wick-1)++(-.045mm,0) to[out=105,in=240] ++(0,1.3mm) to[out=300,in=75] ([xshift=.045mm]\pingu@name-wick-1) -- cycle;
+ \pingu@block{\pingu@color@cakehat@candle@fire@c} (\pingu@name-wick-1)++(-.035mm,0) to[out=95,in=250] ++(0,1.1mm) to[out=290,in=85] ([xshift=.035mm]\pingu@name-wick-1) -- cycle;
+ % front
+ \pingu@block{\pingu@color@cakehat@candle} (\pingu@name-cake-tc)++(.25mm,0) ++(.55mm,0) to[bend left=0.5] ++(0,2.66mm) to[bend left=20] ++(-1.1mm,-.1mm) to[bend right=0.5] ++(0,-2.66mm) to[bend right=20] cycle;
+ \pingu@block[fill opacity=.125]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(-.3mm,-.1mm) to[bend right=20] ++(1.1mm,0) to[bend left=.5] ++(0,2.66mm) to[bend left=15] ++(-1.1mm,-2.5mm) -- cycle;
+ \pingu@block[fill opacity=.225]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(-.3mm,-.1mm) to[bend left=2] ++(1.1mm,-1.1mm) to[bend left=5] ++(1.1mm,0) to[bend left=2] ++(-1.1mm,1.2mm) to[bend left =15] cycle;
+ \pingu@block[fill opacity=.225]{\pingu@color@cakehat@candle@shade} (\pingu@name-cake-tc)++(1.35mm,-1.25mm) circle [radius=.1mm];
+\endscope
+}
+\pingu@create@extra{pumpkinhat}{%
+ pumpkin-hat/.code = \pingu@set@extra{pumpkinhat}{true}\pingu@color{pumpkinhat}{#1},
+ pumpkin-hat/.default = pingu@bronze!97!white,
+ pumpkin-hat stalk/.code = \pingu@color{pumpkinhat@stalk}{#1},
+ pumpkin-hat stalk top/.code = \pingu@color{pumpkinhat@stalk@top}{#1},
+ pumpkin-hat stripe a/.code = \pingu@color{pumpkinhat@stripe@a}{#1},
+ pumpkin-hat stripe b/.code = \pingu@color{pumpkinhat@stripe@b}{#1},
+ pumpkin-hat stripe c/.code = \pingu@color{pumpkinhat@stripe@c}{#1},
+ pumpkin-hat outline/.code = \pingu@color{pumpkinhat@outline}{#1},
+ pumpkin-hat outline width/.code = \def\pingu@x@pumpkinhat@outline@w{#1},
+ pumpkin-hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@pumpkinhat@angle{#1}\def\pingu@x@pumpkinhat@xshift{#2}\def\pingu@x@pumpkinhat@yshift{#3}\def\pingu@x@pumpkinhat@scale{#4}}
+}{pumpkin-hat position={-9:(1.65mm,.25mm)1.05},pumpkin-hat stalk=pingu@green!95!\pingu@color@pumpkinhat!45!pingu@black,pumpkin-hat stalk top=\pingu@color@pumpkinhat@stalk!95!pingu@black,pumpkin-hat stripe a=pingu@black,pumpkin-hat stripe b=\pingu@color@pumpkinhat@stripe@a,pumpkin-hat stripe c=\pingu@color@pumpkinhat@stripe@b,pumpkin-hat outline=pingu@black,pumpkin-hat outline width=.7pt}
+
+\def\pingu@pumpkinhat@outerpath{(0,.125cm)++(-60:6.75mm and 5.5mm) arc(-60:86: 6.75mm and 5.5mm) to[bend left=3] ++(-1.75mm,0) arc(95:242:6.75mm and 5.5mm) to[bend left=5] cycle;}
+\def\pingu@draw@ea@pumpkinhat{%
+\scope[rotate around={\pingu@x@pumpkinhat@angle:(\pingu@name-head-top)},%
+shift={(\pingu@name-head-top)},
+shift={(\pingu@x@pumpkinhat@xshift,\pingu@x@pumpkinhat@yshift)},
+scale=\pingu@x@pumpkinhat@scale]
+ % give it a small cut
+ \pingu@block{\pingu@color@pumpkinhat} (0,.125cm)++(-60:6.75mm and 5.5mm) coordinate (@pkll) arc(-60:86: 6.75mm and 5.5mm) coordinate (@pkl) to[bend left=3] coordinate[pos=.5] (@pkuc) ++(-1.75mm,0) coordinate (@pkr) arc(95:242:6.75mm and 5.5mm) coordinate (@pklr) to[bend left=5] coordinate[pos=.5] (@pklc) cycle;
+ \pingu@draw[line join=round,line width=\pingu@x@pumpkinhat@outline@w]{\pingu@color@pumpkinhat@outline} \pingu@pumpkinhat@outerpath;
+\scope
+\clip (0,.125cm)++(-60:6.75mm and 5.5mm) coordinate (@pkll) arc(-60:86: 6.75mm and 5.5mm) coordinate (@pkl) to[bend left=3] ++(-1.75mm,0) coordinate (@pkr) arc(95:242:6.75mm and 5.5mm) coordinate (@pklr) to[bend left=5] cycle;
+ \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@a} (@pklr) to[bend left=55] (@pkr);
+ \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@c} (@pkll) to[bend right=55] (@pkl);
+ \pingu@draw[line cap=round,opacity=.3]{\pingu@color@pumpkinhat@stripe@b} (@pklc) to[bend right=5] (@pkuc);
+\endscope
+\pingu@block{\pingu@color@pumpkinhat@stalk} ([yshift=-.5*\pingu@x@pumpkinhat@outline@w]@pkl) to[bend left=3] ([yshift=-.5*\pingu@x@pumpkinhat@outline@w]@pkr) to[bend right=8] ++(.85mm,2mm) -- ++(.65mm,0) coordinate[pos=.5] (@pkc) to[bend right=3] cycle;
+\pingu@block{\pingu@color@pumpkinhat@stalk@top} (@pkc) ellipse[x radius=.65mm/2, y radius=.085mm];
+\endscope
}
-\def\pinguloadlibrary#1{\edef\tmp@list{#1}\@for\tmp@elem:=\tmp@list\do{\ifx\tmp@elem\@empty\else\pingu@loadlibrary{\tmp@elem}\fi}}
-\let\pinguloadlibraries\pinguloadlibrary
-
-\pingu@dummy@lib{shirts}{shirt,second shirt}
-\pingu@dummy@lib{glasses}{glasses,glasses round,monocle left,monocle right}
-\pingu@dummy@lib{medieval}{rook,crown,princess crown}
-\pingu@dummy@lib{cloak}{cloak,cape}
-\pingu@dummy@lib{christmas}{santa hat,santa beard,wool hat,deer hat,present left, present right,snowball left, snowball right}
-\pingu@dummy@lib{science-fiction}{lightsaber left,lightsaber right}
-\pingu@dummy@lib{fun}{cake-hat,pumpkin-hat,lollipop left,lollipop right,vampire teeth,broom left,broom right,jack o lantern,jack o lantern helmet,hammer left, hammer right,plank left, plank right,magnifier left, magnifier right}
-\pingu@dummy@lib{technology}{vr-headset,headphone,vr-controller left,vr-controller right,laptop left,laptop right}
-\pingu@dummy@lib{flags}{flag left,flag right}
-\pingu@dummy@lib{hats}{strawhat,hat,cap,construction helmet,conical hat,witch hat,mitra}
-\pingu@dummy@lib{sport}{head band,medal}
-\pingu@dummy@lib{formal}{tie,bow tie,pants,belt}
-\pingu@dummy@lib{signs}{sign post left,sign post right}
-\pingu@dummy@lib{devil}{devil horns,devil wings,devil fork left,devil fork right,eyes devil,left eye devil,right eye devil}
-\pingu@dummy@selector{devil}{lefteye}{devil}
-\pingu@dummy@selector{devil}{righteye}{devil}
-\pingu@dummy@lib{safe}{mask}
-\pingu@dummy@lib{magic}{hand cast left,hand cast right}
-\pingu@dummy@lib{movement}{}% register the lib
-\pingu@dummy@selector{movement}{bodytype}{tilt-right,tilt-left}
-\pingu@dummy@lib{emotions}{eyes sad,left eye sad,right eye sad,eyes angry,left eye angry,right eye angry,eyes hearts,left eye heart,right eye hearts,bill angry,blush,eyes critical,left eye critical,right eye critical}
-\pingu@dummy@selector{emotions}{lefteye}{sad,angry,hearts}
-\pingu@dummy@selector{emotions}{righteye}{sad,angry,hearts}
-
-\pingu@dummy@lib{horse}{horse left,horse right,on horse,horse behind}
-\pingu@dummy@lib{bee}{bee}
-
-\ifpengu@setup@bare@\else
-\pinguloadlibraries{\pingu@@defaultlibs}
+
+\pingu@create@wing@extra{lollipop}{%
+ lollipop \@lr/.code = {\pingu@set@extra{lollipop\@lr}{true}\pingu@color{lollipop\@lr}{##1}},
+ lollipop \@lr/.default = pingu@green,
+ lollipop \@lr\space handle/.code = \pingu@color{lollipop\@lr @handle}{##1},%
+ lollipop \@lr\space second/.code = \pingu@color{lollipop\@lr @second}{##1}%
+}{lollipop \@lr\space handle=pingu@bronze,lollipop \@lr\space second={\csname pingu@color@lollipop\@lr\endcsname!86!white}}
+
+% #1 wing
+\def\pingu@draw@wi@lollipop#1{%
+ \pingu@setup@wing{lollipop}{#1}%
+ \pingu@draw[thick,rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@lollipop#1@handle\endcsname}(\pingu@name-wing-#1)++(0,4.75mm) -- ++(0,-6.25mm);
+ \pingu@block[thick,rotate around={\@angle:(\pingu@name-wing-#1)}]{\@col}(\pingu@name-wing-#1)++(0,4.75mm) coordinate (\pingu@name-lollipop-#1-top) circle[radius=1.4mm];
+ \pingu@block[thick,rotate around={\@angle-1:(\pingu@name-lollipop-#1-top)}]{\csname pingu@color@lollipop#1@second\endcsname} (\pingu@name-lollipop-#1-top) ellipse [x radius=1.57mm, y radius=1.5\p@];
+ \pingu@block[thick,rotate around={\@angle-1:(\pingu@name-lollipop-#1-top)}]{\@col} (\pingu@name-lollipop-#1-top)++(0,.5\p@) ellipse [x radius=1.4mm, y radius=\p@];
+}
+
+\pingu@create@extra{heart}{%
+ heart/.code = {\pingu@set@extra{heart}{true}\pingu@color{heart}{#1}},
+ heart/.default = lightgray
+}{}
+
+\def\pingu@draw@eb@heart{%
+ \pingu@block[sharp corners]{\pingu@color@heart}
+ ([yshift=1mm]\pingu@name-belly-center) arc(0:180:.13cm)
+ to[out=270,in=110] ++(.26cm,-.36cm) to[out=70,in=270] ++(.26cm,.36cm) arc (0:180:.13cm) -- cycle;
+}
+
+\pingu@create@extra{vampireteeth}{%
+ vampire teeth/.code = {\pingu@set@extra{vampireteeth}{true}\pingu@color{vampireteeth}{#1}},
+ vampire teeth/.default = pingu@yellow!10!pingu@black!70!lightgray
+}{}
+
+\def\pingu@draw@eb@vampireteeth{%
+ \pingu@block{\pingu@color@vampireteeth} (\pingu@name-bill) ++(-1.35mm,-2.5mm)
+ arc(180:0:1.35mm and 2.5mm)
+ arc(0:180:1.35mm and .95mm);
+}
+
+\pingu@create@wing@extra{broom}{%
+ broom \@lr/.code = {\pingu@set@extra{broom\@lr}{true}\pingu@color{broom\@lr}{##1}},
+ broom \@lr/.default = pingu@bronze,
+ broom \@lr\space length/.code = \expandafter\def\csname pingu@broom@\@lr @length\endcsname{##1},
+ broom \@lr\space shift/.code = \expandafter\def\csname pingu@broom@\@lr @shift\endcsname{##1},
+ broom \@lr\space band/.code = \pingu@color{broom@\@lr @band}{##1},
+ broom \@lr\space bristles a/.code = \pingu@color{broom@\@lr @bristles@a}{##1},
+ broom \@lr\space bristles b/.code = \pingu@color{broom@\@lr @bristles@b}{##1},
+ broom \@lr\space bristles c/.code = \pingu@color{broom@\@lr @bristles@c}{##1},
+}{broom \@lr\space length=22mm,broom \@lr\space shift=8mm, broom \@lr\space band=pingu@red!80!pingu@black!80!pingu@bronze, broom \@lr\space bristles a=pingu@bronze!16!pingu@yellow!41!pingu@white!80!brown!95!\csname pingu@color@broom\@lr\endcsname, broom \@lr\space bristles b=\csname pingu@color@broom@\@lr @bristles@a\endcsname!83!pingu@white, broom \@lr\space bristles c=\csname pingu@color@broom@\@lr @bristles@b\endcsname!83!pingu@white}
+\def\pingu@draw@wi@broom#1{%
+ \pingu@setup@wing{broom}{#1}%
+ % TODO: mirror on other wing?
+\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
+ \pingu@block{\csname pingu@color@broom#1\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,-\csname pingu@broom@#1@shift\endcsname) -- ++(0,\csname pingu@broom@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-broom-#1-top) -- ++(0,-\csname pingu@broom@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
+ \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] ++(1mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle;
+ \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] ++(1.66mm,9.75mm) to[out=300,in=65] coordinate[pos=.81] (@l) coordinate[pos=.79] (@l2) ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle;
+ \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@a\endcsname} (\pingu@name-broom-#1-top)++(-1mm,-2mm) to[out=115,in=240] coordinate[pos=.17] (@r) coordinate[pos=.19] (@r2) ++(.25mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]\pingu@name-broom-#1-top) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]\pingu@name-broom-#1-top) -- cycle;
+ \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@b\endcsname} (\pingu@name-broom-#1-top)++(-.75mm,-1.75mm) to[out=115,in=240] ++(1.35mm,9.25mm) to[out=300,in=65] ([xshift=.75mm,yshift=-1.75mm]\pingu@name-broom-#1-top) -- cycle;
+ \pingu@block[rounded corners=.44pt]{\csname pingu@color@broom@#1@bristles@b\endcsname} (\pingu@name-broom-#1-top)++(-.75mm,-1.75mm) to[out=115,in=240] ++(0mm,9.65mm) to[out=300,in=65] ([xshift=.75mm,yshift=-1.75mm]\pingu@name-broom-#1-top) -- cycle;
+ \pingu@block{\csname pingu@color@broom@#1@bristles@c\endcsname} (\pingu@name-broom-#1-top)++(-.5mm,-1.5mm) to[out=115,in=240] ++(.5mm,9.5mm) to[out=300,in=65] ([xshift=.5mm,yshift=-1.5mm]\pingu@name-broom-#1-top) -- cycle;
+ % TODO: broom cap color etc
+ \pingu@block{\csname pingu@color@broom@#1@band\endcsname} (@r) to[bend right=10] (@l) -- (@l2) to[bend left=10] (@r2);
+\endscope
+}
+
+\tikzset{pingu@clip even odd rule/.code={\pgfseteorule}, % Credit to Andrew Stacey
+pingu@invclip/.style={
+ clip,insert path=
+ [pingu@clip even odd rule]{
+ [reset cm](-\maxdimen,-\maxdimen)rectangle(\maxdimen,\maxdimen)
+ }
+}}
+\pingu@create@extra{jackolantern}{%
+ jack o lantern/.code = \pingu@set@extra{jackolantern}{true}\pingu@color{jackolantern}{#1},
+ jack o lantern/.default = pingu@bronze!97!pingu@black,
+ jack o lantern helmet/.style = {jack o lantern=#1,jack o lantern background=none,jack o lantern position={-2.15:(2.05mm,-11.35mm){1.5}},jack o lantern back stripe a=\@pingu@none, jack o lantern back stripe b=\@pingu@none,jack o lantern back stripe c=\@pingu@none,jack o lantern height=6.25mm,jack o lantern width=6.1mm,hair=\@pingu@none},
+ jack o lantern helmet/.default = pingu@bronze!97!pingu@black,
+ jack o lantern stalk/.code = \pingu@color{jackolantern@stalk}{#1},
+ jack o lantern stalk top/.code = \pingu@color{jackolantern@stalk@top}{#1},
+ jack o lantern background/.code= \pingu@color{jackolantern@background}{#1},
+ jack o lantern stripe a/.code = \pingu@color{jackolantern@stripe@a}{#1},
+ jack o lantern stripe b/.code = \pingu@color{jackolantern@stripe@b}{#1},
+ jack o lantern stripe c/.code = \pingu@color{jackolantern@stripe@c}{#1},
+ jack o lantern back stripe a/.code = \pingu@color{jackolantern@backstripe@a}{#1},
+ jack o lantern back stripe b/.code = \pingu@color{jackolantern@backstripe@b}{#1},
+ jack o lantern back stripe c/.code = \pingu@color{jackolantern@backstripe@c}{#1},
+ jack o lantern outline/.code = \pingu@color{jackolantern@outline}{#1},
+ jack o lantern outline width/.code = \def\pingu@x@jackolantern@outline@w{#1},
+ jack o lantern height/.code = \def\pingu@x@jackolantern@height{#1},
+ jack o lantern width/.code = \def\pingu@x@jackolantern@width{#1},
+ jack o lantern position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@jackolantern@angle{#1}\def\pingu@x@jackolantern@xshift{#2}\def\pingu@x@jackolantern@yshift{#3}\def\pingu@x@jackolantern@scale{#4}}
+}{jack o lantern position={-9:(3.15mm,.95mm){1.3}},jack o lantern stripe a=pingu@black,jack o lantern stripe b=\pingu@color@jackolantern@stripe@a,jack o lantern stripe c=\pingu@color@jackolantern@stripe@b,jack o lantern back stripe a=pingu@black,jack o lantern back stripe b=\pingu@color@jackolantern@stripe@a,jack o lantern back stripe c=\pingu@color@jackolantern@stripe@b,jack o lantern outline=pingu@black,jack o lantern outline width=.7pt,jack o lantern stalk=pingu@green!95!\pingu@color@jackolantern!45!pingu@black,jack o lantern stalk top=\pingu@color@jackolantern@stalk!95!pingu@black,jack o lantern background=\pingu@color@jackolantern!85!pingu@black,jack o lantern height=5.5mm,jack o lantern width=5.75mm}
+
+\def\pingu@jackolantern@outerpath{(0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) arc(-60:86:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend right=3] ++(-3.75mm,0) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend left=5] cycle;}
+\def\pingu@x@jackolantern{(-5.15mm,.6mm) to[bend right] ++(1.5mm,-.5mm) -- ++(.33mm,.33mm) to[bend right=10] ++(1.5mm,0) -- ++(.66mm,-.75mm) -- ++(.66mm,.75mm) to[bend right=10] ++(1.5mm,0) -- ++(.33mm,-.33mm) to[bend right] ++(1.5mm,.5mm) to[bend left] ++(-1.5mm,-2.15mm) to[bend left=10] ++(-.33mm,.33mm) to[bend left=10] ++(-1.5mm,0) -- ++(-.66mm,-.5mm) -- ++(-.66mm,.5mm) to[bend left=10] ++(-1.5mm,0) -- ++(-.33mm,-.33mm) to[bend left] cycle}
+
+\def\pingu@x@jackolantern@eye@left{(0.9mm,2mm) -- ++(2mm,-.15mm) to[bend right=40] ++(-.5mm,2mm) -- cycle}
+\def\pingu@x@jackolantern@eye@right{(-3mm,2mm) -- ++(-2mm,-.15mm) to[bend left=40] ++(.5mm,2mm) -- cycle}
+\def\pingu@x@jackolantern@nose{(0.965mm*0.5-3.225mm*0.5,1mm) -- ++(1mm,1.2mm) to[bend right=10] ++(-2mm,0) -- cycle}
+
+\def\pingu@draw@ea@jackolantern{%
+\scope[rotate around={\pingu@x@jackolantern@angle:(\pingu@name-head-top)},%
+shift={(\pingu@name-head-top)},
+shift={(\pingu@x@jackolantern@xshift,\pingu@x@jackolantern@yshift)},
+scale=\pingu@x@jackolantern@scale]
+\scope
+\pgfinterruptboundingbox
+\path[pingu@invclip]\pingu@x@jackolantern \pingu@x@jackolantern@eye@left \pingu@x@jackolantern@eye@right \pingu@x@jackolantern@nose;
+ % give it a small cut
+ \pingu@block{\pingu@color@jackolantern} (0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pkll) arc(-60:86: {\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pkl) to[bend right=3] coordinate[pos=.5] (@pkuc) coordinate[pos=.225] (@pksl) coordinate[pos=.775] (@pksr) ++(-3.75mm,0) coordinate (@pkr) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) coordinate (@pklr) to[bend left=5] coordinate[pos=.5] (@pklc) cycle;
+ \pingu@draw[line join=round,line width=\pingu@x@jackolantern@outline@w]{\pingu@color@jackolantern@outline} \pingu@jackolantern@outerpath;
+\endpgfinterruptboundingbox
+\scope
+\clip (0,.125cm)++(-60:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) arc(-60:86:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend right=3] ++(-3.75mm,0) arc(95:242:{\pingu@x@jackolantern@width} and \pingu@x@jackolantern@height) to[bend left=5] cycle;
+ \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@a} (@pklr) to[bend left=42] (@pkr);
+ \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@c} (@pkll) to[bend right=54] (@pkl);
+ \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@stripe@b} (@pklc) to[bend right=6] (@pkuc);
+\endscope
+\endscope
+ \pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@eye@left;
+ \pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@eye@right;
+
+ \pingu@draw[fill=\pingu@color@jackolantern@background,rounded corners=.25pt]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern@nose;
+
+ \pingu@draw[fill=\pingu@color@jackolantern@background]{\pingu@color@jackolantern@outline} \pingu@x@jackolantern;
+ \scope
+ \clip\pingu@x@jackolantern \pingu@x@jackolantern@eye@left \pingu@x@jackolantern@eye@right \pingu@x@jackolantern@nose;
+ \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@a} ([xshift=1.6mm]@pklr) to[bend left=18] (@pkr);
+ \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@c} ([xshift=-1.6mm]@pkll) to[bend right=22] (@pkl);
+ \pingu@draw[line cap=round,opacity=.2]{\pingu@color@jackolantern@backstripe@b} (@pklc) to[bend right=1] (@pkuc);
+ \endscope
+ \pingu@block{\pingu@color@jackolantern@stalk} ([yshift=-.5*\pingu@x@jackolantern@outline@w]@pksl) to[bend left=3] ([yshift=-.5*\pingu@x@jackolantern@outline@w]@pksr) to[bend right=8] ++(.85mm,2mm) -- ++(.65mm,0) coordinate[pos=.5] (@pkc) to[bend right=3] cycle;
+\pingu@block{\pingu@color@jackolantern@stalk@top} (@pkc) ellipse[x radius=.65mm/2, y radius=.085mm];
+\endscope
+}
+
+\pingu@create@wing@extra{hammer}{%
+ hammer \@lr/.code = {\pingu@set@extra{hammer\@lr}{true}\pingu@color{hammer\@lr}{##1}},
+ hammer \@lr/.default = pingu@silver,
+ hammer \@lr\space handle length/.code = \expandafter\def\csname pingu@hammer@\@lr @length\endcsname{##1},
+ hammer \@lr\space handle shift/.code = \expandafter\def\csname pingu@hammer@\@lr @shift\endcsname{##1},
+ hammer \@lr\space width/.code = \expandafter\def\csname pingu@hammer@\@lr @width\endcsname{##1},
+ hammer \@lr\space height/.code = \expandafter\def\csname pingu@hammer@\@lr @height\endcsname{##1},
+ hammer \@lr\space xshift/.code = \expandafter\def\csname pingu@hammer@\@lr @xshift\endcsname{##1},
+ hammer \@lr\space yshift/.code = \expandafter\def\csname pingu@hammer@\@lr @yshift\endcsname{##1},
+ hammer \@lr\space handle/.code = \pingu@color{hammer@\@lr @handle}{##1},%
+ hammer \@lr\space with knob/.style = {hammer \@lr=##1, hammer \@lr\space handle length=\dimexpr9mm+\csname pingu@hammer@\@lr @height\endcsname+.5mm,hammer \@lr\space yshift=\dimexpr-.5mm-\csname pingu@hammer@\@lr @height\endcsname},
+ hammer \@lr\space with knob/.default = pingu@silver
+}{hammer \@lr\space handle length=9mm, hammer \@lr\space handle=pingu@bronze, hammer \@lr\space handle shift=-4mm, hammer \@lr\space width=7mm,hammer \@lr\space height=3.5mm, hammer \@lr\space xshift=-0.5*\csname pingu@hammer@\@lr @width\endcsname,hammer \@lr\space yshift=-1mm}
+\def\pingu@draw@wi@hammer#1{%
+ \pingu@setup@wing{hammer}{#1}%
+\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
+% \csname pingu@color@hammer#1\endcsname
+ \pingu@block{\csname pingu@color@hammer@#1@handle\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,\csname pingu@hammer@#1@shift\endcsname) -- ++(0,\csname pingu@hammer@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-hammer-#1-top) -- ++(0,-\csname pingu@hammer@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
+ \pingu@block[rounded corners=2pt]{\csname pingu@color@hammer#1\endcsname} (\pingu@name-hammer-#1-top)++(\csname pingu@hammer@#1@xshift\endcsname,\csname pingu@hammer@#1@yshift\endcsname) rectangle ++(\csname pingu@hammer@#1@width\endcsname,\csname pingu@hammer@#1@height\endcsname);
+\endscope
+}
+
+\pingu@create@wing@extra{plank}{%
+ plank \@lr/.code = {\pingu@set@extra{plank\@lr}{true}\pingu@color{plank\@lr}{##1}},
+ plank \@lr/.default = pingu@bronze!80!pingu@black,
+ plank \@lr\space width/.code = \expandafter\def\csname pingu@plank@\@lr @width\endcsname{##1},
+ plank \@lr\space height/.code = \expandafter\def\csname pingu@plank@\@lr @height\endcsname{##1},
+ plank \@lr\space xshift/.code = \expandafter\def\csname pingu@plank@\@lr @xshift\endcsname{##1},
+ plank \@lr\space yshift/.code = \expandafter\def\csname pingu@plank@\@lr @yshift\endcsname{##1}
+}{plank \@lr\space width=7mm,plank \@lr\space height=16.5mm, plank \@lr\space xshift=0mm,plank \@lr\space yshift=-1mm}
+\def\pingu@draw@wi@plank#1{%
+ \pingu@setup@wing{plank}{#1}%
+\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
+\pingu@block[rounded corners=2pt]{\@col}([xshift=\csname pingu@plank@#1@xshift\endcsname,yshift=\csname pingu@plank@#1@yshift\endcsname]\pingu@name-wing-#1)++({-.5*(\csname pingu@plank@#1@width\endcsname)},{-.5*(\csname pingu@plank@#1@height\endcsname)}) rectangle ++({\csname pingu@plank@#1@width\endcsname},{\csname pingu@plank@#1@height\endcsname});
+\endscope
+}
+
+% \usetikzlibrary{spy}
+
+\pingu@create@wing@extra{magnifier}{%
+ magnifier \@lr/.code = {\pingu@set@extra{magnifier\@lr}{true}\pingu@color{magnifier\@lr}{##1}}, % \noexpand\tikzset{/pingu/@pingu/.append style={spy scope={circle,draw,magnification=4,size=1cm}}}
+ magnifier \@lr/.default = pingu@bronze,
+ magnifier \@lr\space handle length/.code = \expandafter\def\csname pingu@magnifier@\@lr @length\endcsname{##1},
+ magnifier \@lr\space handle shift/.code = \expandafter\def\csname pingu@magnifier@\@lr @shift\endcsname{##1},
+ magnifier \@lr\space size/.code = \expandafter\def\csname pingu@magnifier@\@lr @size\endcsname{##1},
+ magnifier \@lr\space glass/.code = \pingu@color{magnifier@\@lr @glass}{##1},
+ magnifier \@lr\space opacity/.code = \expandafter\def\csname pingu@magnifier@\@lr @opacity\endcsname{##1},
+ magnifier \@lr\space thick/.code = \expandafter\def\csname pingu@magnifier@\@lr @thick\endcsname{##1},
+ magnifier \@lr\space xshift/.code = \expandafter\def\csname pingu@magnifier@\@lr @xshift\endcsname{##1},
+ magnifier \@lr\space yshift/.code = \expandafter\def\csname pingu@magnifier@\@lr @yshift\endcsname{##1},
+ magnifier \@lr\space handle/.code = \pingu@color{magnifier@\@lr @handle}{##1}%
+}{magnifier \@lr\space handle length=3.5mm, magnifier \@lr\space handle shift=-4mm, magnifier \@lr\space xshift=0mm,magnifier \@lr\space yshift=1mm,magnifier \@lr\space size=2.5mm,magnifier \@lr\space thick=.5mm,magnifier \@lr\space glass=pingu@blue!90!pingu@yellow,magnifier \@lr\space opacity=0.24}
+\def\pingu@draw@wi@magnifier#1{%
+ \pingu@setup@wing{magnifier}{#1}%
+ \scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
+% \csname pingu@color@magnifier#1\endcsname
+ \path ([yshift=\csname pingu@magnifier@#1@yshift\endcsname+\csname pingu@magnifier@#1@size\endcsname,xshift=\csname pingu@magnifier@\@lr @xshift\endcsname]\pingu@name-wing-#1) coordinate (@);
+
+ % \spy[draw=green] on (@) in node at (@);
+% \pgfonlayer{foreground}
+ \pingu@block[even odd rule]{\@col} (@) circle[radius=\csname pingu@magnifier@#1@size\endcsname] circle[radius=\csname pingu@magnifier@#1@size\endcsname-\csname pingu@magnifier@#1@thick\endcsname];
+
+ \pingu@block[opacity=\csname pingu@magnifier@#1@opacity\endcsname]{\csname pingu@color@magnifier@#1@glass\endcsname} (@) circle[radius=\csname pingu@magnifier@#1@size\endcsname-\csname pingu@magnifier@#1@thick\endcsname];
+
+ \pingu@block{\@col} % TODO: adapt size
+ (@) ([shift={(-70:2.5mm)}]@) to[out=230,in=90] ++(-.5mm,-\csname pingu@magnifier@#1@length\endcsname) arc(360:180:.33mm) to[out=90,in=-50] ++(-.5mm,\csname pingu@magnifier@#1@length\endcsname);%
+% \endpgfonlayer
+\endscope
+}
+% #endregion
+
+% #region glasses-lib
+\pingu@create@extra{glasses}{%
+ glasses/.code = \pingu@set@extra{glasses}{true}\pingu@color{glasses}{#1},
+ glasses/.default = pingu@black,
+ glasses left fill/.code = \pingu@color{glasses@fill@l}{#1},
+ glasses right fill/.code = \pingu@color{glasses@fill@r}{#1},
+ glasses left opacity/.code = \def\pingu@x@glasses@op@l{#1},
+ glasses right opacity/.code = \def\pingu@x@glasses@op@r{#1},
+ glasses fill/.style = {/pingu/glasses left fill=#1, /pingu/glasses right fill=#1},
+ glasses opacity/.style = {/pingu/glasses left opacity=#1, /pingu/glasses right opacity=#1},
+ glasses line width/.code = \def\pingu@x@glasses@lw{#1},
+ sunglasses/.forward to = /pingu/sun glasses,
+ glasses bend left/.code = \def\pingu@x@glasses@bend@l{#1},
+ glasses bend right/.code = \def\pingu@x@glasses@bend@r{#1},
+ glasses bend/.style = {/pingu/glasses bend left=#1,/pingu/glasses bend right=#1},
+ sun glasses/.style = {/pingu/glasses, /pingu/glasses fill=#1},
+ sun glasses/.default = pingu@black,
+}{glasses line width=1.125\p@,glasses fill=\@pingu@none,glasses opacity=.825,glasses bend left=32.5,glasses bend right=32.5}
+
+\def\pingu@draw@ea@glasses{% fact: 1.33; modified first shift and ht
+ \pingu@block[opacity=\pingu@x@glasses@op@l]{\pingu@color@glasses@fill@l} (\pingu@name-eye-left)++(-2.66mm,1.75mm) to[bend left=8] ++(5.586mm,0) to[out=-80,in=70] ++(-.266mm,-3.6mm) to[bend left=\pingu@x@glasses@bend@l] ++(-4.8545mm,\z@) to[out=135,in=-90] ++(-1.064mm,3.5mm) -- cycle;
+ \pingu@block[opacity=\pingu@x@glasses@op@r]{\pingu@color@glasses@fill@r} (\pingu@name-eye-right)++(2.66mm,1.75mm) to[bend right=8] ++(-5.586mm,0) to[out=-100,in=110] ++(.266mm,-3.6mm) to[bend right=\pingu@x@glasses@bend@r] ++(4.8545mm,\z@) to[out=45,in=-90] ++(1.064mm,3.5mm) -- cycle;
+ \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} [rounded corners=.25mm](\pingu@name-eye-left)++(-2.66mm,1.75mm) coordinate (\pingu@name-glasses-left-mid) to[bend left=8] ++(5.586mm,0) coordinate (\pingu@name-glasses-left-outer) to[out=-80,in=70] ++(-.266mm,-3.6mm) to[bend left=\pingu@x@glasses@bend@l] ++(-4.8545mm,\z@) to[out=135,in=-90] coordinate[pos=.9] (\pingu@name-glasses-left-mid-b) ++(-1.064mm,3.5mm) -- cycle;
+ \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} [rounded corners=.25mm] (\pingu@name-eye-right)++(2.66mm,1.75mm) coordinate (\pingu@name-glasses-right-mid) to[bend right=8] ++(-5.586mm,0) coordinate (\pingu@name-glasses-right-outer) to[out=-100,in=110] ++(.266mm,-3.6mm) to[bend right=\pingu@x@glasses@bend@r] ++(4.8545mm,\z@) to[out=45,in=-90] coordinate[pos=.9] (\pingu@name-glasses-right-mid-b) ++(1.064mm,3.5mm) -- cycle;
+ \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} (\pingu@name-glasses-right-mid) to[bend right=10] (\pingu@name-glasses-left-mid);
+ \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses} (\pingu@name-glasses-right-mid-b) to[bend left=20] (\pingu@name-glasses-left-mid-b);
+ \scope
+ \clip[use path=\pingu@upperpingu];
+ \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses}
+ (\pingu@name-glasses-right-mid) to[bend right=8] ++(-5.586mm,0) -- ++(-5mm,.5mm);
+ \pingu@draw[line width=\pingu@x@glasses@lw]{\pingu@color@glasses}
+ (\pingu@name-glasses-left-mid) to[bend left=8] ++(5.586mm,0) -- ++(5mm,.5mm);
+ \endscope
+}
+\pingu@create@extra{glassesround}{%
+ glasses round/.code = \pingu@set@extra{glassesround}{true}\pingu@color{glassesround}{#1},
+ glasses round/.default = pingu@black,
+ glasses round left fill/.code = \pingu@color{glassesround@fill@l}{#1},
+ glasses round right fill/.code = \pingu@color{glassesround@fill@r}{#1},
+ glasses round fill/.style = {/pingu/glasses round left fill=#1, /pingu/glasses round right fill=#1},
+ glasses round left opacity/.code = \def\pingu@x@glassesround@op@l{#1},
+ glasses round right opacity/.code = \def\pingu@x@glassesround@op@r{#1},
+ glasses round opacity/.style = {/pingu/glasses round left opacity=#1, /pingu/glasses round right opacity=#1},
+ glasses round left radius/.code = \def\pingu@x@glassesround@r@l{#1},
+ glasses round right radius/.code = \def\pingu@x@glassesround@r@r{#1},
+ glasses round radius/.style = {/pingu/glasses round left radius=#1, /pingu/glasses round right radius=#1},
+ glasses round line width/.code = \def\pingu@x@glassesround@lw{#1},
+ sunglasses round/.forward to = /pingu/sun glasses round,
+ sun glasses round/.style = {/pingu/glasses round, /pingu/glasses round fill=#1},
+ sun glasses round/.default = pingu@black,
+ % todo: width/radius allow for different
+}{glasses round line width=.75\p@,glasses round fill=\@pingu@none,glasses round opacity=.825,glasses round radius=3.15mm}
+\def\pingu@draw@ea@glassesround{% fact: 1.33; modified first shift and ht
+ \pingu@block[opacity=\pingu@x@glassesround@op@l]{\pingu@color@glassesround@fill@l} (\pingu@name-eye-left) circle [radius=\pingu@x@glassesround@r@l];
+ \pingu@block[opacity=\pingu@x@glassesround@op@r]{\pingu@color@glassesround@fill@r} (\pingu@name-eye-right) circle [radius=\pingu@x@glassesround@r@r];
+ \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} [rounded corners=.25mm](\pingu@name-eye-left) ++(150:\pingu@x@glassesround@r@l) coordinate (\pingu@name-glassesround-left-mid) arc (150:510:\pingu@x@glassesround@r@l);
+ \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} [rounded corners=.25mm] (\pingu@name-eye-right) ++(30:\pingu@x@glassesround@r@r) coordinate (\pingu@name-glassesround-right-mid) arc (30:390:\pingu@x@glassesround@r@r);
+ \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround} (\pingu@name-glassesround-left-mid) to[bend right=30] (\pingu@name-glassesround-right-mid);
+ \scope
+ \clip[use path=\pingu@upperpingu];
+ \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround}
+ (\pingu@name-glassesround-right-mid) arc(30:150:\pingu@x@glassesround@r@l) -- ++(-5mm,.65mm);
+ \pingu@draw[line width=\pingu@x@glassesround@lw]{\pingu@color@glassesround}
+ (\pingu@name-glassesround-left-mid) arc(150:30:\pingu@x@glassesround@r@r) -- ++(5mm,.65mm);
+ \endscope
+}
+\pingu@create@extra{monocleleft}{%
+ monocle left/.code = \pingu@set@extra{monocleleft}{true}\pingu@color{monocleleft}{#1},
+ monocle left/.default = pingu@black,
+ monocle left glass/.code = \pingu@color{monocleleft@glass}{#1},
+ monocle left fill/.forward to = /pingu/monocle left glass,
+ monocle left opacity/.code = \def\pingu@x@monocleleft@opacity{#1},
+ monocle left fill opacity/.forward to = /pingu/monocle left opacity,
+ monocle left string/.code = \pingu@color{monocleleft@string}{#1},
+ monocle left string length/.code= \def\pingu@x@monocleleft@string@l{#1},
+ monocle left blob/.code = \pingu@color{monocleleft@blob}{#1},
+}{monocle left glass=pingu@blue,monocle left opacity=.155,monocle left string=\pingu@color@monocleleft,monocle left blob=\pingu@color@monocleleft,monocle left string length=5.55mm}
+
+\def\pingu@draw@eb@monocle@l{%
+ \pingu@block[/pingu/glow,opacity=\pingu@x@monocleleft@opacity]{\pingu@color@monocleleft@glass} (\pingu@name-eye-left) circle[radius=2mm];
+ \pingu@draw[thin]{\pingu@color@monocleleft@string} (\pingu@name-eye-left)++(2mm,0)
+ to[out=-75,in=100] ++(0,-\pingu@x@monocleleft@string@l);
+ \pingu@block{\pingu@color@monocleleft@blob} (\pingu@name-eye-left)++(2mm,-\pingu@x@monocleleft@string@l) circle [radius=.65\p@];
+ \pingu@draw[semithick]{\pingu@color@monocleleft} (\pingu@name-eye-left) circle[radius=2mm];
+}
+\pingu@create@extra{monocleright}{%
+ monocle right/.code = \pingu@set@extra{monocleright}{true}\pingu@color{monocleright}{#1},
+ monocle right/.default = pingu@black,
+ monocle right glass/.code = \pingu@color{monocleright@glass}{#1},
+ monocle right fill/.forward to = /pingu/monocle right glass,
+ monocle right opacity/.code = \def\pingu@x@monocleright@opacity{#1},
+ monocle right fill opacity/.forward to = /pingu/monocle right opacity,
+ monocle right string/.code = \pingu@color{monocleright@string}{#1},
+ monocle right string length/.code= \def\pingu@x@monocleright@string@r{#1},
+ monocle right blob/.code = \pingu@color{monocleright@blob}{#1},
+}{monocle right glass=pingu@blue,monocle right opacity=.155,monocle right string=\pingu@color@monocleright,monocle right blob=\pingu@color@monocleright,monocle right string length=5.55mm}
+\def\pingu@draw@eb@monocle@r{%
+ \pingu@block[/pingu/glow,opacity=\pingu@x@monocleright@opacity]{\pingu@color@monocleright@glass} (\pingu@name-eye-right) circle[radius=2mm];
+ \pingu@draw[thin]{\pingu@color@monocleright@string} (\pingu@name-eye-right)++(-2mm,0)
+ to[out=-105,in=80] ++(0,-\pingu@x@monocleright@string@r);
+ \pingu@block{\pingu@color@monocleright@blob} (\pingu@name-eye-right)++(-2mm,-\pingu@x@monocleright@string@r) circle [radius=.65\p@];
+ \pingu@draw[semithick]{\pingu@color@monocleright} (\pingu@name-eye-right) circle[radius=2mm];
+}
+% #endregion
+
+% #region hats-lib
+\pingu@create@extra{strawhat}{%
+ % extra strawhat (tikzducks basis)
+ straw hat/.forward to = /pingu/strawhat,
+ strawhat/.default = brown!50!white,
+ strawhat/.code = \pingu@set@extra{strawhat}{true}\pingu@color{strawhat}{#1},
+ straw hat ribbon/.forward to = /pingu/strawhat ribbon,
+ strawhat ribbon/.code = \pingu@color{strawhat@ribbon}{#1},
+ straw hat position/.forward to= /pingu/strawhat position,
+ strawhat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@strawhat@angle{#1}\def\pingu@x@strawhat@xshift{#2}\def\pingu@x@strawhat@yshift{#3}\def\pingu@x@strawhat@scale{#4}},
+}{strawhat ribbon= gray!85!black,strawhat position={-26.5:(-.185cm,.14cm){1.375}}}
+
+\def\pingu@draw@ea@strawhat{%
+\scope[rotate around={\pingu@x@strawhat@angle:(\pingu@name-head)},shift={(\pingu@name-head)},shift={(\pingu@x@strawhat@xshift,\pingu@x@strawhat@yshift)},scale=\pingu@x@strawhat@scale]
+\pingu@block{\pingu@color@strawhat} (.34cm,0) ellipse[x radius=.75cm, y radius=\pingu@one];
+\pingu@block{\pingu@color@strawhat} (0,.5mm) rectangle (.68cm,5mm);
+\pingu@block{\pingu@color@strawhat} (.34cm,5mm) ellipse[x radius=.34cm, y radius=.8mm];
+\pingu@block{\pingu@color@strawhat} (-.3955cm,.2mm) -- (1.0755cm,.2mm) -- (.68cm,2mm) -- (0,2mm) -- cycle;
+\pingu@block{\pingu@color@strawhat@ribbon} (.34cm,2mm) ellipse[x radius=.34cm, y radius=.8mm];
+\pingu@block{\pingu@color@strawhat@ribbon} (0,2mm) rectangle (.68cm,3mm);
+\pingu@block{\pingu@color@strawhat} (.34cm,3mm) ellipse[x radius=.34cm, y radius=.8mm];
+\endscope}
+
+\pingu@create@extra{hat}{%
+ hat/.default = pingu@black!90!black,
+ hat/.code = \pingu@set@extra{hat}{true}\pingu@color{hat}{#1},
+ hat base/.code = \pingu@color{hat@base}{#1},
+ hat coronal/.code = \pingu@color{hat@coronal}{#1},
+ hat ribbon/.code = \pingu@color{hat@ribbon}{#1},
+ hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@hat@angle{#1}\def\pingu@x@hat@xshift{#2}\def\pingu@x@hat@yshift{#3}\def\pingu@x@hat@scale{#4}},
+}{hat position={-2:(.35mm,0)1},hat base=\pingu@color@hat,hat coronal=\pingu@color@hat!91!white,hat ribbon=\pingu@color@hat!87!white}
+
+\newdimen\pingu@hat@w@half \pingu@hat@w@half=.925cm
+\newdimen\pingu@hat@h \pingu@hat@h=.625cm
+\def\pingupathhatupper{[rounded corners=.25mm](-.65cm,-.25cm) to[out=90,in=200] ++(.35cm,\pingu@hat@h) to[bend left=11] ++(.25cm,0) to[bend right=2.5] ++(\pingu@one,0) to[bend left=11] ++(.25cm,0) to[out=-20,in=90] ++(.35cm,-\pingu@hat@h) to[bend left=12] (-.65cm,-.25cm) -- cycle}
+\def\pingu@draw@ea@hat{%
+\scope[rotate around={\pingu@x@hat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@hat@xshift,\pingu@x@hat@yshift)},scale=\pingu@x@hat@scale]
+\pingu@block[/pingu/@draw=\pingu@color@hat@coronal,thick]{\pingu@color@hat@base} (0,-.25cm)++(180:\pingu@hat@w@half{} and .15cm) arc (180:360:\pingu@hat@w@half{} and .15cm) arc (0:180:\pingu@hat@w@half{} and .115cm) -- cycle;
+\pingu@block{\pingu@color@hat} \pingupathhatupper;
+\scope
+\clip\pingupathhatupper;
+\pingu@block{\pingu@color@hat@ribbon} (\z@,.2mm) ellipse [x radius=.95\pingu@hat@w@half, y radius=.13cm];
+\pingu@block{\pingu@color@hat} (\z@,.134cm) ellipse [x radius=.95\pingu@hat@w@half, y radius=.13cm];
+\endscope\endscope}
+
+% TODO: tassel
+\pingu@create@extra{graduate}{%
+ graduate cap/.forward to = /pingu/graduate,
+ graduate/.default = pingu@black!95!white,
+ graduate/.code = \pingu@set@extra{graduate}{true}\pingu@color{graduate}{#1},
+ graduate cap top/.forward to = /pingu/graduate top,
+ graduate top/.code = \pingu@color{graduate@top}{#1},
+ graduate cap tilt/.forward to = /pingu/graduate tilt,
+ graduate tilt/.code = \def\pingu@x@graduate@tilt{#1},
+ graduate cap tassel/.forward to = /pingu/graduate tassel,
+ graduate tassel/.code = \pingu@color{graduate@tassel}{#1},
+ graduate tassel/.default = pingu@red!65!black,
+ graduate cap tassel drop/.forward to = /pingu/graduate tassel drop,
+ graduate tassel drop/.code = \pingu@color{graduate@tassel@drop}{#1},
+ graduate cap tassel start/.forward to = /pingu/graduate tassel start,
+ graduate tassel start/.code = \def\pingu@x@tassel@start{#1},
+ graduate cap tassel width/.forward to = /pingu/graduate tassel width,
+ graduate tassel width/.code = \def\pingu@x@tassel@width{#1},
+ graduate cap tassel length/.forward to = /pingu/graduate length,
+ graduate tassel length/.code = \def\pingu@x@tassel@length{#1},
+ graduate cap tassel drop size/.forward to = /pingu/graduate drop size,
+ graduate tassel drop size/.code = \def\pingu@x@tassel@drop@size{#1},
+ graduate cap position/.forward to = /pingu/graduate position,
+ graduate position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@graduate@angle{#1}\def\pingu@x@graduate@xshift{#2}\def\pingu@x@graduate@yshift{#3}\def\pingu@x@graduate@scale{#4}},
+}{graduate position={-27:(-.19cm,.14cm){1.375}}, graduate top=\pingu@color@graduate!95!white,graduate tilt=2.33mm,graduate tassel=\@pingu@none, graduate tassel width=.5mm, graduate tassel length=5.5mm,graduate tassel drop size=.75*\pingu@x@tassel@width,graduate tassel drop=\pingu@color@graduate@tassel,graduate cap tassel start={(.55cm,3.5mm-\pingu@x@graduate@tilt)}} % ; tassel color to hide
+
+\def\pingu@draw@ea@graduate{%
+\scope[rotate around={\pingu@x@graduate@angle:(\pingu@name-head)},shift={(\pingu@name-head)},shift={(\pingu@x@graduate@xshift,\pingu@x@graduate@yshift)},scale=\pingu@x@graduate@scale]
+\pingu@block{\pingu@color@graduate} (0,1mm) rectangle (.75cm,3.5mm);
+\pingu@block{\pingu@color@graduate} (.375cm,1mm) ellipse[x radius=.375cm, y radius=.8mm];
+\pingu@block[rounded corners=.33mm]{\pingu@color@graduate@top} (-3mm,3.5mm)
+ % minor slant for visuals
+ -- ++(.675cm + .1mm,\pingu@x@graduate@tilt) -- (1.05cm,3.5mm) -- ++(-.675cm - .1mm,-\pingu@x@graduate@tilt) -- cycle;
+% counter rotation
+\scope[rotate around={-\pingu@x@graduate@angle:(\pingu@name-head)}]
+\pingu@draw[line width=\pingu@x@tassel@width]{\pingu@color@graduate@tassel} \pingu@x@tassel@start to[out=-45,in=90] ++(.2*\pingu@x@tassel@length,-\pingu@x@tassel@length) coordinate(@);
+\pingu@block{\pingu@color@graduate@tassel@drop} (@) circle[x radius=\pingu@x@tassel@drop@size, y radius=1.75*\pingu@x@tassel@drop@size];
+\endscope
+\endscope}
+
+\pingu@create@extra{cap}{%
+ cap/.default = pingu@bronze,
+ cap/.code = \pingu@set@extra{cap}{true}\pingu@color{cap}{#1},
+ cap padding/.code = {\def\pingu@x@cap@padding{#1}},
+ cap extra height/.code = {\def\pingu@x@cap@height{#1}},
+}{cap padding=.8mm, cap extra height=0pt}
+
+\def\pingu@draw@ea@cap{%
+\pingu@layer{foreground}[]
+\pingu@block[rounded corners=.7mm]{\pingu@color@cap} ([xshift=.25mm]\pingu@name-wing-left-start) to[bend left=4] ([xshift=-\pingu@x@cap@padding]\pingu@name-wings-side-left) to[bend right=3]
+([yshift=\pingu@x@cap@height]\pingu@name-head)
+to[bend right=3]
+([xshift=\pingu@x@cap@padding]\pingu@name-wings-side-right) [rounded corners=.15mm] to[bend left=4] ([xshift=-.25mm]\pingu@name-wing-right-start)
+to[bend left=8]
+([xshift=-\pingu@x@cap@padding]\pingu@name-wings-side-right)
+[rounded corners=.15mm]
+to[bend left=32] ++(\pingu@w@half+\pingu@x@cap@padding,\pingu@w@half+\pingu@one)
+to[bend left=32] ++(\pingu@w@half+\pingu@x@cap@padding,-\pingu@w@half-\pingu@one)
+to[bend left=8] cycle;
+\endpingu@layer
+}
+
+\pingu@create@extra{constructionhelmet}{%
+ construction helmet/.default = pingu@yellow,
+ construction helmet/.code = \pingu@set@extra{constructionhelmet}{true}\pingu@color{constructionhelmet}{#1},
+ construction helmet padding/.code = {\def\pingu@x@constructionhelmet@padding{#1}},
+ construction helmet extra height/.code = {\def\pingu@x@constructionhelmet@height{#1}},
+ construction helmet position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@constructionhelmet@angle{#1}\def\pingu@x@constructionhelmet@xshift{#2}\def\pingu@x@constructionhelmet@yshift{#3}\def\pingu@x@constructionhelmet@scale{#4}},
+}{construction helmet padding=.325cm, construction helmet extra height=0pt,construction helmet position={-.5:(.05mm,-1.25mm)1}}
+
+\newdimen\pingu@constructionhelmet@w@half \pingu@constructionhelmet@w@half=.85cm
+\def\pingu@draw@ea@constructionhelmet{%
+\scope[rotate around={\pingu@x@constructionhelmet@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@constructionhelmet@xshift,\pingu@x@constructionhelmet@yshift)},scale=\pingu@x@constructionhelmet@scale]
+\pingu@block{\pingu@color@constructionhelmet} (0,-.25cm)++(180:\pingu@constructionhelmet@w@half{} and \pingu@x@constructionhelmet@padding) arc (180:360:\pingu@constructionhelmet@w@half{} and \pingu@x@constructionhelmet@padding) arc (0:180:\pingu@constructionhelmet@w@half{} and .2cm) -- cycle;
+\scope
+\pingu@block{\pingu@color@constructionhelmet!93!pingu@black} (0,-.25cm)++(0:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (0:180:{.95\pingu@constructionhelmet@w@half} and .675cm) coordinate[pos=.212] (@a) coordinate[pos=.256] (@aa) coordinate[pos=.788] (@b) coordinate[pos=.744] (@bb) arc (180:360:{.95\pingu@constructionhelmet@w@half} and .125cm) -- cycle;
+\clip (0,-.25cm)++(0:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (0:180:{.95\pingu@constructionhelmet@w@half} and .675cm) arc (180:360:{.95\pingu@constructionhelmet@w@half} and .125cm) -- cycle;
+\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.75mm,-.25cm-.125cm) to[bend left=1] ++ (0,.675cm+.125cm) -- ++(1.5mm,0) to[bend right=1] ++(0,-.675cm-.125cm) -- cycle;
+\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.95mm,-.25cm-.125cm) to[bend left=3] ++ (-8mm,.675cm+.125cm) -- ++(1.5mm,0) to[bend right=3] ++(8mm,-.675cm-.125cm) -- cycle;
+\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (-.55mm,-.25cm-.125cm) to[bend right=3] ++ (8mm,.675cm+.125cm) -- ++(1.5mm,0) to[bend left=3] ++(-8mm,-.675cm-.125cm) -- cycle;
+\endscope
+% get the 3d wobbles
+\pingu@block[rounded corners=.03mm]{\pingu@color@constructionhelmet!99!pingu@black} (-.75mm,-.25cm+.675cm-.25mm) -- ++(0,.3mm) -| ++(1.5mm,-.3mm) -- cycle;
+\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (@a) to[bend right=14] (@aa);
+\pingu@block{\pingu@color@constructionhelmet!99!pingu@black} (@bb) to[bend right=14] (@b);
+\endscope
+}
+
+\pingu@create@extra{conicalhat}{%
+ conical hat/.default = pingu@bronze,
+ conical hat/.code = \pingu@set@extra{conicalhat}{true}\pingu@color{conicalhat}{#1},
+ conical hat rounding/.code = {\def\pingu@x@conicalhat@rounding{#1}},
+ conical hat shade/.code = {\def\pingu@x@conicalhat@shade{#1}},
+ conical hat height/.code = {\def\pingu@x@conicalhat@height{#1}},
+ conical hat width/.code = {\def\pingu@x@conicalhat@width{#1}},
+ conical hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@conicalhat@angle{#1}\def\pingu@x@conicalhat@xshift{#2}\def\pingu@x@conicalhat@yshift{#3}\def\pingu@x@conicalhat@scale{#4}},
+}{conical hat position={-15:(2mm,-3mm)1}, conical hat height=8mm, conical hat width=2.25cm,conical hat shade=\pingu@color@conicalhat!80!pingu@black, conical hat rounding=.4pt}
+
+\def\pingu@draw@ea@conicalhat{%
+\scope[rotate around={\pingu@x@conicalhat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@conicalhat@xshift,\pingu@x@conicalhat@yshift)},scale=\pingu@x@conicalhat@scale]
+
+\pingu@layer{background}[]
+\pingu@block[rounded corners=\pingu@x@conicalhat@rounding]{\pingu@x@conicalhat@shade} (0,-.22cm)++(180:{\pingu@x@conicalhat@width/2+.05mm} and 1mm) coordinate (@) arc (180:360:{\pingu@x@conicalhat@width/2+.05mm} and 1mm) -- ++(.15mm,.3mm) to[bend right=5] ++(-\pingu@x@conicalhat@width/2, \pingu@x@conicalhat@height-.025cm) to[bend right=5] ([xshift=-.15mm,yshift=.3mm]@) -- cycle;
+\endpingu@layer
+
+\pingu@block[rounded corners=\pingu@x@conicalhat@rounding]{\pingu@color@conicalhat} (0,-.25cm)++(180:\pingu@x@conicalhat@width/2 and 1mm) coordinate (@) arc (180:0:\pingu@x@conicalhat@width/2 and 1mm) -- ++(.225mm,.6mm) to[bend right=5] ++(-\pingu@x@conicalhat@width/2, \pingu@x@conicalhat@height) to[bend right=5] ([xshift=-.225mm,yshift=.6mm]@) -- cycle;
+\endscope
+}
+
+\pingu@create@extra{spacehelmet}{%
+ space helmet/.default = pingu@black!45!white,
+ space helmet/.code = \pingu@set@extra{spacehelmet}{true}\pingu@color{spacehelmet}{#1},
+ space helmet glass/.code= \pingu@color{spacehelmet@glass}{#1},
+ space helmet glass opacity/.code = \def\pingu@x@spacehelmet@glass@opacity{#1},
+ space helmet position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@spacehelmet@angle{#1}\def\pingu@x@spacehelmet@xshift{#2}\def\pingu@x@spacehelmet@yshift{#3}\def\pingu@x@spacehelmet@scale{#4}},
+}{space helmet position={-2:(.35mm,0)1},space helmet glass=pingu@blue!40!pingu@yellow!50!white,space helmet glass opacity=.33}
+
+\newdimen\pingu@spacehelmet@w@half \pingu@spacehelmet@w@half=.935cm
+\newdimen\pingu@spacehelmet@h \pingu@spacehelmet@h=1.125cm
+\def\pingu@draw@ea@spacehelmet{%
+\scope[rotate around={\pingu@x@spacehelmet@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@spacehelmet@xshift,\pingu@x@spacehelmet@yshift)},scale=\pingu@x@spacehelmet@scale]
+\pingu@block[opacity=\pingu@x@spacehelmet@glass@opacity]{\pingu@color@spacehelmet@glass} (\pingu@name-head-center) ellipse [x radius=.9\pingu@spacehelmet@w@half, y radius=.45\pingu@spacehelmet@h];
+
+\pingu@block[/pingu/@draw=\pingu@color@spacehelmet,thick, even odd rule]{\pingu@color@spacehelmet}
+ ([yshift=-1mm]\pingu@name-wings-side-right) to[bend right=57] ([yshift=-1mm]\pingu@name-wings-side-left)
+ arc (0:180:\pingu@spacehelmet@w@half{} and \pingu@spacehelmet@h) -- cycle
+ (\pingu@name-head-center) ellipse [x radius=.9\pingu@spacehelmet@w@half, y radius=.45\pingu@spacehelmet@h];
+\endscope}
+
+\pingu@create@extra{witchhat}{%
+ witch hat/.code = \pingu@set@extra{witchhat}{true}\pingu@color{witchhat}{#1},
+ witch hat/.default = pingu@purple!40!black,
+ witch hat base/.code = \pingu@color{witchhat@base}{#1},
+ witch hat coronal/.code = \pingu@color{witchhat@coronal}{#1},
+ witch hat ribbon/.code = \pingu@color{witchhat@ribbon}{#1},
+ witch hat band/.code = \pingu@color{witchhat@band}{#1},
+ witch hat position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@witchhat@angle{#1}\def\pingu@x@witchhat@xshift{#2}\def\pingu@x@witchhat@yshift{#3}\def\pingu@x@witchhat@scale{#4}},
+}{witch hat position={-7:(.625mm,.45mm){1.15}},witch hat base=\pingu@color@witchhat,witch hat coronal=\pingu@color@witchhat!91!white,witch hat ribbon=\pingu@color@witchhat!87!white,witch hat band=!hide}
+
+\newdimen\pingu@witchhat@w@half \pingu@witchhat@w@half=1.125cm
+\newdimen\pingu@witchhat@h \pingu@witchhat@h=1.3cm
+\def\pingupathwitchhatupper{[rounded corners=.65mm](-.625cm,-.25cm) -- ++(.8cm,\pingu@witchhat@h-4.5mm) -- ++(6.5mm,4.5mm) -- ++(-1.5mm,-4.5mm) -- ++(-1.25mm,-\pingu@witchhat@h+4.5mm)}
+\def\pingu@draw@ea@witchhat{%
+\scope[rotate around={\pingu@x@witchhat@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@witchhat@xshift,\pingu@x@witchhat@yshift)},scale=\pingu@x@witchhat@scale]
+\pingu@draw[semithick]{\pingu@color@witchhat@band} (-.615cm,-.25cm) to[out=-100,in=180] ++(.5cm,-1.1cm) to[bend right=5] ++(3.5mm,.1mm) to[out=0,in=-78] ++(.433cm,1.1cm);
+\pingu@block[/pingu/@draw=\pingu@color@witchhat@coronal,thick]{\pingu@color@witchhat@base} (0,-.25cm)++(180:\pingu@witchhat@w@half{} and .15cm) arc (180:360:\pingu@witchhat@w@half{} and .15cm) arc (0:180:\pingu@witchhat@w@half{} and .115cm) -- cycle;
+\pingu@block{\pingu@color@witchhat} \pingupathwitchhatupper;
+\clip\pingupathwitchhatupper;
+\pingu@block{\pingu@color@witchhat@ribbon} (\z@,.2mm) ellipse [x radius=.95\pingu@witchhat@w@half, y radius=.12cm];
+\pingu@block{\pingu@color@witchhat} (\z@,.134cm) ellipse [x radius=.95\pingu@witchhat@w@half, y radius=.12cm];
+\endscope
+}
+
+
+\pingu@create@extra{mitra}{%
+ mitra/.default = pingu@red!67!pingu@black,%pingu@black!90!black,
+ mitra/.code = \pingu@set@extra{mitra}{true}\pingu@color{mitra}{#1},
+ mitra height/.code = {\def\pingu@x@mitra@height{#1}},
+ mitra background/.code = \pingu@color{mitra@background}{#1},
+ mitra overset/.code = {\def\pingu@x@mitra@overset{#1}},
+ mitra lower angle/.code = {\def\pingu@x@mitra@lowerangle{#1}},
+ mitra upper angle/.code = {\def\pingu@x@mitra@upperangle{#1}},
+ mitra lower band/.code = \pingu@color{mitra@lower@band}{#1},
+ mitra lower band height/.code = {\def\pingu@x@mitra@lowerband@height{#1}},
+ mitra upper band/.code = \pingu@color{mitra@upper@band}{#1},
+ mitra upper band height/.code = {\def\pingu@x@mitra@upperband@height{#1}},
+ mitra center band/.code = \pingu@color{mitra@center@band}{#1},
+ mitra center band width/.code = {\def\pingu@x@mitra@centerband@width{#1}},
+ mitra position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@mitra@angle{#1}\def\pingu@x@mitra@xshift{#2}\def\pingu@x@mitra@yshift{#3}\def\pingu@x@mitra@scale{#4}},
+}{mitra position={0:(0,0)1},mitra height=1.125cm,mitra overset=1.25mm,mitra lower angle=125,mitra upper angle=-35,mitra lower band=pingu@yellow!75!pingu@black,mitra center band=\pingu@color@mitra@lower@band,mitra lower band height=.2,mitra center band width={2*\pingu@x@mitra@lowerband@height},mitra upper band=\pingu@color@mitra@lower@band,mitra upper band height={1.5*\pingu@x@mitra@lowerband@height},mitra background=\pingu@color@mitra!80!pingu@black}
+
+\newdimen\pingu@mitra@w@half \pingu@mitra@w@half=.625cm
+\def\pingu@x@mitra@path{(0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) [rounded corners=1pt] -- ++(\pingu@x@mitra@overset,.3*\pingu@x@mitra@height) to[out=\pingu@x@mitra@lowerangle,in=\pingu@x@mitra@upperangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half,.7*\pingu@x@mitra@height)
+to[out=180-\pingu@x@mitra@upperangle,in=180-\pingu@x@mitra@lowerangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half,-.7*\pingu@x@mitra@height) [sharp corners] -- cycle}
+\def\pingu@draw@ea@mitra{%
+\scope[rotate around={\pingu@x@mitra@angle:(\pingu@name-head-top)},shift={(\pingu@name-head-top)},shift={(\pingu@x@mitra@xshift,\pingu@x@mitra@yshift)},scale=\pingu@x@mitra@scale]
+\pingu@block{\pingu@color@mitra@background} (0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) [rounded corners=1pt] -- ++(\pingu@x@mitra@overset,.3*\pingu@x@mitra@height) to[out=\pingu@x@mitra@lowerangle,in=\pingu@x@mitra@upperangle] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half-.66mm,.7*\pingu@x@mitra@height-.1mm)
+to[out=180-\pingu@x@mitra@upperangle+2,in=180-\pingu@x@mitra@lowerangle-2] ++(-\pingu@x@mitra@overset-\pingu@mitra@w@half+.66mm,-.7*\pingu@x@mitra@height+.1mm) [sharp corners] -- cycle;
+\pingu@block{\pingu@color@mitra} \pingu@x@mitra@path;
+% \pingu@block{\pingu@color@mitra} \pingupathmitraupper;
+\scope\clip\pingu@x@mitra@path;
+% TODO: switch to factors non relative to \pingu@x@mitra@overset
+\pingu@block{\pingu@color@mitra@lower@band} (0,-.2185cm)++(180:\pingu@mitra@w@half{} and .035cm) arc (180:360:\pingu@mitra@w@half{} and .035cm) -- ++(\pingu@x@mitra@lowerband@height*\pingu@x@mitra@overset,\pingu@x@mitra@lowerband@height*.3*\pingu@x@mitra@height) arc (0:-180:{\pingu@x@mitra@lowerband@height*\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- cycle;
+\pingu@block{\pingu@color@mitra@center@band} (\pingu@x@mitra@centerband@width*\pingu@x@mitra@overset+.1mm,-.2185cm) to[bend right=4] ++(0,\pingu@x@mitra@height) to[bend right] ++(-2*\pingu@x@mitra@centerband@width*\pingu@x@mitra@overset-.1mm,0) to[bend left=4] ++(0,-\pingu@x@mitra@height) -- cycle;
+\pingu@block{\pingu@color@mitra@upper@band} (0,.3*\pingu@x@mitra@height-.2185cm-0.5*\pingu@x@mitra@upperband@height*.3*\pingu@x@mitra@height)++(180:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) arc (180:360:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- ++(0,\pingu@x@mitra@upperband@height*.3*\pingu@x@mitra@height) arc (0:-180:{\pingu@x@mitra@overset+\pingu@mitra@w@half} and .035cm) -- cycle;
+\endscope\endscope}
+% #endregion
+
+% #region horse-lib
+\colorlet{base@a}{lightgray!95!black}
+\colorlet{base@b}{lightgray!79!black}
+
+\colorlet{a}{lightgray!63!black}
+\colorlet{b}{lightgray!81!black}
+\def\basew{12}
+\def\pingu@@horse@scale{.1}
+
+\def\pingu@@horse@@main{(1.275,.55) -- ++(\if@pingu@@horse@@donkey@.05\else.1\fi,.2) -- ++(\if@pingu@@horse@@donkey@-.2\else-.25\fi,.25) to[bend right=4] ++(-.425,1.75) to[bend left=15] ++(.05,.2) to[bend right=30] ++(-.1,1.9) to[bend left=30] ++(0,1.65) coordinate(@back) to[bend left=30] ++(2,.625) to[bend right=18,looseness=.8] ++(3.25,-.1) [rounded corners=2*\pingu@@horse@scale] coordinate(@hair) to[out=34,in=185] ++(3,1.3) to[bend left=19] coordinate[pos=.5](@ear) ++(.85,-.4) to[bend left=5] ++(.24,-.45) to[bend right=20] ++(\if@pingu@@horse@@donkey@.25\else0\fi,\if@pingu@@horse@@donkey@-1.2\else-.7\fi) to[bend left=2] ++(.1,-.55) to[out=-85,in=-60,looseness=.75] ++(\if@pingu@@horse@@donkey@-.55\else-.475\fi,\if@pingu@@horse@@donkey@-.45\else-.35\fi) coordinate(@mouth) to[out=-135,in=-120] ++(\if@pingu@@horse@@donkey@-.4\else-.37\fi,\if@pingu@@horse@@donkey@.2\else.25\fi) -- ++(0,.1)
+to[out=125,in=-68] ++(-.58,.615) coordinate (@mouth-low)
+to[out=215,in=80] ++(-1.25,-2) to[bend left=24] ++(-.65,-1) to[out=258,in=86] ++(-.42,-1.25) to[bend left=3] ++(-.2,-.6) to[bend right=10] ++(-.14,-1.15) to[bend left=2] coordinate[pos=.62] (@hooffront) ++(.355,-.565) to[bend left=15] ++(-.4,-.075) to[bend left=10] ++(-.28,.1) to[bend left=9] ++(.06,.3) to[bend right=9] ++(-.2,.4) to[out=80,in=-80] ++(.138,1.4) to[out=70,in=-103] ++(.2,1.3) to[bend right=10] ++(-.225,.44) coordinate (@frontleg) to[out=196,in=\if@pingu@@horse@@donkey@-65\else-25\fi] ++(-3.3,\if@pingu@@horse@@donkey@.4\else.575\fi) coordinate (@backleg) to[bend right=\if@pingu@@horse@@donkey@16\else10\fi] ++(-.8,\if@pingu@@horse@@donkey@-1.375\else-1.5\fi) to[bend right=\if@pingu@@horse@@donkey@9\else20\fi] ++(.1,-2.35) -- ++(\if@pingu@@horse@@donkey@.1\else.2\fi,-.25)
+coordinate (@hoofback) to[bend right=\if@pingu@@horse@@donkey@9\else8\fi] ++(.15,-.26) to[bend left=10] ++(\if@pingu@@horse@@donkey@-.66\else-.55\fi,\if@pingu@@horse@@donkey@-.15\else-.05\fi) -- cycle}
+
+% #1 is the wing for the color and key assignments
+\def\pingu@@drawer@horse#1{
+% this ensures all coordinates are set in place
+% i know this i inefficient, but atm this is of no greater
+% concern -- i can not use layers as they would clash with that
+% of the penguin and who wants that... no one does!
+% penguins deserve freedom!
+\path \pingu@@horse@@main;
+
+% no we draw "behind" the horse:
+
+% Sockel
+\csname if@pingu@x@horse@#1@base@\endcsname
+\pingu@block[draw=\csname pingu@color@horse#1@base@shade@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@base@shade\endcsname} (4.35-\basew/2,.433) -- ++(0,-.5) arc(180:360:\basew/2 and 1) -- ++(0,.5) arc(360:180:\basew/2 and 1);
+\pingu@block[draw=\csname pingu@color@horse#1@base@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@base\endcsname} (4.35,.433) ellipse[x radius=\basew/2,y radius=1];
+\fi
+% background front leg
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale](@frontleg) to[out=266,in=85] ++(.09,-.5) to[bend left=10] ++(-.15,-.8)
+to[bend right=7] ++(-.05,-.2) to[bend left=13] ++(-.2,-1.15) to[bend right=13] ++(.15,-.2) to[bend left=10] ++(-.07,-.3) to[bend right=100] ++(.45,-.1) to[bend right=10] coordinate[pos=0.08](@hooffront@) ([yshift=5mm,xshift=3mm]@frontleg) -- cycle;
+\pingu@block[draw=\csname pingu@color@horse#1@fr@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale,rounded corners=.12]{\csname pingu@color@horse#1@fr@hoof\endcsname} (@hooffront@) to[bend left=2] ++(0,-.565*.665) to[bend left=59] ++(-.225,-.08) -- ++(-.02,.03) to[bend left=20] ++(-.315,.11) to[bend right=6] ++(.092,.2) to[bend right=25] cycle;
+% background back le0
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale](@backleg) to[out=-115,in=\if@pingu@@horse@@donkey@120\else130\fi] ++(-.3,-3.5) -- ++(.2,-.3) coordinate(@hoofback@) to[bend left] ++(-.5,-.1)
+-- ++(\if@pingu@@horse@@donkey@-.2\else-.05\fi,.15) -- ++(0,.15) to[bend left=\if@pingu@@horse@@donkey@45\else60\fi] cycle;
+\pingu@block[draw=\csname pingu@color@horse#1@br@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@br@hoof\endcsname} (@hoofback@) to[bend right=\if@pingu@@horse@@donkey@9\else9\fi] ++(.206,-.265) to[bend left=10] ++(\if@pingu@@horse@@donkey@-.66\else-.55\fi,\if@pingu@@horse@@donkey@-.15\else-.05\fi) -- ++(-1.73mm,2.42mm) to[bend right=6] cycle;
+
+\if@pingu@@horse@@donkey@
+\pingu@block[draw=\csname pingu@color@horse#1@tail@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@tail\endcsname} [rounded corners=1*\pingu@@horse@scale](@back) to[out=215,in=95] ++(-.1,-2) to[out=270,in=92] ++(0,-.75) [sharp corners] to[bend right=20] coordinate[pos=.5] (@) ++(.15,0) to[bend right=10] cycle;
+% TODO: hide support
+%\node[draw=\csname pingu@color@horse#1@tail@draw\endcsname,fill=\csname pingu@color@horse#1@tail\endcsname,cloud,cloud puffs=30,cloud ignores aspect,scale=1.33*\pingu@@horse@scale,yshift=16mm,rotate=-5,line width=\@pingu@@horse@lw*\pingu@@horse@scale] at (@) {\rotatebox{90}{\phantom{A}\hskip7.5em}};
+\scope[rotate around={180:(@)}] % adapted from the broom
+\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname} (@)++(-1mm,-2mm) to[out=115,in=240] ++(3mm,12.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]@) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]@) -- cycle;
+\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname} (@)++(-1mm,-2mm) to[out=115,in=240] coordinate[pos=.17] (@r) coordinate[pos=.19] (@r2) ++(-.75mm,10.5mm) to[out=300,in=65] ([xshift=.95mm,yshift=-2mm]@) to[bend right=4] ([xshift=-.75mm,yshift=-2mm]@) -- cycle;
+\pingu@block[rounded corners=.44pt,draw=\csname pingu@color@horse#1@tail@draw\endcsname]{\csname pingu@color@horse#1@tail\endcsname}(@)++(-.5mm,-1.5mm) to[out=115,in=240] ++(.5mm,12mm) to[out=300,in=65] ([xshift=.5mm,yshift=-1.5mm]@) -- cycle;
+\endscope
+\else
+\pingu@block[draw=\csname pingu@color@horse#1@tail@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@tail\endcsname} [rounded corners=1*\pingu@@horse@scale](@back) to[out=215,in=90] ++(-.4,-2.5) to[out=270,in=92] ++(0,-2.8) [sharp corners] to[bend right=20] ++(.6,0) to[bend right=10] cycle;
+\fi
+
+% back ear
+\if@pingu@@horse@@donkey@
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=.2mm,yshift=-1.5mm]@ear) to[bend left=20] ++(.373,1.465) coordinate(@) to[bend left=10] ++(-.15,-1.5);
+\else
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=.2mm,yshift=-1.5mm]@ear) to[bend left=20] ++(.373,.565) coordinate(@) to[bend left=10] ++(-.15,-.75);
\fi
+% and here comes the wheeee (imagine-horse-sound)
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1\endcsname} [rounded corners=1*\pingu@@horse@scale] \pingu@@horse@@main;
+
+\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.1mm]@mouth-low) to[bend left=12] ++(.06,.65);
+\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mouth\endcsname} ([yshift=-.115mm]@mouth) -- ++(-.035,.225);
+
+\edef\pingu@tmp{\if@pingu@@horse@@donkey@4.5mm\else3.85mm\fi}%
+\edef\pingu@tmpb{\if@pingu@@horse@@donkey@3.65mm\else2.45mm\fi}%
+\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale,line join=round]{\csname pingu@color@horse#1@nose\endcsname} ([xshift=\pingu@tmp,yshift=\pingu@tmpb]@mouth) to[out=140,in=10] ++(-.17,-.074) to[bend right=49] cycle;
+
+\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.35mm]@frontleg) to[bend left=12] ++(.01,.325);
+\pingu@draw[line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@draw\endcsname} ([yshift=-.2mm]@backleg) to[bend right=13] ++(.25,.425);
+
+\if@pingu@@horse@@donkey@
+\pingu@block[draw=\csname pingu@color@horse#1@mane@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mane\endcsname} [rounded corners=1*\pingu@@horse@scale](@hair) to[out=34,in=185] ++(3,1.3) to[bend left=10] ++(.415,-.1) -- ++(-.1,-.25) to[out=186,in=35] ([yshift=-4mm,xshift=1.5mm]@hair) -- cycle;
+
+\pingu@block[draw=\csname pingu@color@horse#1@thatch@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@thatch\endcsname} [rounded corners=1*\pingu@@horse@scale]([xshift=2.1mm,yshift=-1.05mm]@ear) -- ++(-.1,-.2) to[bend left=4] ++(.45,-.275) to[bend right=9] cycle;
+\else
+\pingu@block[draw=\csname pingu@color@horse#1@mane@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@mane\endcsname} [rounded corners=1*\pingu@@horse@scale](@hair) to[out=34,in=185] ++(3,1.3) to[bend left=10] ++(.415,-.1) -- ++(-.1,-.4) to[out=194,in=30] ([yshift=-11.5mm,xshift=1.5mm]@hair) -- cycle;
+
+\pingu@block[draw=\csname pingu@color@horse#1@thatch@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@thatch\endcsname} [rounded corners=1*\pingu@@horse@scale]([xshift=2mm,yshift=-1mm]@ear) -- ++(-.1,-.3275) to[bend left=4] ++(.455,-.175) to[bend right=9] cycle;
+\fi
+
+% ear
+\if@pingu@@horse@@donkey@
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=-1mm,yshift=-1mm]@ear) to[bend left=15] ++(.393,1.685) coordinate(@) to[bend right=17] ++(-.15,-1.8);
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} (@) to[bend right=17] ++(-.15,-1.8) to[bend right=14] cycle;
+\else
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} ([xshift=-.75mm,yshift=-1mm]@ear) to[bend left=20] ++(.393,.585) coordinate(@) to[bend right=10] ++(-.15,-.7);
+\pingu@block[draw=\csname pingu@color@horse#1@draw\endcsname,line width=\@pingu@@horse@lw*\pingu@@horse@scale]{\csname pingu@color@horse#1@ears\endcsname} (@) to[bend right=7] ++(-.15,-.7) to[bend right=14] cycle;
+\fi
+
+% the eye; this is no error it has draw as fill
+\pingu@block{\csname pingu@color@horse#1@eyes\endcsname} [rounded corners=.25*\pingu@@horse@scale] ([xshift=3mm,yshift=-7.5mm]@ear) to[bend right=20] ++(.125,-.2) to[bend right=50] ++(.1,.125) to[bend left=15] cycle;
+
+\pingu@block[draw=\csname pingu@color@horse#1@fl@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@fl@hoof\endcsname} (@hooffront) to[bend left=2] ++(.355*.49,-.545*.49) to[bend left=11] ++(-.45-.295,-.05+0.033)to[bend right=2] ++(.046,.29) to[bend right=10] cycle;
+\pingu@block[draw=\csname pingu@color@horse#1@bl@hoof\endcsname!80!pingu@black,line width=2pt*\pingu@@horse@scale]{\csname pingu@color@horse#1@bl@hoof\endcsname} (@hoofback) to[bend right=\if@pingu@@horse@@donkey@9\else8\fi] ++(.15,-.26) to[bend left=10] ++(\if@pingu@@horse@@donkey@-.66\else-.55\fi,\if@pingu@@horse@@donkey@-.15\else-.05\fi) -- ++(-1.73mm,2.42mm) to[bend right=6] cycle; %to[bend left=2] ++(.355*.65,-.565*.65) to[bend left=15] ++(-.395,-.075) to[bend left=10] ++(-.293,.105) to[bend left=9] ++(.06,.3) to[bend left=5] cycle;
+}
+
+% universal switch for all three positions
+\newif\if@pingu@@horse@@donkey@
+
+\newif\if@pingu@x@horse@left@flip@
+\newif\if@pingu@x@horse@right@flip@
+\newif\if@pingu@x@horse@left@base@
+\newif\if@pingu@x@horse@right@base@
+\newif\if@pingu@x@horse@left@donkey@
+\newif\if@pingu@x@horse@right@donkey@
+\pingu@create@wing@extra{horse}{%
+ horse \@lr/.code = {\pingu@set@extra{horse\@lr}{true}\pingu@color{horse\@lr}{##1}},
+ horse \@lr/.default = pingu@bronze!80!pingu@black,
+ horse \@lr\space flip/.is if = @pingu@x@horse@\@lr @flip@,
+ horse \@lr\space donkey/.is if = @pingu@x@horse@\@lr @donkey@,
+ horse \@lr\space has base/.is if = @pingu@x@horse@\@lr @base@,
+ horse \@lr\space draw/.code = \pingu@color{horse\@lr @draw}{##1},%
+ horse \@lr\space line width/.code = \@namedef{pingu@horse\@lr @x@line@width}{##1},%
+ horse \@lr\space mane/.code = \pingu@color{horse\@lr @mane}{##1},%
+ horse \@lr\space mane draw/.code = \pingu@color{horse\@lr @mane@draw}{##1},%
+ horse \@lr\space thatch/.code = \pingu@color{horse\@lr @thatch}{##1},%
+ horse \@lr\space thatch draw/.code = \pingu@color{horse\@lr @thatch@draw}{##1},%
+ horse \@lr\space tail/.code = \pingu@color{horse\@lr @tail}{##1},%
+ horse \@lr\space tail draw/.code = \pingu@color{horse\@lr @tail@draw}{##1},%
+ horse \@lr\space eyes/.code = \pingu@color{horse\@lr @eyes}{##1},%
+ horse \@lr\space eye/.forward to = /pingu/horse \@lr\space eyes,%
+ horse \@lr\space mouth/.code = \pingu@color{horse\@lr @mouth}{##1},%
+ horse \@lr\space nose/.code = \pingu@color{horse\@lr @nose}{##1},%
+ horse \@lr\space ears/.code = \pingu@color{horse\@lr @ears}{##1},%
+ horse \@lr\space base/.code = \pingu@color{horse\@lr @base}{##1},%
+ horse \@lr\space base draw/.code = \pingu@color{horse\@lr @base@draw}{##1},%
+ horse \@lr\space base shade/.code = \pingu@color{horse\@lr @base@shade}{##1},%
+ horse \@lr\space base shade draw/.code = \pingu@color{horse\@lr @base@shade@draw}{##1},%
+ horse \@lr\space front left hoof/.code = \pingu@color{horse\@lr @fl@hoof}{##1},%
+ horse \@lr\space front right hoof/.code= \pingu@color{horse\@lr @fr@hoof}{##1},%
+ horse \@lr\space back left hoof/.code = \pingu@color{horse\@lr @bl@hoof}{##1},%
+ horse \@lr\space back right hoof/.code = \pingu@color{horse\@lr @br@hoof}{##1},%
+ horse \@lr\space front hoofs/.style = {/pingu/horse \@lr\space front left hoof=##1,/pingu/horse \@lr\space front right hoof=##1},
+ horse \@lr\space back hoofs/.style = {/pingu/horse \@lr\space back left hoof=##1,/pingu/horse \@lr\space back right hoof=##1},
+ horse \@lr\space hoofs/.style = {/pingu/horse \@lr\space front hoofs=##1,/pingu/horse \@lr\space back hoofs=##1},
+ horse \@lr\space hoofs/.default = gray!80!white,
+ % TODO: allow colors to be styles?
+ horse \@lr\space xshift/.code = \@namedef{pingu@x@horse\@lr @xshift}{##1},
+ horse \@lr\space yshift/.code = \@namedef{pingu@x@horse\@lr @yshift}{##1},
+ horse \@lr\space on base/.style ={/pingu/horse \@lr\space yshift=4cm},
+}{horse \@lr\space draw=\csname pingu@color@horse\@lr\endcsname!80!pingu@black,horse \@lr\space mane=\csname pingu@color@horse\@lr\endcsname!86!pingu@white,horse \@lr\space mane draw=\csname pingu@color@horse\@lr @mane\endcsname!80!pingu@black,horse \@lr\space eyes=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space mouth=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space nose=\csname pingu@color@horse\@lr @draw\endcsname,horse \@lr\space ears=\csname pingu@color@horse\@lr\endcsname,horse \@lr\space thatch=\csname pingu@color@horse\@lr @mane\endcsname,horse \@lr\space thatch draw=\csname pingu@color@horse\@lr @thatch\endcsname!80!pingu@black,horse \@lr\space tail=\csname pingu@color@horse\@lr @mane\endcsname,horse \@lr\space tail draw=\csname pingu@color@horse\@lr @tail\endcsname!80!pingu@black,horse \@lr\space has base=false,horse \@lr\space base=lightgray!90!black,horse \@lr\space base draw=\csname pingu@color@horse\@lr @base\endcsname!91!pingu@black,horse \@lr\space base shade=lightgray!80!black,horse \@lr\space base shade draw=\csname pingu@color@horse\@lr @base@shade\endcsname!91!pingu@black,horse \@lr\space xshift=0pt,horse \@lr\space yshift=0pt,horse \@lr\space flip=\ifx\@lr\pingu@str@wing@left true\else false\fi,horse \@lr\space donkey=false,horse \@lr\space line width=1.75pt,horse \@lr\space hoofs=\@pingu@none}
+
+\def\pingu@draw@wi@horse#1{%
+ \pingu@setup@wing{horse}{#1}%
+\scope[scale=\pingu@@horse@scale,every path/.append style={line cap=round, line join=round},shift=(\pingu@name-wing-#1),rotate around={\@angle-5:(\pingu@name-wing-#1)}]
+\csname if@pingu@x@horse@#1@flip@\endcsname
+\scope[xshift=-4cm-\csname pingu@x@horse#1@xshift\endcsname,yshift=-42mm+\csname pingu@x@horse#1@yshift\endcsname]
+\else
+\scope[xshift=4cm+\csname pingu@x@horse#1@xshift\endcsname,yshift=-42mm+\csname pingu@x@horse#1@yshift\endcsname,xscale=-1]
+\fi
+\csname if@pingu@x@horse@#1@donkey@\endcsname
+ \@pingu@@horse@@donkey@true
+\fi
+ \edef\@pingu@@horse@lw{\csname pingu@horse#1@x@line@width\endcsname}
+ \pingu@@drawer@horse{#1}
+ % TODO-SET: hoof
+\endscope\endscope
+}
+% todo: make statue extra
+% todo: make horse hat
+
+% to get on horse we create some kind of third wing item: 'on'
+% that will be used to initialize all of the colors and keys
+\newif\if@pingu@x@horse@on@flip@
+\newif\if@pingu@x@horse@on@base@
+\newif\if@pingu@x@horse@on@boundingbox@
+\newif\if@pingu@x@horse@on@donkey@
+% TODO: select keys
+% TODO: option so it does not affect the bounding box (default!)
+\pingu@create@extra{horseon}{%
+ on horse/.code = {\pingu@set@extra{horseon}{true}\pingu@color{horseon}{#1}},
+ on horse/.default = pingu@bronze!80!pingu@black,
+ horse behind/.style = {on horse=#1, on horse scale=.325, on horse yshift=6.15cm},
+ horse behind/.default = pingu@bronze!80!pingu@black,
+ on horse flip/.is if = @pingu@x@horse@on@flip@,
+ on horse donkey/.is if = @pingu@x@horse@on@donkey@,
+ on horse has base/.is if = @pingu@x@horse@on@base@,
+ on horse has bounding box/.is if = @pingu@x@horse@on@boundingbox@,
+ on horse draw/.code = \pingu@color{horseon@draw}{#1},%
+ on horse line width/.code = \@namedef{pingu@horseon@x@line@width}{#1},%
+ on horse mane/.code = \pingu@color{horseon@mane}{#1},%
+ on horse mane draw/.code = \pingu@color{horseon@mane@draw}{#1},%
+ on horse thatch/.code = \pingu@color{horseon@thatch}{#1},%
+ on horse thatch draw/.code = \pingu@color{horseon@thatch@draw}{#1},%
+ on horse tail/.code = \pingu@color{horseon@tail}{#1},%
+ on horse tail draw/.code = \pingu@color{horseon@tail@draw}{#1},%
+ on horse eyes/.code = \pingu@color{horseon@eyes}{#1},%
+ on horse eye/.forward to = /pingu/on horse eyes,%
+ on horse mouth/.code = \pingu@color{horseon@mouth}{#1},%
+ on horse nose/.code = \pingu@color{horseon@nose}{#1},%
+ on horse ears/.code = \pingu@color{horseon@ears}{#1},%
+ on horse base/.code = \pingu@color{horseon@base}{#1},%
+ on horse base draw/.code = \pingu@color{horseon@base@draw}{#1},%
+ on horse base shade/.code = \pingu@color{horseon@base@shade}{#1},%
+ on horse base shade draw/.code = \pingu@color{horseon@base@shade@draw}{#1},%
+ on horse front left hoof/.code = \pingu@color{horseon@fl@hoof}{#1},%
+ on horse front right hoof/.code = \pingu@color{horseon@fr@hoof}{#1},%
+ on horse back left hoof/.code = \pingu@color{horseon@bl@hoof}{#1},%
+ on horse back right hoof/.code = \pingu@color{horseon@br@hoof}{#1},%
+ on horse front hoofs/.style = {/pingu/on horse front left hoof=#1,/pingu/on horse front right hoof=#1},
+ on horse back hoofs/.style = {/pingu/on horse back left hoof=#1,/pingu/on horse back right hoof=#1},
+ on horse hoofs/.style = {/pingu/on horse front hoofs=#1,/pingu/on horse back hoofs=#1},
+ on horse hoofs/.default = gray!80!white,
+ on horse xshift/.code = \@namedef{pingu@x@horseon@xshift}{#1},
+ on horse yshift/.code = \@namedef{pingu@x@horseon@yshift}{#1},
+ on horse scale/.code = \@namedef{pingu@x@horseon@scale}{#1}
+}{on horse draw=\pingu@color@horseon!80!pingu@black,on horse mane=\pingu@color@horseon!86!pingu@white,on horse mane draw=\pingu@color@horseon@mane!80!pingu@black,on horse eyes=\pingu@color@horseon@draw,on horse mouth=\pingu@color@horseon@draw,on horse nose=\pingu@color@horseon@draw,on horse ears=\pingu@color@horseon,on horse thatch=\pingu@color@horseon@mane,on horse thatch draw=\pingu@color@horseon@thatch!80!pingu@black,on horse tail=\pingu@color@horseon@mane,on horse tail draw=\pingu@color@horseon@tail!80!pingu@black,on horse has base=false,on horse base=lightgray!90!black,on horse base draw=\pingu@color@horseon@base!91!pingu@black,on horse base shade=lightgray!80!black,on horse base shade draw=\pingu@color@horseon@base@shade!91!pingu@black,on horse xshift=0pt,on horse yshift=0pt,on horse flip=false,on horse scale=0.75,on horse has bounding box=false,on horse donkey=false,on horse line width=1.75pt,on horse hoofs=\@pingu@none}
+
+
+\def\pingu@draw@eb@horseon{%
+\pingu@layer{background}[scale=\pingu@x@horseon@scale,every path/.append style={line cap=round, line join=round},shift=(\pingu@name-bottom-center)]
+\if@pingu@x@horse@on@donkey@
+ \@pingu@@horse@@donkey@true
+\fi
+\if@pingu@x@horse@on@flip@
+ \scope[xshift=-45mm-\pingu@x@horseon@xshift,yshift=-67mm+\pingu@x@horseon@yshift,xscale=\if@pingu@x@horse@on@donkey@ 1.1\else1\fi,yscale=\if@pingu@@horse@@donkey@.9\else1\fi]
+ \else
+ \scope[xshift=45mm+\pingu@x@horseon@xshift,yshift=-67mm+\pingu@x@horseon@yshift,xscale=\if@pingu@x@horse@on@donkey@-1.1\else-1\fi,yscale=\if@pingu@@horse@@donkey@.9\else1\fi]
+ \fi
+\edef\@pingu@@horse@lw{\pingu@horseon@x@line@width}
+\if@pingu@x@horse@on@boundingbox@\else\pgfinterruptboundingbox\fi
+ \pingu@@drawer@horse{on}
+\if@pingu@x@horse@on@boundingbox@\else\endpgfinterruptboundingbox\fi
+\endscope\endpingu@layer
+}
+% #endregion
+
+% #region magic-lib
+\pingu@create@wing@extra{handcast}{%
+ handcast \@lr/.forward to = /pingu/hand cast \@lr,
+ hand cast \@lr/.code = {\pingu@set@extra{handcast\@lr}{true}\@namedef{pingu@handcast@\@lr}{##1}},
+ hand cast \@lr/.default = {X},
+ handcast \@lr\space color/.forward to = /pingu/hand cast \@lr\space color,
+ hand cast \@lr\space color/.code = \pingu@color{handcast@\@lr @color}{##1},%
+}{hand cast \@lr\space color=pingu@purple}
+\def\pingu@draw@wi@handcast#1{%
+ \pingu@setup@wing{handcast}{#1}%
+ \path[rotate around={\@angle:(\pingu@name-wing-#1)}] (\pingu@name-wing-#1)++(0,5mm) node[\csname pingu@color@handcast@#1@color\endcsname] {\@nameuse{pingu@handcast@#1}};
+}
+% #endregion
+
+% #region medieval-lib
+\newif\if@pingu@x@rook@draw@hatch@
+\pingu@create@extra{rook}{%
+ rook/.code = \pingu@set@extra{rook}{true}\pingu@color{rook}{#1},
+ rook/.default = pingu@silver,
+ rook back/.code = \pingu@color{rook@back}{#1},
+ rook hatch/.is if = @pingu@x@rook@draw@hatch@,
+ rook hatch/.default = true,
+ rook shade/.code = \pingu@color{rook@shade}{#1},
+}{rook back=\pingu@color@rook!85!black,rook shade=\pingu@color@rook!92!black,rook hatch}
+\def\pingu@draw@ea@rook{%
+\if@pingu@do@back@\else\if@pingu@x@rook@draw@hatch@\else\pingu@layer{foreground}[]\fi\fi
+ \pingu@block[even odd rule]{\pingu@color@rook} ([xshift=-.2mm]\pingu@name-wings-side-right|-\pingu@name-foot-right) [rounded corners=\p@] to[bend right=9] coordinate[pos=.15] (@tmpe) ([xshift=.2mm]\pingu@name-wings-side-left|-\pingu@name-foot-left) [sharp corners] to[bend right=1.5*\pingu@bend] (\pingu@name-wings-side-left|-\pingu@name-head-top) coordinate (@tmp) to[bend left=3] coordinate[pos=.3] (@tmpc) coordinate[pos=.7] (@tmpd) (\pingu@name-wings-side-right|-\pingu@name-head-top) [rounded corners=\p@] coordinate (@tmpb) to[bend right=1.5*\pingu@bend] cycle \if@pingu@x@rook@draw@hatch@ (\pingu@name-head-center) ellipse[x radius=.8\pingu@w@half, y radius=.45\pingu@w@half]\fi;
+ \pingu@block{\pingu@color@rook} (@tmp) to[bend right=2] ++(0,2mm) [rounded corners=.25mm] to[bend left=1] ++(-2mm,-.1mm) -- ++(0,-2.25mm);
+ \pingu@block{\pingu@color@rook} (@tmpb) to[bend left=2] ++(0,2mm) [rounded corners=.25mm] to[bend right=1] ++(2mm,-.1mm) -- ++(0,-2.25mm);
+
+ \pingu@block{\pingu@color@rook} (@tmpc)++(-2mm,-.25mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend right=1] ++(4mm,.05mm) -- ++(0,-2.25mm);
+ \pingu@block{\pingu@color@rook} (@tmpd)++(2mm,-.25mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend left=1] ++(-4mm,-.05mm) -- ++(0,-2.25mm);
+
+ % custom shade boi (or gurl, wateva)
+ \scope
+ \clip ([xshift=-.2mm]\pingu@name-wings-side-right|-\pingu@name-foot-right) [rounded corners=\p@] to[bend right=5] ([xshift=.2mm]\pingu@name-wings-side-left|-\pingu@name-foot-left) [sharp corners] to[bend right=1.5*\pingu@bend] (\pingu@name-wings-side-left|-\pingu@name-head-top) -- ++(0,2mm) to[bend left=3] (\pingu@name-wings-side-right|-\pingu@name-head-top) to[bend right=1.5*\pingu@bend] cycle;
+ \if@pingu@x@rook@draw@hatch@
+ \clip[/pingu/@invclip] (\pingu@name-head-center) ellipse[x radius=.8\pingu@w@half, y radius=.45\pingu@w@half];
+ \fi
+ \pingu@block{\pingu@color@rook@shade} (@tmpe) to[bend right=5] ([xshift=.2mm]@tmpe-|@tmp) to[bend right=1.5*\pingu@bend] ([yshift=2mm]@tmp) to[bend left=10] cycle;
+ \endscope
+ \if@pingu@do@back@\else\if@pingu@x@rook@draw@hatch@\else\endpingu@layer\fi\fi
+
+ \pingu@layer{background}[]
+ \pingu@block{\pingu@color@rook@back} (@tmp) to[bend right=3] coordinate[pos=.3] (@tmpc) coordinate[pos=.7] (@tmpd) (@tmpb) to[bend right=30] cycle;
+ \pingu@block{\pingu@color@rook@back} (@tmpb) to[bend left=2] ++(0,2mm) [rounded corners=.25mm] to[bend left=1] ++(2mm,.1mm) -- ++(0,-2.25mm);
+ \pingu@block{\pingu@color@rook@back} (@tmp) to[bend right=2] ++(0,2mm) [rounded corners=.25mm] to[bend right=1] ++(-2mm,.1mm) -- ++(0,-2.25mm);
+
+ \pingu@block{\pingu@color@rook@back} (@tmpc)++(-2mm,-.49mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend right=1] ++(4mm,.05mm) -- ++(0,-2.25mm);
+ \pingu@block{\pingu@color@rook@back} (@tmpd)++(2mm,-.49mm) [rounded corners=.25mm] to[bend left=2] ++(0,2.25mm) to[bend left=1] ++(-4mm,-.05mm) -- ++(0,-2.25mm);
+ \endpingu@layer
+}
+
+\newif\if@pingu@x@crown@ddd@ % 3d
+\newif\if@pingu@x@crown@shade@ % 3d
+\pingu@create@extra{crown}{%
+ crown/.code = \pingu@set@extra{crown}{true}\pingu@color{crown}{#1},
+ crown/.default = pingu@yellow,
+ crown 3d/.is if = @pingu@x@crown@ddd@, crown 3d/.default = true,
+ crown 2d/.style = {crown=#1, crown 3d=false},
+ crown 2d/.default = pingu@yellow,
+ crown back/.code = \pingu@color{crown@back}{#1},
+ crown front bend/.code = \def\pingu@x@crown@f@bend{#1},
+ crown back bend/.code = \def\pingu@x@crown@b@bend{#1},
+ crown gem shade/.is if = @pingu@x@crown@shade@, crown gem shade/.default = true,
+ crown gem colors/.code n args = 7{\pingu@color{crown@gem@a}{#1}\pingu@color{crown@gem@b}{#2}\pingu@color{crown@gem@c}{#3}\pingu@color{crown@gem@d}{#4}\pingu@color{crown@gem@e}{#5}\pingu@color{crown@gem@f}{#6}\pingu@color{crown@gem@g}{#7}},
+ crown gem ring/.code = \pingu@color{crown@gem@ring}{#1},
+ crown position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@crown@angle{#1}\def\pingu@x@crown@xshift{#2}\def\pingu@x@crown@yshift{#3}\def\pingu@x@crown@scale{#4}},
+}{crown position={-9:(1mm,0mm)1},crown front bend=16,crown back bend=9,crown back=\pingu@color@crown!93!black,crown 3d,crown gem colors={pingu@purple}{pingu@blue}{pingu@green}{pingu@purple}{pingu@green}{pingu@blue}{pingu@purple},crown gem ring=\pingu@color@crown!85!white,crown gem shade}
+
+% color | bend1 | bend1
+\def\pingu@draw@ea@crown@s#1#2#3{
+\pingu@block{#1} [rounded corners=.2mm](-6.25mm,-.25cm) to[bend left=2] ++(0,3.125mm) to[bend #2=\pingu@x@crown@f@bend]
+ coordinate[pos=0] (r2) coordinate[pos=.07] (r1)
+ coordinate[pos=.14-.07] (a1) coordinate[pos=.14] (a2) coordinate[pos=.14+.07] (a3)
+ coordinate[pos=.30-.08] (b1) coordinate[pos=.30] (b2) coordinate[pos=.30+.08] (b3)
+ coordinate[pos=.50- .1] (c1) coordinate[pos=.50] (x2) coordinate[pos=.50+ .1] (c3)
+ coordinate[pos=.69-.08] (d1) coordinate[pos=.69] (d2) coordinate[pos=.69+.08] (d3)
+ coordinate[pos=.85-.07] (e1) coordinate[pos=.85] (e2) coordinate[pos=.85+.07] (e3)
+ coordinate[pos=1] (l2) coordinate[pos=.93] (l1)
+ ++(1.375cm,0) to[bend left=2] ++(0,-3.125mm) to[bend #3=\pingu@x@crown@f@bend] (-6mm,-.25cm) -- cycle;
+\path (x2)++(0,.9mm) coordinate (c2);
+\@for\a:={a,b,c,d,e}\do{
+ \pingu@block{#1} ([yshift=-.1mm]\a1) to[bend right=\pingu@x@crown@f@bend] ([yshift=-.1mm]\a3) to[bend right=2] ([yshift=1.85mm]\a2) to[bend right=2] ([yshift=-.1mm]\a1) -- cycle;
+}
+\pingu@block{#1} (l2)++(0,-.2mm) to[bend right=2] ++(0,1.95mm) -- (l1) -- cycle;
+\pingu@block{#1} (r2)++(0,-.2mm) to[bend left=2] ++(0,1.95mm) -- (r1) -- cycle;
+}
+
+% color | at | shift | scale
+\def\pingu@draw@ea@crown@g#1#2#3#4{
+\scope[shift={(#22)},shift={(#3,-.33mm)}]
+ \pingu@block{\pingu@color@crown@gem@ring} ellipse [x radius=.715mm*#4, y radius=.925mm*#4];
+ \pingu@block{#1} ellipse [x radius=.633mm*#4, y radius=.85mm*#4];
+ \protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else
+ \if@pingu@x@crown@shade@
+ \shade[ball color=#1,fill opacity=.45,shading angle=-95] ellipse [x radius=.633mm*#4, y radius=.85mm*#4];
+ \else
+ \pingu@block[rotate around={7:(42:.3mm*#4 and .4mm*#4)}]{#1!45!pingu@white} (42:.3mm*#4 and .4mm*#4) ellipse[x radius=.17mm*#4, y radius=.24mm*#4];
+ \pingu@block[rotate around={7:(232:.275mm*#4 and .35mm*#4)}]{#1!45!pingu@white} (232:.275mm*#4 and .35mm*#4) ellipse[x radius=.06mm*#4, y radius=.085mm*#4];
+ \fi\fi
+\endscope
+}
+\def\pingu@draw@ea@crown{%
+\scope[rotate around={\pingu@x@crown@angle:(\pingu@name-head-top)},%
+ shift={(\pingu@name-head-top)},
+ shift={(\pingu@x@crown@xshift,\pingu@x@crown@yshift)},
+ scale=\pingu@x@crown@scale]
+% draw front
+\if@pingu@x@crown@ddd@
+ \pingu@draw@ea@crown@s{\pingu@color@crown}{right}{left}
+ \def\@tmpa{.05mm}\def\@tmpb{.025mm}
+\else
+ \pingu@draw@ea@crown@s{\pingu@color@crown}{left}{right}
+ \def\@tmpa{-.015mm}\def\@tmpb{-.035mm}
+\fi
+% draw the emeralds
+\pingu@draw@ea@crown@g{\pingu@color@crown@gem@b}{a}{-\@tmpa}1
+\pingu@draw@ea@crown@g{\pingu@color@crown@gem@c}{b}{-\@tmpb}1
+\pingu@draw@ea@crown@g{\pingu@color@crown@gem@d}{x}{\z@}{1.35}
+\pingu@draw@ea@crown@g{\pingu@color@crown@gem@e}{d}{\@tmpb}1
+\pingu@draw@ea@crown@g{\pingu@color@crown@gem@f}{e}{\@tmpa}1
+\pingu@layer{background}[]
+\pingu@block{\pingu@color@crown@gem@a} (r2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm];
+\pingu@block{\pingu@color@crown@gem@ring} (r2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm];
+\pingu@block{\pingu@color@crown@gem@g} (l2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm];
+\pingu@block{\pingu@color@crown@gem@ring} (l2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm];
+% draw back if 3d
+\if@pingu@x@crown@ddd@
+ \pingu@draw@ea@crown@s{\pingu@color@crown@back}{left}{right}
+\fi
+\endpingu@layer
+\endscope
+}
+
+\newif\if@pingu@x@princesscrown@ddd@
+\newif\if@pingu@x@princesscrown@shade@
+\newif\if@pingu@x@princesscrown@bobbles@
+\pingu@create@extra{princesscrown}{%
+ princess crown/.code = \pingu@set@extra{princesscrown}{true}\pingu@color{princesscrown}{#1},
+ princess crown/.default = pingu@yellow,
+ princess crown 3d/.is if= @pingu@x@princesscrown@ddd@, princess crown 3d/.default = true,
+ princess crown 2d/.style = {princess crown=#1, princess crown 3d=false},
+ princess crown 2d/.default = pingu@yellow,
+ princess crown back/.code = \pingu@color{princesscrown@back}{#1},
+ princess crown front bend/.code = \def\pingu@x@princesscrown@f@bend{#1},
+ princess crown back bend/.code = \def\pingu@x@princesscrown@b@bend{#1},
+ princess crown gem shade/.is if = @pingu@x@princesscrown@shade@,
+ princess crown bobbles/.is if = @pingu@x@princesscrown@bobbles@,
+ princess crown gem shade/.default = true,
+ princess crown gem colors/.code n args = 5{\pingu@color{princesscrown@gem@a}{#1}\pingu@color{princesscrown@gem@b}{#2}\pingu@color{princesscrown@gem@c}{#3}\pingu@color{princesscrown@gem@d}{#4}\pingu@color{princesscrown@gem@e}{#5}},
+ princess crown gem ring/.code = \pingu@color{princesscrown@gem@ring}{#1},
+ princess crown position/.code args = {#1:(#2,#3)#4}{\def\pingu@x@princesscrown@angle{#1}\def\pingu@x@princesscrown@xshift{#2}\def\pingu@x@princesscrown@yshift{#3}\def\pingu@x@princesscrown@scale{#4}},
+}{princess crown position={-9:(1mm,0mm)1},princess crown front bend=12,princess crown back bend=7,princess crown back=\pingu@color@princesscrown!93!black,princess crown 3d,princess crown gem colors={pingu@purple}{pingu@blue}{pingu@green}{pingu@blue}{pingu@purple},princess crown gem ring=\pingu@color@princesscrown!85!white,princess crown gem shade,princess crown bobbles}
+
+% color | bend1 | bend2
+\def\pingu@draw@ea@princesscrown@s#1#2#3{
+\pingu@block{#1} [rounded corners=.2mm](-3.25mm,-.15cm) to[bend left=2] ++(0,2.32mm) to[bend #2=\pingu@x@princesscrown@f@bend]
+ coordinate[pos=0] (r2) coordinate[pos=.065] (r1)
+ coordinate[pos=.11] (a1) coordinate[pos=.2] (a2) coordinate[pos=.29] (a3)
+ coordinate[pos=.35] (b1) coordinate[pos=.50] (x2) coordinate[pos=.65] (b3)
+ coordinate[pos=.71] (c1) coordinate[pos=.8] (c2) coordinate[pos=.89] (c3)
+ coordinate[pos=1] (l2) coordinate[pos=.93] (l1)
+ ++(8mm,0) to[bend left=2] ++(0,-2.32mm) to[bend #3=\pingu@x@princesscrown@f@bend] (-3mm,-.15cm) -- cycle;
+\path (x2)++(0,.9mm) coordinate (b2);
+\@for\a:={a,b,c}\do{
+ \pingu@block{#1} ([yshift=-.1mm]\a1) to[bend right=\pingu@x@princesscrown@f@bend] ([yshift=-.1mm]\a3) to[bend left=2] ([yshift=2.15mm]\a2) to[bend left=2] ([yshift=-.1mm]\a1) -- cycle;
+ \if@pingu@x@princesscrown@bobbles@\pingu@block{#1} ([yshift=2.15mm]\a2) circle [radius=.45\p@];\fi
+}
+\pingu@block{#1} (l2)++(0,-.2mm) to[bend left=2] ++(0,2.25mm) -- (l1) -- cycle;
+\pingu@block{#1} (r2)++(0,-.2mm) to[bend right=2] ++(0,2.25mm) -- (r1) -- cycle;
+\if@pingu@x@princesscrown@bobbles@\pingu@block{#1} (l2)++(0,2.05mm) circle [radius=.45\p@];
+\pingu@block{#1} (r2)++(0,2.05mm) circle [radius=.45\p@];\fi
+}
+
+% draw single gem; color | at | shift | scale
+\def\pingu@draw@ea@princesscrown@g#1#2#3#4{
+\scope[shift={(#22)},shift={(#3,-.33mm)}]
+ \pingu@block{\pingu@color@princesscrown@gem@ring} ellipse [x radius=.715mm*#4, y radius=.925mm*#4];
+ \pingu@block{#1} ellipse [x radius=.633mm*#4, y radius=.85mm*#4];
+ \protected@edef\@tmp{#1}\ifx\@tmp\@pingu@none\else
+ \if@pingu@x@princesscrown@shade@
+ \shade[ball color=#1,fill opacity=.45,shading angle=-95] ellipse [x radius=.633mm*#4, y radius=.85mm*#4];
+ \else
+ \pingu@block[rotate around={7:(42:.3mm*#4 and .4mm*#4)}]{#1!45!pingu@white} (42:.3mm*#4 and .4mm*#4) ellipse[x radius=.17mm*#4, y radius=.24mm*#4];
+ \pingu@block[rotate around={7:(232:.275mm*#4 and .35mm*#4)}]{#1!45!pingu@white} (232:.275mm*#4 and .35mm*#4) ellipse[x radius=.06mm*#4, y radius=.085mm*#4];
+ \fi\fi
+\endscope}
+\def\pingu@draw@ea@princesscrown{%
+\scope[rotate around={\pingu@x@princesscrown@angle:(\pingu@name-head-top)},%
+ shift={(\pingu@name-head-top)},
+ shift={(\pingu@x@princesscrown@xshift,\pingu@x@princesscrown@yshift)},
+ scale=\pingu@x@princesscrown@scale]
+% draw front
+\if@pingu@x@princesscrown@ddd@
+ \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown}{right}{left}
+ \def\@tmpa{.05mm}
+\else
+ \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown}{left}{right}
+ \def\@tmpa{-.015mm}
+\fi
+% draw the emaralds
+\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@b}{a}{-\@tmpa}{.95}
+\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@c}{x}{\z@}{1.3}
+\pingu@draw@ea@princesscrown@g{\pingu@color@princesscrown@gem@d}{c}{\@tmpa}{.95}
+\pingu@layer{background}[]
+\pingu@block{\pingu@color@princesscrown@gem@a} (r2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm];
+\pingu@block{\pingu@color@princesscrown@gem@ring} (r2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm];
+\pingu@block{\pingu@color@princesscrown@gem@e} (l2)++(0,-.33mm) ellipse [x radius=.3mm, y radius=.8mm];
+\pingu@block{\pingu@color@princesscrown@gem@ring} (l2)++(0,-.33mm) ellipse [x radius=.1mm, y radius=.885mm];
+% draw back if 3d
+\if@pingu@x@princesscrown@ddd@
+ \pingu@draw@ea@princesscrown@s{\pingu@color@princesscrown@back}{left}{right}
+\fi
+\endpingu@layer
+\endscope
+}
+% #endregion
+
+% #region movement-lib
+\pingu@bodytype@add{tilt-right}{%
+\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off)
+% left side
+to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off)
+% feety stuff
+arc (180:270:\pingu@foot@outer@w{}-1mm and \pingu@foot@outer@h) coordinate[yshift=-.2mm] (\pingu@name-foot-right)
+arc (270:332:\pingu@foot@inner@w{}+1mm and 2.5*\pingu@foot@inner@h)
+coordinate (\pingu@name-bottom-center)
+arc (208:270:\pingu@foot@inner@w{} and 1.25*\pingu@foot@inner@h) coordinate[yshift=-.4mm] (\pingu@name-foot-left)
+arc (270:360:\pingu@foot@outer@w{} and 1.125*\pingu@foot@outer@h)%
+% right side
+to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off)
+% coordinate
+coordinate (\pingu@name-wings-side-left)
+-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle;
+
+\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center)
+++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top)
+arc(90:450:\pingu@w@half{} and \pingu@head@h@half)
+coordinate[pos=\pinguanglehr] (\pingu@name-head-right)
+coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
+
+\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm);
+\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half);
+\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-belly-back)++(-\pingu@w@half+\pingu@one,\pingu@lower@off) to[bend right=.8\pingu@bend] ++(-.05mm,1.05cm-\pingu@side@h@half-\pingu@lower@off) arc (180:270:3.7mm and 2mm) arc (270:331:5mm and 3*.85mm) arc (207:270:5.3mm and 1.125*.85mm) arc (270:360:4.025mm and 1.25*2mm) to[bend right=.8\pingu@bend] ++(0,\pingu@side@h@half-1.05cm+\pingu@lower@off) arc (0:180:\pingu@w@half-.96mm and \pingu@w@half-\pingu@one) -- cycle;
+
+\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center);
+\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center);
+
+\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right);
+\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left);
+
+\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm];
+\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm];
+}
+
+
+\pingu@bodytype@add{tilt-left}{%
+\pingu@block[save path=\pingu@lowerpingu]{\pingu@color@body@main} (0,\pingu@outer@off)
+% left side
+to[bend right=\pingu@bend] coordinate[pos=.775] (\pingu@name-waist-right) ++(0,-\pingu@side@h@half-\pingu@outer@off)
+% feety stuff
+arc (180:270:\pingu@foot@outer@w{}-1mm and 1.25*\pingu@foot@outer@h) coordinate[yshift=-.2mm] (\pingu@name-foot-right)
+arc (270:332:\pingu@foot@inner@w{}+1mm and 1.125*\pingu@foot@inner@h)
+coordinate (\pingu@name-bottom-center)
+arc (208:270:\pingu@foot@inner@w{} and 2.5*\pingu@foot@inner@h) coordinate[yshift=-.4mm] (\pingu@name-foot-left)
+arc (270:360:\pingu@foot@outer@w{} and \pingu@foot@outer@h)%
+% right side
+to[bend right=\pingu@bend] coordinate[pos=.225] (\pingu@name-waist-left) ++(0,\pingu@side@h@half+\pingu@outer@off)
+% coordinate
+coordinate (\pingu@name-wings-side-left)
+-- (0,\pingu@outer@off) coordinate (\pingu@name-wings-side-right) coordinate[pos=.5] (\pingu@name-head-center) -- cycle;
+
+\pingu@block[save path=\pingu@upperpingu]{\pingu@color@body@head} (\pingu@name-head-center)
+++(0,\pingu@head@h@half) coordinate (\pingu@name-head-top)
+arc(90:450:\pingu@w@half{} and \pingu@head@h@half)
+coordinate[pos=\pinguanglehr] (\pingu@name-head-right)
+coordinate[pos=\pinguanglehl] (\pingu@name-head-left);
+
+\coordinate (\pingu@name-belly-back) at (\pingu@w@half,-1cm);
+\coordinate (\pingu@name-belly-center) at (\pingu@w@half,-.68\pingu@side@h@half);
+\pingu@block[save path=\pingu@whitepingu]{\pingu@color@body@front} (\pingu@name-belly-back)++(-\pingu@w@half+\pingu@one,\pingu@lower@off) to[bend right=.8\pingu@bend] ++(-.05mm,1.05cm-\pingu@side@h@half-\pingu@lower@off) arc (180:270:4.025mm and 1.25*2mm) arc (270:331:5.25mm and 1.125*.85mm) arc (207:270:5mm and 3*.85mm) arc (270:360:3.75mm and 2mm) to[bend right=.8\pingu@bend] ++(0,\pingu@side@h@half-1.05cm+\pingu@lower@off) arc (0:180:\pingu@w@half-.96mm and \pingu@w@half-\pingu@one) -- cycle;
+
+\coordinate (\pingu@name-eye-back-right) at ([xshift=-.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center);
+\coordinate (\pingu@name-eye-back-left) at ([xshift=.275cm,yshift=.25cm-\pingu@outer@off]\pingu@name-head-center);
+
+\coordinate (\pingu@name-head-back-con-right) at ([xshift=-\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-right);
+\coordinate (\pingu@name-head-back-con-left) at ([xshift=\pingu@headcon@x,yshift=-\pingu@headcon@y]\pingu@name-eye-back-left);
+
+\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-right)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm];
+\pingu@block{\pingu@color@body@front} (\pingu@name-eye-back-left)++(0,-.25mm) ellipse [x radius=.525cm,y radius=.625cm];
+}
+% #endregion
+
+% #region safe-lib
+\pingu@create@extra{mask}{%
+ mask/.code = {\pingu@set@extra{mask}{true}\pingu@color{mask}{#1}},
+ mask/.default = pingu@white!61!gray,%
+ mask band/.code = \pingu@color{mask@band}{#1},%
+ mask line width/.code = \def\pingu@x@mask@line@width{#1},%
+ mask band inner/.code = \pingu@color{mask@band@inner}{#1},%
+ mask band outer/.code = \pingu@color{mask@band@outer}{#1}%
+}{mask band=\pingu@color@body@main, mask band inner=\pingu@color@mask@band!60!\pingu@color@mask, mask band outer=\pingu@color@mask@band!82!\pingu@color@mask,mask line width=.565pt}
+
+\def\pingu@draw@ea@mask{%
+\pingu@block{\pingu@color@mask} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm]\pingu@name-bill) coordinate (@ul) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) coordinate (@ur) -- ++(0,-4.25mm)[rounded corners=.8mm] coordinate (@lr) -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) coordinate (@ll) -- cycle;
+\scope
+\clip[use path=\pingu@upperpingu];
+\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=-.1mm,xshift=.2mm]@ul) to[bend left=3] ([yshift=-1.1mm]\pingu@name-wings-side-right);
+\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=-.1mm,xshift=-.2mm]@ur) to[bend right=3] ([yshift=-1.1mm]\pingu@name-wings-side-left);
+\endscope\scope
+\clip[use path=\pingu@lowerpingu];
+\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=.01mm,xshift=.2mm]@ll) to[bend left=3] ([yshift=2mm]\pingu@name-wing-right-start);
+\pingu@draw[line width=\pingu@x@mask@line@width]{\pingu@color@mask@band} ([yshift=.01mm,xshift=-.2mm]@lr) to[bend right=3] ([yshift=2mm]\pingu@name-wing-left-start);
+\endscope
+% TODO: fix this sloppy overwrite
+\pingu@block{\pingu@color@mask} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm]\pingu@name-bill) coordinate (@ul) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) coordinate (@ur) -- ++(0,-4.25mm)[rounded corners=.8mm] coordinate (@lr) -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) coordinate (@ll) -- cycle;
+\pingu@draw[very thin]{\pingu@color@mask@band@inner} ([xshift=-5mm,yshift=.75mm-4.25mm/2]\pingu@name-bill) to[bend right=1] ++(10mm,0);
+\foreach \i/\b/\c in {1.6mm/very thin/\pingu@color@mask@band@inner,.8mm/very thin/\pingu@color@mask@band@inner,0mm//\pingu@color@mask@band@outer} {
+\pingu@draw[\b]{\c} [rounded corners=.8mm] ([xshift=-5mm,yshift=.75mm-\i]\pingu@name-bill) [rounded corners=.1mm]-- ++(3.5mm,.55mm) to[bend left=3] ++(3mm,0) -- ++(3.5mm,-.55mm) -- ++(0,-4.25mm+2*\i)[rounded corners=.8mm] -- ++(-3.5mm,-.45mm) to[bend left=3] ++(-3mm,0) [rounded corners=.1mm] -- ++(-3.5mm,.45mm) -- cycle;
+}
+}
+% #endregion
+
+% #region science-fiction
+\newif\if@pingu@x@lightsaber@glow@left
+\newif\if@pingu@x@lightsaber@glow@right
+\newif\if@pingu@x@lightsaber@double@left
+\newif\if@pingu@x@lightsaber@double@right
+\def\pingu@x@saberglow@w@half{.9mm}
+\def\pingulightsaberfactor{.013}
+\pingu@create@wing@extra{lightsaber}{%
+ lightsaber \@lr/.code = {\pingu@set@extra{lightsaber\@lr}{true}\pingu@color{lightsaber\@lr}{##1}},
+ lightsaber \@lr/.default = pingu@blue,
+ lightsaber \@lr\space handle/.code = \pingu@color{lightsaber\@lr @handle}{##1},%
+ lightsaber \@lr\space deco/.code = \pingu@color{lightsaber\@lr @deco}{##1},%
+ lightsaber \@lr\space ribbs/.code = \pingu@color{lightsaber\@lr @ribbs}{##1},%
+ lightsaber \@lr\space button/.code = \pingu@color{lightsaber\@lr @button}{##1},%
+ lightsaber \@lr\space button b/.code = \pingu@color{lightsaber\@lr @button@b}{##1},%
+ lightsaber \@lr\space color b/.code = \pingu@color{lightsaber\@lr @color@b}{##1},%
+ lightsaber \@lr\space length/.code = {\@namedef{pingu@x@lightsaber@length@\@lr}{##1}},%
+ lightsaber \@lr\space length b/.code = {\@namedef{pingu@x@lightsaber@length@b@\@lr}{##1}},%
+ lightsaber \@lr\space yshift/.code = {\@namedef{pingu@x@lightsaber@yshift@\@lr}{##1}},%
+ lightsaber \@lr\space glow/.is if = @pingu@x@lightsaber@glow@\@lr,%
+ lightsaber \@lr\space double/.is if = @pingu@x@lightsaber@double@\@lr,%
+ lightsaber \@lr\space glow core/.code = \pingu@color{lightsaber\@lr @glow@core}{##1},%
+ lightsaber \@lr\space solid/.style = {/pingu/lightsaber \@lr\space glow=false},
+ lightsaber \@lr\space disabled/.style = {/pingu/lightsaber \@lr\space solid,/pingu/lightsaber \@lr=\@pingu@none},
+ lightsaber \@lr\space outer glow factor/.code = {\@namedef{pingu@x@lightsaber@ogf@\@lr}{##1}}%
+}{lightsaber \@lr\space handle=pingu@silver, lightsaber \@lr\space deco=pingu@silver!12!pingu@black, lightsaber \@lr\space button=pingu@red!85!pingu@black,lightsaber \@lr\space button b=pingu@red!85!pingu@black, lightsaber \@lr\space ribbs=pingu@silver!50!pingu@black,lightsaber \@lr\space length=2cm,lightsaber \@lr\space glow=\ifpengu@setup@glows@ true\else false\fi,lightsaber \@lr\space glow core=white,lightsaber \@lr\space outer glow factor=\pingulightsaberfactor,lightsaber \@lr\space yshift=0pt,lightsaber \@lr\space length b=\csname pingu@x@lightsaber@length@\@lr\endcsname,lightsaber \@lr\space color b=\noexpand\@col}
+
+% #region lightsaber base
+\def\pingu@draw@wi@lightsaber@base#1{%
+% deco-elements
+ % base
+ \pingu@block{\csname pingu@color@lightsaber#1@deco\endcsname}(\pingu@name-wing-#1)++(-.4mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) -- ++(0,-5mm) -- ++(.8mm,0) |- cycle;
+ \if@pingu@wing@item@side@left@
+ % ribbs; single path saves memory :D
+ \pingu@block{\csname pingu@color@lightsaber#1@ribbs\endcsname}(\pingu@name-wing-#1)++(-.40mm,2.225mm+\csname pingu@x@lightsaber@yshift@#1\endcsname)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -| ++(.8mm,-.165mm) -- ++(-.8mm,0)
+ arc(90:270:.075mm) -- ++(.8mm,0) |- cycle;
+ % button
+ \pingu@block{\csname pingu@color@lightsaber#1@button@b\endcsname}(\pingu@name-wing-#1)++(.49mm,-1.75mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm];
+ \pingu@block{\csname pingu@color@lightsaber#1@button\endcsname}(\pingu@name-wing-#1)++(.49mm,1.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm];
+ % cover
+ \pingu@block{\csname pingu@color@lightsaber#1@handle\endcsname}(\pingu@name-wing-#1)++(-.5mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) arc(180:90:.15mm) -- ++(.7mm,0) arc(90:0:.16mm) -- ++(0,-5mm) arc(360:270:.15mm) -- ++(-.7mm,0) arc (270:180:.15mm) -- ++(0,.25mm) arc(270:360:.33mm and .2mm) -- ++(0,4.1mm) arc(0:90:.33mm and .2mm) -- ++(0,.25mm) -- cycle;
+ \else
+ % ribbs; single path saves memory :D (the second)
+ \pingu@block{\csname pingu@color@lightsaber#1@ribbs\endcsname}(\pingu@name-wing-#1)++(.40mm,2.225mm+\csname pingu@x@lightsaber@yshift@#1\endcsname)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -| ++(-.8mm,-.165mm) -- ++(.8mm,0)
+ arc(90:-90:.075mm) -- ++(-.8mm,0) |- cycle;
+ % buttons
+ \pingu@block{\csname pingu@color@lightsaber#1@button@b\endcsname}(\pingu@name-wing-#1)++(-.49mm,-1.75mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm];
+ \pingu@block{\csname pingu@color@lightsaber#1@button\endcsname}(\pingu@name-wing-#1)++(-.49mm,1.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) ellipse [x radius=.1mm, y radius=.3mm];
+ % cover
+ \pingu@block{\csname pingu@color@lightsaber#1@handle\endcsname}(\pingu@name-wing-#1)++(.5mm,2.65mm+\csname pingu@x@lightsaber@yshift@#1\endcsname) arc(0:90:.15mm) -- ++(-.7mm,0) arc(90:180:.16mm) -- ++(0,-5mm) arc(180:270:.15mm) -- ++(.7mm,0) arc (270:360:.15mm) -- ++(0,.25mm) arc(270:180:.33mm and .2mm) -- ++(0,4.1mm) arc(180:90:.33mm and .2mm) -- ++(0,.25mm) -- cycle;
+ \fi
+}
+% #endregion
+% #1 wing, #2 yshift, #3 angle, #4 length, #5 color
+\def\pingu@draw@wi@lightsaber@pre#1#2#3#4#5{
+ \scope[rotate around={#3:(\pingu@name-wing-#1)}]
+ \csname if@pingu@x@lightsaber@glow@#1\endcsname
+ \@for\i:={0,2,4,6,7,8,9,10,11,12,13,14,15,16,17}\do{
+ \pingu@block[fill opacity=\ifnum\i>14 .225\else.1\fi*\i/20]{#5} (\pingu@name-wing-#1)++(-\pingu@x@saberglow@w@half+\i*\i mm/440,#2) -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@w@half-.05mm-\i*\i mm/440 and \ifnum\i>14 .85mm\else\pingu@one\fi-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm);
+ }
+ \else % draw solid
+ \pingu@block{#5} (\pingu@name-wing-#1)++(-.425mm,#2-.1mm) -- ++(.05mm,#4) arc(180:0:.375mm and .375mm) -- ++(.05mm,-#4) arc (0:-180:.425mm and .05mm);
+ \fi
+ \endscope
+}
+
+% #1 wing, #2 yshift, #3 angle, #4 length, #5 color
+\def\pingu@draw@wi@lightsaber@post#1#2#3#4#5{
+ \scope[rotate around={#3:(\pingu@name-wing-#1)}]
+ \csname if@pingu@x@lightsaber@glow@#1\endcsname
+ \ifdim\csname pingu@x@lightsaber@ogf@#1\endcsname pt>\z@
+ \pingu@layer{foreground}[]
+ \pgfinterruptboundingbox
+ \path[clip,/pingu/@invclip] (\pingu@name-wing-#1)++(-.275mm,#2-.1mm) -- ++(.1mm,#4) arc(180:0:.175mm and .25mm) -- ++(.1mm,-#4) arc (0:-180:.275mm and .065mm);
+ \@for\i:={1,1.1,1.2,1.3,1.4}\do{
+ \pingu@block[fill opacity=\csname pingu@x@lightsaber@ogf@#1\endcsname/\i]{#5} (\pingu@name-wing-#1) ++(.05mm,#2+#4/2) circle[radius=\i*#4];
+ }
+ \endpgfinterruptboundingbox
+ \endpingu@layer
+ \fi
+ % fadings had a rotation angle bug
+ \@for\i:={1,2}\do{
+ \pingu@block[fill opacity=.125*\i/10]{#5} (\pingu@name-wing-#1)++(-\pingu@x@saberglow@w@half+\i*\i mm/440,#2) -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@w@half-.05mm-\i*\i mm/440 and \pingu@one-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm);
+ }
+ \pingu@block{\csname pingu@color@lightsaber#1@glow@core\endcsname} (\pingu@name-wing-#1)++(-.275mm,#2-.1mm) -- ++(.1mm,#4) arc(180:0:.175mm and .25mm) -- ++(.1mm,-#4) arc (0:-180:.275mm and .065mm);
+ \fi
+ \endscope
+}
+
+% #1 wing
+\def\pingu@draw@wi@lightsaber#1{%
+ \pingu@setup@wing{lightsaber}{#1}%
+ \scope[rotate around={\@angle:([yshift=+\csname pingu@x@lightsaber@yshift@#1\endcsname]\pingu@name-wing-#1)},xscale=1.2]
+ \pingu@draw@wi@lightsaber@pre{#1}{2.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname}{0}{\csname pingu@x@lightsaber@length@#1\endcsname}{\@col}
+ \csname if@pingu@x@lightsaber@double@#1\endcsname
+ \pingu@draw@wi@lightsaber@pre{#1}{2.65mm-\csname pingu@x@lightsaber@yshift@#1\endcsname}{180}{\csname pingu@x@lightsaber@length@b@#1\endcsname}{\csname pingu@color@lightsaber#1@color@b\endcsname}
+ \fi
+ \pingu@draw@wi@lightsaber@base{#1}
+ % afterglow (whuile watching everglow :D)
+ \pingu@draw@wi@lightsaber@post{#1}{2.9mm+\csname pingu@x@lightsaber@yshift@#1\endcsname}{0}{\csname pingu@x@lightsaber@length@#1\endcsname}{\@col}
+ \csname if@pingu@x@lightsaber@double@#1\endcsname
+ \pingu@draw@wi@lightsaber@post{#1}{2.65mm-\csname pingu@x@lightsaber@yshift@#1\endcsname}{180}{\csname pingu@x@lightsaber@length@b@#1\endcsname}{\csname pingu@color@lightsaber#1@color@b\endcsname}
+ \fi
+ \endscope
+}
+
+
+\newif\if@pingu@x@lightstaff@glow@left
+\newif\if@pingu@x@lightstaff@glow@right
+\pingu@create@wing@extra{lightstaff}{%
+ light-staff \@lr/.code = {\pingu@set@extra{lightstaff\@lr}{true}\pingu@color{lightstaff\@lr}{##1}},
+ light-staff \@lr/.default = pingu@green,
+ light-staff \@lr\space length/.code =\expandafter\def\csname pingu@lightstaff@\@lr @length\endcsname{##1},
+ light-staff \@lr\space glow length/.code =\expandafter\def\csname pingu@lightstaff@\@lr @glow@length\endcsname{##1},
+ light-staff \@lr\space head/.code = \pingu@color{lightstaff\@lr}{##1},%
+ light-staff \@lr\space staff/.code = \pingu@color{lightstaff@\@lr @staff}{##1},%
+ light-staff \@lr\space core/.code = \pingu@color{lightstaff@\@lr @head@core}{##1},%
+ light-staff \@lr\space core width/.code = \expandafter\def\csname pingu@lightstaff@\@lr @core@width\endcsname{##1},%
+ light-staff \@lr\space glow/.is if = @pingu@x@lightstaff@glow@\@lr,%
+ light-staff \@lr\space outer glow factor/.code = {\@namedef{pingu@x@lightstaff@ogf@\@lr}{##1}},%
+}{light-staff \@lr\space length=28mm,light-staff \@lr\space staff=pingu@bronze,light-staff \@lr\space head=pingu@green,light-staff \@lr\space core=pingu@white,light-staff \@lr\space glow=\ifpengu@setup@glows@ true\else false\fi,light-staff \@lr\space outer glow factor=.022,light-staff \@lr\space glow length=13mm,light-staff \@lr\space core width=.44mm}
+\def\pingu@draw@wi@lightstaff#1{%
+ \pingu@setup@wing{lightstaff}{#1}%
+\scope[rotate around={\@angle:(\pingu@name-wing-#1)}]
+ \pingu@block{\csname pingu@color@lightstaff@#1@staff\endcsname}(\pingu@name-wing-#1)++(\@sidesign*-.2mm,-11mm) -- ++(0,\csname pingu@lightstaff@#1@length\endcsname) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-lightstaff-#1-top) -- ++(0,-\csname pingu@lightstaff@#1@length\endcsname) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
+ \pingu@draw@wi@lightstaff@pre{#1}{[yshift=-1.1mm]\pingu@name-lightstaff-#1-top}{\@col}
+ \pingu@block{\csname pingu@color@lightstaff@#1@head@core\endcsname} ([yshift=-1.1mm]\pingu@name-lightstaff-#1-top) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(0,2mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,-1mm) -- ++(0,-2mm) -- cycle;
+ \pingu@draw@wi@lightstaff@post{#1}{[yshift=-1.1mm]\pingu@name-lightstaff-#1-top}{\@col}
+\endscope
+}
+
+% #1 wing, #2 start, #3 color
+\def\pingu@draw@wi@lightstaff@pre#1#2#3{
+\csname if@pingu@x@lightstaff@glow@#1\endcsname
+\@for\i:={0,1,2,3,6,7,9,10,13}\do{
+ \pingu@block[fill opacity=\ifnum\i>14 .225\else.1\fi*\i/20]{#3} (#2)++(0,-\i mm/15) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname-\i mm/30,1mm+\i mm/30) -- ++(0,2mm+\i mm/15) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,1mm+\i mm/30) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,-1mm-\i mm/30) -- ++(0,-2mm-\i mm/15) -- cycle;
+ % -- ++(.05mm,#4) arc(180:0:\pingu@x@saberglow@w@half-.05mm-\i*\i mm/440 and \ifnum\i>14 .85mm\else\pingu@one\fi-\i mm/30) -- ++(.05mm,-#4) arc (0:-180:\pingu@x@saberglow@w@half-\i*\i mm/440 and .35mm);
+}
+\else % draw solid
+ \pingu@block{#3} (#2) -- ++(-.55mm,1mm) -- ++(0,2mm) -- ++(.55mm,1mm) -- ++(.55mm,-1mm) -- ++(0,-2mm) -- cycle;
+\fi
+}
+
+\def\pingu@draw@wi@lightstaff@post#1#2#3{
+\csname if@pingu@x@lightstaff@glow@#1\endcsname
+\ifdim\csname pingu@x@lightstaff@ogf@#1\endcsname pt>\z@
+\pingu@layer{foreground}[]
+\pgfinterruptboundingbox
+\@for\i:={1,1.1,1.2,1.3,1.4}\do{
+ \pingu@block[fill opacity=\csname pingu@x@lightstaff@ogf@#1\endcsname/\i]{#3} (#2)++(0,2mm) circle[radius=\i*\csname pingu@lightstaff@#1@glow@length\endcsname];
+}
+\endpgfinterruptboundingbox
+\pingu@block[opacity=.65]{\csname pingu@color@lightstaff@#1@head@core\endcsname} (#2)++(0,.5mm) -- ++(-.20mm,.75mm) -- ++(0,1.5mm) -- ++(.20mm,.75mm) -- ++(.20mm,-.75mm) -- ++(0,-1.5mm) -- cycle;
+\endpingu@layer
+\fi
+% fadings hat a rotation angle bug
+\@for\i:={1,2}\do{
+ \pingu@block[fill opacity=.125*\i/10]{#3} (#2)++(0,-\i mm/15+2mm) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname-\i mm/30,1mm+\i mm/30) -- ++(0,2mm+\i mm/15) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,1mm+\i mm/30) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname+\i mm/30,-1mm-\i mm/30) -- ++(0,-2mm-\i mm/15) -- cycle;
+}
+\pingu@block{\csname pingu@color@lightstaff@#1@head@core\endcsname} (#2) -- ++(-\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(0,2mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,1mm) -- ++(\csname pingu@lightstaff@#1@core@width\endcsname,-1mm) -- ++(0,-2mm) -- cycle;
+\fi
+}
+% #endregion
+
+% #region shirts-lib
+\newif\if@pingu@shirt@above
+\pingu@create@extra{shirt}{%
+ shirt/.code = \pingu@set@extra{shirt}{true}\pingu@color{shirt}{#1},
+ shirt/.default = pingu@bronze,
+ shirt above/.is if = @pingu@shirt@above,
+ shirt raise/.code = \def\pingu@shirt@raise{#1},
+ shirt padding/.code = \def\pingu@shirt@padding{#1},
+ shirt button top/.code = \pingu@color{shirt@button@top}{#1},
+ shirt button middle/.code = \pingu@color{shirt@button@middle}{#1},
+ shirt button bottom/.code = \pingu@color{shirt@button@bottom}{#1},
+ shirt buttons/.style = {/pingu/shirt button top={#1}, /pingu/shirt button middle={#1}, /pingu/shirt button bottom={#1}},
+ shirt button top shade/.code = \pingu@color{shirt@button@top@shade}{#1},
+ shirt button middle shade/.code = \pingu@color{shirt@button@middle@shade}{#1},
+ shirt button bottom shade/.code = \pingu@color{shirt@button@bottom@shade}{#1},
+ shirt buttons shade/.style = {/pingu/shirt button top shade={#1}, /pingu/shirt button middle shade={#1}, /pingu/shirt button bottom shade={#1}},
+ shirt without buttons/.forward to=/pingu/shirt no buttons,
+ shirt no buttons/.style = {/pingu/shirt buttons=\@pingu@none, /pingu/shirt buttons shade=\@pingu@none},
+}{shirt buttons=pingu@black,shirt padding=0mm,shirt button top shade=\pingu@color@shirt@button@top!70!\pingu@color@shirt!70!white,shirt button middle shade=\pingu@color@shirt@button@middle!70!\pingu@color@shirt!70!white,shirt button bottom shade=\pingu@color@shirt@button@bottom!70!\pingu@color@shirt!70!white,shirt raise=2.25mm,shirt above=false}
+\def\pingu@draw@cloth@shirt@behind{}
+
+\def\pingu@draw@cloth@shirt@middle{\if@pingu@shirt@above\else\pingu@draw@cloth@shirt@main\fi}
+
+\def\pingu@draw@cloth@shirt@main{%
+\coordinate (\pingu@name-shirt-low) at ([yshift=\pingu@shirt@raise]\pingu@name-belly-center);
+\pingu@block{\pingu@color@shirt} [rounded corners=.131mm] ([xshift=.2mm,yshift=.18mm]\pingu@name-head-back-con-right) -- (\pingu@name-shirt-low) -- ([xshift=-.1mm,yshift=.24mm]\pingu@name-head-back-con-left) to[bend left=12] (\pingu@name-waist-left) to[bend left=3] ([xshift=\pingu@shirt@padding]\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=10] ([yshift=-1.1\pingu@one]\pingu@name-bottom-center) to[bend left=10] ([xshift=-\pingu@shirt@padding]\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=3] (\pingu@name-waist-right) to[bend left=12] (\pingu@name-head-back-con-right) -- cycle;
+
+\coordinate (\pingu@name-shirt-bt) at ([yshift=-\pingu@one]\pingu@name-shirt-low);
+\pingu@block{\pingu@color@shirt@button@top}(\pingu@name-shirt-bt) circle[radius=.4mm];
+\pingu@block{\pingu@color@shirt@button@middle}(\pingu@name-shirt-bt)++(0,-1.35mm)circle[radius=.4mm];
+\pingu@block{\pingu@color@shirt@button@bottom}(\pingu@name-shirt-bt)++(0,2*-1.35mm)circle[radius=.4mm];
+\pingu@block[even odd rule]{\pingu@color@shirt@button@top@shade}(\pingu@name-shirt-bt) circle[radius=.4mm] circle[radius=.465mm];
+\pingu@block[even odd rule]{\pingu@color@shirt@button@middle@shade}(\pingu@name-shirt-bt)++(0,-1.35mm)circle[radius=.4mm] circle[radius=.465mm];
+\pingu@block[even odd rule]{\pingu@color@shirt@button@bottom@shade}(\pingu@name-shirt-bt)++(0,2*-1.35mm)circle[radius=.4mm] circle[radius=.465mm];
+\@for\i:={0,90,180,270}\do{
+ \pingu@block{\pingu@color@shirt@button@top@shade} (\pingu@name-shirt-bt)++(\i:.
+ 25mm) circle[radius=.065mm];
+ \pingu@block{\pingu@color@shirt@button@middle@shade} (\pingu@name-shirt-bt)++(0,-1.35mm)++(\i:.25mm) circle[radius=.065mm];
+ \pingu@block{\pingu@color@shirt@button@bottom@shade} (\pingu@name-shirt-bt)++(0,2*-1.35mm)++(\i:.25mm) circle[radius=.065mm];
+}}
+
+% TODO: if flags to draw parts
+\def\pingu@draw@cloth@shirt{\if@pingu@shirt@above\pingu@draw@cloth@shirt@main\fi}
+
+\pingu@create@extra{secondshirt}{%
+ second shirt/.code = \pingu@set@extra{secondshirt}{true}\pingu@color{secondshirt}{#1},
+ second shirt raise/.code = \def\pingu@secondshirt@raise{#1},
+ second shirt neck/.code = \pingu@color{secondshirt@neck}{#1},
+ second shirt/.default = purple,
+}{second shirt raise=3.35mm,second shirt neck=\pingu@color@secondshirt!32!pingu@white}
+\def\pingu@draw@cloth@secondshirt@behind{}
+
+\def\pingu@draw@cloth@secondshirt@middle{%
+\coordinate (\pingu@name-secondshirt-low) at ([yshift=\pingu@secondshirt@raise]\pingu@name-belly-center);
+\pingu@block{\pingu@color@secondshirt} [rounded corners=.131mm] ([xshift=.2mm,yshift=.05mm]\pingu@name-head-back-con-right) -- (\pingu@name-secondshirt-low) -- ([xshift=-.16mm,yshift=.09mm]\pingu@name-head-back-con-left) to[bend left=12] (\pingu@name-waist-left) to[bend left=3] ([xshift=-.22mm]\pingu@name-bottom-center-|\pingu@name-waist-left) to[bend left=10] ([yshift=-1\pingu@one]\pingu@name-bottom-center) to[bend left=10] ([xshift=.22mm]\pingu@name-bottom-center-|\pingu@name-waist-right) to[bend left=3] (\pingu@name-waist-right) to[bend left=12] (\pingu@name-head-back-con-right) -- cycle;
+\pingu@draw{\pingu@color@secondshirt@neck} [rounded corners=.131mm] ([xshift=.025mm,yshift=-.09mm]\pingu@name-head-back-con-right) -- ([xshift=.2mm,yshift=.05mm]\pingu@name-head-back-con-right) -- (\pingu@name-secondshirt-low) -- ([xshift=-.19mm,yshift=.09mm]\pingu@name-head-back-con-left) -- ([xshift=-.02mm,yshift=-.02mm]\pingu@name-head-back-con-left);
+}
+
+% TODO: if flags to draw parts
+\def\pingu@draw@cloth@secondshirt{%
+}
+% #endregion
+
+% #region signs-lib
+\pingu@create@wing@extra{signpost}{%
+ signpost \@lr/.forward to = /pingu/sign post \@lr,
+ sign post \@lr/.code = {\pingu@set@extra{signpost\@lr}{true}\@namedef{pingu@signpost@\@lr}{##1}},
+ sign post \@lr/.default = {},
+ signpost \@lr\space color/.forward to = /pingu/sign post \@lr\space color,
+ sign post \@lr\space color/.code = \pingu@color{signpost\@lr}{##1},
+ signpost \@lr\space fontcolor/.forward to = /pingu/sign post \@lr\space font color,
+ sign post \@lr\space font color/.code = \pingu@color{signpost\@lr @font}{##1},
+}{sign post \@lr\space color=brown!70!black, sign post \@lr\space font color=white!90!brown}
+\def\pingu@draw@wi@signpost#1{%
+ \pingu@setup@wing{signpost}{#1}%
+ \def\@rot{\if@pingu@wing@item@side@left@-5\else+5\fi}%
+\scope[rotate around={\@angle+\@rot:(\pingu@name-wing-#1)}]
+ \pingu@block[thick]{\@col}(\pingu@name-wing-#1)++(\@sidesign*-.225mm,-2mm) -- ++(0,15mm) arc(180:0:\@sidesign*.45mm and .375mm) -- ++(0,-15mm) arc(360:180:\@sidesign*.45mm and .375mm) -- cycle;
+ \path (\pingu@name-wing-#1)++(\@sidesign*.225mm,13mm) node[fill=\@col,rounded corners=2\p@,minimum width=14mm,minimum height=8mm,align=center,rotate=\@angle+\@rot,text=\csname pingu@color@signpost#1@font\endcsname] {\csname pingu@signpost@#1\endcsname};
+\endscope
+}
+
+\pingu@create@extra{banner}{%
+ banner/.code = \pingu@set@extra{banner}{true}\@namedef{pingu@banner}{#1},
+ banner/.default = Bannertext,
+ banner band/.code = \pingu@color{banner@band}{#1},
+ banner text color/.code = \pingu@color{banner@text@color}{#1},
+ banner sticks color/.style={/pingu/banner stick left color=#1,/pingu/banner stick right color=#1},
+ banner stick left color/.code = \pingu@color{banner@stick@left}{#1},
+ banner stick right color/.code = \pingu@color{banner@stick@right}{#1},
+ banner sticks length/.style={/pingu/banner stick left length=#1,/pingu/banner stick right length=#1},
+ banner stick left length/.code = \@namedef{pingu@banner@stick@left@l}{#1},
+ banner stick right length/.code = \@namedef{pingu@banner@stick@right@l}{#1},
+ banner raise/.code = \@namedef{pingu@banner@raise}{#1},
+ banner height/.code = \@namedef{pingu@banner@height}{#1},
+ banner font/.code = \@namedef{pingu@banner@font}{#1},
+ banner bent/.code = \@namedef{pingu@banner@bent}{#1}
+}{banner band=pingu@white!91!pingu@black,banner text color=pingu@black,banner sticks color=pingu@bronze,banner stick left length=20mm, banner stick right length=20mm,banner bent=30,banner raise=-1mm,banner height=4mm,banner font=\bfseries}
+
+\usetikzlibrary{decorations.text}
+\def\pingu@draw@ea@banner{%
+\pingu@setup@wing{staff}{left}% we do not need the staff color, but we will use it
+\scope[rotate around={\@angle:(\pingu@name-wing-left)}]
+ \pingu@block{\pingu@color@banner@stick@left}(\pingu@name-wing-left)++(\@sidesign*-.2mm,-7mm) -- ++(0,\pingu@banner@stick@left@l) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-s-left) -- ++(0,-\pingu@banner@stick@left@l) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
+ \path (\pingu@name-s-left)++(.5mm,\pingu@banner@height) coordinate (\pingu@name-s-left-top) ++(0,-2*\pingu@banner@height) coordinate (\pingu@name-s-left-bot);
+\endscope
+\pingu@setup@wing{staff}{right}% we do not need the staff color, but we will use it
+\scope[rotate around={\@angle:(\pingu@name-wing-right)}]
+ \pingu@block{\pingu@color@banner@stick@right}(\pingu@name-wing-right)++(\@sidesign*-.2mm,-7mm) -- ++(0,\pingu@banner@stick@right@l) arc(180:0:\@sidesign*.4mm and .3mm) coordinate[pos=.5] (\pingu@name-s-right) -- ++(0,-\pingu@banner@stick@right@l) arc(360:180:\@sidesign*.4mm and .3mm) -- cycle;
+ \path (\pingu@name-s-right)++(-.5mm,\pingu@banner@height) coordinate (\pingu@name-s-right-top) ++(0,-2*\pingu@banner@height) coordinate (\pingu@name-s-right-bot);
+\endscope
+\pingu@block[rounded corners=.3mm]{\pingu@color@banner@band} (\pingu@name-s-left-top) to[bend right=\pingu@banner@bent] (\pingu@name-s-right-top) -- (\pingu@name-s-right-bot) to[bend left=\pingu@banner@bent] (\pingu@name-s-left-bot) -- cycle;
+\path[postaction={decorate},decoration={text color=\pingu@color@banner@text@color,text along path, raise=\pingu@banner@raise, text={|\pingu@banner@font|\pingu@banner},text align={center,left indent=1mm,right indent=1mm}}] (\pingu@name-s-right) to[bend left=\pingu@banner@bent+3] (\pingu@name-s-left);
+}
+% #endregion
+
+% #region sport-lib
+\pingu@create@extra{medal}{%
+ medal/.code = {\pingu@set@extra{medal}{true}\pingu@color{medal}{#1}},
+ medal/.default = pingu@yellow,%
+ gold medal/.style = {medal, medal text=#1}, gold medal/.default={1},
+ silver medal/.style = {medal=pingu@silver, medal text=#1}, silver medal/.default={2},
+ bronze medal/.style = {medal=pingu@bronze, medal text=#1}, bronze medal/.default={3},
+ medal band/.code = \pingu@color{medal@band}{#1},%
+ medal shade/.code = \pingu@color{medal@shade}{#1},%
+ medal shade width/.code = \def\pingu@medal@shade@w{#1},%
+ medal text/.code = \def\pingu@x@medal@text{#1},%
+ medal text style/.style = {\pingu@color@medal!65!pingu@white},
+}{medal band=pingu@red,medal text={},medal shade={\pingu@color@medal!65!pingu@white},medal shade width=.75\p@}
+
+\def\pingu@draw@eb@medal{%
+\coordinate (\pingu@name-medal-center) at ([yshift=1.25mm]\pingu@name-belly-center);
+\pingu@block{\pingu@color@medal@band} [rounded corners=.15mm] (\pingu@name-head-back-con-right) -- (\pingu@name-medal-center) -- (\pingu@name-head-back-con-left) to[bend left=11] ++(-1.35mm,-.5mm) -- ([yshift=.7mm]\pingu@name-medal-center) -- ([xshift=1.35mm,yshift=-.5mm]\pingu@name-head-back-con-right) to[bend left=11] (\pingu@name-head-back-con-right) -- cycle;
+\pingu@block{\pingu@color@medal} (\pingu@name-medal-center) circle [radius=2.35mm];
+\pingu@draw[line width=\pingu@medal@shade@w]{\pingu@color@medal@shade} (\pingu@name-medal-center) circle [radius=2.35mm];
+\node[/pingu/@text,/pingu/medal text style] at (\pingu@name-medal-center) {\pingu@x@medal@text};
+}
+\newif\if@pingu@x@headband@knot@
+\newif\if@pingu@x@headband@bands@
+\pingu@create@extra{headband}{%
+ headband/.forward to = /pingu/head band,
+ head-band/.forward to = /pingu/head band,
+ head band/.code = \pingu@set@extra{headband}{true}\pingu@color{headband}{#1},
+ head band/.default = pingu@red,
+ headband bend/.forward to = /pingu/head band bend,
+ head-band bend/.forward to = /pingu/head band bend,
+ head band bend/.code = \def\pingu@x@headband@bend{#1},
+ headband angle/.forward to = /pingu/head band angle,
+ head-band angle/.forward to = /pingu/head band angle,
+ head band angle/.code = \def\pingu@x@headband@angle{#1},
+ headband upper angle/.forward to = /pingu/head band upper angle,
+ head-band upper angle/.forward to = /pingu/head band upper angle,
+ head band upper angle/.code = \def\pingu@x@headband@upangle{#1},
+ % knot
+ headband knot/.forward to = /pingu/head band knot,
+ head-band knot/.forward to = /pingu/head band knot,
+ head band knot/.is if = @pingu@x@headband@knot@,
+ headband knot color/.forward to = /pingu/head band knot color,
+ head-band knot color/.forward to = /pingu/head band knot color,
+ head band knot color/.code = \pingu@color{headband@knot}{#1},
+ headband knot a color/.forward to = /pingu/head band knot a color,
+ head-band knot a color/.forward to = /pingu/head band knot a color,
+ head band knot a color/.code = \pingu@color{headband@knot@a}{#1},
+ headband knot b color/.forward to = /pingu/head band knot b color,
+ head-band knot b color/.forward to = /pingu/head band knot b color,
+ head band knot b color/.code = \pingu@color{headband@knot@b}{#1},
+ headband bands/.forward to = /pingu/head band bands,
+ head-band bands/.forward to = /pingu/head band bands,
+ head band bands/.is if = @pingu@x@headband@bands@,
+ headband bands a color/.forward to = /pingu/head band bands a color,
+ head-band bands a color/.forward to = /pingu/head band bands a color,
+ head band bands a color/.code = \pingu@color{headband@bands@a}{#1},
+ headband bands b color/.forward to = /pingu/head band bands b color,
+ head-band bands b color/.forward to = /pingu/head band bands b color,
+ head band bands b color/.code = \pingu@color{headband@bands@b}{#1},
+}{head band bend=9, head band angle=17,head band upper angle=50, head band knot color=\pingu@color@headband!78!black,head band knot a color=\pingu@color@headband@knot!90!black,head band knot b color=\pingu@color@headband@knot@a,head band bands,head band bands a color=\pingu@color@headband!78!black,head band bands b color=\pingu@color@headband}
+
+\def\pingu@draw@ea@headband@wh{1.25mm}
+\def\pingu@draw@ea@headband{%
+ \path (\pingu@name-head-center)+(\pingu@x@headband@upangle-\pingu@x@headband@angle:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-head-band-lower);
+ \path (\pingu@name-head-center)+(\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) coordinate (\pingu@name-head-band-upper);
+ \if@pingu@x@headband@bands@
+ \pingu@block{\pingu@color@headband@bands@a} (\pingu@name-head-band-lower) to[out=-50,in=75] ++(2.75mm,-4mm) to[bend right] ++(.6mm,0) to[out=80,in=-5] (\pingu@name-head-band-upper) -- cycle;
+ \pingu@block{\pingu@color@headband@bands@b} (\pingu@name-head-band-lower) to[out=-80,in=80] ++(1.75mm,-3.35mm) to[bend right] ++(.45mm,0) to[out=80,in=-8] (\pingu@name-head-band-upper) -- cycle;
+ \fi
+ \pingu@block{\pingu@color@headband} (\pingu@name-head-center)+(\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) to[bend left=\pingu@x@headband@bend] coordinate[pos=.5] (\pingu@name-headband-center-a) +(180-\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) arc(180-\pingu@x@headband@upangle:180-\pingu@x@headband@upangle+\pingu@x@headband@angle:\pingu@w@half{} and \pingu@head@h@half) to[bend right=\pingu@x@headband@bend] coordinate[pos=.5] (\pingu@name-headband-center-b) (\pingu@name-head-band-lower) arc(\pingu@x@headband@upangle-\pingu@x@headband@angle:\pingu@x@headband@upangle:\pingu@w@half{} and \pingu@head@h@half) -- cycle;
+ \path (\pingu@name-headband-center-a) -- (\pingu@name-headband-center-b) coordinate[pos=.5] (\pingu@name-headband-center);
+ \if@pingu@x@headband@knot@
+ \pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot@a} (\pingu@name-headband-center-a)++(-.15mm,-.6mm) to[out=155,in=-5] ++(-3mm,\pingu@one) to[bend right=15] ([xshift=-3mm,yshift=-.2mm]\pingu@name-headband-center-b) to[in=-155,out=5] ++(.285cm,.8mm) -- cycle;
+ \pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot@b} (\pingu@name-headband-center-a)++(.15mm,-.6mm) to[out=25,in=-175] ++(3mm,\pingu@one) to[bend left=15] ([xshift=3mm,yshift=-.2mm]\pingu@name-headband-center-b) to[in=-25,out=175] ++(-.285cm,.8mm) -- cycle;
+ \pingu@block[rounded corners=.25mm]{\pingu@color@headband@knot} (\pingu@name-headband-center-a)++(-\pingu@draw@ea@headband@wh,.12mm) to[bend right=9] ++(2*\pingu@draw@ea@headband@wh,0) -- ([xshift=\pingu@draw@ea@headband@wh,yshift=-.12mm]\pingu@name-headband-center-b) to[bend right=9] ++(-2*\pingu@draw@ea@headband@wh, 0) -- cycle;
+ \fi
+}
+% #endregion
+
+% #region technology-lib
+\pingu@create@extra{vrheadset}{%
+ vr-headset/.code = \pingu@set@extra{vrheadset}{true}\pingu@color{vrheadset}{#1},
+ vr-headset/.default = pingu@black!92!gray,
+ vr-headset band/.code = \pingu@color{vrheadset@band}{#1},
+ vr-headset band top/.code = \pingu@color{vrheadset@band@top}{#1},
+ vr-headset text/.code = \def\pingu@x@vrheadset@text{#1},
+ vr-headset text color/.code = \pingu@color{vrheadset@text@color}{#1},
+ vr-headset hair/.style = {/pingu/hair 2=!hide,/pingu/hair 3=!hide,/pingu/hair 4=!hide}
+}{vr-headset band=\pingu@color@vrheadset!92!gray,vr-headset text={\textit{\textsf{VR\thinspace\texttrademark}}},vr-headset text color=pingu@white,vr-headset band top=\pingu@color@vrheadset!96!gray}
+
+\def\pingu@draw@ea@vrheadset{%
+\pingu@layer{middle}[]
+ \pingu@block{\pingu@color@vrheadset} [rounded corners=1.25mm]([yshift=3.45mm]\pingu@name-waist-right|-\pingu@name-eye-right) to[bend left=2] coordinate[pos=.5] (@) ([yshift=3.45mm]\pingu@name-waist-left|-\pingu@name-eye-left) to[bend left=3] coordinate (\pingu@name-vrh-ol) ++(0,-6.25mm) to[bend left=13] ([yshift=-1mm]\pingu@name-head-center) to[bend left=13] ([yshift=3.45mm-6.25mm]\pingu@name-waist-right|-\pingu@name-eye-right) -- cycle;
+ \path (\pingu@name-vrh-ol)++(-2.25mm,2mm) node[text=\pingu@color@vrheadset@text@color,scale=.25] {\pingu@x@vrheadset@text};
+\endpingu@layer
+\if@pingu@do@back@\else
+ % top band
+ \pingu@block[rounded corners=1pt]{\pingu@color@vrheadset@band@top} (@)++(-1.05mm+.15mm,0) to[bend right=2] ([xshift=-.85mm+.3mm,yshift=.3mm]\pingu@name-head-top) to[bend left=2] ++(1.6mm,0) to[bend left=2] ([xshift=1.25mm+.15mm]@);
+\fi
+ % we draw a band for the background
+\pingu@layer{background}[]
+\pingu@block[line cap=round]{\pingu@color@vrheadset@band} ([yshift=1mm]\pingu@name-waist-right|-\pingu@name-eye-right) to[bend left=3] coordinate[pos=.5] (@b) ([yshift=1mm]\pingu@name-waist-left|-\pingu@name-eye-left) arc(90:-90:.25mm and 1mm) to[bend right=3] ([yshift=-1mm]\pingu@name-waist-right|-\pingu@name-eye-right) arc (270:90:.25mm and 1mm);
+\pingu@block[rounded corners=1pt]{\pingu@color@vrheadset@band@top} (@b)++(-1.25mm+.2mm,-1.25mm) to[bend right=2] ([xshift=-.85mm+.3mm,yshift=.3mm]\pingu@name-head-top) to[bend right=2] ++(1.6mm,0) to[bend right=2] ([xshift=1.15mm+.2mm,yshift=-1.25mm]@b) -- cycle;
+\endpingu@layer
+}
+\pingu@create@extra{headphone}{%
+ headphones/.forward to = /pingu/headphone,
+ headphone/.code = \pingu@set@extra{headphone}{true}\pingu@color{headphone}{#1},
+ headphone/.default = pingu@blue!80!pingu@black,
+ headphone left/.code = \pingu@color{headphone@left}{#1},
+ headphone right/.code = \pingu@color{headphone@right}{#1},
+ headphones outer/.forward to = /pingu/headphone outer,
+ headphone outer/.style = {/pingu/headphone left outer=#1,/pingu/headphone right outer=#1}, headphone outer/.default = pingu@black,
+ headphone left outer/.code = \pingu@color{headphone@left@p}{#1}, headphone left outer/.default =pingu@black,
+ headphone right outer/.code = \pingu@color{headphone@right@p}{#1}, headphone right outer/.default=pingu@black,
+ headphones inner/.forward to = /pingu/headphone inner,
+ headphone inner/.style = {/pingu/headphone left inner=#1,/pingu/headphone right inner=#1}, headphone inner/.default = pingu@black,
+ headphone left inner/.code = \pingu@color{headphone@left@i}{#1}, headphone left inner/.default = pingu@black,
+ headphone right inner/.code = \pingu@color{headphone@right@i}{#1}, headphone right inner/.default=pingu@black,
+}{headphone left=\pingu@color@headphone!65!pingu@black,headphone right=\pingu@color@headphone@left,headphone left outer=\@pingu@none,
+,headphone right outer=\@pingu@none,,headphone left inner=\@pingu@none,
+,headphone right inner=\@pingu@none}
+
+\def\pingu@draw@ea@headphone{%
+\if@pingu@do@back@ \pingu@layer{background}[] \fi
+ \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right@p} ([xshift=-\pingu@one,yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (93:273:.565mm and 2.11mm) -- ++(.8mm,.075mm) -- ++(0,4.075mm);
+ \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right@i} ([xshift=\pingu@one-.366mm,yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (87:-93:.565mm and 2.14mm) -- ++(-.8mm,.075mm) -- ++(0,4.075mm) -- cycle;
+ \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@right} ([xshift=-\pingu@one+.2mm,yshift=3.22mm]\pingu@name-wings-side-right|-\pingu@name-eye-right) arc (92:272:.565mm and 2.1mm) -- ++(.8mm,-.05mm) arc (270:450:.425mm and 2.1mm) -- cycle;
+ \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left@p} ([xshift=\pingu@one,yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (87:-93:.565mm and 2.11mm) -- ++(-.8mm,.075mm) -- ++(0,4.075mm) -- cycle;
+ \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left@i} ([xshift=-\pingu@one+.366mm,yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (93:273:.565mm and 2.14mm) -- ++(.8mm,.075mm) -- ++(0,4.075mm);
+ \pingu@block[rounded corners=.1mm]{\pingu@color@headphone@left} ([xshift=\pingu@one-.2mm,yshift=3.22mm]\pingu@name-wings-side-left|-\pingu@name-eye-left) arc (88:-92:.565mm and 2.1mm) -- ++(-.8mm,-.05mm) arc (270:90:.425mm and 2.1mm) -- cycle;
+ \pingu@block{\pingu@color@headphone} ([xshift=-\pingu@one,yshift=1.75\pingu@one]\pingu@name-wings-side-right|-\pingu@name-eye-right)
+ arc(180:0:{\pingu@one+\pingu@w@half} and {\pingu@head@h@half-1.3\pingu@one}) arc(0:-180:.6mm and .33mm)
+ arc(0:180:{\pingu@one+\pingu@w@half-2*.6mm} and {\pingu@head@h@half+.33\pingu@one-2*.6mm-1.8\pingu@one})
+ arc(0:-180:.6mm and .33mm) -- cycle;
+\if@pingu@do@back@ \endpingu@layer \fi
+}
+
+\pingu@create@wing@extra{vrcontroller}{%
+vr-controller \@lr/.code = {\pingu@set@extra{vrcontroller\@lr}{true}\pingu@color{vrcontroller\@lr}{##1}},
+vr-controller \@lr/.default = pingu@green,
+vr-controller \@lr\space handle/.code = \pingu@color{vrcontroller\@lr @handle}{##1},%
+vr-controller \@lr\space second/.code = \pingu@color{vrcontroller\@lr @second}{##1},%
+vr-controller \@lr\space second shade/.code = \pingu@color{vrcontroller\@lr @second@shade}{##1}%
+}{vr-controller \@lr\space handle={\csname pingu@color@vrcontroller\@lr\endcsname!76!pingu@black},vr-controller \@lr\space second={\csname pingu@color@vrcontroller\@lr\endcsname!56!pingu@black},vr-controller \@lr\space second shade={\csname pingu@color@vrcontroller\@lr\endcsname!96!pingu@black}}
+
+% #1 wing
+\def\pingu@draw@wi@vrcontroller#1{%
+ \pingu@setup@wing{vrcontroller}{#1}%
+ \pingu@block[rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@handle\endcsname}(\pingu@name-wing-#1)++(.5mm,5mm) to[bend right=1] ++(-.25mm,-5.5mm) arc (0:-180:.325mm and .1mm) to[bend right=1] ++(-.7mm,5.5mm) -- cycle coordinate[pos=.5] (@);
+ \def\@y{2.06mm} \def\@@y{.78mm}
+ \pingu@block[rotate around={\@angle:(\pingu@name-wing-#1)},even odd rule]{\csname pingu@color@vrcontroller#1@second\endcsname}([yshift=.1mm]@) arc (90:450:{\@y} and 1mm) coordinate[pos=.25] (@r) coordinate[pos=.75] (@l) ([yshift=-.6mm]@) arc (90:0:{\@@y} and .25mm) arc (0:-180:{\@@y} and .35mm) arc (180:90:{\@@y} and .25mm);
+ % \pingu@draw[rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@second@shade\endcsname} ([yshift=-.9mm]@)++(180:{\@@y} and .3mm) arc (180:0:{\@@y} and .3mm);
+ \def\@toruslow{(@l) to[bend left=7] ++(-.2mm,-.875mm) to[bend left=15] coordinate[pos=.95] (@c) ++(-2*\@y+.4mm,0) [sharp corners] to[bend left=7] ++(-.2mm,.875mm) to[bend right=30] cycle}
+ \pingu@block[rounded corners=.1mm,rotate around={\@angle:(\pingu@name-wing-#1)}]{\csname pingu@color@vrcontroller#1@second\endcsname} \@toruslow;
+ \scope[rounded corners=.1mm,rotate around={\@angle:(\pingu@name-wing-#1)}]
+ \clip \@toruslow;
+ \pingu@block[opacity=.1]{black} (@l) to[bend left=14] (@c) -- ++(0,-2mm) -| cycle;
+ \endscope
+}
+
+
+\pingu@create@wing@extra{laptop}{%
+ laptop \@lr/.code = {\pingu@set@extra{laptop\@lr}{true}\pingu@color{laptop\@lr}{##1}},
+ laptop \@lr/.default = gray!80!pingu@white,
+ laptop \@lr\space bracket/.code = \pingu@color{laptop\@lr @bracket}{##1},
+ laptop \@lr\space lower/.code = \pingu@color{laptop\@lr @lower}{##1},
+ laptop \@lr\space key/.code = \pingu@color{laptop\@lr @key}{##1},
+ laptop \@lr\space display/.code = \pingu@color{laptop\@lr @display}{##1},
+ laptop \@lr\space content/.code = \@namedef{pingu@x@laptop\@lr @content}{##1}, % tikz content
+ laptop \@lr\space mid/.code = \@namedef{pingu@x@laptop\@lr @mid}{##1}, % tikz content
+}{laptop \@lr\space bracket=pingu@black!80!\csname pingu@color@laptop\@lr\endcsname,laptop \@lr\space lower=\csname pingu@color@laptop\@lr\endcsname!95!pingu@black,laptop \@lr\space key=\csname pingu@color@laptop\@lr\endcsname!92!pingu@white,laptop \@lr\space display=\csname pingu@color@laptop\@lr\endcsname!32!pingu@white,laptop \@lr\space content={},laptop \@lr\space mid={}}
+
+% #1 wing
+\def\pingu@draw@wi@laptop#1{%
+ \pingu@setup@wing{laptop}{#1}%
+ \scope[rotate around={\@angle+5:(\pingu@name-wing-#1)},shift={(\pingu@name-wing-#1)}]
+ \pingu@block[rounded corners=1pt]{\csname pingu@color@laptop#1@lower\endcsname}(-6.9mm,0) -- ++(-.1mm,-4.75mm) -- ++(14mm,0) -- ++(-.1mm,4.75mm) -- cycle;
+ \pingu@block[rounded corners=1pt]{\@col}(-6.9mm,0) -- ++(0,7mm) -- ++(13.8mm,0) -- ++(0,-7mm) -- cycle;
+ \pingu@block[rounded corners=.125mm]{\csname pingu@color@laptop#1@bracket\endcsname}(-6.4mm,.125mm) -- ++(0,-.25mm) -- ++(12.8mm,0) -- ++(0,.25mm) -- cycle;
+ % keys
+ \foreach[count=\y from 0,evaluate=\y as \extpadding using 0.005*\y,evaluate=\y as \rextpadding using 0.05*\y] \row in {
+ % manually account for padding
+ {0,1,1,1,1,1,1,1,1,1,1,1,1,1},
+ {.63,1.5,1,1,1,1,1,1,1,1,1,1,1},
+ {0,1,1,1,1,1,1,1,1,1,1,1,1,1},
+ {0,1,1,1,1,1,4.62,1,1,1,1},
+ } {
+ \def\lengthincr{-\rextpadding mm}
+ \foreach[count=\i from 0,evaluate=\len as \l using 0.85*\len] \len in \row {
+ \ifnum\i=0 \else % first one is silent:
+ \pingu@block[rounded corners=.125mm]{\csname pingu@color@laptop#1@key\endcsname}(\lengthincr-6.4mm,-\y mm-.5mm) rectangle ++(\l mm,-.75mm) node[midway,centered,text=\@col,scale=.3] {\textbullet};
+ \fi
+ \xdef\lengthincr{\the\dimexpr\lengthincr+\l mm+.13mm+\extpadding mm}
+ }
+ }
+ % display, we modify the lower shift to adjust height offset
+ \pingu@block[rounded corners=1pt]{\csname pingu@color@laptop#1@display\endcsname}(-6.7mm,.25mm+.05mm) rectangle ++(13.4mm,6.45mm) node[midway,centered,rotate=\@angle+5,text width=13.2mm,align=center,minimum height=6.2mm] {\csname pingu@x@laptop#1@mid\endcsname};
+ \scope[shift={(-6.7mm,.25mm+.05mm)}]
+ \csname pingu@x@laptop#1@content\endcsname
+ \endscope
+ \endscope
+}
+% #endregion
\endinput
diff --git a/graphics/pgf/contrib/tikzquads/README.md b/graphics/pgf/contrib/tikzquads/README.md
index 4ea07b35cb..ab8d126c52 100644
--- a/graphics/pgf/contrib/tikzquads/README.md
+++ b/graphics/pgf/contrib/tikzquads/README.md
@@ -79,6 +79,9 @@ The Current Maintainer of this work is Alceu Frigeri
## Changelog
+* Version 1.1 (this)
+ - Added a 'raw sources' key (see manual)
+ - a few typos in the documentation
* Version 1.0
- Initial release by CTAN
diff --git a/graphics/pgf/contrib/tikzquads/doc/tikzquads.pdf b/graphics/pgf/contrib/tikzquads/doc/tikzquads.pdf
index 4ea887cb74..0bfc7d4b14 100644
--- a/graphics/pgf/contrib/tikzquads/doc/tikzquads.pdf
+++ b/graphics/pgf/contrib/tikzquads/doc/tikzquads.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikzquads/doc/tikzquads.tex b/graphics/pgf/contrib/tikzquads/doc/tikzquads.tex
index b6f6f1a30b..0e549ead63 100644
--- a/graphics/pgf/contrib/tikzquads/doc/tikzquads.tex
+++ b/graphics/pgf/contrib/tikzquads/doc/tikzquads.tex
@@ -15,7 +15,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.0} {2024/01/13}
+%% This is version {1.1} {2024/10/17}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/tikzdotncross
@@ -91,7 +91,7 @@ This package defines a few extra shapes (single / dual port boxes) designed to b
\tableofcontents
\section{Introduction}
-In standard text books, both for Circuits Theory and Electronics, quite frequently, in the process of modelling sub-circuits, one ends representing them either:
+In standard text books, Circuits Theory and Electronics alike, quite frequently, in the process of modelling sub-circuits, one ends representing them either:
\begin{itemize}
\item as a single port \emph{black box}, or
\item as a dual port \emph{black box}
@@ -113,7 +113,7 @@ This package defines a few, parameterized shapes for each case:
\item Quad G
\item Quad H
\end{itemize}
-Lastly, this package also defines a \emph{Pseudo-Graph load line} shape, for those moments where a true graph, \tsobj[pkg]{pgfplots}, isn't needed.
+Lastly, this package also defines a \emph{Pseudo-Graph load line} shape, for those moments where a true graph, like the ones \tsobj[pkg]{pgfplots} enables, isn't needed.
\end{itemize}
\subsection{CircuiTi\emph{k}Z}
@@ -161,7 +161,7 @@ The point being that, regardless of the sub-shape orientation, the intuitive geo
\subsection{General Keys}\label{generalkeys}
-These are the keys to fine tuning a shape:
+General keys to fine tuning a shape:
\begin{describelist*}[30mm]{keys}
\describe {outer sep} {Text outer separation, initial value: 1.5pt}
\describe {inner sep} {Text inner separation, initial value: 1pt}
@@ -392,7 +392,7 @@ node[Quad Z]{}
\tscode*[emph={draw,node},emph2={x,y,fit,to,outer,inner,node},emph3={Quad,ToQuad,Black,ToBlack,Box,Thevenin,ToThevenin,Norton,ToNorton},basicstyle={\scriptsize\ttfamily},numbers=left,codeprefix={}]{QuadZDef}
-This shape, besides the base anchors (see \ref{quadanchors}) it has 4 internal nodes: \tsobj[key]{<node>-Z11,<node>-Z12,<node>-Z21,<node>-Z22} and each of those sub-nodes has geographic anchors as defined at \ref{auxiliarynodes}.
+Besides the base anchors (see \ref{quadanchors}) it has 4 internal nodes: \tsobj[key]{<node>-Z11,<node>-Z12,<node>-Z21,<node>-Z22} and each of those sub-nodes has geographic anchors as defined at \ref{auxiliarynodes}.
\begin{tsremark}
There is also a \tsobj[key]{ToQuad Z} to be used in a \tsobj[key]{to[ ]} path, in which case the key \tsobj[key]{outer x fit to} style will be triggered with the starting and ending points of the \tsobj[key]{to[ ]} path.
\end{tsremark}
@@ -423,6 +423,7 @@ There is also a \tsobj[key]{ToQuad Z} to be used in a \tsobj[key]{to[ ]} path, i
\describe{I2}{Initial value:\tsverb{$I_2$}}
\describe{V1}{Initial value:\tsverb{$V_1$}}
\describe{V2}{Initial value:\tsverb{$V_2$}}
+ \describe {raw sources} {This will suppress the control variables (I1, I2) in the sources' labels}
\describe{Z11}{Initial value:\tsverb{$Z_{11}$}}
\describe{Z12}{Initial value:\tsverb{$Z_{12}$}}
\describe{Z21}{Initial value:\tsverb{$Z_{21}$}}
@@ -448,7 +449,7 @@ node[Quad Y]{}
\end{codestore}
\tscode*[emph={draw,node},emph2={x,y,fit,to,outer,inner,node},emph3={Quad,ToQuad,Black,ToBlack,Box,Thevenin,ToThevenin,Norton,ToNorton},basicstyle={\scriptsize\ttfamily},numbers=left,codeprefix={}]{QuadYDef}
-This shape, besides the base anchors (see \ref{quadanchors}) it has 4 internal nodes: \tsobj[key]{<node>-Y11,<node>-Y12,<node>-Y21,<node>-Y22} and each of those sub-nodes has geographic anchors as defined at \ref{auxiliarynodes}.
+Besides the base anchors (see \ref{quadanchors}) it has 4 internal nodes: \tsobj[key]{<node>-Y11,<node>-Y12,<node>-Y21,<node>-Y22} and each of those sub-nodes has geographic anchors as defined at \ref{auxiliarynodes}.
\begin{tsremark}
There is also a \tsobj[key]{ToQuad Y} to be used in a \tsobj[key]{to[ ]} path, in which case the key \tsobj[key]{outer x fit to} style will be triggered with the starting and ending points of the \tsobj[key]{to[ ]} path.
\end{tsremark}
@@ -479,6 +480,7 @@ There is also a \tsobj[key]{ToQuad Y} to be used in a \tsobj[key]{to[ ]} path, i
\describe{I2}{Initial value:\tsverb{$I_2$}}
\describe{V1}{Initial value:\tsverb{$V_1$}}
\describe{V2}{Initial value:\tsverb{$V_2$}}
+ \describe {raw sources} {This will suppress the control variables (V1, V2) in the sources' labels}
\describe{Y11}{Initial value:\tsverb{$Y_{11}$}}
\describe{Y12}{Initial value:\tsverb{$Y_{12}$}}
\describe{Y21}{Initial value:\tsverb{$Y_{21}$}}
@@ -503,7 +505,7 @@ node[Quad G]{}
\tscode*[emph={draw,node},emph2={x,y,fit,to,outer,inner,node},emph3={Quad,ToQuad,Black,ToBlack,Box,Thevenin,ToThevenin,Norton,ToNorton},basicstyle={\scriptsize\ttfamily},numbers=left,codeprefix={}]{QuadGDef}
-This shape, besides the base anchors (see \ref{quadanchors}) it has 4 internal nodes: \tsobj[key]{<node>-G11,<node>-G12,<node>-G21,<node>-G22} and each of those sub-nodes has geographic anchors as defined at \ref{auxiliarynodes}.
+Besides the base anchors (see \ref{quadanchors}) it has 4 internal nodes: \tsobj[key]{<node>-G11,<node>-G12,<node>-G21,<node>-G22} and each of those sub-nodes has geographic anchors as defined at \ref{auxiliarynodes}.
\begin{tsremark}
There is also a \tsobj[key]{ToQuad G} to be used in a \tsobj[key]{to[ ]} path, in which case the key \tsobj[key]{outer x fit to} style will be triggered with the starting and ending points of the \tsobj[key]{to[ ]} path.
\end{tsremark}
@@ -535,6 +537,7 @@ There is also a \tsobj[key]{ToQuad G} to be used in a \tsobj[key]{to[ ]} path, i
\describe{I2}{Initial value:\tsverb{$I_2$}}
\describe{V1}{Initial value:\tsverb{$V_1$}}
\describe{V2}{Initial value:\tsverb{$V_2$}}
+ \describe {raw sources} {This will suppress the control variables (V1, I2) in the sources' labels}
\describe{G11}{Initial value:\tsverb{$G_{11}$}}
\describe{G12}{Initial value:\tsverb{$G_{12}$}}
\describe{G21}{Initial value:\tsverb{$G_{21}$}}
@@ -559,7 +562,7 @@ node[Quad H]{}
\tscode*[emph={draw,node},emph2={x,y,fit,to,outer,inner,node},emph3={Quad,ToQuad,Black,ToBlack,Box,Thevenin,ToThevenin,Norton,ToNorton},basicstyle={\scriptsize\ttfamily},numbers=left,codeprefix={}]{QuadHDef}
-This shape, besides the base anchors (see \ref{quadanchors}) it has 4 internal nodes: \tsobj[key]{<node>-H11,<node>-H12,<node>-H21,<node>-H22} and each of those sub-nodes has geographic anchors as defined at \ref{auxiliarynodes}.
+Besides the base anchors (see \ref{quadanchors}) it has 4 internal nodes: \tsobj[key]{<node>-H11,<node>-H12,<node>-H21,<node>-H22} and each of those sub-nodes has geographic anchors as defined at \ref{auxiliarynodes}.
\begin{tsremark}
There is also a \tsobj[key]{ToQuad H} to be used in a \tsobj[key]{to[ ]} path, in which case the key \tsobj[key]{outer x fit to} style will be triggered with the starting and ending points of the \tsobj[key]{to[ ]} path.
\end{tsremark}
@@ -592,6 +595,7 @@ There is also a \tsobj[key]{ToQuad H} to be used in a \tsobj[key]{to[ ]} path, i
\describe{I2}{Initial value:\tsverb{$I_2$}}
\describe{V1}{Initial value:\tsverb{$V_1$}}
\describe{V2}{Initial value:\tsverb{$V_2$}}
+ \describe {raw sources} {This will suppress the control variables (I1, V2) in the sources' labels}
\describe{H11}{Initial value:\tsverb{$H_{11}$}}
\describe{H12}{Initial value:\tsverb{$H_{12}$}}
\describe{H21}{Initial value:\tsverb{$H_{21}$}}
diff --git a/graphics/pgf/contrib/tikzquads/latex/tikzquads.sty b/graphics/pgf/contrib/tikzquads/latex/tikzquads.sty
index 31fc675742..1cdaf13300 100644
--- a/graphics/pgf/contrib/tikzquads/latex/tikzquads.sty
+++ b/graphics/pgf/contrib/tikzquads/latex/tikzquads.sty
@@ -12,7 +12,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.0} {2024/01/13}
+%% This is version {1.1} {2024/10/17}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/tikzquads
@@ -27,8 +27,8 @@
\ProvidesExplPackage
{tikzquads}
- {2024/01/13}
- {1.0}
+ {2024/10/17}
+ {1.1}
{CircuiTikZ Extension - Quadripoles and Dipoles}
\ExplSyntaxOn
@@ -42,8 +42,8 @@
{
name .code:n = {tikzquads} ,
prefix .code:n = {tikzquads} ,
- date .code:n = {2024/01/13},
- version .code:n = {1.0} ,
+ date .code:n = {2024/10/17},
+ version .code:n = {1.1} ,
description .code:n = {CircuiTikZ~ Extension~- Quadripoles~ and~ Dipoles}
}
\cs_if_exist:NF \PkgInfo
@@ -86,6 +86,7 @@
\newtoggle{tikzquads@@toggle@outermarks}
\newtoggle{tikzquads@@toggle@beziertip}
\newtoggle{tikzquads@@toggle@roundsources}
+\newtoggle{tikzquads@@toggle@rawsources}
%
%
@@ -301,7 +302,7 @@
%%%%%%%%%%%%%%%
%%%
-%%% "QUadKeys" Path (Quadripoles)
+%%% "QuadKeys" Path (Quadripoles)
%%%
%%%%%%%%%%%%%%%
@@ -503,6 +504,8 @@
inner marks/.style={@inner marks},
@outer marks/.code={\toggletrue{tikzquads@@toggle@outermarks}},
outer marks/.style={@outer marks},
+ @raw sources/.code={\toggletrue{tikzquads@@toggle@rawsources}},
+ raw sources/.style={@raw sources},
@invert/.code={\toggletrue{tikzquads@@toggle@inverted}},
invert/.style={%
/tikz/xscale=-1,
@@ -803,7 +806,11 @@
\SearchValueOf{QuadKeys}{#3}{\@@valC}
\pgftransformresetnontranslations
\tikzquads@@CondDraw{#1}{}{\pgftext[\tikzquads@@TanchorA,at={\pgfpointanchor{\tikz@fig@name-#1}{\tikzquads@@NanchorA}}]{\@@valA}}
- \tikzquads@@CondDraw{#2}{}{\pgftext[\tikzquads@@TanchorB,at={\pgfpointanchor{\tikz@fig@name-#2}{\tikzquads@@NanchorB}}]{\@@valB\@@valC}}
+ \ifboolexpr{togl{tikzquads@@toggle@rawsources}}{%
+ \tikzquads@@CondDraw{#2}{}{\pgftext[\tikzquads@@TanchorB,at={\pgfpointanchor{\tikz@fig@name-#2}{\tikzquads@@NanchorB}}]{\@@valB}}
+ }{%
+ \tikzquads@@CondDraw{#2}{}{\pgftext[\tikzquads@@TanchorB,at={\pgfpointanchor{\tikz@fig@name-#2}{\tikzquads@@NanchorB}}]{\@@valB\@@valC}}
+ }
}
}
@@ -901,7 +908,11 @@
\SearchValueOf{QuadKeys}{#4}{\@@valC}
\pgftransformresetnontranslations
\tikzquads@@CondDraw{#2}{}{\pgftext[\tikzquads@@TanchorA,at={\pgfpointanchor{\tikz@fig@name-#2}{\tikzquads@@NanchorA}}]{\@@valA}}
- \tikzquads@@CondDraw{#3}{}{\pgftext[\tikzquads@@TanchorB,at={\pgfpointanchor{\tikz@fig@name-#3}{\tikzquads@@NanchorB}}]{\@@valB\@@valC}}
+ \ifboolexpr{togl{tikzquads@@toggle@rawsources}}{%
+ \tikzquads@@CondDraw{#3}{}{\pgftext[\tikzquads@@TanchorB,at={\pgfpointanchor{\tikz@fig@name-#3}{\tikzquads@@NanchorB}}]{\@@valB}}
+ }{%
+ \tikzquads@@CondDraw{#3}{}{\pgftext[\tikzquads@@TanchorB,at={\pgfpointanchor{\tikz@fig@name-#3}{\tikzquads@@NanchorB}}]{\@@valB\@@valC}}
+ }
}
}
diff --git a/graphics/pgf/contrib/timechart/README.md b/graphics/pgf/contrib/timechart/README.md
new file mode 100644
index 0000000000..8a4830fa6a
--- /dev/null
+++ b/graphics/pgf/contrib/timechart/README.md
@@ -0,0 +1,16 @@
+# `timechart` - A package for drawing chronological charts
+
+## Description
+
+This package provides for the easy creation of chronological charts which show visually the relative historical
+positions of people and events. Each event or period can be specified by a single line of LaTeX code comprising
+(possibly uncertain) start and finish dates and a label, and the package takes care of indicating the uncertainties and
+whether intervals extend beyond the specified bounds of the chart.
+
+## Author
+
+This package is by Alan J. Cain: a.j.cain (AT) gmail.com
+
+## Licence
+
+Released under the LaTeX Project Public License v1.3c or later: https://www.latex-project.org/lppl.txt
diff --git a/graphics/pgf/contrib/timechart/timechart-doc.pdf b/graphics/pgf/contrib/timechart/timechart-doc.pdf
new file mode 100644
index 0000000000..31b778e9de
--- /dev/null
+++ b/graphics/pgf/contrib/timechart/timechart-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/timechart/timechart.dtx b/graphics/pgf/contrib/timechart/timechart.dtx
new file mode 100644
index 0000000000..82048a452a
--- /dev/null
+++ b/graphics/pgf/contrib/timechart/timechart.dtx
@@ -0,0 +1,3458 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2025 Alan J. Cain
+%
+% This file may be distributed and/or modified under the conditions of the LaTeX Project Public Licence, either version
+% 1.3 of this licence or (at your option) any later version. The latest version of this licence 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>
+\PassOptionsToPackage{inline}{enumitem}
+\documentclass{l3doc}
+
+
+
+% Make space for larger numbers in contents
+
+\makeatletter
+\ExplSyntaxOn
+
+\cs_gset:Npn \l@subsection { \@dottedtocline{2}{2.5em}{2.8em} }
+\cs_gset:Npn \l@subsubsection { \@dottedtocline{3}{5.3em}{4em} }
+
+\ExplSyntaxOff
+\makeatother
+
+
+
+% Link formatting
+
+\usepackage{xcolor}
+
+\definecolor{linkcolor}{rgb}{0.0,0.4,0.7}
+\colorlet{citecolor}{linkcolor}
+\colorlet{urlcolor}{linkcolor}
+
+\hypersetup{
+ linkcolor=linkcolor,%
+ citecolor=citecolor,%
+ urlcolor=urlcolor,%
+}
+
+\newcommand*\fullref[2]{%
+ \hyperref[#2]{#1\penalty 200\ \ref*{#2}}%
+}
+
+
+
+% Use siunitx for typesetting dimensions
+
+\usepackage{siunitx}
+\sisetup{
+ mode=match,
+}
+\DeclareSIUnit\point{pt}
+
+
+
+% Listings and grammars
+
+\usepackage{listings}
+\lstset{
+ language=[LaTeX]TeX,
+ basicstyle=\small\ttfamily,
+ basewidth=0.5em,
+ numbers=left,
+ numberstyle=\scriptsize\sffamily,
+}
+
+\usepackage{simplebnf}
+
+
+
+% Macros for describing keys
+
+\newlist{optionlist}{description}{1}
+\setlist[optionlist]{
+ leftmargin=3em,
+ style=unboxed,
+ labelsep=1em,
+ font=\descriptionitemcolon,
+ nosep,
+}
+\newcommand*{\descriptionitemcolon}[1]{\kern 1em #1:}
+
+
+\newcommand*\key[1]{\texttt{#1}}
+\newcommand*\val[1]{\texttt{#1}}
+\newcommand*\keyval[2]{\texttt{#1=#2}}
+
+\usepackage{xcolor}
+\definecolor{keycolor}{rgb}{0.8,0.0,0.0}
+\definecolor{keyvaluecolor}{rgb}{0.0,0.65,0.0}
+
+\ExplSyntaxOn
+
+\NewDocumentEnvironment{describekey}{ m m m }{
+ \group_begin:
+ \group_begin:
+ \noindent{\textcolor{keycolor}{\texttt{#1}}}
+ \str_if_empty:nF{#2}
+ {
+ \skip_set:Nn{\parfillskip}{0pt}
+ \str_case:nnF{#2}
+ {
+ {style}
+ {
+ \hfil
+ (style,~initially~#3)
+ }
+ }
+ {
+ \textcolor{keyvaluecolor}{\texttt{=}\meta{#2}}
+ \str_if_empty:nF{#3}
+ {
+ \hfil
+ (default\nobreakspace\texttt{#3})
+ }
+ }
+ }
+ \par
+ \group_end:
+ \nobreak
+ \skip_add:Nn{\leftskip}{\parindent}
+ \noindent\ignorespaces
+}{
+ \par
+ \group_end:
+}
+
+\ExplSyntaxOff
+
+
+\newcommand*\mcode[1]{\texttt{#1}}
+\newcommand*\param[1]{\texttt{\##1}}
+
+
+
+% Other macros
+
+\newcommand*\TikZ{\texorpdfstring{Ti\textit{k}Z}{TikZ}}
+\newcommand*\ISO{\textsc{iso}}
+
+
+
+% Timechart
+
+\usepackage{timechart}
+
+\input{timechart-example1-setup.tex}
+
+
+
+\begin{document}
+\DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \GetFileInfo{timechart.sty}
+%
+%
+%
+% \title{^^A
+% \pkg{timechart} ^^A
+% --- A package for drawing chronological charts^^A
+% \thanks{This file describes \fileversion, last revised \filedate.}^^A
+% }
+%
+% \author{^^A
+% Alan J. Cain^^A
+% }
+%
+% \date{Released \filedate}
+%
+% \maketitle
+%
+%
+%
+% \begin{abstract}
+% This package provides for the easy creation of chronological charts which show visually the relative historical
+% positions of people and events. Each event or period can be specified by a single line of \LaTeX\ code comprising
+% (possibly uncertain) start and finish dates and a label, and the package takes care of indicating the uncertainties
+% and whether intervals extend beyond the specified bounds of the chart.
+% \end{abstract}
+%
+%
+%
+% \tableofcontents
+%
+%
+%
+% \begin{documentation}
+%
+% \setcounter{secnumdepth}{2}
+%
+%
+% \section{Introduction}
+%
+% The \pkg{timechart} package provides a system for the easy creation of chronological charts --- of the type pioneered
+% by Joseph Priestley (1733--1804) in his `Chart of Biography' and more famously in his `New Chart of
+% History'\footnote{\textsc{url}:~\url{https://commons.wikimedia.org/wiki/File:A_New_Chart_of_History_color.jpg}} ---
+% which can show visually the relative historical positions of people and events. An example of what \pkg{timechart} can
+% be used to produce is shown in \fullref{Figure}{fig:example1} on page~\pageref{fig:example1}.
+%
+% \begin{figure}[p]
+% \centering
+% \input{timechart-example1-timechart.tex}
+% \caption{Timechart showing the lifetimes of Roman emperors from \timechartmakebeforeyear{50} to
+% \timechartmakeafteryear{500}. Marks on each lifetime indicate the beginning (and, where relevant, the end) of that
+% emperor's reign. Colours generally indicate dynasties, with shades of green indicating periods when the imperial
+% power shifted between many short-reigning emperors.}
+% \label{fig:example1}
+% \end{figure}
+%
+% Essentially (and this was a design requirement), \emph{only one line} of \LaTeX\ code is required for each interval
+% (which, in the case of \fullref{Figure}{fig:example1}, are mostly lifetimes). The \pkg{timechart} package takes care
+% of indicating ranges of possible dates by suitable fading from or to transparency. It also handles indicators to show
+% that intervals continue outside the specified scope of the chart.
+%
+% \pkg{timechart} was developed from, and replaced, a set of macros used to create the chronological charts in the
+% author's book \textit{Form \& Number: A History of Mathematical Beauty}, which is available on the Internet Archive
+% under a Creative Commons licence.\footnote{\textsc{url}:
+% \url{https://archive.org/details/cain_formandnumber_ebook_large}}
+%
+%
+%
+% \paragraph*{Licence.} \noindent\pkg{timechart} is released under the LaTeX Project Public Licence v1.3c or
+% later.\footnote{\textsc{url}: \url{https://www.latex-project.org/lppl.txt}}
+%
+%
+%
+% \paragraph*{Acknowledgements.} The author thanks Tânia Paulista for reading and commenting on an earlier draft of the
+% documentation.
+%
+%
+%
+% \section{Requirements}
+%
+% \pkg{timechart} requires PGF/\TikZ\ and a \LaTeX\ kernel with \pkg{expl3} support (any kernel version since 2020-02-02
+% should suffice).
+%
+%
+%
+% \section{Installation}
+%
+% To install manually, run \texttt{tex timechart.ins} and copy the file \file{timechart.sty} to somewhere \LaTeX\ can
+% find it.
+%
+%
+%
+% \section{Getting started}
+%
+% The \pkg{timechart} package is loaded as usual via \cs{usepackage}\texttt{\{timechart\}}. There are no package
+% options.
+%
+% The small example in \fullref{Section}{sec:example} illustrates the basic principles of \pkg{timechart}.
+% \fullref{Section}{sec:full-example} shows the full code used to produce the large example in \fullref{Figure}{fig:example1}.
+%
+%
+%
+%
+%
+% \section{Example}
+% \label{sec:example}
+%
+% This section illustrates how to create the small chart shown in \fullref{Figure}{fig:example2-v2} on
+% page~\pageref{fig:example2-v2}.
+%
+% The basic environment is \env{timechart}, which includes the specification of the start and finish years. The start
+% year \timechartmakebeforeyear{50} is specified as \mcode{-50}, the finish year \timechartmakeafteryear{75} as
+% \mcode{75}. Each interval in the chart is specified using the \cs{timechartinterval} command, which takes three
+% mandatory parameters: a start year, a finish year, and a label. The following code produces the flawed preliminary
+% version shown in \fullref{Figure}{fig:example2-v1}.
+%
+% \lstinputlisting{timechart-example2-v1.tex}
+%
+% \begin{figure}[ht]
+% \centering
+% \input{timechart-example2-v1.tex}
+% \medskip
+% \caption{Flawed preliminary version of a chart showing the lifetimes of Roman emperors of the Julio-Claudian
+% dynasty. (The final version is shown in \fullref{Figure}{fig:example2-v2}.)}
+% \label{fig:example2-v1}
+% \end{figure}
+%
+% This first attempt result illustrates some of the principles of \pkg{timechart}. Each interval has been placed on its
+% own line. More precisely, the \(y\) coordinate of the first interval is \(0\) and each use of \cs{timechartinterval}
+% increments the `current \(y\) coordinate' by a specified amount. (Various commands are available to set the \(y\)
+% coordinate manually or to reset it automatically when it passes certain bounds; see
+% \fullref{Subsection}{subsec:positioning}.) Horizontally, the chart starts and finishes at the specified years. The topmost
+% interval, indicating Augustus' life, has been truncated with an indicator that it begins before the specified start
+% year of the chart. Vertically, the chart has been sized to fit around the specified intervals.
+%
+% But this version is hardly satisfactory, for many reasons. The chart finishes between two minor ticks on the axis,
+% because the intervals between major and minor ticks default respectively to 10 years and 50 years. The black intervals
+% and text do not contrast well with the black axis and grid. The serif font is perhaps not best suited to label the
+% intervals. And the label `Augustus' has been lost, since labels are by default placed on the left of intervals. To
+% rectify these problems, some changes are necessary, all of which can be made using key-value syntax in an optional
+% parameter to the \env{timechart} environment or the \cs{timechartinterval} command:
+% \begin{enumerate}
+% \item Set the intervals between major and minor ticks to 5 years and 25 years respectively, by setting
+% \keyval{minor tick interval}{5} and \keyval{major tick interval}{25}.
+% \item Change the colour of the grid to light grey by appending \keyval{draw}{lightgray} to the \key{grid} style
+% \item Change the colour of the axis to grey by appending \keyval{draw}{gray} to the \key{axis line}, \key{minor
+% tick}, and \key{major tick} styles.
+% \item Change the font used for interval labels to small san-serif by appending \keyval{node
+% font}{\cs{sffamily}\cs{small}} to the \key{interval label} style
+% \item Change the colour of the intervals by defining a style \key{julioclaudian} that sets \keyval{interval bar
+% color}{red!80!black} and applying it to each interval via its optional argument. (While \key{interval bar
+% color} could be set locally for each interval, it is better to define a style that corresponds to the
+% semantic meaning of the colour: in this case, a single dynasty.)
+% \item Use the \key{right} key to place some labels on the right
+% \end{enumerate}
+%
+% The result is the following code, which produces \fullref{Figure}{fig:example2-v2}.
+%
+% \lstinputlisting{timechart-example2-v2.tex}
+%
+% \begin{figure}[ht]
+% \centering
+% \input{timechart-example2-v2.tex}
+% \caption{Chart showing the lifetimes of Roman emperors of the Julio-Claudian dynasty.}
+% \label{fig:example2-v2}
+% \end{figure}
+%
+%
+%
+% \section{Configuration}
+%
+% All \pkg{timechart} configuration, global or local, is via PGF keys, so some familiarity with their use is beneficial;
+% see the PGF/\TikZ\ manual.
+%
+% Configuration keys for \pkg{timechart} are contained in \key{/timechart/} in the PGF keys hierarchy. The
+% \meta{options} passed to the \env{timechart} environment or any of the commands \cs{timechartinterval},
+% \cs{timecharttext}, or \cs{timechartspace} are processed within \key{/timechart/} (since \key{/timechart/.cd} is
+% executed before keys are processed).
+%
+% The user may wish to define PGF styles for different kinds of interval within a chart. For example, one could
+% define styles \key{science} and \key{art} that set a particular colour for the interval, and write
+% \cs{timechartinterval}\key{[science]}\marg{birth}\marg{death}\marg{name} or
+% \cs{timechartinterval}\key{[art]}\marg{birth}\marg{death}\marg{name} to distinguish visually the lifetimes of
+% various scientists and artists.
+%
+%
+%
+% \section{Specifying dates and date ranges}
+% \label{sec:dates-and-ranges}
+%
+% Using \pkg{timechart} requires specification of dates and date ranges for the start and finish of each interval, both
+% of which may be uncertain.
+%
+% The basic specification of a date uses \ISO~8601 format \mcode{YYYY-MM-DD}. This format specifies a date with
+% day-level precision; use \mcode{YYYY-MM} and \mcode{YYYY} for month- and year-level precision. If the date is prefixed
+% by \mcode{-}, it is treated as the corresponding date before the epoch. (This is a difference with \ISO~8601, in which
+% \texttt{0} represents \timechartmakebeforeyear{1}, \texttt{-1} represents \timechartmakebeforeyear{2}, and so on.) So
+% (assuming that one is using \textsc{bce}/\textsc{ce}) one uses \mcode{-100} to indicate \timechartmakebeforeyear{100}
+% and \mcode{100} to indicate \timechartmakeafteryear{100}. (The era indicators `\textsc{bce}' and `\textsc{ce}' appear
+% on the axis. Alternative era indicators --- or a different epoch --- can be specified; see
+% \fullref{Section}{sec:era-indicators}.)
+%
+% A date can be prefixed with a \mcode{c} to indicate `circa', such as \mcode{c-100} for `circa
+% \timechartmakebeforeyear{100}' and \mcode{c100} for `circa \timechartmakeafteryear{100}'. When an interval is drawn in
+% a chart, `circa' will be indicated by automatically creating (or extending) a range according to the value of the key
+% \key{circa uncertainty} (see \fullref{Subsection}{subsec:intervals}).
+%
+% A date range comprises two dates (each with or without \mcode{c}) separated by a slash \mcode{/}, with the first date
+% being earlier (or equal to) the second date. (The slash indicates a range of dates per \ISO~8601.) A date
+% range can be used to indicate a broader uncertainty than the default `circa', or to indicate a definite range within
+% which an interval starts or ends.
+%
+% \begin{description}
+% \item[Examples of correctly formatted dates and date ranges:] \mcode{-50}, \mcode{100}, \mcode{c-50},
+% \mcode{c100}, \mcode{-50/100}, \mcode{c-50 / +100}, \mcode{-50/c100}, \mcode{c-50/c100}, \mcode{-585-05-28},
+% \mcode{1947-12-01}, \mcode{1989-11}.
+%
+% \item[Examples of incorrectly formatted date and date ranges:] \mcode{100?}, \mcode{100CE}, \mcode{100BCE},
+% \mcode{-50-100}, \mcode{100/-50}.
+% \end{description}
+%
+% \noindent That is, the syntax for dates and date ranges is per the following (not-quite-formal) grammar:
+%
+% \smallskip
+%
+% \begin{bnf}
+% \meta{cdate-or-crange} ::= \meta{cdate}
+% | \meta{crange} ;;
+% \meta{cdate} ::= \meta{date}
+% | \mcode{c}\meta{date} ;;
+% \meta{date} ::= \meta{pdate}
+% | \mcode{-}\meta{pdate} ;;
+% \meta{pdate} ::= \meta{year}\mcode{-}\meta{month}\mcode{-}\meta{day}
+% | \meta{year}\mcode{-}\meta{month}
+% | \meta{year} ;;
+% \meta{crange} ::= \meta{\(\text{date}_1\)}\mcode{/}\meta{\(\text{date}_2\)}
+% | \mcode{c}\meta{\(\text{date}_1\)}\mcode{/}\meta{\(\text{date}_2\)}
+% | \meta{\(\text{date}_1\)}\mcode{/}\mcode{c}\meta{\(\text{date}_2\)}
+% | \mcode{c}\meta{\(\text{date}_1\)}\mcode{/}\mcode{c}\meta{\(\text{date}_2\)} ~~~(with \(\text{date}_1 \leq \text{date}_2\)) ;;
+% \end{bnf}
+%
+% \smallskip
+%
+% \noindent The bounds of the \env{timechart} environment (see \fullref{Section}{sec:timechart-env}) must satisfy
+% \meta{cdate} in this grammar (although only the \meta{year} is used); the start and finish dates of an
+% \cs{timechartinterval} command (see \fullref{Subsection}{subsec:intervals}) must satisfy \meta{cdate-or-crange}; the
+% parameter of an \cs{timecharttext} command (see \fullref{Subsection}{subsec:text}) must satisfy \meta{date}.
+%
+% \medskip
+% \noindent \textit{Note.} For performance reasons, the date parser does only limited error-checking. Months outside the
+% range from \mcode{01} to \mcode{12} or days outside the range of the specified month will be ignored. Otherwise
+% malformed dates or date ranges may produce obscure error messages or unexpected results.
+%
+%
+%
+% \section{\env{timechart} environment}
+% \label{sec:timechart-env}
+%
+% \begin{function}{timechart}
+% \begin{syntax}
+% \cs{begin}\texttt{\{}\env{timechart}\texttt{\}}\oarg{options}\marg{start}\marg{finish}
+% \meta{content}
+% \cs{end}\texttt{\{}\env{timechart}\texttt{\}}
+% \end{syntax}
+% This is the main environment for creating a chronological chart. The mandatory arguments \meta{start} and
+% \meta{finish} specify the first and last years of the chart. These can be dates with circa indicators (that is, they
+% satisfy \meta{cdate} in the grammar in \fullref{Section}{sec:dates-and-ranges}), but the circa specifier has no
+% effect and only the `year' part of the date is used. The optional argument \meta{options} supplies PGF keys that
+% apply to the entire chart.
+%
+% The \meta{content} comprises commands like \cs{timechartinterval}, \cs{timecharttext}, \cs{timechartspace},
+% commands for positioning, as described in \fullref{Section}{sec:within}, and the user's own \TikZ\ code.
+% \end{function}
+%
+%
+%
+% \subsection{General configuration of the \env{timechart} environment}
+%
+% \begin{describekey}{/timechart/width}{dimension}{\cs{textwidth}}
+% The width of the chart. This refers to the width of the grid and axis of the chart, not
+% including intervals that pass beyond the specified limits of the chart, or axis labels that protrude beyond the
+% width of the axis itself.
+% \end{describekey}
+%
+%
+% \begin{describekey}{/timechart/tolerance}{dimension}{5pt}
+% The length by which an interval is allowed to pass beyond the limits of the chart before it `counts' as doing so
+% and the appropriate indicator is drawn.
+% \end{describekey}
+%
+%
+% \begin{describekey}{/timechart/beyond length}{dimension}{5pt}
+% The length of the indicator that an interval passes beyond the limits of the chart.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/beyond x radius}{dimension}{4pt}
+% The horizontal radius of the concave part of the indicator that an interval passes beyond the limits of the chart.
+% (The vertical radius will be half the thickness of the bar.)
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/ystep}{dimension}{-10pt}
+% The default length (positive or negative) by which the current \(y\) coordinate is automatically adjusted after each
+% interval, text, or space is placed.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/minor tick interval}{number}{10}
+% The number of years (which must be positive) between each minor tick on the axis.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/major tick interval}{number}{50}
+% The number of years (which must be positive) between each major tick on the axis and each vertical line in the grid.
+% \end{describekey}
+%
+%
+%
+% \subsection{Grid configuration}
+%
+% \begin{describekey}{/timechart/no grid}{}{}
+% Do not draw the grid.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/grid top ysep}{dimension}{3pt}
+% Distance between the top of the grid and the topmost interval or space.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/grid bottom ysep}{dimension}{3pt}
+% Distance between the bottom of the grid and the bottommost interval or space.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/grid}{style}{empty}
+% Style for drawing the grid.
+% \end{describekey}
+%
+%
+%
+% \subsection{Axis configuration}
+%
+% \begin{describekey}{/timechart/no axis}{}{}
+% Do not draw the axis.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/axis line}{style}{\keyval{line cap}{rect}}
+% Style for drawing the axis line.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/minor tick}{style}{empty}
+% Style for drawing minor ticks.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/minor tick length}{dimension}{1.5mm}
+% Length of minor ticks.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/major tick}{style}{empty}
+% Style for drawing major ticks.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/major tick length}{dimension}{3mm}
+% Length of major ticks.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/major tick label}{style}{as described below}
+% Style for labels on the major ticks on the axis. The intial style essentially sets \keyval{inner sep}{0},
+% \keyval{outer sep}{0}, \keyval{anchor}{mid west}, \keyval{rotate}{90}.
+% \end{describekey}
+%
+%
+%
+% \section{Within the \env{timechart} environment}
+% \label{sec:within}
+%
+%
+%
+%
+% \subsection{Intervals}
+% \label{subsec:intervals}
+%
+% \begin{function}{\timechartinterval}
+% \begin{syntax}
+% \cs{timechartinterval}\oarg{options}\marg{start}\marg{finish}\marg{label}
+% \end{syntax}
+% This command creates an interval in the chart at the current \(y\) coordinate between the specified \meta{start} and
+% \meta{finish}, with the given \meta{label}. These arguments are mandatory. Each of \meta{start} and \meta{finish}
+% can be either a year or a range of years, possibly with circa markers. That is, each must satisfy
+% \meta{cyear-or-crange} in the grammar in \fullref{Section}{sec:dates-and-ranges}.
+%
+% The optional argument \meta{options} specifies PGF keys within \key{/timechart/} that are applied locally to the
+% interval.
+%
+% The current \(y\) coordinate will be adjusted according to \key{/timechart/ystep} unless \key{/timechart/no
+% autostep} has been set.
+% \end{function}
+%
+%
+%
+% \subsubsection{Interval configuration}
+%
+% \begin{describekey}{/timechart/no autostep}{}{}
+% Do not automatically alter the current \(y\) coordinate by the amount specified in \key{/timechart/ystep}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/ref}{label}{none}
+% Make the interval label a hyperlink to the position labelled by \meta{label}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/mark}{comma-separated list of years}{empty}
+% Draw marks in the interval at the years contained in the list. Each entry in the list must be a definite year (that
+% is, must satisfy \meta{year} in the grammar in \fullref{Section}{sec:dates-and-ranges}). The colour of marks can be
+% specified using \key{/timechart/interval mark color}. \key{/timechart/marks} is a synonym for this key.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/circa uncertainty}{number}{3}
+% Treat a circa indicator \mcode{c} as indicating an uncertainity of \(\pm\meta{number}\).
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval minimum width}{dimension}{1pt}
+% Ensure that any interval has a width of at least \meta{dimension}. This is useful to ensure that a single event is
+% visible in the chart.
+%
+% If an interval is specified with start and finish ranges, and with \keyval{start range}{fade} and \keyval{finish
+% range}{fade}, then the `certain' portion of the interval will also have width at least \meta{dimension}. (This
+% restriction prevents a common rendering error where start and finish fadings around a `certain' interval of length
+% \(0\) would not quite meet.)
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval bar color}{color}{black}
+% Fill the interval bar with \meta{color}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval bar thickness}{dimension}{8pt}
+% Set the vertical thickness of the interval bar to \meta{dimension}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval bar node name}{string}{bar node}
+% Set the name of the node containing the interval bar to \meta{string}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval mark color}{color}{gray}
+% Draw marks using \meta{color}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval label}{style}{empty}
+% Style to apply to an interval label.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval label centered}{style}{as below}
+% Style to apply to an interval label placed centrally. Initially, this style executes the style
+% \key{/timechart/interval label} and sets \keyval{text}{white}. The reason for a separate style for centred labels is
+% that often a contrasting colour will be required. For instance, labels positioned to the left and right may be
+% black, but if the bar is black, a centred label should be a light colour.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval label centered background}{style}{as below}
+% Style to apply to the `background' interval label placed centrally. Initially, this style executes
+% \key{/timechart/interval label}. The `background' interval label is simply the usual label and is placed in the same
+% location, but on a layer behind the bar and, unlike the label itself, is not clipped. The reason for this style is
+% that if the bar is narrow, part of the label text (such as ascenders and/or descenders) may naturally extend beyond
+% the bar itself and it may be useful that thse should appear in a different colour.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval label baseline}{dimension}{-3pt}
+% Position the baseline of the interval label \meta{dimension} below the current \(y\) coordinate (which is the
+% midpoint of the interval bar).
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval label pos}{position}{left}
+% Specify where to place the label relative to the interval bar: \meta{position} may be \val{left}, \val{center}, or
+% \val{right}. The position \val{center} places the label at the midpoint of \emph{the visible segment of the solid
+% part} of the interval bar (that is, not including fading at the start or finish of the bar, and not including part
+% of the bart that would extend beyond the bounds of the chart). Further, a centred label is clipped to the size of
+% the bar and a unclipped `background' copy of it is drawn behind the bar, so that the portion appearing `on' and
+% `outside' the bar can have different styles. (See the keys \key{/timechart/interval label centered} and
+% \key{/timechart/interval label centered background}.)
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/interval label node name}{string}{label node}
+% Set the name of the node containing the interval label to \meta{string}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/start range}{range-type}{fade}
+% Type of indication of the range where an interval may start. \meta{range-type} can be \val{fade}, which produces an
+% indicator like \timechartlegendstartrange[legend item width=8mm], or \val{slant}, which produces
+% \timechartlegendstartrange[legend item width=8mm,start range=slant].
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/finish range}{range-type}{fade}
+% Type of indication of the range where an interval may finish. \meta{range-type} can be \val{fade}, which produces an
+% indicator like \timechartlegendfinishrange[legend item width=8mm], or \val{slant}, which produces
+% \timechartlegendfinishrange[legend item width=8mm,finish range=slant].
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/fade minimum width}{dimension}{0pt}
+% No start or finish range indicator of type \val{fade} will be drawn if it is smaller than \meta{dimension}. Using
+% this key is sometimes necessary because, under certain limited circumstances, a very narrow fading can cause
+% PGF/\TikZ\ to produce a \texttt{dimension too large} error.
+% \end{describekey}
+%
+%
+%
+% \subsection{Text}
+% \label{subsec:text}
+%
+% \begin{function}{\timecharttext}
+% \begin{syntax}
+% \cs{timecharttext}\oarg{options}\marg{year}\marg{text}
+% \end{syntax}
+% Place \meta{text} in the time chart at the current \(y\) coordinate and at the horizontal position of \meta{year},
+% which must be a definite year (that is, must satsify \meta{year} in the grammar in
+% \fullref{Section}{sec:dates-and-ranges}).
+%
+% The optional argument \meta{options} specifies PGF keys within \key{/timechart/} that are applied locally.
+%
+% The current \(y\) coordinate will be adjusted according to \key{/timechart/ystep} unless \key{/timechart/no
+% autostep} has been set.
+% \end{function}
+%
+%
+%
+% \subsubsection{Text configuration}
+%
+% \begin{describekey}{/timechart/text node name}{string}{text node}
+% Set the name of the node containing the text to \meta{string}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/text}{style}{empty}
+% Style to apply to the text.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/text baseline}{dimension}{-3pt}
+% Position the baseline of the text \meta{dimension} below the current \(y\) coordinate.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/text pos}{position}{left}
+% Specify where to place the label relative to the given \meta{year}: \meta{position} may be \val{left}, \val{center},
+% or \val{right}.
+% \end{describekey}
+%
+%
+%
+% \subsection{Space}
+%
+% \begin{function}{\timechartspace}
+% \begin{syntax}
+% \cs{timechartspace}\oarg{options}
+% \end{syntax}
+% Create a space in the time chart at the current \(y\) coordinate, with the same effect on vertical spacing as an
+% interval. More precisely, the current \(y\) coordinate will be adjusted according to \key{/timechart/ystep} unless
+% \key{/timechart/no autostep} has been set.
+%
+% The optional argument \meta{options} specifies PGF keys within \key{/timechart/} that are applied locally.
+% \end{function}
+%
+%
+%
+% \subsection{Positioning}
+% \label{subsec:positioning}
+%
+% The commands \cs{timechartinterval}, \cs{timecharttext}, and \cs{timechartspace} all act at the current \(y\)
+% coordinate and change its value according to \key{/timechart/ystep} (unless \key{/timechart/no autostep} is used).
+% There are several functions to set the current \(y\) coordinate and to have it reset automatically.
+%
+% \begin{function}{\timechartsety}
+% \begin{syntax}
+% \cs{timechartsety}\marg{dimension}
+% \end{syntax}
+% Set the current \(y\) coordinate to \meta{dimension}.
+% \end{function}
+%
+% \begin{function}{\timechartsavey}
+% \begin{syntax}
+% \cs{timechartsavey}
+% \end{syntax}
+% Save the current \(y\) coordinate. If \cs{timechartresety} is used, the \(y\) coordinate resets to the last saved
+% \(y\) coordinate. If the current \(y\) coordinate exceeds the minimum or maximum set by
+% \cs{timechartsetyminimumautoreset} and \cs{timechartsetymaximumautoreset}, it will be reset to the last saved \(y\)
+% coordinate.
+% \end{function}
+%
+% \begin{function}{\timechartresety}
+% \begin{syntax}
+% \cs{timechartresety}
+% \end{syntax}
+% Reset the \(y\) coordinate to the last coordinate saved using \cs{timechartsavey}, or to \(0\) if there has been no
+% use of \cs{timechartsavey} within the current \env{timechart} environment.
+% \end{function}
+%
+% \begin{function}{\timechartsetyminimumautoreset, \timechartsetymaximumautoreset}
+% \begin{syntax}
+% \cs{timechartsetyminimumautoreset}\marg{min-coordinate}
+% \cs{timechartsetymaximumautoreset}\marg{max-coordinate}
+% \end{syntax}
+% Set \(y\) coordinates that automatically trigger \cs{timechartresety} if the current \(y\) coordinate goes below
+% \meta{min-coordinate} or above \meta{max-coordinate}.
+% \end{function}
+%
+% \begin{function}{\timechartstepy}
+% \begin{syntax}
+% \cs{timechartstepy}\oarg{count}
+% \end{syntax}
+% Manually step the current \(y\) coordinate by \meta{count} times the value of \key{/timechart/ystep}. The default
+% value of \meta{count} is 1. (The \key{/timechart/no autostep} does not affect \cs{timechartstepy}.)
+% \end{function}
+%
+%
+%
+% \subsection{Completion}
+%
+% \begin{function}{\timechartfinish}
+% Signal that the chart is complete and that the grid and axis should be drawn (unless the keys \key{/timechart/no
+% grid} and/or \key{/timechart/no axis} have been used). It is not necessary to use this command: if it is not given,
+% the grid and axis will be drawn at the end of the \env{timechart} environment. But after this command, the \TikZ\
+% nodes \texttt{grid} and \texttt{axis} are available, containing (respectively) the grid and the axis. These can be
+% used in for further \TikZ\ drawing.
+%
+% Note that after \cs{timechartfinish}, none of the various \cs{timechart}\ldots\ commands are available inside that
+% \env{timechart} environment.
+% \end{function}
+%
+%
+%
+% \subsection{Shortcut keys}
+%
+% \begin{describekey}{/timechart/left}{}{}
+% Equivalent to setting \key{/timechart/interval label pos} and \key{/timechart/text pos} to \val{left}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/center}{}{}
+% Equivalent to setting \key{/timechart/interval label pos} and \key{/timechart/text pos} to \val{center}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/right}{}{}
+% Equivalent to setting \key{/timechart/interval label pos} and \key{/timechart/text pos}{right} to \val{right}.
+% \end{describekey}
+%
+%
+%
+% \section{Era indicators}
+% \label{sec:era-indicators}
+%
+% \begin{function}{\timechartmakebeforeyear,\timechartmakeafteryear}
+% \begin{syntax}
+% \cs{timechartmakebeforeyear}\marg{number}
+% \cs{timechartmakeafteryear}\marg{number}
+% \end{syntax}
+% Typeset \meta{number} (which should be a positive whole number) as a year before or after the epoch. By default,
+% \cs{timechartmakebeforeyear}\marg{number} produces \timechartmakebeforeyear{\meta{number}} and
+% \cs{timechartmakeafteryear}\marg{number} produces \timechartmakeafteryear{\meta{number}}.
+%
+% These commands are used for axis labels and can be re-defined by the user. For example, if \textsc{bc}/\textsc{ad}
+% is preferred to \textsc{bce}/\textsc{ce}, the user can define
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\renewcommand*{\timechartmakebeforeyear}[1]{#1~\textsc{bc}}
+\renewcommand*{\timechartmakeafteryear}[1]{\textsc{ad}~#1}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+% Similarly, if \textsc{ah}/\textsc{bh} is preferred, the user can define
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\renewcommand*{\timechartmakebeforeyear}[1]{#1~\textsc{bh}}
+\renewcommand*{\timechartmakeafteryear}[1]{\textsc{ah}~#1}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+% \end{function}
+%
+%
+%
+% \section{Legend}
+% \label{sec:keys}
+%
+% \pkg{timechart} supplies a number of auxiliary macros for creating a legend to explain, for example the significance
+% of different colours of intervals. For example, \fullref{Figure}{fig:example1-legend} shows a suitable legend for
+% \fullref{Figure}{fig:example1}.
+%
+% \begin{figure}[t]
+% \centering
+% \input{timechart-example1-legend.tex}
+% \caption{Example legend for the timechart shown in \fullref{Figure}{fig:example1}.}
+% \label{fig:example1-legend}
+% \end{figure}
+%
+% The \cs{timechartlength}\ldots\ macros are \emph{not} meant to be used inside a \env{timechart} environment, but in
+% locations such as running text or a \env{tabular} environment.
+%
+% \begin{function}{\timechartlegenditem}
+% \begin{syntax}
+% \cs{timechartlegenditem}\oarg{options}
+% \end{syntax}
+% Draw a bar suitable for use in a legend. \meta{options} specifies PGF keys that are applied within
+% \key{/timechart}. The same PGF keys that affect interval bars affect the drawn bar, as do the keys listed below.
+% \end{function}
+%
+% \begin{function}{\timechartlegendstartrange, \timechartlegendfinishrange}
+% \begin{syntax}
+% \cs{timechartlegendstartrange}\oarg{options}
+% \cs{timechartlegendfinishrange}\oarg{options}
+% \end{syntax}
+% Draw a bar suitable for use in a legend, with a start or finish range. \meta{options} specifies PGF keys that are
+% applied within \key{/timechart/}. The same PGF keys that affect interval bars affect the drawn bar, as do the
+% keys listed below.
+% \end{function}
+%
+% \begin{describekey}{/timechart/legend item width}{dimension}{9mm}
+% When using macros \cs{timechartlegenditem}, \cs{timechartlegendstartrange}, or \cs{timechartlegendfinishrange}, draw
+% a bar of total width \meta{dimension}.
+% \end{describekey}
+%
+% \begin{describekey}{/timechart/legend item range width}{dimension}{3mm}
+% When using \cs{timechartlegendstartrange} or \cs{timechartlegendfinishrange}, draw a bar with a range of width
+% \meta{dimension}.
+% \end{describekey}
+%
+%
+%
+% \section{Usage notes}
+%
+% \subsection{Additional \TikZ\ code}
+%
+% The \env{timechart} environment is a \env{tikzpicture}. The user can add any \TikZ\ code before, between, or after
+% content created using the \cs{timechart}\ldots\ commands. Each use of \cs{timechartinterval} defines two nodes. One,
+% by default named \val{bar node}, contains the interval bar; the other, by default named \val{label node}, contains the
+% interval label. Similarly, text added using \cs{timecharttext} is contained in a node, by default named \val{text
+% node}. (The default names are re-used, but can be changed using the keys \key{/timechart/interval bar node name},
+% \key{/timechart/interval label node name}, and \key{/timechart/text node name}.) The user can use these nodes to
+% position extra content.
+%
+% If the \cs{timechartcomplete} command is used (after which the \cs{timechart}\ldots\ commands are no longer available
+% within the \env{timechart} environment) the nodes \mcode{grid} and \mcode{axis}, which contain the grid and the axis,
+% are also available.
+%
+%
+%
+% \subsection{\texorpdfstring{`year zero'}{year zero}}
+%
+% Although calendars typically do not admit a `year zero' (for instance, \timechartmakebeforeyear{1} is immediately
+% followed by \timechartmakeafteryear{1}, with no intervening `year zero'), \pkg{timechart} does allow \val{0} for the
+% \meta{start} or \meta{finish} of the \env{timechart} environment or as the \meta{start} or \meta{finish} of
+% \cs{timechartinterval} or the \meta{year} of \cs{timecharttext}. But `year zero' is indicated on the axis by a special
+% epoch marker showing the last year before and first year after the epoch.
+%
+%
+%
+% \subsection{\texorpdfstring{\texttt{dimension too large}}{dimension too large} error}
+%
+% Under certain limited circumstances, a very narrow fading can cause PGF/\TikZ\ to produce a \texttt{dimension too
+% large} error. This error can be triggered by a range of type \val{fade} at the start or end of an interval when the
+% range is small compared to the width of the chart. In this case, the fading is unlikely to be visible, so one can
+% simply set \key{/timechart/fade minimum width} to a suitable small positive value, which will stop the fading from
+% being drawn and so prevent the error.
+%
+%
+%
+% \section{Appendix: full example source}
+% \label{sec:full-example}
+%
+% This section contains the necessary source code to produce the example timechart and legend shown in
+% \fullref{Figures}{fig:example1} and \ref{fig:example1-legend} on pages \pageref{fig:example1} and
+% \pageref{fig:example1-legend}.
+%
+%
+%
+% \subsection{Setup source}
+%
+% \lstinputlisting{timechart-example1-setup.tex}
+%
+%
+%
+% \subsection{Timechart source}
+%
+% \lstinputlisting[breaklines=true]{timechart-example1-timechart.tex}
+%
+%
+%
+% \subsection{Legend source}
+%
+% \lstinputlisting{timechart-example1-legend.tex}
+%
+%
+%
+% \end{documentation}
+%
+%
+%
+% \begin{implementation}
+%
+% \setcounter{secnumdepth}{7}
+%
+%
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+%<@@=timechart>
+% \end{macrocode}
+%
+%
+%
+% \subsection{Coding standard}
+%
+% This package makes extensive use of \pkg{pgfmath} computations. The usual \pkg{expl3} standard of ending variables
+% with a type indicator (\texttt{\_bool}, \texttt{\_int}, etc.) is therefore adapted as follows:
+% \begin{itemize}
+% \item[\texttt{\_year}] Stores a year, which could in principle be fractional.
+% \item[\texttt{\_pgf}] Stores a length calculated by \pkg{pgfmath}. (Unlike \texttt{\_dim}, there is no underlying
+% dimension register.)
+% \item[\texttt{\_x}] Stores a raw \(x\) coordinate (not in \TikZ's XY-coordinate system).
+% \item[\texttt{\_y}] Stores a raw \(y\) coordinate (not in \TikZ's XY-coordinate system).
+% \item[\texttt{\_text}] Stores text (not an \pkg{expl3} string).
+% \end{itemize}
+%
+%
+%
+% \subsection{Initial set-up}
+%
+% Package identification/version information.
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[2020-02-02]
+\ProvidesExplPackage{timechart}{2025-02-15}{0.51}
+ {Typesetting chronological charts}
+% \end{macrocode}
+%
+%
+%
+% \subsection{Load TikZ}
+%
+% \begin{macrocode}
+\RequirePackage{tikz}
+% \end{macrocode}
+% In the remainder of the package, only a limited subset of \TikZ\ is used, and PGF code is preferred. For PGF keys, it
+% is necessary to use \texttt{\textasciitilde} in place of a space.
+%
+%
+%
+% \subsection{Scratch variables}
+%
+% \begin{macro}{\l_@@_tmpa_bool,\l_@@_tmpb_bool,\l_@@_tmpc_bool,\l_@@_tmpd_bool}
+% Scratch boolean variables.
+% \begin{macrocode}
+\bool_new:N\l_@@_tmpa_bool
+\bool_new:N\l_@@_tmpb_bool
+\bool_new:N\l_@@_tmpc_bool
+\bool_new:N\l_@@_tmpd_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_tmpa_dim,\l_@@_tmpb_dim,\l_@@_tmpc_dim,\l_@@_tmpd_dim}
+% Scratch dimension variables, reusing \cs{l_tmpa_dim} and \cs{l_tmpb_dim} with uniform names.
+% \begin{macrocode}
+\cs_set_eq:NN\l_@@_tmpa_dim\l_tmpa_dim
+\cs_set_eq:NN\l_@@_tmpb_dim\l_tmpb_dim
+\dim_new:N\l_@@_tmpc_dim
+\dim_new:N\l_@@_tmpd_dim
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Generic auxiliary functions}
+%
+% \begin{macro}{\@@_make_ref:NN}
+% Make hyperreference from text, if the supplied target is non-empty.
+% \begin{arguments}
+% \item Reference for hyperlink target, or empty.
+% \item Text.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn\@@_make_ref:NN #1#2
+ {
+ \str_if_empty:NTF #1
+ { #2 }
+ { \hyperref[#1]{#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{PGF auxiliary functions}
+%
+% \begin{macro}{@@_pgfmathsetbool:nn}
+% Set an \pkg{expl3} boolean variable to the outcome of a \pkg{pgfmath} comparison. This macro is simply a wrapper
+% around \cs{pgfmathsetmacro} using \mcode{ifthenelse} and returning the boolean literal true or false.
+% \begin{macrocode}
+\cs_new:Npn\@@_pgfmathsetbool:nn #1#2
+ {
+ \pgfmathsetmacro{#1}{ifthenelse(#2,"\c_true_bool","\c_false_bool")}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_if_equal:nnF}%
+% Use \pkg{pgfmath} to check whether \param{1} and \param{2} are equal. If not, execute \param{3}.
+% \begin{macrocode}
+\cs_new:Npn\@@_if_equal:nnF #1#2#3
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}{#1==#2}
+ \bool_if:NF\l_@@_tmpa_bool{#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_pgfextractxy:nnn}
+% Extract coordinates of \param{3} (a PGF point) to dimension variables \param{1} and \param{2}. This macro simply
+% combines the functionality of \cs{pgfextractx} and \cs{pgfextracty}.
+% \begin{macrocode}
+\cs_new:Npn\@@_pgfextractxy:nnn #1#2#3
+ {
+ \pgf@process{#3}
+ #1=\pgf@x\relax
+ #2=\pgf@y\relax
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_hsmash_pgfnode:nnnnn}
+% Do the same as \cs{pgfnode} but only update the bounding box `vertically'.
+% \begin{macrocode}
+\cs_new:Npn\@@_hsmash_pgfnode:nnnnn #1#2#3#4#5
+ {
+ \pgfinterruptboundingbox
+ \pgfnode{#1}{#2}{#3}{#4}{#5}
+ \pgfcoordinate
+ {@@_tmpa_coord}
+ {\pgfpointanchor{current~bounding~box}{south}}
+ \pgfcoordinate
+ {@@_tmpb_coord}
+ {\pgfpointanchor{current~bounding~box}{north}}
+ \endpgfinterruptboundingbox
+ \pgfextractx
+ {\l_@@_tmpa_dim}
+ {\pgfpointanchor{@@_tmpa_coord}{center}}
+ \pgfextractx
+ {\l_@@_tmpb_dim}
+ {\pgfpointanchor{@@_tmpb_coord}{center}}
+ \pgfpathmoveto{\pgfpoint{\l_@@_tmpa_dim}{0}}
+ \pgfpathmoveto{\pgfpoint{\l_@@_tmpb_dim}{0}}
+ \pgfusepath{discard}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_make_rectangle_node:nnnn}
+% Make a node with south west corner \param{1}, north east corner \param{2}, and name \param{3}. \param{1} and
+% \param{2} should be given as PGF points. \param{4} is a boolean literal indicating whether the path should be
+% stroked.
+% \begin{macrocode}
+\cs_new:Npn\@@_make_rectangle_node:nnnn #1#2#3#4
+ {
+ \group_begin:
+ \@@_pgfextractxy:nnn
+ {\l_@@_tmpa_dim}{\l_@@_tmpb_dim}{#1}
+ \@@_pgfextractxy:nnn
+ {\l_@@_tmpc_dim}{\l_@@_tmpd_dim}{#2}
+ \pgftransformshift{#1}
+ \pgfset{
+ minimum~width=\l_@@_tmpc_dim-\l_@@_tmpa_dim,
+ minimum~height=\l_@@_tmpd_dim-\l_@@_tmpb_dim,
+ inner~sep=0,
+ outer~sep=0,
+ }
+ \bool_if:NTF #4
+ { \pgfnode{rectangle}{south~west}{}{#3}{\pgfusepath{draw}} }
+ { \pgfnode{rectangle}{south~west}{}{#3}{\pgfusepath{discard}} }
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_left_nonclip_x,\l_@@_right_nonclip_x}
+% In order to clip `only on one side', define coordinates for specifying the `other side' of the clipping path.
+% \begin{macrocode}
+\pgfmathsetmacro{\l_@@_left_nonclip_x}{-16000pt}
+\pgfmathsetmacro{\l_@@_right_nonclip_x}{16000pt}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_style_line_width:nn}
+% Set macro \param{1} to be the line width set by the PGF style \param{2}. Note that \cs{begingroup} and \cs{endgroup}
+% are used here because of the definition of \cs{pgfmathsmuggle}.
+% \begin{macrocode}
+\cs_new:Npn\@@_set_style_line_width:nn #1#2
+ {
+ \begingroup
+ \tikzset{#2}
+ \pgfmathsetlengthmacro{#1}{\pgflinewidth}
+ \pgfmathsmuggle #1
+ \endgroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{PGF keys}
+%
+% All PGF keys for this package are under \key{/timechart/}.
+% \begin{macrocode}
+\pgfkeys{
+ /timechart/.cd,
+% \end{macrocode}
+% Keys applicable to whole chart.
+% \begin{macrocode}
+ width/.initial=\textwidth,
+ tolerance/.initial=5pt,
+ beyond~length/.initial=5pt,
+ beyond~x~radius/.initial=4pt,
+ ystep/.initial=-10pt,
+ minor~tick~interval/.initial=10,
+ major~tick~interval/.initial=50,
+% \end{macrocode}
+% Keys applicable to the grid.
+% \begin{macrocode}
+ no~grid/.code = { \bool_set_false:N\l_@@_grid_bool },
+ grid~top~ysep/.initial={3pt},
+ grid~bottom~ysep/.initial={3pt},
+ grid/.style={},
+% \end{macrocode}
+% Keys applicable to the axis.
+% \begin{macrocode}
+ no~axis/.code = { \bool_set_false:N\l_@@_axis_bool },
+ axis~line/.style={
+ line~cap=rect,
+ },
+ axis~ysep/.initial=3pt,
+ minor~tick/.style={},
+ minor~tick~length/.initial=1.5mm,
+ major~tick/.style={},
+ major~tick~length/.initial=3mm,
+ major~tick~label/.style={
+ inner~sep=0,
+ outer~sep=0,
+ anchor=mid~west,
+ rotate=90,
+ },
+% \end{macrocode}
+% Keys applicable to intervals, texts, spaces, and legends.
+% \begin{macrocode}
+ no~autostep/.code = { \bool_set_false:Nz\l_@@_autostep_bool },
+ ref/.initial={},
+ mark/.initial={},
+ marks/.forward~to=/timechart/mark,
+ circa~uncertainty/.initial=3,
+ interval~minimum~width/.initial=1pt,
+ interval~bar~color/.initial=black,
+ interval~bar~thickness/.initial=8pt,
+ interval~bar~node~name/.initial = {bar~node},
+ interval~mark~color/.initial=gray,
+ interval~label/.style={},
+ interval~label~centered/.style={/timechart/interval~label,text=white},
+ interval~label~centered~background/.style={/timechart/interval~label},
+ interval~label~baseline/.initial=-3pt,
+ interval~label~pos/.is~choice,
+ interval~label~pos/left/.code
+ = { \int_set:Nn\l_@@_label_pos_int{0} },
+ interval~label~pos/center/.code
+ = { \int_set:Nn\l_@@_label_pos_int{1} },
+ interval~label~pos/right/.code
+ = { \int_set:Nn\l_@@_label_pos_int{2} },
+ interval~label~node~name/.initial = {label~node},
+ start~range/.is~choice,
+ start~range/fade/.code
+ = { \int_set:Nn\l_@@_start_range_type_int{0} },
+ start~range/slant/.code
+ = { \int_set:Nn\l_@@_start_range_type_int{1} },
+ finish~range/.is~choice,
+ finish~range/fade/.code
+ = { \int_set:Nn\l_@@_finish_range_type_int{0} },
+ finish~range/slant/.code
+ = { \int_set:Nn\l_@@_finish_range_type_int{1} },
+ fade~minimum~width/.initial = 0pt,
+% \end{macrocode}
+% Keys applicable only to texts.
+% \begin{macrocode}
+ text~node~name/.initial = {text~node},
+ text/.style={},
+ text~baseline/.initial=-3pt,
+ text~pos/.is~choice,
+ text~pos/left/.code = { \int_set:Nn\l_@@_text_pos_int{0} },
+ text~pos/center/.code = { \int_set:Nn\l_@@_text_pos_int{1} },
+ text~pos/right/.code = { \int_set:Nn\l_@@_text_pos_int{2} },
+% \end{macrocode}
+% Keys applicable only to legends.
+% \begin{macrocode}
+ legend~item~width/.initial=9mm,
+ legend~item~range~width/.initial=3mm,
+% \end{macrocode}
+% Shortcuts for positioning.
+% \begin{macrocode}
+ left/.code = {
+ \int_set:Nn\l_@@_label_pos_int{0}
+ \int_set:Nn\l_@@_text_pos_int{0}
+ },
+ center/.code = {
+ \int_set:Nn\l_@@_label_pos_int{1}
+ \int_set:Nn\l_@@_text_pos_int{1}
+ },
+ right/.code = {
+ \int_set:Nn\l_@@_label_pos_int{2}
+ \int_set:Nn\l_@@_text_pos_int{2}
+ },
+}
+% \end{macrocode}
+%
+% \begin{macro}{\l_@@_grid_bool}
+% Boolean indicating whether the grid will be drawn. This variable is by default true but can be set false via the
+% \key{/timechart/no grid} PGF key.
+% \begin{macrocode}
+\bool_new:N\l_@@_grid_bool
+\bool_set_true:N\l_@@_grid_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_axis_bool}
+% Boolean indicating whether the axis will be drawn. This variable is by default true but can be set false via the
+% \key{/timechart/no axis} PGF key.
+% \begin{macrocode}
+\bool_new:N\l_@@_axis_bool
+\bool_set_true:N\l_@@_axis_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_autostep_bool}
+% Boolean indicating whether to automatically step the \(y\) coordinate after an interval, text, or space. This
+% variable is by default true but can be set false via the \key{/timechart/no autostep} PGF key.
+% \begin{macrocode}
+\bool_new:N\l_@@_autostep_bool
+\bool_set_true:N\l_@@_autostep_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_label_pos_int}
+% An integer to hold the interval label position. This is set via the \key{/timechart/interval label pos} PGF key.
+% \begin{macrocode}
+\int_new:N \l_@@_label_pos_int
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_text_pos_int}
+% An integer to hold the text position. This is set via the \key{/timechart/text pos} PGF key.
+% \begin{macrocode}
+\int_new:N \l_@@_text_pos_int
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_start_range_type_int,\l_@@_finish_range_type_int}
+% Integers to hold the type of the start/end ranges. These are set via the \key{/timechart/start range} and
+% \key{/timechart/finish range} PGF keys.
+% \begin{macrocode}
+\int_new:N \l_@@_start_range_type_int
+\int_new:N \l_@@_finish_range_type_int
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Main environment}
+%
+% \begin{macro}{timechart}
+% The main environment.
+% \begin{arguments}
+% \item PGF keys to apply.
+% \item Start year.
+% \item End year.
+% \end{arguments}
+% \begin{macrocode}
+\NewDocumentEnvironment{timechart}{ O{} m m }
+ { \@@_main_begin:nnn{#1}{#2}{#3} }
+ { \@@_main_end: }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_main_begin:nnn}
+% This command uses values specified by PGF keys to make some necessary calculations to begin the chart.
+% \begin{macrocode}
+\cs_new:Npn \@@_main_begin:nnn #1#2#3
+ {
+% \end{macrocode}
+% Process the supplied PGF keys and retrieve values that affect the chart as a whole.
+% \begin{macrocode}
+ \pgfkeys{
+ /timechart/.cd,
+ #1,
+ width/.get=\l_@@_width_pgf,
+ tolerance/.get=\l_@@_tolerance_pgf,
+ ystep/.get=\l_@@_ystep_pgf,
+ grid~top~ysep/.get=\l_@@_grid_top_ysep_pgf,
+ grid~bottom~ysep/.get=\l_@@_grid_bottom_ysep_pgf,
+ beyond~length/.get=\l_@@_beyond_length_pgf,
+ beyond~x~radius/.get=\l_@@_beyond_x_radius_pgf,
+ minor~tick~interval/.get=\l_@@_minor_tick_interval_year,
+ major~tick~interval/.get=\l_@@_major_tick_interval_year,
+ }
+% \end{macrocode}
+% Start the \TikZ\ picture and set up the necessary layers.
+% \begin{macrocode}
+ \tikzpicture
+ \pgfdeclarelayer{grid}
+ \pgfdeclarelayer{labelbg}
+ \pgfsetlayers{grid,labelbg,main}
+% \end{macrocode}
+% Store the line width of the grid and axis, treating them as \qty{0}{\point} if they are disabled.
+% \begin{macrocode}
+ \bool_if:NTF\l_@@_grid_bool
+ {
+ \@@_set_style_line_width:nn
+ {\l_@@_grid_line_width}
+ {/timechart/grid}
+ }
+ { \pgfmathsetlengthmacro{\l_@@_grid_line_width}{0} }
+ \bool_if:NTF\l_@@_axis_bool
+ {
+ \@@_set_style_line_width:nn
+ {\l_@@_axis_line_width}
+ {/timechart/axis~line}
+ \@@_set_style_line_width:nn
+ {\l_@@_major_tick_line_width}
+ {/timechart/major~tick}
+ \@@_set_style_line_width:nn
+ {\l_@@_minor_tick_line_width}
+ {/timechart/minor~tick}
+ }
+ {
+ \pgfmathsetlengthmacro{\l_@@_axis_line_width}{0}
+ \pgfmathsetlengthmacro{\l_@@_major_tick_line_width}{0}
+ \pgfmathsetlengthmacro{\l_@@_minor_tick_line_width}{0}
+ }
+% \end{macrocode}
+% Store the start and finish years (ignoring circa, month, day), and then set up the conversion from years to \(x\)
+% coordinates. \cs{l_@@_x} is the \(x\)-distance corresponding to one year, and \mcode{yeartox} is the \pkg{pgfmath}
+% function that does the conversion.
+% \begin{macrocode}
+ \@@_parse_date:NNn\l_tmpa_bool\l_@@_start_year{#2}
+ \@@_parse_date:NNn\l_tmpa_bool\l_@@_finish_year{#3}
+ \pgfmathsetmacro{\l_@@_start_year}
+ {floor(\l_@@_start_year)}
+ \pgfmathsetmacro{\l_@@_finish_year}
+ {floor(\l_@@_finish_year)}
+ \pgfmathsetmacro{\l_@@_x}
+ {
+ (
+ \l_@@_width_pgf
+ - max(
+ \l_@@_grid_line_width,
+ \l_@@_axis_line_width,
+ \l_@@_major_tick_line_width,
+ \l_@@_minor_tick_line_width
+ )
+ )/(\l_@@_finish_year-\l_@@_start_year)
+ }
+ \pgfkeys{
+ /pgf/declare~function={
+ yeartox(\n)=\l_@@_x*(\n-\l_@@_start_year);
+ },
+ }
+% \end{macrocode}
+% Calculate the start and finish \(x\) coordinates.
+% \begin{macrocode}
+ \pgfmathsetmacro{\l_@@_start_x}
+ {yeartox(\l_@@_start_year)}
+ \pgfmathsetmacro{\l_@@_finish_x}
+ {yeartox(\l_@@_finish_year)}
+ \pgfmathsetmacro{\l_@@_start_tolerance_x}{
+ \l_@@_start_x-(\l_@@_tolerance_pgf)
+ }
+ \pgfmathsetmacro{\l_@@_finish_tolerance_x}{
+ \l_@@_finish_x+(\l_@@_tolerance_pgf)
+ }
+ \pgfmathsetmacro{\l_@@_start_beyond_x}{
+ \l_@@_start_x-(\l_@@_beyond_length_pgf)
+ }
+ \pgfmathsetmacro{\l_@@_finish_beyond_x}{
+ \l_@@_finish_x+(\l_@@_beyond_length_pgf)
+ }
+% \end{macrocode}
+% Set up tracking of current \(y\) coordinate.
+% \begin{macrocode}
+ \pgfmathsetmacro{\l_@@_current_y}{0}
+ \pgfmathsetmacro{\l_@@_saved_y}{0}
+ \pgfmathsetmacro{\l_@@_auto_reset_minimum_y}{-16000pt}
+ \pgfmathsetmacro{\l_@@_auto_reset_maximum_y}{16000pt}
+% \end{macrocode}
+% Calculate some years used in loops.
+% \begin{macrocode}
+ \pgfmathsetmacro{\l_@@_start_plus_year}{
+ \l_@@_start_year+\l_@@_minor_tick_interval_year
+ }
+ \pgfmathsetmacro{\l_@@_start_plusplus_year}{
+ \l_@@_start_year+(2*\l_@@_minor_tick_interval_year)
+ }
+ \pgfmathsetmacro{\l_@@_end_minus_year}{
+ \l_@@_finish_year-\l_@@_minor_tick_interval_year
+ }
+% \end{macrocode}
+% Begin a group and make available the user commands \cs{timechart}\ldots. (The group will be ended by
+% \cs{@@_main_end_user:}.)
+% \begin{macrocode}
+ \group_begin:
+ \cs_set_eq:NN\timechartinterval\@@_interval_user:Ommm
+ \cs_set_eq:NN\timecharttext\@@_text_user:Omm
+ \cs_set_eq:NN\timechartspace\@@_space_user:O
+ \cs_set_eq:NN\timechartsety\@@_set_y_user:m
+ \cs_set_eq:NN\timechartsavey\@@_save_y_user:
+ \cs_set_eq:NN\timechartresety\@@_reset_y_user:
+ \cs_set_eq:NN\timechartsetyminimumautoreset
+ \@@_set_y_minimum_auto_reset_user:m
+ \cs_set_eq:NN\timechartsetymaximumautoreset
+ \@@_set_y_maximum_auto_reset_user:m
+ \cs_set_eq:NN\timechartstepy\@@_step_y_user:O
+ \cs_set_eq:NN\timechartfinish\@@_main_end_user:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_main_end:}
+% Make sure the chart is complete and end the \TikZ\ picture. \cs{@@_main_end_user:} ends the group begun by
+% \cs{@@_main_begin:nnn}, so whether the user has \emph{not} called it (as \cs{timechartfinish}) is equivalent to it
+% being equal to \cs{timechartfinish}.
+% \begin{macrocode}
+\cs_new:Npn\@@_main_end:
+ {
+ \cs_if_eq:NNT\timechartfinish\@@_main_end_user:
+ { \@@_main_end_user: }
+ \endtikzpicture
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_main_end_user:}
+% End the group begun by \cs{@@_main_begin:nnn}, draw the axis and grid, and set the bounding box. This macro is made
+% available as \cs{timechartfinish} inside the \env{timechart} environment.
+% \begin{macrocode}
+\cs_new:Npn\@@_main_end_user:
+ {
+% \end{macrocode}
+% The aim here is to set the bounding box (1) to fit horizontally the axis \emph{not} including labels and the grid
+% and (2) to fit vertically the axis including labels and the grid . All the `horizonatal' data is already known, and
+% the `vertical' data is determined by the \emph{current} bounding box. So extract the `vertical' data and then reset
+% the bounding box.
+% \begin{macrocode}
+ \pgfextracty{\l_@@_tmpa_dim}
+ { \pgfpointanchor{current~bounding~box}{south} }
+ \pgfextracty{\l_@@_tmpb_dim}
+ { \pgfpointanchor{current~bounding~box}{north} }
+ \pgfresetboundingbox
+% \end{macrocode}
+% If the timechart is empty, then the extracted \(y\) coordinates of `north' and `south' anchors of the bounding box
+% will be \qty{-16000}{\point} and \qty{16000}{\point} respectively. Test for this and treat them as both having \(y\)
+% coordinate \qty{0}{\point} in this case.
+% \begin{macrocode}
+ \dim_compare:nNnTF{\l_@@_tmpa_dim}>{\l_@@_tmpb_dim}
+ {
+ \pgfmathsetmacro{\l_@@_content_bottom_y}{0pt}
+ \pgfmathsetmacro{\l_@@_content_top_y}{0pt}
+ }
+ {
+ \pgfmathsetmacro{\l_@@_content_bottom_y}
+ {\l_@@_tmpa_dim}
+ \pgfmathsetmacro{\l_@@_content_top_y}
+ {\l_@@_tmpb_dim}
+ }
+% \end{macrocode}
+% Now draw the grid and axis if necessary and set the bounding box if not.
+% \begin{macrocode}
+ \bool_if:NTF{\l_@@_grid_bool}
+ {
+ \@@_grid_draw:
+ \pgfmathsetmacro{\l_@@_axis_y}
+ {
+ \l_@@_content_top_y
+ + \l_@@_grid_top_ysep_pgf
+ + \pgfkeysvalueof{/timechart/axis~ysep}
+ }
+ }
+ {
+ \@@_nogrid_bounding_box_set:
+ \pgfmathsetmacro{\l_@@_axis_y}
+ {
+ \l_@@_content_top_y
+ +\pgfkeysvalueof{/timechart/axis~ysep}
+ }
+ }
+ \bool_if:NT{\l_@@_axis_bool}
+ { \@@_axis_draw: }
+% \end{macrocode}
+% Finally, end the group begun by \cs{@@_main_begin:nnn}.
+% \begin{macrocode}
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Grid drawing}
+%
+% \begin{macro}{\@@_grid_draw:}
+% Draw the grid of the chart, assuming that the \(y\) coordinates of the top and bottom of the content have
+% been calculated and stored in \cs{l_@@_content_top_y} and \cs{l_@@_content_bottom_y}.
+% \begin{macrocode}
+\cs_new:Npn\@@_grid_draw:
+ {
+ \pgfmathsetmacro{\l_@@_grid_bottom_y}{
+ \l_@@_content_bottom_y-\l_@@_grid_bottom_ysep_pgf
+ }
+ \pgfmathsetmacro{\l_@@_grid_top_y}{
+ \l_@@_content_top_y+\l_@@_grid_top_ysep_pgf
+ }
+ \pgfonlayer{ grid }
+ \scope[/timechart/grid]
+ \foreach \year in {
+ \l_@@_start_plus_year,
+ \l_@@_start_plusplus_year,
+ ...,
+ \l_@@_end_minus_year
+ } {
+ \group_begin:
+% \end{macrocode}
+% Only draw gridlines at major ticks.
+% \begin{macrocode}
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}
+ { Mod(\year,\l_@@_major_tick_interval_year)==0 }
+ \bool_if:NT\l_@@_tmpa_bool
+ {
+ \pgftransformshift{ \pgfpoint{yeartox(\year)}{0} }
+ \pgfpathmoveto{ \pgfpoint{0}{\l_@@_grid_top_y} }
+ \pgfpathlineto{ \pgfpoint{0}{\l_@@_grid_bottom_y} }
+ \pgfusepath{ draw }
+ }
+ \group_end:
+ }
+% \end{macrocode}
+% Define and draw the grid node.
+% \begin{macrocode}
+ \@@_make_rectangle_node:nnnn
+ { \pgfpoint{\l_@@_start_x}{\l_@@_grid_bottom_y} }
+ { \pgfpoint{\l_@@_finish_x}{\l_@@_grid_top_y} }
+ { grid }
+ { \c_true_bool }
+ \endscope
+ \endpgfonlayer
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Axis drawing}
+%
+% \begin{macro}{\@@_axis_draw:}
+% Draw the axis, with large/small ticks and labels on appropriate years, assuming that the \(y\) coordinate has been
+% calculated and stored in \cs{l_@@_axis_y}.
+% \begin{macrocode}
+\cs_new:Npn\@@_axis_draw:
+ {
+ \group_begin:
+ \pgfkeys{
+ /timechart/minor~tick~length/.get=\@@_minor_tick_length_pgf,
+ /timechart/major~tick~length/.get=\@@_major_tick_length_pgf,
+ }
+% \end{macrocode}
+% Shift to the \(y\) coordinate of the axis line.
+% \begin{macrocode}
+ \pgftransformshift{ \pgfpoint{0}{\l_@@_axis_y} }
+% \end{macrocode}
+% Work out the first and last years which will have a major tick (since these are marked with the era).
+% \begin{macrocode}
+ \pgfmathsetmacro{\@@_start_major_tick_year}
+ {
+ \l_@@_start_year
+ -Mod(
+ \l_@@_start_year,
+ \l_@@_major_tick_interval_year
+ )
+ }
+ \pgfmathsetmacro{\@@_start_major_tick_year}
+ {
+ ifthenelse(
+ \@@_start_major_tick_year<\l_@@_start_year,
+ \@@_start_major_tick_year
+ +\l_@@_major_tick_interval_year,
+ \@@_start_major_tick_year
+ )
+ }
+ \pgfmathsetmacro{\@@_finish_major_tick_year}
+ {
+ \l_@@_finish_year
+ -Mod(
+ \l_@@_finish_year,
+ \l_@@_major_tick_interval_year
+ )
+ }
+% \end{macrocode}
+% Loop over years and draw the appropriate ticks.
+% \begin{macrocode}
+ \foreach \year in {
+ \l_@@_start_year,
+ \l_@@_start_plus_year,
+ ...,
+ \l_@@_finish_year
+ } {
+ \pgfmathsetmacro{\x}{yeartox(\year)}
+ \@@_pgfmathsetbool:nn
+ {\l_@@_tmpa_bool}
+ { Mod(\year,\l_@@_major_tick_interval_year)==0 }
+ \bool_if:NTF\l_@@_tmpa_bool
+ { \@@_axis_draw_labelled_major_tick:NN\x\year }
+ { \@@_axis_draw_minor_tick:N\x }
+ }
+ \@@_draw_axis_line
+% \end{macrocode}
+% Define the axis node.
+% \begin{macrocode}
+ \pgfextracty{\l_@@_tmpa_dim}
+ { \pgfpointanchor{current~bounding~box}{north} }
+ \@@_make_rectangle_node:nnnn
+ { \pgfpoint{\l_@@_start_x}{0} }
+ { \pgfpoint{\l_@@_finish_x}{\l_@@_tmpa_dim} }
+ { axis }
+ { \c_false_bool }
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% All the remaining axis-related macros (which begin \cs{@@_axis_draw_}) assume that a transformation has been applied
+% so that the axis line is at \(y=0\).
+%
+% \begin{macro}{\@@_axis_draw_minor_tick:N}
+% Draw an unlabelled tick at \(x\) coordinate \param{1}.
+% \begin{macrocode}
+\cs_new:Npn\@@_axis_draw_minor_tick:N #1
+ {
+ \scope[/timechart/minor~tick]
+ \pgfpathmoveto{ \pgfpoint{#1}{0} }
+ \pgfpathlineto{ \pgfpoint{#1}{\@@_minor_tick_length_pgf} }
+ \pgfusepath{draw}
+ \endscope
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_axis_draw_labelled_major_tick:NN}
+% Draw a labelled major tick at \(x\) coordinate \param{1}, with label for year \param{2}, using the special epoch
+% marker if the year is 0, and showing the era if and only if the year is for the first or last major tick. This macro
+% assumes that \cs{@@_start_major_tick_year} and \cs{@@_finish_major_tick_year} have been calculated.
+% \begin{macrocode}
+\cs_new:Npn\@@_axis_draw_labelled_major_tick:NN #1#2
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}{#2==0}
+ \bool_if:NTF \l_@@_tmpa_bool
+ { \@@_axis_draw_zero_tick:N #1 }
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpb_bool}
+ { #2==\@@_start_major_tick_year }
+ \@@_pgfmathsetbool:nn{\l_@@_tmpc_bool}
+ { #2==\@@_finish_major_tick_year }
+ \bool_set:Nn\l_@@_tmpd_bool
+ { \l_@@_tmpb_bool || \l_@@_tmpc_bool }
+ \@@_axis_draw_major_tick:N #1
+ \@@_axis_draw_year_label:nnnnnn
+ { #1 }
+ { #2 }
+ { \l_@@_tmpd_bool }
+ { mid~west }
+ { 0 }
+ { \@@_major_tick_length_pgf+1mm }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_axis_draw_major_tick:N}
+% Draw a major tick at \(x\) coordinate \param{1}.
+% \begin{macrocode}
+\cs_new:Npn\@@_axis_draw_major_tick:N #1
+ {
+ \scope[/timechart/major~tick]
+ \pgfpathmoveto{ \pgfpoint{#1}{0} }
+ \pgfpathlineto{ \pgfpoint{#1}{\@@_major_tick_length_pgf} }
+ \pgfusepath{draw}
+ \endscope
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_axis_draw_zero_tick:N}
+% Draw a special (labelled) tick for year zero at \(x=\param{1}\).
+% \begin{macrocode}
+\cs_new:Npn\@@_axis_draw_zero_tick:N #1
+ {
+ \group_begin:
+ \pgftransformshift{ \pgfpoint{#1}{0} }
+% \end{macrocode}
+% The mark is a cross made up of four arcs and the miter joins between them. The parameter \cs{r} is the arc radius.
+% The parameter \cs{a} is how many degrees should be trimmed from the start/end of a quarter-circle to form each arc.
+% Thus the length of the miter is dependent on \cs{a}.
+% \begin{macrocode}
+ \pgfmathsetmacro{\a}{5}
+ \pgfmathsetlengthmacro{\r}{1mm}
+ \pgfmathsetlengthmacro{\t}{\r*(cos(\a)-cos(90-\a))/(1-cos(90-\a))}
+% \end{macrocode}
+% The drawing process is: move to the start of the tick, draw the tick, draw the four arcs, then draw a small part of
+% the tick again. The last step is not mathematically necessary for a smooth join, but ensures that the join
+% \emph{appears} smooth.
+% \begin{macrocode}
+ \scope[/timechart/major~tick,line~join=miter]
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathlineto{\pgfpoint{0}{\@@_major_tick_length_pgf}}
+ \pgfpatharc{0}{90-\a}{\t~and~\r}
+ \pgfpatharc{270+\a}{360-\a}{\r}
+ \pgfpatharc{180+\a}{270-\a}{\r}
+ \pgfpatharc{90+\a}{180-\a}{\t~and~\r}
+ \pgfpathlineto{\pgfpoint{0}{\@@_major_tick_length_pgf-1pt}}
+ \pgfusepath{draw}
+ \endscope
+% \end{macrocode}
+% There is no year 0, so label the zero mark with the 1 before and 1 after the epoch.
+% \begin{macrocode}
+ \@@_axis_draw_year_label:nnnnnn
+ { 0 }
+ { -1 }
+ { \c_true_bool }
+ { base~west }
+ { -.5mm }
+ { 5.5mm }
+ \@@_axis_draw_year_label:nnnnnn
+ { 0 }
+ { 1 }
+ { \c_true_bool }
+ { north~west }
+ { .5mm }
+ { 5.5mm }
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_axis_draw_line}
+% Draw the axis line itself.
+% \begin{macrocode}
+\cs_new:Npn\@@_draw_axis_line
+ {
+ \scope[/timechart/axis~line]
+ \pgfpathmoveto{ \pgfpoint{\l_@@_start_x}{0} }
+ \pgfpathlineto{ \pgfpoint{\l_@@_finish_x}{0} }
+ \pgfusepath{draw}
+ \endscope
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_axis_draw_year_label:nnnnnn}
+% Draw a year label.
+% \begin{arguments}
+% \item \(x\) coordinate.
+% \item Year for label.
+% \item Boolean literal indicating whether the era should be shown.
+% \item Anchor for node.
+% \item \(x\) offset (dimension).
+% \item \(y\) offset (dimension).
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn\@@_axis_draw_year_label:nnnnnn #1#2#3#4#5#6
+ {
+ \group_begin:
+ \pgftransformshift{ \pgfpoint{#1+#5}{#6} }
+ \pgfmathtruncatemacro{\absyear}{ abs(#2) }
+ \scope[/timechart/major~tick~label]
+ \bool_if:NTF #3
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}{#2<0}
+ \bool_if:NTF\l_@@_tmpa_bool
+ { \cs_set_eq:NN\@@_make_year:n\timechartmakebeforeyear }
+ { \cs_set_eq:NN\@@_make_year:n\timechartmakeafteryear }
+ \@@_hsmash_pgfnode:nnnnn
+ {rectangle}
+ {#4}
+ {\@@_make_year:n{\absyear}}
+ {}
+ {}
+ }
+ { \pgfnode{rectangle}{#4}{\absyear}{}{} }
+ \endscope
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\timechartmakebeforeyear,\timechartmakeafteryear}
+% User-redefineable macros to format a year as before or after the epoch.
+% \begin{macrocode}
+\cs_new:Npn\timechartmakebeforeyear #1
+ {
+ #1\nobreakspace\textsc{bce}
+ }
+\cs_new:Npn\timechartmakeafteryear #1
+ {
+ #1\nobreakspace\textsc{ce}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Bounding box}
+%
+% \begin{macro}{\@@_nogrid_bounding_box_set:}
+% Set the bounding box when no grid is being drawn.
+% \begin{macrocode}
+\cs_new:Npn\@@_nogrid_bounding_box_set:
+ {
+ \pgfpathmoveto
+ { \pgfpoint{\l_@@_start_x}{\l_@@_content_bottom_y} }
+ \pgfpathmoveto
+ { \pgfpoint{\l_@@_finish_x}{\l_@@_content_top_y} }
+ \pgfusepath{discard}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Positioning}
+%
+% \begin{macro}{\@@_set_y_user:m}
+% Set current \(y\) coordinate to \param{1}. This macro will be made available as \cs{timechartsety} in the
+% \env{timechart} environment.
+% \begin{macrocode}
+\cs_new:Npn\@@_set_y_user:m #1
+ {
+ \pgfmathsetmacro{\l_@@_current_y}{#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_save_y_user:}
+% Save the current \(y\) coordinate. This macro will be made available as \cs{timechartsavey} in the
+% \env{timechart} environment.
+% \begin{macrocode}
+\cs_new:Npn\@@_save_y_user:
+ {
+ \pgfmathsetmacro{\l_@@_saved_y}{\l_@@_current_y}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_reset_y_user:}
+% Set the current \(y\) coordinate to the last saved coordinate. This macro will be made available as
+% \cs{timechartsresety} in the \env{timechart} environment.
+% \begin{macrocode}
+\cs_new:Npn\@@_reset_y_user:
+ {
+ \pgfmathsetmacro{\l_@@_current_y}{\l_@@_saved_y}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_y_minimum_auto_reset_user:m}
+% Set a \(y\) coordinate below which \cs{@@_step_y_user:} will automatically reset the currrent \(y\) coordinate to
+% the last saved \(y\) coordinate. This macro will be made available as \cs{timechartssetyminimumautoreset} in the
+% \env{timechart} environment.
+% \begin{macrocode}
+\cs_new:Npn\@@_set_y_minimum_auto_reset_user:m #1
+ {
+ \pgfmathsetmacro{\l_@@_auto_reset_minimum_y}{#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_y_maximum_auto_reset_user:m}
+% Set a \(y\) coordinate above which \cs{@@_step_y_user:} will automatically reset the currrent \(y\) coordinate to
+% the last saved \(y\) coordinate. This macro will be made available as \cs{timechartssetymaximumautoreset} in the
+% \env{timechart} environment.
+% \begin{macrocode}
+\cs_new:Npn\@@_set_y_maximum_auto_reset_user:m #1
+ {
+ \pgfmathsetmacro{\l_@@_auto_reset_maximum_y}{#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_step_y_user:O}
+% Increment the current \(y\) coordinate by \param{1} times the length specified in \key{/timechart/ystep}. This
+% macro will be made available as \cs{timechartstepy} in the \env{timechart} environment.
+% \begin{macrocode}
+\NewDocumentCommand{\@@_step_y_user:O}{ O{1} }
+ {
+ \pgfmathsetmacro{\l_@@_current_y}
+ {\l_@@_current_y+#1*\l_@@_ystep_pgf}
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}
+ {
+ or(
+ \l_@@_current_y<\l_@@_auto_reset_minimum_y,
+ \l_@@_current_y>\l_@@_auto_reset_maximum_y
+ )
+ }
+ \bool_if:nT{\l_@@_tmpa_bool}
+ { \pgfmathsetmacro{\l_@@_current_y}{\l_@@_saved_y)} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Bounds checking}
+%
+% \begin{macro}{\@@_if_x_in_bounds:nT}%
+% Check if \(x\) coordinate \param{1} is (strictly) within the bounds of the chart; if so, execute \param{2}.
+% \begin{macrocode}
+\cs_new:Npn\@@_if_x_in_bounds:nT #1#2
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}{
+ and(
+ #1>=\l_@@_start_x,
+ #1<=\l_@@_finish_x
+ )
+ }
+ \bool_if:NT\l_@@_tmpa_bool
+ {#2}
+ }
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_if_x_in_tolerance_bounds_x:nT}%
+% Check if \(x\) coordinate \param{1} is within the specified tolerance of the bounds of the chart; if so, execute
+% \param{2}.
+% \begin{macrocode}
+\cs_new:Npn\@@_if_x_in_tolerance_bounds:nT #1#2
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}{
+ and(
+ #1>=\l_@@_start_tolerance_x,
+ #1<=\l_@@_finish_tolerance_x
+ )
+ }
+ \bool_if:NT\l_@@_tmpa_bool{#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_if_x_range_intersect_tolerance_bounds_x:nnT}%
+% Check if the range between \(x\) coordinates \param{1} and \param{2} intersects the range of the bounds of the chart
+% plus the specified tolerance; if so, execute \param{3}.
+% \begin{macrocode}
+\cs_new:Npn\@@_if_x_range_intersect_tolerance_bounds:nnT #1#2#3
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}{
+ or(
+ or(
+ and(
+ #2>=\l_@@_start_tolerance_x,
+ #2<=\l_@@_finish_tolerance_x
+ ),
+ and(
+ #1>=\l_@@_start_tolerance_x,
+ #1<=\l_@@_finish_tolerance_x
+ )
+ ),
+ and(
+ #1<\l_@@_start_tolerance_x,
+ #2>\l_@@_finish_tolerance_x
+ )
+ )
+ }
+ \bool_if:NT\l_@@_tmpa_bool
+ {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Date and date range parsing}
+%
+% \begin{macro}{\@@_parse_date_or_daterange:NNNNNn}
+% Parse the text in \param{6}, which should represent a date or date range, into parameters \param{1}--\param{5}.
+% \begin{arguments}
+% \item range indicator boolean variable.
+% \item minimum circa indicator boolean variable.
+% \item minimum variable.
+% \item maximum circa indicator boolean variable.
+% \item maximum variable.
+% \item text to parse.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn\@@_parse_date_or_daterange:NNNNNn #1#2#3#4#5#6
+{
+ \bool_set:Nn #1 {\@@_is_nondaterange_p:w #6/\q_stop}
+ \bool_set_inverse:N #1
+ \bool_if:nTF #1
+ { \@@_parse_range:w #2#3#4#5\q_mark #6\q_stop }
+ {
+ \@@_parse_date:NNn #2#3{#6}
+ \bool_set_eq:NN #4#2
+ \pgfmathsetmacro{#5}{#3}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_is_nondaterange_p:w}
+% To be called in the form \cs{@@_is_nondaterange_p:w}\meta{text}\texttt{/}\cs{q_stop}. Return boolean true if and
+% only if \meta{text} (known to be either a date or date range) contains a range marker.
+% \begin{macrocode}
+\cs_new:Npn\@@_is_nondaterange_p:w #1/#2\q_stop
+{
+ \tl_if_empty_p:n{#2}
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@@_parse_range:w}
+% To be called in the form
+% \cs{@@_parse_range:w}\meta{cmin}\meta{min}\meta{cmax}\meta{max}\cs{q_mark}\meta{text}\cs{q_stop}. Parse \meta{text}
+% (known to represent a date range) into minimum circa indicator boolean variable \meta{cmin}, minimum variable
+% \meta{min}, maximum circa indicator boolean variable \meta{cmax}, maximum variable \meta{max}.
+% \begin{macrocode}
+\cs_new:Npn\@@_parse_range:w #1#2#3#4\q_mark #5/#6\q_stop
+{
+ \_@@_parse_date:NNn #1#2{#5}
+ \_@@_parse_date:NNn #3#4{#6}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_parse_date:NNn}
+% Parse text (known to represent a date) into the supplied variables. Parameters \param{1} and \param{2} are the
+% variables for (respectively) circa indicator boolean and date, and \param{3} is the text to be parsed:
+% \begin{arguments}
+% \item circa indicator boolean variable.
+% \item date variable.
+% \item text to parse.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn\@@_parse_date:NNn #1#2#3
+{
+ \bool_set:Nn #1 { \@@_is_circa_p:w #3c\q_stop }
+ \bool_if:NTF #1
+ { \@@_parse_circa_date:w #2\q_mark #3\q_stop }
+ { \@@_parse_noncirca_date:Nn #2{#3} }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_is_circa_p:w}
+% To be called in the form \cs{@@_is_circa_p:w}\meta{text}\texttt{c}\cs{q_stop}. Return boolean true if and only if
+% \meta{text} (known to be either a date or a date with a circa indicator) has a circa indicator.
+% \begin{macrocode}
+\cs_new:Npn\@@_is_circa_p:w #1c#2\q_stop
+{
+ \tl_if_empty_p:n{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_parse_circa_date:w}
+% To be called in the form \cs{@@_parse_circa_date:w}\meta{var}\cs{q_mark}\meta{text}\cs{q_stop}. Parse \meta{text}
+% (known to represent a circa date) into the supplied variable. \param{1} is the variable for the date and \param{2}
+% is the text to be parsed.
+% \begin{macrocode}
+\cs_new:Npn\@@_parse_circa_date:w #1\q_mark c#2\q_stop
+{
+ \@@_parse_noncirca_date:Nn #1{#2}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_parse_noncirca_date:w}
+% To be called in the form \cs{@@_parse_noncirca_date:w}\meta{var}\cs{q_mark}\meta{text}\break\cs{q_stop}. Parse
+% \meta{text} (known to represent a non-circa date) into the supplied variable. \param{1} is the variable for the date
+% and \param{2} is the text to be parsed.
+% \begin{macrocode}
+\cs_new:Npn\@@_parse_noncirca_date:Nn #1#2
+{
+ \bool_if:nTF { \@@_is_before_p:w #2-\q_stop }
+ { \@@_parse_before_date:w #1\q_mark #2\q_stop }
+ { \@@_parse_signed_date:w #1\q_mark #2-0-0\q_stop }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_is_before_p:w}
+% To be called in the form \cs{@@_is_before_p:w}\meta{text}\texttt{-}\cs{q_stop}. Return boolean true if and only if
+% \meta{text} (known to be a date without a circa indicator) begins with a \texttt{-}.
+% \begin{macrocode}
+\cs_new:Npn\@@_is_before_p:w #1-#2\q_stop
+{
+ \tl_if_empty_p:n{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_parse_before_date:w}
+% To be called in the form \cs{@@_parse_before_date:w}\meta{var}\cs{q_mark}\meta{text}\cs{q_stop}. Parse \meta{text}
+% (known to represent a date with a leading \texttt{-}) into the supplied variable. \param{1} is the variable for the
+% date and \param{2} is the text to be parsed.
+% \begin{macrocode}
+\cs_new:Npn\@@_parse_before_date:w #1\q_mark-#2\q_stop
+{
+ \@@_parse_signed_date:w #1-\q_mark #2-0-0\q_stop
+}
+% \end{macrocode}
+% \end{macro}
+%
+% Now comes that actual parsing of an ISO-format date \texttt{YYYY-MM-DD}. The following macros serve as lookup tables
+% for the number of days in the \(n\)-th month and the number of days in the year up to the start of the \(n\)-th month.
+% \begin{macrocode}
+\cs_new:cpn{c_@@_year_days_pgf}{365}
+\cs_new:cpn{c_@@_month_days_1_pgf}{31}
+\cs_new:cpn{c_@@_month_days_2_pgf}{28}
+\cs_new:cpn{c_@@_month_days_3_pgf}{31}
+\cs_new:cpn{c_@@_month_days_4_pgf}{30}
+\cs_new:cpn{c_@@_month_days_5_pgf}{31}
+\cs_new:cpn{c_@@_month_days_6_pgf}{30}
+\cs_new:cpn{c_@@_month_days_7_pgf}{31}
+\cs_new:cpn{c_@@_month_days_8_pgf}{31}
+\cs_new:cpn{c_@@_month_days_9_pgf}{30}
+\cs_new:cpn{c_@@_month_days_10_pgf}{31}
+\cs_new:cpn{c_@@_month_days_11_pgf}{30}
+\cs_new:cpn{c_@@_month_days_12_pgf}{31}
+\cs_new:cpn{c_@@_cumulative_days_1_pgf}{0}
+\cs_new:cpn{c_@@_cumulative_days_2_pgf}{31}
+\cs_new:cpn{c_@@_cumulative_days_3_pgf}{59}
+\cs_new:cpn{c_@@_cumulative_days_4_pgf}{90}
+\cs_new:cpn{c_@@_cumulative_days_5_pgf}{120}
+\cs_new:cpn{c_@@_cumulative_days_6_pgf}{151}
+\cs_new:cpn{c_@@_cumulative_days_7_pgf}{181}
+\cs_new:cpn{c_@@_cumulative_days_8_pgf}{212}
+\cs_new:cpn{c_@@_cumulative_days_9_pgf}{243}
+\cs_new:cpn{c_@@_cumulative_days_10_pgf}{273}
+\cs_new:cpn{c_@@_cumulative_days_11_pgf}{304}
+\cs_new:cpn{c_@@_cumulative_days_12_pgf}{334}
+% \end{macrocode}
+%
+% \begin{macro}{\@@_parse_signed_date:w}
+% To be called in the form \cs{@@_parse_positive_date:w}\meta{var}\meta{sign}\cs{q_mark}\break
+% \meta{text}\texttt{-0-0}\cs{q_stop}. Parse \meta{text} (known to represent a non-circa date) into the supplied
+% variable. \param{1} is the variable for the date and \param{2} is possibly \texttt{-}.
+%
+% There is a trick in the parsing:
+% \begin{enumerate}
+% \item If \meta{text} has the form \meta{year}\texttt{-}\meta{month}\texttt{-}\meta{day}, then parameters
+% \param{3}, \param{4}, and \param{5} will be, respectively, \meta{year}, \meta{month}, and
+% \meta{day}\texttt{-0-0}. Thus \param{5} will be evaulated by \pkg{pgfmath} to \meta{day}.
+% \item If \meta{text} has the form \meta{year}\texttt{-}\meta{month}, then parameters \param{3}, \param{4}, and
+% \param{5} will be, respectively, \meta{year}, \meta{month}, and \texttt{0-0}. Thus \param{5} will be
+% evaulated by \pkg{pgfmath} to \(0\).
+% \item If \meta{text} is simply \meta{year}, then parameters \param{3}, \param{4}, and \param{5} will be,
+% respectively, \meta{year}, \texttt{0}, and \texttt{0}.
+% \end{enumerate}
+% \begin{macrocode}
+\cs_new:Npn\@@_parse_signed_date:w #1#2\q_mark #3-#4-#5\q_stop
+{
+ \pgfmathtruncatemacro{\@@_parsed_year_pgf}{#2#3}
+ \pgfmathtruncatemacro{\@@_parsed_month_pgf}{#4}
+ \pgfmathtruncatemacro{\@@_parsed_day_pgf}{#5}
+ \@@_pgfmathsetbool:nn{\l_tmpa_bool}{
+ or(
+ \@@_parsed_month_pgf < 1,
+ \@@_parsed_month_pgf > 12,
+ )
+ }
+ \bool_if:NTF\l_tmpa_bool
+ {
+% \end{macrocode}
+% \textit{Case: no valid month is given.} Use only the year.
+% \begin{macrocode}
+ \pgfmathsetmacro{#1}{#2#3}
+ }
+ {
+% \end{macrocode}
+% \textit{Case: a valid month is given.} Get the number of days in the year, in the month, and in the year up to the
+% month. Then check if the year is a leap year and, if so, make the appropriate adjustments.
+% \begin{macrocode}
+ \cs_set_eq:NN\l_@@_year_days_pgf\c_@@_year_days_pgf
+ \cs_set_eq:Nc\l_@@_month_days_pgf
+ { c_@@_month_days_\@@_parsed_month_pgf _pgf }
+ \cs_set_eq:Nc\l_@@_cumulative_days_pgf
+ { c_@@_cumulative_days_\@@_parsed_month_pgf _pgf }
+ \@@_pgfmathsetbool:nn{\l_tmpa_bool}{
+ or(
+ Mod(\@@_parsed_year_pgf,400) == 0,
+ and(
+ Mod(\@@_parsed_year_pgf,4) == 0,
+ Mod(\@@_parsed_year_pgf,100) != 0
+ )
+ )
+ }
+ \bool_if:NT\l_tmpa_bool
+ {
+ \pgfmathsetmacro{\l_@@_year_days_pgf}
+ { \l_@@_year_days_pgf+1 }
+ \@@_pgfmathsetbool:nn{\l_tmpb_bool}
+ { \@@_parsed_month == 1 }
+ \bool_if:NF\l_tmpb_bool
+ {
+ \@@_pgfmathsetbool:nn{\l_tmpb_bool}
+ { \@@_parsed_month == 2 }
+ \bool_if:NF\l_tmpb_bool
+ {
+ \pgfmathsetmacro{\l_@@_month_days_pgf}
+ { \l_@@_month_days_pgf + 1 }
+ }
+ {
+ \pgfmathsetmacro{\l_@@_cumulative_days_pgf}
+ { \l_@@_cumulative_days_pgf + 1 }
+ }
+ }
+ }
+ \@@_pgfmathsetbool:nn{\l_tmpa_bool}{
+ or(
+ \@@_parsed_day_pgf < 1,
+ \@@_parsed_day_pgf > \l_@@_month_days_pgf,
+ )
+ }
+ \bool_if:NTF\l_tmpa_bool
+ {
+% \end{macrocode}
+% \textit{Sub-case: no valid day is given.} Use only the year and month.
+% \begin{macrocode}
+ \pgfmathsetmacro{#1}
+ {
+ #2#3
+ + \l_@@_cumulative_days_pgf/\l_@@_year_days_pgf
+ }
+ }
+ {
+% \end{macrocode}
+% \textit{Sub-case: a valid day is given.} Use the year, month, and day.
+% \begin{macrocode}
+ \pgfmathsetmacro{#1}
+ {
+ #2#3
+ + (
+ \l_@@_cumulative_days_pgf
+ + \@@_parsed_day_pgf
+ )/\l_@@_year_days_pgf
+ }
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Interval drawing}
+%
+% \subsubsection{Preliminaries}
+%
+% \begin{macro}{
+% \l_@@_start_is_range_bool,
+% \l_@@_startmin_circa_bool,
+% \l_@@_startmax_circa_bool,
+% \l_@@_finish_is_range_bool,
+% \l_@@_finishmin_circa_bool,
+% \l_@@_finishmax_circa_bool,
+% }
+% These boolean variables will be used to hold parsed data for the start and finish of an interval: whether it is a
+% range, whether the beginning of that range is qualified by `circa', and whether the end of that range is qualified
+% by `circa'.
+% \begin{macrocode}
+\bool_new:N\l_@@_start_is_range_bool
+\bool_new:N\l_@@_startmin_circa_bool
+\bool_new:N\l_@@_startmax_circa_bool
+\bool_new:N\l_@@_finish_is_range_bool
+\bool_new:N\l_@@_finishmin_circa_bool
+\bool_new:N\l_@@_finishmax_circa_bool
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Error message definition}
+%
+% \begin{macrocode}
+\msg_new:nnn{timechart}{interval_dates_invalid}
+ { Invalid~interval~dates:~#1~to~#2 }
+% \end{macrocode}
+%
+%
+%
+% \subsubsection{Main macros}
+%
+% \begin{macro}{\@@_interval_user:Ommm}
+% Draw an interval. This macro will be made available as \cs{timechartinterval} inside the \env{timechart}
+% environment.
+% \begin{arguments}
+% \item PGF keys under \key{/timechart/} to apply.
+% \item Start year.
+% \item Finish year.
+% \item Label.
+% \end{arguments}
+% \begin{macrocode}
+\NewDocumentCommand{\@@_interval_user:Ommm}{ O{} m m m }
+ {
+ \group_begin:
+% \end{macrocode}
+% Parse the start and finish dates or date ranges.
+% \begin{macrocode}
+ \@@_parse_date_or_daterange:NNNNNn
+ \l_@@_start_is_range_bool
+ \l_@@_startmin_circa_bool\l_@@_startmin_year
+ \l_@@_startmax_circa_bool\l_@@_startmax_year
+ {#2}
+ \@@_parse_date_or_daterange:NNNNNn
+ \l_@@_finish_is_range_bool
+ \l_@@_finishmin_circa_bool\l_@@_finishmin_year
+ \l_@@_finishmax_circa_bool\l_@@_finishmax_year
+ {#3}
+% \end{macrocode}
+% Check the results of parsing and only proceed if they are valid.
+% \begin{macrocode}
+ \@@_pgfmathsetbool:nn{\l_tmpa_bool}{
+ and(
+ \l_@@_startmin_year <= \l_@@_startmax_year,
+ and(
+ \l_@@_startmax_year <= \l_@@_finishmin_year,
+ \l_@@_finishmin_year <= \l_@@_finishmax_year
+ )
+ )
+ }
+ \bool_if:NTF\l_tmpa_bool
+ {
+ \@@_interval_checked:nn{#1}{#4}
+ \group_end:
+ \bool_if:NT\l_@@_autostep_bool
+ { \@@_step_y_user:O }
+ }
+ {
+ \msg_error:nnnn{timechart}{interval_dates_invalid}{#2}{#3}
+ \group_end:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_interval_checked:nn}
+% Draw an interval using the parsed and checked years or year ranges.
+% \begin{arguments}
+% \item PGF keys under \key{/timechart/} to apply.
+% \item Label.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn \@@_interval_checked:nn #1#2
+ {
+% \end{macrocode}
+% Process keys supplied locally and retrieve the only value needed at this stage.
+% \begin{macrocode}
+ \pgfqkeys{/timechart}{
+ #1,
+ circa~uncertainty/.get=\l_@@_circa_uncertainty_year
+ }
+% \end{macrocode}
+% Do the minimum amount of calculation necessary to check whether any part of interval is visible.
+% \begin{macrocode}
+ \bool_if:NTF\l_@@_startmin_circa_bool
+ {
+ \pgfmathsetmacro{\l_@@_start_extreme_x}
+ { yeartox(\l_@@_startmin_year
+ - \l_@@_circa_uncertainty_year) }
+ }
+ {
+ \pgfmathsetmacro{\l_@@_start_extreme_x}
+ { yeartox(\l_@@_startmin_year) }
+ }
+ \bool_if:NTF\l_@@_finishmax_circa_bool
+ {
+ \pgfmathsetmacro{\l_@@_finish_extreme_x}
+ { yeartox(\l_@@_finishmax_year
+ + \l_@@_circa_uncertainty_year) }
+ }
+ {
+ \pgfmathsetmacro{\l_@@_finish_extreme_x}
+ { yeartox(\l_@@_finishmax_year) }
+ }
+% \end{macrocode}
+% Draw the interval if some part of it is visible.
+% \begin{macrocode}
+ \@@_if_x_range_intersect_tolerance_bounds:nnT
+ {\l_@@_start_extreme_x}{\l_@@_finish_extreme_x}
+ { \@@_draw_visible_interval:nn{#1}{#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{@@_draw_visible_interval:nn}
+% Draw an interval of which some part is known to be visible.
+% \begin{arguments}
+% \item PGF keys
+% \item Label
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn\@@_draw_visible_interval:nn #1#2
+ {
+% \end{macrocode}
+% Retrieve PGF key values.
+% \begin{macrocode}
+ \pgfqkeys{/timechart}{
+ ref/.get=\l_@@_ref_text,
+ mark/.get=\l_@@_mark_text,
+ interval~minimum~width/.get=\l_@@_minimum_width_pgf,
+ interval~bar~color/.get=\l_@@_bar_color,
+ interval~bar~thickness/.get=\l_@@_bar_thickness_pgf,
+ interval~mark~color/.get=\l_@@_mark_color,
+ interval~label~baseline/.get=\l_@@_text_baseline_pgf,
+ interval~label~node~name/.get=\l_@@_interval_label_node_name,
+ }
+% \end{macrocode}
+% Do the remaining calculations.
+% \begin{macrocode}
+ \pgfmathsetlengthmacro{\l_@@_bar_half_thickness_pgf}
+ {.5*\l_@@_bar_thickness_pgf}
+ \cs_set:Npn\l_@@_label_text{#2}
+ \bool_if:NTF\l_@@_startmax_circa_bool
+ {
+ \pgfmathsetmacro{\l_@@_start_definite_x}
+ { yeartox(\l_@@_startmax_year
+ + \l_@@_circa_uncertainty_year) }
+ }
+ {
+ \pgfmathsetmacro{\l_@@_start_definite_x}
+ { yeartox(\l_@@_startmax_year) }
+ }
+ \bool_if:NTF\l_@@_finishmin_circa_bool
+ {
+ \pgfmathsetmacro{\l_@@_finish_definite_x}
+ { yeartox(\l_@@_finishmin_year
+ - \l_@@_circa_uncertainty_year) }
+ }
+ {
+ \pgfmathsetmacro{\l_@@_finish_definite_x}
+ { yeartox(\l_@@_finishmin_year) }
+ }
+% \end{macrocode}
+% It is possible that circa indicators have made \cs{l_@@_start_definite_x} greater than \cs{l_@@_finish_definite_x}.
+% Check for this; if so, set them both to their average.
+% \begin{macrocode}
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}
+ {
+ \l_@@_start_definite_x > \l_@@_finish_definite_x
+ }
+ \bool_if:NT\l_@@_tmpa_bool
+ {
+ \pgfmathsetmacro{\l_@@_start_definite_x}
+ {
+ .5*(
+ \l_@@_start_definite_x
+ + \l_@@_finish_definite_x
+ )
+ }
+ \pgfmathsetmacro{\l_@@_finish_definite_x}
+ { \l_@@_start_definite_x }
+ }
+% \end{macrocode}
+% Calculate whether it is necessary to make an adjustment to ensure that the minimum width requirement is satisfied,
+% and store in \cs{l_@@_tmpa_bool}.
+% \begin{macrocode}
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}
+ {
+ (\l_@@_finish_extreme_x-\l_@@_start_extreme_x)
+ < \l_@@_minimum_width_pgf
+ }
+% \end{macrocode}
+% Calculate whether it is necessary to make an adjustment to prevent a rendering glitch when there are two fadings and
+% a zero-width (or very small) definite part, and store in \cs{l_@@_tmpb_bool}. Note the quick test for both ranges
+% being fadings.
+% \begin{macrocode}
+ \int_if_zero:nTF
+ {
+ \l_@@_start_range_type_int
+ + \l_@@_finish_range_type_int
+ }
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpb_bool}
+ {
+ (
+ \l_@@_finish_definite_x
+ - \l_@@_start_definite_x
+ )
+ < \l_@@_minimum_width_pgf
+ }
+ }
+ { \bool_set_false:N\l_@@_tmpb_bool }
+% \end{macrocode}
+% Make the adjustment if necessary.
+% \begin{macrocode}
+ \bool_if:nT{
+ \l_@@_tmpa_bool || \l_@@_tmpb_bool
+ }{
+ \pgfmathsetmacro{\l_@@_width_adjust}
+ { .5*\l_@@_minimum_width_pgf }
+ \pgfmathsetmacro{\l_@@_start_definite_x}
+ { \l_@@_start_definite_x-\l_@@_width_adjust }
+ \pgfmathsetmacro{\l_@@_finish_definite_x}
+ { \l_@@_finish_definite_x+\l_@@_width_adjust }
+ \pgfmathsetmacro{\l_@@_start_extreme_x}
+ {
+ min(
+ \l_@@_start_extreme_x,
+ \l_@@_start_definite_x
+ )
+ }
+ \pgfmathsetmacro{\l_@@_finish_extreme_x}
+ {
+ max(
+ \l_@@_finish_extreme_x,
+ \l_@@_finish_definite_x
+ )
+ }
+ }
+ \pgfmathsetmacro{\l_@@_start_solid_x}
+ { \l_@@_start_definite_x }
+ \pgfmathsetmacro{\l_@@_finish_solid_x}
+ { \l_@@_finish_definite_x }
+% \end{macrocode}
+% All the data needed to draw the interval are now ready. Shift to the correct vertical coordinate and open a scope for
+% drawing.
+% \begin{macrocode}
+ \pgftransformshift{ \pgfpoint{0}{\l_@@_current_y} }
+ \pgfscope
+% \end{macrocode}
+% First, do the necessary clipping if the interval extends beyond the specified tolerance from the chart, then process
+% the ranges, then draw the solid part of the bar, then do the labelling, then define the node for the bar. Note that
+% ranges wth the `slant' style function by adding a new clipping path and extending the solid part, so that there is
+% only \emph{one} solid rectangle drawn.
+% \begin{macrocode}
+ \@@_interval_beyond_clip:
+ \int_case:nn {\l_@@_start_range_type_int}
+ {
+ {0}{ \@@_interval_start_range_fade: }
+ {1}{ \@@_interval_start_range_slant: }
+ }
+ \int_case:nn {\l_@@_finish_range_type_int}
+ {
+ {0}{ \@@_interval_finish_range_fade: }
+ {1}{ \@@_interval_finish_range_slant: }
+ }
+ \@@_interval_draw_solid:
+ \@@_interval_mark:
+ \@@_interval_define_bar_node:
+ \endpgfscope
+ \@@_interval_label:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Clipping}
+%
+% \begin{macro}{\@@_interval_beyond_clip:}
+% If the interval bar extends beyond the specified tolerance from the chart, clip it appropriately. To avoid repeated
+% computation, use \cs{l_@@_tmpa_bool} and \cs{l_@@_tmpb_bool} to store whether it is necessary to clip on the left
+% and right (respectively). If both are false, there is no need for any clipping.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_beyond_clip:
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}
+ {\l_@@_start_extreme_x<=\l_@@_start_tolerance_x}
+ \@@_pgfmathsetbool:nn{\l_@@_tmpb_bool}
+ {\l_@@_finish_extreme_x>=\l_@@_finish_tolerance_x}
+ \bool_if:nT{ \l_@@_tmpa_bool || \l_@@_tmpb_bool }
+ { \@@_interval_beyond_clip_aux: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_interval_beyond_clip_aux:}
+% This macro does the actual clipping. The clipping path starts at the north-east and proceeds clockwise.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_beyond_clip_aux:
+ {
+ \pgfinterruptboundingbox
+ \bool_if:NTF\l_@@_tmpb_bool
+ {
+ \pgfpathmoveto{
+ \pgfpoint
+ {\l_@@_finish_beyond_x}
+ {\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_finish_beyond_x}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfpatharc
+ {90}
+ {270}
+ {\l_@@_beyond_x_radius_pgf
+ ~and~\l_@@_bar_half_thickness_pgf}
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_finish_beyond_x}
+ {-\l_@@_bar_thickness_pgf}
+ }
+ }
+ {
+ \pgfpathmoveto{
+ \pgfpoint
+ {\l_@@_right_nonclip_x}
+ {\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_right_nonclip_x}
+ {-\l_@@_bar_thickness_pgf}
+ }
+ }
+ \bool_if:NTF\l_@@_tmpa_bool
+ {
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_start_beyond_x}
+ {-\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_start_beyond_x}
+ {-\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfpatharc
+ {-90}
+ {90}
+ {\l_@@_beyond_x_radius_pgf
+ ~and~\l_@@_bar_half_thickness_pgf}
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_start_beyond_x}
+ {\l_@@_bar_thickness_pgf}
+ }
+ }
+ {
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_left_nonclip_x}
+ {-\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_left_nonclip_x}
+ {\l_@@_bar_thickness_pgf}
+ }
+ }
+ \pgfpathclose
+ \pgfusepath{clip}
+ \endpgfinterruptboundingbox
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Fading in/out}
+%
+% Set up the PGF `in' fading.
+% \begin{macrocode}
+\pgfdeclarehorizontalshading{@@_fade_in_shading}{4bp}{
+ color(0bp)=(transparent!100);
+ color(1bp)=(transparent!100);
+ color(3bp)=(transparent!0);
+ color(4bp)=(transparent!0)
+}
+\pgfdeclarefading
+ {@@_fade_in}
+ {\pgfuseshading{@@_fade_in_shading}}
+% \end{macrocode}
+%
+% \begin{macro}{\@@_interval_start_range_fade:}
+% Draw fading to indicate a start range. Because some PDF renderers may otherwise leave a gap between the fade and
+% solid part, compute \cs{l_@@_fade_extra_pgf} and draw this amount of overlap with the solid part. Because of the
+% definition of the `in' fading, \cs{l_@@_fade_extra_pgf} must not exceed half of the fade width. And the overlap
+% should not exceed the actual length of the solid part.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_start_range_fade:
+ {
+ \pgfmathsetlengthmacro{\l_@@_fade_width_pgf}
+ { \l_@@_start_solid_x-\l_@@_start_extreme_x }
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}
+ { \l_@@_fade_width_pgf
+ > \pgfkeysvalueof{/timechart/fade~minimum~width} }
+ \bool_if:NT \l_@@_tmpa_bool
+ {
+ \@@_if_x_range_intersect_tolerance_bounds:nnT
+ {\l_@@_start_extreme_x}{\l_@@_start_solid_x}
+ {
+ \pgfmathsetmacro{\l_@@_fade_extra_pgf}
+ {
+ min(
+ .49*\l_@@_fade_width_pgf,
+ \l_@@_finish_solid_x-\l_@@_start_solid_x
+ )
+ }
+ \pgfscope
+ \pgfpathrectanglecorners{
+ \pgfpoint
+ {\l_@@_start_extreme_x}
+ {-\l_@@_bar_half_thickness_pgf}
+ }{
+ \pgfpoint
+ {\l_@@_start_solid_x+\l_@@_fade_extra_pgf}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfgettransform{\@@_transform_current}
+ \pgfsetfading{@@_fade_in}{
+ \pgfsettransform{\@@_transform_current}
+ \pgftransformshift{
+ \pgfpoint
+ {
+ .5*\l_@@_start_extreme_x
+ +.5*\l_@@_start_solid_x
+ }
+ {0}
+ }
+ \pgftransformxscale{
+ (\l_@@_start_solid_x-\l_@@_start_extreme_x)
+ /2bp
+ }
+ \pgftransformyscale{\l_@@_bar_thickness_pgf/4bp}
+ }
+ \pgfsetfillcolor{\l_@@_bar_color}
+ \pgfusepath{fill}
+ \endpgfscope
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% Set up the PGF `out' fading.
+% \begin{macrocode}
+\pgfdeclarehorizontalshading{@@_fade_out_shading}{4bp}{
+ color(0bp)=(transparent!0);
+ color(1bp)=(transparent!0);
+ color(3bp)=(transparent!100);
+ color(4bp)=(transparent!100)
+}
+\pgfdeclarefading
+ {@@_fade_out}
+ {\pgfuseshading{@@_fade_out_shading}}
+% \end{macrocode}
+%
+% \begin{macro}{\@@_interval_finish_range_fade:}
+% Draw fading to indicate a finish range. As in \cs{@@_interval_start_range_fade:}, a small overlap is computed.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_finish_range_fade:
+ {
+ \pgfmathsetlengthmacro{\l_@@_fade_width_pgf}
+ { \l_@@_finish_extreme_x-\l_@@_finish_solid_x }
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}
+ { \l_@@_fade_width_pgf
+ > \pgfkeysvalueof{/timechart/fade~minimum~width} }
+ \bool_if:NT \l_@@_tmpa_bool
+ {
+ \@@_if_x_range_intersect_tolerance_bounds:nnT
+ {\l_@@_finish_solid_x}{\l_@@_finish_extreme_x}
+ {
+ \pgfmathsetmacro{\l_@@_fade_extra_pgf}
+ {
+ min(
+ .49*\l_@@_fade_width_pgf,
+ \l_@@_finish_solid_x-\l_@@_start_solid_x
+ )
+ }
+ \pgfscope
+ \pgfpathrectanglecorners{
+ \pgfpoint
+ {\l_@@_finish_solid_x-\l_@@_fade_extra_pgf}
+ {-\l_@@_bar_half_thickness_pgf}
+ }{
+ \pgfpoint
+ {\l_@@_finish_extreme_x}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfgettransform{\@@_transform_current}
+ \pgfsetfading{@@_fade_out}{
+ \pgfsettransform{\@@_transform_current}
+ \pgftransformshift{
+ \pgfpoint{
+ .5*\l_@@_finish_solid_x
+ +.5*\l_@@_finish_extreme_x
+ }
+ {0}
+ }
+ \pgftransformxscale{
+ (\l_@@_finish_extreme_x-\l_@@_finish_solid_x)
+ /2bp
+ }
+ \pgftransformyscale{\l_@@_bar_thickness_pgf/4bp}
+ }
+ \pgfsetfillcolor{\l_@@_bar_color}
+ \pgfusepath{fill}
+ \endpgfscope
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Slant in/out}
+%
+% \begin{macro}{\@@_interval_start_range_slant:}
+% Clip and modify \cs{l_@@_start_solid_x} to draw a slanting shape to indicate the start range.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_start_range_slant:
+ {
+ \@@_if_equal:nnF
+ {\l_@@_start_extreme_x}{\l_@@_start_solid_x}
+ {
+ \@@_if_x_range_intersect_tolerance_bounds:nnT
+ {\l_@@_start_extreme_x}{\l_@@_start_solid_x}
+ {
+ \pgfinterruptboundingbox
+ \pgfpathmoveto{
+ \pgfpoint
+ {\l_@@_start_extreme_x}
+ {-\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_start_solid_x}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_start_solid_x}
+ {\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_right_nonclip_x}
+ {\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_right_nonclip_x}
+ {-\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_start_extreme_x}
+ {-\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathclose
+ \pgfusepath{clip}
+ \endpgfinterruptboundingbox
+ \pgfmathsetmacro{\l_@@_start_solid_x}
+ {\l_@@_start_extreme_x}
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_interval_finish_range_slant:}
+% Clip and modify \cs{l_@@_finish_solid_x} to draw a slanting shape to indicate the finish range.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_finish_range_slant:
+ {
+ \@@_if_equal:nnF
+ {\l_@@_finish_solid_x}{\l_@@_finish_extreme_x}
+ {
+ \@@_if_x_range_intersect_tolerance_bounds:nnT
+ {\l_@@_finish_solid_x}{\l_@@_finish_extreme_x}
+ {
+ \pgfinterruptboundingbox
+ \pgfpathmoveto{
+ \pgfpoint
+ {\l_@@_finish_solid_x}
+ {-\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_finish_extreme_x}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_finish_extreme_x}
+ {\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_left_nonclip_x}
+ {\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_left_nonclip_x}
+ {-\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_finish_solid_x}
+ {-\l_@@_bar_thickness_pgf}
+ }
+ \pgfpathclose
+ \pgfusepath{clip}
+ \endpgfinterruptboundingbox
+ \pgfmathsetmacro{\l_@@_finish_solid_x}
+ {\l_@@_finish_extreme_x}
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Solid bar}
+%
+% \begin{macro}{\@@_interval_draw_solid:}
+% Draw the solid part of an interval.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_draw_solid:
+ {
+ \@@_if_x_range_intersect_tolerance_bounds:nnT
+ {\l_@@_start_solid_x}
+ {\l_@@_finish_solid_x}
+ {
+ \pgfpathrectanglecorners{
+ \pgfpoint
+ {\l_@@_start_solid_x}
+ {-\l_@@_bar_half_thickness_pgf}
+ }{
+ \pgfpoint
+ {\l_@@_finish_solid_x}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfsetfillcolor{\l_@@_bar_color}
+ \pgfusepath{fill}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Marks}
+%
+% \begin{macrocode}
+\msg_new:nnn{timechart}{interval_mark_outside}
+ { Attempt~to~mark~outside~interval~at~date~#1 }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_interval_mark:}
+% Draw marks on an interval.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_mark:
+ {
+ \pgfscope
+ \pgfsetstrokecolor{\l_@@_mark_color}
+ \foreach \year in \l_@@_mark_text
+ {
+ \pgfmathsetmacro{\l_@@_mark_x}{yeartox(\year)}
+ \@@_pgfmathsetbool:nn{\l_@@_tmpa_bool}
+ {
+ or (
+ \l_@@_mark_x < \l_@@_start_extreme_x,
+ \l_@@_mark_x > \l_@@_finish_extreme_x
+ )
+ }
+ \bool_if:NT\l_@@_tmpa_bool
+ { \msg_error:nne{timechart}{interval_mark_outside}{\year} }
+ \pgfpathmoveto{
+ \pgfpoint
+ {\l_@@_mark_x}
+ {-\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfpathlineto{
+ \pgfpoint
+ {\l_@@_mark_x}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfusepath{draw}
+ }
+ \endpgfscope
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Bar node}
+%
+% \begin{macro}{\@@_interval_define_bar_node:}
+% Define a node with into which the bar fits exactly.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_define_bar_node:
+ {
+ \@@_make_rectangle_node:nnnn
+ {
+ \pgfpoint
+ {\l_@@_start_extreme_x}
+ {-\l_@@_bar_half_thickness_pgf}
+ }{
+ \pgfpoint
+ {\l_@@_finish_extreme_x}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ {\pgfkeysvalueof{/timechart/interval~bar~node~name}}
+ {\c_false_bool}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Label}
+%
+% \begin{macro}{\@@_interval_label:}
+% Place the label for the item.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_label:
+ {
+ \str_if_empty:NF \l_@@_label_text
+ {
+ \pgfinterruptboundingbox
+ \int_case:nn {\l_@@_label_pos_int}
+ {
+ {0}{ \@@_interval_label_left: }
+ {1}{ \@@_interval_label_center: }
+ {2}{ \@@_interval_label_right: }
+ }
+ \endpgfinterruptboundingbox
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_interval_label_left:}
+% Place the label on the left of the interval.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_label_left:
+ {
+ \@@_if_x_in_bounds:nT{\l_@@_start_extreme_x}
+ {
+ \group_begin:
+ \pgftransformshift{
+ \pgfpoint
+ {\l_@@_start_extreme_x}
+ {\l_@@_text_baseline_pgf}
+ }
+ \node[/timechart/interval~label,anchor=base~east]
+ (\l_@@_interval_label_node_name)
+ at (0,0)
+ {
+ \@@_make_ref:NN
+ \l_@@_ref_text
+ \l_@@_label_text
+ };
+ \group_end:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_interval_label_right:}
+% Place the label on the right of the interval.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_label_right:
+ {
+ \@@_if_x_in_bounds:nT{\l_@@_finish_extreme_x}
+ {
+ \group_begin:
+ \pgftransformshift{
+ \pgfpoint
+ {\l_@@_finish_extreme_x}
+ {\l_@@_text_baseline_pgf}
+ }
+ \node[/timechart/interval~label,anchor=base~west]
+ (\l_@@_interval_label_node_name)
+ at (0,0)
+ {
+ \@@_make_ref:NN
+ \l_@@_ref_text
+ \l_@@_label_text
+ };
+ \group_end:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_interval_label_center:}
+% Place the label at the center of the interval.
+% \begin{macrocode}
+\cs_new:Npn\@@_interval_label_center:
+ {
+ \pgfmathsetlengthmacro{\l_@@_label_anchor_x}
+ {
+ .5*max(\l_@@_start_definite_x,\l_@@_start_x)
+ + .5*min(\l_@@_finish_definite_x,\l_@@_finish_x)
+ }
+% \end{macrocode}
+% First draw the `background label' on the layer below the bar.
+% \begin{macrocode}
+ \group_begin:
+ \pgftransformshift{
+ \pgfpoint
+ {\l_@@_label_anchor_x}
+ {\l_@@_text_baseline_pgf}
+ }
+ \pgfonlayer{labelbg}
+ \node[
+ /timechart/interval~label~centered~background,
+ anchor=base
+ ]
+ at (0,0)
+ { \l_@@_label_text };
+ \endpgfonlayer
+ \group_end:
+% \end{macrocode}
+% Then draw the label on top of the bar, clipping it to the bar outline.
+% \begin{macrocode}
+ \pgfscope
+ \pgfpathrectanglecorners{
+ \pgfpoint
+ {\l_@@_start_extreme_x}
+ {-\l_@@_bar_half_thickness_pgf}
+ }{
+ \pgfpoint
+ {\l_@@_finish_extreme_x}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfusepath{clip}
+ \group_begin:
+ \pgftransformshift{
+ \pgfpoint
+ {\l_@@_label_anchor_x}
+ {\l_@@_text_baseline_pgf}
+ }
+ \node[
+ /timechart/interval~label~centered,
+ anchor=base
+ ]
+ (\l_@@_interval_label_node_name)
+ at (0,0)
+ {
+ \@@_make_ref:NN
+ \l_@@_ref_text
+ \l_@@_label_text
+ };
+ \group_end:
+ \endpgfscope
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Text}
+%
+% \begin{macro}{\@@_text_user:Omm}
+% Place text. This macro will be made available as \cs{timecharttext} inside the \env{timechart} environment.
+% \begin{arguments}
+% \item PGF keys under \key{/timechart/} to apply.
+% \item Year at which to place text.
+% \item Text.
+% \end{arguments}
+% \begin{macrocode}
+\NewDocumentCommand{\@@_text_user:Omm}{ O{} m m }
+ {
+ \str_if_empty:nF{#3}{
+ \group_begin:
+ \pgfmathsetmacro{\l_@@_text_x}{yeartox(#2)}
+ \@@_if_x_in_tolerance_bounds:nT{\l_@@_text_x}
+ {
+% \end{macrocode}
+% Process keys supplied locally and retrieve needed keys.
+% \begin{macrocode}
+ \pgfqkeys{/timechart}{
+ #1,
+ ref/.get=\l_@@_ref_text,
+ text~node~name/.get=\l_@@_node_name_text,
+ text~baseline/.get=\l_@@_text_baseline_pgf,
+ }
+% \end{macrocode}
+% Shift to the correct vertical coordinate and place the text.
+% \begin{macrocode}
+ \pgftransformshift{
+ \pgfpoint{0}{\l_@@_current_y}
+ }
+ \pgfinterruptboundingbox
+ \group_begin:
+ \pgftransformshift{
+ \pgfpoint{\l_@@_text_x}{\l_@@_text_baseline_pgf}
+ }
+ \cs_set:Npn\l_@@_text{#3}
+ \int_case:nn {\l_@@_text_pos_int}
+ {
+ {0}{ \cs_set:Npn\l_@@_node_anchor_text{base~east} }
+ {1}{ \cs_set:Npn\l_@@_node_anchor_text{base} }
+ {2}{ \cs_set:Npn\l_@@_node_anchor_text{base~west} }
+ }
+ \node[/timechart/text,anchor=\l_@@_node_anchor_text]
+ (\l_@@_node_name_text)
+ at (0,0)
+ {
+ \@@_make_ref:NN
+ \l_@@_ref_text
+ \l_@@_text
+ };
+ \group_end:
+ \endpgfinterruptboundingbox
+ }
+ \group_end:
+ }
+% \end{macrocode}
+% Since the text itself does not affect the bounding box, create a space (which will handle the automatic step).
+% \begin{macrocode}
+ \@@_space_user:O[#1]
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Space}
+%
+% \begin{macro}{\@@_space_user:O}
+% Create a vertical space as if there were an interval at the current coordinate. This macro will be made available as
+% \cs{timechartspace} inside the \env{timechart} environment.
+% \begin{macrocode}
+\NewDocumentCommand{\@@_space_user:O}{ O{} }
+ {
+ \group_begin:
+% \end{macrocode}
+% Process keys supplied locally and retreive the one needed value.
+
+% \begin{macrocode}
+ \pgfqkeys{/timechart}{
+ #1,
+ interval~bar~thickness/.get=\l_@@_bar_thickness_pgf,
+ }
+ \pgfmathsetlengthmacro{\l_@@_bar_half_thickness_pgf}
+ { .5*\l_@@_bar_thickness_pgf }
+% \end{macrocode}
+% Shift to the correct vertical coordinate and create the space.
+% \begin{macrocode}
+ \pgftransformshift{
+ \pgfpoint{0}{\l_@@_current_y}
+ }
+ \pgfpathmoveto{
+ \pgfpoint{0}{-\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfpathmoveto{
+ \pgfpoint{0}{\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfusepath{discard}
+ \group_end:
+ \bool_if:NT\l_@@_autostep_bool{
+ \@@_step_y_user:O
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Legends}
+%
+% \begin{macro}{\timechartlegenditem}
+% Draw a bar suitable for use in a legend, applying style in \param{1}.
+% \begin{macrocode}
+\NewDocumentCommand{\timechartlegenditem}{ O{} }
+ {
+ \@@_legend_aux:nn{#1}{
+ \pgfmathsetlengthmacro{\l_@@_start_solid_x}{0}
+ \pgfmathsetlengthmacro{\l_@@_finish_solid_x}
+ {\l_@@_legenditem_width_pgf}
+ \@@_interval_draw_solid:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\timechartlegendstartrange,\timechartlegendfinishrange}
+% Draw a bar with start/finish range, suitable for use in a legend, applying style in \param{1}.
+% \begin{macrocode}
+\NewDocumentCommand{\timechartlegendstartrange}{ O{} }
+ {
+ \@@_legend_aux:nn{#1}{
+ \pgfmathsetlengthmacro{\l_@@_start_extreme_x}{0}
+ \pgfmathsetlengthmacro{\l_@@_start_solid_x}
+ {\pgfkeysvalueof{/timechart/legend~item~range~width}}
+ \pgfmathsetlengthmacro{\l_@@_finish_solid_x}
+ {\l_@@_legenditem_width_pgf}
+ \int_case:nn {\l_@@_start_range_type_int}
+ {
+ {0}{ \@@_interval_start_range_fade: }
+ {1}{ \@@_interval_start_range_slant: }
+ }
+ \@@_interval_draw_solid:
+ }
+ }
+\NewDocumentCommand{\timechartlegendfinishrange}{ O{} }
+ {
+ \@@_legend_aux:nn{#1}{
+ \pgfmathsetlengthmacro{\l_@@_start_solid_x}{0}
+ \pgfmathsetlengthmacro{\l_@@_finish_solid_x}
+ {
+ \l_@@_legenditem_width_pgf
+ -\pgfkeysvalueof{/timechart/legend~item~range~width}
+ }
+ \pgfmathsetlengthmacro{\l_@@_finish_extreme_x}
+ {\l_@@_legenditem_width_pgf}
+ \int_case:nn {\l_@@_finish_range_type_int}
+ {
+ {0}{ \@@_interval_finish_range_fade: }
+ {1}{ \@@_interval_finish_range_slant: }
+ }
+ \@@_interval_draw_solid:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_legend_aux:nn}
+% Auxiliary command for legend items. Draw a \TikZ\ picture, applying PGF keys \param{1} under \key{/timechart/}
+% and using \TikZ\ code \param{2}.
+% \begin{macrocode}
+\cs_new:Npn\@@_legend_aux:nn #1#2
+ {
+ \tikzpicture
+% \end{macrocode}
+% Process supplied PGF keys and retrieve only those necessary.
+% \begin{macrocode}
+ \pgfkeys{
+ /timechart/.cd,
+ #1,
+ interval~bar~thickness/.get=\l_@@_bar_thickness_pgf,
+ interval~bar~color/.get=\l_@@_bar_color,
+ interval~minimum~width/.get=\l_@@_minimum_width_pgf,
+ beyond~length/.get=\l_@@_beyond_length_pgf,
+ legend~item~width/.get=\l_@@_legenditem_width_pgf,
+ }
+ \pgfmathsetlengthmacro{\l_@@_bar_half_thickness_pgf}
+ {.5*\l_@@_bar_thickness_pgf}
+ \pgfmathsetmacro{\l_@@_start_x}{0}
+ \pgfmathsetmacro{\l_@@_finish_x}
+ {\l_@@_legenditem_width_pgf}
+ \pgfmathsetlengthmacro{\l_@@_start_beyond_x}
+ {\l_@@_start_x-\l_@@_beyond_length_pgf}
+ \pgfmathsetlengthmacro{\l_@@_finish_beyond_x}
+ {\l_@@_finish_x+\l_@@_beyond_length_pgf}
+ \pgfmathsetmacro{\l_@@_current_y}{0}
+% \end{macrocode}
+% Ensure that the legend is `visible' from the perspective of the drawing macros.
+% \begin{macrocode}
+ \pgfmathsetmacro{\l_@@_start_tolerance_x}
+ {\l_@@_start_x-10mm}
+ \pgfmathsetmacro{\l_@@_finish_tolerance_x}
+ {\l_@@_finish_x+10mm}
+ #2
+% \end{macrocode}
+% Make sure that the legend has the required bounding box.
+% \begin{macrocode}
+ \pgfresetboundingbox
+ \pgfmoveto{
+ \pgfpoint{0}{-\l_@@_bar_half_thickness_pgf}
+ }
+ \pgfmoveto{
+ \pgfpoint
+ {\l_@@_legenditem_width_pgf}
+ {\l_@@_bar_half_thickness_pgf}
+ }
+ \endtikzpicture%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \end{implementation}
+%
+% \PrintIndex
diff --git a/graphics/pgf/contrib/timechart/timechart.ins b/graphics/pgf/contrib/timechart/timechart.ins
new file mode 100644
index 0000000000..e4a9c32bed
--- /dev/null
+++ b/graphics/pgf/contrib/timechart/timechart.ins
@@ -0,0 +1,38 @@
+%%
+%% Copyright (C) 2025 Alan J. Cain
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public Licence, either
+%% version 1.3 of this licence or (at your option) any later
+%% version. The latest version of this licence 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 l3docstrip.tex
+\askforoverwritefalse
+\nopostamble
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2025 Alan J. Cain
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public Licence, either
+version 1.3 of this licence or (at your option) any later
+version. The latest version of this licence 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{timechart.sty}{\from{timechart.dtx}{package}}}
+
+\endbatchfile
diff --git a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-en.pdf b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-en.pdf
new file mode 100644
index 0000000000..ce114e03f7
--- /dev/null
+++ b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-en.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-en.tex b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-en.tex
new file mode 100644
index 0000000000..27d56d19a5
--- /dev/null
+++ b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-en.tex
@@ -0,0 +1,1807 @@
+% !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[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[english]{tkz-grapheur}
+\pgfplotsset{compat=newest}
+\usepackage{amsmath}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{hyperref}
+\usepackage{nicefrac}
+\usepackage{fontawesome5}
+\usepackage{tcolorbox}
+\usepackage{minted2}
+\tcbuselibrary{skins,minted}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [tkz-grapheur]}
+\rfoot{\sffamily\small - \thepage{} -}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+\def\TPversion{0.2.0}
+\def\TPdate{29/10/2024}
+\usepackage{soul}
+\usepackage{codehigh}
+\usepackage{tabularray}
+\usepackage{alphalph}
+\sethlcolor{lightgray!25}
+\NewDocumentCommand\MontreCode{ m }{%
+ \hl{\vphantom{\texttt{pf}}\texttt{#1}}%
+}
+\usepackage[english]{babel}
+
+\renewcommand{\footnoterule}{\vfill\kern -3pt \hrule width 0.4\columnwidth \kern 2.6pt}
+
+\begin{document}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\begin{center}
+ \begin{minipage}{0.88\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{tkz-grapheur [en]}}\\
+ \\
+ {\LARGE A grapher, based}\\
+ \\
+ {\LARGE on \textsf{\TikZ} and \textsf{xint}.}\\
+ \\
+ {\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://forge.apps.education.fr/pierquetcedric/package-latex-tkz-grapheur}} \\
+\end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center]
+\begin{GraphTikz}[x=0.85cm,y=0.35cm,Xmin=0,Xmax=10,Ymin=0,Ymax=16]
+ %préparation de la fenêtre
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{0,1,...,10}{0,2,...,16}
+ %déf des fonctions avec nom courbe + nom fonction + expression
+ \DefineCurve[Name=cf]<f>{3*x-6}
+ \DefineCurve[Name=cg]<g>{-(x-6)^2+12}
+ %antécédents et intersection
+ \FindIntersections[Disp=false,Name=K]{cf}{cg}
+ \FindCounterimage[DispLine,Color=orange,Name=I]{cg}{8}
+ \FindCounterimage[Disp=false,Name=J]{cg}{0}
+ %intégrale sous une courbe, avec intersection
+ \DrawIntegral%
+ [Colors=blue/purple,Bounds=nodes,Style=hatch,Hatch=bricks]%
+ {g(x)}%
+ {(I-2)}{(J-2)}
+ %intégrale entre les deux courbes
+ \DrawIntegral[Bounds=nodes,Type=fct/fct]{f(x)}[g(x)]{(K-1)}{(K-2)}
+ %tracé des courbes et des points
+ \DrawCurve[Color=red]{f(x)}
+ \DrawCurve[Color=teal]{g(x)}
+ \MarkPts<\small>{(K-1)/below right/L,(K-2)/above left/M}%
+ \MarkPts[violet]<\small>{(I-1)/above left/D,(I-2)/above right/E}%
+ %essai de tangente
+ \DrawTangent[Colors=pink!75!black/yellow,OffsetL=2,OffsetR=2,DispPt]{g}{5}
+ %essai d'image
+ \DrawRanges[Colors=cyan]{g}{7,7.25,7.5}
+ %surimpression des axes
+ \DrawAxisGrids[Grads=false,Grid=false,Enlarge=2.5mm]{0,1,...,10}{0,2,...,16}
+\end{GraphTikz}
+\end{tcolorbox}
+
+\vspace*{5mm}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center]
+\begin{GraphTikz}%
+ [x=3.5cm,y=4cm,
+ Xmin=0,Xmax=3.5,Xgrid=pi/12,Xgrids=pi/24,
+ Ymin=-1.05,Ymax=1.05,Ygrid=0.2,Ygrids=0.05]
+ %préparation de la fenêtre
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm,Format=ntrig/nsqrt]%
+ {pi/6,pi/4,pi/3,pi/2,2*pi/3,3*pi/4,5*pi/6,pi}
+ {0,sqrt(2)/2,1/2,sqrt(3)/2,1,-1,-sqrt(3)/2,-1/2,-sqrt(2)/2}
+ %rajouter des valeurs
+ \AddXvalues{0.25,1.4,3.3}{\num{0.25},\num{1.4},\num{3.3}}
+ %fonction trigo (déf + tracé)
+ \DefineCurve[Name=ccos,Start=0,End=pi]<fcos>{cos(x)}
+ \DefineCurve[Name=csin,Start=0,End=pi]<fsin>{sin(x)}
+ %intégrale
+ \FindIntersections[Disp=false,Name=JKL]{ccos}{csin}
+ %\DefinirPts{FIN/pi/0}
+ \DrawIntegral%
+ [Bounds=node/abs,Type=fct/fct,Colors=cyan/cyan!50]%
+ {fsin(x)}[fcos(x)]%
+ {(JKL-1)}{pi}
+ %tracé des courbes
+ \DrawCurve[Color=red,Start=0,End=pi]{fcos(x)}
+ \DrawCurve[Color=olive,Start=0,End=pi]{fsin(x)}
+ %antécédent(s)
+ \DrawCounterimage[Color=blue/teal!50!black,Lines]{ccos}{-0.25}
+ \DrawCounterimage[Colors=red/magenta!50!black,Lines]{csin}{0.5}
+ \DrawCounterimage[Colors=orange/orange!50!black,Lines]{csin}{sqrt(2)/2}
+ \DrawCounterimage[Colors=green!50!black/green,Lines]{csin}{sqrt(3)/2}
+ %surimpression axes
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm,Format=ntrig/nsqrt]%
+ {pi/6,pi/4,pi/3,pi/2,2*pi/3,3*pi/4,5*pi/6,pi}
+ {0,sqrt(2)/2,1/2,sqrt(3)/2,1,-1,-sqrt(3)/2,-1/2,-sqrt(2)/2}
+\end{GraphTikz}
+\end{tcolorbox}
+
+\vfill
+
+\hfill{\footnotesize\textit{\ttfamily To my Dad.}}
+
+\vspace*{5mm}
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+\hrule
+
+\vspace*{5mm}
+
+\pagebreak
+
+\section{Introduction}
+
+\subsection{Description and general ideas}
+
+With this modest package, far from the capabilities offered by the excellent packages \MontreCode{tkz-*}\footnote{for example tkz-base \url{https://ctan.org/pkg/tkz-base} and tkz- fct \url{https://ctan.org/pkg/tkz-fct}.} (by Alain Matthes) or \MontreCode{tzplot}\footnote{CTAN: \url{https://ctan.org/pkg/ tzplot}.} (by In-Sung Cho), it is possible to work on function graphs, in \TikZ\ language, in an \textit{intuitive} and \textit{explicit} way.
+
+\smallskip
+
+Concerning the overall operation:
+
+\smallskip
+
+\begin{itemize}
+ \item particular styles for the objects used have been defined, but they can be modified locally;
+ \item the name of the commands is in \textit{operational} form, so that the construction of the graphic elements has an almost \textit{algorithmic} form.
+\end{itemize}
+
+\subsection{Overall operation}
+
+To schematize, it \textit{is enough}:
+
+\smallskip
+
+\begin{itemize}
+ \item to declare the parameters of the graphics window (\textbf{units in cm !});
+ \item to display grid/axes/graduations;
+ \item to declare functions or interpolation curves;
+ \item to possibly declare particular points;
+ \item to place a point scatter.
+\end{itemize}
+
+\smallskip
+
+It will then be possible:
+
+\begin{itemize}
+ \item to draw curves;
+ \item to graphically determine images or backgrounds;
+ \item to add elements of derivation (tangents) or integration (domain);
+ \item to draw a linear fit line or the curve of another fit.
+\end{itemize}
+
+\subsection{Packages used, and package options}
+
+The package uses:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{tikz}, with the libraries \MontreCode{calc,intersections,patterns,patterns.meta,bbox};
+ \item \MontreCode{simplekv}, \MontreCode{xintexpr}, \MontreCode{xstring}, \MontreCode{listofitems};
+ \item \MontreCode{xint-regression}\footnote{CTAN: \url{https://ctan.org/pkg/xint-regression}.} (for regressions, switchable via \MontreCode{[noxintreg]}).
+\end{itemize}
+
+\smallskip
+
+The package also loads \MontreCode{siunitx} with the classic options, but it is possible not to load it using the \MontreCode{[nosiunitx]} option.
+
+\smallskip
+
+The package also loads the \TikZ\ \MontreCode{babel} library, but it is possible not to load it using the \MontreCode{[notikzbabel]} option.
+
+\smallskip
+
+The different options are obviously cumulative.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%loading by default, with french setup of siunitx
+\usepackage{tkz-grapheur}
+%loading by default, with normal setup of siunitx
+\usepackage[english]{tkz-grapheur}
+
+%loading without sinuitx, to be loaded manually
+\usepackage[nosiunitx]{tkz-grapheur}
+
+%loading without tikz.babel
+\usepackage[notikzbabel]{tkz-grapheur}
+\end{tcblisting}
+
+Also note that certain commands can use packages like \MontreCode{nicefrac}, which will therefore have to be loaded if necessary.
+
+\smallskip
+
+Concerning the \textit{calculations} and \textit{plots} part, the \MontreCode{xint} package takes care of it.
+
+\subsection{Warnings}
+
+It is possible, due to the (multiple) calculations carried out internally, that the compilation time may be a little \textit{long}.
+
+\smallskip
+
+The precision of the (determination) results seems to be around $10^{-4}$, which should normally guarantee \textit{satisfactory} plots and readings. It is still advisable to be cautious about the results obtained and those expected.
+
+\subsection{Introductory example}
+
+For example, we can start from the following example to \textit{illustrate} the flow of the commands for this package. The commands and syntax will be detailed in the following sections!
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+\begin{GraphTikz}%
+ [x=7.5cm,y=7.5cm,Xmin=0,Xmax=1.001,Xgrid=0.1,Xgrids=0.02,
+ Ymin=0,Ymax=1.001,Ygrid=0.1,Ygrids=0.02]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]%
+ {0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1}
+ {0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1}
+ \DefineCurve[Name=cf,Start=0,End=1]<f>{x*exp(x-1)}
+ \DefineCurve[Name=delta,Start=0,End=1]<D>{x}
+ \DrawIntegral[Type=fct/fct]{f(x)}[D(x)]{0}{1}
+ \DrawCurve[Color=red]{f(x)}
+ \DrawCurve[Color=teal]{D(x)}
+ \DrawRanges[Colors=blue/cyan,Lines]{f}{0.8,0.9}
+ \DrawCounterimage[Colors=green!50!black/olive,Lines]{cf}{0.5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,text only}
+ \begin{GraphTikz}%
+ [x=7.5cm,y=7.5cm,Xmin=0,Xmax=1.001,Xgrid=0.1,Xgrids=0.02,
+ Ymin=0,Ymax=1.001,Ygrid=0.1,Ygrids=0.02]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]%
+ {0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1}
+ {0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1}
+ \DefineCurve[Name=cf,Start=0,End=1]<f>{x*exp(x-1)}
+ \DefineCurve[Name=delta,Start=0,End=1]<D>{x}
+ \DrawIntegral[Type=fct/fct]{f(x)}[D(x)]{0}{1}
+ \DrawCurve[Color=red]{f(x)}
+ \DrawCurve[Color=teal]{D(x)}
+ \DrawRanges[Colors=blue/cyan,Lines]{f}{0.8,0.9}
+ \DrawCounterimage[Colors=green!50!black/olive,Lines]{cf}{0.5}
+ \end{GraphTikz}
+\end{tcblisting}
+
+\newpage
+
+\section{Basic Styles and Environment Creation}
+
+\subsection{Basic Styles}
+
+The styles used for plots are given below.
+
+\smallskip
+
+For \textit{simplicity} purposes, only the color of the elements can be configured, but if the user wishes, he can redefine the proposed styles.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%parameters declared and stored (usable in the environment a posteriori)
+\tikzset{
+ Xmin/.store in=\pflxmin,Xmin/.default=-3,Xmin=-3,
+ Xmax/.store in=\pflxmax,Xmax/.default=3,Xmax=3,
+ Ymin/.store in=\pflymin,Ymin/.default=-3,Ymin=-3,
+ Ymax/.store in=\pflymax,Ymax/.default=3,Ymax=3,
+ Origx/.store in=\pflOx,Origx/.default=0,Origx=0,
+ Origy/.store in=\pflOy,Origy/.default=0,Origy=0,
+ Xgrid/.store in=\pflgrillex,Xgrid/.default=1,Xgrid=1,
+ Xgrids/.store in=\pflgrillexs,Xgrids/.default=0.5,Xgrids=0.5,
+ Ygrid/.store in=\pflgrilley,Ygrid/.default=1,Ygrid=1,
+ Ygrids/.store in=\pflgrilleys,Ygrids/.default=0.5,Ygrids=0.5
+}
+\end{tcblisting}
+
+We therefore find:
+
+\smallskip
+
+\begin{itemize}
+ \item the origin of the mark (\MontreCode{Origx}/\MontreCode{Origy});
+ \item the extreme values of the axes (\MontreCode{Xmin}/\MontreCode{Xmax}/\MontreCode{Ymin}/\MontreCode{Ymax});
+ \item the parameters of the main and secondary grids (\MontreCode{Xgrid}/\MontreCode{Xgrids}/\MontreCode{Ygrid}/\MontreCode{Ygrids}).
+\end{itemize}
+
+\smallskip
+
+Concerning the styles of \textit{objects}, they are given below.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+\tikzset{tkzgrphnode/.style={}}
+\tikzset{tkzgrphpoint/.style={line width=0.95pt}}
+\tikzset{tkzgrphpointc/.style={radius=1.75pt}}
+\tikzset{tkzgrphscatter/.style={radius=1.75pt}}
+\tikzset{tkzgrphframe/.style={line width=0.8pt,gray}}
+\tikzset{tkzgrphcurve/.style={line width=1.05pt}}
+\tikzset{tkzgrphline/.style={line width=0.8pt}}
+\tikzset{tkzgrpharrowl/.style={<-,>=latex}}
+\tikzset{tkzgrpharrowr/.style={->,>=latex}}
+\tikzset{tkzgrpharrowlr/.style={<->,>=latex}}
+\tikzset{tkzgrphcounterimage/.style={line width=0.9pt,densely dashed}}
+\tikzset{tkzgrphrange/.style={line width=0.9pt,densely dashed,->,>=latex}}
+\tikzset{tkzgrphgridp/.style={thin,lightgray}}
+\tikzset{tkzgrphgrids/.style={very thin,lightgray}}
+\tikzset{tkzgrphaxes/.style={line width=0.8pt,->,>=latex}}
+\end{tcblisting}
+
+The idea is therefore to be able to redefine styles globally or locally, and possibly add elements, using \mintinline{latex}|mystyle/.append style={...}|.
+
+\subsection{Creating the environment}\label{creaenvt}
+
+The proposed environment is based on \TikZ, so that any \textit{classic} command linked to \TikZ\ can be used alongside the package commands!
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+\begin{GraphTikz}[tikz options]<keys>
+ %code(s)
+\end{GraphTikz}
+\end{tcblisting}
+
+The \MontreCode{[tikz options]} are the \textit{classic} options that can be passed to a \TikZ\ environment, as well as the \textsf{axes/grids/window} keys presented previously.
+
+\smallskip
+
+The specific (and optional) \MontreCode{<keys>} are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{ThickGrad}: size of the axis graduations (\MontreCode{3pt} for 3pt \textit{above} and 3pt \textit{below});
+ \item \MontreCode{Frame}: boolean (\MontreCode{false} by default) to display a frame which delimits the graphic window (excluding possible graduations).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}
+ [x=0.075cm,y=0.03cm,Xmin=0,Xmax=160,Xgrid=20,Xgrids=10,
+ Origy=250,Ymin=250,Ymax=400,Ygrid=25,Ygrids=5]
+ <Frame>
+\end{GraphTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ <Frame>
+\end{GraphTikz}
+\end{tcblisting}
+
+It will obviously be more meaningful with the added graphic elements!
+
+\pagebreak
+
+\subsection{Grids and axes}\label{creaaxesgr}
+
+The first command \textit{useful} will allow you to create the grids, axes and graduations.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DrawAxisGrids[keys]{gradX}{gradY}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Grid}: boolean (\MontreCode{true} by default) to display the grids (for a single grid, simply set the identical parameters for \MontreCode{Xgrid}/\MontreCode{Xgrids} or \MontreCode {Ygrid}/\MontreCode{Ygrids});
+ \item \MontreCode{Enlarge}: addition at the end of the axes (\MontreCode{0} by default);
+ \item \MontreCode{Grads}: boolean (\MontreCode{true} by default) for graduations;
+ \item \MontreCode{Font}: global font for graduations {\MontreCode{empty} by default};
+ \item \MontreCode{Format}: special formatting (see below) of the axis values.
+\end{itemize}
+
+\smallskip
+
+Concerning the \MontreCode{Format} key, it allows you to specify a specific setting for the axis values.
+
+\smallskip
+
+It can be given in the form \MontreCode{fmt} for combined formatting, or in the form \MontreCode{fmtX/fmtY} to differentiate the formatting.
+
+\smallskip
+
+The possible options are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{num}: format with \textsf{siunitx};
+ \item \MontreCode{year}: format in year;
+ \item \MontreCode{frac}: format as fraction \textsf{frac};
+ \item \MontreCode{dfrac}: format as fraction \textsf{dfrac};
+ \item \MontreCode{nfrac}: format as fraction \textsf{nicefrac};\hfill (to load!)
+ \item \MontreCode{trig}: format in trig with \textsf{frac};
+ \item \MontreCode{dtrig}: format in trig with \textsf{dfrac};
+ \item \MontreCode{ntrig}: format in trig with \textsf{nfrac};
+ \item \MontreCode{sqrt}: format in root with \textsf{frac};
+ \item \MontreCode{dsqrt}: format in root with \textsf{dfrac};
+ \item \MontreCode{nsqrt}: format in root with \textsf{nicefrac}.
+\end{itemize}
+
+\smallskip
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}
+ [x=0.075cm,y=0.03cm,Xmin=0,Xmax=160,Xgrid=20,Xgrids=10,
+ Origy=250,Ymin=250,Ymax=400,Ygrid=25,Ygrids=5]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{0,10,...,160}{250,275,...,400}
+\end{GraphTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{4,5,...,20}{40,42,...,56}
+\end{GraphTikz}
+\end{tcblisting}
+
+Note that there are the Boolean keys \MontreCode{[Behind]} (without the graduations) and \MontreCode{[Above]} (without the grid) to display the axes in \textit{under/over}-printing mode in the case of integrals for example.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=2.75cm,y=3cm,
+ Xmin=0,Xmax=3.5,Xgrid=pi/12,Xgrids=pi/24,
+ Ymin=-1.05,Ymax=1.05,Ygrid=0.2,Ygrids=0.05]
+ \DrawAxisGrids[Enlarge=2.5mm,Format=dtrig/nsqrt,Font=\footnotesize]%
+ {pi/6,pi/4,pi/3,pi/2,2*pi/3,3*pi/4,5*pi/6,pi}
+ {0,sqrt(2)/2,1/2,sqrt(3)/2,1,-1,-sqrt(3)/2,-1/2,-sqrt(2)/2}
+\end{GraphTikz}
+\end{tcblisting}
+
+In the case where the formatting does not give satisfactory result(s), it is possible to use a generic command for placing the graduations.
+
+\subsection{Adding values manually}\label{additionvals}
+
+It is also possible to use a specific command to place values on the axes, independently of an \textit{automated} formatting system.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+in the environment
+\AddXvalues[keys]{grads}{formatted values}
+\AddYvalues[keys]{grads}{formatted values}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Font}: global font for graduations {\MontreCode{empty} by default};
+ \item \MontreCode{Lines}: boolean to add the tick marks {\MontreCode{true} by default}.
+\end{itemize}
+
+\smallskip
+
+The mandatory arguments correspond to the x-coordinates (in \TikZ\ language) and to the labels (in \LaTeX\ language) of the graduations.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=2.75cm,y=3cm,
+ Xmin=0,Xmax=3.5,Xgrid=pi/12,Xgrids=pi/24,
+ Ymin=-1.05,Ymax=1.05,Ygrid=0.2,Ygrids=0.05]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{}{}
+ \AddXvalues
+ {0.15,0.6,pi/2,2.8284}
+ {\num{0.15},$\frac35$,$\displaystyle\frac{\pi}{2}$,$\sqrt{8}$}
+ \AddYvalues
+ {-1,0.175,0.3,sqrt(3)/2}
+ {\num{-1},\num{0.175},$\nicefrac{3}{10}$,$\frac{\sqrt{3}}{2}$}
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\section{Specific definition commands}
+
+\subsection{Draw a line}\label{tracstraight}
+
+The idea is to propose a command to draw a line (or an asymptote), from:
+
+\begin{itemize}
+ \item of two points (or nodes);
+ \item of a point (or node) and the slope.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DrawLine[keys]{point or node}{point or node or slope}
+\DrawAsymptote[keys]{x value}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Name}: possible name of the plot (for reuse);
+ \item \MontreCode{Slope}: boolean to specify that the slope is used (\MontreCode{false} by default);
+ \item \MontreCode{Start}: start of the plot (\MontreCode{\textbackslash pflxmin} by default);
+ \item \MontreCode{End}: end of the plot (\MontreCode{\textbackslash pflxmax} by default);
+ \item \MontreCode{Color}: color of the trace (\MontreCode{black} by default).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Enlarge=2.5mm]{auto}{auto}
+ \DefinePts[Mark,Color=gray]{A/-4/3,B/2/0,C/0/-1}
+ \DrawLine[Color=red]{(-2,-1)}{(2,4)}
+ \DrawLine[Color=blue,Start=-5,End=3]{(A)}{(B)}
+ \DrawLine[Color=olive,Slope]{(C)}{0.25}
+ \DrawAsymptote[Color=brown]{-6}
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Define a function, draw the curve of a function}\label{deftracfct}
+
+The idea is to define a function, for later reuse. This command \textit{creates} the function, without tracing it, because in certain cases elements will have to be traced beforehand.
+
+\smallskip
+
+There is also a command to plot the curve of a previously defined function.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DefineCurve[keys]<fct name>{xint formula}
+\DrawCurve[keys]{xint formula}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} for definition or tracing are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Start}: lower bound of the definition set (\MontreCode{\textbackslash pflxmin} by default);
+ \item \MontreCode{End}: lower bound of the definition set (\MontreCode{\textbackslash pflxmax} by default);
+ \item \MontreCode{Name}: name of the curve (important for the rest!);
+ \item \MontreCode{Color}: color of the trace (\MontreCode{black} by default);
+ \item \MontreCode{Step}: plot step (it is determined \textit{automatically} at the start but can be modified);
+ \item \MontreCode{Trace}: boolean to also trace the curve (\MontreCode{false} by default).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{4,5,...,20}{40,42,...,56}
+ %definition of the function + drawing of the curve
+ \DefineCurve[Name=cf,Start=5,End=19]<f>{-2*x+3+24*log(2*x)}
+ \DrawCurve[Color=red,Start=5,End=19]{f(x)}
+ %or in a single command if "sufficient"
+ %\DefineCurve[Name=cf,Start=5,End=19,Trace]<f>{-2*x+3+24*log(2*x)}
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Define/draw an interpolation curve (simple)}\label{deftracinterpo}
+
+It is also possible to define a curve via support points, therefore a simple interpolation curve.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DefineInterpoCurve[keys]{list of support points}
+\DrawInterpoCurve[keys]{list of support points}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} for definition or tracing are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Name}: name of the interpolation curve (important for the rest!);
+ \item \MontreCode{Color}: color of the trace (\MontreCode{black} by default);
+ \item \MontreCode{Tension}: setting the \textit{tension} of the interpolation plot (\MontreCode{0.5} by default);
+ \item \MontreCode{Trace}: boolean to also trace the curve (\MontreCode{false} by default).
+\end{itemize}
+
+The mandatory argument allows you to specify the list of support points in the form \MontreCode{(x1,y1)(x2,y2)...}.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ %simple interpolation curves (with diff tension)
+ \DefineInterpoCurve[Name=interpotest,Color=blue,Trace]%
+ {(-6,4)(-2,-2)(3,3.5)}
+ \DefineInterpoCurve[Name=interpotest,Color=red,Trace,Tension=1]%
+ {(-6,4)(-2,-2)(3,3.5)}
+\end{GraphTikz}
+\end{tcblisting}
+
+\newpage
+
+\subsection{Define/draw an interpolation curve (Hermite)}\label{deftracfctspline}
+
+It is also possible to define a curve via support points, therefore an interpolation curve with derivative control.
+
+\smallskip
+
+Some operations require different techniques depending on the type of function used, a \textsf{Boolean} key \MontreCode{Spline} will allow the code to adapt its calculations depending on the object used.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DefineSplineCurve[keys]{list of support points}[\macronomspline]
+\DrawSplineCurve[keys]{list of support points}[\macronomspline]
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} for definition or tracing are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Name}: name of the interpolation curve (important for the rest!);
+ \item \MontreCode{Coeffs}: modify (see the \textsf{ProfLycee}\footnote{CTAN documentation: \url{https://ctan.org/pkg/proflycee}} the \textit{coefficients} of the spline;
+ \item \MontreCode{Color}: color of the trace (\MontreCode{black} by default);
+ \item \MontreCode{Trace}: boolean to also trace the curve (\MontreCode{false} by default).
+\end{itemize}
+
+The mandatory argument allows you to specify the list of support points in the form \MontreCode{x1/y1/f'1§x2/y2/f'2§...} with:
+
+\begin{itemize}
+ \item \MontreCode{xi/yi} the coordinates of the point;
+ \item \MontreCode{f'i} the derivative at the support point.
+\end{itemize}
+
+\smallskip
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ %definition of the list of spline support points
+ \def\LISTETEST{-6/4/-2§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}
+ %definition and plot of the cubic spline
+ \DefineSplineCurve[Name=splinetest,Trace,Color=olive]{\LISTETEST}
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Define points as nodes}\label{defpts}
+
+The second idea is to work with \TikZ nodes, which could be useful for tangent plots, representations of integrals$\ldots$
+
+\smallskip
+
+It is also possible to define nodes for \textit{image} points.
+
+\smallskip
+
+Certain commands (explained later) allow you to determine particular points of curves in the form of nodes, so it seems interesting to be able to define them directly.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%by coordinates
+\DefinePts[keys]{Name1/x1/y1,Name2/x2/y2,...}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Mark}: boolean to mark points (\MontreCode{false} by default);
+ \item \MontreCode{Color}: color of the points, if \MontreCode{Mark=true} (\MontreCode{black} by default).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%as image
+\DefineRange[keys]{object}{abscissa}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Name}: node name (\MontreCode{empty} by default);
+ \item \MontreCode{Spline}: boolean to specify that a spline is used (\MontreCode{false} by default).
+\end{itemize}
+
+The first mandatory argument is the \textit{object} considered (name of the curve for the spline, function otherwise); the second is the abscissa of the point considered.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{4,5,...,20}{40,42,...,56}
+ %definition of the function + drawing of the curve
+ \DefineFunction[Name=cf,Start=5,End=19,Trace,Color=red]<f>{-2*x+3+24*log(2*x)}
+ %manual nodes
+ \DefinePts[Mark,Color=brown]{A/7/42,B/16/49}
+ %imagenode
+ \DefineRange[Name=IMGf]{f}{14}
+ \MarkPts*[Style=x,Color=blue]{(IMGf)} %see next section ;-)
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Mark Points}\label{markpts}
+
+The idea is to offer something to score points with a particular style.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\MarkPts(*)[keys]<font>{list}
+\end{tcblisting}
+
+The \textit{starred} version scores the points without the \textit{names}, while the \textit{unstarred} version displays them:
+
+\begin{itemize}
+ \item in the case of the \textit{starred} version, the list should be given in the form \MontreCode{(ptA),(ptB),...};
+ \item otherwise, the list should be given in the form \MontreCode{(ptA)/poslabelA/labelA,...}.
+\end{itemize}
+
+\smallskip
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Color}: color (\MontreCode{black} by default);
+ \item \MontreCode{Style}: style of marks (\MontreCode{o} by default).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}[x=1.5cm,y=1.5cm,Ymin=-2]
+ \DrawAxisGrids[Enlarge=2.5mm]{auto}{auto}
+ \DefinePts{A/1.75,-1.25}\MarkPts[Color=pink]{(A)/below/A} %round (default)
+ \MarkPts[Color=teal]{(1,1)/below/M}
+ \MarkPts[Color=red,Style=x]{(1.25,1)/below/$A$} %cross
+ \MarkPts[Color=orange,Style=+]<\small\sffamily>{(1.5,1)/below/K} %plus
+ \MarkPts[Color=blue,Style=c]{(1.75,1)/below/P} %square
+ \MarkPts[Color=gray,Style=d]{(2,1)/below/P} %diamond
+ \MarkPts*[Color=orange/yellow]{(2,2),(2.5,2.25)} %two-tone round
+ \MarkPts*[Style=+,Color=red]{(1,2)}
+ \MarkPts*[Style=x,Color=blue]{(2.25,1)}
+ \MarkPts*[Style=c,Color=magenta]{(-2,-1)}
+ \MarkPts[Color=red,Style=x]{(-1,1)/below/$A$,(-2,2)/below left/$B$}
+\end{GraphTikz}
+\end{tcblisting}
+
+Note that it is also possible to modify the size of the \MontreCode{o/x/+/c} marks via the \MontreCode{[keys]}:
+
+\begin{itemize}
+ \item \MontreCode{Sizex=...} (\MontreCode{2pt} by default) for points \textit{cross};
+ \item \MontreCode{Sizeo=...} (\MontreCode{1.75pt} by default) for the points \textit{circle};
+ \item \MontreCode{Sizec=...} (\MontreCode{2pt} by default) for the \textit{square} points.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}[x=1cm,y=1cm,Xmin=0,Ymin=0]
+ \DrawAxisGrids[Enlarge=2.5mm]{auto}{auto}
+ \MarkPts[Color=red,Style=x,Size=3.5pt]{(1.25,1.25)/below/$A$}
+ \MarkPts[Color=teal,Size=2.5pt]{(2,2)/right/$A$}
+ \MarkPts*[Color=orange,Style=c,Size=4pt]{(0.5,2.5)}
+\end{GraphTikz}
+\end{tcblisting}
+
+\subsection{Retrieve node coordinates}\label{recupcoordo}
+
+It is also possible, with a view to reusing coordinates, to recover the coordinates of a node (defined or determined).
+
+\smallskip
+
+The calculations are carried out by floating according to the (re)calculated units, the values are therefore approximated !
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\GetXcoord{node}[\macrox]
+\GetYcoord{node}[\macroy]
+\GetXYcoord{node}[\macrox][\macroy]
+\end{tcblisting}
+
+\subsection{Place text}\label{placetxt}
+
+Note that a text placement command is available.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DrawTxt[keys]{(node or coordinates)}{text}
+\end{tcblisting}
+
+The available \MontreCode{[keys]} are:
+
+\begin{itemize}
+ \item \MontreCode{Font=...} (\MontreCode{\textbackslash normalsize\textbackslash normalfont} by default) for the font;
+ \item \MontreCode{Color=...} (\MontreCode{black} by default) for the color;
+ \item \MontreCode{Position=...} (\MontreCode{empty} by default) for the position of the text relative to the coordinates.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}[x=1cm,y=1cm,Xmin=0,Xmax=5,Ymin=0,Ymax=1]
+ \DrawAxisGrids[Enlarge=2.5mm]{auto}{auto}
+ \DrawTxt[Color=red,Font=\LARGE,Position=right]{(1.5,0.5)}{curve $C_1$}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Specific commands for using curves}
+
+\subsection{Image placement}\label{images}
+
+It is possible to place points (images) on a curve, with possible construction lines.
+
+The function/curve used must have been declared previously for this command to work.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DrawRanges[keys]{function or curve}{list of abscissa}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Lines}: boolean to display construction traits (\MontreCode{false} by default);
+ \item \MontreCode{Colors}: color of the points/lines, in the form \MontreCode{Couleurs} or \MontreCode{ColPoint/ColLines};
+ \item \MontreCode{Spline}: boolean to specify that the curve used is defined as a \textsf{spline} (\MontreCode{false} by default).
+\end{itemize}
+
+\smallskip
+
+The first mandatory argument allows you to specify:
+
+\smallskip
+
+\begin{itemize}
+ \item the name of the curve in the case \MontreCode{Spline=true};
+ \item the name of the function otherwise.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{4,5,...,20}{40,42,...,56}
+ %definition of the function + drawing of the curve
+ \DefineCurve[Name=cf,Start=5,End=19,Trace,Color=red]<f>{-2*x+3+24*log(2*x)}
+ %images
+ \DrawRanges[Lines,Colors=teal/blue]{f}{6,7,8,9,10}
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Antecedent determination}\label{defanteced}
+
+It is possible to graphically determine the antecedents of a given reality.
+
+The function/curve used must have been declared previously for this command to work.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\FindCounterimage[keys]{curve}{k}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Name}: base of the name of the \textbf{nodes} intersection (\MontreCode{S} by default, which will give \textsf{S-1}, \textsf{S-2}, etc);
+ \item \MontreCode{Disp}: boolean to display the points (\MontreCode{true} by default);
+ \item \MontreCode{Color}: color of the points (\MontreCode{black} by default);
+ \item \MontreCode{DispLine}: boolean to display the horizontal line (\MontreCode{false} by default).
+\end{itemize}
+
+\smallskip
+
+The first mandatory argument allows you to specify the \textbf{name} of the curve.
+
+\smallskip
+
+The second mandatory argument allows you to specify the value to reach.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{4,5,...,20}{40,42,...,56}
+ %definition of the function + drawing of the curve
+ \DefineCurve[Name=cf,Start=5,End=19,Trace,Color=red]<f>{-2*x+3+24*log(2*x)}
+ %history
+ \FindCounterimage[Color=teal,DispLine,Disp]{cf}{53}
+ %the two antecedents are at nodes (S-1) and (S-2)
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Antecedent construction}\label{tracanteced}
+
+It is possible to graphically construct the antecedents.
+
+The function/curve used must have been declared previously for this command to work.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DrawCounterimage[keys]{curve}{k}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Colors}: color of the points/lines, in the form \MontreCode{Color} or \MontreCode{ColPoint/ColLines};
+ \item \MontreCode{Name}: name \textit{possible} for the intersection points linked to the antecedents (\MontreCode{empty} by default);
+ \item \MontreCode{Lines}: boolean to display construction traits (\MontreCode{false} by default).
+\end{itemize}
+
+\smallskip
+
+The first mandatory argument allows you to specify the \textbf{name} of the curve.
+
+\smallskip
+
+The second mandatory argument allows you to specify the value to reach.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{4,5,...,20}{40,42,...,56}
+ %definition of the function + drawing of the curve
+ \DefineCurve[Name=cf,Start=5,End=19,Trace,Color=red]<f>{-2*x+3+24*log(2*x)}
+ %history
+ \DrawCounterimage[Colors=teal/cyan,Lines,Name=PO]{cf}{53}
+ \GetXcoord{(PO-1)}[\premsol]
+ \GetXcoord{(PO-2)}[\deuxsol]
+\end{GraphTikz}
+
+Graphically, the antecedents of 53 are (approximately):
+
+\begin{itemize}
+ \item \num{\premsol}
+ \item \num{\deuxsol}
+\end{itemize}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Intersections of two curves}\label{intersect}
+
+It is also possible to determine (in the form of nodes) the possible points of intersection of two previously defined curves.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\FindIntersections[keys]{curve1}{curve2}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Name}: base of the name of the \textbf{nodes} intersection (\MontreCode{S} by default, which will give \textsf{S-1}, \textsf{S-2}, etc);
+ \item \MontreCode{Disp}: boolean to display the points (\MontreCode{true} by default);
+ \item \MontreCode{Color}: color of the points (\MontreCode{black} by default).
+\end{itemize}
+
+\smallskip
+
+The first mandatory argument allows you to specify the \textbf{name} of the first curve.
+
+\smallskip
+
+The first mandatory argument allows you to specify the \textbf{name} of the second curve.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{4,5,...,20}{40,42,...,56}
+ \DefineCurve[Name=cf,Start=5,End=19,Trace,Color=red]<f>{-2*x+3+24*log(2*x)}
+ \DefineCurve[Name=cg,Start=5,End=19,Trace,Color=blue]<g>{0.25*(x-12)^2+46}
+ %intersections, named (TT-1) and (TT-2)
+ \FindIntersections[Name=TT,Color=darkgray,Display,Lines]{cf}{cg}
+ %recovery of intersection points
+ \GetXYcoord{(TT-1)}[\alphaA][\betaA]
+ \GetXYcoord{(TT-2)}[\alphaB][\betaB]
+\end{GraphTikz}\\
+The solutions of $f(x)=g(x)$ are $\alpha \approx \num{\alphaA}$ and
+$\beta \approx \num{\alphaB}$.\\
+The points of intersection of the curves of $f$ and $g$ are therefore
+$(\RoundNb[2]{\alphaA};\RoundNb[2]{\betaA})$ and
+$(\RoundNb[2]{\alphaB};\RoundNb[2]{\betaB})$.
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Extrema}\label{maximum}\label{minimum}
+
+The idea (still \textit{experimental}) is to offer commands to extract the extrema of a curve defined by the package.
+
+The command creates the corresponding node, and it is therefore possible to retrieve its coordinates for later use.
+
+\smallskip
+
+It is possible, by specifying it, to work on the different curves managed by the package (function, interpolation, spline).
+
+For singular curves, it is possible that the results are not quite those expected\ldots
+
+\smallskip
+
+{\small\faBomb} For the moment, the \textit{limitations} are:
+
+\begin{itemize}
+ \item no management of multiple extrema (only the first will be processed)\ldots
+ \item no management of extrema at the boundaries of the route\ldots
+ \item no automatic recovery of curve definition parameters\ldots
+ \item compilation time may be longer\ldots
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\FindMax[keys]{object}[node created]
+\FindMin[keys]{object}[node created]
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} available are:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Method}: method, among \MontreCode{function/interpo/spline} for calculations (\MontreCode{function} by default);
+ \item \MontreCode{Start}: start of the plot (\MontreCode{\textbackslash pflxmin} by default);
+ \item \MontreCode{End}: end of the plot (\MontreCode{\textbackslash pflxmax} by default);
+ \item \MontreCode{Step}: not in the plot if \MontreCode{function} (it is determined \textit{automatically} at the start but can be modified);
+ \item \MontreCode{Coeffs}: modify the \textit{coefficients} of the spline if \MontreCode{spline};
+ \item \MontreCode{Tension}: setting the \textit{tension} of the interpolation plot if \MontreCode{interpo}(\MontreCode{0.5} by default).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}[x=1cm,y=1cm,Xmin=-1,Xmax=5,Ymin=-1,Ymax=3]
+ \DrawAxisGrids[Enlarge=2.5mm]{auto}{auto}
+ \DefineCurve[Name=cf,Start=0.35,End=4.2,Trace]%
+ <f>{0.6*cos(4.5*(x-4)+2.1)-1.2*sin(x-4)+0.1*x+0.2}
+ \FindMax[Start=0.35,End=4.2]{f}[cf-max]
+ \FindMax[Start=3,End=4]{f}[cf-maxlocal]
+ \FindMin[Start=1,End=2]{f}[cf-minlocal]
+ \MarkPts*[Color=red,Lines]{(cf-max)}
+ \MarkPts*[Color=blue,Lines]{(cf-maxlocal)}
+ \MarkPts*[Color=olive,Lines]{(cf-minlocal)}
+ \GetXYcoord{(cf-max)}[\MyMaxX][\MyMaxY]
+\end{GraphTikz}\\
+The maximum is $M\approx\RoundNb{\MyMaxY}$, reached in $x\approx\RoundNb{\MyMaxX}$
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}[x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineInterpoCurve[Name=interpotest,Color=red,Trace,Tension=1]%
+ {(-6,4)(-2,-2)(3,3.5)}
+ \FindMin[Method=interpo,Tension=1]{(-6,4)(-2,-2)(3,3.5)}[interpo-min]
+ \MarkPts*[Color=blue]{(interpo-min)}
+ \GetXYcoord{(interpo-min)}[\MinInterpoX][\MinInterpoY]
+\end{GraphTikz}\\
+The minimum is $M\approx\RoundNb[3]{\MinInterpoY}$, reached at $x\approx\RoundNb[3]{\MinInterpoX}$
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=1.2cm,y=1.6cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=3,Ygrid=0.5,Ygrids=0.25]
+ \DrawAxisGrids[Enlarge=2.5mm]{auto}{auto}
+ \def\LISTETEST{-6/2/0§-1/-2/0§2/1/0§3.5/0/-1}
+ \DefineSplineCurve[Name=splinetest,Trace]{\LISTETEST}
+ \FindMin[Method=spline]{\LISTETEST}[spline-min]
+ \MarkPts*[Color=red]{(spline-min)}
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Integrals (improved version)}\label{integr}
+
+We can also work with integrals.
+
+In this case it is preferable to highlight the domain \textbf{before} the plots, to avoid overprinting in relation to the curves/points.
+
+\smallskip
+
+It is possible to :
+
+\begin{itemize}
+ \item represent an integral \textbf{under} a defined curve;
+ \item represent an integral \textbf{between} two curves;
+ \item the integration limits can be x-coordinates and/or nodes.
+\end{itemize}
+
+\smallskip
+
+{\small\faBomb} Given the differences in processing between formula curves, simple interpolation curves or cubic interpolation curves, the arguments and keys may differ depending on the configuration!
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DrawIntegral[keys]<specific options>{object1}[object2]{A}{B}
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} for definition or tracing are:
+
+\begin{itemize}
+ \item \MontreCode{Colors} =: colors of the filling, in the form \MontreCode{Col} or \MontreCode{ColBorder/ColBg} (\MontreCode{gray} by default);
+ \item \MontreCode{Style}: type of filling, among \MontreCode{fill}/\MontreCode{hatch} (\MontreCode{fill} by default);
+ \item \MontreCode{Opacity}: opacity (\MontreCode{0.5} by default) of the filling;
+ \item \MontreCode{Hatch}: style (\MontreCode{north west lines} by default) of the hatch filling;
+ \item \MontreCode{Type}: type of integral among
+ \begin{itemize}
+ \item \MontreCode{fct} (default) for an integral under a curve defined by a formula;
+ \item \MontreCode{spl} for an integral under a curve defined by a cubic spline;
+ \item \MontreCode{itp} for an integral under a curve defined by interpolation ;
+ \item \MontreCode{fct/fct} for an integral between two curves defined by a formula;
+ \item \MontreCode{fct/spl} for an integral between a curve (above) defined by a formula and a curve (below) defined by a spline cubic;
+ \item etc.
+ \end{itemize}
+ \item \MontreCode{Step}: steps (calculated by default otherwise) for the plot;
+ \item \MontreCode{Junction}: junction of segments (\MontreCode{bevel} by default);
+ \item \MontreCode{Bounds}: type of terminals among:
+ \begin{itemize}
+ \item \MontreCode{abs} for the limits given by the abscissa;
+ \item \MontreCode{nodes} for the limits given by the nodes;
+ \item \MontreCode{abs/node} for the limits given by abscissa and node;
+ \item \MontreCode{node/abs} for the limits given by node and abscissa;
+ \end{itemize}
+ \item \MontreCode{Border}: boolean (\MontreCode{true} by default) to display the side lines,%
+ \item \MontreCode{SplineName}: macro (important!) of the spline generated previously for a higher version spline;
+ \item \MontreCode{SplineNameB}: macro (important!) of the spline generated previously for a lower version spline;
+ \item \MontreCode{InterpoName}: name (important!) of the interpolation curve generated previously, in higher version;
+ \item \MontreCode{InterpoBName}: name (important!) of the interpolation curve generated previously, in lower version;
+ \item \MontreCode{Tension}: Tension for the interpolation curve generated previously, in higher version;
+ \item \MontreCode{TensionB}: Tension of the interpolation curve generated previously, in lower version.
+\end{itemize}
+
+\smallskip
+
+The first required argument is the spline function or curve or list of interpolation points.
+
+\smallskip
+
+The next optional argument is the spline function or curve or list of interpolation points.
+
+\smallskip
+
+The last two mandatory arguments are the limits of the integral, given in a form consistent with the key \MontreCode{Bounds}.
+
+\pagebreak
+
+In the case of curves defined by \textit{points}, it is necessary to work on intervals on which the first curve is \textbf{above} the second.
+
+It will undoubtedly be interesting to work with \textit{intersections} in this case.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.6cm,y=0.06cm,
+ Xmin=0,Xmax=21,Xgrid=1,Xgrids=0.5,
+ Ymin=0,Ymax=155,Ygrid=10,Ygrids=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{}{}
+ \DefineCurve[Name=cf,Start=1,End=20,Color=red]<f>{80*x*exp(-0.2*x)}
+ \DrawIntegral
+ [Bounds=abs,Colors=blue/cyan!50]%
+ {f(x)}{3}{12}
+ \DrawCurve[Color=red,Start=1,End=20]{f(x)}
+ \DrawAxisGrids%
+ [Grid=false,Enlarge=2.5mm,Font=\small]{0,1,...,20}{0,10,...,150}
+\end{GraphTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=1.2cm,y=1.6cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=3,Ygrid=0.5,Ygrids=0.25]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{}{}
+ \def\LISTETEST{-6/2/0§-1/-2/0§2/1/0§3.5/0/-1}
+ \DefineSplineCurve[Name=splinetest]{\LISTETEST}
+ \DrawIntegral[Type=spl,Style=hatch,Colors=purple]{splinetest}{-5.75}{-4.75}
+ \DrawIntegral[Type=spl,Colors=blue]{splinetest}{-2}{-1}
+ \DrawIntegral[Type=spl,Colors=orange]{splinetest}{1}{3}
+ \DrawSplineCurve[Color=olive]{\LISTETEST}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]
+ {-7,-6,...,4}%
+ {-3,-2.5,...,3}
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Tangents}\label{tgte}
+
+The idea of this command is to draw the tangent to a previously defined curve, specifying:
+
+\begin{itemize}
+ \item the point (abscissa or node) at which we wish to work;
+ \item possibly the direction (in the case of a discontinuity or a terminal);
+ \item possibly the step ($h$) of the calculation;
+ \item the \textit{lateral spacings} to draw the tangent.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DrawTangent[keys]{function or curve}{point}<line options>
+\end{tcblisting}
+
+The optional \MontreCode{[keys]} for definition or tracing are:
+
+\begin{itemize}
+ \item \MontreCode{Colors} =: colors of the plots, in the form \MontreCode{Col} or \MontreCode{ColLine/ColPoint} (\MontreCode{black} by default);
+ \item \MontreCode{OffsetL} =: left horizontal spacing to start the trace (\MontreCode{1} by default);
+ \item \MontreCode{OffsetR} =: left horizontal spacing to start the trace (\MontreCode{1} by default);
+ \item \MontreCode{DispPt}: boolean to display the support point (\MontreCode{false} by default);
+ \item \MontreCode{Spline}: boolean to specify that a spline is used (\MontreCode{false} by default);
+ \item \MontreCode{h}: delta $h$ used for calculations (\MontreCode{0.01} by default);
+ \item \MontreCode{Direction}: allows you to specify the \textit{direction} of the tangent, among \MontreCode{lr}/\MontreCode{l}/\MontreCode{r} (\MontreCode{lr} by default);
+ \item \MontreCode{Node}: boolean to specify that a node is used (\MontreCode{false} by default).
+\end{itemize}
+
+\smallskip
+
+The first required argument is the spline function or curve (if applicable).
+
+\smallskip
+
+The last mandatory argument is the work point (abscissa version or node following the key \MontreCode{Node}).
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
+ Ymin=40,Ymax=56,Ygrid=2,Ygrids=1,Origy=40]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{4,5,...,20}{40,42,...,56}
+ \DefineCurve[Name=cf,Start=5,End=19,Color=red,Trace]<f>{-2*x+3+24*log(2*x)}
+ \FindCounterimage[Color=teal,Name=JKL,Disp=false]{cf}{53}
+ %tangent
+ \DrawTangent%
+ [Colors=cyan/gray,OffsetL=2.5,OffsetR=2.5,Node,DispPt]{f}{(JKL-1)}
+\end{GraphTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \def\LISTETEST{-6/4/-0.5§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}
+ \DefineSplineCurve[Name=splinetest,Trace,Color=olive]{\LISTETEST}
+ \DrawTangent[Colors=red,Spline,DispPt]{splinetest}{1}
+ \DrawTangent%
+ [Colors=blue,Spline,OffsetL=1.5,OffsetR=1.5,DispPt]{splinetest}{-3}%
+ <tkzgrpharrowlr>
+ \DrawTangent[Direction=l,Colors=orange,Spline,OffsetL=1.5,DispPt]{splinetest}{3}
+ \DrawTangent[Direction=r,Colors=purple,Spline,OffsetR=1.5,DispPt]{splinetest}{-6}
+\end{GraphTikz}
+\end{tcblisting}
+
+\pagebreak
+
+%\section{Specific commands for density functions}
+%
+%\subsection{Normal distribution}\label{normal distribution}
+%
+%The idea is to provide something to work with standard deviation.
+%
+%\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+% %in the GraphiqueTikz environment
+% \DefineNormalDistribution[keys]<fct name>{mu}{sigma}
+% \TraceNormalDistribution[keys]{fct(x)}
+%\end{tcblisting}
+%
+%The optional \MontreCode{[keys]} available are:
+%
+%\smallskip
+%
+%\begin{itemize}
+% \item \MontreCode{Name}: name of the plot (\MontreCode{Gaussian} by default);
+% \item \MontreCode{Trace}: boolean to trace the curve (\MontreCode{false} by default);
+% \item \MontreCode{Couleur}: color of the trace, if requested (\MontreCode{black} by default);
+% \item \MontreCode{Debut}: lower bound of the definition set (\MontreCode{\textbackslash pflxmin} by default);
+% \item \MontreCode{End}: lower bound of the definition set (\MontreCode{\textbackslash pflxmax} by default);
+% \item \MontreCode{Pas}: plot step (it is determined \textit{automatically} at the start but can be modified).
+%\end{itemize}
+%
+%Note that the vertical axis must be adapted according to the parameters of the normal law.
+%
+%\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+% \begin{GraphTikz}%
+% [x=1.25cm,y=15cm,Origx=5,Xmin=5,Xmax=15,Ymin=0,Ymax=0.3,
+% Ygrid=0.1,Ygrids=0.05]
+% \DrawAxisGrids[Enlarge=2.5mm]{auto}{auto}
+% \DefineNormalDistribution[Name=Gaussian]<phi>{10}{1.5}
+% \TracerIntegral
+% [Terminals=abs, Colors=blue/cyan!50]%
+% {phi(x)}{7}{13}
+% \TraceNormalLaw[Color=purple,Start=5,End=15]{phi(x)}
+% \end{GraphTikz}
+%\end{tcblisting}
+%
+%\pagebreak
+%
+%\subsection{Chi-square law}\label{loikhideux}
+%
+%The idea is to provide something to work with normal laws.
+%
+%\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+% %in the GraphiqueTikz environment
+% \DefineKhiTwoLaw[keys]<fct name>{k}
+% \TraceLawKhiTwo[keys]{fct(x)}
+%\end{tcblisting}
+%
+%The optional \MontreCode{[keys]} available are:
+%
+%\smallskip
+%
+%\begin{itemize}
+% \item \MontreCode{Name}: name of the plot (\MontreCode{Gaussian} by default);
+% \item \MontreCode{Trace}: boolean to trace the curve (\MontreCode{false} by default);
+% \item \MontreCode{Couleur}: color of the trace, if requested (\MontreCode{black} by default);
+% \item \MontreCode{Debut}: lower bound of the definition set (\MontreCode{\textbackslash pflxmin} by default);
+% \item \MontreCode{End}: lower bound of the definition set (\MontreCode{\textbackslash pflxmax} by default);
+% \item \MontreCode{Pas}: plot step (it is determined \textit{automatically} at the start but can be modified).
+%\end{itemize}
+%
+%Note that the vertical axis must be adapted according to the parameter of the chi-square law.
+%
+%\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+% \begin{GraphTikz}[
+% x=1.5cm,y=7.5cm,
+% Xmin=0,Xmax=8,Xgrid=1,Xgrids=0.5,
+% Ymin=0,Ymax=0.5,Ygrid=0.1,Ygrids=0.05
+% ]
+% \DrawAxisGrids[Enlarge=2.5mm]{auto}{auto}
+% \DefineKhiTwoLaw[Color=red,Start=0.25,Trace]<phiA>{1}
+% \DefineKhiTwoLaw[Color=blue,Trace]<phiB>{2}
+% \DefineLawKhiDeux[Color=orange,Trace]<phiC>{3}
+% \DefineKhiTwoLaw[Color=purple,Trace]<phiD>{4}
+% \DefineKhiTwoLaw[Color=yellow,Trace]<phiE>{5}
+% \DefineKhiTwoLaw[Color=teal,Trace]<phiF>{6}
+% \end{GraphTikz}
+%\end{tcblisting}
+
+\pagebreak
+
+\section{Commands specific to two-variable statistics}
+
+\subsection{Limitations}
+
+Given the specific features of \TikZ, we advise you not to use values that are too \textit{large} at axis level (this can cause problems with years, for example), or else you'll have to \textit{transform} axis and/or data values so that everything is displayed as it should be (also beware of regressions, calculations, etc.).
+
+\subsection{The point scatter}\label{scatter}
+
+In addition to commands linked to functions, it is also possible to represent double statistical series.
+
+\smallskip
+
+The following paragraph shows that adding a key allows you to add the linear adjustment line.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\DrawScatter[keys]{ListX}{ListY}
+\end{tcblisting}
+
+The optional \MontreCode{[key]} is:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{ColorScatter}: color of the cloud points (\MontreCode{black} by default).
+\end{itemize}
+
+\smallskip
+
+The mandatory arguments allow you to specify:
+
+\smallskip
+
+\begin{itemize}
+ \item the list of x;
+ \item the list of y.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.075cm,y=0.03cm,Xmin=0,Xmax=160,Xgrid=20,Xgrids=10,
+ Origy=250,Ymin=250,Ymax=400,Ygrid=25,Ygrids=5]
+ %window preparation
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{0,10,...,160}{250,275,...,400}
+ %A cloud of dots
+ \DrawScatter[Style=x,ColorScatter=red]{0,50,100,140}{275,290,315,350}
+\end{GraphTikz}
+\end{tcblisting}
+
+\subsection{The regression line}\label{reglin}
+
+The linear regression line (obtained by the least squares method) can easily be added, using the key \MontreCode{DrawLine}.
+
+\smallskip
+
+In this case, new keys are available:
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{ColorLine}: color of the line (\MontreCode{black} by default);
+ \item \MontreCode{Rounds}: precision of coefficients (\MontreCode{empty} by default);
+ \item \MontreCode{Start}: initial abscissa of the plot (\MontreCode{\textbackslash pflxmin} by default);
+ \item \MontreCode{End}: terminal abscissa of the plot (\MontreCode{\textbackslash pflxmax} by default);
+ \item \MontreCode{Name}: name of the line, for later use (\MontreCode{reglin} by default).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.075cm,y=0.03cm,Xmin=0,Xmax=160,Xgrid=20,Xgrids=10,
+ Origy=250,Ymin=250,Ymax=400,Ygrid=25,Ygrids=5]
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\small]{0,10,...,160}{250,275,...,400}
+ %cloud and right
+ \DrawScatter%
+ [ColorScatter=red,ColorLine=brown,DrawLine]%
+ {0,50,100,140}{275,290,315,350}
+ %picture
+ \DrawRanges[Colors=cyan/magenta,Lines]{d}{120}
+ %history
+ \DrawCounterimage[Style=x,Colors=blue/green!50!black,Lines]{reglin}{300}
+\end{GraphTikz}
+\end{tcblisting}
+
+\subsection{Other regressions}\label{regressions}
+
+In partnership with the \MontreCode{xint-regression} package, loaded by the package (but \textit{can be deactivated} via the \MontreCode{[noxintreg]} option), it is possible to work on other types of regression:
+
+\begin{itemize}
+ \item linear \fbox{$ax+b$};
+ \item quadratic \fbox{$ax^2+bx+c$};
+ \item cubic \fbox{$ax^3+bx^2+cx+d$};
+ \item power \fbox{$ax^b$};
+ \item exponential \fbox{$ab^x$} or \fbox{$e^{ax+b}$} or \fbox{$b e^{ax}$} or \fbox{$C + be^{ax} $};
+ \item logarithmic \fbox{$a+b\ln(x)$};
+ \item hyperbolic \fbox{$a+\displaystyle\frac{b}{x}$}.
+\end{itemize}
+
+The command, similar to that of defining a curve, is:
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+\DrawRegression[keys]<name fct>{type}<rounded>{listex}{listey}
+\end{tcblisting}
+
+The \MontreCode{[keys]} available are, classically:
+
+\begin{itemize}
+ \item \MontreCode{Start}: lower bound of the definition set (\MontreCode{\textbackslash pflxmin} by default);
+ \item \MontreCode{End}: lower bound of the definition set (\MontreCode{\textbackslash pflxmax} by default);
+ \item \MontreCode{Name}: name of the curve (important for the rest!);
+ \item \MontreCode{Color}: color of the trace (\MontreCode{black} by default);
+ \item \MontreCode{Step}: plot step (it is determined \textit{automatically} at the start but can be modified).
+\end{itemize}
+
+\pagebreak
+
+The second argument, optional and between \MontreCode{<...>}, allows you to name the regression function.
+
+The third argument, mandatory and between \MontreCode{\{...\}} allows you to choose the type of regression, among:
+
+\begin{itemize}
+ \item \MontreCode{lin}: linear \fbox{$ax+b$};
+ \item \MontreCode{quad}: quadratic \fbox{$ax^2+bx+c$};
+ \item \MontreCode{cub}: cubic \fbox{$ax^3+bx^2+cx+d$};
+ \item \MontreCode{pow}: power \fbox{$ax^b$};
+ \item \MontreCode{expab}: exponential \fbox{$ab^x$}
+ \item \MontreCode{hyp}: hyperbolic \fbox{$a+\displaystyle\frac{b}{x}$};
+ \item \MontreCode{log}: logarithmic \fbox{$a+b\ln(x)$};
+ \item \MontreCode{exp}: exponential \fbox{$e^{ax+b}$};
+ \item \MontreCode{expalt}: exponential \fbox{$be^{ax}$};
+ \item \MontreCode{expoff=C}: exponential \fbox{$C + be^{ax}$}.
+\end{itemize}
+
+The fourth argument, optional and between \MontreCode{<...>}, allows you to specify the rounding(s) for the coefficients of the regression function.
+
+The last two arguments are the lists of values of X and Y.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\def\LISTEXX{0,50,100,140}\def\LISTEYY{275,290,315,350}%
+ListX := \LISTEXX\\
+ListY := \LISTEYY
+
+\begin{GraphTikz}
+ [x=0.05cm,y=0.04cm,Xmin=0,Xmax=160,Xgrid=20,Xgrids=10,
+ Origy=250,Ymin=250,Ymax=400,Ygrid=25,Ygrids=5]
+ %window preparation
+ \DrawAxisGrids[Enlarge=2.5mm,Font=\footnotesize]{auto}{auto}
+ %A cloud of dots
+ \DrawScatter[Style=o,ColorScatter=red]{\LISTEXX}{\LISTEYY}
+ %adjustment expoffset
+ \DrawRegression[Color=blue,Name=adjust]<adjust>{expoff=250}{\LISTEXX}{\LISTEYY}
+ %holdings
+ \DrawRanges[Colors=cyan/magenta,Lines]{adjust}{80}
+ \DrawCounterimage[Style=x,Colors=blue/green!50!black,Lines]{adjust}{325}
+\end{GraphTikz}
+
+\xintexpoffreg[offset=250,round=3/1]{\LISTEXX}{\LISTEYY}%
+We obtain $y=250+\num{\expregoffb}\text{e}^{\num{\expregoffa}x}$
+\end{tcblisting}
+
+\newpage
+
+\section{Auxiliary commands}
+
+\subsection{Intro}
+
+In addition to purely \textit{graphic} commands, some auxiliary commands are available:
+
+\begin{itemize}
+ \item a to format a number with a given precision;
+ \item one for working on random numbers, with constraints.
+\end{itemize}
+
+\subsection{Formatted rounding}\label{round number}
+
+The \MontreCode{\textbackslash RoundNb} command allows you to format, using the \MontreCode{siunitx} package, a number (or a calculation), with a given precision. This can be \textit{useful} for formatting results obtained using coordinate retrieval commands, for example.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+\RoundNb[precision]{xint calculation}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\RoundNb{1/3}\\
+\RoundNb{16.1}\\
+\RoundNb[3]{log(10)}\\
+\end{tcblisting}
+
+\subsection{Random number under constraints}\label{nbalea}
+
+The idea of this second command is to be able to determine a random number:
+
+\begin{itemize}
+ \item integer or decimal;
+ \item under constraints (between two fixed values).
+\end{itemize}
+
+This can allow, for example, to work on curves with \textit{random} points, but respecting certain constraints.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+\PickRandomNb(*)[precision (def 0)]{lower limit}{upper limit}[\macro]
+\end{tcblisting}
+
+The star version takes the constraints in strict form ($\text{lower bound} < \text{macro} < \text{upper bound}$) while the normal version takes the constraints in broad form ($\text{lower bound) } \leq \text{macro} \leq \text{upper bound}$).
+
+\smallskip
+
+Note that the \textit{terminals} can be existing \textit{macros}!
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+%a number (2 digits after the decimal point) between 0.75 and 0.95
+%a number (2 digits after the decimal point) between 0.05 and 0.25
+%a number (2 decimal places) between 0.55 and \YrandMax
+%a number (2 decimal places) between \YrandMin and 0.45
+\PickRandomNb[2]{0.75}{0.95}[\YrandMax]%
+\PickRandomNb[2]{0.05}{0.25}[\YrandMin]%
+\PickRandomNb*[2]{0.55}{\YrandMax}[\YrandA]%
+\PickRandomNb*[2]{\YrandMin}{0.45}[\YrandB]%
+%verification
+\num{\YrandMax} \& \num{\YrandMin} \& \num{\YrandA} \& \num{\YrandB}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+%a number (2 digits after the decimal point) between 0.75 and 0.95
+%a number (2 digits after the decimal point) between 0.05 and 0.25
+%a number (2 decimal places) between 0.55 and \YrandMax
+%a number (2 decimal places) between \YrandMin and 0.45
+\PickRandomNb[2]{0.75}{0.95}[\YrandMax]%
+\PickRandomNb[2]{0.05}{0.25}[\YrandMin]%
+\PickRandomNb*[2]{0.55}{\YrandMax}[\YrandA]%
+\PickRandomNb*[2]{\YrandMin}{0.45}[\YrandB]%
+%verification
+\num{\YrandMax} \& \num{\YrandMin} \& \num{\YrandA} \& \num{\YrandB}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+%the curve is designed so that there are 3 antecedents
+\PickRandomNb[2]{0.75}{0.95}[\YrandMax]%
+\PickRandomNb[2]{0.05}{0.25}[\YrandMin]%
+\PickRandomNb*[2]{0.55}{\YrandMax}[\YrandA]%
+\PickRandomNb*[2]{\YrandMin}{0.45}[\YrandB]%
+
+\begin{GraphTikz}
+ [x=0.075cm,y=7.5cm,Xmin=0,Xmax=150,Xgrid=10,Xgrids=5,
+ Ymin=0,Ymax=1,Ygrid=0.1,Ygrids=0.05]
+ \DrawAxisGrids[Last,Enlarge=2.5mm]{auto}{auto}
+ \DefineInterpoCurve[Color=red,Trace,Name=functiontest,Tension=0.75]
+ {(0,\YrandA)(40,\YrandMin)(90,\YrandMax)(140,\YrandB)}
+ \FindCounterimage[Disp=false,Name=ANTECED]{functiontest}{0.5}
+ \DrawCounterimage[Colors=blue/teal,Lines]{functiontest}{0.5}
+ \GetXcoord{(ANTECED-1)}[\Aalpha]
+ \GetXcoord{(ANTECED-2)}[\Bbeta]
+ \GetXcoord
+ {(ANTECED-3)}[\Cgamma]
+\end{GraphTikz}
+
+The solutions of $f(x)=\num{0.5}$ are, by graphic reading:
+$\begin{cases}
+ \alpha \approx \RoundNb[0]{\Aalpha} \\
+ \beta \approx \RoundNb[0]{\Bbeta} \\
+ \gamma \approx \RoundNb[0]{\Cgamma}
+\end{cases}$.
+\end{tcblisting}
+
+\subsection{Monte-Carle method}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%in the GraphiqueTikz environment
+\SimulateMonteCarlo[keys]<function>}{number of points}[\nbptsmcok][\nbptsmcko]
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=10cm,y=10cm,Xmin=0,Xmax=1,Xgrid=0.1,Xgrids=0.05,
+ Ymin=0,Ymax=1,Ygrid=0.1,Ygrids=0.05]
+ \DrawAxisGrids[Enlarge=2.5mm,Last]{auto}{auto}
+ \DefineCurve[Trace,Color=teal,Step=0.001]<f>{sqrt(1-x^2)}
+ \SimulateMonteCarlo<f>{5000}
+\end{GraphTikz}
+
+There is \textcolor{blue}{\num{\nbptsmcok}} blue points,
+there is \textcolor{red}{\num{\nbptsmcko}} red points.
+
+And $\frac{\num{\nbptsmcok}}{\num{\nbptsmc}}
+\approx \RoundNb[4]{\nbptsmcok/\nbptsmc}$
+et $\frac{\pi}{4} \approx \RoundNb[4]{pi/4}$.
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Some pgfplots macros}
+
+In addition to pgfplots/axis, there's few \textit{simple} macros in order to work with \MontreCode{pgfplots/axis} environement.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%find intersection of two [name path] objects defined
+\findintersectionspgf[nodename baises]{object1}{object2}[\myt]
+%global extraction of coordinates
+\gextractxnodepgf{node}[\myxcoord]
+\gextractynodepgf{node}[\myycoord]
+\gextractxynodepgf{node}[\myxcoord][\myycoord]
+%area between curves
+\fillbetweencurvespgf[tikz options]{curve1}{curve2}<soft domain options>
+%cubic splines
+\addplotspline(*)[tikz options]<coeffs>{list of points}[\myspline]
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%\usepackage{alphalph}
+
+\begin{tikzpicture}
+ \begin{axis}%
+ [%
+ axis y line=center,axis x line=middle, %axis
+ axis line style={line width=0.8pt,-latex},
+ x=0.33cm,y=0.55cm,xmin=1985,xmax=2030,ymin=56,ymax=70, %units
+ grid=both,xtick distance=5,ytick distance=2, %gridp
+ minor x tick num=4,minor y tick num=1, %grids
+ extra x ticks={1985},extra x tick style={grid=none}, %origx
+ extra y ticks={56},extra y tick style={grid=none}, %origy
+ x tick label style={/pgf/number format/.cd,use comma,1000 sep={}}, %year
+ major tick length={2*3pt},minor tick length={1.5*3pt}, %grads
+ every tick/.style={line width=0.8pt},enlargelimits=false, %style
+ enlarge x limits={abs=2.5mm,upper},enlarge y limits={abs=2.5mm,upper}, %énlarge
+ ]
+ %spline + y=66
+ \addplot[name path global=eqtest,mark=none,red,line width=1.05pt,domain=1985:2030] {66} ;
+ \def\LISTETEST{1985/60/0§1995/68/0§2015/58/0§2025/69/0§2030/62/-2}
+ \addplotspline*[line width=1.05pt,violet,name path global=splinecubtest]{\LISTETEST}[\monsplineviolet]
+ %equation f(x)=66
+ \findintersectionspgf[MonItsc]{eqtest}{splinecubtest}
+ %extraction of coordinates
+ \gextractxnodepgf{(MonItsc-1)}[\xMonItscA]
+ \gextractxnodepgf{(MonItsc-2)}[\xMonItscB]
+ \gextractxnodepgf{(MonItsc-3)}[\xMonItscC]
+ \gextractxnodepgf{(MonItsc-4)}[\xMonItscD]
+ %vizualisation
+ \xintFor* #1 in {\xintSeq{1}{4}}\do{%
+ \draw[line width=0.9pt,densely dashed,olive,->,>=latex] (MonItsc-#1) -- (\csname xMonItsc\AlphAlph{#1}\endcsname,56) ;
+ \filldraw[olive] (MonItsc-#1) circle[radius=1.75pt] ;
+ }
+ %area
+ \path [name path=xaxis] (1985,56) -- (2030,56);
+ \fillbetweencurvespgf{splinecubtest}{xaxis}<domain={\xMonItscB:\xMonItscA}>
+ \fillbetweencurvespgf{splinecubtest}{xaxis}<domain={\xMonItscD:\xMonItscC}>
+ \end{axis}
+\end{tikzpicture}
+
+Solutions of $f(x)=66$ are \RoundNb[0]{\xMonItscA} \&\ \RoundNb[0]{\xMonItscB} \&\ \RoundNb[0]{\xMonItscC} \&\ \RoundNb[0]{\xMonItscD}.
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,text only}
+\begin{tikzpicture}
+ \begin{axis}%
+ [%
+ axis y line=center,axis x line=middle, %axis
+ axis line style={line width=0.8pt,-latex},
+ x=0.33cm,y=0.55cm,xmin=1985,xmax=2030,ymin=56,ymax=70, %units
+ grid=both,xtick distance=5,ytick distance=2, %gridp
+ minor x tick num=4,minor y tick num=1, %grids
+ extra x ticks={1985},extra x tick style={grid=none}, %origx
+ extra y ticks={56},extra y tick style={grid=none}, %origy
+ x tick label style={/pgf/number format/.cd,use comma,1000 sep={}}, %year
+ major tick length={2*3pt},minor tick length={1.5*3pt}, %grads
+ every tick/.style={line width=0.8pt},enlargelimits=false, %style
+ enlarge x limits={abs=2.5mm,upper},enlarge y limits={abs=2.5mm,upper}, %énlarge
+ ]
+ %spline + y=66
+ \addplot[name path global=eqtest,mark=none,red,line width=1.05pt,domain=1985:2030] {66} ;
+ \def\LISTETEST{1985/60/0§1995/68/0§2015/58/0§2025/69/0§2030/62/-2}
+ \addplotspline*[line width=1.05pt,violet,name path global=splinecubtest]{\LISTETEST}[\monsplineviolet]
+ %equation f(x)=66
+ \findintersectionspgf[MonItsc]{eqtest}{splinecubtest}
+ %extraction of coordinates
+ \gextractxnodepgf{(MonItsc-1)}[\xMonItscA]
+ \gextractxnodepgf{(MonItsc-2)}[\xMonItscB]
+ \gextractxnodepgf{(MonItsc-3)}[\xMonItscC]
+ \gextractxnodepgf{(MonItsc-4)}[\xMonItscD]
+ %vizualisation
+ \xintFor* #1 in {\xintSeq{1}{4}}\do{%
+ \draw[line width=0.9pt,densely dashed,olive,->,>=latex] (MonItsc-#1) -- (\csname xMonItsc\AlphAlph{#1}\endcsname,56) ;
+ \filldraw[olive] (MonItsc-#1) circle[radius=1.75pt] ;
+ }
+ %area
+ \path [name path=xaxis] (1985,56) -- (2030,56);
+ \fillbetweencurvespgf{splinecubtest}{xaxis}<domain={\xMonItscB:\xMonItscA}>
+ \fillbetweencurvespgf{splinecubtest}{xaxis}<domain={\xMonItscD:\xMonItscC}>
+ \end{axis}
+\end{tikzpicture}
+
+Solutions of $f(x)=66$ are \RoundNb[0]{\xMonItscA} \&\ \RoundNb[0]{\xMonItscB} \&\ \RoundNb[0]{\xMonItscC} \&\ \RoundNb[0]{\xMonItscD}.
+\end{tcblisting}
+
+
+
+\section{History}
+
+\begin{quote}
+\begin{verbatim}
+0.2.0 : [Alt] key for Hermite spline + few pgfplots macros
+0.1.9 : Bugfix
+0.1.8 : New commands [in french doc] (binomial, cabweb,\ldots)
+0.1.6 : Vertical asymptote + [in french doc] commands for integrals
+0.1.5 : Initial version [en]
+\end{verbatim}
+\end{quote}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.pdf b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.pdf
index b97f1cf998..0a5577dafe 100644
--- a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.pdf
+++ b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.tex b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.tex
index e845f5c4d1..e851265a5f 100644
--- a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.tex
+++ b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-doc-fr.tex
@@ -6,12 +6,17 @@
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tkz-grapheur}
+\pgfplotsset{compat=newest}
+\usepackage{alphalph}
\usepackage{amsmath}
+\usepackage{enumitem}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{hyperref}
\usepackage{nicefrac}
+\usepackage{fontawesome5}
\usepackage{tcolorbox}
+\usepackage{minted2}
\tcbuselibrary{skins,minted}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
@@ -28,8 +33,8 @@
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.0}
-\def\TPdate{11/05/2024}
+\def\TPversion{0.2.0}
+\def\TPdate{29/10/2024}
\usepackage{soul}
\usepackage{codehigh}
\usepackage{tabularray}
@@ -38,7 +43,7 @@
\hl{\vphantom{\texttt{pf}}\texttt{#1}}%
}
\usepackage[french]{babel}
-
+\sisetup{group-minimum-digits=4}
\renewcommand{\footnoterule}{\vfill\kern -3pt \hrule width 0.4\columnwidth \kern 2.6pt}
\begin{document}
@@ -54,7 +59,9 @@
\begin{tabular}{c}
{\Huge \texttt{tkz-grapheur [fr]}}\\
\\
- {\LARGE Un système de grapheur, basé sur \TikZ.}\\
+ {\LARGE Un système de grapheur,}\\
+ \\
+ {\LARGE basé sur \textsf{\TikZ} et \textsf{xint}.}\\
\\
{\small \texttt{Version \TPversion{} -- \TPdate}}
\end{tabular}
@@ -67,7 +74,7 @@
\begin{tabular}{c}
\texttt{Cédric Pierquet}\\
{\ttfamily c pierquet -- at -- outlook . fr}\\
- \texttt{\url{https://github.com/cpierquet/tkz-grapheur}} \\
+ \texttt{\url{https://forge.apps.education.fr/pierquetcedric/package-latex-tkz-grapheur}} \\
\end{tabular}
\end{center}
@@ -80,8 +87,8 @@
%préparation de la fenêtre
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{0,1,...,10}{0,2,...,16}
%déf des fonctions avec nom courbe + nom fonction + expression
- \DefinirFonction[Nom=cf]<f>{3*x-6}
- \DefinirFonction[Nom=cg]<g>{-(x-6)^2+12}
+ \DefinirCourbe[Nom=cf]<f>{3*x-6}
+ \DefinirCourbe[Nom=cg]<g>{-(x-6)^2+12}
%antécédents et intersection
\TrouverIntersections[Aff=false,Nom=K]{cf}{cg}
\TrouverAntecedents[AffDroite,Couleur=orange,Nom=I]{cg}{8}
@@ -92,7 +99,7 @@
{g(x)}%
{(I-2)}{(J-2)}
%intégrale entre les deux courbes
- \TracerIntegrale[Bornes=noeuds,Type=entre]{f(x)}[g(x)]{(K-1)}{(K-2)}
+ \TracerIntegrale[Bornes=noeuds,Type=fct/fct]{f(x)}[g(x)]{(K-1)}{(K-2)}
%tracé des courbes et des points
\TracerCourbe[Couleur=red]{f(x)}
\TracerCourbe[Couleur=teal]{g(x)}
@@ -121,13 +128,13 @@
%rajouter des valeurs
\RajouterValeursAxeX{0.25,1.4,3.3}{\num{0.25},\num{1.4},\num{3.3}}
%fonction trigo (déf + tracé)
- \DefinirFonction[Nom=ccos,Debut=0,Fin=pi]<fcos>{cos(x)}
- \DefinirFonction[Nom=csin,Debut=0,Fin=pi]<fsin>{sin(x)}
+ \DefinirCourbe[Nom=ccos,Debut=0,Fin=pi]<fcos>{cos(x)}
+ \DefinirCourbe[Nom=csin,Debut=0,Fin=pi]<fsin>{sin(x)}
%intégrale
\TrouverIntersections[Aff=false,Nom=JKL]{ccos}{csin}
%\DefinirPts{FIN/pi/0}
\TracerIntegrale%
- [Bornes=noeud/abs,Type=entre,Couleurs=cyan/cyan!50]%
+ [Bornes=noeud/abs,Type=fct/fct,Couleurs=cyan/cyan!50]%
{fsin(x)}[fcos(x)]%
{(JKL-1)}{pi}
%tracé des courbes
@@ -147,6 +154,7 @@
\vfill
+\hfill{\footnotesize\textit{\ttfamily À mon papa.}}
\vspace*{5mm}
@@ -170,7 +178,7 @@
\subsection{Description et idées générales}
-Avec ce modeste package, loin des capacités offertes par exemple par les excellents packages \MontreCode{tkz-*}\footnote{par exemple tkz-base \url{https://ctan.org/pkg/tkz-base} et tkz-fct \url{https://ctan.org/pkg/tkz-fct}.} (d'Alain Matthes) ou \MontreCode{tzplot}\footnote{CTAN : \url{https://ctan.org/pkg/tzplot}.} (de In-Sung Cho), il est possible de travailler sur des graphiques de fonctions, en langage \TikZ, de manière \textit{intuitive} et \textit{explicite}.
+Avec ce modeste package, loin des capacités offertes par exemple par les excellents packages \MontreCode{pgfplots}\footnote{CTAN : \url{https://ctan.org/pkg/pgfplots}}, \MontreCode{tkz-*}\footnote{par exemple tkz-base \url{https://ctan.org/pkg/tkz-base} et tkz-fct \url{https://ctan.org/pkg/tkz-fct}.} (d'Alain Matthes) ou \MontreCode{tzplot}\footnote{CTAN : \url{https://ctan.org/pkg/tzplot}.} (de In-Sung Cho), il est possible de travailler sur des graphiques de fonctions, en langage \TikZ, de manière \textit{intuitive} et \textit{explicite}.
\smallskip
@@ -179,7 +187,7 @@ Concernant le fonctionnement global :
\smallskip
\begin{itemize}
- \item des styles particuliers pour les objets utilisés ont été définis, mais ils peuvent localement être modifiés ;
+ \item des styles particuliers pour les objets utilisés ont été définis (modifiables localement) ;
\item le nom des commandes est sous forme \textit{opérationnelle}, de sorte que la construction des éléments graphiques a une forme quasi \textit{algorithmique}.
\end{itemize}
@@ -205,7 +213,8 @@ Il sera ensuite possible :
\item de tracer des courbes ;
\item de déterminer graphiquement des images ou des antécédents ;
\item de rajouter des éléments de dérivation (tangentes) ou d'intégration (domaine) ;
- \item de tracer une droite d'ajustement linéaire.
+ \item de tracer une droite d'ajustement linéaire ou la courbe d'un autre ajustement ;
+ \item \dots
\end{itemize}
\subsection{Packages utilisés, et options du package}
@@ -215,20 +224,21 @@ Le package utilise :
\smallskip
\begin{itemize}
- \item \MontreCode{tikz}, avec les librairies \MontreCode{calc,intersections,patterns,patterns.meta} ;
- \item \MontreCode{simplekv} ;
- \item \MontreCode{xintexpr} ;
- \item \MontreCode{xstring} ;
- \item \MontreCode{listofitems}.
+ \item \MontreCode{tikz}, avec les librairies \MontreCode{calc,intersections,patterns,patterns.meta,bbox} ;
+ \item \MontreCode{simplekv}, \MontreCode{xintexpr}, \MontreCode{xstring}, \MontreCode{listofitems} ;
+ \item \MontreCode{pgfplots}, avec la librairie \MontreCode{fillbetween} (désactivable via \MontreCode{[nonpgfplots]}) ;
+ \item \MontreCode{xint-regression}\footnote{CTAN : \url{https://ctan.org/pkg/xint-regression}.} (pour les régressions, désactivable via \MontreCode{[nonxintreg]}).
\end{itemize}
\smallskip
Le package charge également \MontreCode{siunitx} avec les options classiques \texttt{[fr]}, mais il est possible de ne pas le charger en utilisant l'option \MontreCode{[nonsiunitx]}.
-\smallskip
+\pagebreak
-Le package charge également la librairie \TikZ\ \MontreCode{babel}, mais il est possible de ne pas le charger en utilisant l'option \MontreCode{[nontikzbabel]}.
+\subsection{Chargement du package}
+
+Le package charge également la librairie \TikZ\ \MontreCode{babel}, mais il est possible de ne pas la charger en utilisant l'option \MontreCode{[nontikzbabel]}.
\smallskip
@@ -243,9 +253,11 @@ Les différentes options sont bien évidemment cumulables.
%chargement sans tikz.babel
\usepackage[nontikzbabel]{tkz-grapheur}
-\end{tcblisting}
-\pagebreak
+%chargement sans pgfplots + options compat
+\usepackage[nonpgfplots]{tkz-grapheur}
+\pgfplotsset{compat=...}
+\end{tcblisting}
À noter également que certaines commandes peuvent utiliser des packages comme \MontreCode{nicefrac}, qui sera donc à charger le cas échéant.
@@ -261,20 +273,22 @@ Il est possible, dû aux calculs (multiples) effectués en interne, que le temps
La précision des résultats (de détermination) semble être aux environs de $10^{-4}$, ce qui devrait normalement garantir des tracés et lectures \textit{satisfaisantes}. Il est quand même conseillé d'être prudent quant aux résultats obtenus et ceux attendus.
+\pagebreak
+
\subsection{Exemple introductif}
On peut par exemple partir de l'exemple suivant, pour \textit{illustrer} le cheminement des commandes de ce package. Les commandes et la syntaxe seront détaillées dans les sections suivantes !
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
\begin{GraphiqueTikz}%
- [x=7.5cm,y=7.5cm,Xmin=0,Xmax=1.001,Xgrille=0.1,Xgrilles=0.02,
+ [x=10cm,y=10cm,Xmin=0,Xmax=1.001,Xgrille=0.1,Xgrilles=0.02,
Ymin=0,Ymax=1.001,Ygrille=0.1,Ygrilles=0.02]
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]%
{0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1}
{0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1}
- \DefinirFonction[Nom=cf,Debut=0,Fin=1]<f>{x*exp(x-1)}
- \DefinirFonction[Nom=delta,Debut=0,Fin=1]<D>{x}
- \TracerIntegrale[Type=entre]{f(x)}[D(x)]{0}{1}
+ \DefinirCourbe[Nom=cf,Debut=0,Fin=1]<f>{x*exp(x-1)}
+ \DefinirCourbe[Nom=delta,Debut=0,Fin=1]<D>{x}
+ \TracerIntegrale[Type=fct/fct]{f(x)}[D(x)]{0}{1}
\TracerCourbe[Couleur=red]{f(x)}
\TracerCourbe[Couleur=teal]{D(x)}
\PlacerImages[Couleurs=blue/cyan,Traits]{f}{0.8,0.9}
@@ -329,14 +343,24 @@ Concernant les styles des \textit{objets}, ils sont donnés ci-dessous.
\tikzset{pflgrillep/.style={thin,lightgray}}
\tikzset{pflgrilles/.style={very thin,lightgray}}
\tikzset{pflaxes/.style={line width=0.8pt,->,>=latex}}
+\end{tcblisting}
-%style des points (courbe / nuage)
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%style des points (courbe / nuage /labels / montecarlo)
+\tikzset{pflpoint/.style={line width=0.95pt}}
\tikzset{pflpointc/.style={radius=1.75pt}}
\tikzset{pflpointnuage/.style={radius=1.75pt}}
+\tikzset{pflpointmc/.style={radius=0.875pt}}
+\tikzset{pflnoeud/.style={}} %pour les inner sep par exemple :-)
+\tikzset{pflcourbediscont/.style={line width=1.1pt}}
+\end{tcblisting}
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
%style des courbes
\tikzset{pflcourbe/.style={line width=1.05pt}}
+\end{tcblisting}
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
%style des traits (normaux, antécédents, images)
\tikzset{pfltrait/.style={line width=0.8pt}}
\tikzset{pfltraitantec/.style={line width=0.95pt,densely dashed}}
@@ -348,6 +372,18 @@ Concernant les styles des \textit{objets}, ils sont donnés ci-dessous.
\tikzset{pflflechegd/.style={<->,>=latex}}
\end{tcblisting}
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%style des constructions ECC (courbe / paramètres)
+\tikzset{pfltraitsparamecc/.style={line width=0.9pt,densely dashed}}
+\tikzset{pflcourbeecc/.style={line width=1.05pt}}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%style des constructions récurrence
+\tikzset{pfltraitrec/.style={line width=0.8pt}}
+\tikzset{pfltraitrecpointill/.style={pfltraitrec,densely dashed}}
+\end{tcblisting}
+
L'idée est donc de pouvoir redéfinir globalement ou localement les styles, et éventuellement de rajouter des éléments, en utilisant \mintinline{latex}|monstyle/.append style={...}|.
\subsection{Création de l'environnement}\label{creaenvt}
@@ -399,7 +435,7 @@ La première commande \textit{utile} va permettre de créer les grilles, les axe
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
%dans l'environnement GraphiqueTikz
-\TracerAxesGrille[clés]{gradX}{gradY}
+\TracerAxesGrilles[clés]{gradX}{gradY}
\end{tcblisting}
Les \MontreCode{[clés]}, optionnelles, disponibles sont :
@@ -460,6 +496,8 @@ Les options possible sont :
\end{GraphiqueTikz}
\end{tcblisting}
+À noter qu'il existe les clés booléennes \MontreCode{[Derriere]} (sans les graduations) et \MontreCode{[Devant]} (sans la grille) pour afficher les axes en mode \textit{sous/sur}-impression dans le cas d'intégrales par exemple.
+
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
\begin{GraphiqueTikz}%
[x=2.75cm,y=3cm,
@@ -529,9 +567,52 @@ Les arguments obligatoires correspondent aux abscisses (en langage\TikZ) et aux
\section{Commandes spécifiques de définitions}
+\subsection{Tracer une droite}\label{tracdroite}
+
+L'idée est de proposer une commande pour tracer une droite, à partir :
+
+\begin{itemize}
+ \item de deux points (ou nœuds) ;
+ \item d'un point (ou nœud) et de la pente.
+\end{itemize}
+
+Il existe également une commande pour une asymptote verticale.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\TracerDroite[clés]{point ou nœud}{point ou noeud ou pente}
+\TracerAsymptote[clés]{abscisse}
+\end{tcblisting}
+
+Les \MontreCode{[clés]}, optionnelles, disponibles sont :
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Nom} : nom éventuel du tracé (pour réutilisation) ;
+ \item \MontreCode{Pente} : booléen pour préciser que la pente est utilisée (\MontreCode{false} par défaut) ;
+ \item \MontreCode{Debut} : début du tracé (\MontreCode{\textbackslash pflxmin} par défaut) ;
+ \item \MontreCode{Fin} : fin du tracé (\MontreCode{\textbackslash pflxmax} par défaut) ;
+ \item \MontreCode{Couleur} : couleur du tracé (\MontreCode{black} par défaut).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirPts[Aff,Couleur=gray]{A/-4/3,B/2/0,C/0/-1}
+ \TracerDroite[Couleur=red]{(-2,-1)}{(2,4)}
+ \TracerDroite[Couleur=blue,Debut=-5,Fin=3]{(A)}{(B)}
+ \TracerDroite[Couleur=olive,Pente]{(C)}{0.25}
+ \TracerAsymptote[Couleur=brown]{-6}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\pagebreak
+
\subsection{Définir une fonction, tracer la courbe d'une fonction}\label{deftracfct}
-La première idée est de définir une fonction, pour réutilisation ultérieure. Cette commande \textit{crée} la fonction, sans la tracer, car dans certains cas des éléments devront être tracés au préalable.
+L'idée est de définir une fonction, pour réutilisation ultérieure. Cette commande \textit{crée} la fonction, sans la tracer, car dans certains cas des éléments devront être tracés au préalable.
\smallskip
@@ -539,7 +620,7 @@ Il existe également une commande pour tracer la courbe d'une fonction précéde
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
%dans l'environnement GraphiqueTikz
-\DefinirFonction[clés]<nom fct>{formule xint}
+\DefinirCourbe[clés]<nom fct>{formule xint}
\TracerCourbe[clés]{formule xint}
\end{tcblisting}
@@ -550,9 +631,9 @@ Les \MontreCode{[clés]} pour la définition ou le tracé, optionnelles, disponi
\begin{itemize}
\item \MontreCode{Debut} : borne inférieure de l'ensemble de définition (\MontreCode{\textbackslash pflxmin} par défaut) ;
\item \MontreCode{Fin} : borne inférieure de l'ensemble de définition (\MontreCode{\textbackslash pflxmax} par défaut) ;
- \item \MontreCode{Nom} : = nom de la courbe (important pour la suite !) ;
- \item \MontreCode{Couleur} : = couleur du tracé (\MontreCode{black} par défaut) ;
- \item \MontreCode{Pas} : = pas du tracé (il est déterminé \textit{automatiquement} au départ mais peut être modifié) ;
+ \item \MontreCode{Nom} : nom de la courbe (important pour la suite !) ;
+ \item \MontreCode{Couleur} : couleur du tracé (\MontreCode{black} par défaut) ;
+ \item \MontreCode{Pas} : pas du tracé (il est déterminé \textit{automatiquement} au départ mais peut être modifié) ;
\item \MontreCode{Trace} : booléen pour tracer également la courbe (\MontreCode{false} par défaut).
\end{itemize}
@@ -562,10 +643,11 @@ Les \MontreCode{[clés]} pour la définition ou le tracé, optionnelles, disponi
Ymin=40,Ymax=56,Ygrille=2,Ygrilles=1,Origy=40]
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{4,5,...,20}{40,42,...,56}
%définition de la fonction + tracé de la courbe
- \DefinirFonction[Nom=cf,Debut=5,Fin=19]<f>{-2*x+3+24*log(2*x)}
+ %la fonction ln a été créée pour xint !
+ \DefinirCourbe[Nom=cf,Debut=5,Fin=19]<f>{-2*x+3+24*ln(2*x)}
\TracerCourbe[Couleur=red,Debut=5,Fin=19]{f(x)}
%ou en une seule commande si "suffisant"
- %\DefinirFonction[Nom=cf,Debut=5,Fin=19,Trace]<f>{-2*x+3+24*log(2*x)}
+ %\DefinirCourbe[Nom=cf,Debut=5,Fin=19,Trace]<f>{-2*x+3+24*ln(2*x)}
\end{GraphiqueTikz}
\end{tcblisting}
@@ -618,8 +700,8 @@ Certaines exploitations demandant des techniques différentes suivant le type de
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
%dans l'environnement GraphiqueTikz
-\DefinirSpline[clés]{liste des points support}[\macronomspline]
-\TracerSpline[clés]{liste des points support}[\macronomspline]
+\DefinirCourbeSpline[clés]{liste des points support}[\macronomspline]
+\TracerCourbeSpline[clés]{liste des points support}[\macronomspline]
\end{tcblisting}
Les \MontreCode{[clés]} pour la définition ou le tracé, optionnelles, disponibles sont :
@@ -627,10 +709,11 @@ Les \MontreCode{[clés]} pour la définition ou le tracé, optionnelles, disponi
\smallskip
\begin{itemize}
- \item \MontreCode{Nom} : = nom de la courbe d'interpolation (important pour la suite !) ;
+ \item \MontreCode{Nom} : nom de la courbe d'interpolation (important pour la suite !) ;
\item \MontreCode{Coeffs} : modifier (voir la documentation de \textsf{ProfLycee}\footnote{CTAN : \url{https://ctan.org/pkg/proflycee}} les \textit{coefficients} du spline ;
- \item \MontreCode{Couleur} : = couleur du tracé (\MontreCode{black} par défaut) ;
- \item \MontreCode{Trace} : booléen pour tracer également la courbe (\MontreCode{false} par défaut).
+ \item \MontreCode{Couleur} : couleur du tracé (\MontreCode{black} par défaut) ;
+ \item \MontreCode{Trace} : booléen pour tracer également la courbe (\MontreCode{false} par défaut) ;
+ \item \MontreCode{Alt} : booléen pour activer une autre \textit{méthode de calcul} (\MontreCode{false} par défaut).
\end{itemize}
L'argument obligatoire permet quant à lui de spécifier la liste des points supports sous la forme \MontreCode{x1/y1/f'1§x2/y2/f'2§...} avec :
@@ -644,12 +727,13 @@ L'argument obligatoire permet quant à lui de spécifier la liste des points sup
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
\begin{GraphiqueTikz}%
- [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ [x=0.8cm,y=0.8cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
\TracerAxesGrilles[Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
%définition de la liste des points support du spline
\def\LISTETEST{-6/4/-2§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}
- %définition et tracé du spline cubique
- \DefinirSpline[Nom=splinetest,Trace,Couleur=olive]{\LISTETEST}
+ %définition et tracé du spline cubique (x2)
+ \DefinirCourbeSpline[Nom=splinetest,Trace,Couleur=olive]{\LISTETEST}
+ \DefinirCourbeSpline[Alt,Nom=splinetest,Trace,Couleur=teal]{\LISTETEST}
\end{GraphiqueTikz}
\end{tcblisting}
@@ -661,10 +745,14 @@ La seconde idée est de travailler avec des nœuds \TikZ, qui pourront être uti
\smallskip
+Il est également possible de définir des nœuds pour des points \textit{image}.
+
+\smallskip
+
Certaines commandes (explicités ultérieurement) permettent de déterminer des points particuliers des courbes sous forme de nœuds, donc il semble intéressant de pouvoir en définir directement.
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
-%dans l'environnement GraphiqueTikz
+%par les coordonnées
\DefinirPts[clés]{Nom1/x1/y1,Nom2/x2/y2,...}
\end{tcblisting}
@@ -677,6 +765,22 @@ Les \MontreCode{[clés]}, optionnelles, disponibles sont :
\item \MontreCode{Couleur} : couleur des points, si \MontreCode{Aff=true} (\MontreCode{black} par défaut).
\end{itemize}
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%sous forme d'image
+\DefinirImage[clés]{objet}{abscisse}
+\end{tcblisting}
+
+Les \MontreCode{[clés]}, optionnelles, disponibles sont :
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Nom} : nom du nœud (\MontreCode{vide} par défaut) ;
+ \item \MontreCode{Spline} : booléen pour spécifier qu'un spline est utilisé (\MontreCode{false} par défaut).
+\end{itemize}
+
+Le premier argument obligatoire est l'\textit{objet} considéré (nom de la courbe pour le spline, fonction sinon) ; le second est l'abscisse du point considéré.
+
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
\begin{GraphiqueTikz}%
[x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
@@ -686,6 +790,106 @@ Les \MontreCode{[clés]}, optionnelles, disponibles sont :
\DefinirFonction[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
%nœuds manuels
\DefinirPts[Aff,Couleur=brown]{A/7/42,B/16/49}
+ %nœud image
+ \DefinirImage[Nom=IMGf]{f}{14}
+ \MarquerPts*[Style=x,Couleur=blue]{(IMGf)}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Marquage de points}\label{markpts}
+
+L'idée est de proposer de quoi marquer des points avec un style particulier.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\MarquerPts(*)[clés]<police>{liste}
+\end{tcblisting}
+
+La version \textit{étoilée} marque les points sans les \og noms \fg, alors que la version \textit{non étoilée} les affiche :
+
+\begin{itemize}
+ \item dans le cas de la version \textit{étoilée}, la liste est à donner sous la forme \MontreCode{(ptA),(ptB),...} ;
+ \item sinon, la liste est à donner sous la forme \MontreCode{(ptA)/labelA/poslabelA,...}.
+\end{itemize}
+
+\smallskip
+
+Les \MontreCode{[clés]}, optionnelles, disponibles sont :
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Couleur} : couleur (\MontreCode{black} par défaut) ;
+ \item \MontreCode{Style} : style des marques (\MontreCode{o} par défaut).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[x=1.5cm,y=1.5cm,Ymin=-2]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirPts{A/1.75,-1.25}\MarquerPts[Couleur=pink]{(A)/A/below} %rond (par défaut)
+ \MarquerPts[Couleur=teal]{(1,1)/M/below}
+ \MarquerPts[Couleur=red,Style=x]{(1.25,1)/$A$/below} %croix
+ \MarquerPts[Couleur=orange,Style=+]<\small\sffamily>{(1.5,1)/K/below} %plus
+ \MarquerPts[Couleur=blue,Style=c]{(1.75,1)/P/below} %carré
+ \MarquerPts[Couleur=gray,Style=d]{(2,1)/P/below} %diamant
+ \MarquerPts*[Couleur=orange/yellow]{(2,2),(2.5,2.25)} %rond bicolore
+ \MarquerPts*[Style=+,Couleur=red]{(1,2)}
+ \MarquerPts*[Style=x,Couleur=blue]{(2.25,1)}
+ \MarquerPts*[Style=c,Couleur=magenta]{(-2,-1)}
+ \MarquerPts[Couleur=red,Style=x]{(-1,1)/$A$/below,(-2,2)/$B$/below left}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+À noter qu'il est également possible de modifier la taille des marques \MontreCode{o/x/+/c} via les \MontreCode{[clés]} :
+
+\begin{itemize}
+ \item \MontreCode{Taillex=...} (\MontreCode{2pt} par défaut) pour les points \textit{croix} ;
+ \item \MontreCode{Tailleo=...} (\MontreCode{1.75pt} par défaut) pour les points \textit{cercle} ;
+ \item \MontreCode{Taillec=...} (\MontreCode{2pt} par défaut) pour les points \textit{carré}.
+\end{itemize}
+
+\pagebreak
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[x=1cm,y=1cm,Xmin=0,Ymin=0]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \MarquerPts[Couleur=red,Style=x,Taillex=3.5pt]{(1.25,1.25)/$A$/below}
+ \MarquerPts[Couleur=teal,Tailleo=2.5pt]{(2,2)/$A$/right}
+ \MarquerPts*[Couleur=orange,Style=c,Taillec=4pt]{(0.5,2.5)}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\subsection{Marquer des points de discontinuité}\label{ptsdiscont}
+
+Il est possible de marquer des points de discontinuité, mais c'est commande est \textit{déconnectée} des commandes de tracé de courbes/splines.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\AfficherPtsDiscont[clés]{liste}
+\end{tcblisting}
+
+Le premier argument, \textit{optionnel} et entre \MontreCode{[...]}, contient les \MontreCode{Clés} suivantes :
+
+\begin{itemize}
+ \item \MontreCode{Couleur=...} (\MontreCode{black} par défaut) ;
+ \item \MontreCode{Pos=...} (\MontreCode{D} par défaut) pour choisir la position de la discontinuité (parmi \MontreCode{G/D}) ;
+ \item \MontreCode{Echelle=...} (\MontreCode{1} par défaut) pour modifier l'échelle du symbole ;
+ \item \MontreCode{Type=...} (\MontreCode{par} par défaut) pour choisir le type de symbole, parmi \MontreCode{par/cro/rond/demirond}.
+\end{itemize}
+
+Le second argument, obligatoire et entre \MontreCode{\{...\}} permet de préciser la liste des points en lesquels le symbole de discontinuité sera positionné, sous la forme \MontreCode{x1/y1/d1 § x2/y2/d2 § ...} avec les points \MontreCode{(xi;yi)} et \MontreCode{f'(xi)=di}.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[x=1cm,y=1cm,Xmin=0,Xmax=10,Ymin=0,Ymax=5]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirCourbeSpline[Trace,Couleur=red]{0/1/-1 § 4/4/0}
+ \AfficherPtsDiscont{4/4/0}
+ \AfficherPtsDiscont[Pos=G,Type=cro]{0/1/-1}
+ \DefinirCourbeSpline[Trace,Couleur=blue]{5/1/1.5 § 8/4/0.5}
+ \AfficherPtsDiscont[Couleur=blue,Type=rond]{8/4/0.5}
+ \AfficherPtsDiscont[Couleur=blue,Pos=G,Type=demirond,Echelle=2]{5/1/1.5}
\end{GraphiqueTikz}
\end{tcblisting}
@@ -704,6 +908,30 @@ Les calculs étant effectués en flottant en fonction des unités (re)calculées
\RecupererCoordonnees{nœud}[\macrox][\macroy]
\end{tcblisting}
+\subsection{Placer du texte}\label{placetxt}
+
+À noter qu'une commande de placement de texte est disponible.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\PlacerTexte[clés]{(nœud ou coordonnées)}{texte}
+\end{tcblisting}
+
+Les \MontreCode{[clés]} disponibles sont :
+
+\begin{itemize}
+ \item \MontreCode{Police=...} (\MontreCode{\textbackslash normalsize\textbackslash normalfont} par défaut) pour la police ;
+ \item \MontreCode{Couleur=...} (\MontreCode{black} par défaut) pour la couleur ;
+ \item \MontreCode{Position=...} (\MontreCode{vide} par défaut) pour la position du texte par rapport aux coordonnées.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+ \begin{GraphiqueTikz}[x=1cm,y=1cm,Xmin=0,Xmax=5,Ymin=0,Ymax=1]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \PlacerTexte[Couleur=red,Police=\LARGE,Position=right]{(1.5,0.5)}{courbe $C_1$}
+ \end{GraphiqueTikz}
+\end{tcblisting}
+
\pagebreak
\section{Commandes spécifiques d'exploitation des courbes}
@@ -716,7 +944,7 @@ La fonction/courbe utilisée doit avoir été déclarée précédemment pour que
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
%dans l'environnement GraphiqueTikz
-\PlacerImages[clés]{focntion ou courbe}{liste d'abscisses}
+\PlacerImages[clés]{fonction ou courbe}{liste d'abscisses}
\end{tcblisting}
Les \MontreCode{[clés]}, optionnelles, disponibles sont :
@@ -746,7 +974,7 @@ Le premier argument obligatoire, permet de spécifier :
Ymin=40,Ymax=56,Ygrille=2,Ygrilles=1,Origy=40]
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{4,5,...,20}{40,42,...,56}
%définition de la fonction + tracé de la courbe
- \DefinirFonction[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
+ \DefinirCourbe[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
%images
\PlacerImages[Traits,Couleurs=teal/blue]{f}{6,7,8,9,10}
\end{GraphiqueTikz}
@@ -790,23 +1018,23 @@ Le second argument obligatoire, permet de spécifier la valeur à atteindre.
Ymin=40,Ymax=56,Ygrille=2,Ygrilles=1,Origy=40]
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{4,5,...,20}{40,42,...,56}
%définition de la fonction + tracé de la courbe
- \DefinirFonction[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
+ \DefinirCourbe[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
%antécédents
\TrouverAntecedents[Couleur=teal,AffDroite,Aff]{cf}{53}
%les deux antécédents sont aux nœuds (S-1) et (S-2)
\end{GraphiqueTikz}
\end{tcblisting}
-Les \MontreCode{[clés]}, optionnelles, disponibles sont :
-
-\smallskip
-
-\begin{itemize}
- \item \MontreCode{Nom} : base du nom des \textbf{nœuds} intersection (\MontreCode{S} par défaut, ce qui donnera \textsf{S-1}, \textsf{S-2}, etc) ;
- \item \MontreCode{Aff} : booleen pour afficher les points (\MontreCode{true} par défaut) ;
- \item \MontreCode{Couleur} : couleur des points (\MontreCode{black} par défaut) ;
- \item \MontreCode{AffDroite} : booleen pour afficher la droite horizontale (\MontreCode{false} par défaut).
-\end{itemize}
+%Les \MontreCode{[clés]}, optionnelles, disponibles sont :
+%
+%\smallskip
+%
+%\begin{itemize}
+% \item \MontreCode{Nom} : base du nom des \textbf{nœuds} intersection (\MontreCode{S} par défaut, ce qui donnera \textsf{S-1}, \textsf{S-2}, etc) ;
+% \item \MontreCode{Aff} : booleen pour afficher les points (\MontreCode{true} par défaut) ;
+% \item \MontreCode{Couleur} : couleur des points (\MontreCode{black} par défaut) ;
+% \item \MontreCode{AffDroite} : booleen pour afficher la droite horizontale (\MontreCode{false} par défaut).
+%\end{itemize}
\pagebreak
@@ -845,7 +1073,7 @@ Le second argument obligatoire, permet de spécifier la valeur à atteindre.
Ymin=40,Ymax=56,Ygrille=2,Ygrilles=1,Origy=40]
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{4,5,...,20}{40,42,...,56}
%définition de la fonction + tracé de la courbe
- \DefinirFonction[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
+ \DefinirCourbe[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
%antécédents
\PlacerAntecedents[Couleurs=teal/cyan,Traits,Nom=PO]{cf}{53}
\RecupererAbscisse{(PO-1)}[\premsol]
@@ -894,8 +1122,8 @@ Le premier argument obligatoire, permet de spécifier le \textbf{nom} de la seco
[x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
Ymin=40,Ymax=56,Ygrille=2,Ygrilles=1,Origy=40]
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{4,5,...,20}{40,42,...,56}
- \DefinirFonction[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
- \DefinirFonction[Nom=cg,Debut=5,Fin=19,Trace,Couleur=blue]<f>{0.25*(x-12)^2+46}
+ \DefinirCourbe[Nom=cf,Debut=5,Fin=19,Trace,Couleur=red]<f>{-2*x+3+24*log(2*x)}
+ \DefinirCourbe[Nom=cg,Debut=5,Fin=19,Trace,Couleur=blue]<g>{0.25*(x-12)^2+46}
%intersections, nommées (TT-1) et (TT-2)
\TrouverIntersections[Nom=TT,Couleur=darkgray,Aff,Traits]{cf}{cg}
%récupération des points d'intersection
@@ -911,7 +1139,90 @@ $(\ArrondirNum[2]{\alphaB};\ArrondirNum[2]{\betaB})$.
\pagebreak
-\subsection{Intégrales}\label{integr}
+\subsection{Extremums}\label{maximum}\label{minimum}
+
+L'idée (encore \textit{expérimentale}) est de proposer des commandes pour extraire les extremums d'une courbe définie par le package.
+
+La commande crée le nœud correspondant, et il est du coup possible de récupérer ses coordonnées pour exploitation ultérieure.
+
+\smallskip
+
+Il est possible, en le spécifiant, de travailler sur les différentes courbes gérées par le package (fonction, interpolation, spline).
+
+Pour des courbes singulières, il est possible que les résultats ne soient pas tout à fait ceux attendus\ldots
+
+\smallskip
+
+{\small\faBomb} Pour le moment, les \textit{limitations} sont :
+
+\begin{itemize}
+ \item pas de gestion d'extremums multiples (seul le premier sera traité)\ldots
+ \item pas de gestion d'extremums aux bornes du tracé\ldots
+ \item pas de récupération automatique des paramètres de définition des courbes\ldots
+ \item le temps de compilation peut être plus long\ldots
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\TrouverMaximum[clés]{objet}[nœud créé]
+\TrouverMinimum[clés]{objet}[nœud créé]
+\end{tcblisting}
+
+Les \MontreCode{[clés]}, optionnelles, disponibles sont :
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Methode} : méthode, parmi \MontreCode{fonction/interpo/spline} pour les calculs (\MontreCode{fonction} par défaut) ;
+ \item \MontreCode{Debut} : début du tracé (\MontreCode{\textbackslash pflxmin} par défaut) ;
+ \item \MontreCode{Fin} : fin du tracé (\MontreCode{\textbackslash pflxmax} par défaut) ;
+ \item \MontreCode{Pas} : pas du tracé si \MontreCode{fonction} (il est déterminé \textit{automatiquement} au départ mais peut être modifié) ;
+ \item \MontreCode{Coeffs} : modifier les \textit{coefficients} du spline si \MontreCode{spline} ;
+ \item \MontreCode{Tension} : paramétrage de la \textit{tension} du tracé d'interpolation si \MontreCode{interpo}(\MontreCode{0.5} par défaut).
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[x=1cm,y=1cm,Xmin=-1,Xmax=5,Ymin=-1,Ymax=3]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirCourbe[Nom=cf,Debut=0.35,Fin=4.2,Trace]%
+ <f>{0.6*cos(4.5*(x-4)+2.1)-1.2*sin(x-4)+0.1*x+0.2}
+ \TrouverMaximum[Debut=0.35,Fin=4.2]{f}[cf-max]
+ \TrouverMaximum[Debut=3,Fin=4]{f}[cf-maxlocal]
+ \TrouverMinimum[Debut=1,Fin=2]{f}[cf-minlocal]
+ \MarquerPts*[Couleur=red,Traits]{(cf-max)}
+ \MarquerPts*[Couleur=blue,Traits]{(cf-maxlocal)}
+ \MarquerPts*[Couleur=olive,Traits]{(cf-minlocal)}
+ \RecupererCoordonnees{(cf-max)}[\MonMaxX][\MonMaxY]
+\end{GraphiqueTikz}\\
+Le maximum est $M\approx\ArrondirNum{\MonMaxY}$, atteint en $x\approx\ArrondirNum{\MonMaxX}$
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirCourbeInterpo[Nom=interpotest,Couleur=red,Trace,Tension=1]%
+ {(-6,4)(-2,-2)(3,3.5)}
+ \TrouverMinimum[Methode=interpo,Tension=1]{(-6,4)(-2,-2)(3,3.5)}[interpo-min]
+ \MarquerPts*[Couleur=blue]{(interpo-min)}
+ \RecupererCoordonnees{(interpo-min)}[\MinInterpoX][\MinInterpoY]
+\end{GraphiqueTikz}\\
+Le minimum est $M\approx\ArrondirNum[3]{\MinInterpoY}$, atteint en $x\approx\ArrondirNum[3]{\MinInterpoX}$
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=1.2cm,y=1.6cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=3,Ygrille=0.5,Ygrilles=0.25]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \def\LISTETEST{-6/2/0§-1/-2/0§2/1/0§3.5/0/-1}
+ \DefinirCourbeSpline[Nom=splinetest,Trace]{\LISTETEST}
+ \TrouverMinimum[Methode=spline]{\LISTETEST}[spline-min]
+ \MarquerPts*[Couleur=red]{(spline-min)}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Intégrales (version améliorée)}\label{integr}
On peut également travailler avec des intégrales.
@@ -923,13 +1234,17 @@ Il est possible de :
\begin{itemize}
\item représenter une intégrale \textbf{sous} une courbe définie ;
- \item représenter une intégrale \textbf{entre} deux courbes (sauf avec des splines\ldots) ;
+ \item représenter une intégrale \textbf{entre} deux courbes ;
\item les bornes d'intégration peuvent être des abscisses et/ou des nœuds.
\end{itemize}
+\smallskip
+
+{\small\faBomb} Compte-tenu des différences de traitement entre les courbes par formule, les courbes par interpolation simple ou les courbes par interpolation cubique, les arguments et clés peuvent différer suivant la configuration !
+
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
%dans l'environnement GraphiqueTikz
-\TracerIntegrale[clés]<options spécifiques>{fonction ou spline}[courbe inf]{A}{B}
+\TracerIntegrale[clés]<options spécifiques>{objet1}[objet2]{A}{B}
\end{tcblisting}
Les \MontreCode{[clés]} pour la définition ou le tracé, optionnelles, disponibles sont :
@@ -939,7 +1254,14 @@ Les \MontreCode{[clés]} pour la définition ou le tracé, optionnelles, disponi
\item \MontreCode{Style} : type de remplissage, parmi \MontreCode{remplissage}/\MontreCode{hachures} (\MontreCode{remplissage} par défaut) ;
\item \MontreCode{Opacite} : opacité (\MontreCode{0.5} par défaut) du remplissage ;
\item \MontreCode{Hachures} : style (\MontreCode{north west lines} par défaut) du remplissage hachures ;
- \item \MontreCode{Type} : type d'intégrale parmi \MontreCode{dessous}/\MontreCode{entre} (\MontreCode{dessous} par défaut) ;
+ \item \MontreCode{Type} : type d'intégrale parmi
+ \begin{itemize}
+ \item \MontreCode{fct} (défaut) pour une intégrale sous une courbe définie par une formule ;
+ \item \MontreCode{spl} pour une intégrale sous une courbe définie par un spline cublique ;
+ \item \MontreCode{fct/fct} pour une intégrale entre deux courbes définie par une formule ;
+ \item \MontreCode{fct/spl} pour une intégrale entre une courbe (dessus) définie par une formule et une courbe (dessous) définie par un spline cubique ;
+ \item etc
+ \end{itemize}
\item \MontreCode{Pas} : pas (calculé par défaut sinon) pour le tracé ;
\item \MontreCode{Jonction} : jonction des segments (\MontreCode{bevel} par défaut) ;
\item \MontreCode{Bornes} : type des bornes parmi :
@@ -950,18 +1272,32 @@ Les \MontreCode{[clés]} pour la définition ou le tracé, optionnelles, disponi
\item \MontreCode{noeud/abs} pour les bornes données par nœud et abscisse ;
\end{itemize}
\item \MontreCode{Bord} : booléen (\MontreCode{true} par défaut) pour afficher les traits latéraux,%
- \item \MontreCode{Spline} : booléen (\MontreCode{false} par défaut) pour préciser qu'un spline est utilisé ;
- \item \MontreCode{NomSpline} : nom (important !) du spline généré précédemment \MontreCode{\textbackslash monspline}.
+ \item \MontreCode{NomSpline} : macro (important !) du spline généré précédemment pour un spline en version supérieure ;
+ \item \MontreCode{NomSplineB} : macro (important !) du spline généré précédemment pour un spline en version inférieure ;
+ \item \MontreCode{NomInterpo} : nom (important !) de la courbe d'interpolation générée précédemment, en version supérieure ;
+ \item \MontreCode{NomInterpoB} : nom (important !) de la courbe d'interpolation générée précédemment, en version inférieure ;
+ \item \MontreCode{Tension} : tension pour la courbe d'interpolation générée précédemment, en version supérieure ;
+ \item \MontreCode{TensionB} : tension de la courbe d'interpolation générée précédemment, en version inférieure.
\end{itemize}
\smallskip
-Le premier argument obligatoire est la fonction ou la courbe du spline.
+Le premier argument obligatoire est la fonction ou la courbe du spline ou la liste de points d'interpolation.
+
+\smallskip
+
+L'argument suivant, optionnel, est la fonction ou la courbe du spline ou la liste de points d'interpolation.
\smallskip
Les deux derniers arguments obligatoires sont les bornes de l'intégrale, données sous une forme en adéquation avec la clé \MontreCode{Bornes}.
+\pagebreak
+
+Dans le cas de courbes définies par des \textit{points}, il est nécessaire de travailler sur des intervalles sur lesquels la première courbe est \textbf{au-dessus} de la deuxième.
+
+Il sera sans doute intéressant de travailler avec les \textit{intersections} dans ce cas.
+
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
\begin{GraphiqueTikz}%
[x=0.6cm,y=0.06cm,
@@ -969,7 +1305,7 @@ Les deux derniers arguments obligatoires sont les bornes de l'intégrale, donné
Ymin=0,Ymax=155,Ygrille=10,Ygrilles=5]
\TracerAxesGrilles%
[Grads=false,Elargir=2.5mm]{}{}
- \DefinirFonction[Nom=cf,Debut=1,Fin=20,Couleur=red]<f>{80*x*exp(-0.2*x)}
+ \DefinirCourbe[Nom=cf,Debut=1,Fin=20,Couleur=red]<f>{80*x*exp(-0.2*x)}
\TracerIntegrale
[Bornes=abs,Couleurs=blue/cyan!50]%
{f(x)}{3}{12}
@@ -984,11 +1320,11 @@ Les deux derniers arguments obligatoires sont les bornes de l'intégrale, donné
[x=1.2cm,y=1.6cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=3,Ygrille=0.5,Ygrilles=0.25]
\TracerAxesGrilles[Grads=false,Elargir=2.5mm]{}{}
\def\LISTETEST{-6/2/0§-1/-2/0§2/1/0§3.5/0/-1}
- \DefinirSpline[Nom=splinetest]{\LISTETEST}
- \TracerIntegrale[Spline,Style=hachures,Couleurs=purple]{splinetest}{-5.75}{-4.75}
- \TracerIntegrale[Spline,Couleurs=blue]{splinetest}{-2}{-1}
- \TracerIntegrale[Spline,Couleurs=orange]{splinetest}{1}{3}
- \TracerSpline[Couleur=olive]{\LISTETEST}
+ \DefinirCourbeSpline[Nom=splinetest]{\LISTETEST}
+ \TracerIntegrale[Type=spl,Style=hachures,Couleurs=purple]{splinetest}{-5.75}{-4.75}
+ \TracerIntegrale[Type=spl,Couleurs=blue]{splinetest}{-2}{-1}
+ \TracerIntegrale[Type=spl,Couleurs=orange]{splinetest}{1}{3}
+ \TracerCourbeSpline[Couleur=olive]{\LISTETEST}
\TracerAxesGrilles[Grille=false,Elargir=2.5mm]
{-7,-6,...,4}%
{-3,-2.5,...,3}
@@ -1039,7 +1375,7 @@ Le dernier argument obligatoire est le point de travail (version abscisse ou nœ
[x=0.9cm,y=0.425cm,Xmin=4,Xmax=20,Origx=4,
Ymin=40,Ymax=56,Ygrille=2,Ygrilles=1,Origy=40]
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{4,5,...,20}{40,42,...,56}
- \DefinirFonction[Nom=cf,Debut=5,Fin=19,Couleur=red,Trace]<f>{-2*x+3+24*log(2*x)}
+ \DefinirCourbe[Nom=cf,Debut=5,Fin=19,Couleur=red,Trace]<f>{-2*x+3+24*log(2*x)}
\TrouverAntecedents[Couleur=teal,Nom=JKL,Aff=false]{cf}{53}
%tangente
\TracerTangente%
@@ -1052,7 +1388,7 @@ Le dernier argument obligatoire est le point de travail (version abscisse ou nœ
[x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
\TracerAxesGrilles[Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
\def\LISTETEST{-6/4/-0.5§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}
- \DefinirSpline[Nom=splinetest,Trace,Couleur=olive]{\LISTETEST}
+ \DefinirCourbeSpline[Nom=splinetest,Trace,Couleur=olive]{\LISTETEST}
\TracerTangente[Couleurs=red,Spline,AffPoint]{splinetest}{1}
\TracerTangente%
[Couleurs=blue,Spline,DecG=1.5,DecD=1.5,AffPoint]{splinetest}{-3}%
@@ -1064,9 +1400,381 @@ Le dernier argument obligatoire est le point de travail (version abscisse ou nœ
\pagebreak
-\section{Commandes spécifiques des statistiques à deux variables}
+\subsection{Suites récurrentes et toiles}\label{toilerecurr}
+
+L'idée est d'obtenir une commande pour tracer la \og toile \fg{} permettant d'obtenir -- graphiquement -- les termes d'une suite récurrente définie par une relation $u_{n+1}=f(u_n)$.
+
+La commande est compatible avec une fonction précédemment définie, mais également avec une courbe type \textit{spline} précédemment définie.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\TracerToileRecurrence[clés]{fct ou courbe}
+\end{tcblisting}
+
+Le premier argument, \textit{optionnel} et entre \MontreCode{[...]}, contient les \MontreCode{Clés} suivantes :
+
+\begin{itemize}
+ \item \MontreCode{Couleur=...} (\MontreCode{black} par défaut) ;
+ \item \MontreCode{Spline=...} (\MontreCode{false} par défaut) pour spécifier qu'une courbe \textit{spline} est utilisée ;
+ \item \MontreCode{No=...} (\MontreCode{0} par défaut) est l'indice initial ;
+ \item \MontreCode{Uno=...} est qui est la valeur du terme initial (à donner obligatoirement !) ;
+ \item \MontreCode{Nom=...} (\MontreCode{u} par défaut) est le nom de la suite ;
+ \item \MontreCode{Nb=...} (\MontreCode{5} par défaut) ;
+ \item \MontreCode{AffTermes=...} (\MontreCode{false} par défaut) qui est un booléen pour afficher les termes ;
+ \item \MontreCode{AffPointilles=...} (\MontreCode{true} par défaut) pour afficher les pointillés ;
+ \item \MontreCode{TailleLabel=...} (\MontreCode{\textbackslash small} par défaut) ;
+ \item \MontreCode{PosLabel=...} (\MontreCode{below} par défaut).
+\end{itemize}
+
+Le second argument, obligatoire et entre \MontreCode{\{...\}} permet de préciser l'objet avec lequel il faut effectuer les tracés (fonction ou nom\_courbe).
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.75cm,y=0.75cm,Xmin=0,Xmax=10,Xgrille=1,Xgrilles=0.5,
+ Ymin=0,Ymax=8,Ygrille=1,Ygrilles=0.5]
+ \TracerAxesGrilles[Elargir=2.5mm,Police=\small]{auto}{auto}
+ \DefinirCourbe[Couleur=red,Nom=cf,Debut=0,Fin=10,Trace]<f>{sqrt(5*x)+1}
+ \TracerCourbe[Couleur=blue]{x}
+ \TracerToileRecurrence[Couleur=orange,No=1,Uno=1]{f}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[x=4cm,y=3cm,Xmin=0,Xmax=2.5,Xgrille=1,Xgrilles=0.25,
+ Ymin=0,Ymax=1.25,Ygrille=0.5,Ygrilles=0.25]
+ \TracerAxesGrilles[Elargir=2.5mm,Police=\small]{auto}{auto}
+ \DefinirCourbeInterpo[Nom=interpotest,Couleur=blue,Trace]%
+ {(0,0)(0.5,0.75)(1,0.25)(2,1)(2.5,0.25)}
+ \TracerCourbe[Couleur=olive]{x}
+ \TracerToileRecurrence%
+ [AffTermes,Couleur=purple,Spline,No=0,Uno=2,PosLabel=above left]%
+ {interpotest}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\section{Commandes spécifiques des fonctions de densité}
+
+\subsection{Loi normale}\label{loinormale}
+
+L'idée est de proposer de quoi travailler avec des lois normales.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\DefinirLoiNormale[clés]<nom fct>{mu}{sigma}
+\TracerLoiNormale[clés]{fct(x)}
+\end{tcblisting}
+
+Les \MontreCode{[clés]}, optionnelles, disponibles sont :
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Nom} : nom du tracé (\MontreCode{gaussienne} par défaut) ;
+ \item \MontreCode{Trace} : booléen pour tracer la courbe(\MontreCode{false} par défaut) ;
+ \item \MontreCode{Couleur} : couleur du tracé, si demandé (\MontreCode{black} par défaut) ;
+ \item \MontreCode{Debut} : borne inférieure de l'ensemble de définition (\MontreCode{\textbackslash pflxmin} par défaut) ;
+ \item \MontreCode{Fin} : borne inférieure de l'ensemble de définition (\MontreCode{\textbackslash pflxmax} par défaut) ;
+ \item \MontreCode{Pas} : pas du tracé (il est déterminé \textit{automatiquement} au départ mais peut être modifié).
+\end{itemize}
+
+À noter que l'axe vertical est à adapter en fonction des paramètres de la loi normale.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=1.25cm,y=15cm,Origx=5,Xmin=5,Xmax=15,Ymin=0,Ymax=0.3,
+ Ygrille=0.1,Ygrilles=0.05]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirLoiNormale[Nom=gaussienne]<phi>{10}{1.5}
+ \TracerIntegrale
+ [Bornes=abs,Couleurs=blue/cyan!50]%
+ {phi(x)}{7}{13}
+ \TracerLoiNormale[Couleur=violet,Debut=5,Fin=15]{phi(x)}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Loi du khi deux}\label{loikhideux}
+
+L'idée est de proposer de quoi travailler avec des lois normales.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\DefinirLoiKhiDeux[clés]<nom fct>{k}
+\TracerLoiKhiDeux[clés]{fct(x)}
+\end{tcblisting}
+
+Les \MontreCode{[clés]}, optionnelles, disponibles sont :
+
+\smallskip
+
+\begin{itemize}
+ \item \MontreCode{Nom} : nom du tracé (\MontreCode{gaussienne} par défaut) ;
+ \item \MontreCode{Trace} : booléen pour tracer la courbe(\MontreCode{false} par défaut) ;
+ \item \MontreCode{Couleur} : couleur du tracé, si demandé (\MontreCode{black} par défaut) ;
+ \item \MontreCode{Debut} : borne inférieure de l'ensemble de définition (\MontreCode{\textbackslash pflxmin} par défaut) ;
+ \item \MontreCode{Fin} : borne inférieure de l'ensemble de définition (\MontreCode{\textbackslash pflxmax} par défaut) ;
+ \item \MontreCode{Pas} : pas du tracé (il est déterminé \textit{automatiquement} au départ mais peut être modifié).
+\end{itemize}
+
+À noter que l'axe vertical est à adapter en fonction du paramètre de la loi du khi deux.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[
+ x=1.5cm,y=7.5cm,
+ Xmin=0,Xmax=8,Xgrille=1,Xgrilles=0.5,
+ Ymin=0,Ymax=0.5,Ygrille=0.1,Ygrilles=0.05
+ ]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirLoiKhiDeux[Couleur=red,Debut=0.25,Trace]<phiA>{1}
+ \DefinirLoiKhiDeux[Couleur=blue,Trace]<phiB>{2}
+ \DefinirLoiKhiDeux[Couleur=orange,Trace]<phiC>{3}
+ \DefinirLoiKhiDeux[Couleur=violet,Trace]<phiD>{4}
+ \DefinirLoiKhiDeux[Couleur=yellow,Trace]<phiE>{5}
+ \DefinirLoiKhiDeux[Couleur=teal,Trace]<phiF>{6}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\subsection{Histogramme pour une loi binomiale}\label{histobinom}
+
+Il est également possible (d'une manière moins explicite que dans \MontreCode{ProfLycee}) de représenter l'histogramme d'une loi binomiale (\MontreCode{ProfLycee} permet de déterminer les unités automatiquement, ici elles doivent être précisées et connues).
+
+Il est également possible de rajouter la loi normale \og associée \fg.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\TracerHistoBinomiale[clés]<nom fct normale>{n}{p}
+\end{tcblisting}
+
+Le premier argument, optionnel et entre \MontreCode{[...]} propose les clés suivantes :
+
+\begin{itemize}
+
+ \item \MontreCode{Plage} : plage, sous la forme \MontreCode{a-b} du coloriage éventuel ;
+ \item \MontreCode{CouleurPlage} : couleur de la plage éventuelle ;
+ \item \MontreCode{ClipX} : restriction de l'axe Ox, sous la forme \MontreCode{a-b} ;
+ \item \MontreCode{AffNormale} : booléen (\MontreCode{true} par défaut) pour rajouter la loi normale ;
+ \item \MontreCode{CouleurNormale} : couleur pour la loi normale.
+\end{itemize}
+
+Les arguments obligatoires et entre \MontreCode{\{...\}} permettent de spécifier les paramètres de la loi binomiale.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+%les unités ont été déterminées au préalable...
+\begin{GraphiqueTikz}[x=0.2cm,y=50cm,Origx=-0.5,Xmin=-0.5,Xmax=50.5,
+ Xgrille=5,Xgrilles=1,Ymin=0,Ymax=0.12,Ygrille=0.01,Ygrilles=0.001]
+ \TracerAxesGrilles[Elargir=2.5mm,Police=\small,Grille=false]%
+ {0,5,...,50}{auto}
+ \TracerHistoBinomiale{50}{0.4}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+%les unités ont été déterminées au préalable...
+\begin{GraphiqueTikz}[x=0.5cm,y=100cm,Origx=14.5,Xmin=14.5,Xmax=35.5,
+ Xgrille=5,Xgrilles=1,Ymin=0,Ymax=0.09,Ygrille=0.01,Ygrilles=0.001]
+ \TracerAxesGrilles[Elargir=2.5mm,Police=\small,Grille=false]%
+ {15,20,...,35}{auto}
+ \TracerHistoBinomiale%
+ [ClipX=15-35,Plage=18-25,CouleurPlage=teal,AffNormale,CouleurNormale=red]%
+ {1000}{0.02}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\pagebreak
+
+\section{Commandes spécifiques des méthodes intégrales}
+
+\subsection{Méthodes géométriques}\label{methodesintergrales}
+
+L'idée est de proposer plusieurs méthodes graphiques pour illustrer graphiquement une intégrale, via :
+
+\begin{itemize}
+ \item une méthode des rectangles (Gauche, Droite ou Milieu) ;
+ \item la méthode des trapèzes.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\RepresenterMethodeIntegrale[clés]<fonction>{a}{b}
+\end{tcblisting}
+
+Les \MontreCode{Clés} disponibles sont :
+
+\begin{itemize}
+ \item \MontreCode{Spline} : booléen pour préciser qu'un spline est utilisé, \MontreCode{false} par défaut ;
+ \item \MontreCode{Couleur} : couleur des tracés, \MontreCode{red} par défaut ;
+ \item \MontreCode{NbSubDiv} : nombre de subdivisions, \MontreCode{10} par défaut ;
+ \item \MontreCode{Methode} : méthode géométrique utilisée, parmi parmi \MontreCode{RectanglesGauche / RectanglesDroite / RectanglesMilieu / Trapezes} pour spécifier la méthode utilisée, \MontreCode{RectanglesGauche} par défaut ;
+ \item \MontreCode{Remplir} : booléen, \MontreCode{true} par défaut, pour remplir les éléments graphiques ;
+ \item \MontreCode{CouleurRemplissage} : couleur de remplissage, définie par rapport à la couleur principale par défaut ;
+ \item \MontreCode{Opacite} : opacité, \MontreCode{0.25} par défaut, du remplissage.
+\end{itemize}
+
+\smallskip
+
+Le deuxième argument, optionnel et entre \MontreCode{<...>}, correspond à la fonction ou le spline \textbf{précédemment définie} !
+
+\smallskip
+
+Les deux derniers arguments, obligatoires, correspondent aux bornes de l'intégrale.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}
+ [x=0.66cm,y=0.033cm,Xmin=0,Xmax=21,Xgrille=2,Xgrilles=1,
+ Ymin=0,Ymax=160,Ygrille=20,Ygrilles=10]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirCourbe[Couleur=red,Nom=cf,Debut=1,Fin=20,Trace]<f>{80*x*exp(-0.2*x)}
+ \RepresenterMethodeIntegrale[Couleur=teal]<f>{5}{15}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}
+ [x=0.66cm,y=0.033cm,Xmin=0,Xmax=21,Xgrille=2,Xgrilles=1,
+ Ymin=0,Ymax=160,Ygrille=20,Ygrilles=10]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirCourbe[Couleur=red,Nom=cf,Debut=1,Fin=20,Trace]<f>{80*x*exp(-0.2*x)}
+ \RepresenterMethodeIntegrale
+ [Methode=RectanglesDroite,Couleur=orange,NbSubDiv=7]<f>{1}{10}
+\end{GraphiqueTikz}
+\end{tcblisting}
-\subsection{Le nuage de points}\label{nuage}
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}
+ [x=0.66cm,y=0.033cm,Xmin=0,Xmax=21,Xgrille=2,Xgrilles=1,
+ Ymin=0,Ymax=160,Ygrille=20,Ygrilles=10]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirCourbe[Couleur=red,Nom=cf,Debut=1,Fin=20,Trace]<f>{80*x*exp(-0.2*x)}
+ \RepresenterMethodeIntegrale
+ [Methode=RectanglesMilieu,Couleur=yellow,NbSubDiv=25]<f>{1}{20}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}
+ [x=0.66cm,y=0.033cm,Xmin=0,Xmax=21,Xgrille=2,Xgrilles=1,
+ Ymin=0,Ymax=160,Ygrille=20,Ygrilles=10]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirCourbe[Couleur=red,Nom=cf,Debut=1,Fin=20,Trace]<f>{80*x*exp(-0.2*x)}
+ \RepresenterMethodeIntegrale
+ [Methode=Trapezes,Couleur=pink,Remplir=false]<f>{1}{20}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=0,Ymax=5]
+ \TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+ \DefinirListeSpline{-6.5/0/2.5§-2/4/0§3.75/0/-1}[\lstsplineB]
+ \DefinirCourbeSpline[Nom=splinered]{\lstsplineB}
+ \TracerCourbeSpline[Couleur=red]{\lstsplineB}
+ \RepresenterMethodeIntegrale[Methode=RectanglesMilieu,Spline,Couleur=teal]<splinered>{-5}{1.25}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\subsection{Méthode de Monte-Carlo}\label{montecarlo}
+
+L'idée est de proposer une commande pour simuler un calcul intégral via la méthode de Monte-Carlo.
+
+Le code se charge de simuler les \textit{tirages}, et les résultats peuvent être stockés dans des macros.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\SimulerMonteCarlo[clés]<fonction>{nb essais}[\nbptsmcok][\nbptsmcko]
+\end{tcblisting}
+
+Les \MontreCode{Clés} disponibles sont :
+
+\begin{itemize}
+ \item \MontreCode{Couleurs} : couleurs des points, \MontreCode{blue/red} par défaut ;
+ \item \MontreCode{BornesX} : bornes \textit{horizontales} pour la simulation, valant \MontreCode{\textbackslash pflxmin,\textbackslash pflxmax} par défaut ;
+ \item \MontreCode{BornesY} : bornes \textit{verticales} pour la simulation, valant \MontreCode{\textbackslash pflymin,\textbackslash pflymax} par défaut.
+\end{itemize}
+
+Le deuxième argument, optionnel et entre \MontreCode{<...>}, est la fonction \textbf{précédemment définie} à utiliser.
+
+\smallskip
+
+Les deux derniers arguments, optionnels et entre \MontreCode{[...]}, sont les macros dans lesquelles sont stockées les résultats de la simulation. Ces macros sont \MontreCode{\textbackslash nbptsmcok} et \MontreCode{\textbackslash nbptsmcko} par défaut.
+
+À noter que la macro \MontreCode{\textbackslash nbptsmc} permet de récupérer le nombre de points utilisés.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+%avec \sisetup{group-minimum-digits=4} pour le formatage des "milliers"
+
+\begin{GraphiqueTikz}%
+ [x=10cm,y=10cm,Xmin=0,Xmax=1,Xgrille=0.1,Xgrilles=0.05,
+ Ymin=0,Ymax=1,Ygrille=0.1,Ygrilles=0.05]
+ \TracerAxesGrilles[Elargir=2.5mm,Dernier]{auto}{auto}
+ \DefinirCourbe[Trace,Couleur=teal,Pas=0.001]<f>{sqrt(1-x^2)}
+ \SimulerMonteCarlo<f>{5000}
+\end{GraphiqueTikz}
+
+Le nombre de points bleus est de \textcolor{blue}{\num{\nbptsmcok}},
+le nombre de points rouges est de \textcolor{red}{\num{\nbptsmcko}}.
+
+La proportion de points bleus est de $\frac{\num{\nbptsmcok}}{\num{\nbptsmc}}
+\approx \ArrondirNum[4]{\nbptsmcok/\nbptsmc}$
+et $\frac{\pi}{4} \approx \ArrondirNum[4]{pi/4}$.
+\end{tcblisting}
+
+\pagebreak
+
+\section{Commandes spécifiques des statistiques}
+
+\subsection{Limitations}
+
+Compte-tenu des spécificités de \TikZ, il est conseillé de ne pas utiliser de valeurs trop \textit{grandes} au niveau de axes (cela peut coincer avec des année par exemple\ldots), ou bien il faudra \textit{transformer} les valeurs des axes et/ou des données pour que tout s'affiche comme il faut (attention également aux régressions, aux calculs\ldots).
+
+\subsection{Courbe des ECC/FCC (1 variable)}\label{cbeECC}
+
+Il est possible de travailler sur une représentation de la courbe des ECC/FCC.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+\TracerCourbeECC[clés]{liste valeurs}{liste effectifs}
+\end{tcblisting}
+
+Le code se charge de déterminer une valeur des paramètres, pour utilisation ultérieure (avec arrondis éventuels car ils sont obtenus par \textit{conversions}) :
+
+\begin{itemize}
+ \item le premier quartile, $Q_1$, est stocké dans la macro \MontreCode{\textbackslash ValPremQuartile} ;
+ \item la médiane, méd, est stocké dans la macro \MontreCode{\textbackslash ValMed} ;
+ \item le troisième quartile, $Q_3$, est stocké dans la macro \MontreCode{\textbackslash ValTroisQuartile}.
+\end{itemize}
+
+Les \MontreCode{Clés} disponibles sont :
+
+\begin{itemize}
+ \item \MontreCode{Couleur=...} : couleur du tracé, \MontreCode{black} par défaut ;
+ \item \MontreCode{AffParams} : booléen, \MontreCode{true} par défaut, pour afficher les paramètres ;
+ \item \MontreCode{CouleursParams=...} : couleur des paramètres, \MontreCode{black} par défaut ;
+ \item \MontreCode{TraitsComplets} : booléen, \MontreCode{true} par défaut, pour afficher les pointillés en entier
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[x=0.15cm,y=0.03cm,Xmin=0,Xmax=75,Xgrille=10,Xgrilles=5,
+ Ymin=0,Ymax=200,Ygrille=20,Ygrilles=10]
+ \TracerAxesGrilles[Elargir=2.5mm,Police=\small]{auto}{auto}
+ \TracerCourbeECC%
+ [Couleur=blue,CouleursParams={lime!75!black/pink!75!black},
+ TraitsComplets=false]%
+ {0,15,25,35,40,45,55,65,75}%
+ {15,20,50,30,35,25,15,10}
+ %ajouts 'manuels'
+ \PlacerTexte[Couleur=lime!75!black,Police=\small,Position=below]%
+ {(\ValPremQuartile,0)}{\ArrondirNum[0]{\ValPremQuartile}}
+ \PlacerTexte[Couleur=lime!75!black,Police=\small,Position=below]%
+ {(\ValTroisQuartile,0)}{\ArrondirNum[0]{\ValTroisQuartile}}
+ \PlacerTexte[Couleur=pink!75!black,Police=\small,Position=below]%
+ {(\ValMed,0)}{\ArrondirNum[0]{\ValMed}}
+\end{GraphiqueTikz}
+
+\end{tcblisting}
+
+\subsection{Le nuage de points (2 variables)}\label{nuage}
En marge des commandes liées aux fonctions, il est également possible de représenter des séries statistiques doubles.
@@ -1105,11 +1813,11 @@ Les arguments, obligatoires, permettent de spécifier :
%préparation de la fenêtre
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{0,10,...,160}{250,275,...,400}
%nuage de points
- \TracerNuage[CouleurNuage=red]{0,50,100,140}{275,290,315,350}
+ \TracerNuage[Style=x,CouleurNuage=red]{0,50,100,140}{275,290,315,350}
\end{GraphiqueTikz}
\end{tcblisting}
-\subsection{La droite de régression}\label{reglin}
+\subsection{La droite de régression (2 variables)}\label{reglin}
La droite de régression linéaire (obtenue par la méthode des moindres carrés) peut facilement être rajoutée, en utilisant la clé \MontreCode{TracerDroite}.
@@ -1134,15 +1842,91 @@ Dans ce cas, de nouvelles clés sont disponibles :
\TracerAxesGrilles[Elargir=2.5mm,Police=\small]{0,10,...,160}{250,275,...,400}
%nuage et droite
\TracerNuage%
- [CouleurDroite=red,CouleurDroite=brown,TracerDroite]%
+ [CouleurNuage=red,CouleurDroite=brown,TracerDroite]%
{0,50,100,140}{275,290,315,350}
%image
\PlacerImages[Couleurs=cyan/magenta,Traits]{d}{120}
%antécédents
- \PlacerAntecedents[Couleurs=blue/green!50!black,Traits]{reglin}{300}
+ \PlacerAntecedents[Style=x,Couleurs=blue/green!50!black,Traits]{reglin}{300}
\end{GraphiqueTikz}
\end{tcblisting}
+\subsection{Autres régressions (2 variables)}\label{regressions}
+
+En partenariat avec le package \MontreCode{xint-regression}, chargé par le package (mais \textit{désactivable} via l'option \MontreCode{[nonxintreg]}), il est possible de travailler sur d'autres types de régression :
+
+\begin{itemize}
+ \item linéaire \fbox{$ax+b$} ;
+ \item quadratique \fbox{$ax^2+bx+c$} ;
+ \item cubique \fbox{$ax^3+bx^2+cx+d$} ;
+ \item puissance \fbox{$ax^b$} ;
+ \item exponentielle \fbox{$ab^x$} ou \fbox{$e^{ax+b}$} ou \fbox{$b e^{ax}$} ou \fbox{$C + be^{ax}$} ;
+ \item logarithmique \fbox{$a+b\ln(x)$} ;
+ \item hyperbolique \fbox{$a+\displaystyle\frac{b}{x}$}.
+\end{itemize}
+
+La commande, similaire à celle de définition d'une courbe, est :
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+\TracerAjustement[clés]<non fct>{type}<arrondis>{listex}{listey}
+\end{tcblisting}
+
+Les \MontreCode{[clés]} disponibles sont, de manière classique :
+
+\begin{itemize}
+ \item \MontreCode{Debut} : borne inférieure de l'ensemble de définition (\MontreCode{\textbackslash pflxmin} par défaut) ;
+ \item \MontreCode{Fin} : borne inférieure de l'ensemble de définition (\MontreCode{\textbackslash pflxmax} par défaut) ;
+ \item \MontreCode{Nom} : nom de la courbe (important pour la suite !) ;
+ \item \MontreCode{Couleur} : couleur du tracé (\MontreCode{black} par défaut) ;
+ \item \MontreCode{Pas} : pas du tracé (il est déterminé \textit{automatiquement} au départ mais peut être modifié).
+\end{itemize}
+
+\pagebreak
+
+Le deuxième argument, optionnel et entre \MontreCode{<...>} permet de nommer la fonction de régression.
+
+Le troisième argument, obligatoire et entre \MontreCode{\{...\}} permet de choisir le type de régression, parmi :
+
+\begin{itemize}
+ \item \MontreCode{lin} : linéaire \fbox{$ax+b$} ;
+ \item \MontreCode{quad} : quadratique \fbox{$ax^2+bx+c$} ;
+ \item \MontreCode{cub} : cubique \fbox{$ax^3+bx^2+cx+d$} ;
+ \item \MontreCode{pow} : puissance \fbox{$ax^b$} ;
+ \item \MontreCode{expab} : exponentielle \fbox{$ab^x$}
+ \item \MontreCode{hyp} : hyperbolique \fbox{$a+\displaystyle\frac{b}{x}$} ;
+ \item \MontreCode{log} : logarithmique \fbox{$a+b\ln(x)$} ;
+ \item \MontreCode{exp} : exponentielle \fbox{$e^{ax+b}$} ;
+ \item \MontreCode{expalt} : exponentielle \fbox{$be^{ax}$} ;
+ \item \MontreCode{expoff=C} : exponentielle \fbox{$C + be^{ax}$}.
+\end{itemize}
+
+Le quatrième argument, optionnel et entre \MontreCode{<...>} permet de spécifier le ou les arrondis pour les coefficients de la fonction de régression.
+
+Les deux derniers arguments sont les listes des valeurs de X et de Y.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\def\LISTEXX{0,50,100,140}\def\LISTEYY{275,290,315,350}%
+ListeX := \LISTEXX\\
+ListeY := \LISTEYY
+
+\begin{GraphiqueTikz}
+ [x=0.05cm,y=0.04cm,Xmin=0,Xmax=160,Xgrille=20,Xgrilles=10,
+ Origy=250,Ymin=250,Ymax=400,Ygrille=25,Ygrilles=5]
+ %préparation de la fenêtre
+ \TracerAxesGrilles[Elargir=2.5mm,Police=\footnotesize]{auto}{auto}
+ %nuage de points
+ \TracerNuage[Style=o,CouleurNuage=red]{\LISTEXX}{\LISTEYY}
+ %ajustement expoffset
+ \TracerAjustement[Couleur=blue,Nom=ajust]<ajust>{expoff=250}{\LISTEXX}{\LISTEYY}
+ %exploitations
+ \PlacerImages[Couleurs=cyan/magenta,Traits]{ajust}{80}
+ \PlacerAntecedents[Style=x,Couleurs=blue/green!50!black,Traits]{ajust}{325}
+\end{GraphiqueTikz}
+
+\xintexpoffreg[offset=250,round=3/1]{\LISTEXX}{\LISTEYY}%
+On obtient $y=250+\num{\expregoffb}\text{e}^{\num{\expregoffa}x}$
+\end{tcblisting}
+
\pagebreak
\section{Codes source des exemples de la page d'accueil}
@@ -1150,10 +1934,10 @@ Dans ce cas, de nouvelles clés sont disponibles :
\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
\begin{GraphiqueTikz}[x=0.85cm,y=0.35cm,Xmin=0,Xmax=10,Ymin=0,Ymax=16]
%préparation de la fenêtre
- \TracerAxesGrilles[Elargir=2.5mm,Police=\small]{0,1,...,10}{0,2,...,16}
+ \TracerAxesGrilles[Derriere,Elargir=2.5mm,Police=\small]{0,1,...,10}{0,2,...,16}
%déf des fonctions avec nom courbe + nom fonction + expression (tracés à la fin !)
- \DefinirFonction[Nom=cf]<f>{3*x-6}
- \DefinirFonction[Nom=cg]<g>{-(x-6)^2+12}
+ \DefinirCourbe[Nom=cf]<f>{3*x-6}
+ \DefinirCourbe[Nom=cg]<g>{-(x-6)^2+12}
%antécédents et intersection
\TrouverIntersections[Aff=false,Nom=K]{cf}{cg}
\TrouverAntecedents[AffDroite,Couleur=orange,Nom=I]{cg}{8}
@@ -1164,7 +1948,7 @@ Dans ce cas, de nouvelles clés sont disponibles :
{g(x)}%
{(I-2)}{(J-2)}
%intégrale entre les deux courbes
- \TracerIntegrale[Bornes=noeuds,Type=entre]%
+ \TracerIntegrale[Bornes=noeuds,Type=fct/fct]%
{f(x)}[g(x)]%
{(K-1)}{(K-2)}
%tracé des courbes et des points
@@ -1177,7 +1961,7 @@ Dans ce cas, de nouvelles clés sont disponibles :
%images
\PlacerImages[Couleurs=cyan]{g}{7,7.25,7.5}
%surimpression des axes
- \TracerAxesGrilles[Grads=false,Grille=false,Elargir=2.5mm]{0,1,...,10}{0,2,...,16}
+ \TracerAxesGrilles[Devant,Elargir=2.5mm]{0,1,...,10}{0,2,...,16}
\end{GraphiqueTikz}
\end{tcblisting}
@@ -1189,18 +1973,16 @@ Dans ce cas, de nouvelles clés sont disponibles :
Xmin=0,Xmax=3.5,Xgrille=pi/12,Xgrilles=pi/24,
Ymin=-1.05,Ymax=1.05,Ygrille=0.2,Ygrilles=0.05]
%préparation de la fenêtre
- \TracerAxesGrilles[Grads=false,Elargir=2.5mm,Format=ntrig/nsqrt]%
- {pi/6,pi/4,pi/3,pi/2,2*pi/3,3*pi/4,5*pi/6,pi}
- {0,sqrt(2)/2,1/2,sqrt(3)/2,1,-1,-sqrt(3)/2,-1/2,-sqrt(2)/2}
+ \TracerAxesGrilles[Derriere,Elargir=2.5mm,Format=ntrig/nsqrt]{}{}
%rajouter des valeurs
\RajouterValeursAxeX{0.25,1.4,3.3}{\num{0.25},\num{1.4},\num{3.3}}
%fonction trigo (déf + tracé)
- \DefinirFonction[Nom=ccos,Debut=0,Fin=pi]<fcos>{cos(x)}
- \DefinirFonction[Nom=csin,Debut=0,Fin=pi]<fsin>{sin(x)}
+ \DefinirCourbe[Nom=ccos,Debut=0,Fin=pi]<fcos>{cos(x)}
+ \DefinirCourbe[Nom=csin,Debut=0,Fin=pi]<fsin>{sin(x)}
%intégrale
\TrouverIntersections[Aff=false,Nom=JKL]{ccos}{csin}
\TracerIntegrale%
- [Bornes=noeud/abs,Type=entre,Couleurs=cyan/cyan!50]%
+ [Bornes=noeud/abs,Type=fct/fct,Couleurs=cyan/cyan!50]%
{fsin(x)}[fcos(x)]%
{(JKL-1)}{pi}
%tracé des courbes
@@ -1212,7 +1994,7 @@ Dans ce cas, de nouvelles clés sont disponibles :
\PlacerAntecedents[Couleurs=orange/orange!50!black,Traits]{csin}{sqrt(2)/2}
\PlacerAntecedents[Couleurs=green!50!black/green,Traits]{csin}{sqrt(3)/2}
%surimpression axes
- \TracerAxesGrilles[Grille=false,Elargir=2.5mm,Format=ntrig/nsqrt]%
+ \TracerAxesGrilles[Devant,Format=ntrig/nsqrt]%
{pi/6,pi/4,pi/3,pi/2,2*pi/3,3*pi/4,5*pi/6,pi}
{0,sqrt(2)/2,1/2,sqrt(3)/2,1,-1,-sqrt(3)/2,-1/2,-sqrt(2)/2}
\end{GraphiqueTikz}
@@ -1326,22 +2108,28 @@ $\begin{cases}
Les commandes disponibles sont :
-\NewDocumentCommand\lstcmd{ m m m}{%
- \item[\texttt{#1}] : \mintinline{latex}|#2|\hfill{}page \pageref{#3}
+\NewDocumentCommand\lstcmd{ m m m }{%
+ \item[\footnotesize\texttt{#1}]{\footnotesize : \mintinline{latex}|#2|\hfill{}page \pageref{#3}}
}
-\begin{description}
+\begin{description}[noitemsep]
\lstcmd{environnement~~}{\begin{GraphiqueTikz}...\end{GraphiqueTikz}}{creaenvt}
\lstcmd{axes et grilles}{\TracerAxesGrille}{creaaxesgr}
\lstcmd{aj val axes X~~}{\RajouterValeursAxeX}{ajoutvals}
\lstcmd{aj val axes Y~~}{\RajouterValeursAxeY}{ajoutvals}
- \lstcmd{def fonction~~~}{\DefinirFonction}{deftracfct}
+ \lstcmd{def fonction~~~}{\DefinirCourbe}{deftracfct}
\lstcmd{tracé courbe~~~}{\TracerCourbe}{deftracfct}
\lstcmd{def interpo~~~~}{\DefinirCourbeInterpo}{deftracinterpo}
\lstcmd{tracé interpo~~}{\TracerCourbeInterpo}{deftracinterpo}
- \lstcmd{def spline~~~~~}{\DefinirSpline}{deftracfctspline}
- \lstcmd{tracé spline~~~}{\TracerSpline}{deftracfctspline}
+ \lstcmd{def spline~~~~~}{\DefinirCourbeSpline}{deftracfctspline}
+ \lstcmd{tracé spline~~~}{\TracerCourbeSpline}{deftracfctspline}
+ \lstcmd{tracé droite~~~}{\TracerDroite}{tracdroite}
+ \lstcmd{asymptote vert~}{\TracerAsymptote}{tracdroite}
\lstcmd{def points~~~~~}{\DefinirPts}{defpts}
+ \lstcmd{def image~~~~~~}{\DefinirImage}{defpts}
+ \lstcmd{marq pts~~~~~~~}{\MarquerPts}{markpts}
+ \lstcmd{placer txt~~~~~}{\PlacerTexte}{placetxt}
+ \lstcmd{pts discont~~~~}{\AfficherPtsDiscont}{ptsdiscont}
\lstcmd{récup absc~~~~~}{\RecupererAbscisse}{recupcoordo}
\lstcmd{récup ordo~~~~~}{\RecupererOrdonnee}{recupcoordo}
\lstcmd{récup coordos~~}{\RecupererCoordonnees}{recupcoordo}
@@ -1349,21 +2137,161 @@ Les commandes disponibles sont :
\lstcmd{antécédents~~~~}{\TrouverAntecedents}{defanteced}
\lstcmd{antécédents~~~~}{\PlacerAntecedents}{tracanteced}
\lstcmd{intersection~~~}{\TrouverIntersections}{intersect}
+ \lstcmd{maximum~~~~~~~~}{\TrouverMaximum}{maximum}
+ \lstcmd{minimum~~~~~~~~}{\TrouverMinimum}{minimum}
\lstcmd{intégrale~~~~~~}{\TracerIntegrale}{integr}
+ \lstcmd{méthodes int~~~}{\RepresenterMethodeIntegrale}{methodesintergrales}
+ \lstcmd{Monte-Carlo~~~~}{\SimulerMonteCarlo}{montecarlo}
\lstcmd{tangente~~~~~~~}{\TracerTangente}{tgte}
+ \lstcmd{toile récurr~~~}{\TracerToileRecurrence}{toilerecurr}
+ \lstcmd{loi normale~~~~}{\DefinirLoiNormale}{loinormale}
+ \lstcmd{loi normale~~~~}{\TracerLoiNormale}{loinormale}
+ \lstcmd{loi khideux~~~~}{\DefinirLoiKhiDeux}{loikhideux}
+ \lstcmd{loi khideux~~~~}{\TracerLoiKhiDeux}{loikhideux}
+ \lstcmd{loi binom~~~~~~}{\TracerHistoBinomiale}{histobinom}
+ \lstcmd{courbe ECC~~~~~}{\TracerCourbeECC}{cbeECC}
\lstcmd{stats 2 var~~~~}{\TracerNuage}{nuage}
+ \lstcmd{regressions~~~~}{\TracerAjustement}{regressions}
\lstcmd{arrondi~~~~~~~~}{\ArrondirNum}{numarrond}
\lstcmd{nb aléat~~~~~~~}{\ChoisirNbAlea}{nbalea}
\end{description}
+\newpage
+
+\section{Quelques commandes liées à pgfplots}
+
+\subsection{Introduction}
+
+Pour des graphiques avec des fenêtres d'affichage \textit{particulières}, il est fort possible que les commandes \textit{classiques} de \MontreCode{tkz-grapheur} coincent, avec notamment des \MontreCode{dimension tool large}$\ldots$
+
+\smallskip
+
+Dans ce cas, il est possible d'utiliser plutôt l'environnement \MontreCode{axis} de \MontreCode{pgfplots} qui est plus palier ce problème \textit{interne}$\ldots$
+
+\MontreCode{tkz-grapheur} ne fournit pas d'environnement dédié pour la création de la fenêtre, mais quelques commandes spécifiques ont été intégrées pour certains points, avec un fonctionnement assez semblable (donc se référer aux paragraphes précédents) à celui des commandes \textit{classiques}.
+
+\subsection{Macros spécifique pgfplots/axis}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%déterminer l'intersection de deux objets préalablement définis via [name path]
+\findintersectionspgf[base nom nœuds]{objet1}{objet2}[macro nb total]
+
+%extraction (globale, non limitée à l'environnement) et stockage de coordonnées
+\gextractxnodepgf{nœud}[\myxcoord]
+\gextractynodepgf{nœud}[\myycoord]
+\gextractxynodepgf{nœud}[\myxcoord][\myycoord]
+
+%domaine entre courbes
+\fillbetweencurvespgf[options tikz]{courbe1}{courbe2}<options soft domain>
+
+%splines cubiques
+\addplotspline(*)[options tikz]<coeffs>{liste des points support}[\monspline]
+\end{tcblisting}
+
+\subsection{Exemple illustré}
+
+\begin{tcblisting}{listing only,listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+%\usepackage{alphalph}
+
+\begin{tikzpicture}
+ \begin{axis}%
+ [%
+ axis y line=center,axis x line=middle, %axes
+ axis line style={line width=0.8pt,-latex},
+ x=0.33cm,y=0.55cm,xmin=1985,xmax=2030,ymin=56,ymax=70, %unités
+ grid=both,xtick distance=5,ytick distance=2, %grillep
+ minor x tick num=4,minor y tick num=1, %grilles
+ extra x ticks={1985},extra x tick style={grid=none}, %origx
+ extra y ticks={56},extra y tick style={grid=none}, %origy
+ x tick label style={/pgf/number format/.cd,use comma,1000 sep={}}, %année
+ major tick length={2*3pt},minor tick length={1.5*3pt}, %grads
+ every tick/.style={line width=0.8pt},enlargelimits=false, %style
+ enlarge x limits={abs=2.5mm,upper},enlarge y limits={abs=2.5mm,upper}, %élargir
+ ]
+ %spline + y=66
+ \addplot[name path global=eqtest,mark=none,red,line width=1.05pt,domain=1985:2030] {66} ;
+ \def\LISTETEST{1985/60/0§1995/68/0§2015/58/0§2025/69/0§2030/62/-2}
+ \addplotspline*[line width=1.05pt,violet,name path global=splinecubtest]{\LISTETEST}[\monsplineviolet]
+ %recherche d'antécédents
+ \findintersectionspgf[MonItsc]{eqtest}{splinecubtest}
+ %extraction des coordonnées
+ \gextractxnodepgf{(MonItsc-1)}[\xMonItscA]
+ \gextractxnodepgf{(MonItsc-2)}[\xMonItscB]
+ \gextractxnodepgf{(MonItsc-3)}[\xMonItscC]
+ \gextractxnodepgf{(MonItsc-4)}[\xMonItscD]
+ %visualisation
+ \xintFor* #1 in {\xintSeq{1}{4}}\do{%
+ \draw[line width=0.9pt,densely dashed,olive,->,>=latex] (MonItsc-#1) -- (\csname xMonItsc\AlphAlph{#1}\endcsname,56) ;
+ \filldraw[olive] (MonItsc-#1) circle[radius=1.75pt] ;
+ }
+ %intégrale
+ \path [name path=xaxis] (1985,56) -- (2030,56);
+ \fillbetweencurvespgf{splinecubtest}{xaxis}<domain={\xMonItscB:\xMonItscA}>
+ \fillbetweencurvespgf{splinecubtest}{xaxis}<domain={\xMonItscD:\xMonItscC}>
+ \end{axis}
+\end{tikzpicture}
+
+Les solutions de $f(x)=66$ sont d'environ \ArrondirNum*[0]{\xMonItscA} \&\ \ArrondirNum*[0]{\xMonItscB} \&\ \ArrondirNum*[0]{\xMonItscC} \&\ \ArrondirNum*[0]{\xMonItscD}.
+\end{tcblisting}
+
+\begin{tikzpicture}
+ \begin{axis}%
+ [%
+ axis y line=center,axis x line=middle, %axes
+ axis line style={line width=0.8pt,-latex},
+ x=0.33cm,y=0.55cm,xmin=1985,xmax=2030,ymin=56,ymax=70, %unités
+ grid=both,xtick distance=5,ytick distance=2, %grillep
+ minor x tick num=4,minor y tick num=1, %grilles
+ extra x ticks={1985},extra x tick style={grid=none}, %originex
+ extra y ticks={56},extra y tick style={grid=none}, %originey
+ x tick label style={/pgf/number format/.cd,use comma,1000 sep={}}, %année
+ major tick length={2*3pt},minor tick length={1.5*3pt}, %grads
+ every tick/.style={line width=0.8pt},enlargelimits=false, %style
+ enlarge x limits={abs=2.5mm,upper},enlarge y limits={abs=2.5mm,upper}, %élargir
+ ]
+ %spline + y=66
+ \addplot[name path global=eqtest,mark=none,red,line width=1.05pt,domain=1985:2030] {66} ;
+ \def\LISTETEST{1985/60/0§1995/68/0§2015/58/0§2025/69/0§2030/62/-2}
+ \addplotspline*[line width=1.05pt,violet,name path global=splinecubtest]{\LISTETEST}[\monsplineviolet]
+ %recherche d'antécédents
+ \findintersectionspgf[MonItsc]{eqtest}{splinecubtest}
+ %extraction des coordonnées
+ \gextractxnodepgf{(MonItsc-1)}[\xMonItscA]
+ \gextractxnodepgf{(MonItsc-2)}[\xMonItscB]
+ \gextractxnodepgf{(MonItsc-3)}[\xMonItscC]
+ \gextractxnodepgf{(MonItsc-4)}[\xMonItscD]
+ %visualisation
+ \xintFor* #1 in {\xintSeq{1}{4}}\do{%
+ \draw[line width=0.9pt,densely dashed,olive,->,>=latex] (MonItsc-#1) -- (\csname xMonItsc\AlphAlph{#1}\endcsname,56) ;
+ \filldraw[olive] (MonItsc-#1) circle[radius=1.75pt] ;
+ }
+ %intégrale
+ \path [name path=xaxis] (1985,56) -- (2030,56);
+ \fillbetweencurvespgf{splinecubtest}{xaxis}<domain={\xMonItscB:\xMonItscA}>
+ \fillbetweencurvespgf{splinecubtest}{xaxis}<domain={\xMonItscD:\xMonItscC}>
+ \end{axis}
+\end{tikzpicture}
+
+Les solutions de $f(x)=66$ sont d'environ \ArrondirNum*[0]{\xMonItscA} \&\ \ArrondirNum*[0]{\xMonItscB} \&\ \ArrondirNum*[0]{\xMonItscC} \&\ \ArrondirNum*[0]{\xMonItscD}.
+
\pagebreak
\section{Historique}
-\begin{quote}
+{\footnotesize \begin{quote}
\begin{verbatim}
+0.2.0 : Méthode alternative des splines cubiques + commandes auxiliaires pgfplots
+0.1.9 : Correction d'un bug avec la détermination d'unités
+0.1.8 : Courbes ECC/FCC + Toile récurrence + Points discontinuité + HistoBinom
+0.1.7 : Méthodes intégrales avec des splines
+0.1.6 : Asymptote verticale + Méthodes intégrales (géom + Monte Carlo)
+0.1.5 : Correction d'un bug sur les rajouts de valeurs + Nœud pour une image + [en] version !
+0.1.4 : Placement de texte
+0.1.3 : Ajout de régressions avec le package xint-regression
+0.1.2 : Droites + Extremums
+0.1.1 : Densité loi normale et khi deux + Marquage points + Améliorations
0.1.0 : Version initiale
\end{verbatim}
-\end{quote}
+\end{quote}}
\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-examples-integrals.pdf b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-examples-integrals.pdf
new file mode 100644
index 0000000000..917caaab19
--- /dev/null
+++ b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-examples-integrals.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-examples-integrals.tex b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-examples-integrals.tex
new file mode 100644
index 0000000000..068ba103eb
--- /dev/null
+++ b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-examples-integrals.tex
@@ -0,0 +1,251 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
+
+\documentclass[a4paper,english,11pt]{article}
+\usepackage[margin=1cm,includefoot]{geometry}
+\usepackage[english]{tkz-grapheur}
+\usepackage{tcolorbox}
+\tcbuselibrary{skins,minted}
+\usepackage{babel}
+
+\begin{document}
+
+\part*{Integrals examples}
+
+\section{Below cruve, by default}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Behind,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineCurve[Name=ch]<h>{0.25*(x+2)^2+1}
+ \DrawIntegral%
+ [Colors=blue/cyan,Style=fill]%
+ {h(x)} %formula
+ {-5.25}{1.5}
+ \DrawCurve[Color=red]{h(x)}
+ \DrawAxisGrids[Above,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Behind interpolation curve}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineLstInterpol{(-6,4)(-2,-2)(3,3.5)}[\interpoA]
+ \DefineInterpoCurve[Name=interpotest,Tension=1.05]{\interpoA}
+ \DrawIntegral%
+ [NameInterpo=interpotest,Colors=blue/cyan,Style=fill,Type=itp,Tension=1.05]%
+ {\interpoA} %pointsinterpo
+ {-5.25}{1.5}
+ \DrawInterpoCurve[Color=red,Tension=1.05]{\interpoA}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Behind cubic spline}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineLstSpline{-6/4/-2§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}[\lstsplineA]
+ \DefineSplineCurve[Name=splinetest]{\lstsplineA}<\SplineTeal>
+ \DrawIntegral%
+ [NameSpline=\SplineTeal,Type=spl,Colors=blue/purple,Style=hatch]%
+ {splinetest} %namesplinecurve
+ {-5}{2}
+ \DrawSplineCurve[Color=teal]{\lstsplineA}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Between curves}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineCurve[Name=ch]<h>{0.25*(x+2)^2-1}
+ \DefineCurve[Name=ck]<k>{-0.25*x+1}
+ \FindIntersections[Name=ITSC,Disp=false]{ch}{ck}
+ \DrawIntegral%
+ [Colors=olive/pink,Style=fill,Type=fct/fct,Bounds=node/abs]%
+ {h(x)}[k(x)] %formules
+ {(ITSC-1)}{1.5}
+ \DrawCurve[Color=red]{h(x)}
+ \DrawCurve[Color=blue]{k(x)}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Between splines}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineLstSpline{-6/4/-2§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}[\lstsplineA]
+ \DefineLstSpline{-6/-2/3§-2/4/0§3/-1/0}[\lstsplineB]
+ \DefineSplineCurve[Name=splinetestolive]{\lstsplineA}<\SplineOlive>
+ \DefineSplineCurve[Name=splinetestteal]{\lstsplineB}<\SplineTeal>
+ \FindIntersections[Name=ITT,Disp=false]{splinetestteal}{splinetestolive}
+ \DrawIntegral%
+ [NameSpline=\SplineTeal,NameSplineB=\SplineOlive,Type=spl/spl,Colors=blue/purple,Bounds=nodes]%
+ {splinetestolive} %Namecourbespline
+ [splinetestteal] %Namecourbespline
+ {(ITT-1)}{(ITT-2)}
+ \DrawSplineCurve[Color=teal]{\lstsplineA}
+ \DrawSplineCurve[Color=olive]{\lstsplineB}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Between interpolations}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineLstInterpol{(-6,4)(-2,-2)(3,3.5)}[\interpoA]
+ \DefineInterpoCurve[Name=interpotest]{\interpoA}
+ \DefineLstInterpol{(-6,-2)(-1,4)(3,0)}[\interpoB]
+ \DefineInterpoCurve[Name=interpotesta]{\interpoB}
+ \DrawIntegral%
+ [NameInterpo=interpotesta,NameInterpoB=interpotest,Type=itp/itp,Colors=olive/pink]%
+ {\interpoB} %pointsinterpo
+ [\interpoA] %pointsinterpo
+ {-2}{1}
+ \DrawInterpoCurve[Color=red]{\interpoA}
+ \DrawInterpoCurve[Color=blue]{\interpoB}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Betweend function and spline}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineCurve[Name=ch]<h>{-0.25*(x+2)^2+3.5}
+ \DefineLstSpline{-6/4/-2§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}[\lstsplineA]
+ \DefineSplineCurve[Name=splineblue]{\lstsplineA}<\Splineblue>
+ \DrawIntegral%
+ [NameSplineB=\Splineblue,Type=fct/spl,Colors=olive/pink]%
+ {h(x)} %formule
+ [splineblue] %Namecourbespline
+ {-3}{0}
+ \DrawCurve[Color=red]{h(x)}
+ \DrawSplineCurve[Color=blue]{\lstsplineA}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Between spline and function}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineCurve[Name=ch]<h>{0.25*(x+2)^2-2}
+ \DefineLstSpline{-6/4/2§-5/-2/-2§-4/0/2§-2/2/0§1/-2/-2§3/3.5/-0.5}[\lstsplineA]
+ \DefineSplineCurve[Name=splineblue]{\lstsplineA}<\Splineblue>
+ \DrawIntegral%
+ [NameSpline=\Splineblue,Type=spl/fct,Colors=olive/pink]%
+ {splineblue} %Namecourbespline
+ [h(x)] %formule
+ {-3}{-1}
+ \DrawCurve[Color=red]{h(x)}
+ \DrawSplineCurve[Color=blue]{\lstsplineA}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Between function and interpo}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineCurve[Name=cm]<m>{-0.25*(x+2)^2+4}
+ \DefineLstInterpol{(-6,4)(-5,-2)(-2,1)(1,-2)(3,3)}[\interpoB]
+ \DefineInterpoCurve[Name=interpotestb]{\interpoB}
+ \DrawIntegral%
+ [NameInterpoB=interpotestb,Type=fct/itp,Colors=olive/pink]%
+ {m(x)} %formule
+ [\interpoB] %pointsinterpo
+ {-4}{1}
+ \DrawCurve[Color=red]{m(x)}
+ \DrawInterpoCurve[Color=blue]{\interpoB}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Between interpo and function}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineCurve[Name=courbeQ]<q>{0.25*(x+2)^2-2.5}
+ \DefineLstInterpol{(-6,-2)(-5,4)(-2,-1)(1,2)(3,-2)}[\interpoA]
+ \DefineInterpoCurve[Name=interpotest]{\interpoA}
+ \FindIntersections[Name=FGH,Disp]{interpotest}{courbeQ}
+ \DrawIntegral%
+ [NameInterpo=interpotest,Type=itp/fct,Colors=olive/pink,Bounds=nodes]%
+ {\interpoA} %pointsinterpo
+ [q(x)] %formule
+ {(FGH-1)}{(FGH-2)}
+ \DrawCurve[Color=red]{q(x)}
+ \DrawInterpoCurve[Color=blue]{\interpoA}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Between spline and interpo}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineLstSpline{-6/-2/2§-3/4/0§3/-2/0}[\lstsplineA]
+ \DefineSplineCurve[Name=splinered]{\lstsplineA}<\Splinered>
+ \DefineLstInterpol{(-6,4)(-5,-2)(-2,1)(1,-2)(3,3)}[\interpoB]
+ \DefineInterpoCurve[Name=interpotestb]{\interpoB}
+ \DrawIntegral%
+ [NameInterpoB=interpotestb,NameSpline=\Splinered,Type=spl/itp,Colors=olive/pink]%
+ {splinered} %Namecourbespline
+ [\interpoB] %pointsinterpo
+ {-4}{-2}
+ \DrawSplineCurve[Color=red]{\lstsplineA}
+ \DrawInterpoCurve[Color=blue]{\interpoB}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\section{Between interpo and spline}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \DrawAxisGrids[Grads=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefineLstSpline{-6/4/-2§-3/-2.25/0§3/3/0}[\lstsplineB]
+ \DefineSplineCurve[Name=splineblue]{\lstsplineB}<\Splineblue>
+ \DefineLstInterpol{(-6,-2)(-5,4)(-2,-1)(1,2)(3,-2.5)}[\interpoA]
+ \DefineInterpoCurve[Name=interpotest]{\interpoA}
+ \FindIntersections[Name=UIO,Disp]{interpotest}{splineblue}
+ \DrawIntegral%
+ [NameInterpo=interpotest,NameSplineB=\Splineblue,Type=itp/spl,Colors=olive/pink,Bounds=nodes]%
+ {\interpoA} %pointsinterpo
+ [splineblue] %Namecourbespline
+ {(UIO-1)}{(UIO-2)}
+ \DrawSplineCurve[Color=blue]{\lstsplineB}
+ \DrawInterpoCurve[Color=red]{\interpoA}
+ \DrawAxisGrids[Grid=false,Enlarge=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphTikz}
+\end{tcblisting}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-exemples-integrales.pdf b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-exemples-integrales.pdf
new file mode 100644
index 0000000000..985d09c617
--- /dev/null
+++ b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-exemples-integrales.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-exemples-integrales.tex b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-exemples-integrales.tex
new file mode 100644
index 0000000000..58fc6473f8
--- /dev/null
+++ b/graphics/pgf/contrib/tkz-grapheur/doc/tkz-grapheur-exemples-integrales.tex
@@ -0,0 +1,251 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
+
+\documentclass[a4paper,french,11pt]{article}
+\usepackage[margin=1cm,includefoot]{geometry}
+\usepackage{tkz-grapheur}
+\usepackage{tcolorbox}
+\tcbuselibrary{skins,minted}
+\usepackage{babel}
+
+\begin{document}
+
+\part*{Exemples des différents cas d'intégrales}
+
+\section{Sous courbe, par défaut}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Derriere,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirCourbe[Nom=ch]<h>{0.25*(x+2)^2+1}
+ \TracerIntegrale%
+ [Couleurs=blue/cyan,Style=remplissage]%
+ {h(x)} %formule
+ {-5.25}{1.5}
+ \TracerCourbe[Couleur=red]{h(x)}
+ \TracerAxesGrilles[Devant,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Sous courbe d'interpolation}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirListeInterpo{(-6,4)(-2,-2)(3,3.5)}[\interpoA]
+ \DefinirCourbeInterpo[Nom=interpotest,Tension=1.05]{\interpoA}
+ \TracerIntegrale%
+ [NomInterpo=interpotest,Couleurs=blue/cyan,Style=remplissage,Type=itp,Tension=1.05]%
+ {\interpoA} %pointsinterpo
+ {-5.25}{1.5}
+ \TracerCourbeInterpo[Couleur=red,Tension=1.05]{\interpoA}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Sous spline cubique}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirListeSpline{-6/4/-2§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}[\lstsplineA]
+ \DefinirCourbeSpline[Nom=splinetest]{\lstsplineA}<\SplineTeal>
+ \TracerIntegrale%
+ [NomSpline=\SplineTeal,Type=spl,Couleurs=blue/purple,Style=hachures]%
+ {splinetest} %nomcourbespline
+ {-5}{2}
+ \TracerCourbeSpline[Couleur=teal]{\lstsplineA}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre courbes}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirCourbe[Nom=ch]<h>{0.25*(x+2)^2-1}
+ \DefinirCourbe[Nom=ck]<k>{-0.25*x+1}
+ \TrouverIntersections[Nom=ITSC,Aff=false]{ch}{ck}
+ \TracerIntegrale%
+ [Couleurs=olive/pink,Style=remplissage,Type=fct/fct,Bornes=noeud/abs]%
+ {h(x)}[k(x)] %formules
+ {(ITSC-1)}{1.5}
+ \TracerCourbe[Couleur=red]{h(x)}
+ \TracerCourbe[Couleur=blue]{k(x)}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre splines}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirListeSpline{-6/4/-2§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}[\lstsplineA]
+ \DefinirListeSpline{-6/-2/3§-2/4/0§3/-1/0}[\lstsplineB]
+ \DefinirCourbeSpline[Nom=splinetestolive]{\lstsplineA}<\SplineOlive>
+ \DefinirCourbeSpline[Nom=splinetestteal]{\lstsplineB}<\SplineTeal>
+ \TrouverIntersections[Nom=ITT,Aff=false]{splinetestteal}{splinetestolive}
+ \TracerIntegrale%
+ [NomSpline=\SplineTeal,NomSplineB=\SplineOlive,Type=spl/spl,Couleurs=blue/purple,Bornes=noeuds]%
+ {splinetestolive} %nomcourbespline
+ [splinetestteal] %nomcourbespline
+ {(ITT-1)}{(ITT-2)}
+ \TracerCourbeSpline[Couleur=teal]{\lstsplineA}
+ \TracerCourbeSpline[Couleur=olive]{\lstsplineB}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre interpolations}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirListeInterpo{(-6,4)(-2,-2)(3,3.5)}[\interpoA]
+ \DefinirCourbeInterpo[Nom=interpotest]{\interpoA}
+ \DefinirListeInterpo{(-6,-2)(-1,4)(3,0)}[\interpoB]
+ \DefinirCourbeInterpo[Nom=interpotesta]{\interpoB}
+ \TracerIntegrale%
+ [NomInterpo=interpotesta,NomInterpoB=interpotest,Type=itp/itp,Couleurs=olive/pink]%
+ {\interpoB} %pointsinterpo
+ [\interpoA] %pointsinterpo
+ {-2}{1}
+ \TracerCourbeInterpo[Couleur=red]{\interpoA}
+ \TracerCourbeInterpo[Couleur=blue]{\interpoB}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre fonction et spline}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirCourbe[Nom=ch]<h>{-0.25*(x+2)^2+3.5}
+ \DefinirListeSpline{-6/4/-2§-5/2/-2§-4/0/-2§-2/-2/0§1/2/2§3/3.5/0.5}[\lstsplineA]
+ \DefinirCourbeSpline[Nom=splineblue]{\lstsplineA}<\Splineblue>
+ \TracerIntegrale%
+ [NomSplineB=\Splineblue,Type=fct/spl,Couleurs=olive/pink]%
+ {h(x)} %formule
+ [splineblue] %nomcourbespline
+ {-3}{0}
+ \TracerCourbe[Couleur=red]{h(x)}
+ \TracerCourbeSpline[Couleur=blue]{\lstsplineA}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre spline et fonction}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirCourbe[Nom=ch]<h>{0.25*(x+2)^2-2}
+ \DefinirListeSpline{-6/4/2§-5/-2/-2§-4/0/2§-2/2/0§1/-2/-2§3/3.5/-0.5}[\lstsplineA]
+ \DefinirCourbeSpline[Nom=splineblue]{\lstsplineA}<\Splineblue>
+ \TracerIntegrale%
+ [NomSpline=\Splineblue,Type=spl/fct,Couleurs=olive/pink]%
+ {splineblue} %nomcourbespline
+ [h(x)] %formule
+ {-3}{-1}
+ \TracerCourbe[Couleur=red]{h(x)}
+ \TracerCourbeSpline[Couleur=blue]{\lstsplineA}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre fonction et interpo}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirCourbe[Nom=cm]<m>{-0.25*(x+2)^2+4}
+ \DefinirListeInterpo{(-6,4)(-5,-2)(-2,1)(1,-2)(3,3)}[\interpoB]
+ \DefinirCourbeInterpo[Nom=interpotestb]{\interpoB}
+ \TracerIntegrale%
+ [NomInterpoB=interpotestb,Type=fct/itp,Couleurs=olive/pink]%
+ {m(x)} %formule
+ [\interpoB] %pointsinterpo
+ {-4}{1}
+ \TracerCourbe[Couleur=red]{m(x)}
+ \TracerCourbeInterpo[Couleur=blue]{\interpoB}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre interpo et fonction}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirCourbe[Nom=courbeQ]<q>{0.25*(x+2)^2-2.5}
+ \DefinirListeInterpo{(-6,-2)(-5,4)(-2,-1)(1,2)(3,-2)}[\interpoA]
+ \DefinirCourbeInterpo[Nom=interpotest]{\interpoA}
+ \TrouverIntersections[Nom=FGH,Aff]{interpotest}{courbeQ}
+ \TracerIntegrale%
+ [NomInterpo=interpotest,Type=itp/fct,Couleurs=olive/pink,Bornes=noeuds]%
+ {\interpoA} %pointsinterpo
+ [q(x)] %formule
+ {(FGH-1)}{(FGH-2)}
+ \TracerCourbe[Couleur=red]{q(x)}
+ \TracerCourbeInterpo[Couleur=blue]{\interpoA}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre spline et interpo}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirListeSpline{-6/-2/2§-3/4/0§3/-2/0}[\lstsplineA]
+ \DefinirCourbeSpline[Nom=splinered]{\lstsplineA}<\Splinered>
+ \DefinirListeInterpo{(-6,4)(-5,-2)(-2,1)(1,-2)(3,3)}[\interpoB]
+ \DefinirCourbeInterpo[Nom=interpotestb]{\interpoB}
+ \TracerIntegrale%
+ [NomInterpoB=interpotestb,NomSpline=\Splinered,Type=spl/itp,Couleurs=olive/pink]%
+ {splinered} %nomcourbespline
+ [\interpoB] %pointsinterpo
+ {-4}{-2}
+ \TracerCourbeSpline[Couleur=red]{\lstsplineA}
+ \TracerCourbeInterpo[Couleur=blue]{\interpoB}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\section{Entre interpo et spline}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}%
+ [x=0.8cm,y=1cm,Xmin=-7,Xmax=4,Ymin=-3,Ymax=5]
+ \TracerAxesGrilles[Grads=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+ \DefinirListeSpline{-6/4/-2§-3/-2.25/0§3/3/0}[\lstsplineB]
+ \DefinirCourbeSpline[Nom=splineblue]{\lstsplineB}<\Splineblue>
+ \DefinirListeInterpo{(-6,-2)(-5,4)(-2,-1)(1,2)(3,-2.5)}[\interpoA]
+ \DefinirCourbeInterpo[Nom=interpotest]{\interpoA}
+ \TrouverIntersections[Nom=UIO,Aff]{interpotest}{splineblue}
+ \TracerIntegrale%
+ [NomInterpo=interpotest,NomSplineB=\Splineblue,Type=itp/spl,Couleurs=olive/pink,Bornes=noeuds]%
+ {\interpoA} %pointsinterpo
+ [splineblue] %nomcourbespline
+ {(UIO-1)}{(UIO-2)}
+ \TracerCourbeSpline[Couleur=blue]{\lstsplineB}
+ \TracerCourbeInterpo[Couleur=red]{\interpoA}
+ \TracerAxesGrilles[Grille=false,Elargir=2.5mm]{-7,-6,...,4}{-3,-2,...,5}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tkz-grapheur/tex/tkz-grapheur.sty b/graphics/pgf/contrib/tkz-grapheur/tex/tkz-grapheur.sty
index 1630132db3..be1337a970 100644
--- a/graphics/pgf/contrib/tkz-grapheur/tex/tkz-grapheur.sty
+++ b/graphics/pgf/contrib/tkz-grapheur/tex/tkz-grapheur.sty
@@ -2,32 +2,68 @@
% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tkz-grapheur}[2024/05/11 0.1.0 Des outils en TikZ pour travailler comme avec un grapheur]
+\ProvidesPackage{tkz-grapheur}[2024/10/29 0.2.0 Des outils en TikZ pour travailler comme avec un grapheur]
%====HISTORIQUE
+% v 0.2.0 Petites commandes en lien avec pgfplots + modification mineure splinecubique (calculs Alt)
+% v 0.1.9 Correction d'un bug avec la détermination des unités...
+% v 0.1.8 Ajout des courbes d'ECC/FCC + Toile récurrence + Points discontinuité + Histobinom
+% v 0.1.7 Méthodes intégrales avec des splines
+% v 0.1.6 Asymptote verticale + Monte Carlo + Méthode intégrales (rectangles, etc)
+% v 0.1.5 Correction d'un bug avec les valeurs manuelles + Nœud pour une image + [en] version !
+% v 0.1.4 Ajout des placements de textes
+% v 0.1.3 Régressions, avec xintreg (désactivable)
+% v 0.1.2 Max/Min + Droites
+% v 0.1.1 Densité loi normale + khi deux + Améliorations diverses
% v 0.1.0 Version initiale [fr]
-%====OPTION
+%====OPTIONS
\newif\if@loadsiunitx \@loadsiunitxtrue
\DeclareOption{nonsiunitx}{\@loadsiunitxfalse}%
+\DeclareOption{nosiunitx}{\@loadsiunitxfalse}%
+
\newif\if@loadtikzbabel \@loadtikzbabeltrue
\DeclareOption{nontikzbabel}{\@loadtikzbabelfalse}%
+\DeclareOption{notikzbabel}{\@loadtikzbabelfalse}%
+
+\newif\if@loadxintreg \@loadxintregtrue
+\DeclareOption{nonxintreg}{\@loadxintregfalse}%
+\DeclareOption{noxintreg}{\@loadxintregfalse}%
+
+\newif\if@loadpgfplots \@loadpgfplotstrue
+\DeclareOption{nonpgfplots}{\@loadpgfplotsfalse}%
+\DeclareOption{nopgfplots}{\@loadpgfplotsfalse}%
+
+\newif\if@lngenglish \@lngenglishfalse
+\DeclareOption{english}{\@lngenglishtrue}%
+
\DeclareOption*{}
\ProcessOptions\relax
%====BASE
\RequirePackage{tikz}
\RequirePackage{ifthen}
-\usetikzlibrary{calc,intersections,patterns,patterns.meta}
+\if@loadpgfplots
+ \RequirePackage{pgfplots}
+ \usepgfplotslibrary{fillbetween}
+\fi
+\usetikzlibrary{calc,intersections,patterns,patterns.meta,bbox}
\RequirePackage{simplekv}
\RequirePackage{xintexpr}
\RequirePackage{xstring}
\RequirePackage{listofitems}
+\if@loadxintreg
+ \RequirePackage{xint-regression}
+\fi
-%====SIUNITX
+%====SIUNITX + [en]
\if@loadsiunitx
\RequirePackage{siunitx}
- \sisetup{locale=FR,output-decimal-marker={,},mode=match,propagate-math-font=true,reset-math-version=false,reset-text-family=false,reset-text-series=false,reset-text-shape=false,text-family-to-math=true,text-series-to-math=true}
+ \if@lngenglish
+ \sisetup{mode=match,propagate-math-font=true,reset-math-version=false,reset-text-family=false,reset-text-series=false,reset-text-shape=false,text-family-to-math=true,text-series-to-math=true}
+ \else
+ \sisetup{locale=FR,output-decimal-marker={,},mode=match,propagate-math-font=true,reset-math-version=false,reset-text-family=false,reset-text-series=false,reset-text-shape=false,text-family-to-math=true,text-series-to-math=true}%,group-minimum-digits=4}
+ \fi
\fi
%====TIKZ.BABEL
@@ -35,6 +71,10 @@
\usetikzlibrary{babel}
\fi
+%++++++++++++++++++++++++++
+%+++++++++FRANÇAIS+++++++++
+%++++++++++++++++++++++++++
+
%====COMMANDE POUR NB DECIMAL ALEA ENTRE BORNES
\NewDocumentCommand\ChoisirNbAlea{ s O{0} m m O{\monbnalea} }{%
\def\tmpborneinf{\xinteval{floor(#3)}}%inf=\tmpborneinf\par%
@@ -70,17 +110,37 @@
%====PATCH NUM
\@ifundefined{ArrondirNum}%
{%
- \NewDocumentCommand\ArrondirNum{ O{2} m}{\num{\xintfloateval{round(#2,#1)}}\relax}%
+ \NewDocumentCommand\ArrondirNum{ s O{2} m}{%
+ \IfBooleanTF{#1}%
+ {%
+ \xintfloateval{round(#3,#2)}\relax%
+ }%
+ {%
+ \num{\xintfloateval{round(#3,#2)}}\relax%
+ }%
+ }%
}%
{%
- \RenewDocumentCommand\ArrondirNum{ O{2} m}{\num{\xintfloateval{round(#2,#1)}}\relax}%
+ \RenewDocumentCommand\ArrondirNum{ s O{2} m}{%
+ \IfBooleanTF{#1}%
+ {%
+ \xintfloateval{round(#3,#2)}\relax%
+ }%
+ {%
+ \num{\xintfloateval{round(#3,#2)}}\relax%
+ }%
+ }%
}%
%====STYLES DE BASE
+\tikzset{pflnoeud/.style={}}
+\tikzset{pflpoint/.style={line width=0.95pt}}
+\tikzset{pflpointmc/.style={radius=0.875pt}}
\tikzset{pflpointc/.style={radius=1.75pt}}
\tikzset{pflpointnuage/.style={radius=1.75pt}}
\tikzset{pflcadre/.style={line width=0.8pt,gray}}
\tikzset{pflcourbe/.style={line width=1.05pt}}
+\tikzset{pflcourbediscont/.style={line width=1.1pt}}
\tikzset{pfltrait/.style={line width=0.8pt}}
\tikzset{pflflecheg/.style={<-,>=latex}}
\tikzset{pflfleched/.style={->,>=latex}}
@@ -102,10 +162,30 @@
Ygrille/.store in=\pflgrilley,Ygrille/.default=1,Ygrille=1,
Ygrilles/.store in=\pflgrilleys,Ygrilles/.default=0.5,Ygrilles=0.5
}
+\tikzset{%
+ pics/pflptcroix/.style args={#1/#2}{
+ code={
+ \draw[pflpoint,rotate=#2] (-#1,0) -- (#1,0);
+ \draw[pflpoint,rotate=#2] (0,-#1) -- (0, #1);
+ }
+ },
+ pics/pflptcroix/.default={2pt/45}
+}
+\tikzset{%
+ pics/pflptcarre/.style args={#1/#2}{
+ code={
+ \filldraw[draw=none,pflpoint,rotate=#2] (-#1,-#1) rectangle (#1,#1) ;
+ }
+ },
+ pics/pflptcarre/.default={2pt/0}
+}
%====CONSTANTE PI pour xint, à voir si incompatibilité...
\xintdefvar pi:=3.141592653589793238462643;
+%====focntion ln, en langage xint
+\xintdeffloatfunc ln(x) := log(x);
+
%===COMMANDE INTERNE POUR FORMATER EN FRACTIONS
\NewDocumentCommand\FormatterFraction{ s O{} m }{%
%*=moins sur le numérateur
@@ -267,9 +347,9 @@
}
\newcommand\TikZUnites{
- \coordinate (@0) at (0,0) ;
- \coordinate (@X) at (1,0) ;
- \coordinate (@Y) at (0,1) ;
+ \coordinate (@0) at (\pflOx,\pflOy) ;
+ \coordinate (@X) at ({\pflOx+1},\pflOy) ;
+ \coordinate (@Y) at ({\pflOx},{\pflOy+1}) ;
\DistanceEntreNoeuds[\pflxunit]{@0}{@X}
\DistanceEntreNoeuds[\pflyunit]{@0}{@Y}
}
@@ -315,7 +395,9 @@
Police={},%
Format=num,%
Traits=true,%
- Dernier=false
+ Dernier=false,%
+ Derriere=false,%
+ Devant=false
}
\NewDocumentCommand\FormatterValeurAxex{ m m }{%
@@ -353,6 +435,18 @@
\NewDocumentCommand\TracerAxesGrilles{ s O{} m D<>{#3} m D<>{#5} }{%
\restoreKV[GraphiqueTikzAxes]%
\setKV[GraphiqueTikzAxes]{#2}%
+ %cas particuliers sous/sur impression
+ \ifboolKV[GraphiqueTikzAxes]{Derriere}%
+ {%
+ \setKV[GraphiqueTikzAxes]{Grads=false}
+ }%
+ {}%
+ \ifboolKV[GraphiqueTikzAxes]{Devant}%
+ {%
+ \setKV[GraphiqueTikzAxes]{Grille=false}
+ }%
+ {}%
+ %suite
\IfSubStr{\pflformataxes}{/}%
{%
\StrCut{\pflformataxes}{/}{\pflformataxex}{\pflformataxey}%
@@ -397,7 +491,7 @@
%origine
\ifboolKV[GraphiqueTikzAxes]{Origine}%
{%
- \draw ({\pflOx},{\pflOy}) node[below left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\plfOx}} ;
+ \draw ({\pflOx},{\pflOy}) node[pflnoeud,below left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\pflOx}} ;
%\draw (\pflOx,\pflOy) node[below left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\pflOx}}{\pflOx}} ;
}%
{}%
@@ -405,22 +499,22 @@
\foreach \x in \tmprangexvalues {%
\IfBooleanTF{#1}%
{%
- \xintifboolexpr{\x == \pflOx}{}{\draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\x}} ;}
+ \xintifboolexpr{\x == \pflOx}{}{\draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[pflnoeud,below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\x}} ;}
%\xintifboolexpr{\x == \pflOx}{}{\draw ([yshift=-\pflthickgrad]\x,\pflOy) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\x}}{\x}} ;}
}%
{%
- \draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\x}} ;
+ \draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[pflnoeud,below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\x}} ;
%\draw ([yshift=-\pflthickgrad]\x,\pflOy) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\x}}{\x}} ;
}%
}%
\foreach \y in \tmprangeyvalues {%
\IfBooleanTF{#1}%
{%
- \xintifboolexpr{\y == \pflOy}{}{\draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxey{\pflformataxey}{\y}} ;}
+ \xintifboolexpr{\y == \pflOy}{}{\draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[pflnoeud,left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxey{\pflformataxey}{\y}} ;}
%\xintifboolexpr{\y == \pflOy}{}{\draw ([xshift=-\pflthickgrad]\pflOx,\y) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\y}}{\y}} ;}
}%
{%
- \draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxey{\pflformataxey}{\y}} ;
+ \draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[pflnoeud,left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxey{\pflformataxey}{\y}} ;
%\draw ([xshift=-\pflthickgrad]\pflOx,\y) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\y}}{\y}} ;
}%
}%
@@ -429,7 +523,7 @@
}
%===DEFINIR POINTS
-\setKVdefault[GraphiqueTikzDefPoints]{Couleur=black,Aff=false}
+\setKVdefault[GraphiqueTikzDefPoints]{Couleur=black,Aff=false,Style=o}
\NewDocumentCommand\DefinirPts{ O{} m }{%
\restoreKV[GraphiqueTikzDefPoints]%
@@ -438,12 +532,186 @@
\coordinate (\tmpnamept) at ({\tmpxpt},{\tmpypt}) ;
\ifboolKV[GraphiqueTikzDefPoints]{Aff}%
{%
- \filldraw[{\useKV[GraphiqueTikzDefPoints]{Couleur}}] (\tmpnamept) circle[pflpointc] ;
+ \MarquerPts*[Style={\useKV[GraphiqueTikzDefPoints]{Style}},Couleur={\useKV[GraphiqueTikzDefPoints]{Couleur}}]{(\tmpnamept)}
+ %\filldraw[{\useKV[GraphiqueTikzDefPoints]{Couleur}}] (\tmpnamept) circle[pflpointc] ;
}%
{}%
}
}
+\defKV[GraphiqueTikzMarkPoints]{%
+ Couleur=\def\pflcouleurpoints{#1},%
+ Style=\def\pflstylepoints{#1}
+}
+\setKVdefault[GraphiqueTikzMarkPoints]{%
+ Couleur=black,%
+ Taillec=2pt,%
+ Taillex=2pt,%
+ Tailleo=1.75pt,%
+ Style=o,%
+ Traits=false
+}
+\NewDocumentCommand\MarquerPts{ s O{} D<>{\normalfont\normalsize} m }{%
+ %étoilée = sans label
+ %2=clés
+ %3=points
+ \restoreKV[GraphiqueTikzMarkPoints]%
+ \setKV[GraphiqueTikzMarkPoints]{#2}%
+ \IfBooleanTF{#1}%
+ {%
+ \IfStrEq{\pflstylepoints}{x}%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcroix={\useKV[GraphiqueTikzMarkPoints]{Taillex}}/45} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{+}%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcroix={\useKV[GraphiqueTikzMarkPoints]{Taillex}}/90} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{c}%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[draw=none,fill={\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcarre={\useKV[GraphiqueTikzMarkPoints]{Taillec}}/0} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{d}%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[draw=none,fill={\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcarre={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}/45} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{o}%
+ {%
+ \IfSubStr{\pflcouleurpoints}{/}%
+ {%
+ \StrCut{\pflcouleurpoints}{/}{\pflcouleurpointsA}{\pflcouleurpointsB}%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[pfltrait,fill=\pflcouleurpointsB,draw=\pflcouleurpointsA] \Point circle[radius={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}] ;
+ }%
+ }%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[\pflcouleurpoints] \Point circle[radius={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}] ;
+ }%
+ }%
+ }%
+ {}%
+ }%
+ {%avec label
+ \IfStrEq{\pflstylepoints}{x}%
+ {%
+ \foreach \Point/\Label/\Pos in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcroix={\useKV[GraphiqueTikzMarkPoints]{Taillex}}/45} node[pflnoeud,\Pos,font=#3] {\Label} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{+}%
+ {%
+ \foreach \Point/\Label/\Pos in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcroix={\useKV[GraphiqueTikzMarkPoints]{Taillex}}/90} node[pflnoeud,\Pos,font=#3] {\Label} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{c}%
+ {%
+ \foreach \Point/\Label/\Pos in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[draw=none,fill={\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcarre={\useKV[GraphiqueTikzMarkPoints]{Taillec}}/0} node[pflnoeud,\Pos,{\useKV[GraphiqueTikzMarkPoints]{Couleur}},font=#3] {\Label} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{d}%
+ {%
+ \foreach \Point/\Label/\Pos in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[draw=none,fill={\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcarre={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}/45} node[pflnoeud,\Pos,{\useKV[GraphiqueTikzMarkPoints]{Couleur}},font=#3] {\Label} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{o}%
+ {%
+ \IfSubStr{\pflcouleurpoints}{/}%
+ {%
+ \StrCut{\pflcouleurpoints}{/}{\pflcouleurpointsA}{\pflcouleurpointsB}%
+ \foreach \Point/\Label/\Pos in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[pfltrait,\pflcouleurpointsA,fill=\pflcouleurpointsB] \Point circle[radius={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}] node[pflnoeud,\Pos,font=#3] {\Label} ;
+ }%
+ }%
+ {%
+ \foreach \Point/\Label/\Pos in {#4} {%
+ \ifboolKV[GraphiqueTikzMarkPoints]{Traits}%
+ {%
+ \draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[\pflcouleurpoints] \Point circle[radius={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}] node[pflnoeud,\Pos,font=#3] {\Label} ;
+ }%
+ }%
+ }%
+ {}%
+ }%
+}
+
%===AJOUTER DES VALEURS MANUELLEMENT
\NewDocumentCommand\RajouterValeursAxeX{ O{} m m }{%
\restoreKV[GraphiqueTikzAxes]%
@@ -454,7 +722,7 @@
\foreach \i in {1,...,\LstValXlen}{%
\itemtomacro\LstValX[\i]\mavalx%
\itemtomacro\LstValFmtX[\i]\mavalfmtx%
- \draw ([yshift=-\pflthickgrad]{\mavalx},{\pflOy}) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\mavalfmtx} ;
+ \draw ([yshift=-\pflthickgrad]{\mavalx},{\pflOy}) node[pflnoeud,below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\mavalfmtx} ;
}%
}
@@ -464,14 +732,14 @@
\ifboolKV[GraphiqueTikzAxes]{Traits}{\foreach \y in {#2}{\draw[pfltrait] ([xshift=\pflthickgrad]{\pflOx},{\y})--++({-2*\pflthickgrad},0) ;}}{}%
\readlist*\LstValY{#2}%
\readlist*\LstValFmtY{#3}%
- \foreach \i in {1,...,\LstValXlen}{%
+ \foreach \i in {1,...,\LstValYlen}{%
\itemtomacro\LstValY[\i]\mavaly%
\itemtomacro\LstValFmtY[\i]\mavalfmty%
- \draw ([xshift=-\pflthickgrad]{\pflOx},{\mavaly}) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\mavalfmty} ;
+ \draw ([xshift=-\pflthickgrad]{\pflOx},{\mavaly}) node[pflnoeud,left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\mavalfmty} ;
}%
}
-%====FONCTION ET COURBE
+%====FONCTIONS ET COURBES 'classique + interpo + spline'
\defKV[GraphiqueTikzCourbe]{%
Pas=\def\pflstepcurve{#1},%
Nom=\def\pflnamecurve{#1}
@@ -487,15 +755,44 @@
Tension=0.5
}
-\NewDocumentCommand\DefinirFonction{ O{} D<>{f} m }{%
+\NewDocumentCommand\DefinirFonction{ O{} D<>{f} m }{%old version
\restoreKV[GraphiqueTikzCourbe]%
\setKV[GraphiqueTikzCourbe]{#1}%
\xintdeffloatfunc #2(x) := #3 ;
\IfStrEq{\pflstepcurve}{}%
- {%
- \xdef\pflstepcurve{\xintfloateval{((\useKV[GraphiqueTikzCourbe]{Fin})-(\useKV[GraphiqueTikzCourbe]{Debut}))/100}}%
- }%
- {}%
+ {%
+ \xdef\pflstepcurve{\xintfloateval{((\useKV[GraphiqueTikzCourbe]{Fin})-(\useKV[GraphiqueTikzCourbe]{Debut}))/100}}%
+ }%
+ {}%
+ \ifboolKV[GraphiqueTikzCourbe]{Clip}{\begin{scope}\clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});}{}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphiqueTikzCourbe]{Trace}%
+ {%
+ \path[draw,pflcourbe,{\useKV[GraphiqueTikzCourbe]{Couleur}},name path global=\pflnamecurve] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphiqueTikzCourbe]{Debut}}..[\pflstepcurve]..{\useKV[GraphiqueTikzCourbe]{Fin}},{\useKV[GraphiqueTikzCourbe]{Fin}})
+ \relax
+ };
+ }%
+ {%
+ \path[draw=none,pflcourbe,{\useKV[GraphiqueTikzCourbe]{Couleur}},name path global=\pflnamecurve] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphiqueTikzCourbe]{Debut}}..[\pflstepcurve]..{\useKV[GraphiqueTikzCourbe]{Fin}},{\useKV[GraphiqueTikzCourbe]{Fin}})
+ \relax
+ };
+ }%
+ \ifboolKV[GraphiqueTikzCourbe]{Clip}{\end{scope}}{}
+}
+
+\NewDocumentCommand\DefinirCourbe{ O{} D<>{f} m }{%
+ \restoreKV[GraphiqueTikzCourbe]%
+ \setKV[GraphiqueTikzCourbe]{#1}%
+ \xintdeffloatfunc #2(x) := #3 ;
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflstepcurve{\xintfloateval{((\useKV[GraphiqueTikzCourbe]{Fin})-(\useKV[GraphiqueTikzCourbe]{Debut}))/100}}%
+ }%
+ {}%
\ifboolKV[GraphiqueTikzCourbe]{Clip}{\begin{scope}\clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});}{}
\clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
\ifboolKV[GraphiqueTikzCourbe]{Trace}%
@@ -543,6 +840,10 @@
\ifboolKV[GraphiqueTikzCourbe]{Clip}{\end{scope}}{}
}
+\NewDocumentCommand\DefinirListeInterpo{ m O{\malisteinterpo} }{%
+ \def#2{#1}%
+}
+
\NewDocumentCommand\DefinirCourbeInterpo{ O{} m }{%
\restoreKV[GraphiqueTikzCourbe]%
\setKV[GraphiqueTikzCourbe]{#1}%
@@ -566,6 +867,145 @@
\end{scope}
}
+\NewDocumentCommand\DefinirListeSpline{ m O{\malistespline} }{%
+ \def#2{#1}%
+}
+
+\newcommand\pflextractcoeff[2]{%1=liste,2=numero
+ \setsepchar{§}%
+ \readlist*\lcoeffs{#1}
+ \ifnum \lcoeffslen=1
+ \def\COEFFA{#1}
+ \def\COEFFB{#1}
+ \else
+ \itemtomacro\lcoeffs[#2]\COEFF
+ \IfSubStr{\COEFF}{/}%
+ {\StrCut{\COEFF}{/}{\COEFFA}{\COEFFB}}%
+ {\def\COEFFA{\COEFF}\def\COEFFB{\COEFF}}
+ \fi
+}
+
+\defKV[GraphiqueTikzSpline]{%
+ Nom=\def\pflsplinename{#1},%
+ Coeffs=\def\pflsplinecoeffs{#1}
+}
+
+\setKVdefault[GraphiqueTikzSpline]{%
+ Nom=spline,%
+ Couleur=black,%
+ Coeffs=3,%
+ Trace=false,%
+ Alt=false
+}
+
+\NewDocumentCommand\GenererSpline{ s m m O{\monspline} }{%
+ %1=liste
+ \setsepchar[.]{§./}%
+ \readlist*\SPLlistepoints{#2}%
+ %les données
+ \def\tmpsplinenumdeb{1}
+ \def\tmpsplinenumfin{\SPLlistepointslen}%
+ \pflextractcoeff{#3}{\tmpsplinenumdeb}%
+ %nb de calculs
+ \def\SPLnbsplines{\inteval{\tmpsplinenumfin-1}}%
+ %extraction des coordonnées
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,1]\xa%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,2]\ya%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,3]\fprimea%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,1]\xb%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,2]\yb%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,3]\fprimeb%
+ \IfBooleanTF{#1}%
+ {%
+ \xdef#4{(\xa,\ya) ..controls +({(\xb-\xa)/\COEFFA},{\fprimea*(\xb-\xa)/\COEFFA}) and +({-(\xb-\xa)/\COEFFA},{-\fprimeb*(\xb-\xa)/\COEFFA}).. (\xb,\yb)}%
+ }%
+ {%
+ \xdef#4{(\xa,\ya) ..controls +({atan \fprimea}:{(\xb-\xa)/\COEFFA}) and +({-180 + atan \fprimeb}:{(\xb-\xa)/\COEFFA}).. (\xb,\yb)}%
+ }%
+ \foreach \i in {\tmpsplinenumdeb,...,\SPLnbsplines}{%
+ %extraction des coeffs de compensation
+ \pflextractcoeff{#3}{\i}%
+ \def\j{\inteval{\i+1}}%
+ \itemtomacro\SPLlistepoints[\i,1]\xa%
+ \itemtomacro\SPLlistepoints[\i,2]\ya%
+ \itemtomacro\SPLlistepoints[\i,3]\fprimea%
+ \itemtomacro\SPLlistepoints[\j,1]\xb%
+ \itemtomacro\SPLlistepoints[\j,2]\yb%
+ \itemtomacro\SPLlistepoints[\j,3]\fprimeb%
+ \IfBooleanTF{#1}%
+ {%
+ \xdef#4{#4 ..controls +({(\xb-\xa)/\COEFFA},{\fprimea*(\xb-\xa)/\COEFFA}) and +({-(\xb-\xa)/\COEFFA},{-\fprimeb*(\xb-\xa)/\COEFFA}).. (\xb,\yb)}%
+ }%
+ {%
+ \xdef#4{#4 ..controls +({atan \fprimea}:{(\xb-\xa)/\COEFFA}) and +({-180 + atan \fprimeb}:{(\xb-\xa)/\COEFFB}).. (\xb,\yb)}%
+ }%
+ }%
+}
+
+\NewDocumentCommand\DefinirCourbeSpline{ O{} m D<>{\monspline} }{%
+ %1=liste
+ \restoreKV[GraphiqueTikzSpline]%
+ \setKV[GraphiqueTikzSpline]{#1}%
+ \ifboolKV[GraphiqueTikzSpline]{Alt}%
+ {%
+ \GenererSpline*{#2}{\pflsplinecoeffs}[#3]%
+ }%
+ {%
+ \GenererSpline{#2}{\pflsplinecoeffs}[#3]%
+ }%
+ \begin{scope}
+ \ifboolKV[GraphiqueTikzSpline]{Trace}%
+ {%
+ \path[draw,pflcourbe,{\useKV[GraphiqueTikzSpline]{Couleur}},name path global=\pflsplinename] #3 ;
+ }%
+ {%
+ \path[draw=none,pflcourbe,name path global=\pflsplinename] #3 ;
+ }%
+ \end{scope}
+}
+
+\NewDocumentCommand\DefinirSpline{ O{} m D<>{\monspline} }{%old version
+ %1=liste
+ \restoreKV[GraphiqueTikzSpline]%
+ \setKV[GraphiqueTikzSpline]{#1}%
+ \GenererSpline{#2}{\pflsplinecoeffs}[#3]%
+ \begin{scope}
+ \ifboolKV[GraphiqueTikzSpline]{Trace}%
+ {%
+ \path[draw,pflcourbe,{\useKV[GraphiqueTikzSpline]{Couleur}},name path global=\pflsplinename] #3 ;
+ }%
+ {%
+ \path[draw=none,pflcourbe,name path global=\pflsplinename] #3 ;
+ }%
+ \end{scope}
+}
+
+\NewDocumentCommand\TracerCourbeSpline{ O{} m D<>{\monspline} }{%
+ %1=liste
+ \restoreKV[GraphiqueTikzSpline]%
+ \setKV[GraphiqueTikzSpline]{#1}%
+ \ifboolKV[GraphiqueTikzSpline]{Alt}%
+ {%
+ \GenererSpline*{#2}{\pflsplinecoeffs}[#3]%
+ }%
+ {%
+ \GenererSpline{#2}{\pflsplinecoeffs}[#3]%
+ }%
+ \begin{scope}
+ \draw[pflcourbe,{\useKV[GraphiqueTikzSpline]{Couleur}}] #3 ;
+ \end{scope}
+}
+
+\NewDocumentCommand\TracerSpline{ O{} m D<>{\monspline} }{%old version
+ %1=liste
+ \restoreKV[GraphiqueTikzSpline]%
+ \setKV[GraphiqueTikzSpline]{#1}%
+ \GenererSpline{#2}{\pflsplinecoeffs}[#3]%
+ \begin{scope}
+ \draw[pflcourbe,{\useKV[GraphiqueTikzSpline]{Couleur}}] #3 ;
+ \end{scope}
+}
+
%===INTERSECTION & ANTÉCÉDENTS
\defKV[GraphiqueTikzIntersect]{%
Nom=\def\pflintercurves{#1}
@@ -575,7 +1015,8 @@
Aff=true,
Couleur=black,
AffDroite=false,%
- Traits=false
+ Traits=false,%
+ Style=o
}
\NewDocumentCommand\TrouverIntersections{ O{} m m D<>{\myt} }{%
@@ -592,7 +1033,8 @@
\draw[pfltraitimg,{\useKV[GraphiqueTikzIntersect]{Couleur}}]let \p1 = (\pflintercurves-\i) in (\pflintercurves-\i) -- ({\x1},{\pflOy}) ;
}%
{}%
- \filldraw[{\useKV[GraphiqueTikzIntersect]{Couleur}}] (\pflintercurves-\i) circle[pflpointc] ;
+ \MarquerPts*[Style={\useKV[GraphiqueTikzIntersect]{Style}},Couleur={\useKV[GraphiqueTikzIntersect]{Couleur}}]{(\pflintercurves-\i)}
+ %\filldraw[{\useKV[GraphiqueTikzIntersect]{Couleur}}] (\pflintercurves-\i) circle[pflpointc] ;
}
}%
}%
@@ -617,7 +1059,8 @@
\xintifboolexpr{#4 == 0}{}%
{%
\foreach \i in {1,...,#4}{%
- \filldraw[{\useKV[GraphiqueTikzIntersect]{Couleur}}] (\pflintercurves-\i) circle[pflpointc] ;
+ \MarquerPts*[Style={\useKV[GraphiqueTikzIntersect]{Style}},Couleur={\useKV[GraphiqueTikzIntersect]{Couleur}}]{(\pflintercurves-\i)}
+ %\filldraw[{\useKV[GraphiqueTikzIntersect]{Couleur}}] (\pflintercurves-\i) circle[pflpointc] ;
}
}%
}%
@@ -625,7 +1068,148 @@
\end{scope}
}
+%====MONTE CARLO
+\defKV[graphiquetikzmontecarlo]{%
+ Couleurs=\def\graphtikzmccols{#1},%
+ BornesX=\def\graphtikzmcxbornes{#1},%
+ BornesY=\def\graphtikzmcybornes{#1}
+}
+
+\setKVdefault[graphiquetikzmontecarlo]{%
+ Couleurs={blue/red},%
+ BornesX={\pflxmin,\pflxmax},%
+ BornesY={\pflymin,\pflymax}
+}
+
+\NewDocumentCommand\SimulerMonteCarlo{ O{} D<>{f} m O{\nbptsmcok} O{\nbptsmcko} }{%
+ \restoreKV[graphiquetikzmontecarlo]%
+ \setKV[graphiquetikzmontecarlo]{#1}%
+ \StrCut{\graphtikzmccols}{/}{\tmpMCcolOK}{\tmpMCcolKO}%
+ \StrCut{\graphtikzmcxbornes}{,}{\tmpMCxmin}{\tmpMCxmax}%
+ \StrCut{\graphtikzmcybornes}{,}{\tmpMCymin}{\tmpMCymax}%
+ \xdef#4{0}%
+ \xdef#5{0}%
+ \xdef\nbptsmc{#3}%
+ \foreach \i in {1,...,#3}{%
+ \xdef\tmpMCrandX{\xintfloateval{random()*((\tmpMCxmax)-(\tmpMCxmin))+(\tmpMCxmin)}}%
+ \xdef\tmpMCrandY{\xintfloateval{random()*((\tmpMCymax)-(\tmpMCymin))+(\tmpMCymin)}}%
+ \xdef\tmpMCrandfX{\xintfloateval{#2(\tmpMCrandX)}}%
+ \xintifboolexpr{ \tmpMCrandfX > \tmpMCrandY }%
+ {%
+ \xdef#4{\xinteval{#4+1}}%
+ \filldraw[\tmpMCcolOK] (\tmpMCrandX,\tmpMCrandY) circle[pflpointmc] ;
+ }%
+ {%
+ \xdef#5{\xinteval{#5+1}}%
+ \filldraw[\tmpMCcolKO] (\tmpMCrandX,\tmpMCrandY) circle[pflpointmc] ;
+ }%
+ }%
+}
+
+%====MÉTHODES INTÉGRALES
+
+\defKV[graphiquetikzintegr]{%
+ Couleur=\def\graphtikzintgrcol{#1},%
+ CouleurRemplissage=\def\graphtikzintgrcolrempl{#1},%
+ NbSubDiv=\def\graphtikzintgrnb{#1},%
+ Methode=\def\graphtikzintgrtype{#1},%
+ Opacite=\def\graphtikzintgropac{#1}
+}
+
+\setKVdefault[graphiquetikzintegr]{%
+ Couleur=red,%
+ NbSubDiv=10,%
+ Methode=RectanglesGauche,%
+ Remplir=true,%
+ CouleurRemplissage={\graphtikzintgrcol!25},%
+ Opacite=0.25,%
+ Spline=false
+}
+
+\NewDocumentCommand\RepresenterMethodeIntegrale{ O{} D<>{f} m m }{%opts+nom_fct/spline+a+b
+ \useKVdefault[graphiquetikzintegr]%
+ \setKV[graphiquetikzintegr]{#1}%
+ \ifboolKV[graphiquetikzintegr]{Remplir}%
+ {%
+ \tikzset{pflfigureintegr/.style={pfltrait,\graphtikzintgrcol,fill=\graphtikzintgrcolrempl,fill opacity=\graphtikzintgropac}}%
+ }%
+ {%
+ \tikzset{pflfigureintegr/.style={pfltrait,\graphtikzintgrcol}}%
+ }%
+ \tikzset{figureintegr/.style={pfltrait,\graphtikzintgrcol,fill=\graphtikzintgrcolrempl,fill opacity=\graphtikzintgropac}}%
+ \def\TmpH{(#4-#3)/\graphtikzintgrnb}
+ \ifboolKV[graphiquetikzintegr]{Spline}%
+ {%
+ \IfEq{\graphtikzintgrtype}{RectanglesGauche}%
+ {%
+ \foreach \i in {0,...,\inteval{\graphtikzintgrnb-1}}{%
+ \path[draw=none,pflcourbe,name path=tmpintmethod] ({#3+\i*\TmpH},{\pflymin})--({#3+\i*\TmpH},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpintmethod,name=KLM}] ;
+ \draw[pflfigureintegr] let \p1 = (KLM-1) in ({#3+\i*\TmpH},{0}) rectangle++ ({\TmpH},{\y1}) ;
+ }%
+ }%
+ {}%
+ \IfEq{\graphtikzintgrtype}{RectanglesDroite}%
+ {%
+ \foreach \i in {0,...,\inteval{\graphtikzintgrnb-1}}{%
+ \path[draw=none,pflcourbe,name path=tmpintmethod] ({#3+(\i+1)*\TmpH},{\pflymin})--({#3+(\i+1)*\TmpH},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpintmethod,name=KLM}] ;
+ \draw[pflfigureintegr] let \p1 = (KLM-1) in ({#3+\i*\TmpH},{0}) rectangle++ ({\TmpH},{\y1}) ;
+ }%
+ }%
+ {}%
+ \IfEq{\graphtikzintgrtype}{RectanglesMilieu}%
+ {%
+ \foreach \i in {0,...,\inteval{\graphtikzintgrnb-1}}{%
+ \path[draw=none,pflcourbe,name path=tmpintmethod] ({#3+(\i+0.5)*\TmpH},{\pflymin})--({#3+(\i+0.5)*\TmpH},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpintmethod,name=KLM}] ;
+ \draw[pflfigureintegr] let \p1 = (KLM-1) in ({#3+\i*\TmpH},{0}) rectangle++ ({\TmpH},{\y1}) ;
+ }%
+ }%
+ {}%
+ \IfEq{\graphtikzintgrtype}{Trapezes}%
+ {%
+ \foreach \i in {0,...,\inteval{\graphtikzintgrnb-1}}{%
+ \path[draw=none,pflcourbe,name path=tmpintmethodg] ({#3+(\i)*\TmpH},{\pflymin})--({#3+(\i)*\TmpH},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpintmethodg,name=KLMg}] ;
+ \path[draw=none,pflcourbe,name path=tmpintmethodd] ({#3+(\i+1)*\TmpH},{\pflymin})--({#3+(\i+1)*\TmpH},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpintmethodd,name=KLMd}] ;
+ \draw[pflfigureintegr] ({#3+\i*\TmpH},{0}) -- (KLMg-1) -- (KLMd-1) -- ({#3+(\i+1)*\TmpH},{0}) -- cycle ;
+ }%
+ }%
+ {}%
+ }%
+ {%
+ \IfEq{\graphtikzintgrtype}{RectanglesGauche}%
+ {%
+ \foreach \i in {0,...,\inteval{\graphtikzintgrnb-1}}%
+ \draw[pflfigureintegr] ({#3+\i*\TmpH},{0}) rectangle++ ({\TmpH},{\xintfloateval{#2(#3+\i*\TmpH)}}) ;
+ }%
+ {}%
+ \IfEq{\graphtikzintgrtype}{RectanglesDroite}%
+ {%
+ \foreach \i in {0,...,\inteval{\graphtikzintgrnb-1}}%
+ \draw[pflfigureintegr] ({#3+\i*\TmpH},{0}) rectangle++ ({\TmpH},{\xintfloateval{#2(#3+(\i+1)*\TmpH)}}) ;
+ }%
+ {}%
+ \IfEq{\graphtikzintgrtype}{RectanglesMilieu}%
+ {%
+ \foreach \i in {0,...,\inteval{\graphtikzintgrnb-1}}%
+ \draw[pflfigureintegr] ({#3+\i*\TmpH},{0}) rectangle++ ({\TmpH},{\xintfloateval{#2(#3+(\i+0.5)*\TmpH)}}) ;
+ }%
+ {}%
+ \IfEq{\graphtikzintgrtype}{Trapezes}%
+ {%
+ \foreach \i in {0,...,\inteval{\graphtikzintgrnb-1}}%
+ \draw[pflfigureintegr] ({#3+\i*\TmpH},{0}) -- ({#3+\i*\TmpH},{\xintfloateval{#2(#3+\i*\TmpH)}}) -- ({#3+(\i+1)*\TmpH},{\xintfloateval{#2(#3+(\i+1)*\TmpH)}}) -- ({#3+(\i+1)*\TmpH},{0}) -- cycle ;
+ }%
+ {}%
+ }%
+}
+
+
%====INTÉGRALES
+%v2 avec modification de la clé [Type=...] ?
\defKV[GraphiqueTikzIntegr]{%
Couleurs=\def\pfldomtikzcolors{#1},%
Style=\def\pfldomtikzstyle{#1},%
@@ -635,20 +1219,29 @@
Pas=\def\pflstepcurve{#1},%
Bornes=\def\pflintbornes{#1},%
Jonction=\def\pfldomtikzjoin{#1},%
- NomSpline=\def\pfldomtikznamespline{#1}
+ NomInterpo=\def\pfldomtikznameinterpo{#1},%
+ NomInterpoB=\def\pfldomtikznameinterpob{#1},%
+ NomSpline=\def\pfldomtikznamespline{#1},%
+ NomSplineB=\def\pfldomtikznamesplineb{#1}
}
\setKVdefault[GraphiqueTikzIntegr]{%
Couleurs=gray,%
Style=remplissage,%
Opacite=0.5,%
Hachures={north west lines},%
- Type=dessous,%
+ Type=fct,%
Pas={},%
Jonction=bevel,%
Bornes=abs,%
Bord=true,%
Spline=false,%
- NomSpline={\monspline}
+ SplineB=false,%
+ NomInterpo={\moninterpo},%
+ NomInterpoB={\moninterpoB},%
+ NomSpline={\monspline},%
+ NomSplineB={\monsplineB},%
+ Tension=0.5,%
+ TensionB=0.5
}
\NewDocumentCommand\TracerIntegrale{ O{} D<>{} m O{0} m m }{%
@@ -675,15 +1268,15 @@
\tikzset{integralebordtikzstyle/.style={draw=none}}
}%
\IfStrEq{\pfldomtikzstyle}{hachures}%
- {%
- \tikzset{integraletikzstyle/.style={pfltrait,pattern=\pfldomtikzhatch,pattern color=\pfldomtikzcolorfond,line join=\pfldomtikzjoin}}
- }%
- {}%
+ {%
+ \tikzset{integraletikzstyle/.style={pfltrait,pattern=\pfldomtikzhatch,pattern color=\pfldomtikzcolorfond,line join=\pfldomtikzjoin}}
+ }%
+ {}%
\IfStrEq{\pfldomtikzstyle}{remplissage}%
- {%
- \tikzset{integraletikzstyle/.style={pfltrait,fill=\pfldomtikzcolorfond,fill opacity=\pfldomtikzopac,line join=\pfldomtikzjoin}}
- }%
- {}%
+ {%
+ \tikzset{integraletikzstyle/.style={pfltrait,fill=\pfldomtikzcolorfond,fill opacity=\pfldomtikzopac,line join=\pfldomtikzjoin}}
+ }%
+ {}%
%extraction des infos x/y
\IfStrEqCase{\pflintbornes}{%
{abs}%
@@ -715,43 +1308,193 @@
\xdef\absnoeudB{#6}%
}%
}%
- %suite
+ %suite avec les nbs points
\IfStrEq{\pflstepcurve}{}%
{%
\xdef\pflstepcurve{\xintfloateval{((\absnoeudB)-(\absnoeudA))/100}}%
}%
{}%
- \IfStrEq{\pfldomtikztype}{dessous}%
- {%
- \ifboolKV[GraphiqueTikzIntegr]{Spline}%
- {%
- \begin{scope}
- \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
- \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflOy}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflOy}) -- cycle ;
- \end{scope}
- \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
- \path[name intersections={of=#3 and tmpintbornea,name=YYY}] ;
- \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudA},{\pflOy})-- (YYY-1) ;
- \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
- \path[name intersections={of=#3 and tmpintborneb,name=ZZZ}] ;
- \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudB},{\pflOy})-- (ZZZ-1) ;
- }%
- {%
- \begin{scope}
- \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
- \draw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflOy}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflOy}) -- cycle ;
- \end{scope}
- }%
- }%
- {}%
- \IfStrEq{\pfldomtikztype}{entre}%
- {%
- \begin{scope}
- \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
- \draw[integraletikzstyle,integralebordtikzstyle,#2] plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#4),x=\absnoeudB..[-(\pflstepcurve)]..\absnoeudA,\absnoeudA)\relax} -- cycle ;
- \end{scope}
- }%
- {}%
+ %TRACÉSen fonction des types de courbes
+ \IfStrEq{\pfldomtikztype}{fct}%
+ {%OK
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflOy}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflOy}) -- cycle ;
+ \end{scope}
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{spl}%avec 3=courbe spline + clé [Spline] à utiliser !
+ {%OK
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflOy}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflOy}) -- cycle ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=#3 and tmpintbornea,name=YYY}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudA},{\pflOy})-- (YYY-1) ;
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=#3 and tmpintborneb,name=ZZZ}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudB},{\pflOy})-- (ZZZ-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{itp}%avec 3=courbe interpo
+ {%OK
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflOy}) -- plot [smooth,tension={\useKV[GraphiqueTikzIntegr]{Tension}}] coordinates {#3} -- ({\absnoeudB},{\pflOy}) -- cycle ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpo,name=YYY}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudA},{\pflOy})-- (YYY-1) ;
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpo,name=ZZZ}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudB},{\pflOy})-- (ZZZ-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{fct/fct}%avec #3=formule et #4=formule
+ {%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[integraletikzstyle,integralebordtikzstyle,#2] plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#4),x=\absnoeudB..[-(\pflstepcurve)]..\absnoeudA,\absnoeudA)\relax} -- cycle ;
+ \end{scope}
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{spl/spl}%avec #3=cbe spline + #4=cbe splineB
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymax}) -- \pfldomtikznamesplineb -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=#3 and tmpintbornea,name=YYYA}] ;
+ \path[name intersections={of=#4 and tmpintbornea,name=ZZZA}] ;
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=#3 and tmpintborneb,name=YYYB}] ;
+ \path[name intersections={of=#4 and tmpintborneb,name=ZZZB}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] (YYYA-1)-- (ZZZA-1) ;
+ \draw[\pfldomtikzcolorbord,pfltrait] (YYYB-1)-- (ZZZB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{itp/itp}%avec #3=cbe interpo + #4=cbe interpoB
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot [smooth,tension={\useKV[GraphiqueTikzIntegr]{Tension}}] coordinates {#3} -- ({\absnoeudB},{\pflymin}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot [smooth,tension={\useKV[GraphiqueTikzIntegr]{TensionB}}] coordinates {#4} -- ({\absnoeudB},{\pflymax}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpo,name=YYYA}] ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpob,name=ZZZA}] ;
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpo,name=YYYB}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpob,name=ZZZB}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] (YYYA-1)-- (ZZZA-1) ;
+ \draw[\pfldomtikzcolorbord,pfltrait] (YYYB-1)-- (ZZZB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{fct/spl}%avec #3=formule + #4=spline
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymax}) -- \pfldomtikznamesplineb -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and #4,name=ZZZA}] ;
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintborneb and #4,name=ZZZB}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudA},{\xintfloateval{subs(#3,x=\absnoeudA)}})-- (ZZZA-1) ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudB},{\xintfloateval{subs(#3,x=\absnoeudB)}})-- (ZZZB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{spl/fct}%avec #3=spline + #4=fct
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#4),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymin}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and #3,name=ZZZA}] ;
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintborneb and #3,name=ZZZB}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudA},{\xintfloateval{subs(#4,x=\absnoeudA)}})-- (ZZZA-1) ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudB},{\xintfloateval{subs(#4,x=\absnoeudB)}})-- (ZZZB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{fct/itp}%avec #3=formule + #4=liste interpo
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot [smooth,tension={\useKV[GraphiqueTikzIntegr]{TensionB}}] coordinates {#4} -- ({\absnoeudB},{\pflymax}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpob,name=ZZZAA}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpob,name=ZZZAB}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudA},{\xintfloateval{subs(#3,x=\absnoeudA)}})-- (ZZZAA-1) ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudB},{\xintfloateval{subs(#3,x=\absnoeudB)}})-- (ZZZAB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{itp/fct}%
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#4),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot [smooth,tension={\useKV[GraphiqueTikzIntegr]{Tension}}] coordinates {#3} -- ({\absnoeudB},{\pflymin}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpo,name=ZZZAA}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpo,name=ZZZAB}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudA},{\xintfloateval{subs(#4,x=\absnoeudA)}})-- (ZZZAA-1) ;
+ \draw[\pfldomtikzcolorbord,pfltrait] ({\absnoeudB},{\xintfloateval{subs(#4,x=\absnoeudB)}})-- (ZZZAB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{itp/spl}%
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot [smooth,tension={\useKV[GraphiqueTikzIntegr]{Tension}}] coordinates {#3} -- ({\absnoeudB},{\pflymin}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- \pfldomtikznamesplineb -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;%borne inf
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;%borne sup
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpo,name=YYYKAA}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpo,name=YYYKBB}] ;
+ \path[name intersections={of=tmpintbornea and #4,name=ZZZKAA}] ;
+ \path[name intersections={of=tmpintborneb and #4,name=ZZZKBB}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] (YYYKAA-1)-- (ZZZKAA-1) ;
+ \draw[\pfldomtikzcolorbord,pfltrait] (YYYKBB-1)-- (ZZZKBB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{spl/itp}%
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot [smooth,tension={\useKV[GraphiqueTikzIntegr]{TensionB}}] coordinates {#4} -- ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,pflcourbe,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;%borne inf
+ \path[draw=none,pflcourbe,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;%borne sup
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpob,name=YYYKAA}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpob,name=YYYKBB}] ;
+ \path[name intersections={of=tmpintbornea and #3,name=ZZZKAA}] ;
+ \path[name intersections={of=tmpintborneb and #3,name=ZZZKBB}] ;
+ \draw[\pfldomtikzcolorbord,pfltrait] (YYYKAA-1)-- (ZZZKAA-1) ;
+ \draw[\pfldomtikzcolorbord,pfltrait] (YYYKBB-1)-- (ZZZKBB-1) ;
+ }%
+ {}%
}
\NewDocumentCommand\PlacerPoints{ s O{black} D<>{\normalfont\normalsize} m }{%
@@ -763,7 +1506,7 @@
}%
{%
\foreach \Point/\Pos/\Label in {#4}{%
- \filldraw[#2] \Point circle[pflpointc] node[\Pos,font=#3] {\Label} ;
+ \filldraw[#2] \Point circle[pflpointc] node[pflnoeud,\Pos,font=#3] {\Label} ;
}
}%
}
@@ -772,17 +1515,22 @@
\defKV[GraphiqueTikzRegLin]{%
Arrondis=\def\pflarrondisreglin{#1},
Nom=\def\pflnamereglin{#1},
+ NomPara=\def\pflnameregquad{#1},
Debut=\def\pflreglinmin{#1},
Fin=\def\pflreglinmax{#1}
}
\setKVdefault[GraphiqueTikzRegLin]{
CouleurNuage=black,
CouleurDroite=black,
+ CouleurPara=black,
Arrondis={},
Debut={\pflxmin},
Fin={\pflxmax},
- Nom=reglin,
- TracerDroite=false
+ Nom=reglin,%
+ NomPara=quadreg,%
+ TracerDroite=false,%
+ TracerParabole=false,%
+ Style=o
}
\NewDocumentCommand\TracerNuage{ O{} D<>{d} m m }{%
@@ -797,14 +1545,13 @@
\def\LNB{\inteval{\LXlen}}
%nuage
\foreach \i in {1,...,\LXlen}{%
- \filldraw[{\useKV[GraphiqueTikzRegLin]{CouleurNuage}}] ({\LX[\i]},{\LY[\i]}) circle[pflpointnuage] ;
+ \itemtomacro\LX[\i]\tmpmavalx%
+ \itemtomacro\LY[\i]\tmpmavaly%
+ \MarquerPts*[Style={\useKV[GraphiqueTikzRegLin]{Style}},Couleur={\useKV[GraphiqueTikzRegLin]{CouleurNuage}}]{(\tmpmavalx,\tmpmavaly)}%
}
%droite de régression
\ifboolKV[GraphiqueTikzRegLin]{TracerDroite}%
{%
- %mini LX
- \def\tmpxminreglin{\fpeval{min(#2)}}
- \def\tmpxmaxreglin{\fpeval{max(#2)}}
%somme des LX et des LY OK
\xdef\LXSomme{0}
\xdef\LYSomme{0}
@@ -859,19 +1606,158 @@
\end{scope}
}%
{}%
+ \ifboolKV[GraphiqueTikzRegLin]{TracerParabole}%
+ {%
+ %somme importantes
+ \xdef\LXSomme{0}%
+ \xdef\LXCSomme{0}%
+ \xdef\LYSomme{0}%
+ \xdef\LXXSomme{0}%
+ \xdef\LXYSomme{0}%
+ \xdef\LXXCSomme{0}%
+ \xdef\LXCXCSomme{0}%
+ \xdef\LXCYSomme{0}%
+ %calculs
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LXSomme{\xintfloateval{\LXSomme+\LX[\i]}}%
+ \xdef\LXCSomme{\xintfloateval{\LXCSomme+(\LX[\i])^2}}%
+ }%
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LYSomme{\xintfloateval{\LYSomme+\LY[\i]}}%
+ }%
+ \xdef\LXmoy{\xintfloateval{\LXSomme/\LNB}}%
+ \xdef\LYmoy{\xintfloateval{\LYSomme/\LNB}}%
+ \xdef\LXCmoy{\xintfloateval{\LXCSomme/\LNB}}%
+ %calculs suites
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LXXSomme{\xintfloateval{\LXXSomme+(\LX[\i]-\LXmoy)^2}}%
+ \xdef\LXYSomme{\xintfloateval{\LXYSomme+(\LX[\i]-\LXmoy)*(\LY[\i]-\LYmoy)}}%
+ \xdef\LXXCSomme{\xintfloateval{\LXXCSomme+(\LX[\i]-\LXmoy)*((\LX[\i])*(\LX[\i])-\LXCmoy)}}%
+ \xdef\LXCXCSomme{\xintfloateval{\LXCXCSomme+((\LX[\i])^2-\LXCmoy)^2}}%
+ \xdef\LXCYSomme{\xintfloateval{\LXCYSomme+((\LX[\i])^2-\LXCmoy)*(\LY[\i]-\LYmoy)}}%
+ }%
+ %COEFFS OK
+ \IfStrEq{\pflarrondisreglin}{}%
+ {%
+ \xdef\tmpcoeffregquadb{\xintfloateval{(\LXYSomme*\LXCXCSomme-\LXCYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2)}}
+ \xdef\tmpcoeffregquada{\xintfloateval{(\LXCYSomme*\LXXSomme-\LXYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2)}}
+ \xdef\tmpcoeffregquadc{\xintfloateval{\LYmoy-\tmpcoeffregquadb*\LXmoy-\tmpcoeffregquada*\LXCmoy}}
+ }%
+ {%
+ \xdef\tmpcoeffregquadb{\xintfloateval{round((\LXYSomme*\LXCXCSomme-\LXCYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2),\pflarrondisreglin)}}
+ \xdef\tmpcoeffregquada{\xintfloateval{round((\LXCYSomme*\LXXSomme-\LXYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2),\pflarrondisreglin)}}
+ \xdef\tmpcoeffregquadc{\xintfloateval{round(\LYmoy-\tmpcoeffregquadb*\LXmoy-\tmpcoeffregquada*\LXCmoy,\pflarrondisreglin)}}
+ }%
+ \xintdeffloatfunc #2(x) := (\tmpcoeffregquada)*x^2+(\tmpcoeffregquadb)*x+\tmpcoeffregquadc ;
+ %tracé
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[pflcourbe,{\useKV[GraphiqueTikzRegLin]{CouleurPara}},name path global=\pflnameregquad,samples=250,domain=\pflreglinmin:\pflreglinmax] plot (\x,{\tmpcoeffregquada*(\x)^2+\tmpcoeffregquadb*\x+\tmpcoeffregquadc}) ;
+ \end{scope}
+ }%
+ {}%
+}
+
+\if@loadxintreg
+%régressions alternatives
+\NewDocumentCommand\TracerAjustement{ O{} D<>{cbajust} m D<>{} m m }{%
+ %1=options de tracés
+ %2=nom courbe
+ %3=type
+ %4=arrondis
+ %5=liste X
+ %6=liste Y
+ \IfStrEq{#3}{lin}%
+ {%
+ \xintlinreg[round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\linrega*x+\linregb}%
+ }%
+ {}%
+ \IfStrEq{#3}{quad}%
+ {%
+ \xintquadreg[round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\quadrega*x^2+\quadregb*x+\quadregc}%
+ }%
+ {}%
+ \IfStrEq{#3}{pow}%
+ {%
+ \xintpowreg[round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\powrega*x^(\powregb)}%
+ }%
+ {}%
+ \IfStrEq{#3}{expab}%
+ {%
+ \xintexpabreg[round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\expabrega*(\expabregb)^x}%
+ }%
+ {}%
+ \IfStrEq{#3}{hyp}%
+ {%
+ \xinthypreg[round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\hyprega+(\hypregb)/x}%
+ }%
+ {}%
+ \IfStrEq{#3}{log}%
+ {%
+ \xintlogreg[round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\logrega+(\logregb)*log(x)}%
+ }%
+ {}%
+ \IfStrEq{#3}{exp}%
+ {%
+ \xintexpreg[round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{exp(\exprega*x+\expregb)}%
+ }%
+ {}%
+ \IfStrEq{#3}{expalt}%
+ {%
+ \xintexpreg[Alt,round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\expregb*exp(\exprega*x)}%
+ }%
+ {}%
+ \IfStrEq{#3}{cub}%
+ {%
+ \xintcubreg[round={#4}]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\cubrega*x^3+\cubregb*x^2+\cubregc*x+\cubregd}%
+ }%
+ {}%
+ \IfSubStr{#3}{expoff}%
+ {%
+ \StrBehind{#3}{=}[\expoffset]%
+ \xintexpoffreg[round={#4},offset=\expoffset]{#5}{#6}%
+ \DefinirFonction[#1,Trace]<#2>{\expoffset+\expregoffb*exp(\expregoffa*x)}%
+ }%
+ {}%
}
+\fi
%===IMAGES & ANTÉCÉDENTS
\defKV[GraphiqueTikzImg]{
Couleurs=\def\pflimgcolors{#1},%
- Nom=\def\pflantecednoms{#1}
+ Nom=\def\pflantecednoms{#1}%
}
\setKVdefault[GraphiqueTikzImg]{
- Couleurs=black,
- Traits=false,
+ Couleurs=black,%
+ Traits=false,%
Spline=false,%
- Nom={}
+ Nom={},%
+ Style=o
+}
+
+\NewDocumentCommand\DefinirImage{ O{} m m }{%
+ \useKVdefault[GraphiqueTikzImg]%
+ \setKV[GraphiqueTikzImg]{#1}%
+ \ifboolKV[GraphiqueTikzImg]{Spline}%
+ {%
+ \path[draw=none,pflcourbe,name path=tmpimage] ({#3},{\pflymin})--({#3},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpimage,name=ZZZZ}] ;
+ \coordinate (\pflantecednoms) at (ZZZZ-1) ;
+ }%
+ {%
+ \xdef\tmpresimg{\xintfloateval{#2(#3)}}%
+ \coordinate (\pflantecednoms) at ({#3},{\tmpresimg}) ;
+ }%
}
\NewDocumentCommand\PlacerImages{ O{} m m }{%
@@ -894,7 +1780,8 @@
\draw[\pflimgcolorline,pfltraitimg] let \p1 = (ZZ-1) in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
}%
{}%
- \filldraw[\pflimgcolorpt] (ZZ-1) circle[radius=2pt] ;
+ \MarquerPts*[Style={\useKV[GraphiqueTikzImg]{Style}},Couleur=\pflimgcolorpt]{(ZZ-1)}
+ %\filldraw[\pflimgcolorpt] (ZZ-1) circle[radius=2pt] ;
}
}%
{%
@@ -905,9 +1792,10 @@
\draw[\pflimgcolorline,pfltraitimg] ({\i},{\pflOy}) |- ({\pflOx},{\tmpresimg}) ;
}%
{}%
- \filldraw[\pflimgcolorpt] ({\i},{\tmpresimg}) circle[radius=2pt] ;
+ \MarquerPts*[Style={\useKV[GraphiqueTikzImg]{Style}},Couleur=\pflimgcolorpt]{({\i},{\tmpresimg})}
+ %\filldraw[\pflimgcolorpt] ({\i},{\tmpresimg}) circle[radius=2pt] ;
}%
- }
+ }%
}
\NewDocumentCommand\PlacerAntecedents{ O{} m m }{%avec le nom de la courbe...
@@ -943,14 +1831,1221 @@
\draw[\pflimgcolorline,pfltraitimg] let \p1 = (ZZ-\i) in (ZZ-\i) -- ({\x1},{\pflOy}) ;
}%
{}%
- \filldraw[\pflimgcolorpt] (ZZ-\i) circle[radius=2pt] ;
+ \MarquerPts*[Style={\useKV[GraphiqueTikzImg]{Style}},Couleur=\pflimgcolorpt]{(ZZ-\i)}
+ %\filldraw[\pflimgcolorpt] (ZZ-\i) circle[radius=2pt] ;
}%
}%
\end{scope}
}
-%====SPLINES CUBIQUES
-\newcommand\pflextractcoeff[2]{%1=liste,2=numero
+%===NOMBRE DÉRIVÉ ET TANGENTE (EXPÉRIEMENTAL)
+\NewDocumentCommand\CalculerNbDerive{ s m m m }{%*=gauche+nomfct+abspt+h
+ \IfBooleanTF{#1}%
+ {%
+ \xdef\TmpResNbDeriv{\xintfloateval{(#2(#3)-#2(#3-#4))/(#4)}}%
+ }%
+ {%
+ \xdef\TmpResNbDeriv{\xintfloateval{(#2(#3+#4)-#2(#3))/(#4)}}%
+ }%
+}
+
+\defKV[GraphiqueTikzTgte]{%
+ Couleurs=\def\pfltgttikzcolors{#1},%
+ DecG=\def\pfltgttikzkl{#1},%
+ DecD=\def\pfltgttikzkr{#1},%
+ h=\def\pfltgttikzh{#1},%
+ Sens=\def\pfltgttikzsens{#1},%
+ Delta=\def\tmptgtedelta{#1}
+}
+\setKVdefault[GraphiqueTikzTgte]{%
+ Couleurs=black,%
+ DecG=1,%
+ DecD=1,%
+ AffPoint=false,%
+ Spline=false,%
+ h=0.1,%
+ Sens=gd,%
+ Noeud=false,%
+ Delta=0.01,%
+ Style=o
+}
+
+\NewDocumentCommand\TracerTangente{ O{} m m D<>{} }{%
+ \restoreKV[GraphiqueTikzTgte]%
+ \setKV[GraphiqueTikzTgte]{#1}%
+ %en fonction de la gestion de l'abscisse
+ \ifboolKV[GraphiqueTikzTgte]{Noeud}%
+ {%
+ \path #3;
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\pfltgttikzx{\xintfloateval{(\ConvertirPtToCm{\macrox})/(\pflxunit)}}%
+ }%
+ {%
+ \xdef\pfltgttikzx{#3}%
+ }%
+ %parties communes
+ \IfSubStr{\pfltgttikzcolors}{/}%
+ {%
+ \StrCut{\pfltgttikzcolors}{/}{\pfltgttikzline}{\pfltgttikzpoint}
+ }%
+ {%
+ \xdef\pfltgttikzline{\pfltgttikzcolors}\xdef\pfltgttikzpoint{\pfltgttikzcolors}
+ }%
+ \xdef\tmptgtdeb{\xintfloateval{\pfltgttikzx-(\pfltgttikzkl)}}%
+ \xdef\tmptgtfin{\xintfloateval{\pfltgttikzx+(\pfltgttikzkr)}}%
+ %suivant le type de courbe
+ \ifboolKV[GraphiqueTikzTgte]{Spline}%
+ {%
+ \path[name path=tmpimage] ({\pfltgttikzx},{\pflymin})--({\pfltgttikzx},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpimage,name=TANp}] ;
+ \IfStrEq{\pfltgttikzsens}{gd}%
+ {%
+ \path[name path=L-vline] ({\pfltgttikzx-\tmptgtedelta},{\pflymin}) -- ({\pfltgttikzx-\tmptgtedelta},{\pflymax}) ;
+ \path[name path=R-vline] ({\pfltgttikzx+\tmptgtedelta},{\pflymin}) -- ({\pfltgttikzx+\tmptgtedelta},{\pflymax}) ;
+ %\coordinate (LXcoor) at ($(TANp-1)+({-\tmptgtedelta},0)$) ;
+ %\coordinate (RXcoor) at ($(TANp-1)+({\tmptgtedelta},0)$) ;
+ }%
+ {}%
+ \IfStrEq{\pfltgttikzsens}{g}%
+ {%
+ \path[name path=L-vline] ({\pfltgttikzx-\tmptgtedelta},{\pflymin}) -- ({\pfltgttikzx-\tmptgtedelta},{\pflymax}) ;
+ \path[name path=R-vline] ({\pfltgttikzx},{\pflymin}) -- ({\pfltgttikzx},{\pflymax}) ;
+ %\coordinate (LXcoor) at ($(TANp-1)+({-\tmptgtedelta},0)$) ;
+ %\coordinate (RXcoor) at (TANp-1) ;
+ \def\tmptgtfin{\pfltgttikzx}%
+ }%
+ {}%
+ \IfStrEq{\pfltgttikzsens}{d}%
+ {%
+ \path[name path=L-vline] ({\pfltgttikzx},{\pflymin}) -- ({\pfltgttikzx},{\pflymax}) ;
+ \path[name path=R-vline] ({\pfltgttikzx+\tmptgtedelta},{\pflymin}) -- ({\pfltgttikzx+\tmptgtedelta},{\pflymax}) ;
+ \def\tmptgtdeb{\pfltgttikzx}%
+ }%
+ {}%
+ \path[name intersections={of=#2 and L-vline,name=LXcut}] ;
+ \path[name intersections={of=#2 and R-vline,name=RXcut}] ;
+ \coordinate (tzXproj) at ($(LXcut-1)!(TANp-1)!(RXcut-1)$) ; % projection
+ \coordinate (LLpoint) at ($(LXcut-1)+(TANp-1)-(tzXproj)$) ; % move
+ \coordinate (RRpoint) at ($(RXcut-1)+(TANp-1)-(tzXproj)$) ; % move
+ \path (LLpoint);
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\tzTANLLX{\xintfloateval{(\ConvertirPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\tzTANLLY{\xintfloateval{(\ConvertirPtToCm{\macroy})/(\pflyunit)}}%
+ \path (RRpoint);
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\tzTANRRX{\xintfloateval{(\ConvertirPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\tzTANRRY{\xintfloateval{(\ConvertirPtToCm{\macroy})/(\pflyunit)}}%
+ \def\tztangentLFn{(\tzTANRRY-\tzTANLLY)/(\tzTANRRX-\tzTANLLX)*(\x-\tzTANLLX)+\tzTANLLY}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax}) ;
+ \draw[pfltrait,\pfltgttikzline,domain=\tmptgtdeb:\tmptgtfin,samples=2,#4] plot (\x,{\tztangentLFn}) ;
+ \end{scope}
+ }%
+ {%
+ \IfStrEq{\pfltgttikzsens}{g}%
+ {%
+ \CalculerNbDerive*{#2}{\pfltgttikzx}{\pfltgttikzh}%
+ }%
+ {%
+ \CalculerNbDerive{#2}{\pfltgttikzx}{\pfltgttikzh}%
+ }%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax}) ;
+ \draw[pfltrait,\pfltgttikzline,#4] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,\TmpResNbDeriv*(x-(\pfltgttikzx))+#2(\pfltgttikzx)),x=\tmptgtdeb,\tmptgtfin)
+ \relax
+ };
+ \end{scope}
+ }%
+ \ifboolKV[GraphiqueTikzTgte]{AffPoint}%
+ {%
+ \ifboolKV[GraphiqueTikzTgte]{Spline}%
+ {%
+ \MarquerPts*[Style={\useKV[GraphiqueTikzTgte]{Style}},Couleur=\pfltgttikzpoint]{(TANp-1)}
+ %\filldraw[] (TANp-1) circle[pflpointc] ;
+ }%
+ {%
+ \xdef\tmpimgtgt{\xintfloateval{#2(\pfltgttikzx)}}%
+ \MarquerPts*[Style={\useKV[GraphiqueTikzTgte]{Style}},Couleur=\pfltgttikzpoint]{({\pfltgttikzx},\tmpimgtgt)}
+ %\filldraw[\pfltgttikzpoint] ({\pfltgttikzx},\tmpimgtgt) circle[pflpointc] ;
+ }%
+ }%
+ {}%
+}
+
+%====loi normale
+\defKV[GraphiqueTikzGaussienne]{%
+ Pas=\def\pflgaussstep{#1},%
+ Nom=\def\pflgaussname{#1}
+}
+
+\setKVdefault[GraphiqueTikzGaussienne]{%
+ Nom=gaussienne,%
+ Couleur=black,%
+ Trace=false,%
+ Pas={},%
+ Debut={\pflxmin},%
+ Fin={\pflxmax}
+}
+
+\NewDocumentCommand\DefinirLoiNormale{ O{} D<>{phi} m m }{%
+ %1=options
+ %2=mu
+ %3=sigma
+ \restoreKV[GraphiqueTikzGaussienne]%
+ \setKV[GraphiqueTikzGaussienne]{#1}%
+ \xintdeffloatfunc #2(x) := 1/((#4)*sqrt(2*pi))*exp(-0.5*((x-(#3))/(#4))^2) ;%
+ \IfStrEq{\pflgaussstep}{}%
+ {%
+ \xdef\pflgaussstep{\xintfloateval{((\useKV[GraphiqueTikzGaussienne]{Fin})-(\useKV[GraphiqueTikzGaussienne]{Debut}))/100}}%
+ }%
+ {}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphiqueTikzGaussienne]{Trace}%
+ {%
+ \path[draw,pflcourbe,{\useKV[GraphiqueTikzGaussienne]{Couleur}},name path global=\pflgaussname] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphiqueTikzGaussienne]{Debut}}..[\pflgaussstep]..{\useKV[GraphiqueTikzGaussienne]{Fin}},{\useKV[GraphiqueTikzGaussienne]{Fin}})
+ \relax
+ } ;
+ }%
+ {%
+ \path[draw=none,pflcourbe,name path global=\pflgaussname] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphiqueTikzGaussienne]{Debut}}..[\pflgaussstep]..{\useKV[GraphiqueTikzGaussienne]{Fin}},{\useKV[GraphiqueTikzGaussienne]{Fin}})
+ \relax
+ } ;
+ }%
+ \end{scope}
+}
+
+\NewDocumentCommand\TracerLoiNormale{ O{} m }{%
+ %1=options
+ %2=mu
+ %3=sigma
+ \restoreKV[GraphiqueTikzGaussienne]%
+ \setKV[GraphiqueTikzGaussienne]{#1}%
+ \IfStrEq{\pflgaussstep}{}%
+ {%
+ \xdef\pflgaussstep{\xintfloateval{((\useKV[GraphiqueTikzGaussienne]{Fin})-(\useKV[GraphiqueTikzGaussienne]{Debut}))/100}}%
+ }%
+ {}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[pflcourbe,{\useKV[GraphiqueTikzGaussienne]{Couleur}}] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2),x={\useKV[GraphiqueTikzGaussienne]{Debut}}..[\pflgaussstep]..{\useKV[GraphiqueTikzGaussienne]{Fin}},{\useKV[GraphiqueTikzGaussienne]{Fin}})
+ \relax
+ } ;
+ \end{scope}
+}
+
+%==== DENSITÉ KHIDEUX
+\xintdeffloatfunc pflrecigamma(x) := x+0.577215664901*x^2-0.65587807152056*x^3-0.042002635033944*x^4+0.16653861138228*x^5-0.042197734555571*x^6;
+\xintdeffloatfunc pflgamma(x) := (x==1)?{1}{(abs(x)<=0.5)?{1/pflrecigamma(x)}{(x-1)*pflgamma(x-1)}};
+\xintdeffloatfunc pflkhideux(x,k) := (x<0)?{0}{(1/(2^(k/2)*pflgamma(k/2)))*x^(k/2-1)*exp(-x/2)};
+
+\NewDocumentCommand\DefinirLoiKhiDeux{ O{} D<>{khi} m }{%
+ %1=options
+ %2=mu
+ %3=sigma
+ \restoreKV[GraphiqueTikzGaussienne]%
+ \setKV[GraphiqueTikzGaussienne]{#1}%
+ \xintdeffloatfunc #2(x) := (x<0)?{0}{(1/(2^((#3)/2)*pflgamma((#3)/2)))*x^((#3)/2-1)*exp(-x/2)};
+ \IfStrEq{\pflgaussstep}{}%
+ {%
+ \xdef\pflgaussstep{\xintfloateval{((\useKV[GraphiqueTikzGaussienne]{Fin})-(\useKV[GraphiqueTikzGaussienne]{Debut}))/100}}%
+ }%
+ {}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphiqueTikzGaussienne]{Trace}%
+ {%
+ \path[draw,pflcourbe,{\useKV[GraphiqueTikzGaussienne]{Couleur}},name path global=\pflgaussname] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphiqueTikzGaussienne]{Debut}}..[\pflgaussstep]..{\useKV[GraphiqueTikzGaussienne]{Fin}},{\useKV[GraphiqueTikzGaussienne]{Fin}})
+ \relax
+ } ;
+ }%
+ {%
+ \path[draw=none,pflcourbe,name path global=\pflgaussname] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphiqueTikzGaussienne]{Debut}}..[\pflgaussstep]..{\useKV[GraphiqueTikzGaussienne]{Fin}},{\useKV[GraphiqueTikzGaussienne]{Fin}})
+ \relax
+ } ;
+ }%
+ \end{scope}
+}
+
+\NewDocumentCommand\TracerLoiKhiDeux{ O{} m }{%
+ %1=options
+ %2=mu
+ %3=sigma
+ \restoreKV[GraphiqueTikzGaussienne]%
+ \setKV[GraphiqueTikzGaussienne]{#1}%
+ \IfStrEq{\pflgaussstep}{}%
+ {%
+ \xdef\pflgaussstep{\xintfloateval{((\useKV[GraphiqueTikzGaussienne]{Fin})-(\useKV[GraphiqueTikzGaussienne]{Debut}))/100}}%
+ }%
+ {}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[pflcourbe,{\useKV[GraphiqueTikzGaussienne]{Couleur}}] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2),x={\useKV[GraphiqueTikzGaussienne]{Debut}}..[\pflgaussstep]..{\useKV[GraphiqueTikzGaussienne]{Fin}},{\useKV[GraphiqueTikzGaussienne]{Fin}})
+ \relax
+ } ;
+ \end{scope}
+}
+
+%====droite
+\defKV[GraphiquetikzDroite]{%
+ Nom=\def\pfldroitename{#1}
+}
+
+\setKVdefault[GraphiquetikzDroite]{%
+ Pente=false,%
+ Couleur=black,%
+ Debut={\pflxmin},%
+ Fin={\pflxmax},%
+ Nom={}
+}
+
+\NewDocumentCommand\TracerDroite{ O{} m m D<>{} }{%
+ \restoreKV[GraphiquetikzDroite]%
+ \setKV[GraphiquetikzDroite]{#1}%
+ %1er point
+ \path #2;%
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\pfldtetikzxA{\xintfloateval{(\ConvertirPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\pfldtetikzyA{\xintfloateval{(\ConvertirPtToCm{\macroy})/(\pflyunit)}}%
+ %2ème point si besoin
+ \ifboolKV[GraphiquetikzDroite]{Pente}%
+ {%
+ \xdef\pfldtepente{\xintfloateval{#3}}%
+ }%
+ {%
+ \path #3;%
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\pfldtetikzxB{\xintfloateval{(\ConvertirPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\pfldtetikzyB{\xintfloateval{(\ConvertirPtToCm{\macroy})/(\pflyunit)}}%
+ \xdef\pfldtepente{\xintfloateval{(\pfldtetikzyB-\pfldtetikzyA)/(\pfldtetikzxB-\pfldtetikzxA)}}%
+ }%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax}) ;
+ \xintifboolexpr{\pfldtetikzxA == \pfldtetikzxB}%
+ {%
+ \IfEq{\pfldroitename}{}%
+ {%
+ \draw[pfltrait,{\useKV[GraphiquetikzDroite]{Couleur}},#4] (\pfldtetikzxA,\pflymin) -- (\pfldtetikzxA,\pflymax) ;
+ }%
+ {%
+ \draw[pfltrait,{\useKV[GraphiquetikzDroite]{Couleur}},#4,name path global=\pfldroitename] (\pfldtetikzxA,\pflymin) -- (\pfldtetikzxA,\pflymax) ;
+ }%
+ }%
+ {%
+ \IfEq{\pfldroitename}{}%
+ {%
+ \draw[pfltrait,{\useKV[GraphiquetikzDroite]{Couleur}},domain={\useKV[GraphiquetikzDroite]{Debut}}:{\useKV[GraphiquetikzDroite]{Fin}},samples=2,#4] plot (\x,{\pfldtepente*(\x-\pfldtetikzxA)+\pfldtetikzyA}) ;
+ }%
+ {%
+ \draw[pfltrait,{\useKV[GraphiquetikzDroite]{Couleur}},domain={\useKV[GraphiquetikzDroite]{Debut}}:{\useKV[GraphiquetikzDroite]{Fin}},samples=2,name path global=\pfldroitename,#4] plot (\x,{\pfldtepente*(\x-\pfldtetikzxA)+\pfldtetikzyA}) ;
+ }%
+ }%
+ \end{scope}
+}
+
+%====asymptote
+\NewDocumentCommand\TracerAsymptote{ O{} m D<>{} }{%
+ \restoreKV[GraphiquetikzDroite]%
+ \setKV[GraphiquetikzDroite]{#1}%
+ %tracé
+ \draw[pfltrait,{\useKV[GraphiquetikzDroite]{Couleur}},#3] ({#2},{\pflymin})--({#2},{\pflymax}) ;
+}
+
+
+%====MinMax
+\defKV[GraphiqueTikzMinMax]{%
+ Pas=\def\pflminmaxstep{#1},%
+ Methode=\def\pflminmaxmethode{#1},%
+ Coeffs=\def\pflminmaxcoeffs{#1}
+}
+\setKVdefault[GraphiqueTikzMinMax]{%
+ Debut={\pflxmin},%
+ Fin={\pflxmax},%
+ Pas={},%
+ Tension=0.5,%
+ Methode=fonction,%
+ Coeffs=3
+}
+
+\NewDocumentCommand\TrouverMaximum{ O{} m O{c-max} }{%
+ %1=clés
+ %2=paramètres en fonction de [Methode]
+ \restoreKV[GraphiqueTikzMinMax]%
+ \setKV[GraphiqueTikzMinMax]{#1}%
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflminmaxstep{\xintfloateval{((\useKV[GraphiqueTikzMinMax]{Fin})-(\useKV[GraphiqueTikzMinMax]{Debut}))/100}}%
+ }%
+ {}%
+ \begin{scope}[bezier bounding box,local bounding box=bbtmpmax]
+ \IfStrEq{\pflminmaxmethode}{fonction}%
+ {%
+ \path[draw=none,name path=curvetmpmax] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphiqueTikzMinMax]{Debut}}..[\pflstepcurve]..{\useKV[GraphiqueTikzMinMax]{Fin}},{\useKV[GraphiqueTikzMinMax]{Fin}})
+ \relax
+ };
+ }%
+ {}%
+ \IfStrEq{\pflminmaxmethode}{interpo}%
+ {%
+ \path[draw=none,name path=curvetmpmax] plot[smooth,tension={\useKV[GraphiqueTikzMinMax]{Tension}}] coordinates {#2};
+ }%
+ {}%
+ \IfStrEq{\pflminmaxmethode}{spline}%
+ {%
+ \GenererSpline{#2}{\pflminmaxcoeffs}[\tmpsplineminmax]%
+ \path[draw=none,name path=curvetmpmax] \tmpsplineminmax ;
+ }%
+ {}%
+ %retour
+ \path[name path=tmpmax] ([yshift=-0.25\pgflinewidth]bbtmpmax.north east) -- ([yshift=-0.25\pgflinewidth]bbtmpmax.north west) ;
+ \path[name intersections={of=curvetmpmax and tmpmax,name=#3}] ;
+ \coordinate (#3) at ($0.5*(#3-1)+0.5*(#3-2)+(0,0.25\pgflinewidth)$) ;
+ \end{scope}
+}
+
+\NewDocumentCommand\TrouverMinimum{ O{} m O{c-min} }{%
+ %1=clés
+ %2=paramètres en fonction de [Methode]
+ \restoreKV[GraphiqueTikzMinMax]%
+ \setKV[GraphiqueTikzMinMax]{#1}%
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflminmaxstep{\xintfloateval{((\useKV[GraphiqueTikzMinMax]{Fin})-(\useKV[GraphiqueTikzMinMax]{Debut}))/100}}%
+ }%
+ {}%
+ \begin{scope}[bezier bounding box,local bounding box=bbtmpmin]
+ \IfStrEq{\pflminmaxmethode}{fonction}%
+ {%
+ \path[draw=none,name path=curvetmpmin] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphiqueTikzMinMax]{Debut}}..[\pflstepcurve]..{\useKV[GraphiqueTikzMinMax]{Fin}},{\useKV[GraphiqueTikzMinMax]{Fin}})
+ \relax
+ };
+ }%
+ {}%
+ \IfStrEq{\pflminmaxmethode}{interpo}%
+ {%
+ \path[draw=none,name path=curvetmpmin] plot[smooth,tension={\useKV[GraphiqueTikzMinMax]{Tension}}] coordinates {#2};
+ }%
+ {}%
+ \IfStrEq{\pflminmaxmethode}{spline}%
+ {%
+ \GenererSpline{#2}{\pflminmaxcoeffs}[\tmpsplineminmax]%
+ \path[draw=none,name path=curvetmpmin] \tmpsplineminmax ;
+ }%
+ {}%
+ %retour
+ \path[name path=tmpmin] ([yshift=0.25\pgflinewidth]bbtmpmin.south east) -- ([yshift=0.25\pgflinewidth]bbtmpmin.south west) ;
+ \path[name intersections={of=curvetmpmin and tmpmin,name=#3}] ;
+ \coordinate (#3) at ($0.5*(#3-1)+0.5*(#3-2)+(0,-0.25\pgflinewidth)$) ;
+ \end{scope}
+}
+
+%====TEXTES
+\defKV[GraphiqueTikzNode]{%
+ Couleur=\def\pflnodecol{#1},%
+ Police=\def\pflnodefonte{#1},%
+ Position=\def\pfnodepos{#1}
+}
+\setKVdefault[GraphiqueTikzNode]{%
+ Couleur=black,%
+ Police={\normalfont\normalsize},%
+ Position={}
+}
+\NewDocumentCommand\PlacerTexte{ O{} m m }{%
+ \restoreKV[GraphiqueTikzNode]%
+ \setKV[GraphiqueTikzNode]{#1}%
+ \draw #2 node[pflnoeud,font=\pflnodefonte,text=\pflnodecol,\pfnodepos] {#3} ;
+}
+
+%++++++++++++++++++++++++++
+%++++++++++ENGLISH+++++++++
+%++++++++++++++++++++++++++
+
+%====COMMANDE POUR NB DECIMAL ALEA ENTRE BORNES
+\NewDocumentCommand\PickRandomNb{ s O{0} m m O{\mmyrandomnb} }{%
+ \def\tmpborneinf{\xinteval{floor(#3)}}%inf=\tmpborneinf\par%
+ \def\tmpbornesup{\xinteval{ceil(#4)}}%sup=\tmpbornesup\par%
+ \xintifboolexpr{#2 == 0}%
+ {%
+ \xdef#5{\fpeval{randint(\tmpborneinf,\tmpbornesup)}}%
+ }%
+ {%
+ \def\tmptest{0}%
+ \whiledo{\tmptest=0}{%
+ \xintifboolexpr{(\tmpbornesup-\tmpborneinf) == 1}%
+ {%
+ \xdef\tmpresalea{\fpeval{\tmpborneinf+round(rand(),#2)}}%
+ }%
+ {%
+ \xdef\tmpresalea{\fpeval{round(randint(\tmpborneinf,\tmpbornesup)+rand(),#2)}}%
+ }%
+ %essai=\tmpresalea\par
+ \IfBooleanTF{#1}%
+ {%
+ \xintifboolexpr{\tmpresalea < #4 'and' \tmpresalea > #3 }{\def\tmptest{1}}{\def\tmptest{0}}%
+ }%
+ {%
+ \xintifboolexpr{\tmpresalea <= #4 'and' \tmpresalea >= #3 }{\def\tmptest{1}}{\def\tmptest{0}}%
+ }%
+ }%
+ \xdef#5{\tmpresalea}%
+ %res=%
+ }%
+}
+
+%====PATCH NUM
+\@ifundefined{RoundNb}%
+ {%
+ \NewDocumentCommand\RoundNb{ O{2} m}{\num{\xintfloateval{round(#2,#1)}}\relax}%
+ }%
+ {%
+ \RenewDocumentCommand\RoundNb{ O{2} m}{\num{\xintfloateval{round(#2,#1)}}\relax}%
+ }%
+
+%====STYLES DE BASE
+\tikzset{tkzgrphnode/.style={}}
+\tikzset{tkzgrphpoint/.style={line width=0.95pt}}
+\tikzset{tkzgrphpointc/.style={radius=1.75pt}}
+\tikzset{tkzgrphpointmc/.style={radius=0.875pt}}
+\tikzset{tkzgrphscatter/.style={radius=1.75pt}}
+\tikzset{tkzgrphframe/.style={line width=0.8pt,gray}}
+\tikzset{tkzgrphcurve/.style={line width=1.05pt}}
+\tikzset{tkzgrphline/.style={line width=0.8pt}}
+\tikzset{tkzgrpharrowl/.style={<-,>=latex}}
+\tikzset{tkzgrpharrowr/.style={->,>=latex}}
+\tikzset{tkzgrpharrowlr/.style={<->,>=latex}}
+\tikzset{tkzgrphcounterimage/.style={line width=0.9pt,densely dashed}}
+\tikzset{tkzgrphrange/.style={line width=0.9pt,densely dashed,->,>=latex}}
+\tikzset{tkzgrphgridp/.style={thin,lightgray}}
+\tikzset{tkzgrphgrids/.style={very thin,lightgray}}
+\tikzset{tkzgrphaxes/.style={line width=0.8pt,->,>=latex}}
+\tikzset{
+ Xgrid/.store in=\pflgrillex,Xgrid/.default=1,Xgrid=1,
+ Xgrids/.store in=\pflgrillexs,Xgrids/.default=0.5,Xgrids=0.5,
+ Ygrid/.store in=\pflgrilley,Ygrid/.default=1,Ygrid=1,
+ Ygrids/.store in=\pflgrilleys,Ygrids/.default=0.5,Ygrids=0.5
+}
+\tikzset{%
+ pics/tkzgraphcross/.style args={#1/#2}{
+ code={
+ \draw[tkzgrphpoint,rotate=#2] (-#1,0) -- (#1,0);
+ \draw[tkzgrphpoint,rotate=#2] (0,-#1) -- (0, #1);
+ }
+ },
+ pics/tkzgraphcross/.default={2pt/45}
+}
+\tikzset{%
+ pics/tkzgraphsquare/.style args={#1/#2}{
+ code={
+ \filldraw[draw=none,tkzgrphpoint,rotate=#2] (-#1,-#1) rectangle (#1,#1) ;
+ }
+ },
+ pics/tkzgraphsquare/.default={2pt/0}
+}
+
+%===COMMANDE INTERNE POUR FORMATER EN FRACTIONS
+\NewDocumentCommand\FormatFraction{ s O{} m }{%
+ %*=moins sur le numérateur
+ %2=argument.optionnel[d/t/dec=...]
+ %3=argument mandataire {calcul ou fraction}
+ \def\calculargument{\xintPRaw{\xintIrr{\xinteval{#3}}}}%on calcule et on transforme en A/B
+ \IfSubStr{\calculargument}{/}%on teste si le symbole / apparaît
+ {%si oui := fraction
+ \StrBefore{\calculargument}{/}[\numerateur]%on extrait le numérateur
+ \StrBehind{\calculargument}{/}[\denominateur]%on extrait le dénominateur
+ \ifblank{#2}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\frac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{d}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\displaystyle\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\displaystyle\frac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\displaystyle\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{t}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\frac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{n}%
+ {%
+ \ensuremath{\nicefrac{\num{\numerateur}}{\num{\denominateur}}}%
+ }%
+ {}%si l'argument optionnel est vide
+ }{%si non := entier
+ \num{\calculargument}%on affiche l'entier, avec le package siunitx
+ }%
+}
+
+%affichage d'un label en radians
+\NewDocumentCommand\FormatTrig{ O{t} m }{%étoilée en dfrac
+ \IfStrEq{#2}{0}%cas où l'argument vaut 0
+ {\def\restmp{0}}%
+ {%
+ \StrDel{#2}{*}[\restmpsansmoins]%
+ \StrSubstitute{\restmpsansmoins}{pi}{\pi}[\restmppi]%
+ \IfSubStr{#2}{/}%
+ {%
+ \StrCut{\restmppi}{/}\tmpnum\tmpdenom%
+ \IfSubStr{\tmpnum}{-}%
+ {%
+ \StrDel{\tmpnum}{-}[\restmppinum]%
+ \IfStrEqCase{#1}{%
+ {t}{\def\restmp{-\frac{\restmppinum}{\tmpdenom}}}%
+ {d}{\def\restmp{-\displaystyle\frac{\restmppinum}{\tmpdenom}}}%
+ {n}{\def\restmp{\nicefrac{-\restmppinum}{\tmpdenom}}}%
+ }%
+ }%
+ {%
+ \IfStrEqCase{#1}{%
+ {t}{\def\restmp{\frac{\tmpnum}{\tmpdenom}}}%
+ {d}{\def\restmp{\displaystyle\frac{\tmpnum}{\tmpdenom}}}%
+ {n}{\def\restmp{\nicefrac{\tmpnum}{\tmpdenom}}}%
+ }%
+ }%
+ }%
+ {%
+ \def\restmp{\restmppi}%
+ }%
+ }%
+ \ensuremath{\restmp}%
+}
+
+%====FORMATAGE DES RACINES SIMPLES
+\NewDocumentCommand\FormatSqrt{ O{t} m }{%
+ \IfStrEq{#2}{0}%cas où l'argument vaut 0
+ {\ensuremath{0}}%
+ {%
+ \IfSubStr{#2}{sqrt}%
+ {%
+ \StrDel{#2}{*}[\tmpargbrut]%
+ \StrBetween[1,1]{\tmpargbrut}{sqrt(}{)}[\tmpargnumrac]%
+ \StrBefore{\tmpargbrut}{sqrt}[\tmparavantrac]%
+ \IfStrEqCase{\tmparavantrac}{
+ {}{\xdef\tmparavantrac{}}%
+ {-}{\xdef\tmparavantrac{-}}%
+ }[\xdef\tmparavantrac{\num{\tmparavantrac}}]%
+ \IfSubStr{\tmpargbrut}{/}%
+ {%
+ \StrBehind{\tmpargbrut}{/}[\tmpargdenomrac]%
+ \IfStrEqCase{#1}{%
+ {d}{%
+ \ensuremath{\displaystyle\frac{\tmparavantrac\sqrt{\num{\tmpargnumrac}}}{\num{\tmpargdenomrac}}}%
+ }%
+ {t}{%
+ \ensuremath{\frac{\tmparavantrac\sqrt{\num{\tmpargnumrac}}}{\num{\tmpargdenomrac}}}%
+ }%
+ {n}{%
+ \ensuremath{\nicefrac{\tmparavantrac\sqrt{\num{\tmpargnumrac}}}{\num{\tmpargdenomrac}}}%
+ }%
+ }%
+ }%
+ {%
+ \ensuremath{\tmparavantrac\sqrt{\num{\tmpargnumrac}}}%
+ }%
+ }%
+ {%
+ \FormatFraction[#1]{#2}%
+ }%
+ }%
+}
+
+%====COMMANDE INTERNE DE CONVERSION
+\ExplSyntaxOn
+ \NewDocumentCommand\ConvertPtToCm{ m } { \dim_to_decimal_in_unit:nn { #1 } { 1 cm } }
+\ExplSyntaxOff
+
+%====RECUPERER COORDONNEES NOEUD
+\NewDocumentCommand\GetXcoord{ m O{\myxcoord} }{%
+ \path #1;
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef#2{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+}
+\NewDocumentCommand\GetYcoord{ m O{\myycoord} }{%
+ \path #1;
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef#2{\xintfloateval{(\ConvertPtToCm{\macroy})/(\pflyunit)}}%
+}
+
+\NewDocumentCommand\GetXYcoord{ m O{\myxcoord} O{\myycoord} }{%
+ \GetXcoord{#1}[#2]%
+ \GetYcoord{#1}[#3]%
+}
+
+%===UNITÉS
+\newcommand\DistBetweenNodes[3][\MyTmpDist]{%
+ \pgfpointdiff{\pgfpointanchor{#2}{center}}
+ {\pgfpointanchor{#3}{center}}
+ % no need to use a new dimen
+ \pgf@xa=\pgf@x
+ \pgf@ya=\pgf@y
+ % to convert from pt to cm
+ \pgfmathparse{veclen(\pgf@xa,\pgf@ya)/28.45274}
+ \global\let#1\pgfmathresult %macro globale
+}
+
+\newcommand\TikZUnits{
+ \coordinate (@0) at (0,0) ;
+ \coordinate (@X) at (1,0) ;
+ \coordinate (@Y) at (0,1) ;
+ \DistBetweenNodes[\pflxunit]{@0}{@X}
+ \DistBetweenNodes[\pflyunit]{@0}{@Y}
+}
+
+%====ENVIRONNEMENT
+\defKV[GraphicTikz]{%
+ GradThick=\def\pflthickgrad{#1}
+}
+\setKVdefault[GraphicTikz]{%
+ Frame=false,%
+ GradThick=3pt
+}
+
+\NewDocumentEnvironment{GraphTikz}{ O{} D<>{} }%
+%1 = options tikz, classiques
+%2 = clés spécifiques
+{%
+ \restoreKV[GraphicTikz]%
+ \setKV[GraphicTikz]{#2}%
+ %l'environnement
+ \begin{tikzpicture}[#1]%
+ %unités x/y pour des calculs de coordonnées
+ \TikZUnits
+ %noeuds
+ \coordinate (bbxTop) at (current bounding box.north) ;
+ \coordinate (bbxBottom) at (current bounding box.south) ;
+ \ifboolKV[GraphicTikz]{Frame}{\draw[tkzgrphframe] ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax}) ;}{}%
+ %back to normal
+}%
+{%
+ \end{tikzpicture}%
+}
+
+%====AXES
+\defKV[GraphicTikzAxis]{
+ Format=\def\pflformataxes{#1}
+}
+\setKVdefault[GraphicTikzAxis]{%
+ Grid=true,%
+ Enlarge=0,%
+ Grads=true,%
+ Origin=false,%
+ Font={},%
+ Format=num,%
+ Lines=true,%
+ Last=false,%
+ Behind=false,%
+ Above=false
+}
+
+\NewDocumentCommand\FormatXaxisValues{ m m }{%
+ \IfStrEqCase{#1}{%
+ {num}{\num{#2}}%
+ {year}{#2}%
+ {frac}{\FormatFrac{#2}}%
+ {dfrac}{\FormatFrac[d]{#2}}%
+ {nfrac}{\FormatFrac[n]{#2}}%
+ {trig}{\FormatTrig{#2}}%
+ {dtrig}{\FormatTrig[d]{#2}}%
+ {ntrig}{\FormatTrig[n]{#2}}%
+ {sqrt}{\FormatSqrt{#2}}%
+ {dsqrt}{\FormatSqrt[d]{#2}}%
+ {nsqrt}{\FormatSqrt[n]{#2}}%
+ }[#2]%
+}
+
+\NewDocumentCommand\FormatYaxisValues{ m m }{%
+ \IfStrEqCase{#1}{%
+ {num}{\num{#2}}%
+ {year}{#2}%
+ {frac}{\FormatSqrt{#2}}%
+ {dfrac}{\FormatFrac[d]{#2}}%
+ {nfrac}{\FormatFrac[n]{#2}}%
+ {trig}{\FormatTrig{#2}}%
+ {dtrig}{\FormatTrig[d]{#2}}%
+ {ntrig}{\FormatTrig[n]{#2}}%
+ {sqrt}{\FormatSqrt{#2}}%
+ {dsqrt}{\FormatSqrt[d]{#2}}%
+ {nsqrt}{\FormatSqrt[n]{#2}}%
+ }[#2]%
+}
+
+\NewDocumentCommand\DrawAxisGrids{ s O{} m D<>{#3} m D<>{#5} }{%
+ \restoreKV[GraphicTikzAxis]%
+ \setKV[GraphicTikzAxis]{#2}%
+ %cas particuliers sous/sur impression
+ \ifboolKV[GraphicTikzAxis]{Behind}%
+ {%
+ \setKV[GraphicTikzAxis]{Grads=false}
+ }%
+ {}%
+ \ifboolKV[GraphicTikzAxis]{Above}%
+ {%
+ \setKV[GraphicTikzAxis]{Grid=false}
+ }%
+ {}%
+ %suite
+ \IfSubStr{\pflformataxes}{/}%
+ {%
+ \StrCut{\pflformataxes}{/}{\pflformataxex}{\pflformataxey}%
+ }%
+ {%
+ \xdef\pflformataxex{\pflformataxes}\xdef\pflformataxey{\pflformataxes}%
+ }%
+ \ifboolKV[GraphicTikzAxis]{Grid}%
+ {%
+ \draw[tkzgrphgrids,xstep=\pflgrillexs,ystep=\pflgrilleys] ({\pflxmin},{\pflymin}) grid ({\pflxmax},{\pflymax});
+ \draw[tkzgrphgridp,xstep=\pflgrillex,ystep=\pflgrilley] ({\pflxmin},{\pflymin}) grid ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphicTikzAxis]{Last}%
+ {%
+ \draw[tkzgrphgridp] ({\pflxmin},{\pflymax})--({\pflxmax},{\pflymax}) ;
+ \draw[tkzgrphgridp] ({\pflxmax},{\pflymin})--({\pflxmax},{\pflymax}) ;
+ }%
+ {}%
+ }%
+ {}%
+ \draw[tkzgrphaxes] ({\pflxmin},{\pflOy}) -- ([xshift={\useKV[GraphicTikzAxis]{Enlarge}}]{\pflxmax},{\pflOy}) ;
+ \draw[tkzgrphaxes] ({\pflOx},{\pflymin}) -- ([yshift={\useKV[GraphicTikzAxis]{Enlarge}}]{\pflOx},{\pflymax}) ;
+ \IfEq{#3}{auto}%
+ {%
+ \xdef\tmprangexvalues{\xintfloateval{seq(i,i=\pflxmin..[\pflgrillex]..\pflxmax)}}\StrDel{\tmprangexvalues}{ }[\tmprangexvalues]%
+ \xdef\pflformataxex{num}%
+ }%
+ {%
+ \xdef\tmprangexvalues{#3}%
+ }%
+ \IfEq{#5}{auto}%
+ {%
+ \xdef\tmprangeyvalues{\xintfloateval{seq(i,i=\pflymin..[\pflgrilley]..\pflymax)}}\StrDel{\tmprangeyvalues}{ }[\tmprangeyvalues]%
+ \xdef\pflformataxey{num}%
+ }%
+ {%
+ \xdef\tmprangeyvalues{#5}%
+ }%
+ \foreach \x in \tmprangexvalues {\draw[tkzgrphline] ([yshift=\pflthickgrad]{\x},{\pflOy})--++(0,{-2*\pflthickgrad}) ;}
+ \foreach \y in \tmprangeyvalues {\draw[tkzgrphline] ([xshift=\pflthickgrad]{\pflOx},{\y})--++({-2*\pflthickgrad},0) ;}
+ \ifboolKV[GraphicTikzAxis]{Grads}%
+ {%
+ %origine
+ \ifboolKV[GraphicTikzAxis]{Origin}%
+ {%
+ \draw ({\pflOx},{\pflOy}) node[tkzgrphnode,below left,font={\useKV[GraphicTikzAxis]{Font}}] {\FormatXaxisValues{\pflformataxex}{\pflOx}} ;
+ %\draw (\pflOx,\pflOy) node[below left,font={\useKV[GraphicTikzAxis]{Font}}] {\ifboolKV[GraphicTikzAxis]{Num}{\num{\pflOx}}{\pflOx}} ;
+ }%
+ {}%
+ %graduations x, sauf si auto...
+ \foreach \x in \tmprangexvalues {%
+ \IfBooleanTF{#1}%
+ {%
+ \xintifboolexpr{\x == \pflOx}{}{\draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[tkzgrphnode,below,font={\useKV[GraphicTikzAxis]{Font}}] {\FormatXaxisValues{\pflformataxex}{\x}} ;}
+ %\xintifboolexpr{\x == \pflOx}{}{\draw ([yshift=-\pflthickgrad]\x,\pflOy) node[below,font={\useKV[GraphicTikzAxis]{Font}}] {\ifboolKV[GraphicTikzAxis]{Num}{\num{\x}}{\x}} ;}
+ }%
+ {%
+ \draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[tkzgrphnode,below,font={\useKV[GraphicTikzAxis]{Font}}] {\FormatXaxisValues{\pflformataxex}{\x}} ;
+ %\draw ([yshift=-\pflthickgrad]\x,\pflOy) node[below,font={\useKV[GraphicTikzAxis]{Font}}] {\ifboolKV[GraphicTikzAxis]{Num}{\num{\x}}{\x}} ;
+ }%
+ }%
+ \foreach \y in \tmprangeyvalues {%
+ \IfBooleanTF{#1}%
+ {%
+ \xintifboolexpr{\y == \pflOy}{}{\draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[tkzgrphnode,left,font={\useKV[GraphicTikzAxis]{Font}}] {\FormatYaxisValues{\pflformataxey}{\y}} ;}
+ %\xintifboolexpr{\y == \pflOy}{}{\draw ([xshift=-\pflthickgrad]\pflOx,\y) node[left,font={\useKV[GraphicTikzAxis]{Font}}] {\ifboolKV[GraphicTikzAxis]{Num}{\num{\y}}{\y}} ;}
+ }%
+ {%
+ \draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[tkzgrphnode,left,font={\useKV[GraphicTikzAxis]{Font}}] {\FormatYaxisValues{\pflformataxey}{\y}} ;
+ %\draw ([xshift=-\pflthickgrad]\pflOx,\y) node[left,font={\useKV[GraphicTikzAxis]{Font}}] {\ifboolKV[GraphicTikzAxis]{Num}{\num{\y}}{\y}} ;
+ }%
+ }%
+ }%
+ {}%
+}
+
+%===DEFINIR POINTS
+\setKVdefault[GraphicTikzDefPoints]{Color=black,Mark=false,Style=o}
+
+\NewDocumentCommand\DefinePts{ O{} m }{%
+ \restoreKV[GraphicTikzDefPoints]%
+ \setKV[GraphicTikzDefPoints]{#1}%
+ \foreach \tmpnamept/\tmpxpt/\tmpypt in {#2}{%
+ \coordinate (\tmpnamept) at ({\tmpxpt},{\tmpypt}) ;
+ \ifboolKV[GraphicTikzDefPoints]{Mark}%
+ {%
+ \MarkPts*[Style={\useKV[GraphicTikzDefPoints]{Style}},Color={\useKV[GraphicTikzDefPoints]{Color}}]{(\tmpnamept)}
+ %\filldraw[{\useKV[GraphicTikzDefPoints]{Color}}] (\tmpnamept) circle[tkzgrphpointc] ;
+ }%
+ {}%
+ }
+}
+
+\defKV[GraphicTikzMarkPoints]{%
+ Color=\def\pflcouleurpoints{#1},%
+ Style=\def\pflstylepoints{#1}
+}
+\setKVdefault[GraphicTikzMarkPoints]{%
+ Color=black,%
+ Sizec=2pt,%
+ Sizex=2pt,%
+ Sizeo=1.75pt,%
+ Style=o,%
+ Lines=false
+}
+\NewDocumentCommand\MarkPts{ s O{} D<>{\normalfont\normalsize} m }{%
+ %étoilée = sans label
+ %2=clés
+ %3=points
+ \restoreKV[GraphicTikzMarkPoints]%
+ \setKV[GraphicTikzMarkPoints]{#2}%
+ \IfBooleanTF{#1}%
+ {%
+ \IfStrEq{\pflstylepoints}{x}%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}}] \Point pic{tkzgraphcross={\useKV[GraphicTikzMarkPoints]{Sizex}}/45} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{+}%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}}] \Point pic{tkzgraphcross={\useKV[GraphicTikzMarkPoints]{Sizex}}/90} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{c}%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[draw=none,fill={\useKV[GraphicTikzMarkPoints]{Color}}] \Point pic{tkzgraphsquare={\useKV[GraphicTikzMarkPoints]{Sizec}}/0} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{d}%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[draw=none,fill={\useKV[GraphicTikzMarkPoints]{Color}}] \Point pic{tkzgraphsquare={\useKV[GraphicTikzMarkPoints]{Sizeo}}/45} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{o}%
+ {%
+ \IfSubStr{\pflcouleurpoints}{/}%
+ {%
+ \StrCut{\pflcouleurpoints}{/}{\pflcouleurpointsA}{\pflcouleurpointsB}%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[tkzgrphline,fill=\pflcouleurpointsB,draw=\pflcouleurpointsA] \Point circle[radius={\useKV[GraphicTikzMarkPoints]{Sizeo}}] ;
+ }%
+ }%
+ {%
+ \foreach \Point in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[\pflcouleurpoints] \Point circle[radius={\useKV[GraphicTikzMarkPoints]{Sizeo}}] ;
+ }%
+ }%
+ }%
+ {}%
+ }%
+ {%avec label
+ \IfStrEq{\pflstylepoints}{x}%
+ {%
+ \foreach \Point/\Pos/\Label in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}}] \Point pic{tkzgraphcross={\useKV[GraphicTikzMarkPoints]{Sizex}}/45} node[tkzgrphnode,\Pos,font=#3] {\Label} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{+}%
+ {%
+ \foreach \Point/\Pos/\Label in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}}] \Point pic{tkzgraphcross={\useKV[GraphicTikzMarkPoints]{Sizex}}/90} node[tkzgrphnode,\Pos,font=#3] {\Label} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{c}%
+ {%
+ \foreach \Point/\Pos/\Label in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[draw=none,fill={\useKV[GraphicTikzMarkPoints]{Color}}] \Point pic{tkzgraphsquare={\useKV[GraphicTikzMarkPoints]{Sizec}}/0} node[tkzgrphnode,\Pos,{\useKV[GraphicTikzMarkPoints]{Color}},font=#3] {\Label} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{d}%
+ {%
+ \foreach \Point/\Pos/\Label in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[draw=none,fill={\useKV[GraphicTikzMarkPoints]{Color}}] \Point pic{tkzgraphsquare={\useKV[GraphicTikzMarkPoints]{Sizeo}}/45} node[tkzgrphnode,\Pos,{\useKV[GraphicTikzMarkPoints]{Color}},font=#3] {\Label} ;
+ }%
+ }%
+ {}%
+ \IfStrEq{\pflstylepoints}{o}%
+ {%
+ \IfSubStr{\pflcouleurpoints}{/}%
+ {%
+ \StrCut{\pflcouleurpoints}{/}{\pflcouleurpointsA}{\pflcouleurpointsB}%
+ \foreach \Point/\Pos/\Label in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \draw[tkzgrphline,\pflcouleurpointsA,fill=\pflcouleurpointsB] \Point circle[radius={\useKV[GraphicTikzMarkPoints]{Sizeo}}] node[tkzgrphnode,\Pos,font=#3] {\Label} ;
+ }%
+ }%
+ {%
+ \foreach \Point/\Pos/\Label in {#4} {%
+ \ifboolKV[GraphicTikzMarkPoints]{Lines}%
+ {%
+ \draw[{\useKV[GraphicTikzMarkPoints]{Color}},tkzgrphcounterimage] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \filldraw[\pflcouleurpoints] \Point circle[radius={\useKV[GraphicTikzMarkPoints]{Sizeo}}] node[tkzgrphnode,\Pos,font=#3] {\Label} ;
+ }%
+ }%
+ }%
+ {}%
+ }%
+}
+
+%===AJOUTER DES VALEURS MANUELLEMENT
+\NewDocumentCommand\AddXvalues{ O{} m m }{%
+ \restoreKV[GraphicTikzAxis]%
+ \setKV[GraphicTikzAxis]{#1}%
+ \ifboolKV[GraphicTikzAxis]{Lines}{\foreach \x in {#2}{\draw[tkzgrphline] ([yshift=\pflthickgrad]{\x},{\pflOy})--++(0,{-2*\pflthickgrad}) ;}}{}%
+ \readlist*\LstValX{#2}%
+ \readlist*\LstValFmtX{#3}%
+ \foreach \i in {1,...,\LstValXlen}{%
+ \itemtomacro\LstValX[\i]\mavalx%
+ \itemtomacro\LstValFmtX[\i]\mavalfmtx%
+ \draw ([yshift=-\pflthickgrad]{\mavalx},{\pflOy}) node[tkzgrphnode,below,font={\useKV[GraphicTikzAxis]{Font}}] {\mavalfmtx} ;
+ }%
+}
+
+\NewDocumentCommand\AddYvalues{ O{} m m }{%
+ \restoreKV[GraphicTikzAxis]%
+ \setKV[GraphicTikzAxis]{#1}%
+ \ifboolKV[GraphicTikzAxis]{Lines}{\foreach \y in {#2}{\draw[tkzgrphline] ([xshift=\pflthickgrad]{\pflOx},{\y})--++({-2*\pflthickgrad},0) ;}}{}%
+ \readlist*\LstValY{#2}%
+ \readlist*\LstValFmtY{#3}%
+ \foreach \i in {1,...,\LstValYlen}{%
+ \itemtomacro\LstValY[\i]\mavaly%
+ \itemtomacro\LstValFmtY[\i]\mavalfmty%
+ \draw ([xshift=-\pflthickgrad]{\pflOx},{\mavaly}) node[tkzgrphnode,left,font={\useKV[GraphicTikzAxis]{Font}}] {\mavalfmty} ;
+ }%
+}
+
+%====FONCTIONS ET COURBES 'classique + interpo + spline'
+\defKV[GraphicTikzCourbe]{%
+ Step=\def\pflstepcurve{#1},%
+ Name=\def\pflnamecurve{#1}
+}
+\setKVdefault[GraphicTikzCourbe]{%
+ Color=black,%
+ Start={\pflxmin},%
+ End={\pflxmax},%
+ Step={},%
+ Clip=true,%
+ Name={},%
+ Trace=false,%
+ Tension=0.5
+}
+
+\NewDocumentCommand\DefineFunction{ O{} D<>{f} m }{%old version
+ \restoreKV[GraphicTikzCourbe]%
+ \setKV[GraphicTikzCourbe]{#1}%
+ \xintdeffloatfunc #2(x) := #3 ;
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflstepcurve{\xintfloateval{((\useKV[GraphicTikzCourbe]{End})-(\useKV[GraphicTikzCourbe]{Start}))/100}}%
+ }%
+ {}%
+ \ifboolKV[GraphicTikzCourbe]{Clip}{\begin{scope}\clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});}{}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphicTikzCourbe]{Trace}%
+ {%
+ \path[draw,tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}},name path global=\pflnamecurve] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzCourbe]{Start}}..[\pflstepcurve]..{\useKV[GraphicTikzCourbe]{End}},{\useKV[GraphicTikzCourbe]{End}})
+ \relax
+ };
+ }%
+ {%
+ \path[draw=none,tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}},name path global=\pflnamecurve] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzCourbe]{Start}}..[\pflstepcurve]..{\useKV[GraphicTikzCourbe]{End}},{\useKV[GraphicTikzCourbe]{End}})
+ \relax
+ };
+ }%
+ \ifboolKV[GraphicTikzCourbe]{Clip}{\end{scope}}{}
+}
+
+\NewDocumentCommand\DefineCurve{ O{} D<>{f} m }{%
+ \restoreKV[GraphicTikzCourbe]%
+ \setKV[GraphicTikzCourbe]{#1}%
+ \xintdeffloatfunc #2(x) := #3 ;
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflstepcurve{\xintfloateval{((\useKV[GraphicTikzCourbe]{End})-(\useKV[GraphicTikzCourbe]{Start}))/100}}%
+ }%
+ {}%
+ \ifboolKV[GraphicTikzCourbe]{Clip}{\begin{scope}\clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});}{}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphicTikzCourbe]{Trace}%
+ {%
+ \path[draw,tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}},name path global=\pflnamecurve] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzCourbe]{Start}}..[\pflstepcurve]..{\useKV[GraphicTikzCourbe]{End}},{\useKV[GraphicTikzCourbe]{End}})
+ \relax
+ };
+ }%
+ {%
+ \path[draw=none,tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}},name path global=\pflnamecurve] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzCourbe]{Start}}..[\pflstepcurve]..{\useKV[GraphicTikzCourbe]{End}},{\useKV[GraphicTikzCourbe]{End}})
+ \relax
+ };
+ }%
+ \ifboolKV[GraphicTikzCourbe]{Clip}{\end{scope}}{}
+}
+
+\NewDocumentCommand\DrawCurve{ O{} D<>{} m }{%
+ \restoreKV[GraphicTikzCourbe]%
+ \setKV[GraphicTikzCourbe]{#1}%
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflstepcurve{\xintfloateval{((\useKV[GraphicTikzCourbe]{End})-(\useKV[GraphicTikzCourbe]{Start}))/100}}%
+ }%
+ {}%
+ \ifboolKV[GraphicTikzCourbe]{Clip}{\begin{scope}\clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});}{}
+ \IfEq{\pflnamecurve}{}%
+ {%
+ \draw[tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}}] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#3),x={\useKV[GraphicTikzCourbe]{Start}}..[\pflstepcurve]..{\useKV[GraphicTikzCourbe]{End}},{\useKV[GraphicTikzCourbe]{End}})
+ \relax
+ };
+ }%
+ {%
+ \path[draw,tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}},name path global=\pflnamecurve] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#3),x={\useKV[GraphicTikzCourbe]{Start}}..[\pflstepcurve]..{\useKV[GraphicTikzCourbe]{End}},{\useKV[GraphicTikzCourbe]{End}})
+ \relax
+ };
+ }%
+ \ifboolKV[GraphicTikzCourbe]{Clip}{\end{scope}}{}
+}
+
+\NewDocumentCommand\DefineLstInterpol{ m O{\myinterpolist} }{%
+ \def#2{#1}%
+}
+
+\NewDocumentCommand\DefineInterpoCurve{ O{} m }{%
+ \restoreKV[GraphicTikzCourbe]%
+ \setKV[GraphicTikzCourbe]{#1}%
+ \begin{scope}
+ \ifboolKV[GraphicTikzCourbe]{Trace}%
+ {%
+ \path[draw,tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}},name path global=\pflnamecurve] plot[smooth,tension={\useKV[GraphicTikzCourbe]{Tension}}] coordinates {#2};
+ }%
+ {%
+ \path[draw=none,tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}},name path global=\pflnamecurve] plot[smooth,tension={\useKV[GraphicTikzCourbe]{Tension}}] coordinates {#2};
+ }%
+ \end{scope}
+}
+
+\NewDocumentCommand\DrawInterpoCurve{ O{} m }{%
+ %2=liste
+ \restoreKV[GraphicTikzCourbe]%
+ \setKV[GraphicTikzCourbe]{#1}%
+ \begin{scope}
+ \draw[tkzgrphcurve,{\useKV[GraphicTikzCourbe]{Color}}] plot [smooth,tension={\useKV[GraphicTikzCourbe]{Tension}}] coordinates {#2} ;
+ \end{scope}
+}
+
+\NewDocumentCommand\DefineLstSpline{ m O{\mysplinelst} }{%
+ \def#2{#1}%
+}
+
+\newcommand\tkzextractcoeff[2]{%1=liste,2=numero
\setsepchar{§}%
\readlist*\lcoeffs{#1}
\ifnum \lcoeffslen=1
@@ -964,26 +3059,27 @@
\fi
}
-\defKV[GraphiqueTikzSpline]{%
- Nom=\def\pflsplinename{#1},%
+\defKV[GraphicTikzSpline]{%
+ Name=\def\pflsplinename{#1},%
Coeffs=\def\pflsplinecoeffs{#1}
}
-\setKVdefault[GraphiqueTikzSpline]{%
- Nom=spline,%
- Couleur=black,%
+\setKVdefault[GraphicTikzSpline]{%
+ Name=spline,%
+ Color=black,%
Coeffs=3,%
- Trace=false
+ Trace=false,%
+ Alt=false
}
-\NewDocumentCommand\GenererSpline{ m m O{\monspline} }{%
+\NewDocumentCommand\GenerateSpline{ m m O{\myspline} }{%
%1=liste
\setsepchar[.]{§./}%
\readlist*\SPLlistepoints{#1}%
%les données
\def\tmpsplinenumdeb{1}
\def\tmpsplinenumfin{\SPLlistepointslen}%
- \pflextractcoeff{#2}{\tmpsplinenumdeb}%
+ \tkzextractcoeff{#2}{\tmpsplinenumdeb}%
%nb de calculs
\def\SPLnbsplines{\inteval{\tmpsplinenumfin-1}}%
%extraction des coordonnées
@@ -996,7 +3092,7 @@
\xdef#3{(\xa,\ya) ..controls +({atan \fprimea}:{(\xb-\xa)/\COEFFA}) and +({-180 + atan \fprimeb}:{(\xb-\xa)/\COEFFA}).. (\xb,\yb)}%
\foreach \i in {\tmpsplinenumdeb,...,\SPLnbsplines}{%
%extraction des coeffs de compensation
- \pflextractcoeff{#2}{\i}%
+ \tkzextractcoeff{#2}{\i}%
\def\j{\inteval{\i+1}}%
\itemtomacro\SPLlistepoints[\i,1]\xa%
\itemtomacro\SPLlistepoints[\i,2]\ya%
@@ -1008,34 +3104,752 @@
}%
}
-\NewDocumentCommand\DefinirSpline{ O{} m D<>{\monspline} }{%
+\NewDocumentCommand\DefineSplineCurve{ O{} m D<>{\myspline} }{%
%1=liste
- \restoreKV[GraphiqueTikzSpline]%
- \setKV[GraphiqueTikzSpline]{#1}%
- \GenererSpline{#2}{\pflsplinecoeffs}<#3>%
+ \restoreKV[GraphicTikzSpline]%
+ \setKV[GraphicTikzSpline]{#1}%
+ \GenerateSpline{#2}{\pflsplinecoeffs}[#3]%
\begin{scope}
- \ifboolKV[GraphiqueTikzSpline]{Trace}%
+ \ifboolKV[GraphicTikzSpline]{Trace}%
{%
- \path[draw,pflcourbe,{\useKV[GraphiqueTikzSpline]{Couleur}},name path global=\pflsplinename] #3 ;
+ \path[draw,tkzgrphcurve,{\useKV[GraphicTikzSpline]{Color}},name path global=\pflsplinename] #3 ;
}%
{%
- \path[draw=none,pflcourbe,name path global=\pflsplinename] #3 ;
+ \path[draw=none,tkzgrphcurve,name path global=\pflsplinename] #3 ;
}%
\end{scope}
}
-\NewDocumentCommand\TracerSpline{ O{} m D<>{\monspline} }{%
+\NewDocumentCommand\DefineSpline{ O{} m D<>{\myspline} }{%old version
%1=liste
- \restoreKV[GraphiqueTikzSpline]%
- \setKV[GraphiqueTikzSpline]{#1}%
- \GenererSpline{#2}{\pflsplinecoeffs}<#3>%
+ \restoreKV[GraphicTikzSpline]%
+ \setKV[GraphicTikzSpline]{#1}%
+ \GenerateSpline{#2}{\pflsplinecoeffs}[#3]%
\begin{scope}
- \draw[pflcourbe,{\useKV[GraphiqueTikzSpline]{Couleur}}] #3 ;
+ \ifboolKV[GraphicTikzSpline]{Trace}%
+ {%
+ \path[draw,tkzgrphcurve,{\useKV[GraphicTikzSpline]{Color}},name path global=\pflsplinename] #3 ;
+ }%
+ {%
+ \path[draw=none,tkzgrphcurve,name path global=\pflsplinename] #3 ;
+ }%
+ \end{scope}
+}
+
+\NewDocumentCommand\DrawSplineCurve{ O{} m D<>{\myspline} }{%
+ %1=liste
+ \restoreKV[GraphicTikzSpline]%
+ \setKV[GraphicTikzSpline]{#1}%
+ \GenerateSpline{#2}{\pflsplinecoeffs}[#3]%
+ \begin{scope}
+ \draw[tkzgrphcurve,{\useKV[GraphicTikzSpline]{Color}}] #3 ;
+ \end{scope}
+}
+
+\NewDocumentCommand\DrawSpline{ O{} m D<>{\myspline} }{%old version
+ %1=liste
+ \restoreKV[GraphicTikzSpline]%
+ \setKV[GraphicTikzSpline]{#1}%
+ \GenerateSpline{#2}{\pflsplinecoeffs}[#3]%
+ \begin{scope}
+ \draw[tkzgrphcurve,{\useKV[GraphicTikzSpline]{Color}}] #3 ;
+ \end{scope}
+}
+
+%===INTERSECTION & ANTÉCÉDENTS
+\defKV[GraphicTikzIntersect]{%
+ Name=\def\pflintercurves{#1}
+}
+\setKVdefault[GraphicTikzIntersect]{%
+ Name=S,
+ Disp=true,
+ Color=black,
+ DispLine=false,%
+ Lines=false,%
+ Style=o
+}
+
+\NewDocumentCommand\FindIntersections{ O{} m m D<>{\myt} }{%
+ \restoreKV[GraphicTikzIntersect]%
+ \setKV[GraphicTikzIntersect]{#1}%
+ \path[name intersections={of=#2 and #3,name=\pflintercurves,total=\t}] \pgfextra{\xdef#4{\t}};
+ \ifboolKV[GraphicTikzIntersect]{Disp}%
+ {%
+ \xintifboolexpr{#4 == 0}{}%
+ {%
+ \foreach \i in {1,...,#4}{%
+ \ifboolKV[GraphicTikzIntersect]{Lines}%
+ {%
+ \draw[tkzgrphrange,{\useKV[GraphicTikzIntersect]{Color}}]let \p1 = (\pflintercurves-\i) in (\pflintercurves-\i) -- ({\x1},{\pflOy}) ;
+ }%
+ {}%
+ \MarkPts*[Style={\useKV[GraphicTikzIntersect]{Style}},Color={\useKV[GraphicTikzIntersect]{Color}}]{(\pflintercurves-\i)}
+ %\filldraw[{\useKV[GraphicTikzIntersect]{Color}}] (\pflintercurves-\i) circle[tkzgrphpointc] ;
+ }
+ }%
+ }%
+ {}%
+}
+
+\NewDocumentCommand\FindCounterimage{ O{} m m D<>{\myantec} }{%
+ \restoreKV[GraphicTikzIntersect]%
+ \setKV[GraphicTikzIntersect]{#1}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphicTikzIntersect]{DispLine}%
+ {%
+ \path[draw,{\useKV[GraphicTikzIntersect]{Color}},tkzgrphcurve,name path=tmpanteced] ({\pflxmin},{#3})--({\pflxmax},{#3}) ;
+ }%
+ {%
+ \path[draw=none,tkzgrphcurve,name path=tmpanteced] ({\pflxmin},{#3})--({\pflxmax},{#3}) ;
+ }%
+ \path[name intersections={of=#2 and tmpanteced,name=\pflintercurves,total=\t}] \pgfextra{\xdef#4{\t}};
+ \ifboolKV[GraphicTikzIntersect]{Disp}%
+ {%
+ \xintifboolexpr{#4 == 0}{}%
+ {%
+ \foreach \i in {1,...,#4}{%
+ \MarkPts*[Style={\useKV[GraphicTikzIntersect]{Style}},Color={\useKV[GraphicTikzIntersect]{Color}}]{(\pflintercurves-\i)}
+ %\filldraw[{\useKV[GraphicTikzIntersect]{Color}}] (\pflintercurves-\i) circle[tkzgrphpointc] ;
+ }
+ }%
+ }%
+ {}%
+ \end{scope}
+}
+
+%====INTÉGRALES
+%v2 avec modification de la clé [Type=...] ?
+\defKV[GraphicTikzIntegr]{%
+ Colors=\def\pfldomtikzcolors{#1},%
+ Style=\def\pfldomtikzstyle{#1},%
+ Opacity=\def\pfldomtikzopac{#1},%
+ Hatch=\def\pfldomtikzhatch{#1},%
+ Type=\def\pfldomtikztype{#1},%
+ Step=\def\pflstepcurve{#1},%
+ Bounds=\def\pflintbornes{#1},%
+ Junction=\def\pfldomtikzjoin{#1},%
+ NameInterpo=\def\pfldomtikznameinterpo{#1},%
+ NameInterpoB=\def\pfldomtikznameinterpob{#1},%
+ NameSpline=\def\pfldomtikznamespline{#1},%
+ NameSplineB=\def\pfldomtikznamesplineb{#1}
+}
+\setKVdefault[GraphicTikzIntegr]{%
+ Colors=gray,%
+ Style=fill,%
+ Opacity=0.5,%
+ Hatch={north west lines},%
+ Type=fct,%
+ Step={},%
+ Junction=bevel,%
+ Bounds=abs,%
+ Border=true,%
+ Spline=false,%
+ SplineB=false,%
+ NameInterpo={\myinterpo},%
+ NameInterpoB={\myinterpoB},%
+ NameSpline={\myspline},%
+ NameSplineB={\myplineB},%
+ Tension=0.5,%
+ TensionB=0.5
+}
+
+\NewDocumentCommand\DrawIntegral{ O{} D<>{} m O{0} m m }{%
+ %1 = clés
+ %2 = options particulières tikz
+ %3 = fonction, en tikz
+ %4 = fonction n°2 éventuelle
+ %de #5 à #6
+ \restoreKV[GraphicTikzIntegr]% revenir au valeurs par défaut
+ \setKV[GraphicTikzIntegr]{#1}% lit les arguments optionnels
+ %les couleurs
+ \IfSubStr{\pfldomtikzcolors}{/}%
+ {%
+ \StrCut{\pfldomtikzcolors}{/}{\pfldomtikzcolorbord}{\pfldomtikzcolorfond}
+ }%
+ {%
+ \xdef\pfldomtikzcolorbord{\pfldomtikzcolors}\xdef\pfldomtikzcolorfond{\pfldomtikzcolors}
+ }%
+ \ifboolKV[GraphicTikzIntegr]{Border}%
+ {%
+ \tikzset{integralebordtikzstyle/.style={draw=\pfldomtikzcolorbord}}
+ }%
+ {%
+ \tikzset{integralebordtikzstyle/.style={draw=none}}
+ }%
+ \IfStrEq{\pfldomtikzstyle}{hatch}%
+ {%
+ \tikzset{integraletikzstyle/.style={tkzgrphline,pattern=\pfldomtikzhatch,pattern color=\pfldomtikzcolorfond,line join=\pfldomtikzjoin}}
+ }%
+ {}%
+ \IfStrEq{\pfldomtikzstyle}{fill}%
+ {%
+ \tikzset{integraletikzstyle/.style={tkzgrphline,fill=\pfldomtikzcolorfond,fill opacity=\pfldomtikzopac,line join=\pfldomtikzjoin}}
+ }%
+ {}%
+ %extraction des infos x/y
+ \IfStrEqCase{\pflintbornes}{%
+ {abs}%
+ {%
+ \xdef\absnoeudA{#5}%
+ \xdef\absnoeudB{#6}%
+ }%
+ {nodes}%
+ {%
+ \path #5;
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\absnoeudA{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+ \path #6;
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\absnoeudB{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+ }%
+ {abs/node}%
+ {%
+ \xdef\absnoeudA{#5}%
+ \path #6;
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\absnoeudB{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+ }%
+ {node/abs}%
+ {%
+ \path #5;
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\absnoeudA{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\absnoeudB{#6}%
+ }%
+ }%
+ %suite avec les nbs points
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflstepcurve{\xintfloateval{((\absnoeudB)-(\absnoeudA))/100}}%
+ }%
+ {}%
+ %TRACÉSen fonction des types de courbes
+ \IfStrEq{\pfldomtikztype}{fct}%
+ {%OK
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflOy}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflOy}) -- cycle ;
+ \end{scope}
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{spl}%avec 3=courbe spline + clé [Spline] à utiliser !
+ {%OK
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflOy}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflOy}) -- cycle ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=#3 and tmpintbornea,name=YYY}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudA},{\pflOy})-- (YYY-1) ;
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=#3 and tmpintborneb,name=ZZZ}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudB},{\pflOy})-- (ZZZ-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{itp}%avec 3=courbe interpo
+ {%OK
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflOy}) -- plot [smooth,tension={\useKV[GraphicTikzIntegr]{Tension}}] coordinates {#3} -- ({\absnoeudB},{\pflOy}) -- cycle ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpo,name=YYY}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudA},{\pflOy})-- (YYY-1) ;
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpo,name=ZZZ}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudB},{\pflOy})-- (ZZZ-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{fct/fct}%avec #3=formule et #4=formule
+ {%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[integraletikzstyle,integralebordtikzstyle,#2] plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#4),x=\absnoeudB..[-(\pflstepcurve)]..\absnoeudA,\absnoeudA)\relax} -- cycle ;
+ \end{scope}
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{spl/spl}%avec #3=cbe spline + #4=cbe splineB
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymax}) -- \pfldomtikznamesplineb -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=#3 and tmpintbornea,name=YYYA}] ;
+ \path[name intersections={of=#4 and tmpintbornea,name=ZZZA}] ;
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=#3 and tmpintborneb,name=YYYB}] ;
+ \path[name intersections={of=#4 and tmpintborneb,name=ZZZB}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] (YYYA-1)-- (ZZZA-1) ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] (YYYB-1)-- (ZZZB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{itp/itp}%avec #3=cbe interpo + #4=cbe interpoB
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot [smooth,tension={\useKV[GraphicTikzIntegr]{Tension}}] coordinates {#3} -- ({\absnoeudB},{\pflymin}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot [smooth,tension={\useKV[GraphicTikzIntegr]{TensionB}}] coordinates {#4} -- ({\absnoeudB},{\pflymax}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpo,name=YYYA}] ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpob,name=ZZZA}] ;
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpo,name=YYYB}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpob,name=ZZZB}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] (YYYA-1)-- (ZZZA-1) ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] (YYYB-1)-- (ZZZB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{fct/spl}%avec #3=formule + #4=spline
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymax}) -- \pfldomtikznamesplineb -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and #4,name=ZZZA}] ;
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintborneb and #4,name=ZZZB}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudA},{\xintfloateval{subs(#3,x=\absnoeudA)}})-- (ZZZA-1) ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudB},{\xintfloateval{subs(#3,x=\absnoeudB)}})-- (ZZZB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{spl/fct}%avec #3=spline + #4=fct
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#4),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymin}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and #3,name=ZZZA}] ;
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintborneb and #3,name=ZZZB}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudA},{\xintfloateval{subs(#4,x=\absnoeudA)}})-- (ZZZA-1) ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudB},{\xintfloateval{subs(#4,x=\absnoeudB)}})-- (ZZZB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{fct/itp}%avec #3=formule + #4=liste interpo
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#3),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot [smooth,tension={\useKV[GraphicTikzIntegr]{TensionB}}] coordinates {#4} -- ({\absnoeudB},{\pflymax}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpob,name=ZZZAA}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpob,name=ZZZAB}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudA},{\xintfloateval{subs(#3,x=\absnoeudA)}})-- (ZZZAA-1) ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudB},{\xintfloateval{subs(#3,x=\absnoeudB)}})-- (ZZZAB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{itp/fct}%
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot[smooth] coordinates {\xintthecoords\xintfloatexpr seq((x,#4),x=\absnoeudA..[\pflstepcurve]..\absnoeudB,\absnoeudB)\relax} -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot [smooth,tension={\useKV[GraphicTikzIntegr]{Tension}}] coordinates {#3} -- ({\absnoeudB},{\pflymin}) ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpo,name=ZZZAA}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpo,name=ZZZAB}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudA},{\xintfloateval{subs(#4,x=\absnoeudA)}})-- (ZZZAA-1) ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] ({\absnoeudB},{\xintfloateval{subs(#4,x=\absnoeudB)}})-- (ZZZAB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{itp/spl}%
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- plot [smooth,tension={\useKV[GraphicTikzIntegr]{Tension}}] coordinates {#3} -- ({\absnoeudB},{\pflymin}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- \pfldomtikznamesplineb -- ({\absnoeudB},{\pflymax}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;%borne inf
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;%borne sup
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpo,name=YYYKAA}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpo,name=YYYKBB}] ;
+ \path[name intersections={of=tmpintbornea and #4,name=ZZZKAA}] ;
+ \path[name intersections={of=tmpintborneb and #4,name=ZZZKBB}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] (YYYKAA-1)-- (ZZZKAA-1) ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] (YYYKBB-1)-- (ZZZKBB-1) ;
+ }%
+ {}%
+ \IfStrEq{\pfldomtikztype}{spl/itp}%
+ {%
+ \begin{scope}
+ \clip ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymax}) -- plot [smooth,tension={\useKV[GraphicTikzIntegr]{TensionB}}] coordinates {#4} -- ({\absnoeudB},{\pflymax}) ;
+ \clip ({\absnoeudA},{\pflymin}) -- \pfldomtikznamespline -- ({\absnoeudB},{\pflymin}) -- cycle ;
+ \filldraw[integraletikzstyle,integralebordtikzstyle,#2] ({\absnoeudA},{\pflymin}) rectangle ({\absnoeudB},{\pflymax}) ;
+ \end{scope}
+ \path[draw=none,tkzgrphcurve,name path=tmpintbornea] ({\absnoeudA},{\pflymin})--({\absnoeudA},{\pflymax}) ;%borne inf
+ \path[draw=none,tkzgrphcurve,name path=tmpintborneb] ({\absnoeudB},{\pflymin})--({\absnoeudB},{\pflymax}) ;%borne sup
+ \path[name intersections={of=tmpintbornea and \pfldomtikznameinterpob,name=YYYKAA}] ;
+ \path[name intersections={of=tmpintborneb and \pfldomtikznameinterpob,name=YYYKBB}] ;
+ \path[name intersections={of=tmpintbornea and #3,name=ZZZKAA}] ;
+ \path[name intersections={of=tmpintborneb and #3,name=ZZZKBB}] ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] (YYYKAA-1)-- (ZZZKAA-1) ;
+ \draw[\pfldomtikzcolorbord,tkzgrphline] (YYYKBB-1)-- (ZZZKBB-1) ;
+ }%
+ {}%
+}
+
+\NewDocumentCommand\DrawPts{ s O{black} D<>{\normalfont\normalsize} m }{%
+ \IfBooleanTF{#1}%
+ {%
+ \foreach \Point in {#4}{%
+ \filldraw[#2] \Point circle[tkzgrphpointc] ;
+ }
+ }%
+ {%
+ \foreach \Point/\Pos/\Label in {#4}{%
+ \filldraw[#2] \Point circle[tkzgrphpointc] node[tkzgrphnode,\Pos,font=#3] {\Label} ;
+ }
+ }%
+}
+
+% %====STATS À 2 VARIABLES
+\defKV[GraphicTikzRegLin]{%
+ Rounds=\def\pflarrondisreglin{#1},
+ Name=\def\pflnamereglin{#1},
+ NameParab=\def\pflnameregquad{#1},
+ Start=\def\pflreglinmin{#1},
+ End=\def\pflreglinmax{#1}
+}
+\setKVdefault[GraphicTikzRegLin]{
+ ColorScatter=black,
+ ColorLine=black,
+ ColorParab=black,
+ Rounds={},
+ Start={\pflxmin},
+ End={\pflxmax},
+ Name=reglin,%
+ NameParab=quadreg,%
+ DrawLine=false,%
+ DrawParab=false,%
+ Style=o
+}
+
+\NewDocumentCommand\DrawScatter{ O{} D<>{d} m m }{%
+ \useKVdefault[GraphicTikzRegLin]%
+ \setKV[GraphicTikzRegLin]{#1}% on paramètres les nouvelles clés et on les simplifie
+ %listes des données
+ \def\xliste{#3}
+ \def\yliste{#4}
+ \readlist*\LX{\xliste}
+ \readlist*\LY{\yliste}
+ %taille des listes
+ \def\LNB{\inteval{\LXlen}}
+ %nuage
+ \foreach \i in {1,...,\LXlen}{%
+ \itemtomacro\LX[\i]\tmpmavalx%
+ \itemtomacro\LY[\i]\tmpmavaly%
+ \MarkPts*[Style={\useKV[GraphicTikzRegLin]{Style}},Color={\useKV[GraphicTikzRegLin]{ColorScatter}}]{(\tmpmavalx,\tmpmavaly)}%
+ }
+ %droite de régression
+ \ifboolKV[GraphicTikzRegLin]{DrawLine}%
+ {%
+ %somme des LX et des LY OK
+ \xdef\LXSomme{0}
+ \xdef\LYSomme{0}
+ \foreach \i in {1,2,...,\LNB}{
+ \xdef\LXSomme{\xintfloateval{\LXSomme+\LX[\i]}}
+ }
+ \foreach \i in {1,2,...,\LNB}{
+ \xdef\LYSomme{\xintfloateval{\LYSomme+\LY[\i]}}
+ }
+ %moyenne des LX et des LY OK
+ \xdef\LXmoy{\xintfloateval{\LXSomme/\LNB}}
+ \xdef\LYmoy{\xintfloateval{\LYSomme/\LNB}}
+ %variance des LX et des LY OK
+ \xdef\LXvar{0}
+ \foreach \i in {1,2,...,\LNB}{
+ \xdef\LXvar{\xintfloateval{\LXvar+(\LX[\i]-\LXmoy)*(\LX[\i]-\LXmoy)}}
+ }
+ \xdef\LXvar{\xintfloateval{\LXvar/\LNB}}
+ \xdef\LYvar{0}
+ \foreach \i in {1,2,...,\LNB}{
+ \xdef\LYvar{\xintfloateval{\LYvar+(\LY[\i]-\LYmoy)*(\LY[\i]-\LYmoy)}}
+ }
+ \xdef\LYvar{\xintfloateval{\LYvar/\LNB}}
+ %covariance des XY OK
+ \xdef\LXYvar{0}
+ \foreach \i in {1,2,...,\LNB}{
+ \xdef\LXYvar{\xintfloateval{\LXYvar+(\LX[\i]-\LXmoy)*(\LY[\i]-\LYmoy)}}
+ }
+ \xdef\LXYvar{\xintfloateval{\LXYvar/\LNB}}
+ %COEFFS OK
+ \IfStrEq{\pflarrondisreglin}{}%
+ {%
+ \xdef\tmpcoeffreglina{\xintfloateval{\LXYvar/\LXvar}}
+ \xdef\tmpcoeffreglinb{\xintfloateval{\LYmoy-\tmpcoeffreglina*\LXmoy}}
+ }%
+ {%
+ \IfSubStr{\pflarrondisreglin}{/}%
+ {%
+ \StrCut{\pflarrondisreglin}{/}{\pflarrondisreglina}{\pflarrondisreglinb}
+ }%
+ {%
+ \xdef\pflarrondisreglina{\pflarrondisreglin}\xdef\pflarrondisreglinb{\pflarrondisreglin}
+ }%
+ \xdef\tmpcoeffreglina{\xintfloateval{round(\LXYvar/\LXvar,\pflarrondisreglina)}}
+ \xdef\tmpcoeffreglinb{\xintfloateval{round(\LYmoy-\tmpcoeffreglina*\LXmoy,\pflarrondisreglinb)}}
+ }%
+ \xintdeffloatfunc #2(x) := (\tmpcoeffreglina)*x+(\tmpcoeffreglinb) ;
+ %tracé
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[tkzgrphcurve,{\useKV[GraphicTikzRegLin]{ColorLine}},name path global=\pflnamereglin,samples=2,domain=\pflreglinmin:\pflreglinmax] plot (\x,{\tmpcoeffreglina*\x+\tmpcoeffreglinb}) ;
+ \end{scope}
+ }%
+ {}%
+ \ifboolKV[GraphicTikzRegLin]{DrawParab}%
+ {%
+ %somme importantes
+ \xdef\LXSomme{0}%
+ \xdef\LXCSomme{0}%
+ \xdef\LYSomme{0}%
+ \xdef\LXXSomme{0}%
+ \xdef\LXYSomme{0}%
+ \xdef\LXXCSomme{0}%
+ \xdef\LXCXCSomme{0}%
+ \xdef\LXCYSomme{0}%
+ %calculs
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LXSomme{\xintfloateval{\LXSomme+\LX[\i]}}%
+ \xdef\LXCSomme{\xintfloateval{\LXCSomme+(\LX[\i])^2}}%
+ }%
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LYSomme{\xintfloateval{\LYSomme+\LY[\i]}}%
+ }%
+ \xdef\LXmoy{\xintfloateval{\LXSomme/\LNB}}%
+ \xdef\LYmoy{\xintfloateval{\LYSomme/\LNB}}%
+ \xdef\LXCmoy{\xintfloateval{\LXCSomme/\LNB}}%
+ %calculs suites
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LXXSomme{\xintfloateval{\LXXSomme+(\LX[\i]-\LXmoy)^2}}%
+ \xdef\LXYSomme{\xintfloateval{\LXYSomme+(\LX[\i]-\LXmoy)*(\LY[\i]-\LYmoy)}}%
+ \xdef\LXXCSomme{\xintfloateval{\LXXCSomme+(\LX[\i]-\LXmoy)*((\LX[\i])*(\LX[\i])-\LXCmoy)}}%
+ \xdef\LXCXCSomme{\xintfloateval{\LXCXCSomme+((\LX[\i])^2-\LXCmoy)^2}}%
+ \xdef\LXCYSomme{\xintfloateval{\LXCYSomme+((\LX[\i])^2-\LXCmoy)*(\LY[\i]-\LYmoy)}}%
+ }%
+ %COEFFS OK
+ \IfStrEq{\pflarrondisreglin}{}%
+ {%
+ \xdef\tmpcoeffregquadb{\xintfloateval{(\LXYSomme*\LXCXCSomme-\LXCYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2)}}
+ \xdef\tmpcoeffregquada{\xintfloateval{(\LXCYSomme*\LXXSomme-\LXYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2)}}
+ \xdef\tmpcoeffregquadc{\xintfloateval{\LYmoy-\tmpcoeffregquadb*\LXmoy-\tmpcoeffregquada*\LXCmoy}}
+ }%
+ {%
+ \xdef\tmpcoeffregquadb{\xintfloateval{round((\LXYSomme*\LXCXCSomme-\LXCYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2),\pflarrondisreglin)}}
+ \xdef\tmpcoeffregquada{\xintfloateval{round((\LXCYSomme*\LXXSomme-\LXYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2),\pflarrondisreglin)}}
+ \xdef\tmpcoeffregquadc{\xintfloateval{round(\LYmoy-\tmpcoeffregquadb*\LXmoy-\tmpcoeffregquada*\LXCmoy,\pflarrondisreglin)}}
+ }%
+ \xintdeffloatfunc #2(x) := (\tmpcoeffregquada)*x^2+(\tmpcoeffregquadb)*x+\tmpcoeffregquadc ;
+ %tracé
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[tkzgrphcurve,{\useKV[GraphicTikzRegLin]{ColorParab}},name path global=\pflnameregquad,samples=250,domain=\pflreglinmin:\pflreglinmax] plot (\x,{\tmpcoeffregquada*(\x)^2+\tmpcoeffregquadb*\x+\tmpcoeffregquadc}) ;
+ \end{scope}
+ }%
+ {}%
+}
+
+\if@loadxintreg
+%régressions alternatives
+\NewDocumentCommand\DrawRegression{ O{} D<>{curvajust} m D<>{} m m }{%
+ %1=options de tracés
+ %2=nom courbe
+ %3=type
+ %4=arrondis
+ %5=liste X
+ %6=liste Y
+ \IfStrEq{#3}{lin}%
+ {%
+ \xintlinreg[round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\linrega*x+\linregb}%
+ }%
+ {}%
+ \IfStrEq{#3}{quad}%
+ {%
+ \xintquadreg[round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\quadrega*x^2+\quadregb*x+\quadregc}%
+ }%
+ {}%
+ \IfStrEq{#3}{pow}%
+ {%
+ \xintpowreg[round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\powrega*x^(\powregb)}%
+ }%
+ {}%
+ \IfStrEq{#3}{expab}%
+ {%
+ \xintexpabreg[round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\expabrega*(\expabregb)^x}%
+ }%
+ {}%
+ \IfStrEq{#3}{hyp}%
+ {%
+ \xinthypreg[round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\hyprega+(\hypregb)/x}%
+ }%
+ {}%
+ \IfStrEq{#3}{log}%
+ {%
+ \xintlogreg[round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\logrega+(\logregb)*log(x)}%
+ }%
+ {}%
+ \IfStrEq{#3}{exp}%
+ {%
+ \xintexpreg[round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{exp(\exprega*x+\expregb)}%
+ }%
+ {}%
+ \IfStrEq{#3}{expalt}%
+ {%
+ \xintexpreg[Alt,round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\expregb*exp(\exprega*x)}%
+ }%
+ {}%
+ \IfStrEq{#3}{cub}%
+ {%
+ \xintcubreg[round={#4}]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\cubrega*x^3+\cubregb*x^2+\cubregc*x+\cubregd}%
+ }%
+ {}%
+ \IfSubStr{#3}{expoff}%
+ {%
+ \StrBehind{#3}{=}[\expoffset]%
+ \xintexpoffreg[round={#4},offset=\expoffset]{#5}{#6}%
+ \DefineFunction[#1,Trace]<#2>{\expoffset+\expregoffb*exp(\expregoffa*x)}%
+ }%
+ {}%
+}
+\fi
+
+%===IMAGES & ANTÉCÉDENTS
+\defKV[GraphicTikzImg]{
+ Colors=\def\pflimgcolors{#1},%
+ Name=\def\pflantecednoms{#1}%
+}
+
+\setKVdefault[GraphicTikzImg]{
+ Colors=black,%
+ Lines=false,%
+ Spline=false,%
+ Name={},%
+ Style=o
+}
+
+\NewDocumentCommand\DefineRange{ O{} m m }{%
+ \useKVdefault[GraphicTikzImg]%
+ \setKV[GraphicTikzImg]{#1}%
+ \ifboolKV[GraphicTikzImg]{Spline}%
+ {%
+ \path[draw=none,tkzgrphcurve,name path=tmpimage] ({#3},{\pflymin})--({#3},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpimage,name=ZZZZ}] ;
+ \coordinate (\pflantecednoms) at (ZZZZ-1) ;
+ }%
+ {%
+ \xdef\tmpresimg{\xintfloateval{#2(#3)}}%
+ \coordinate (\pflantecednoms) at ({#3},{\tmpresimg}) ;
+ }%
+}
+
+\NewDocumentCommand\DrawRanges{ O{} m m }{%
+ \useKVdefault[GraphicTikzImg]%
+ \setKV[GraphicTikzImg]{#1}%
+ \IfSubStr{\pflimgcolors}{/}%
+ {%
+ \StrCut{\pflimgcolors}{/}{\pflimgcolorpt}{\pflimgcolorline}
+ }%
+ {%
+ \xdef\pflimgcolorpt{\pflimgcolors}\xdef\pflimgcolorline{\pflimgcolors}
+ }%
+ \ifboolKV[GraphicTikzImg]{Spline}%
+ {%
+ \foreach \i in {#3}{%
+ \path[draw=none,tkzgrphcurve,name path=tmpimage] ({\i},{\pflymin})--({\i},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmpimage,name=ZZ}] ;
+ \ifboolKV[GraphicTikzImg]{Lines}%
+ {%
+ \draw[\pflimgcolorline,tkzgrphrange] let \p1 = (ZZ-1) in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
+ }%
+ {}%
+ \MarkPts*[Style={\useKV[GraphicTikzImg]{Style}},Color=\pflimgcolorpt]{(ZZ-1)}
+ %\filldraw[\pflimgcolorpt] (ZZ-1) circle[radius=2pt] ;
+ }
+ }%
+ {%
+ \foreach \i in {#3}{%
+ \xdef\tmpresimg{\xintfloateval{#2(\i)}}%
+ \ifboolKV[GraphicTikzImg]{Lines}%
+ {%
+ \draw[\pflimgcolorline,tkzgrphrange] ({\i},{\pflOy}) |- ({\pflOx},{\tmpresimg}) ;
+ }%
+ {}%
+ \MarkPts*[Style={\useKV[GraphicTikzImg]{Style}},Color=\pflimgcolorpt]{({\i},{\tmpresimg})}
+ %\filldraw[\pflimgcolorpt] ({\i},{\tmpresimg}) circle[radius=2pt] ;
+ }%
+ }%
+}
+
+\NewDocumentCommand\DrawCounterimage{ O{} m m }{%avec le nom de la courbe...
+ \useKVdefault[GraphicTikzImg]%
+ \setKV[GraphicTikzImg]{#1}%
+ \xdef\pflstepcurve{\xintfloateval{0.1*\pflgrillexs}}
+ \IfSubStr{\pflimgcolors}{/}%
+ {%
+ \StrCut{\pflimgcolors}{/}{\pflimgcolorpt}{\pflimgcolorline}%
+ }%
+ {%
+ \xdef\pflimgcolorpt{\pflimgcolors}\xdef\pflimgcolorline{\pflimgcolors}%
+ }%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \path[draw=none,tkzgrphcurve,name path=tmpanteced] ({\pflxmin},{#3})--({\pflxmax},{#3}) ;
+ \path[name intersections={of=#2 and tmpanteced,name=ZZ,total=\t}] \pgfextra{\xdef\tmptotanteced{\t}};
+ \xintifboolexpr{\tmptotanteced == 0}{}%
+ {%
+ \ifboolKV[GraphicTikzImg]{Lines}%
+ {%
+ \draw[\pflimgcolorline,tkzgrphcounterimage] ({\pflxmin},{#3})--({\pflxmax},{#3}) ;
+ }%
+ {}%
+ \foreach \i in {1,...,\tmptotanteced}{%
+ \IfStrEq{\pflantecednoms}{}%
+ {}%
+ {%
+ \coordinate (\pflantecednoms-\i) at (ZZ-\i) ;
+ }%
+ \ifboolKV[GraphicTikzImg]{Lines}%
+ {%
+ \draw[\pflimgcolorline,tkzgrphrange] let \p1 = (ZZ-\i) in (ZZ-\i) -- ({\x1},{\pflOy}) ;
+ }%
+ {}%
+ \MarkPts*[Style={\useKV[GraphicTikzImg]{Style}},Color=\pflimgcolorpt]{(ZZ-\i)}
+ %\filldraw[\pflimgcolorpt] (ZZ-\i) circle[radius=2pt] ;
+ }%
+ }%
\end{scope}
}
%===NOMBRE DÉRIVÉ ET TANGENTE (EXPÉRIEMENTAL)
-\NewDocumentCommand\CalculerNbDerive{ s m m m }{%*=gauche+nomfct+abspt+h
+\NewDocumentCommand\CalcDerivate{ s m m m }{%*=gauche+nomfct+abspt+h
\IfBooleanTF{#1}%
{%
\xdef\TmpResNbDeriv{\xintfloateval{(#2(#3)-#2(#3-#4))/(#4)}}%
@@ -1045,35 +3859,36 @@
}%
}
-\defKV[GraphiqueTikzTgte]{%
- Couleurs=\def\pfltgttikzcolors{#1},%
- DecG=\def\pfltgttikzkl{#1},%
- DecD=\def\pfltgttikzkr{#1},%
+\defKV[GraphicTikzTgte]{%
+ Colors=\def\pfltgttikzcolors{#1},%
+ OffsetL=\def\pfltgttikzkl{#1},%
+ OffsetR=\def\pfltgttikzkr{#1},%
h=\def\pfltgttikzh{#1},%
- Sens=\def\pfltgttikzsens{#1},%
+ Direction=\def\pfltgttikzsens{#1},%
Delta=\def\tmptgtedelta{#1}
}
-\setKVdefault[GraphiqueTikzTgte]{%
- Couleurs=black,%
- DecG=1,%
- DecD=1,%
- AffPoint=false,%
+\setKVdefault[GraphicTikzTgte]{%
+ Colors=black,%
+ OffsetL=1,%
+ OffsetR=1,%
+ DispPt=false,%
Spline=false,%
h=0.1,%
- Sens=gd,%
- Noeud=false,%
- Delta=0.01
+ Direction=lr,%
+ Node=false,%
+ Delta=0.01,%
+ Style=o
}
-\NewDocumentCommand\TracerTangente{ O{} m m D<>{} }{%
- \restoreKV[GraphiqueTikzTgte]%
- \setKV[GraphiqueTikzTgte]{#1}%
+\NewDocumentCommand\DrawTangent{ O{} m m D<>{} }{%
+ \restoreKV[GraphicTikzTgte]%
+ \setKV[GraphicTikzTgte]{#1}%
%en fonction de la gestion de l'abscisse
- \ifboolKV[GraphiqueTikzTgte]{Noeud}%
+ \ifboolKV[GraphicTikzTgte]{Node}%
{%
\path #3;
\pgfgetlastxy{\macrox}{\macroy}%
- \xdef\pfltgttikzx{\xintfloateval{(\ConvertirPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\pfltgttikzx{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
}%
{%
\xdef\pfltgttikzx{#3}%
@@ -1089,11 +3904,11 @@
\xdef\tmptgtdeb{\xintfloateval{\pfltgttikzx-(\pfltgttikzkl)}}%
\xdef\tmptgtfin{\xintfloateval{\pfltgttikzx+(\pfltgttikzkr)}}%
%suivant le type de courbe
- \ifboolKV[GraphiqueTikzTgte]{Spline}%
+ \ifboolKV[GraphicTikzTgte]{Spline}%
{%
\path[name path=tmpimage] ({\pfltgttikzx},{\pflymin})--({\pfltgttikzx},{\pflymax}) ;
\path[name intersections={of=#2 and tmpimage,name=TANp}] ;
- \IfStrEq{\pfltgttikzsens}{gd}%
+ \IfStrEq{\pfltgttikzsens}{lr}%
{%
\path[name path=L-vline] ({\pfltgttikzx-\tmptgtedelta},{\pflymin}) -- ({\pfltgttikzx-\tmptgtedelta},{\pflymax}) ;
\path[name path=R-vline] ({\pfltgttikzx+\tmptgtedelta},{\pflymin}) -- ({\pfltgttikzx+\tmptgtedelta},{\pflymax}) ;
@@ -1101,7 +3916,7 @@
%\coordinate (RXcoor) at ($(TANp-1)+({\tmptgtedelta},0)$) ;
}%
{}%
- \IfStrEq{\pfltgttikzsens}{g}%
+ \IfStrEq{\pfltgttikzsens}{l}%
{%
\path[name path=L-vline] ({\pfltgttikzx-\tmptgtedelta},{\pflymin}) -- ({\pfltgttikzx-\tmptgtedelta},{\pflymax}) ;
\path[name path=R-vline] ({\pfltgttikzx},{\pflymin}) -- ({\pfltgttikzx},{\pflymax}) ;
@@ -1110,7 +3925,7 @@
\def\tmptgtfin{\pfltgttikzx}%
}%
{}%
- \IfStrEq{\pfltgttikzsens}{d}%
+ \IfStrEq{\pfltgttikzsens}{r}%
{%
\path[name path=L-vline] ({\pfltgttikzx},{\pflymin}) -- ({\pfltgttikzx},{\pflymax}) ;
\path[name path=R-vline] ({\pfltgttikzx+\tmptgtedelta},{\pflymin}) -- ({\pfltgttikzx+\tmptgtedelta},{\pflymax}) ;
@@ -1124,47 +3939,796 @@
\coordinate (RRpoint) at ($(RXcut-1)+(TANp-1)-(tzXproj)$) ; % move
\path (LLpoint);
\pgfgetlastxy{\macrox}{\macroy}%
- \xdef\tzTANLLX{\xintfloateval{(\ConvertirPtToCm{\macrox})/(\pflxunit)}}%
- \xdef\tzTANLLY{\xintfloateval{(\ConvertirPtToCm{\macroy})/(\pflyunit)}}%
+ \xdef\tzTANLLX{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\tzTANLLY{\xintfloateval{(\ConvertPtToCm{\macroy})/(\pflyunit)}}%
\path (RRpoint);
\pgfgetlastxy{\macrox}{\macroy}%
- \xdef\tzTANRRX{\xintfloateval{(\ConvertirPtToCm{\macrox})/(\pflxunit)}}%
- \xdef\tzTANRRY{\xintfloateval{(\ConvertirPtToCm{\macroy})/(\pflyunit)}}%
+ \xdef\tzTANRRX{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\tzTANRRY{\xintfloateval{(\ConvertPtToCm{\macroy})/(\pflyunit)}}%
\def\tztangentLFn{(\tzTANRRY-\tzTANLLY)/(\tzTANRRX-\tzTANLLX)*(\x-\tzTANLLX)+\tzTANLLY}%
\begin{scope}
\clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax}) ;
- \draw[pfltrait,\pfltgttikzline,domain=\tmptgtdeb:\tmptgtfin,samples=2,#4] plot (\x,{\tztangentLFn}) ;
+ \draw[tkzgrphline,\pfltgttikzline,domain=\tmptgtdeb:\tmptgtfin,samples=2,#4] plot (\x,{\tztangentLFn}) ;
\end{scope}
}%
{%
- \IfStrEq{\pfltgttikzsens}{g}%
+ \IfStrEq{\pfltgttikzsens}{l}%
{%
- \CalculerNbDerive*{#2}{\pfltgttikzx}{\pfltgttikzh}%
+ \CalcDerivate*{#2}{\pfltgttikzx}{\pfltgttikzh}%
}%
{%
- \CalculerNbDerive{#2}{\pfltgttikzx}{\pfltgttikzh}%
+ \CalcDerivate{#2}{\pfltgttikzx}{\pfltgttikzh}%
}%
\begin{scope}
\clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax}) ;
- \draw[pfltrait,\pfltgttikzline,#4] plot[smooth] coordinates {%
+ \draw[tkzgrphline,\pfltgttikzline,#4] plot[smooth] coordinates {%
\xintthecoords\xintfloatexpr
seq((x,\TmpResNbDeriv*(x-(\pfltgttikzx))+#2(\pfltgttikzx)),x=\tmptgtdeb,\tmptgtfin)
\relax
};
\end{scope}
}%
- \ifboolKV[GraphiqueTikzTgte]{AffPoint}%
+ \ifboolKV[GraphicTikzTgte]{DispPt}%
{%
- \ifboolKV[GraphiqueTikzTgte]{Spline}%
+ \ifboolKV[GraphicTikzTgte]{Spline}%
{%
- \filldraw[\pfltgttikzpoint] (TANp-1) circle[pflpointc] ;
+ \MarkPts*[Style={\useKV[GraphicTikzTgte]{Style}},Color=\pfltgttikzpoint]{(TANp-1)}
+ %\filldraw[] (TANp-1) circle[tkzgrphpointc] ;
}%
{%
\xdef\tmpimgtgt{\xintfloateval{#2(\pfltgttikzx)}}%
- \filldraw[\pfltgttikzpoint] ({\pfltgttikzx},\tmpimgtgt) circle[pflpointc] ;
+ \MarkPts*[Style={\useKV[GraphicTikzTgte]{Style}},Color=\pfltgttikzpoint]{({\pfltgttikzx},\tmpimgtgt)}
+ %\filldraw[\pfltgttikzpoint] ({\pfltgttikzx},\tmpimgtgt) circle[tkzgrphpointc] ;
+ }%
+ }%
+ {}%
+}
+
+%====loi normale
+\defKV[GraphicTikzGaussienne]{%
+ Step=\def\pflgaussstep{#1},%
+ Name=\def\pflgaussname{#1}
+}
+
+\setKVdefault[GraphicTikzGaussienne]{%
+ Name=gaussian,%
+ Color=black,%
+ Trace=false,%
+ Step={},%
+ Start={\pflxmin},%
+ End={\pflxmax}
+}
+
+\NewDocumentCommand\DefineStandartDeviation{ O{} D<>{phi} m m }{%
+ %1=options
+ %2=mu
+ %3=sigma
+ \restoreKV[GraphicTikzGaussienne]%
+ \setKV[GraphicTikzGaussienne]{#1}%
+ \xintdeffloatfunc #2(x) := 1/((#4)*sqrt(2*pi))*exp(-0.5*((x-(#3))/(#4))^2) ;%
+ \IfStrEq{\pflgaussstep}{}%
+ {%
+ \xdef\pflgaussstep{\xintfloateval{((\useKV[GraphicTikzGaussienne]{End})-(\useKV[GraphicTikzGaussienne]{Start}))/100}}%
+ }%
+ {}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphicTikzGaussienne]{Trace}%
+ {%
+ \path[draw,tkzgrphcurve,{\useKV[GraphicTikzGaussienne]{Color}},name path global=\pflgaussname] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzGaussienne]{Start}}..[\pflgaussstep]..{\useKV[GraphicTikzGaussienne]{End}},{\useKV[GraphicTikzGaussienne]{End}})
+ \relax
+ } ;
+ }%
+ {%
+ \path[draw=none,tkzgrphcurve,name path global=\pflgaussname] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzGaussienne]{Start}}..[\pflgaussstep]..{\useKV[GraphicTikzGaussienne]{End}},{\useKV[GraphicTikzGaussienne]{End}})
+ \relax
+ } ;
+ }%
+ \end{scope}
+}
+
+\NewDocumentCommand\DrawStandartDeviation{ O{} m }{%
+ %1=options
+ %2=mu
+ %3=sigma
+ \restoreKV[GraphicTikzGaussienne]%
+ \setKV[GraphicTikzGaussienne]{#1}%
+ \IfStrEq{\pflgaussstep}{}%
+ {%
+ \xdef\pflgaussstep{\xintfloateval{((\useKV[GraphicTikzGaussienne]{End})-(\useKV[GraphicTikzGaussienne]{Start}))/100}}%
+ }%
+ {}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[tkzgrphcurve,{\useKV[GraphicTikzGaussienne]{Color}}] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2),x={\useKV[GraphicTikzGaussienne]{Start}}..[\pflgaussstep]..{\useKV[GraphicTikzGaussienne]{End}},{\useKV[GraphicTikzGaussienne]{End}})
+ \relax
+ } ;
+ \end{scope}
+}
+
+\NewDocumentCommand\DefineKhiSquared{ O{} D<>{khi} m }{%
+ %1=options
+ %2=mu
+ %3=sigma
+ \restoreKV[GraphicTikzGaussienne]%
+ \setKV[GraphicTikzGaussienne]{#1}%
+ \xintdeffloatfunc #2(x) := (x<0)?{0}{(1/(2^((#3)/2)*pflgamma((#3)/2)))*x^((#3)/2-1)*exp(-x/2)};
+ \IfStrEq{\pflgaussstep}{}%
+ {%
+ \xdef\pflgaussstep{\xintfloateval{((\useKV[GraphicTikzGaussienne]{End})-(\useKV[GraphicTikzGaussienne]{Start}))/100}}%
+ }%
+ {}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \ifboolKV[GraphicTikzGaussienne]{Trace}%
+ {%
+ \path[draw,tkzgrphcurve,{\useKV[GraphicTikzGaussienne]{Color}},name path global=\pflgaussname] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzGaussienne]{Start}}..[\pflgaussstep]..{\useKV[GraphicTikzGaussienne]{End}},{\useKV[GraphicTikzGaussienne]{End}})
+ \relax
+ } ;
+ }%
+ {%
+ \path[draw=none,tkzgrphcurve,name path global=\pflgaussname] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzGaussienne]{Start}}..[\pflgaussstep]..{\useKV[GraphicTikzGaussienne]{End}},{\useKV[GraphicTikzGaussienne]{End}})
+ \relax
+ } ;
+ }%
+ \end{scope}
+}
+
+\NewDocumentCommand\DrawKhiSquared{ O{} m }{%
+ %1=options
+ %2=mu
+ %3=sigma
+ \restoreKV[GraphicTikzGaussienne]%
+ \setKV[GraphicTikzGaussienne]{#1}%
+ \IfStrEq{\pflgaussstep}{}%
+ {%
+ \xdef\pflgaussstep{\xintfloateval{((\useKV[GraphicTikzGaussienne]{End})-(\useKV[GraphicTikzGaussienne]{Start}))/100}}%
+ }%
+ {}%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax});
+ \draw[tkzgrphcurve,{\useKV[GraphicTikzGaussienne]{Color}}] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2),x={\useKV[GraphicTikzGaussienne]{Start}}..[\pflgaussstep]..{\useKV[GraphicTikzGaussienne]{End}},{\useKV[GraphicTikzGaussienne]{End}})
+ \relax
+ } ;
+ \end{scope}
+}
+
+%====droite
+\defKV[GraphicTikzLine]{%
+ Name=\def\pfldroitename{#1}
+}
+
+\setKVdefault[GraphicTikzLine]{%
+ Slope=false,%
+ Color=black,%
+ Start={\pflxmin},%
+ End={\pflxmax},%
+ Name={}
+}
+
+\NewDocumentCommand\DrawLine{ O{} m m D<>{} }{%
+ \restoreKV[GraphicTikzLine]%
+ \setKV[GraphicTikzLine]{#1}%
+ %1er point
+ \path #2;%
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\pfldtetikzxA{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\pfldtetikzyA{\xintfloateval{(\ConvertPtToCm{\macroy})/(\pflyunit)}}%
+ %2ème point si besoin
+ \ifboolKV[GraphicTikzLine]{Slope}%
+ {%
+ \xdef\pfldtepente{\xintfloateval{#3}}%
+ }%
+ {%
+ \path #3;%
+ \pgfgetlastxy{\macrox}{\macroy}%
+ \xdef\pfldtetikzxB{\xintfloateval{(\ConvertPtToCm{\macrox})/(\pflxunit)}}%
+ \xdef\pfldtetikzyB{\xintfloateval{(\ConvertPtToCm{\macroy})/(\pflyunit)}}%
+ \xdef\pfldtepente{\xintfloateval{(\pfldtetikzyB-\pfldtetikzyA)/(\pfldtetikzxB-\pfldtetikzxA)}}%
+ }%
+ \begin{scope}
+ \clip ({\pflxmin},{\pflymin}) rectangle ({\pflxmax},{\pflymax}) ;
+ \xintifboolexpr{\pfldtetikzxA == \pfldtetikzxB}%
+ {%
+ \IfEq{\pfldroitename}{}%
+ {%
+ \draw[tkzgrphline,{\useKV[GraphicTikzLine]{Color}},#4] (\pfldtetikzxA,\pflymin) -- (\pfldtetikzxA,\pflymax) ;
+ }%
+ {%
+ \draw[tkzgrphline,{\useKV[GraphicTikzLine]{Color}},#4,name path global=\pfldroitename] (\pfldtetikzxA,\pflymin) -- (\pfldtetikzxA,\pflymax) ;
+ }%
+ }%
+ {%
+ \IfEq{\pfldroitename}{}%
+ {%
+ \draw[tkzgrphline,{\useKV[GraphicTikzLine]{Color}},domain={\useKV[GraphicTikzLine]{Start}}:{\useKV[GraphicTikzLine]{End}},samples=2,#4] plot (\x,{\pfldtepente*(\x-\pfldtetikzxA)+\pfldtetikzyA}) ;
+ }%
+ {%
+ \draw[tkzgrphline,{\useKV[GraphicTikzLine]{Color}},domain={\useKV[GraphicTikzLine]{Start}}:{\useKV[GraphicTikzLine]{End}},samples=2,name path global=\pfldroitename,#4] plot (\x,{\pfldtepente*(\x-\pfldtetikzxA)+\pfldtetikzyA}) ;
+ }%
+ }%
+ \end{scope}
+}
+
+%====asymptote
+\NewDocumentCommand\DrawAsymptote{ O{} m D<>{} }{%
+ \restoreKV[GraphicTikzLine]%
+ \setKV[GraphicTikzLine]{#1}%
+ %tracé
+ \draw[tkzgrphline,{\useKV[GraphicTikzLine]{Color}},#3] ({#2},{\pflymin})--({#2},{\pflymax}) ;
+}
+
+%====minmax
+\defKV[GraphicTikzMinMax]{%
+ Pas=\def\pflminmaxstep{#1},%
+ Method=\def\pflminmaxmethode{#1},%
+ Coeffs=\def\pflminmaxcoeffs{#1}
+}
+\setKVdefault[GraphicTikzMinMax]{%
+ Start={\pflxmin},%
+ End={\pflxmax},%
+ Pas={},%
+ Tension=0.5,%
+ Method=function,%
+ Coeffs=3
+}
+
+\NewDocumentCommand\FindMax{ O{} m O{c-max} }{%
+ %1=clés
+ %2=paramètres en fonction de [Methode]
+ \restoreKV[GraphicTikzMinMax]%
+ \setKV[GraphicTikzMinMax]{#1}%
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflminmaxstep{\xintfloateval{((\useKV[GraphicTikzMinMax]{End})-(\useKV[GraphicTikzMinMax]{Start}))/100}}%
+ }%
+ {}%
+ \begin{scope}[bezier bounding box,local bounding box=bbtmpmax]
+ \IfStrEq{\pflminmaxmethode}{function}%
+ {%
+ \path[draw=none,name path=curvetmpmax] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzMinMax]{Start}}..[\pflstepcurve]..{\useKV[GraphicTikzMinMax]{End}},{\useKV[GraphicTikzMinMax]{End}})
+ \relax
+ };
+ }%
+ {}%
+ \IfStrEq{\pflminmaxmethode}{interpo}%
+ {%
+ \path[draw=none,name path=curvetmpmax] plot[smooth,tension={\useKV[GraphicTikzMinMax]{Tension}}] coordinates {#2};
+ }%
+ {}%
+ \IfStrEq{\pflminmaxmethode}{spline}%
+ {%
+ \GenerateSpline{#2}{\pflminmaxcoeffs}[\tmpsplineminmax]%
+ \path[draw=none,name path=curvetmpmax] \tmpsplineminmax ;
+ }%
+ {}%
+ %retour
+ \path[name path=tmpmax] ([yshift=-0.25\pgflinewidth]bbtmpmax.north east) -- ([yshift=-0.25\pgflinewidth]bbtmpmax.north west) ;
+ \path[name intersections={of=curvetmpmax and tmpmax,name=#3}] ;
+ \coordinate (#3) at ($0.5*(#3-1)+0.5*(#3-2)+(0,0.25\pgflinewidth)$) ;
+ \end{scope}
+}
+
+\NewDocumentCommand\FindMin{ O{} m O{c-min} }{%
+ %1=clés
+ %2=paramètres en fonction de [Methode]
+ \restoreKV[GraphicTikzMinMax]%
+ \setKV[GraphicTikzMinMax]{#1}%
+ \IfStrEq{\pflstepcurve}{}%
+ {%
+ \xdef\pflminmaxstep{\xintfloateval{((\useKV[GraphicTikzMinMax]{End})-(\useKV[GraphicTikzMinMax]{Start}))/100}}%
+ }%
+ {}%
+ \begin{scope}[bezier bounding box,local bounding box=bbtmpmin]
+ \IfStrEq{\pflminmaxmethode}{function}%
+ {%
+ \path[draw=none,name path=curvetmpmin] plot[smooth] coordinates {%
+ \xintthecoords\xintfloatexpr
+ seq((x,#2(x)),x={\useKV[GraphicTikzMinMax]{Start}}..[\pflstepcurve]..{\useKV[GraphicTikzMinMax]{End}},{\useKV[GraphicTikzMinMax]{End}})
+ \relax
+ };
+ }%
+ {}%
+ \IfStrEq{\pflminmaxmethode}{interpo}%
+ {%
+ \path[draw=none,name path=curvetmpmin] plot[smooth,tension={\useKV[GraphicTikzMinMax]{Tension}}] coordinates {#2};
+ }%
+ {}%
+ \IfStrEq{\pflminmaxmethode}{spline}%
+ {%
+ \GenerateSpline{#2}{\pflminmaxcoeffs}[\tmpsplineminmax]%
+ \path[draw=none,name path=curvetmpmin] \tmpsplineminmax ;
+ }%
+ {}%
+ %retour
+ \path[name path=tmpmin] ([yshift=0.25\pgflinewidth]bbtmpmin.south east) -- ([yshift=0.25\pgflinewidth]bbtmpmin.south west) ;
+ \path[name intersections={of=curvetmpmin and tmpmin,name=#3}] ;
+ \coordinate (#3) at ($0.5*(#3-1)+0.5*(#3-2)+(0,-0.25\pgflinewidth)$) ;
+ \end{scope}
+}
+
+%====TEXTES
+\defKV[GraphicTikzNode]{%
+ Color=\def\pflnodecol{#1},%
+ Font=\def\pflnodefonte{#1},%
+ Position=\def\pfnodepos{#1}
+}
+\setKVdefault[GraphicTikzNode]{%
+ Color=black,%
+ Start={\normalfont\normalsize},%
+ Position={}
+}
+\NewDocumentCommand\DrawTxt{ O{} m m }{%
+ \restoreKV[GraphicTikzNode]%
+ \setKV[GraphicTikzNode]{#1}%
+ \draw #2 node[tkzgrphnode,font=\pflnodefonte,text=\pflnodecol,\pfnodepos] {#3} ;
+}
+
+%====MONTE CARLO
+\defKV[GraphicTikzmontecarlo]{%
+ Colors=\def\graphtikzmccols{#1},%
+ BoundsX=\def\graphtikzmcxbornes{#1},%
+ BoundsY=\def\graphtikzmcybornes{#1}
+}
+
+\setKVdefault[GraphicTikzmontecarlo]{%
+ Colors={blue/red},%
+ BoundsX={\pflxmin,\pflxmax},%
+ BoundsY={\pflymin,\pflymax}
+}
+
+\NewDocumentCommand\SimulateMonteCarlo{ O{} D<>{f} m O{\nbptsmcok} O{\nbptsmcko} }{%
+ \restoreKV[GraphicTikzmontecarlo]%
+ \setKV[GraphicTikzmontecarlo]{#1}%
+ \StrCut{\graphtikzmccols}{/}{\tmpMCcolOK}{\tmpMCcolKO}%
+ \StrCut{\graphtikzmcxbornes}{,}{\tmpMCxmin}{\tmpMCxmax}%
+ \StrCut{\graphtikzmcybornes}{,}{\tmpMCymin}{\tmpMCymax}%
+ \xdef#4{0}%
+ \xdef#5{0}%
+ \xdef\nbptsmc{#3}%
+ \foreach \i in {1,...,#3}{%
+ \xdef\tmpMCrandX{\xintfloateval{random()*((\tmpMCxmax)-(\tmpMCxmin))+(\tmpMCxmin)}}%
+ \xdef\tmpMCrandY{\xintfloateval{random()*((\tmpMCymax)-(\tmpMCymin))+(\tmpMCymin)}}%
+ \xdef\tmpMCrandfX{\xintfloateval{#2(\tmpMCrandX)}}%
+ \xintifboolexpr{ \tmpMCrandfX > \tmpMCrandY }%
+ {%
+ \xdef#4{\xinteval{#4+1}}%
+ \filldraw[\tmpMCcolOK] (\tmpMCrandX,\tmpMCrandY) circle[tkzgrphpointmc] ;
+ }%
+ {%
+ \xdef#5{\xinteval{#5+1}}%
+ \filldraw[\tmpMCcolKO] (\tmpMCrandX,\tmpMCrandY) circle[tkzgrphpointmc] ;
+ }%
+ }%
+}
+
+%====ECC
+\defKV[tkzgECC]{%
+ Couleur=\def\tkzecc@coul@graph{#1},%
+ CouleursParams=\def\tkzecc@coul@params{#1}
+}
+
+\setKVdefault[tkzgECC]{%
+ Couleur=black,%
+ AffParams=true,%
+ CouleursParams={black},%
+ TraitsComplets=true
+}
+
+\tikzset{pfltraitsparamecc/.style={line width=0.9pt,densely dashed}}
+\tikzset{pflcourbeecc/.style={line width=1.05pt}}
+
+\NewDocumentCommand\TracerCourbeECC{ O{} m m }{%
+ \restoreKV[tkzgECC]%
+ \setKV[tkzgECC]{#1}%
+ \IfSubStr{\tkzecc@coul@params}{/}%
+ {%
+ \StrCut{\tkzecc@coul@params}{/}{\tkzecc@coul@quart}{\tkzecc@coul@med}%
+ }%
+ {%
+ \def\tkzecc@coul@quart{\tkzecc@coul@params}\def\tkzecc@coul@med{\tkzecc@coul@params}%
+ }%
+ \readlist*\DataClass{#2}%
+ \readlist*\DataEff{#3}%
+ \xdef\DonneesECC{0}%
+ \xintFor* ##1 in {\xintSeq{1}{\DataEfflen}}\do{%
+ \xdef\DonneesTmp{0}
+ \xintFor* ##2 in {\xintSeq{1}{##1}}\do{%
+ \xdef\DonneesTmp{\xintfloateval{\DonneesTmp+\DataEff[##2]}}%
+ }%
+ \xdef\DonneesECC{\DonneesECC,\DonneesTmp}%
+ }%
+ \readlist*\DataECC\DonneesECC%
+ \itemtomacro\DataClass[1]\DonneesXmin%
+ \itemtomacro\DataClass[-1]\DonneesXmax%
+ \itemtomacro\DataECC[-1]\DonneesEffMax%
+ \xdef\DonneesListeECC{(\DataClass[1],\DataECC[1])}%
+ \xintFor* ##1 in {\xintSeq{2}{\DataECClen}}\do{%
+ \xdef\DonneesListeECC{\DonneesListeECC--(\DataClass[##1],\DataECC[##1])}%
+ }%
+ %paramètres par interpolation
+ \xintFor* ##1 in {\xintSeq{1}{\DataEfflen}}\do{%
+ \xdef\isuiv{\xinteval{##1+1}}%
+ \xintifboolexpr{\DataECC[##1] < (0.25*\DonneesEffMax) 'and' \DataECC[\isuiv] >= (0.25*\DonneesEffMax)}%
+ {%
+ \xdef\pentetmpECC{(\DataECC[\isuiv]-\DataECC[##1])/(\DataClass[\isuiv]-\DataClass[##1])}%OK
+ \xdef\ValPremQuartile{\xintfloateval{(0.25*\DonneesEffMax+\pentetmpECC*\DataClass[##1]-\DataECC[##1])/(\pentetmpECC)}}%
+ }
+ {}%
+ \xintifboolexpr{\DataECC[##1] < (0.50*\DonneesEffMax) 'and' \DataECC[\isuiv] >= (0.50*\DonneesEffMax)}%
+ {%
+ \xdef\pentetmpECC{(\DataECC[\isuiv]-\DataECC[##1])/(\DataClass[\isuiv]-\DataClass[##1])}%OK
+ \xdef\ValMed{\xintfloateval{(0.50*\DonneesEffMax+\pentetmpECC*\DataClass[##1]-\DataECC[##1])/(\pentetmpECC)}}%
+ }
+ {}%
+ \xintifboolexpr{\DataECC[##1] < (0.75*\DonneesEffMax) 'and' \DataECC[\isuiv] >= (0.75*\DonneesEffMax)}%
+ {%
+ \xdef\pentetmpECC{(\DataECC[\isuiv]-\DataECC[##1])/(\DataClass[\isuiv]-\DataClass[##1])}%OK
+ \xdef\ValTroisQuartile{\xintfloateval{(0.75*\DonneesEffMax+\pentetmpECC*\DataClass[##1]-\DataECC[##1])/(\pentetmpECC)}}%
+ }
+ {}%
+ }%
+ %partie graphique
+ \draw[pflcourbeecc,\tkzecc@coul@graph] \DonneesListeECC ;
+ \xintFor* ##1 in {\xintSeq{1}{\DataECClen}}\do{%
+ \filldraw[\tkzecc@coul@graph] (\DataClass[##1],\DataECC[##1]) circle[pflpointnuage] ;
+ }%
+ \ifboolKV[tkzgECC]{AffParams}%
+ {%
+ %médiane
+ \ifboolKV[tkzgECC]{TraitsComplets}%
+ {%
+ \draw[pfltraitsparamecc,\tkzecc@coul@med] (\pflxmin,{0.50*\DonneesEffMax})--(\pflxmax,{0.50*\DonneesEffMax});
+ \draw[pfltraitsparamecc,\tkzecc@coul@quart] (\pflxmin,{0.25*\DonneesEffMax})--++({\pflxmax-\pflxmin},0);
+ \draw[pfltraitsparamecc,\tkzecc@coul@quart] (\pflxmin,{0.75*\DonneesEffMax})--++({\pflxmax-\pflxmin},0);
+ }%
+ {%
+ \draw[pfltraitsparamecc,\tkzecc@coul@med] (\pflxmin,{0.50*\DonneesEffMax})--(\ValMed,{0.50*\DonneesEffMax});
+ \draw[pfltraitsparamecc,\tkzecc@coul@quart] (\pflxmin,{0.25*\DonneesEffMax})--++({\ValPremQuartile-\pflxmin},0);
+ \draw[pfltraitsparamecc,\tkzecc@coul@quart] (\pflxmin,{0.75*\DonneesEffMax})--++({\ValTroisQuartile-\pflxmin},0);
+ }%
+ \draw[pfltraitsparamecc,\tkzecc@coul@med] (\ValMed,{0.5*\DonneesEffMax})--(\ValMed,0) ; \draw[\tkzecc@coul@med,thick,fill=white] (\ValMed,{0.5*\DonneesEffMax}) circle[pflpointnuage] ;
+ \draw[pfltraitsparamecc,\tkzecc@coul@quart] (\ValPremQuartile,{0.25*\DonneesEffMax})--(\ValPremQuartile,\pflymin) ; \draw[\tkzecc@coul@quart,thick,fill=white] (\ValPremQuartile,{0.25*\DonneesEffMax}) circle[pflpointnuage] ;
+ \draw[pfltraitsparamecc,\tkzecc@coul@quart] (\ValTroisQuartile,{0.75*\DonneesEffMax})--(\ValTroisQuartile,\pflymin) ; \draw[\tkzecc@coul@quart,thick,fill=white] (\ValTroisQuartile,{0.75*\DonneesEffMax}) circle[pflpointnuage] ;
+ }%
+ {}%
+}
+
+%====PTS DISCONTINUITÉ
+\defKV[tkzptdiscont]{%
+ Couleur=\def\pfldiscontcouleur{#1},%
+ Pos=\def\pfldiscontpos{#1},%
+ Echelle=\def\pfldiscontechelle{#1},%
+ Type=\def\pfldisconttype{#1}
+}
+
+\setKVdefault[tkzptdiscont]{%
+ Couleur=black,%
+ Pos=D,%
+ Echelle=1,%
+ Type=par
+}
+
+\NewDocumentCommand\AfficherPtsDiscont{ O{} m }{%
+ \restoreKV[tkzptdiscont]
+ \setKV[tkzptdiscont]{#1}%
+ \setsepchar[.]{§./}%
+ \readlist*\SPLlisteDiscont{#2}%
+ \def\SPLlisteDiscontNb{\SPLlisteDiscontlen}%
+ \foreach \i in {1,...,\SPLlisteDiscontNb}{%
+ \begin{scope}[shift={(\SPLlisteDiscont[\i,1],\SPLlisteDiscont[\i,2])},rotate={atan \SPLlisteDiscont[\i,3]},scale=\pfldiscontechelle]
+ \IfStrEq{\pfldisconttype}{rond}%
+ {%
+ \draw[pflcourbediscont,fill=white,draw=\pfldiscontcouleur] (0,0) circle[radius=3pt] ;
+ }{}%
+ \IfStrEq{\pfldiscontpos}{D}%
+ {%
+ \IfStrEq{\pfldisconttype}{par}%
+ {%
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) to[out=90,in=170] (4pt,5pt) ;
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) to[out=-90,in=-170] (4pt,-5pt) ;
+ }{}%
+ \IfStrEq{\pfldisconttype}{demirond}%
+ {%
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) to[out=90,in=180] (3pt,3pt) ;
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) to[out=-90,in=180] (3pt,-3pt) ;
+ }{}%
+ \IfStrEq{\pfldisconttype}{cro}%
+ {%
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) |- (4pt,5pt) ;
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) |- (4pt,-5pt) ;
+ }{}%
+ }%
+ {%
+ \IfStrEq{\pfldisconttype}{par}%
+ {%
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) to[out=90,in=-10] (-4pt,5pt) ;
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) to[out=-90,in=10] (-4pt,-5pt) ;
+ }{}%
+ \IfStrEq{\pfldisconttype}{demirond}%
+ {%
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) to[out=90,in=0] (-3pt,3pt) ;
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) to[out=-90,in=0] (-3pt,-3pt) ;
+ }{}%
+ \IfStrEq{\pfldisconttype}{cro}%
+ {%
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) |- (-4pt,5pt) ;
+ \draw[pflcourbediscont,\pfldiscontcouleur] (0,0) |- (-4pt,-5pt) ;
+ }{}%
}%
+ \end{scope}
+ }%
+}
+
+%====TOILE RÉCURRENCE (OK avec courbe + spline !!)
+\tikzset{pfltraitrec/.style={line width=0.8pt}}
+\tikzset{pfltraitrecpointill/.style={pfltraitrec,densely dashed}}
+
+\defKV[tkzwebrecurr]{%
+ Couleur=\def\pflrecurcolor{#1},%
+ Nom=\def\pflrecurnom{#1},%
+ No=\def\pflrecurno{#1},%
+ Nb=\def\pflrecurnb{#1},%
+ Uno=\def\pflrecuruno{#1},
+ TailleLabel=\def\pflrecurlabelsize{#1},%
+ PosLabel=\def\pflrecurlabelpos{#1}
+}
+
+\setKVdefault[tkzwebrecurr]{%
+ Couleur=black,%
+ Spline=false,%
+ No=0,%
+ Nom=u,%
+ Nb=5,%
+ AffTermes=false,%
+ AffPointilles=true,%
+ TailleLabel=\small,%
+ PosLabel=below
+}
+
+\NewDocumentCommand\TracerToileRecurrence{ O{} m }{
+ %<clés> + fonction/courbe
+ \useKVdefault[tkzwebrecurr]%
+ \setKV[tkzwebrecurr]{#1}% on paramètres les nouvelles clés et on les simplifie
+ \ifboolKV[tkzwebrecurr]{Spline}%
+ {%
+ \foreach \i [remember=\i as \x (initially \pflrecuruno)] in {1,...,\pflrecurnb}{%
+ %\xdef\y{\xintfloateval{#2(\x)}}%
+ \path[draw=none,pflcourbe,name path=tmprecur] ({\x},{\pflymin})--({\x},{\pflymax}) ;
+ \path[name intersections={of=#2 and tmprecur,name=ZZZZ}] ;
+ %\coordinate (\pflrecurnoms) at (ZZZZ-1) ;
+ \GetYcoord{(ZZZZ-1)}[\y]
+ %test de la position courbe / bissectrice ?
+ \ifnum \i=1
+ \newdimen \X
+ \newdimen \Y
+ \X = \x pt
+ \Y = \y pt
+ \ifdim \Y < \X
+ \draw[pfltraitrec,\pflrecurcolor] (\x,\y)--(\y,\y) ;
+ \else
+ \draw[pfltraitrec,\pflrecurcolor] (\x,\x)--(\x,\y)--(\y,\y) ;
+ \fi
+ \else
+ \draw[pfltraitrec,\pflrecurcolor] (\x,\x)--(\x,\y)--(\y,\y) ;
+ \fi
+ \ifboolKV[tkzwebrecurr]{AffPointilles}%
+ {%
+ \def\indice{\fpeval{\i+\pflrecurno-1}}%
+ \ifboolKV[tkzwebrecurr]{AffTermes}%
+ {%
+ \draw[pfltraitrecpointill,\pflrecurcolor] (\x,\y)--(\x,\pflxmin) node[\pflrecurlabelpos,font=\pflrecurlabelsize]{$\pflrecurnom_{\indice}$};%
+ }%
+ {%
+ \draw[pfltraitrecpointill,\pflrecurcolor] (\x,\y)--(\x,\pflxmin) ;%
+ }%
+ }%
+ {}
+ \def\i{\y}%
+ }%
+ }%
+ {%
+ \foreach \i [remember=\i as \x (initially \pflrecuruno)] in {1,...,\pflrecurnb}{%
+ \xdef\y{\xintfloateval{#2(\x)}}%
+ %test de la position courbe / bissectrice ?
+ \ifnum \i=1
+ \newdimen \X
+ \newdimen \Y
+ \X = \x pt
+ \Y = \y pt
+ \ifdim \Y < \X
+ \draw[pfltraitrec,\pflrecurcolor] (\x,\y)--(\y,\y) ;
+ \else
+ \draw[pfltraitrec,\pflrecurcolor] (\x,\x)--(\x,\y)--(\y,\y) ;
+ \fi
+ \else
+ \draw[pfltraitrec,\pflrecurcolor] (\x,\x)--(\x,\y)--(\y,\y) ;
+ \fi
+ \ifboolKV[tkzwebrecurr]{AffPointilles}%
+ {%
+ \def\indice{\fpeval{\i+\pflrecurno-1}}%
+ \ifboolKV[tkzwebrecurr]{AffTermes}%
+ {%
+ \draw[pfltraitrecpointill,\pflrecurcolor] (\x,\y)--(\x,\pflxmin) node[\pflrecurlabelpos,font=\pflrecurlabelsize]{$\pflrecurnom_{\indice}$};%
+ }%
+ {%
+ \draw[pfltraitrecpointill,\pflrecurcolor] (\x,\y)--(\x,\pflxmin) ;%
+ }%
+ }%
+ {}
+ \def\i{\xintfloateval{\y}}%
+ }%
}%
+}
+
+%====HISTOBINOM
+\defKV[tkzHistoBinom]{%
+ Plage=\def\tkzGraphBinomPlage{#1},%
+ CouleurPlage=\def\tkzGraphBimomColPlage{#1},%
+ ClipX=\def\tkzGraphBinomXminmax{#1},%
+ CouleurNormale=\def\tkzGraphBinomColNorm{#1}
+}
+\setKVdefault[tkzHistoBinom]{%
+ Plage={},%
+ CouleurPlage=black,%
+ ClipX={},%
+ AffNormale=false,%
+ CouleurNormale=black
+}
+
+\NewDocumentCommand\TracerHistoBinomiale{ O{} D<>{phi} m m }{%
+ \restoreKV[tkzHistoBinom]%
+ \setKV[tkzHistoBinom]{#1}
+ \def\tkzGraphBinomN{#3}%
+ \def\tkzGraphBinomP{#4}%
+ \IfStrEq{\tkzGraphBinomXminmax}{}%
+ {%
+ \xdef\tkzGraphBinomXmin{0}%
+ \xdef\tkzGraphBinomXmax{\tkzGraphBinomN}%
+ }%
+ {%
+ \StrCut{\tkzGraphBinomXminmax}{-}{\tkzGraphBinomXmin}{\tkzGraphBinomXmax}%
+ \IfStrEq{\tkzGraphBinomXmin}{*}{\xdef\tkzGraphBinomXmin{0}}{}%
+ \IfStrEq{\tkzGraphBinomXmax}{*}{\xdef\tkzGraphBinomXmax{\tkzGraphBinomN}}{}%
+ }%
+ \IfStrEq{\tkzGraphBinomPlage}{}%
{}%
+ {%
+ \StrCut{\tkzGraphBinomPlage}{-}{\tkzGraphBinomColorMin}{\tkzGraphBinomColorMax}%
+ \IfStrEq{\tkzGraphBinomColorMin}{*}{\xdef\tkzGraphBinomColorMin{\tkzGraphBinomXmin}}{}%
+ \IfStrEq{\tkzGraphBinomColorMax}{*}{\xdef\tkzGraphBinomColorMax{\tkzGraphBinomXmax}}{}%
+ }%
+ %coloriage éventuel
+ \IfStrEq{\tkzGraphBinomPlage}{}%
+ {}%
+ {%
+ \xintFor* ##1 in {\xintSeq{\tkzGraphBinomColorMin}{\tkzGraphBinomColorMax}}\do{%
+ \xdef\tkztmpYYY{\xintfloateval{binomial(\tkzGraphBinomN,##1)*(\tkzGraphBinomP)^(##1)*(1-(\tkzGraphBinomP))^((\tkzGraphBinomN)-(##1))}}%
+ \draw[draw=none,fill=\tkzGraphBimomColPlage,fill opacity=0.5] ({##1-0.5},{\pflymin}) rectangle++ (1,{\tkztmpYYY-\pflymin}) ;
+ }%
+ }%
+ %tracé
+ \xintFor* ##1 in {\xintSeq{\tkzGraphBinomXmin}{\tkzGraphBinomXmax}}\do{%
+ \xdef\tkztmpYYY{\xintfloateval{binomial(\tkzGraphBinomN,##1)*(\tkzGraphBinomP)^(##1)*(1-(\tkzGraphBinomP))^((\tkzGraphBinomN)-(##1))}}%
+ \draw[pfltrait] ({##1-0.5},{\pflymin}) rectangle++ (1,{\tkztmpYYY-\pflymin}) ;
+ }%
+ \ifboolKV[tkzHistoBinom]{AffNormale}%
+ {%
+ \xdef\tkzMinNormHistoBinom{\xintfloateval{{\tkzGraphBinomXmin-0.5}}}%
+ \xdef\tkzMaxNormHistoBinom{\xintfloateval{{\tkzGraphBinomXmax+0.5}}}%
+ \xdef\tkzEsperNorm{\xintfloateval{(#3)*(#4)}}%
+ \xdef\tkzVarNorm{\xintfloateval{sqrt((#3)*(#4)*(1-(#4)))}}%
+ \DefinirLoiNormale[Trace,Couleur=\tkzGraphBinomColNorm,pflcourbe,Debut=\tkzMinNormHistoBinom,Fin=\tkzMaxNormHistoBinom]<#2>{\tkzEsperNorm}{\tkzVarNorm}
+ }%
+ {}%
+}
+
+%====pgfplots small macros
+\NewDocumentCommand\findintersectionspgf{ O{ITSC} m m D<>{\myt} }{%
+ %1 = name of node name
+ %2 = 1st object
+ %3 = 2d object
+ %4 = macro storing number of intersections
+ \path[name intersections={of=#2 and #3,name=#1,total=\t}] \pgfextra{\xdef#4{\t}} ;
+}
+
+\NewDocumentCommand\gextractxnodepgf{ m O{\myxcoord} }{%
+ \path \pgfextra{\pgfplotspointgetcoordinates{#1}\pgfkeysgetvalue{/data point/x}{\tmpxgetvalue}\xdef#2{\tmpxgetvalue}} ;
+}
+
+\NewDocumentCommand\gextractynodepgf{ m O{\myycoord} }{%
+ \path \pgfextra{\pgfplotspointgetcoordinates{#1}\pgfkeysgetvalue{/data point/y}{\tmpygetvalue}\xdef#2{\tmpygetvalue}} ;
+}
+
+\NewDocumentCommand\gextractxynodepgf{ m O{\myxcoord} O{\myycoord} }{%
+ \path \pgfextra{\pgfplotspointgetcoordinates{#1}\pgfkeysgetvalue{/data point/x}{\tmpxgetvalue}\xdef#2{\tmpxgetvalue}\pgfkeysgetvalue{/data point/y}{\tmpygetvalue}\xdef#3{\tmpygetvalue}} ;
+}
+
+\NewDocumentCommand\fillbetweencurvespgf{ O{gray,fill opacity=0.25} m m D<>{} }{%
+ \addplot[#1] fill between [of=#2 and #3,soft clip={#4}];
+}
+
+\NewDocumentCommand\gensplinecubicpgf{ s m m O{\monspline} }{%
+ %1=liste
+ \setsepchar[.]{§./}%
+ \readlist*\SPLlistepoints{#2}%
+ %les données
+ \def\tmpsplinenumdeb{1}
+ \def\tmpsplinenumfin{\SPLlistepointslen}%
+ \pflextractcoeff{#3}{\tmpsplinenumdeb}%
+ %nb de calculs
+ \def\SPLnbsplines{\inteval{\tmpsplinenumfin-1}}%
+ %extraction des coordonnées
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,1]\xa%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,2]\ya%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,3]\fprimea%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,1]\xb%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,2]\yb%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,3]\fprimeb%
+ \IfBooleanTF{#1}%
+ {%
+ \xdef\tmpcontrolsxa{\xintfloateval{(\xa)+(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsya{\xintfloateval{(\ya)+\fprimea*(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsxb{\xintfloateval{(\xb)-(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsyb{\xintfloateval{(\yb)-\fprimeb*(\xb-\xa)/\COEFFA}}%
+ }%
+ {%
+ \xdef\tmpcontrolsxa{\xintfloateval{(\xa)+cos(atand(\fprimea))*(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsya{\xintfloateval{(\ya)+sin(atand(\fprimea))*(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsxb{\xintfloateval{(\xb)-cos(atand(\fprimeb))*(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsyb{\xintfloateval{(\yb)-sin(atand(\fprimeb))*(\xb-\xa)/\COEFFA}}%
+ }%
+ \xdef#4{(\xa,\ya) ..controls (\tmpcontrolsxa,\tmpcontrolsya) and (\tmpcontrolsxb,\tmpcontrolsyb).. (\xb,\yb)}%
+ \foreach \i in {\tmpsplinenumdeb,...,\SPLnbsplines}{%
+ %extraction des coeffs de compensation
+ \pflextractcoeff{#3}{\i}%
+ \def\j{\inteval{\i+1}}%
+ \itemtomacro\SPLlistepoints[\i,1]\xa%
+ \itemtomacro\SPLlistepoints[\i,2]\ya%
+ \itemtomacro\SPLlistepoints[\i,3]\fprimea%
+ \itemtomacro\SPLlistepoints[\j,1]\xb%
+ \itemtomacro\SPLlistepoints[\j,2]\yb%
+ \itemtomacro\SPLlistepoints[\j,3]\fprimeb%
+ \IfBooleanTF{#1}%
+ {%
+ \xdef\tmpcontrolsxa{\xintfloateval{(\xa)+(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsya{\xintfloateval{(\ya)+\fprimea*(\xb-\xa)/\COEFFA\fprimea*(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsxb{\xintfloateval{(\xb)-(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsyb{\xintfloateval{(\yb)-\fprimeb*(\xb-\xa)/\COEFFA}}%
+ }%
+ {%
+ \xdef\tmpcontrolsxa{\xintfloateval{(\xa)+cos(atand(\fprimea))*(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsya{\xintfloateval{(\ya)+sin(atand(\fprimea))*(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsxb{\xintfloateval{(\xb)-cos(atand(\fprimeb))*(\xb-\xa)/\COEFFA}}%
+ \xdef\tmpcontrolsyb{\xintfloateval{(\yb)-sin(atand(\fprimeb))*(\xb-\xa)/\COEFFA}}%
+ }%
+ \xdef#4{#4 ..controls (\tmpcontrolsxa,\tmpcontrolsya) and (\tmpcontrolsxb,\tmpcontrolsyb).. (\xb,\yb)}%
+ }%
+}
+
+\NewDocumentCommand\addplotspline{ s O{} D<>{3} m O{\monspline} }{%
+ \IfBooleanTF{#1}%
+ {%
+ \gensplinecubicpgf*{#4}{#3}[#5]%
+ }%
+ {%
+ \gensplinecubicpgf{#4}{#3}[#5]%
+ }%
+ \draw[#2] #5 ;
}
\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.pdf b/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.pdf
index 44c8e897ce..14f9e46afe 100644
--- a/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.pdf
+++ b/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.tex b/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.tex
index b0a81f9e6a..95cbe02f11 100644
--- a/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.tex
+++ b/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-en.tex
@@ -21,8 +21,8 @@
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.1}
-\def\TPdate{26/11/2023}
+\def\TPversion{0.1.2}
+\def\TPdate{21/10/2024}
\usepackage{tcolorbox}
\tcbuselibrary{skins,hooks,listingsutf8}
\usepackage{soul}
@@ -135,6 +135,7 @@ Loaded are useful package are :
\begin{quote}
\begin{verbatim}
+0.1.2 : Key [ShortVersion] in order to reduce number of border cells
0.1.1 : Adding two schemes of colors
0.1.0 : Initial version
\end{verbatim}
@@ -160,7 +161,9 @@ All the available keys are presented in the following paragraph, but concerning
%
\BoardTrivialPursuit[Radius=4,BorderHeight=1.25] %beware of the rendering...
-\BoardTrivialPursuit[Unit=0.33] %'optimal' rendering
+\BoardTrivialPursuit[Unit=0.33]
+%
+\BoardTrivialPursuit[Unit=0.33,ShortVersion]
\end{tcblisting}
\pagebreak
@@ -188,7 +191,8 @@ Available \textsf{keys} are :
\item \MontreCode{Blank} := boolean for an empty board, and \MontreCode{false} by default ;
\item \MontreCode{Unit} := to precis an unit (better than a scale !), and \MontreCode{1} by default ;
\item \MontreCode{Thickness} := thickness of the borders, and \MontreCode{0.8pt} by default ;
- \item \MontreCode{Rotation} := possible rotation of the board, and \MontreCode{0} by default.
+ \item \MontreCode{Rotation} := possible rotation of the board, and \MontreCode{0} by default ;
+ \item \MontreCode{ShortVersion} := use 5 cells instead 6 between 'big cells', and \MontreCode{false} by default.
\end{itemize}
\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
diff --git a/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.pdf b/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.pdf
index 2b6b766846..16dcd58e8b 100644
--- a/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.pdf
+++ b/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.tex b/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.tex
index ff50c6a07d..d93190d0e0 100644
--- a/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.tex
+++ b/graphics/pgf/contrib/trivialpursuit/doc/TrivialPursuit-doc-fr.tex
@@ -21,8 +21,8 @@
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.1}
-\def\TPdate{26 novembre 2023}
+\def\TPversion{0.1.2}
+\def\TPdate{21 octobre 2024}
\usepackage{tcolorbox}
\tcbuselibrary{skins,hooks,listingsutf8}
\usepackage{soul}
@@ -135,6 +135,7 @@ Les packages chargés et utilisés par \MontreCode{TrivialPursuit} sont :
\begin{quote}
\begin{verbatim}
+0.1.2 : Ajout d'une clé [VersionCourte] pour diminuer le nombre de cases
0.1.1 : Ajout de palettes de couleurs prédéfinies
0.1.0 : Version initiale
\end{verbatim}
@@ -160,7 +161,9 @@ Toutes les clés disponibles sont présentées dans le paragraphe suivant, mais
%
\PlateauTrivialPursuit[Rayon=4,HauteurCases=1.25] %attention au rendu...
-\PlateauTrivialPursuit[Unite=0.33] %le rendu est 'optimal'
+\PlateauTrivialPursuit[Unite=0.33]
+%
+\PlateauTrivialPursuit[Unite=0.33,VersionCourte]
\end{tcblisting}
\pagebreak
@@ -188,7 +191,8 @@ Les \textsf{clés} disponibles sont :
\item \MontreCode{Vide} := booléen pour afficher le plateau vide, et valant \MontreCode{false} par défaut ;
\item \MontreCode{Unite} := pour préciser l'unité (et gérer un facteur d'échelle), et valant \MontreCode{1} par défaut ;
\item \MontreCode{Epaisseur} := épaisseur des tracés, et valant \MontreCode{0.8pt} par défaut ;
- \item \MontreCode{Rotation} := rotation éventuelle du plateau, et valant \MontreCode{0} par défaut.
+ \item \MontreCode{Rotation} := rotation éventuelle du plateau, et valant \MontreCode{0} par défaut ;
+ \item \MontreCode{VersionCourte} := utiliser 5 cases au lieu de 6 entre les camemberts, et valant \MontreCode{false} par défaut.
\end{itemize}
\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
diff --git a/graphics/pgf/contrib/trivialpursuit/tex/TrivialPursuit.sty b/graphics/pgf/contrib/trivialpursuit/tex/TrivialPursuit.sty
index d8b8411130..9bc0185a91 100644
--- a/graphics/pgf/contrib/trivialpursuit/tex/TrivialPursuit.sty
+++ b/graphics/pgf/contrib/trivialpursuit/tex/TrivialPursuit.sty
@@ -4,7 +4,8 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{TrivialPursuit}[2023/11/26 0.1.1 Present a Trivial Pursuit Board]
+\ProvidesPackage{TrivialPursuit}[2024/10/21 0.1.2 Present a Trivial Pursuit Board]
+% 0.1.2 'Short' version
% 0.1.1 Adding schemes of colors
% 0.1.0 Initial version
@@ -62,7 +63,8 @@
Epaisseur=0.8pt,%
Rotation=0,%
Jokers=true,%
- IconeJoker={\faDice}
+ IconeJoker={\faDice},%
+ VersionCourte=false
}
%====INTERN COMMANDS
@@ -113,17 +115,17 @@
\ifboolKV[TrivPurs]{Couleurs}%
{%
%Couleur du 1er camembert
- \filldraw[{\triv@purs@lstcol[1]}] (PB-47)--(GB-47) arc ({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-1) arc ({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-47)--(GB-47) arc ({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-1) arc ({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 2ème
- \filldraw[{\triv@purs@lstcol[2]}] (PB-7)--(GB-7) arc ({7*\triv@purs@anglecases}:{9*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-9) arc ({9*\triv@purs@anglecases}:{7*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-7)--(GB-7) arc ({7*\triv@purs@anglecases}:{9*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-9) arc ({9*\triv@purs@anglecases}:{7*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 3ème
- \filldraw[{\triv@purs@lstcol[3]}] (PB-15)--(GB-15) arc ({15*\triv@purs@anglecases}:{17*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-17) arc ({17*\triv@purs@anglecases}:{15*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-15)--(GB-15) arc ({15*\triv@purs@anglecases}:{17*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-17) arc ({17*\triv@purs@anglecases}:{15*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 4ème
- \filldraw[{\triv@purs@lstcol[4]}] (PB-23)--(GB-23) arc ({23*\triv@purs@anglecases}:{25*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-25) arc ({25*\triv@purs@anglecases}:{23*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-23)--(GB-23) arc ({23*\triv@purs@anglecases}:{25*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-25) arc ({25*\triv@purs@anglecases}:{23*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 5ème
- \filldraw[{\triv@purs@lstcol[5]}] (PB-31)--(GB-31) arc ({31*\triv@purs@anglecases}:{33*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-33) arc ({33*\triv@purs@anglecases}:{31*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-31)--(GB-31) arc ({31*\triv@purs@anglecases}:{33*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-33) arc ({33*\triv@purs@anglecases}:{31*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 6ème
- \filldraw[{\triv@purs@lstcol[6]}] (PB-39)--(GB-39) arc ({39*\triv@purs@anglecases}:{41*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-41) arc ({41*\triv@purs@anglecases}:{39*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-39)--(GB-39) arc ({39*\triv@purs@anglecases}:{41*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-41) arc ({41*\triv@purs@anglecases}:{39*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
}%
{}%
%si on affiche les icones
@@ -141,7 +143,7 @@
\NewDocumentCommand\RemplirCaseTrivial{ m m m }{%deb + fin + numcouleur
\ifboolKV[TrivPurs]{Couleurs}%
{%
- \filldraw[{\triv@purs@lstcol[#3]}] (PB-#1)--(GB-#1) arc ({#1*\triv@purs@anglecases}:{#2*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-#2) arc ({#2*\triv@purs@anglecases}:{#1*\triv@purs@anglecases}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (PB-#1)--(GB-#1) arc ({#1*\triv@purs@anglecases}:{#2*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-#2) arc ({#2*\triv@purs@anglecases}:{#1*\triv@purs@anglecases}:{\triv@purs@rayonint});
}%
{}%
\ifboolKV[TrivPurs]{Icones}%
@@ -160,7 +162,7 @@
\xdef\tmpcaseap{\xinteval{#2+1}}%
\xintifboolexpr{#2 > 1 'and' #2 < 5}%
{%
- \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(D-#1-#2)--(C-#1-#2)--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(D-#1-#2)--(C-#1-#2)--cycle ;
}%
{}%
\xintifboolexpr{#2 == 5}%
@@ -178,12 +180,12 @@
{%
\xintifboolexpr{#1 == 1}%
{%
- \filldraw[{\triv@purs@lstcol[#3]}] (C-1-1)--(PB-\triv@purs@numcasavant) arc({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-1-1)--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (C-1-1)--(PB-\triv@purs@numcasavant) arc({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-1-1)--cycle ;
}%
{%
\xdef\tmp@ii{\xinteval{(-1+8*(#1-1))}}%
\xdef\tmp@jj{\xinteval{(\tmp@ii+2)}}%
- \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-1)--(PB-\tmp@ii) arc({\tmp@ii*\triv@purs@anglecases}:{\tmp@jj*\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-#1-1)--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (C-#1-1)--(PB-\tmp@ii) arc({\tmp@ii*\triv@purs@anglecases}:{\tmp@jj*\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-#1-1)--cycle ;
}%
}%
{}%
@@ -398,6 +400,361 @@
\end{scope}
}
+%courte
+\NewDocumentCommand\CreationNoeudsTrivialCourt{}{%OK !!!!!!!!!!!!!!
+ %création des nœuds grand bord petit bord GB-i (et PB-i)
+ \coordinate (GB-1) at ({7.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-1) at ({7.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-2) at ({7.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-2) at ({7.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-3) at ({7.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-3) at ({7.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-4) at ({7.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-4) at ({7.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-5) at ({7.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-5) at ({7.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-6) at ({7.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-6) at ({7.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-7) at ({67.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-7) at ({67.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-8) at ({67.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-8) at ({67.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-9) at ({67.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-9) at ({67.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-10) at ({67.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-10) at ({67.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-11) at ({67.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-11) at ({67.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-12) at ({67.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-12) at ({67.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-13) at ({127.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-13) at ({127.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-14) at ({127.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-14) at ({127.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-15) at ({127.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-15) at ({127.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-16) at ({127.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-16) at ({127.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-17) at ({127.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-17) at ({127.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-18) at ({127.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-18) at ({127.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-19) at ({187.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-19) at ({187.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-20) at ({187.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-20) at ({187.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-21) at ({187.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-21) at ({187.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-22) at ({187.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-22) at ({187.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-23) at ({187.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-23) at ({187.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-24) at ({187.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-24) at ({187.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-25) at ({247.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-25) at ({247.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-26) at ({247.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-26) at ({247.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-27) at ({247.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-27) at ({247.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-28) at ({247.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-28) at ({247.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-29) at ({247.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-29) at ({247.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-30) at ({247.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-30) at ({247.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-31) at ({307.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-31) at ({307.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-32) at ({307.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-32) at ({307.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-33) at ({307.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-33) at ({307.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-34) at ({307.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-34) at ({307.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-35) at ({307.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-35) at ({307.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-36) at ({307.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-36) at ({307.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ %tests ?!?!
+% \foreach \i in {1,...,36}{%OK
+% \filldraw[teal] (GB-\i) circle[radius=1.75pt] node[font=\tiny\ttfamily] {GB-\i};
+% \filldraw[purple] (PB-\i) circle[radius=1.75pt] node[font=\tiny\ttfamily] {PB-\i};
+% }
+ %création des nœuds pour la figure centrale, boucle pour les 1ers + le dernier
+ \foreach \i in {1,...,\triv@purs@nbcat}{%
+ \coordinate (OM-\i) at ({30+(\i-1)*60}:{\triv@purs@rayonhexag}) ;
+ %\filldraw[orange] (OM-\i) circle[radius=1.75pt] node[font=\tiny\ttfamily] {OM-\i};
+ }%
+ %les nœuds des cases verticales
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-1-\j) at ($(PB-1)!\tmp@coeff!(OM-1)$) ;
+ %\filldraw[yellow] (D-1-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-1-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-2-\j) at ($(PB-6)!\tmp@coeff!(OM-1)$) ;
+ %\filldraw[yellow] (D-2-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-2-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-3-\j) at ($(PB-7)!\tmp@coeff!(OM-2)$) ;
+ %\filldraw[yellow] (D-3-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-3-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-4-\j) at ($(PB-12)!\tmp@coeff!(OM-2)$) ;
+ %\filldraw[yellow] (D-4-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-4-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-5-\j) at ($(PB-13)!\tmp@coeff!(OM-3)$) ;
+ %\filldraw[yellow] (D-5-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-5-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-6-\j) at ($(PB-18)!\tmp@coeff!(OM-3)$) ;
+ %\filldraw[yellow] (D-6-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-5-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-7-\j) at ($(PB-19)!\tmp@coeff!(OM-4)$) ;
+ %\filldraw[yellow] (D-7-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-7-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-8-\j) at ($(PB-24)!\tmp@coeff!(OM-4)$) ;
+ %\filldraw[yellow] (D-8-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-8-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-9-\j) at ($(PB-25)!\tmp@coeff!(OM-5)$) ;
+ %\filldraw[yellow] (D-9-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-9-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-10-\j) at ($(PB-30)!\tmp@coeff!(OM-5)$) ;
+ %\filldraw[yellow] (D-10-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-10-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-11-\j) at ($(PB-31)!\tmp@coeff!(OM-6)$) ;
+ %\filldraw[yellow] (D-11-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-11-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-12-\j) at ($(PB-36)!\tmp@coeff!(OM-6)$) ;
+ %\filldraw[yellow] (D-12-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-12-\j};
+ }%
+}
+
+\NewDocumentCommand\RemplirCasesTourCourt{}{%
+ %-------Vertical
+ %niveau 1 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (OM-6)--(OM-1)--(D-1-4)--(D-12-4)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-6)!0.5!(D-1-4)$) {\triv@purs@lsticons[2]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (D-12-4)--(D-1-4)--(D-1-3)--(D-12-3)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-12-4)!0.5!(D-1-3)$) {\triv@purs@lsticons[6]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (D-12-3)--(D-1-3)--(D-1-2)--(D-12-2)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-12-3)!0.5!(D-1-2)$) {\triv@purs@lsticons[5]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (D-12-2)--(D-1-2)--(D-1-1)--(D-12-1)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-12-2)!0.5!(D-1-1)$) {\triv@purs@lsticons[3]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (D-1-1)--(PB-1) arc({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-12-1)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-12-1)!0.5!(PB-1)$) {\triv@purs@lsticons[4]} ;
+ %niveau 2 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (OM-1)--(OM-2)--(D-3-4)--(D-2-4)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-1)!0.5!(D-3-4)$) {\triv@purs@lsticons[3]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (D-2-4)--(D-3-4)--(D-3-3)--(D-2-3)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-2-4)!0.5!(D-3-3)$) {\triv@purs@lsticons[1]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (D-2-3)--(D-3-3)--(D-3-2)--(D-2-2)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-2-3)!0.5!(D-3-2)$) {\triv@purs@lsticons[6]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (D-2-2)--(D-3-2)--(D-3-1)--(D-2-1)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-2-2)!0.5!(D-3-1)$) {\triv@purs@lsticons[4]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (D-3-1)--(PB-7) arc({67.5}:{52.5}:{\triv@purs@rayonint}) --(D-2-1)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-2-1)!0.5!(PB-7)$) {\triv@purs@lsticons[5]} ;
+ %niveau 3 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (OM-2)--(OM-3)--(D-5-4)--(D-4-4)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-2)!0.5!(D-5-4)$) {\triv@purs@lsticons[4]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (D-4-4)--(D-5-4)--(D-5-3)--(D-4-3)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-4-4)!0.5!(D-5-3)$) {\triv@purs@lsticons[2]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (D-4-3)--(D-5-3)--(D-5-2)--(D-4-2)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-4-3)!0.5!(D-5-2)$) {\triv@purs@lsticons[1]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (D-4-2)--(D-5-2)--(D-5-1)--(D-4-1)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-4-2)!0.5!(D-5-1)$) {\triv@purs@lsticons[5]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (D-5-1)--(PB-13) arc({127.5}:{112.5}:{\triv@purs@rayonint}) --(D-4-1)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-4-1)!0.5!(PB-13)$) {\triv@purs@lsticons[6]} ;
+ %niveau 4 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (OM-3)--(OM-4)--(D-7-4)--(D-6-4)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-3)!0.5!(D-7-4)$) {\triv@purs@lsticons[5]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (D-6-4)--(D-7-4)--(D-7-3)--(D-6-3)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-6-4)!0.5!(D-7-3)$) {\triv@purs@lsticons[3]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (D-6-3)--(D-7-3)--(D-7-2)--(D-6-2)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-6-3)!0.5!(D-7-2)$) {\triv@purs@lsticons[2]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (D-6-2)--(D-7-2)--(D-7-1)--(D-6-1)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-6-2)!0.5!(D-7-1)$) {\triv@purs@lsticons[6]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (D-7-1)--(PB-19) arc({187.5}:{172.5}:{\triv@purs@rayonint}) --(D-6-1)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-6-1)!0.5!(PB-19)$) {\triv@purs@lsticons[1]} ;
+ %niveau 5 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (OM-4)--(OM-5)--(D-9-4)--(D-8-4)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-4)!0.5!(D-9-4)$) {\triv@purs@lsticons[6]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (D-8-4)--(D-9-4)--(D-9-3)--(D-8-3)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-8-4)!0.5!(D-9-3)$) {\triv@purs@lsticons[4]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (D-8-3)--(D-9-3)--(D-9-2)--(D-8-2)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-8-3)!0.5!(D-9-2)$) {\triv@purs@lsticons[3]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (D-8-2)--(D-9-2)--(D-9-1)--(D-8-1)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-8-2)!0.5!(D-9-1)$) {\triv@purs@lsticons[1]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (D-9-1)--(PB-25) arc({247.5}:{232.5}:{\triv@purs@rayonint}) --(D-8-1)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-8-1)!0.5!(PB-25)$) {\triv@purs@lsticons[2]} ;
+ %niveau 6 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (OM-5)--(OM-6)--(D-11-4)--(D-10-4)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-5)!0.5!(D-11-4)$) {\triv@purs@lsticons[1]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (D-10-4)--(D-11-4)--(D-11-3)--(D-10-3)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-10-4)!0.5!(D-11-3)$) {\triv@purs@lsticons[5]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (D-10-3)--(D-11-3)--(D-11-2)--(D-10-2)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-10-3)!0.5!(D-11-2)$) {\triv@purs@lsticons[4]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (D-10-2)--(D-11-2)--(D-11-1)--(D-10-1)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-10-2)!0.5!(D-11-1)$) {\triv@purs@lsticons[2]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (D-11-1)--(PB-31) arc({307.5}:{292.5}:{\triv@purs@rayonint}) --(D-10-1)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-10-1)!0.5!(PB-31)$) {\triv@purs@lsticons[3]} ;
+ %--------BORDS !!!
+ \ifboolKV[TrivPurs]{Couleurs}%
+ {%
+ %Secteur1
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-1)--(GB-1) arc ({7.5+0*9}:{7.5+1*9}:{\triv@purs@rayon})--(PB-2) arc ({7.5+1*9}:{7.5+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-2)--(GB-2) arc ({7.5+1*9}:{7.5+2*9}:{\triv@purs@rayon})--(PB-3) arc ({7.5+2*9}:{7.5+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-4)--(GB-4) arc ({7.5+3*9}:{7.5+4*9}:{\triv@purs@rayon})--(PB-5) arc ({7.5+4*9}:{7.5+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-5)--(GB-5) arc ({7.5+4*9}:{7.5+5*9}:{\triv@purs@rayon})--(PB-6) arc ({7.5+5*9}:{7.5+4*9}:{\triv@purs@rayonint});
+ %Secteur2
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-7)--(GB-7) arc ({7.5+60+0*9}:{7.5+60+1*9}:{\triv@purs@rayon})--(PB-8) arc ({7.5+60+1*9}:{7.5+60+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-8)--(GB-8) arc ({7.5+60+1*9}:{7.5+60+2*9}:{\triv@purs@rayon})--(PB-9) arc ({7.5+60+2*9}:{7.5+60+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-10)--(GB-10) arc ({7.5+60+3*9}:{7.5+60+4*9}:{\triv@purs@rayon})--(PB-11) arc ({7.5+60+4*9}:{7.5+60+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-11)--(GB-11) arc ({7.5+60+4*9}:{7.5+60+5*9}:{\triv@purs@rayon})--(PB-12) arc ({7.5+60+5*9}:{7.5+60+4*9}:{\triv@purs@rayonint});
+ %Secteur3
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-13)--(GB-13) arc ({7.5+120+0*9}:{7.5+120+1*9}:{\triv@purs@rayon})--(PB-14) arc ({7.5+120+1*9}:{7.5+120+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-14)--(GB-14) arc ({7.5+120+1*9}:{7.5+120+2*9}:{\triv@purs@rayon})--(PB-15) arc ({7.5+120+2*9}:{7.5+120+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-16)--(GB-16) arc ({7.5+120+3*9}:{7.5+120+4*9}:{\triv@purs@rayon})--(PB-17) arc ({7.5+120+4*9}:{7.5+120+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-17)--(GB-17) arc ({7.5+120+4*9}:{7.5+120+5*9}:{\triv@purs@rayon})--(PB-18) arc ({7.5+120+5*9}:{7.5+120+4*9}:{\triv@purs@rayonint});
+ %Secteur4
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-19)--(GB-19) arc ({7.5+180+0*9}:{7.5+180+1*9}:{\triv@purs@rayon})--(PB-20) arc ({7.5+180+1*9}:{7.5+180+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-20)--(GB-20) arc ({7.5+180+1*9}:{7.5+180+2*9}:{\triv@purs@rayon})--(PB-21) arc ({7.5+180+2*9}:{7.5+180+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-22)--(GB-22) arc ({7.5+180+3*9}:{7.5+180+4*9}:{\triv@purs@rayon})--(PB-23) arc ({7.5+180+4*9}:{7.5+180+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-23)--(GB-23) arc ({7.5+180+4*9}:{7.5+180+5*9}:{\triv@purs@rayon})--(PB-24) arc ({7.5+180+5*9}:{7.5+180+4*9}:{\triv@purs@rayonint});
+ %Secteur5
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-25)--(GB-25) arc ({7.5+240+0*9}:{7.5+240+1*9}:{\triv@purs@rayon})--(PB-26) arc ({7.5+240+1*9}:{7.5+240+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-26)--(GB-26) arc ({7.5+240+1*9}:{7.5+240+2*9}:{\triv@purs@rayon})--(PB-27) arc ({7.5+240+2*9}:{7.5+240+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-28)--(GB-28) arc ({7.5+240+3*9}:{7.5+240+4*9}:{\triv@purs@rayon})--(PB-29) arc ({7.5+240+4*9}:{7.5+240+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-29)--(GB-29) arc ({7.5+240+4*9}:{7.5+240+5*9}:{\triv@purs@rayon})--(PB-30) arc ({7.5+240+5*9}:{7.5+240+4*9}:{\triv@purs@rayonint});
+ %Secteur6
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-31)--(GB-31) arc ({7.5+300+0*9}:{7.5+300+1*9}:{\triv@purs@rayon})--(PB-32) arc ({7.5+300+1*9}:{7.5+300+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-32)--(GB-32) arc ({7.5+300+1*9}:{7.5+300+2*9}:{\triv@purs@rayon})--(PB-33) arc ({7.5+300+2*9}:{7.5+300+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-34)--(GB-34) arc ({7.5+300+3*9}:{7.5+300+4*9}:{\triv@purs@rayon})--(PB-35) arc ({7.5+300+4*9}:{7.5+300+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-35)--(GB-35) arc ({7.5+300+4*9}:{7.5+300+5*9}:{\triv@purs@rayon})--(PB-36) arc ({7.5+300+5*9}:{7.5+300+4*9}:{\triv@purs@rayonint});
+ }%
+ {}%
+ \ifboolKV[TrivPurs]{Icones}%
+ {%
+ %secteur1
+ \node[rotate={90+0.5*(7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ \node[rotate={90+0.5*(7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ \node[rotate={90+0.5*(7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ \node[rotate={90+0.5*(7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ %secteur2
+ \node[rotate={90+0.5*(2*60+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*60+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ \node[rotate={90+0.5*(2*60+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*60+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ \node[rotate={90+0.5*(2*60+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*60+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ \node[rotate={90+0.5*(2*60+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*60+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ %secteur3
+ \node[rotate={90+0.5*(2*120+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*120+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ \node[rotate={90+0.5*(2*120+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*120+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ \node[rotate={90+0.5*(2*120+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*120+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ \node[rotate={90+0.5*(2*120+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*120+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ %secteur4
+ \node[rotate={90+0.5*(2*180+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*180+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ \node[rotate={90+0.5*(2*180+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*180+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ \node[rotate={90+0.5*(2*180+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*180+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ \node[rotate={90+0.5*(2*180+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*180+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ %secteur5
+ \node[rotate={90+0.5*(2*240+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*240+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ \node[rotate={90+0.5*(2*240+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*240+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ \node[rotate={90+0.5*(2*240+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*240+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ \node[rotate={90+0.5*(2*240+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*240+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ %secteur6
+ \node[rotate={90+0.5*(2*300+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*300+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ \node[rotate={90+0.5*(2*300+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*300+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ \node[rotate={90+0.5*(2*300+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*300+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ \node[rotate={90+0.5*(2*300+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*300+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ }%
+ {}%
+
+ %les jokers
+ \ifboolKV[TrivPurs]{Icones}%
+ {%
+ \ifboolKV[TrivPurs]{Jokers}%
+ {%
+ \node[rotate=30,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({30}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=90,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({90}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=150,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({150}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=210,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({210}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=270,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({270}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=330,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({330}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ }%
+ {}%
+ }%
+ {}%
+}
+\NewDocumentCommand\TraceBorduresTrivialCourt{ }{%OK Court
+ %les tracés des cases
+ \draw[EpTraits] (0,0) circle[radius=\triv@purs@rayon] ;
+ \draw[EpTraits] (0,0) circle[radius={\triv@purs@rayon-\triv@purs@hautcases}] ;
+ \foreach \i in {1,...,36}{%
+ \draw[EpTraits] (PB-\i)--(GB-\i) ;
+ }
+ \draw[EpTraits] (PB-1)--(OM-1)--(OM-6)--(PB-36) ;
+ \draw[EpTraits] (PB-6)--(OM-1)--(OM-2)--(PB-7) ;
+ \draw[EpTraits] (PB-12)--(OM-2)--(OM-3)--(PB-13) ;
+ \draw[EpTraits] (PB-18)--(OM-3)--(OM-4)--(PB-19) ;
+ \draw[EpTraits] (PB-24)--(OM-4)--(OM-5)--(PB-25) ;
+ \draw[EpTraits] (PB-30)--(OM-5)--(OM-6)--(PB-31) ;
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \draw[EpTraits] (D-2-\j)--(D-3-\j) ;
+ \draw[EpTraits] (D-4-\j)--(D-5-\j) ;
+ \draw[EpTraits] (D-6-\j)--(D-7-\j) ;
+ \draw[EpTraits] (D-8-\j)--(D-9-\j) ;
+ \draw[EpTraits] (D-10-\j)--(D-11-\j) ;
+ \draw[EpTraits] (D-12-\j)--(D-1-\j) ;
+ }%
+}
+
+\NewDocumentCommand\RemplirCamembertsTrivialCourt{ }{%numéro des camemberts, en partant de la droite
+ \ifboolKV[TrivPurs]{Couleurs}%
+ {%
+ %Couleur du 1er camembert
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-36)--(GB-36) arc ({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-1) arc ({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 2ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-6)--(GB-6) arc ({7*\triv@purs@anglecases}:{9*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-7) arc ({9*\triv@purs@anglecases}:{7*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 3ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-12)--(GB-12) arc ({15*\triv@purs@anglecases}:{17*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-13) arc ({17*\triv@purs@anglecases}:{15*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 4ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-18)--(GB-18) arc ({23*\triv@purs@anglecases}:{25*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-19) arc ({25*\triv@purs@anglecases}:{23*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 5ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-24)--(GB-24) arc ({31*\triv@purs@anglecases}:{33*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-25) arc ({33*\triv@purs@anglecases}:{31*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 6ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-30)--(GB-30) arc ({39*\triv@purs@anglecases}:{41*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-31) arc ({41*\triv@purs@anglecases}:{39*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ }%
+ {}%
+ %si on affiche les icones
+ \ifboolKV[TrivPurs]{Icones}%
+ {%
+ \node[rotate={90+0*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ \node[rotate={90+8*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({8*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ \node[rotate={90+16*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({16*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ \node[rotate={90+24*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({24*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ \node[rotate={90+32*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({32*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ \node[rotate={90+40*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({40*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ }%
+ {}%
+}
+
%====CREATION
\NewDocumentCommand\PlateauTrivialPursuit{ O{} D<>{} }{%
\restoreKV[TrivPurs]% revenir au valeurs par défaut
@@ -433,18 +790,35 @@
\useasboundingbox (0,0) circle[radius={\triv@purs@rayon}] ;
%création
\begin{scope}[rotate=\triv@purs@rotate]
- %les nœuds OK
- \CreationNoeudsTrivial
- %test avec centre OK
- \ifboolKV[TrivPurs]{Centre}{\RemplirCentreTrivial}{}
- %camemberts OK
- \RemplirCamembertsTrivial
- %cases OK
- \RemplirCasesTour
- %bordures
- \TraceBorduresTrivial
- %logo central
- \ifboolKV[TrivPurs]{Logo}{\LogoTrivialPursuit}{}
+ \ifboolKV[TrivPurs]{VersionCourte}%
+ {%
+ %les nœuds OK
+ \CreationNoeudsTrivialCourt
+ %test avec centre OK
+ \ifboolKV[TrivPurs]{Centre}{\RemplirCentreTrivial}{}
+ %camemberts OK
+ \RemplirCamembertsTrivialCourt
+ %cases OK
+ \RemplirCasesTourCourt
+ %bordures
+ \TraceBorduresTrivialCourt
+ %logo central
+ \ifboolKV[TrivPurs]{Logo}{\LogoTrivialPursuit}{}
+ }%
+ {%
+ %les nœuds OK
+ \CreationNoeudsTrivial
+ %test avec centre OK
+ \ifboolKV[TrivPurs]{Centre}{\RemplirCentreTrivial}{}
+ %camemberts OK
+ \RemplirCamembertsTrivial
+ %cases OK
+ \RemplirCasesTour
+ %bordures
+ \TraceBorduresTrivial
+ %logo central
+ \ifboolKV[TrivPurs]{Logo}{\LogoTrivialPursuit}{}
+ }%
\end{scope}
\end{tikzpicture}%
}
@@ -477,7 +851,8 @@
Thickness=0.8pt,%
Rotation=0,%
Jokers=true,%
- IconJoker={\faDice}
+ IconJoker={\faDice},%
+ ShortVersion=false
}
%====INTERN COMMANDS
@@ -528,17 +903,17 @@
\ifboolKV[TrivPursEN]{Colors}%
{%
%Couleur du 1er camembert
- \filldraw[{\triv@purs@lstcol[1]}] (PB-47)--(GB-47) arc ({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-1) arc ({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-47)--(GB-47) arc ({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-1) arc ({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 2ème
- \filldraw[{\triv@purs@lstcol[2]}] (PB-7)--(GB-7) arc ({7*\triv@purs@anglecases}:{9*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-9) arc ({9*\triv@purs@anglecases}:{7*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-7)--(GB-7) arc ({7*\triv@purs@anglecases}:{9*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-9) arc ({9*\triv@purs@anglecases}:{7*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 3ème
- \filldraw[{\triv@purs@lstcol[3]}] (PB-15)--(GB-15) arc ({15*\triv@purs@anglecases}:{17*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-17) arc ({17*\triv@purs@anglecases}:{15*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-15)--(GB-15) arc ({15*\triv@purs@anglecases}:{17*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-17) arc ({17*\triv@purs@anglecases}:{15*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 4ème
- \filldraw[{\triv@purs@lstcol[4]}] (PB-23)--(GB-23) arc ({23*\triv@purs@anglecases}:{25*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-25) arc ({25*\triv@purs@anglecases}:{23*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-23)--(GB-23) arc ({23*\triv@purs@anglecases}:{25*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-25) arc ({25*\triv@purs@anglecases}:{23*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 5ème
- \filldraw[{\triv@purs@lstcol[5]}] (PB-31)--(GB-31) arc ({31*\triv@purs@anglecases}:{33*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-33) arc ({33*\triv@purs@anglecases}:{31*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-31)--(GB-31) arc ({31*\triv@purs@anglecases}:{33*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-33) arc ({33*\triv@purs@anglecases}:{31*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
%Couleur du 6ème
- \filldraw[{\triv@purs@lstcol[6]}] (PB-39)--(GB-39) arc ({39*\triv@purs@anglecases}:{41*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-41) arc ({41*\triv@purs@anglecases}:{39*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-39)--(GB-39) arc ({39*\triv@purs@anglecases}:{41*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-41) arc ({41*\triv@purs@anglecases}:{39*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
}%
{}%
%si on affiche les icones
@@ -556,7 +931,7 @@
\NewDocumentCommand\FillCellTrivial{ m m m }{%deb + fin + numcouleur
\ifboolKV[TrivPursEN]{Colors}%
{%
- \filldraw[{\triv@purs@lstcol[#3]}] (PB-#1)--(GB-#1) arc ({#1*\triv@purs@anglecases}:{#2*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-#2) arc ({#2*\triv@purs@anglecases}:{#1*\triv@purs@anglecases}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (PB-#1)--(GB-#1) arc ({#1*\triv@purs@anglecases}:{#2*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-#2) arc ({#2*\triv@purs@anglecases}:{#1*\triv@purs@anglecases}:{\triv@purs@rayonint});
}%
{}%
\ifboolKV[TrivPursEN]{Icons}%
@@ -575,17 +950,17 @@
\xdef\tmpcaseap{\xinteval{#2+1}}%
\xintifboolexpr{#2 > 1 'and' #2 < 5}%
{%
- \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(D-#1-#2)--(C-#1-#2)--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(D-#1-#2)--(C-#1-#2)--cycle ;
}%
{}%
\xintifboolexpr{#2 == 5}%
{%
\xintifboolexpr{#1 == 1}%
{%
- \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(OM-#1)--(OM-6)--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(OM-#1)--(OM-6)--cycle ;
}%
{%
- \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(OM-#1)--(OM-\tmpnivav)--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(OM-#1)--(OM-\tmpnivav)--cycle ;
}%
}%
{}%
@@ -593,12 +968,12 @@
{%
\xintifboolexpr{#1 == 1}%
{%
- \filldraw[{\triv@purs@lstcol[#3]}] (C-1-1)--(PB-\triv@purs@numcasavant) arc({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-1-1)--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (C-1-1)--(PB-\triv@purs@numcasavant) arc({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-1-1)--cycle ;
}%
{%
\xdef\tmp@ii{\xinteval{(-1+8*(#1-1))}}%
\xdef\tmp@jj{\xinteval{(\tmp@ii+2)}}%
- \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-1)--(PB-\tmp@ii) arc({\tmp@ii*\triv@purs@anglecases}:{\tmp@jj*\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-#1-1)--cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[#3]}] (C-#1-1)--(PB-\tmp@ii) arc({\tmp@ii*\triv@purs@anglecases}:{\tmp@jj*\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-#1-1)--cycle ;
}%
}%
{}%
@@ -766,7 +1141,7 @@
\begin{scope}[shift={(0:{0.15*\triv@purs@lgcamemb})}]
\ifboolKV[TrivPursEN]{Colors}%
{%
- \filldraw[{\triv@purs@lstcol[1]}] (0,0)--({-30}:{0.765*\triv@purs@lgcamemb}) arc (-30:30:{0.765*\triv@purs@lgcamemb}) -- cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (0,0)--({-30}:{0.765*\triv@purs@lgcamemb}) arc (-30:30:{0.765*\triv@purs@lgcamemb}) -- cycle ;
}%
{}%
\draw[EpTraitsPlus] (0,0)--({-30}:{0.765*\triv@purs@lgcamemb}) arc (-30:30:{0.765*\triv@purs@lgcamemb}) -- cycle ;
@@ -774,7 +1149,7 @@
\begin{scope}[shift={(60:{0.15*\triv@purs@lgcamemb})}]
\ifboolKV[TrivPursEN]{Colors}%
{%
- \filldraw[{\triv@purs@lstcol[2]}] (0,0)--({30}:{0.765*\triv@purs@lgcamemb}) arc (30:90:{0.765*\triv@purs@lgcamemb}) -- cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (0,0)--({30}:{0.765*\triv@purs@lgcamemb}) arc (30:90:{0.765*\triv@purs@lgcamemb}) -- cycle ;
}%
{}%
\draw[EpTraitsPlus] (0,0)--({30}:{0.765*\triv@purs@lgcamemb}) arc (30:90:{0.765*\triv@purs@lgcamemb}) -- cycle ;
@@ -782,7 +1157,7 @@
\begin{scope}[shift={(120:{0.15*\triv@purs@lgcamemb})}]
\ifboolKV[TrivPursEN]{Colors}%
{%
- \filldraw[{\triv@purs@lstcol[3]}] (0,0)--({90}:{0.765*\triv@purs@lgcamemb}) arc (90:150:{0.765*\triv@purs@lgcamemb}) -- cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (0,0)--({90}:{0.765*\triv@purs@lgcamemb}) arc (90:150:{0.765*\triv@purs@lgcamemb}) -- cycle ;
}%
{}%
\draw[EpTraitsPlus] (0,0)--({90}:{0.765*\triv@purs@lgcamemb}) arc (90:150:{0.765*\triv@purs@lgcamemb}) -- cycle ;
@@ -790,7 +1165,7 @@
\begin{scope}[shift={(180:{0.15*\triv@purs@lgcamemb})}]
\ifboolKV[TrivPursEN]{Colors}%
{%
- \filldraw[{\triv@purs@lstcol[4]}] (0,0)--({150}:{0.765*\triv@purs@lgcamemb}) arc (150:210:{0.765*\triv@purs@lgcamemb}) -- cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (0,0)--({150}:{0.765*\triv@purs@lgcamemb}) arc (150:210:{0.765*\triv@purs@lgcamemb}) -- cycle ;
}%
{}%
\draw[EpTraitsPlus] (0,0)--({150}:{0.765*\triv@purs@lgcamemb}) arc (150:210:{0.765*\triv@purs@lgcamemb}) -- cycle ;
@@ -798,7 +1173,7 @@
\begin{scope}[shift={(240:{0.15*\triv@purs@lgcamemb})}]
\ifboolKV[TrivPursEN]{Colors}%
{%
- \filldraw[{\triv@purs@lstcol[5]}] (0,0)--({210}:{0.765*\triv@purs@lgcamemb}) arc (210:270:{0.765*\triv@purs@lgcamemb}) -- cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (0,0)--({210}:{0.765*\triv@purs@lgcamemb}) arc (210:270:{0.765*\triv@purs@lgcamemb}) -- cycle ;
}%
{}%
\draw[EpTraitsPlus] (0,0)--({210}:{0.765*\triv@purs@lgcamemb}) arc (210:270:{0.765*\triv@purs@lgcamemb}) -- cycle ;
@@ -806,13 +1181,368 @@
\begin{scope}[shift={(300:{0.15*\triv@purs@lgcamemb})}]
\ifboolKV[TrivPursEN]{Colors}%
{%
- \filldraw[{\triv@purs@lstcol[6]}] (0,0)--({270}:{0.765*\triv@purs@lgcamemb}) arc (270:330:{0.765*\triv@purs@lgcamemb}) -- cycle ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (0,0)--({270}:{0.765*\triv@purs@lgcamemb}) arc (270:330:{0.765*\triv@purs@lgcamemb}) -- cycle ;
}%
{}%
\draw[EpTraitsPlus] (0,0)--({270}:{0.765*\triv@purs@lgcamemb}) arc (270:330:{0.765*\triv@purs@lgcamemb}) -- cycle ;
\end{scope}
}
+%courte
+\NewDocumentCommand\CreationNodesTrivialShort{}{%OK !!!!!!!!!!!!!!
+ %création des nœuds grand bord petit bord GB-i (et PB-i)
+ \coordinate (GB-1) at ({7.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-1) at ({7.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-2) at ({7.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-2) at ({7.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-3) at ({7.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-3) at ({7.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-4) at ({7.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-4) at ({7.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-5) at ({7.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-5) at ({7.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-6) at ({7.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-6) at ({7.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-7) at ({67.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-7) at ({67.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-8) at ({67.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-8) at ({67.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-9) at ({67.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-9) at ({67.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-10) at ({67.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-10) at ({67.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-11) at ({67.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-11) at ({67.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-12) at ({67.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-12) at ({67.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-13) at ({127.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-13) at ({127.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-14) at ({127.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-14) at ({127.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-15) at ({127.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-15) at ({127.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-16) at ({127.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-16) at ({127.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-17) at ({127.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-17) at ({127.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-18) at ({127.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-18) at ({127.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-19) at ({187.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-19) at ({187.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-20) at ({187.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-20) at ({187.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-21) at ({187.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-21) at ({187.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-22) at ({187.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-22) at ({187.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-23) at ({187.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-23) at ({187.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-24) at ({187.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-24) at ({187.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-25) at ({247.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-25) at ({247.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-26) at ({247.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-26) at ({247.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-27) at ({247.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-27) at ({247.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-28) at ({247.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-28) at ({247.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-29) at ({247.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-29) at ({247.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-30) at ({247.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-30) at ({247.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-31) at ({307.5}:{\triv@purs@rayon}) ;
+ \coordinate (PB-31) at ({307.5}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-32) at ({307.5+9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-32) at ({307.5+9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-33) at ({307.5+2*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-33) at ({307.5+2*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-34) at ({307.5+3*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-34) at ({307.5+3*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-35) at ({307.5+4*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-35) at ({307.5+4*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ \coordinate (GB-36) at ({307.5+5*9}:{\triv@purs@rayon}) ;
+ \coordinate (PB-36) at ({307.5+5*9}:{\triv@purs@rayon-\triv@purs@hautcases}) ;
+ %tests ?!?!
+% \foreach \i in {1,...,36}{%OK
+% \draw[EpTraits,fill=teal] (GB-\i) circle[radius=1.75pt] node[font=\tiny\ttfamily] {GB-\i};
+% \draw[EpTraits,fill=purple] (PB-\i) circle[radius=1.75pt] node[font=\tiny\ttfamily] {PB-\i};
+% }
+ %création des nœuds pour la figure centrale, boucle pour les 1ers + le dernier
+ \foreach \i in {1,...,\triv@purs@nbcat}{%
+ \coordinate (OM-\i) at ({30+(\i-1)*60}:{\triv@purs@rayonhexag}) ;
+ %\draw[EpTraits,fill=orange] (OM-\i) circle[radius=1.75pt] node[font=\tiny\ttfamily] {OM-\i};
+ }%
+ %les nœuds des cases verticales
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-1-\j) at ($(PB-1)!\tmp@coeff!(OM-1)$) ;
+ %\draw[EpTraits,fill=yellow] (D-1-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-1-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-2-\j) at ($(PB-6)!\tmp@coeff!(OM-1)$) ;
+ %\draw[EpTraits,fill=yellow] (D-2-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-2-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-3-\j) at ($(PB-7)!\tmp@coeff!(OM-2)$) ;
+ %\draw[EpTraits,fill=yellow] (D-3-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-3-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-4-\j) at ($(PB-12)!\tmp@coeff!(OM-2)$) ;
+ %\draw[EpTraits,fill=yellow] (D-4-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-4-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-5-\j) at ($(PB-13)!\tmp@coeff!(OM-3)$) ;
+ %\draw[EpTraits,fill=yellow] (D-5-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-5-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-6-\j) at ($(PB-18)!\tmp@coeff!(OM-3)$) ;
+ %\draw[EpTraits,fill=yellow] (D-6-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-5-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-7-\j) at ($(PB-19)!\tmp@coeff!(OM-4)$) ;
+ %\draw[EpTraits,fill=yellow] (D-7-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-7-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-8-\j) at ($(PB-24)!\tmp@coeff!(OM-4)$) ;
+ %\draw[EpTraits,fill=yellow] (D-8-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-8-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-9-\j) at ($(PB-25)!\tmp@coeff!(OM-5)$) ;
+ %\draw[EpTraits,fill=yellow] (D-9-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-9-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-10-\j) at ($(PB-30)!\tmp@coeff!(OM-5)$) ;
+ %\draw[EpTraits,fill=yellow] (D-10-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-10-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-11-\j) at ($(PB-31)!\tmp@coeff!(OM-6)$) ;
+ %\draw[EpTraits,fill=yellow] (D-11-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-11-\j};
+ }%
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}%
+ \coordinate (D-12-\j) at ($(PB-36)!\tmp@coeff!(OM-6)$) ;
+ %\draw[EpTraits,fill=yellow] (D-12-\j) circle[radius=1.75pt] node[font=\tiny\ttfamily] {D-12-\j};
+ }%
+}
+
+\NewDocumentCommand\FillCellsBorderShort{}{%
+ %-------Vertical
+ %niveau 1 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (OM-6)--(OM-1)--(D-1-4)--(D-12-4)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-6)!0.5!(D-1-4)$) {\triv@purs@lsticons[2]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (D-12-4)--(D-1-4)--(D-1-3)--(D-12-3)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-12-4)!0.5!(D-1-3)$) {\triv@purs@lsticons[6]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (D-12-3)--(D-1-3)--(D-1-2)--(D-12-2)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-12-3)!0.5!(D-1-2)$) {\triv@purs@lsticons[5]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (D-12-2)--(D-1-2)--(D-1-1)--(D-12-1)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-12-2)!0.5!(D-1-1)$) {\triv@purs@lsticons[3]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (D-1-1)--(PB-1) arc({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-12-1)--cycle ;
+ \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-12-1)!0.5!(PB-1)$) {\triv@purs@lsticons[4]} ;
+ %niveau 2 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (OM-1)--(OM-2)--(D-3-4)--(D-2-4)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-1)!0.5!(D-3-4)$) {\triv@purs@lsticons[3]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (D-2-4)--(D-3-4)--(D-3-3)--(D-2-3)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-2-4)!0.5!(D-3-3)$) {\triv@purs@lsticons[1]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (D-2-3)--(D-3-3)--(D-3-2)--(D-2-2)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-2-3)!0.5!(D-3-2)$) {\triv@purs@lsticons[6]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (D-2-2)--(D-3-2)--(D-3-1)--(D-2-1)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-2-2)!0.5!(D-3-1)$) {\triv@purs@lsticons[4]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (D-3-1)--(PB-7) arc({67.5}:{52.5}:{\triv@purs@rayonint}) --(D-2-1)--cycle ;
+ \node[rotate={90+(8)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-2-1)!0.5!(PB-7)$) {\triv@purs@lsticons[5]} ;
+ %niveau 3 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (OM-2)--(OM-3)--(D-5-4)--(D-4-4)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-2)!0.5!(D-5-4)$) {\triv@purs@lsticons[4]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (D-4-4)--(D-5-4)--(D-5-3)--(D-4-3)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-4-4)!0.5!(D-5-3)$) {\triv@purs@lsticons[2]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (D-4-3)--(D-5-3)--(D-5-2)--(D-4-2)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-4-3)!0.5!(D-5-2)$) {\triv@purs@lsticons[1]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (D-4-2)--(D-5-2)--(D-5-1)--(D-4-1)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-4-2)!0.5!(D-5-1)$) {\triv@purs@lsticons[5]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (D-5-1)--(PB-13) arc({127.5}:{112.5}:{\triv@purs@rayonint}) --(D-4-1)--cycle ;
+ \node[rotate={90+(16)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-4-1)!0.5!(PB-13)$) {\triv@purs@lsticons[6]} ;
+ %niveau 4 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (OM-3)--(OM-4)--(D-7-4)--(D-6-4)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-3)!0.5!(D-7-4)$) {\triv@purs@lsticons[5]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (D-6-4)--(D-7-4)--(D-7-3)--(D-6-3)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-6-4)!0.5!(D-7-3)$) {\triv@purs@lsticons[3]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (D-6-3)--(D-7-3)--(D-7-2)--(D-6-2)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-6-3)!0.5!(D-7-2)$) {\triv@purs@lsticons[2]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (D-6-2)--(D-7-2)--(D-7-1)--(D-6-1)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-6-2)!0.5!(D-7-1)$) {\triv@purs@lsticons[6]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (D-7-1)--(PB-19) arc({187.5}:{172.5}:{\triv@purs@rayonint}) --(D-6-1)--cycle ;
+ \node[rotate={90+(24)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-6-1)!0.5!(PB-19)$) {\triv@purs@lsticons[1]} ;
+ %niveau 5 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (OM-4)--(OM-5)--(D-9-4)--(D-8-4)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-4)!0.5!(D-9-4)$) {\triv@purs@lsticons[6]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (D-8-4)--(D-9-4)--(D-9-3)--(D-8-3)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-8-4)!0.5!(D-9-3)$) {\triv@purs@lsticons[4]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (D-8-3)--(D-9-3)--(D-9-2)--(D-8-2)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-8-3)!0.5!(D-9-2)$) {\triv@purs@lsticons[3]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (D-8-2)--(D-9-2)--(D-9-1)--(D-8-1)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-8-2)!0.5!(D-9-1)$) {\triv@purs@lsticons[1]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (D-9-1)--(PB-25) arc({247.5}:{232.5}:{\triv@purs@rayonint}) --(D-8-1)--cycle ;
+ \node[rotate={90+(32)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-8-1)!0.5!(PB-25)$) {\triv@purs@lsticons[2]} ;
+ %niveau 6 vertical
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (OM-5)--(OM-6)--(D-11-4)--(D-10-4)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-5)!0.5!(D-11-4)$) {\triv@purs@lsticons[1]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (D-10-4)--(D-11-4)--(D-11-3)--(D-10-3)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-10-4)!0.5!(D-11-3)$) {\triv@purs@lsticons[5]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (D-10-3)--(D-11-3)--(D-11-2)--(D-10-2)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-10-3)!0.5!(D-11-2)$) {\triv@purs@lsticons[4]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (D-10-2)--(D-11-2)--(D-11-1)--(D-10-1)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-10-2)!0.5!(D-11-1)$) {\triv@purs@lsticons[2]} ;
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (D-11-1)--(PB-31) arc({307.5}:{292.5}:{\triv@purs@rayonint}) --(D-10-1)--cycle ;
+ \node[rotate={90+(40)*\triv@purs@anglecases},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(D-10-1)!0.5!(PB-31)$) {\triv@purs@lsticons[3]} ;
+ %--------BORDS !!!
+ \ifboolKV[TrivPursEN]{Colors}%
+ {%
+ %Secteur1
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-1)--(GB-1) arc ({7.5+0*9}:{7.5+1*9}:{\triv@purs@rayon})--(PB-2) arc ({7.5+1*9}:{7.5+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-2)--(GB-2) arc ({7.5+1*9}:{7.5+2*9}:{\triv@purs@rayon})--(PB-3) arc ({7.5+2*9}:{7.5+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-4)--(GB-4) arc ({7.5+3*9}:{7.5+4*9}:{\triv@purs@rayon})--(PB-5) arc ({7.5+4*9}:{7.5+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-5)--(GB-5) arc ({7.5+4*9}:{7.5+5*9}:{\triv@purs@rayon})--(PB-6) arc ({7.5+5*9}:{7.5+4*9}:{\triv@purs@rayonint});
+ %Secteur2
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-7)--(GB-7) arc ({7.5+60+0*9}:{7.5+60+1*9}:{\triv@purs@rayon})--(PB-8) arc ({7.5+60+1*9}:{7.5+60+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-8)--(GB-8) arc ({7.5+60+1*9}:{7.5+60+2*9}:{\triv@purs@rayon})--(PB-9) arc ({7.5+60+2*9}:{7.5+60+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-10)--(GB-10) arc ({7.5+60+3*9}:{7.5+60+4*9}:{\triv@purs@rayon})--(PB-11) arc ({7.5+60+4*9}:{7.5+60+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-11)--(GB-11) arc ({7.5+60+4*9}:{7.5+60+5*9}:{\triv@purs@rayon})--(PB-12) arc ({7.5+60+5*9}:{7.5+60+4*9}:{\triv@purs@rayonint});
+ %Secteur3
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-13)--(GB-13) arc ({7.5+120+0*9}:{7.5+120+1*9}:{\triv@purs@rayon})--(PB-14) arc ({7.5+120+1*9}:{7.5+120+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-14)--(GB-14) arc ({7.5+120+1*9}:{7.5+120+2*9}:{\triv@purs@rayon})--(PB-15) arc ({7.5+120+2*9}:{7.5+120+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-16)--(GB-16) arc ({7.5+120+3*9}:{7.5+120+4*9}:{\triv@purs@rayon})--(PB-17) arc ({7.5+120+4*9}:{7.5+120+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-17)--(GB-17) arc ({7.5+120+4*9}:{7.5+120+5*9}:{\triv@purs@rayon})--(PB-18) arc ({7.5+120+5*9}:{7.5+120+4*9}:{\triv@purs@rayonint});
+ %Secteur4
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-19)--(GB-19) arc ({7.5+180+0*9}:{7.5+180+1*9}:{\triv@purs@rayon})--(PB-20) arc ({7.5+180+1*9}:{7.5+180+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-20)--(GB-20) arc ({7.5+180+1*9}:{7.5+180+2*9}:{\triv@purs@rayon})--(PB-21) arc ({7.5+180+2*9}:{7.5+180+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-22)--(GB-22) arc ({7.5+180+3*9}:{7.5+180+4*9}:{\triv@purs@rayon})--(PB-23) arc ({7.5+180+4*9}:{7.5+180+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-23)--(GB-23) arc ({7.5+180+4*9}:{7.5+180+5*9}:{\triv@purs@rayon})--(PB-24) arc ({7.5+180+5*9}:{7.5+180+4*9}:{\triv@purs@rayonint});
+ %Secteur5
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-25)--(GB-25) arc ({7.5+240+0*9}:{7.5+240+1*9}:{\triv@purs@rayon})--(PB-26) arc ({7.5+240+1*9}:{7.5+240+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-26)--(GB-26) arc ({7.5+240+1*9}:{7.5+240+2*9}:{\triv@purs@rayon})--(PB-27) arc ({7.5+240+2*9}:{7.5+240+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-28)--(GB-28) arc ({7.5+240+3*9}:{7.5+240+4*9}:{\triv@purs@rayon})--(PB-29) arc ({7.5+240+4*9}:{7.5+240+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-29)--(GB-29) arc ({7.5+240+4*9}:{7.5+240+5*9}:{\triv@purs@rayon})--(PB-30) arc ({7.5+240+5*9}:{7.5+240+4*9}:{\triv@purs@rayonint});
+ %Secteur6
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-31)--(GB-31) arc ({7.5+300+0*9}:{7.5+300+1*9}:{\triv@purs@rayon})--(PB-32) arc ({7.5+300+1*9}:{7.5+300+0*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-32)--(GB-32) arc ({7.5+300+1*9}:{7.5+300+2*9}:{\triv@purs@rayon})--(PB-33) arc ({7.5+300+2*9}:{7.5+300+1*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-34)--(GB-34) arc ({7.5+300+3*9}:{7.5+300+4*9}:{\triv@purs@rayon})--(PB-35) arc ({7.5+300+4*9}:{7.5+300+3*9}:{\triv@purs@rayonint});
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-35)--(GB-35) arc ({7.5+300+4*9}:{7.5+300+5*9}:{\triv@purs@rayon})--(PB-36) arc ({7.5+300+5*9}:{7.5+300+4*9}:{\triv@purs@rayonint});
+ }%
+ {}%
+ \ifboolKV[TrivPursEN]{Icons}%
+ {%
+ %secteur1
+ \node[rotate={90+0.5*(7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ \node[rotate={90+0.5*(7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ \node[rotate={90+0.5*(7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ \node[rotate={90+0.5*(7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ %secteur2
+ \node[rotate={90+0.5*(2*60+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*60+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ \node[rotate={90+0.5*(2*60+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*60+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ \node[rotate={90+0.5*(2*60+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*60+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ \node[rotate={90+0.5*(2*60+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*60+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ %secteur3
+ \node[rotate={90+0.5*(2*120+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*120+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ \node[rotate={90+0.5*(2*120+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*120+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ \node[rotate={90+0.5*(2*120+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*120+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ \node[rotate={90+0.5*(2*120+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*120+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ %secteur4
+ \node[rotate={90+0.5*(2*180+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*180+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ \node[rotate={90+0.5*(2*180+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*180+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ \node[rotate={90+0.5*(2*180+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*180+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ \node[rotate={90+0.5*(2*180+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*180+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ %secteur5
+ \node[rotate={90+0.5*(2*240+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*240+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ \node[rotate={90+0.5*(2*240+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*240+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ \node[rotate={90+0.5*(2*240+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*240+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ \node[rotate={90+0.5*(2*240+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*240+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ %secteur6
+ \node[rotate={90+0.5*(2*300+7.5+0*9+7.5+1*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*300+7.5+7.5+1*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ \node[rotate={90+0.5*(2*300+7.5+1*9+7.5+2*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*300+7.5+1*9+7.5+2*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ \node[rotate={90+0.5*(2*300+7.5+3*9+7.5+4*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*300+7.5+3*9+7.5+4*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ \node[rotate={90+0.5*(2*300+7.5+5*9+7.5+5*9)},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0.5*(2*300+7.5+4*9+7.5+5*9)}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ }%
+ {}%
+
+ %les jokers
+ \ifboolKV[TrivPursEN]{Icons}%
+ {%
+ \ifboolKV[TrivPursEN]{Jokers}%
+ {%
+ \node[rotate=30,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({30}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=90,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({90}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=150,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({150}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=210,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({210}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=270,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({270}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ \node[rotate=330,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({330}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ;
+ }%
+ {}%
+ }%
+ {}%
+}
+\NewDocumentCommand\DrawBordersTrivialShort{ }{%OK Court
+ %les tracés des cases
+ \draw[EpTraits] (0,0) circle[radius=\triv@purs@rayon] ;
+ \draw[EpTraits] (0,0) circle[radius={\triv@purs@rayon-\triv@purs@hautcases}] ;
+ \foreach \i in {1,...,36}{%
+ \draw[EpTraits] (PB-\i)--(GB-\i) ;
+ }
+ \draw[EpTraits] (PB-1)--(OM-1)--(OM-6)--(PB-36) ;
+ \draw[EpTraits] (PB-6)--(OM-1)--(OM-2)--(PB-7) ;
+ \draw[EpTraits] (PB-12)--(OM-2)--(OM-3)--(PB-13) ;
+ \draw[EpTraits] (PB-18)--(OM-3)--(OM-4)--(PB-19) ;
+ \draw[EpTraits] (PB-24)--(OM-4)--(OM-5)--(PB-25) ;
+ \draw[EpTraits] (PB-30)--(OM-5)--(OM-6)--(PB-31) ;
+ \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%
+ \draw[EpTraits] (D-2-\j)--(D-3-\j) ;
+ \draw[EpTraits] (D-4-\j)--(D-5-\j) ;
+ \draw[EpTraits] (D-6-\j)--(D-7-\j) ;
+ \draw[EpTraits] (D-8-\j)--(D-9-\j) ;
+ \draw[EpTraits] (D-10-\j)--(D-11-\j) ;
+ \draw[EpTraits] (D-12-\j)--(D-1-\j) ;
+ }%
+}
+
+\NewDocumentCommand\FillCamembersTrivialShort{ }{%numéro des camemberts, en partant de la droite
+ \ifboolKV[TrivPursEN]{Colors}%
+ {%
+ %Couleur du 1er camembert
+ \draw[EpTraits,fill={\triv@purs@lstcol[1]}] (PB-36)--(GB-36) arc ({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-1) arc ({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 2ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[2]}] (PB-6)--(GB-6) arc ({7*\triv@purs@anglecases}:{9*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-7) arc ({9*\triv@purs@anglecases}:{7*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 3ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[3]}] (PB-12)--(GB-12) arc ({15*\triv@purs@anglecases}:{17*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-13) arc ({17*\triv@purs@anglecases}:{15*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 4ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[4]}] (PB-18)--(GB-18) arc ({23*\triv@purs@anglecases}:{25*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-19) arc ({25*\triv@purs@anglecases}:{23*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 5ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[5]}] (PB-24)--(GB-24) arc ({31*\triv@purs@anglecases}:{33*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-25) arc ({33*\triv@purs@anglecases}:{31*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ %Couleur du 6ème
+ \draw[EpTraits,fill={\triv@purs@lstcol[6]}] (PB-30)--(GB-30) arc ({39*\triv@purs@anglecases}:{41*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-31) arc ({41*\triv@purs@anglecases}:{39*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ;
+ }%
+ {}%
+ %si on affiche les icones
+ \ifboolKV[TrivPursEN]{Icons}%
+ {%
+ \node[rotate={90+0*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ;
+ \node[rotate={90+8*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({8*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ;
+ \node[rotate={90+16*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({16*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ;
+ \node[rotate={90+24*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({24*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ;
+ \node[rotate={90+32*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({32*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ;
+ \node[rotate={90+40*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({40*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ;
+ }%
+ {}%
+}
+
%====CREATION
\NewDocumentCommand\BoardTrivialPursuit{ O{} D<>{} }{%
\restoreKV[TrivPursEN]% revenir au valeurs par défaut
@@ -848,18 +1578,35 @@
\useasboundingbox (0,0) circle[radius={\triv@purs@rayon}] ;
%création
\begin{scope}[rotate=\triv@purs@rotate]
- %les nœuds OK
- \CreationNodesTrivial
- %test avec centre OK
- \ifboolKV[TrivPursEN]{Center}{\FillCenterTrivial}{}
- %camemberts OK
- \FillCamembersTrivial
- %cases OK
- \FillCellsBorder
- %bordures
- \DrawBordersTrivial
- %logo central
- \ifboolKV[TrivPursEN]{Logo}{\LogoCenterTrivialPursuit}{}
+ \ifboolKV[TrivPursEN]{ShortVersion}%
+ {%
+ %les nœuds OK
+ \CreationNodesTrivialShort
+ %test avec centre OK
+ \ifboolKV[TrivPursEN]{Center}{\FillCenterTrivial}{}
+ %camemberts OK
+ \FillCamembersTrivialShort
+ %cases OK
+ \FillCellsBorderShort
+ %bordures
+ \DrawBordersTrivialShort
+ %logo central
+ \ifboolKV[TrivPursEN]{Logo}{\LogoCenterTrivialPursuit}{}
+ }%
+ {%
+ %les nœuds OK
+ \CreationNodesTrivial
+ %test avec centre OK
+ \ifboolKV[TrivPursEN]{Center}{\FillCenterTrivial}{}
+ %camemberts OK
+ \FillCamembersTrivial
+ %cases OK
+ \FillCellsBorder
+ %bordures
+ \DrawBordersTrivial
+ %logo central
+ \ifboolKV[TrivPursEN]{Logo}{\LogoCenterTrivialPursuit}{}
+ }%
\end{scope}
\end{tikzpicture}%
}
diff --git a/graphics/pgf/contrib/wheelchart/README.md b/graphics/pgf/contrib/wheelchart/README.md
index ec414f3440..df9f81a74d 100644
--- a/graphics/pgf/contrib/wheelchart/README.md
+++ b/graphics/pgf/contrib/wheelchart/README.md
@@ -2,9 +2,11 @@
## Diagrams with circular or other shapes using Ti*k*Z and LaTeX3
-Version 3.0 (2024/03/08)
+Version 4.0 (2024/07/28)
-This package is based on the package [Ti*k*Z](https://ctan.org/pkg/pgf) and can be used to draw various kinds of diagrams such as a bar chart, doughnut chart, infographic, pie chart, ring chart, square chart, sunburst chart, waffle chart and wheel chart with Ti*k*Z. It provides several options to customize the diagrams. It is also possible to specify a plot for the shape of the chart. Furthermore a legend can be added and the table of contents can be displayed as one of these diagrams.
+This package is based on the package [Ti*k*Z](https://ctan.org/pkg/pgf) and can be used to draw various kinds of diagrams such as bar charts, doughnut charts, infographics, pie charts, ring charts, square charts, sunburst charts, waffle charts and wheel charts.
+
+It provides several options to customize the diagrams. It is also possible to specify a plot for the shape of the chart. Furthermore a legend can be added and the table of contents can be displayed as one of these diagrams.
%% README.md
%% Copyright 2022-2024 Matthias Floré
diff --git a/graphics/pgf/contrib/wheelchart/wheelchart.pdf b/graphics/pgf/contrib/wheelchart/wheelchart.pdf
index 2cfa0dd1be..808551f33c 100644
--- a/graphics/pgf/contrib/wheelchart/wheelchart.pdf
+++ b/graphics/pgf/contrib/wheelchart/wheelchart.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/wheelchart/wheelchart.sty b/graphics/pgf/contrib/wheelchart/wheelchart.sty
index e2c8543976..21e232b099 100644
--- a/graphics/pgf/contrib/wheelchart/wheelchart.sty
+++ b/graphics/pgf/contrib/wheelchart/wheelchart.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{tikz}
\usetikzlibrary{calc}
-\ProvidesExplPackage{wheelchart}{2024/03/08}{3.0}{Diagrams with circular or other shapes using TikZ and LaTeX3}
+\ProvidesExplPackage{wheelchart}{2024/07/28}{4.0}{Diagrams with circular or other shapes using TikZ and LaTeX3}
%%> \subsection{Variables}
@@ -59,6 +59,8 @@
\fp_const:Nn \c__wheelchart_arc_data_end_factor_left_fp { 1 }
\fp_const:Nn \c__wheelchart_arc_data_end_factor_right_fp { 0 }
\fp_new:N \l__wheelchart_arc_data_line_sep_factor_fp
+\fp_new:N \l__wheelchart_arc_data_lines_pos_fp
+\fp_new:N \l__wheelchart_arc_data_lines_shift_fp
\fp_new:N \l__wheelchart_arc_data_pos_fp
\fp_new:N \l__wheelchart_arc_data_radius_plot_false_fp
\fp_new:N \l__wheelchart_arc_data_sep_fp
@@ -168,6 +170,9 @@
\int_new:N \l__wheelchart_lines_ext_top_dir_int
\int_new:N \l__wheelchart_max_list_items_int
+\regex_const:Nn \c__wheelchart_braces_regex { \{(.+)\} }
+\regex_const:Nn \c__wheelchart_key_braces_regex { [\w\s]+\{(.+)\} }
+
\seq_new:N \l__wheelchart_arc_data_seq
\seq_new:N \l__wheelchart_discrete_coefficients_first_seq
\seq_new:N \l__wheelchart_discrete_coefficients_second_seq
@@ -180,8 +185,8 @@
{
sign ( \l__wheelchart_arc_data_dir_fp ) *
(
- \cs:w c__wheelchart_arc_data_start_factor_\l__wheelchart_arc_data_align_tl _fp\cs_end:
- + \cs:w c__wheelchart_arc_data_end_factor_\l__wheelchart_arc_data_align_tl _fp\cs_end:
+ \cs:w c__wheelchart_arc_data_start_factor_\l__wheelchart_arc_data_align_tl _fp \cs_end:
+ + \cs:w c__wheelchart_arc_data_end_factor_\l__wheelchart_arc_data_align_tl _fp \cs_end:
)
}
\tl_new:N \l__wheelchart_arc_data_align_tl
@@ -262,7 +267,7 @@
\cs_new_protected:Npn \__wheelchart_caption_and_title:nnnnn #1#2#3#4#5
{
- \__wheelchart_if_text:nn {#1}
+ \__wheelchart_if_text:nnn {#1} { o }
{
\node [ anchor = #2 , align = #3 , / wheelchart / #1_style ]
at ( $ (#4) + ( 0 , { #5 * ( \pgfkeysvalueof { / wheelchart / #1~sep } ) } ) $ )
@@ -282,12 +287,12 @@
{
\fp_eval:n
{
- ( 1 - (#1) ) * \cs:w g__wheelchart_slice_inner_start_angle_\WCcount _fp\cs_end:
- + (#1) * \cs:w g__wheelchart_slice_inner_end_angle_\WCcount _fp\cs_end:
+ ( 1 - (#1) ) * \cs:w g__wheelchart_slice_inner_start_angle_\WCcount _fp \cs_end:
+ + (#1) * \cs:w g__wheelchart_slice_inner_end_angle_\WCcount _fp \cs_end:
+ \l__wheelchart_counter_or_clockwise_fp * (#2)
}
}
- { \fp_eval:n { \cs:w g__wheelchart_inner_radius_\WCcount _fp\cs_end: - (#4) } }
+ { \fp_eval:n { \cs:w g__wheelchart_inner_radius_\WCcount _fp \cs_end: - (#4) } }
)
! { \fp_eval:n {#3} } !
(
@@ -295,12 +300,12 @@
{
\fp_eval:n
{
- ( 1 - (#1) ) * \cs:w g__wheelchart_slice_outer_start_angle_\WCcount _fp\cs_end:
- + (#1) * \cs:w g__wheelchart_slice_outer_end_angle_\WCcount _fp\cs_end:
+ ( 1 - (#1) ) * \cs:w g__wheelchart_slice_outer_start_angle_\WCcount _fp \cs_end:
+ + (#1) * \cs:w g__wheelchart_slice_outer_end_angle_\WCcount _fp \cs_end:
+ \l__wheelchart_counter_or_clockwise_fp * (#2)
}
}
- { \fp_eval:n { \cs:w g__wheelchart_outer_radius_\WCcount _fp\cs_end: + (#4) } }
+ { \fp_eval:n { \cs:w g__wheelchart_outer_radius_\WCcount _fp \cs_end: + (#4) } }
)
$%note the () around the #i's to keep these contents together
}
@@ -374,10 +379,10 @@
\path let
\p { l__wheelchart_def_angle_1 } =
\__wheelchart_point_plot_true:nnnnn { \WCcount } {#1} {#2} { 0 }
- { \fp_eval:n { (#4) + 1 / \cs:w g__wheelchart_samples_\WCcount _fp\cs_end: } } ,
+ { \fp_eval:n { (#4) + 1 / \cs:w g__wheelchart_samples_\WCcount _fp \cs_end: } } ,
\p { l__wheelchart_def_angle_2 } =
\__wheelchart_point_plot_true:nnnnn { \WCcount } {#1} {#2} { 1 }
- { \fp_eval:n { (#4) + 1 / \cs:w g__wheelchart_samples_\WCcount _fp\cs_end: } }
+ { \fp_eval:n { (#4) + 1 / \cs:w g__wheelchart_samples_\WCcount _fp \cs_end: } }
in [ / utils / exec = { \__wheelchart_def_angle_aux: } ]
;
}
@@ -392,10 +397,10 @@
{
( 1 - (#2) ) *
(
- \cs:w g__wheelchart_slice_outer_start_angle_#1_fp\cs_end:
- - \cs:w g__wheelchart_slice_inner_start_angle_#1_fp\cs_end:
+ \cs:w g__wheelchart_slice_outer_start_angle_#1_fp \cs_end:
+ - \cs:w g__wheelchart_slice_inner_start_angle_#1_fp \cs_end:
)
- + (#2) * ( \cs:w g__wheelchart_slice_outer_end_angle_#1_fp\cs_end: - \cs:w g__wheelchart_slice_inner_end_angle_#1_fp\cs_end: )
+ + (#2) * ( \cs:w g__wheelchart_slice_outer_end_angle_#1_fp \cs_end: - \cs:w g__wheelchart_slice_inner_end_angle_#1_fp \cs_end: )
}
\cs_new:Npn \__wheelchart_def_angle_plot_false:nnnnn #1#2#3#4#5
@@ -410,11 +415,11 @@
(
sqrt
(
- ( \cs:w g__wheelchart_outer_radius_#1_fp\cs_end: + \cs:w g__wheelchart_inner_radius_#1_fp\cs_end: ) ^ 2
- - \cs:w g__wheelchart_outer_radius_#1_fp\cs_end: * \cs:w g__wheelchart_inner_radius_#1_fp\cs_end: *
+ ( \cs:w g__wheelchart_outer_radius_#1_fp \cs_end: + \cs:w g__wheelchart_inner_radius_#1_fp \cs_end: ) ^ 2
+ - \cs:w g__wheelchart_outer_radius_#1_fp \cs_end: * \cs:w g__wheelchart_inner_radius_#1_fp \cs_end: *
(
2 + 2 * cosd ( \__wheelchart_def_angle_plot_false_aux_angle:nn {#1} {#2} )
- + \cs:w g__wheelchart_outer_radius_#1_fp\cs_end: * \cs:w g__wheelchart_inner_radius_#1_fp\cs_end:
+ + \cs:w g__wheelchart_outer_radius_#1_fp \cs_end: * \cs:w g__wheelchart_inner_radius_#1_fp \cs_end:
*
(
(
@@ -425,25 +430,25 @@
)
)
)
- + \cs:w g__wheelchart_inner_radius_#1_fp\cs_end: *
+ + \cs:w g__wheelchart_inner_radius_#1_fp \cs_end: *
(
- \cs:w g__wheelchart_inner_radius_#1_fp\cs_end:
- - \cs:w g__wheelchart_outer_radius_#1_fp\cs_end:
+ \cs:w g__wheelchart_inner_radius_#1_fp \cs_end:
+ - \cs:w g__wheelchart_outer_radius_#1_fp \cs_end:
* cosd ( \__wheelchart_def_angle_plot_false_aux_angle:nn {#1} {#2} )
)
/ \__wheelchart_def_radius:nnn {#1} {#4} {#5}
)
- * \cs:w g__wheelchart_outer_radius_#1_fp\cs_end: * sind ( \__wheelchart_def_angle_plot_false_aux_angle:nn {#1} {#2} )
+ * \cs:w g__wheelchart_outer_radius_#1_fp \cs_end: * sind ( \__wheelchart_def_angle_plot_false_aux_angle:nn {#1} {#2} )
/
(
- ( \cs:w g__wheelchart_outer_radius_#1_fp\cs_end: + \cs:w g__wheelchart_inner_radius_#1_fp\cs_end: ) ^ 2
- - 2 * \cs:w g__wheelchart_outer_radius_#1_fp\cs_end: * \cs:w g__wheelchart_inner_radius_#1_fp\cs_end:
+ ( \cs:w g__wheelchart_outer_radius_#1_fp \cs_end: + \cs:w g__wheelchart_inner_radius_#1_fp \cs_end: ) ^ 2
+ - 2 * \cs:w g__wheelchart_outer_radius_#1_fp \cs_end: * \cs:w g__wheelchart_inner_radius_#1_fp \cs_end:
* ( 1 + cosd ( \__wheelchart_def_angle_plot_false_aux_angle:nn {#1} {#2} ) )
)
)
}
- + ( 1 - (#2) ) * ( \cs:w g__wheelchart_slice_inner_start_angle_#1_fp\cs_end: )
- + (#2) * ( \cs:w g__wheelchart_slice_inner_end_angle_#1_fp\cs_end: )
+ + ( 1 - (#2) ) * ( \cs:w g__wheelchart_slice_inner_start_angle_#1_fp \cs_end: )
+ + (#2) * ( \cs:w g__wheelchart_slice_inner_end_angle_#1_fp \cs_end: )
+ \l__wheelchart_counter_or_clockwise_fp * (#3)
}
}
@@ -451,7 +456,7 @@
\cs_new_protected:Npn \__wheelchart_def_coord:nnnn #1#2#3#4
{
\path let \p { l__wheelchart_coord } =
- ( \cs:w __wheelchart_#2_plot:nn\cs_end: {#4} { \fp_use:c { g__wheelchart_#2_radius_\WCcount _fp } } )
+ ( \cs:w __wheelchart_#2_plot:nn \cs_end: {#4} { \fp_use:c { g__wheelchart_#2_radius_\WCcount _fp } } )
in
[
/ utils / exec =
@@ -484,11 +489,11 @@
<
\l__wheelchart_gap_fp
?
- min ( \cs:w g__wheelchart_abs_half_angle_minus_new_angle_\WCcount _fp\cs_end: , \l__wheelchart_gap_max_angle_def_fp )
+ min ( \cs:w g__wheelchart_abs_half_angle_minus_new_angle_\WCcount _fp \cs_end: , \l__wheelchart_gap_max_angle_def_fp )
:
asind ( min ( \l__wheelchart_gap_fp / ( (#2) + 1 - sign (#2) ) , 1 ) ) + \l__wheelchart_gap_polar_fp
- %note the min ( ... , 1 ) such that the asind is always defined
- %also note the + 1 - sign (#2) such that the denominator is also nonzero if #2 = 0
+ %note the min ( ... , 1 ) so that the asind is always defined
+ %also note the + 1 - sign (#2) so that the denominator is also nonzero if #2 = 0
}
}
@@ -516,7 +521,7 @@
:
\g__wheelchart_new_angle_fp - \g__wheelchart_angle_fp
)
- / \cs:w g__wheelchart_samples_1_fp\cs_end:
+ / \cs:w g__wheelchart_samples_1_fp \cs_end:
}
\path let
\p { l__wheelchart_slices_orientation_1 } =
@@ -579,8 +584,8 @@
{
\fp_eval:n
{
- ( 1 - (#2) ) * ( \cs:w g__wheelchart_inner_radius_#1_fp\cs_end: - (#3) )
- + (#2) * ( \cs:w g__wheelchart_outer_radius_#1_fp\cs_end: + (#3) )
+ ( 1 - (#2) ) * ( \cs:w g__wheelchart_inner_radius_#1_fp \cs_end: - (#3) )
+ + (#2) * ( \cs:w g__wheelchart_outer_radius_#1_fp \cs_end: + (#3) )
}
}
@@ -591,26 +596,26 @@
{
\fp_gset:cn { g__wheelchart_slice_#1_#2_angle_\WCcount _fp }
{
- \cs:w g__wheelchart_#3angle_fp\cs_end: +
+ \cs:w g__wheelchart_#3angle_fp \cs_end: +
(
\l__wheelchart_counter_or_clockwise_fp *
- ( (#4) * \cs:w g__wheelchart_#1_gap_\WCcount _fp\cs_end: + \cs:w l__wheelchart_slices_#1_#2_angle_shift_fp\cs_end: )
+ ( (#4) * \cs:w g__wheelchart_#1_gap_\WCcount _fp \cs_end: + \cs:w l__wheelchart_slices_#1_#2_angle_shift_fp \cs_end: )
)
}
}
{
\fp_gset:cn { g__wheelchart_slice_#1_#2_angle_\WCcount _fp }
{
- \cs:w g__wheelchart_#3angle_fp\cs_end: +
+ \cs:w g__wheelchart_#3angle_fp \cs_end: +
(
\l__wheelchart_counter_or_clockwise_fp *
(
- (#4) * \cs:w g__wheelchart_#1_gap_\WCcount _fp\cs_end: + \cs:w l__wheelchart_slices_#1_#2_angle_shift_fp\cs_end:
+ (#4) * \cs:w g__wheelchart_#1_gap_\WCcount _fp \cs_end: + \cs:w l__wheelchart_slices_#1_#2_angle_shift_fp \cs_end:
- asind
(
- \cs:w g__wheelchart_inner_radius_\WCcount _fp\cs_end:
- * sind ( \cs:w l__wheelchart_slices_#1_#2_angle_shift_fp\cs_end: )
- / \cs:w g__wheelchart_outer_radius_\WCcount _fp\cs_end:
+ \cs:w g__wheelchart_inner_radius_\WCcount _fp \cs_end:
+ * sind ( \cs:w l__wheelchart_slices_#1_#2_angle_shift_fp \cs_end: )
+ / \cs:w g__wheelchart_outer_radius_\WCcount _fp \cs_end:
)
)
)
@@ -620,8 +625,8 @@
\cs_new_protected:Npn \__wheelchart_def_slice_keys:n #1
{
- {%note the double {{...}} such that the contents is in a group
- %such that pgfkeys which are specific to the current slice are local for this slice
+ {%note the double braces {{...}} so that the contents is in a group
+ %and in particular, pgfkeys which are specific to the current slice are local for this slice
\clist_if_in:NVT \l__wheelchart_slice_range_local_clist \WCcount
{
\pgfkeys { / wheelchart , slice_final /. expanded = { \exp_not:v { l__wheelchart_slice_\WCcount _keys_clist } } }
@@ -663,24 +668,24 @@
%g__wheelchart_WCcount_counter to be larger than \WCtotalcount
\tl_build_end:N \WClegend
\cs_set:Npn \WCcount { \theg__wheelchart_WCcount_counter }
- \cs_set:Npn \WCpercentage { \cs:w l__wheelchart_WCpercentage_\theg__wheelchart_WCcount_counter\cs_end: }
- \cs_set:Npn \WCpercentagerounded { \cs:w l__wheelchart_WCpercentagerounded_\theg__wheelchart_WCcount_counter\cs_end: }
+ \cs_set:Npn \WCpercentage { \cs:w l__wheelchart_WCpercentage_\theg__wheelchart_WCcount_counter \cs_end: }
+ \cs_set:Npn \WCpercentagerounded { \cs:w l__wheelchart_WCpercentagerounded_\theg__wheelchart_WCcount_counter \cs_end: }
\str_if_eq:eeTF { \l__wheelchart_type_tl } { etoc }
{
\cs_set:Npn \WCetocthelinkedname
- { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_linked_name_\theg__wheelchart_WCcount_counter\cs_end: }
+ { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_linked_name_\theg__wheelchart_WCcount_counter \cs_end: }
\cs_set:Npn \WCetocthelinkednumber
- { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_linked_number_\theg__wheelchart_WCcount_counter\cs_end: }
+ { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_linked_number_\theg__wheelchart_WCcount_counter \cs_end: }
\cs_set:Npn \WCetocthelinkedpage
- { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_linked_page_\theg__wheelchart_WCcount_counter\cs_end: }
+ { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_linked_page_\theg__wheelchart_WCcount_counter \cs_end: }
\cs_set:Npn \WCetocthename
- { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_name_\theg__wheelchart_WCcount_counter\cs_end: }
+ { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_name_\theg__wheelchart_WCcount_counter \cs_end: }
\cs_set:Npn \WCetocthenumber
- { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_number_\theg__wheelchart_WCcount_counter\cs_end: }
+ { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_number_\theg__wheelchart_WCcount_counter \cs_end: }
\cs_set:Npn \WCetocthepage
- { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_page_\theg__wheelchart_WCcount_counter\cs_end: }
+ { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_page_\theg__wheelchart_WCcount_counter \cs_end: }
\cs_set:Npn \WCetocthenumberofpages
- { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_number_of_pages_\theg__wheelchart_WCcount_counter\cs_end: }
+ { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _the_number_of_pages_\theg__wheelchart_WCcount_counter \cs_end: }
}
{
\clist_if_empty:NTF \l__wheelchart_header_clist
@@ -688,7 +693,7 @@
\int_step_inline:nn { \l__wheelchart_max_list_items_int }
{
\cs_set:cpn { WCvar\int_to_Alph:n {##1} }
- { \cs:w l__wheelchart_item_WCvar\int_to_Alph:n {##1}_\theg__wheelchart_WCcount_counter\cs_end: }
+ { \cs:w l__wheelchart_item_WCvar\int_to_Alph:n {##1}_\theg__wheelchart_WCcount_counter \cs_end: }
}
}
{
@@ -717,13 +722,13 @@
(
atand
(
- \cs:w g__wheelchart_#3_y_fp\cs_end: - \cs:w g__wheelchart_#4_y_fp\cs_end: ,
- \cs:w g__wheelchart_#3_x_fp\cs_end: - \cs:w g__wheelchart_#4_x_fp\cs_end:
+ \cs:w g__wheelchart_#3_y_fp \cs_end: - \cs:w g__wheelchart_#4_y_fp \cs_end: ,
+ \cs:w g__wheelchart_#3_x_fp \cs_end: - \cs:w g__wheelchart_#4_x_fp \cs_end:
)
- atand
(
- \cs:w g__wheelchart_#1_y_fp\cs_end: - \cs:w g__wheelchart_#2_y_fp\cs_end: ,
- \cs:w g__wheelchart_#1_x_fp\cs_end: - \cs:w g__wheelchart_#2_x_fp\cs_end:
+ \cs:w g__wheelchart_#1_y_fp \cs_end: - \cs:w g__wheelchart_#2_y_fp \cs_end: ,
+ \cs:w g__wheelchart_#1_x_fp \cs_end: - \cs:w g__wheelchart_#2_x_fp \cs_end:
)
)
}
@@ -969,9 +974,9 @@
\__wheelchart_for_loop:n
{
\pgfkeysvalueof { / wheelchart / before~slices }
- \int_step_inline:nn { \fp_eval:n { round ( \cs:w g__wheelchart_value_\WCcount _fp\cs_end: ) } }
- %note that \fp_eval:n { round ( ... ) } is necessary even when the value is an integer because if parse=pgfmath
- %then .0 is added and then \int_step_inline:nn { \cs:w g__wheelchart_value_\WCcount _fp\cs_end: } would give the messages
+ \int_step_inline:nn { \fp_eval:n { round ( \cs:w g__wheelchart_value_\WCcount _fp \cs_end: ) } }
+ %note that \fp_eval:n { round ( ... ) } is necessary even when the value is an integer because pgfmath
+ %could have added .0 and then \int_step_inline:nn { \cs:w g__wheelchart_value_\WCcount _fp \cs_end: } would give the messages
%Missing character: There is no . in font nullfont! Missing character: There is no 0 in font nullfont!
{
\int_gincr:N \g__wheelchart_discrete_count_int
@@ -1082,7 +1087,7 @@
\cs_set:Npe \WCmidangle
{ \fp_use:c { g__wheelchart_WCmidangle_\WCcount _fp } }
\pgfkeysvalueof { / wheelchart / for~loop~start }%this must be placed after the definition of macros such as \WCpercentage
- %such that these macros can be used in the key for loop start
+ %so that these macros can be used in the key for loop start
\begin { scope }
[
shift = { ( \WCmidangle \c_colon_str \fp_use:c { g__wheelchart_explode_\WCcount _fp } ) } ,
@@ -1161,16 +1166,21 @@
\fp_gset:cn { g__wheelchart_#1_\WCcount _fp } { \pgfmathresult }
}
-\cs_new_protected:Npn \__wheelchart_if_text:nn #1#2
+\cs_new_protected:Npn \__wheelchart_if_text:nnn #1#2#3
{
%https://tex.stackexchange.com/questions/42280/expand-away-empty-macros-within-ifthenelse
%https://tex.stackexchange.com/questions/44919/proper-way-to-detect-empty-blank-text
\begin { pgfinterruptpicture }
+ \DeclareDocumentCommand \\ {#2} {}
+ %for arc data, \\ is used with seq_set_split so has no optional argument thus then #2 is empty
+ %otherwise, #2 is o
+ %no s because an optional star does not apply in a node
+ %no ! because a space between \\ and its optional argument is allowed in a node
%https://tex.stackexchange.com/questions/459853/savebox-within-tikzpicture-results-in-an-empty-savebox
\hbox_gset:Nn \g__wheelchart_if_text_box { \pgfkeysvalueof { / wheelchart / #1 } }
\end { pgfinterruptpicture }
\dim_compare:nNnT { \box_wd:N \g__wheelchart_if_text_box } > { 0 pt }
- { {#2} }
+ { {#3} }
}
\cs_new_protected:Npn \__wheelchart_initial:n #1
@@ -1182,7 +1192,7 @@
\tl_if_empty:nTF {#1}
{ \cs_set:Npn \WCtotalcount { 0 } }
{
- \cs:w seq_set_split:Ne\l__wheelchart_expand_list_tl\cs_end:
+ \cs:w seq_set_split:Ne\l__wheelchart_expand_list_tl \cs_end:
\l__wheelchart_list_seq
{ \pgfkeysvalueof { / wheelchart / separator~rows } }
{#1}
@@ -1190,7 +1200,7 @@
\int_zero:N \l__wheelchart_max_list_items_int
\seq_map_indexed_inline:Nn \l__wheelchart_list_seq
{
- \cs:w seq_set_split:Ne\l__wheelchart_expand_list_items_tl\cs_end:
+ \cs:w seq_set_split:Ne\l__wheelchart_expand_list_items_tl \cs_end:
\l__wheelchart_list_items_seq
{ \pgfkeysvalueof { / wheelchart / separator~columns } }
{##2}
@@ -1245,7 +1255,7 @@
\etocsetnexttocdepth { -1 }%only for the next toc
\etocsetstyle { \l__wheelchart_etoc_level_tl } {} {}
{
- \int_compare:nNnT { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _count_int\cs_end: } > { 0 }
+ \int_compare:nNnT { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _count_int \cs_end: } > { 0 }
{
\cs_gset:cpe
{
@@ -1304,7 +1314,7 @@
{}
\int_gzero_new:c { g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _count_int }
\pgfkeysvalueof { / wheelchart / etoc~code }
- \int_compare:nNnT { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _count_int\cs_end: } > { 0 }
+ \int_compare:nNnT { \cs:w g__wheelchart_etoc_item_\l__wheelchart_etoc_name_tl _count_int \cs_end: } > { 0 }
{
\cs_gset:cpe
{
@@ -1331,32 +1341,32 @@
{
\__wheelchart_def_slice_keys:n
{ \__wheelchart_gdef_count_fp:nn { value } { value } }
- \cs_set:Npe \WCtotalnum { \fp_eval:n { \WCtotalnum + \cs:w g__wheelchart_value_\WCcount _fp\cs_end: } }
+ \cs_set:Npe \WCtotalnum { \fp_eval:n { \WCtotalnum + \cs:w g__wheelchart_value_\WCcount _fp \cs_end: } }
}
\int_step_inline:nn { \WCtotalcount }
{
\cs_set:cpe { l__wheelchart_WCpercentage_##1 }
- { \fp_eval:n { \cs:w g__wheelchart_value_##1_fp\cs_end: / ( \WCtotalnum / 100 ) } }
+ { \fp_eval:n { \cs:w g__wheelchart_value_##1_fp \cs_end: / ( \WCtotalnum / 100 ) } }
\cs_set:cpe { l__wheelchart_WCpercentagerounded_##1 }
- { \fp_eval:n { round ( \cs:w l__wheelchart_WCpercentage_##1\cs_end: , \pgfkeysvalueof { / wheelchart / perc~precision } ) } }
+ { \fp_eval:n { round ( \cs:w l__wheelchart_WCpercentage_##1 \cs_end: , \pgfkeysvalueof { / wheelchart / perc~precision } ) } }
}
}
\cs_new_protected:Npn \__wheelchart_inner_and_wheel_data:n #1
{
- \__wheelchart_if_text:nn { #1~data }
+ \__wheelchart_if_text:nnn { #1~data } { o }
{
\__wheelchart_def_fp:nn { #1_data_angle_pos } { #1~data~angle~pos }
\__wheelchart_def_fp:nn { #1_data_angle_shift } { #1~data~angle~shift }
\__wheelchart_def_fp:nn { #1_data_pos } { #1~data~pos }
\__wheelchart_def_fp:nn { #1_data_sep } { #1~data~sep }
\node [ align = left , / wheelchart / #1_data_style ] at
- \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn\cs_end:
+ \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn \cs_end:
{ \WCcount }
- { \cs:w l__wheelchart_#1_data_angle_pos_fp\cs_end: }
- { \cs:w l__wheelchart_#1_data_angle_shift_fp\cs_end: }
- { \cs:w l__wheelchart_#1_data_pos_fp\cs_end: }
- { \cs:w l__wheelchart_#1_data_sep_fp\cs_end: }
+ { \cs:w l__wheelchart_#1_data_angle_pos_fp \cs_end: }
+ { \cs:w l__wheelchart_#1_data_angle_shift_fp \cs_end: }
+ { \cs:w l__wheelchart_#1_data_pos_fp \cs_end: }
+ { \cs:w l__wheelchart_#1_data_sep_fp \cs_end: }
{ \pgfkeysvalueof { / wheelchart / #1~data } } ;
}
}
@@ -1366,13 +1376,13 @@
\cs_new_protected:Npn \__wheelchart_legend_append:nn #1#2
{
- \tl_build_put_right:NV \WClegend \l__wheelchart_legend_row_tl%note the V specifier such that \WClegend can also be combined
- %with an S column of the package siunitx and such that \WClegend can be used in a tblr environment of the package tabularray
+ \tl_build_put_right:NV \WClegend \l__wheelchart_legend_row_tl%note the V specifier so that \WClegend can also be combined
+ %with an S column of the package siunitx and so that \WClegend can be used in a tblr environment of the package tabularray
%and then the option expand=\WClegend needs to be given to the tblr environment
\tl_build_put_right:Nn \WClegend { \protect \setcounter { g__wheelchart_WCcount_counter } }%note the \protect for in case that
%\WClegend would be parsed in a particular way
%note that the counter g__wheelchart_WCcount_counter is defined globally and at the end of the previous \l__wheelchart_legend_row_tl
- %such that this value is defined and has the right value at the start of the next \l__wheelchart_legend_row_tl
+ %so that this value is defined and has the right value at the start of the next \l__wheelchart_legend_row_tl
%if \WClegend is used in a tblr environment of the package tabularray then \UseTblrLibrary{counter} is required
\tl_build_put_right:Ne \WClegend { { \int_eval:n {#1} } }
\tl_build_put_right:Nn \WClegend {#2}
@@ -1414,8 +1424,8 @@
{
atand
(
- \cs:w g__wheelchart_#3_y_fp\cs_end: - \cs:w g__wheelchart_#4_y_fp\cs_end: ,
- \cs:w g__wheelchart_#3_x_fp\cs_end: - \cs:w g__wheelchart_#4_x_fp\cs_end:
+ \cs:w g__wheelchart_#3_y_fp \cs_end: - \cs:w g__wheelchart_#4_y_fp \cs_end: ,
+ \cs:w g__wheelchart_#3_x_fp \cs_end: - \cs:w g__wheelchart_#4_x_fp \cs_end:
)
}
\fp_set:Nn \l__wheelchart_slices_arc_coord_fp
@@ -1440,7 +1450,7 @@
)
:
atand ( ( \l__wheelchart_slices_arc_A_fp - ( 1 / \l__wheelchart_slices_arc_A_fp ) ) / 2 )
- }%note the min ( \l__wheelchart_slices_arc_B_fp , 0 ) such that the acosd is always defined
+ }%note the min ( \l__wheelchart_slices_arc_B_fp , 0 ) so that the acosd is always defined
}
}
]
@@ -1486,8 +1496,8 @@
* abs ( ( 1 / \l__wheelchart_slices_arc_A_fp ) + \l__wheelchart_slices_arc_A_fp )
* sqrt
(
- ( \cs:w g__wheelchart_#3_x_fp\cs_end: - \cs:w g__wheelchart_#4_x_fp\cs_end: ) ^ 2
- + ( \cs:w g__wheelchart_#3_y_fp\cs_end: - \cs:w g__wheelchart_#4_y_fp\cs_end: ) ^ 2
+ ( \cs:w g__wheelchart_#3_x_fp \cs_end: - \cs:w g__wheelchart_#4_x_fp \cs_end: ) ^ 2
+ + ( \cs:w g__wheelchart_#3_y_fp \cs_end: - \cs:w g__wheelchart_#4_y_fp \cs_end: ) ^ 2
)
}
}
@@ -1539,11 +1549,11 @@
\fp_eval:n
{
(
- \cs:w g__wheelchart_#3_x_fp\cs_end: + \cs:w g__wheelchart_#4_x_fp\cs_end: +
+ \cs:w g__wheelchart_#3_x_fp \cs_end: + \cs:w g__wheelchart_#4_x_fp \cs_end: +
(
\g__wheelchart_slices_orientation_fp * ( \l__wheelchart_slices_arrow_coord_fp - 1 )
* \l__wheelchart_slices_arrow_A_fp
- * ( \cs:w g__wheelchart_#3_y_fp\cs_end: - \cs:w g__wheelchart_#4_y_fp\cs_end: )
+ * ( \cs:w g__wheelchart_#3_y_fp \cs_end: - \cs:w g__wheelchart_#4_y_fp \cs_end: )
)
)
/ 2
@@ -1552,11 +1562,11 @@
\fp_eval:n
{
(
- \cs:w g__wheelchart_#3_y_fp\cs_end: + \cs:w g__wheelchart_#4_y_fp\cs_end: +
+ \cs:w g__wheelchart_#3_y_fp \cs_end: + \cs:w g__wheelchart_#4_y_fp \cs_end: +
(
\g__wheelchart_slices_orientation_fp * ( \l__wheelchart_slices_arrow_coord_fp - 1 )
* \l__wheelchart_slices_arrow_A_fp
- * ( \cs:w g__wheelchart_#4_x_fp\cs_end: - \cs:w g__wheelchart_#3_x_fp\cs_end: )
+ * ( \cs:w g__wheelchart_#4_x_fp \cs_end: - \cs:w g__wheelchart_#3_x_fp \cs_end: )
)
)
/ 2
@@ -1593,10 +1603,10 @@
{
\fp_eval:n
{
- ( 1 - (#1) / max ( round ( \cs:w g__wheelchart_value_\WCcount _fp\cs_end: ) , 1 ) )
- * \cs:w g__wheelchart_slice_#2_start_angle_\WCcount _fp\cs_end:
- + (#1) * \cs:w g__wheelchart_slice_#2_end_angle_\WCcount _fp\cs_end:
- / max ( round ( \cs:w g__wheelchart_value_\WCcount _fp\cs_end: ) , 1 )
+ ( 1 - (#1) / max ( round ( \cs:w g__wheelchart_value_\WCcount _fp \cs_end: ) , 1 ) )
+ * \cs:w g__wheelchart_slice_#2_start_angle_\WCcount _fp \cs_end:
+ + (#1) * \cs:w g__wheelchart_slice_#2_end_angle_\WCcount _fp \cs_end:
+ / max ( round ( \cs:w g__wheelchart_value_\WCcount _fp \cs_end: ) , 1 )
}
}
@@ -1617,17 +1627,19 @@
arc_style /. style = {} ,
arc~around~line /. initial = 1 ,
arc~around~text /. default = true ,%this key is not set up with /.is choice or \bool_set:Nn
- %such that for example \WCvarA can be used as value for this key
+ %so that for example \WCvarA can be used as value for this key
arc~around~text /. initial = false ,
arc~data /. initial = {} ,
arc~data~align /. code = { \tl_set:Nn \l__wheelchart_arc_data_align_tl {#1} } ,%this key is not set up with /.is choice
- %such that for example \WCvarA can be used as value for this key
+ %so that for example \WCvarA can be used as value for this key
arc~data~align = center ,
arc~data~angle~pos /. initial = 0.5 ,
arc~data~angle~shift /. initial = 0 ,
arc~data~dir /. initial = 1 ,
arc~data~expand /. initial = n ,
arc~data~line~sep~factor /. initial = 1 ,
+ arc~data~lines~pos /. initial = 0.5 ,
+ arc~data~lines~shift /. initial = 0 ,
arc~data~pos /. initial = 1 ,
arc~data~sep /. initial = 1 ex / 1 cm ,
arc~data~style /. style = { arc_data_style /. style = {#1} } ,
@@ -1640,7 +1652,7 @@
arc~sep /. initial = 1 ex / 1 cm ,
at /. initial = { ( 0 , 0 ) } ,
before~slices /. initial = {} ,
- bool_set_true /. code = { \bool_set_true:N #1 } ,
+ bool_set_true /. code = \bool_set_true:N #1 ,
caption /. initial = {} ,
caption~left /. initial = {} ,
caption~left~sep /. initial = 0.5 ,
@@ -1670,9 +1682,9 @@
data~style /. style = { data_style /. style = {#1} } ,
data_style /. style = {} ,
discrete /. is~choice ,
- discrete / false /. code = { \bool_set_false:N \l__wheelchart_discrete_bool } ,
+ discrete / false /. code = \bool_set_false:N \l__wheelchart_discrete_bool ,
discrete / false /. value~forbidden ,
- discrete / true /. code = { \bool_set_true:N \l__wheelchart_discrete_bool } ,
+ discrete / true /. code = \bool_set_true:N \l__wheelchart_discrete_bool ,
discrete / true /. value~forbidden ,
discrete /. default = true ,
discrete = false ,
@@ -1777,7 +1789,7 @@
legend /. initial = {} ,
legend~columns /. initial = 1 ,
legend~entry /. initial = {} ,
- legend~only /. code = { \bool_set:Nn \l__wheelchart_legend_only_bool { \cs:w c_#1_bool\cs_end: } } ,
+ legend~only /. code = \bool_set:Nn \l__wheelchart_legend_only_bool { \cs:w c_#1_bool \cs_end: } ,
legend~only /. default = true ,
legend~only = false ,
legend~row /. code =
@@ -1800,7 +1812,7 @@
} ,
lines~ext~dirsep /. initial = 0 ,
lines~ext~fixed /. default = true ,%this key is not set up with /.is choice or \bool_set:Nn
- %such that for example \WCvarA can be used as value for this key
+ %so that for example \WCvarA can be used as value for this key
lines~ext~fixed /. initial = false ,
lines~ext~fixed~left /. initial =
{
@@ -1808,7 +1820,7 @@
{
\l__wheelchart_lines_ext_dir_int *
(
- \cs:w g__wheelchart_outer_radius_\WCcount _fp\cs_end: + \l__wheelchart_lines_sep_fp
+ \cs:w g__wheelchart_outer_radius_\WCcount _fp \cs_end: + \l__wheelchart_lines_sep_fp
+ \l__wheelchart_lines_fp + \l__wheelchart_lines_ext_fp
)
}
@@ -1819,7 +1831,7 @@
{
\l__wheelchart_lines_ext_dir_int *
(
- \cs:w g__wheelchart_outer_radius_\WCcount _fp\cs_end: + \l__wheelchart_lines_sep_fp
+ \cs:w g__wheelchart_outer_radius_\WCcount _fp \cs_end: + \l__wheelchart_lines_sep_fp
+ \l__wheelchart_lines_fp + \l__wheelchart_lines_ext_fp
)
}
@@ -1870,7 +1882,7 @@
outer_plot_style /. style = {} ,
outer~radius /. initial = 3 ,
perc~precision /. initial = 0 ,
- pie /. code = { \bool_set:Nn \l__wheelchart_pie_bool { \cs:w c_#1_bool\cs_end: } } ,
+ pie /. code = \bool_set:Nn \l__wheelchart_pie_bool { \cs:w c_#1_bool \cs_end: } ,
pie /. default = true ,
pie = false ,
plot /. style =
@@ -2029,12 +2041,12 @@
} ,
slices~inner /. initial =
{
- \fp_compare:nNnT { \cs:w g__wheelchart_inner_radius_\WCcount _fp\cs_end: } > { 0 }
+ \fp_compare:nNnT { \cs:w g__wheelchart_inner_radius_\WCcount _fp \cs_end: } > { 0 }
{
\fp_compare:nNnT
- { \cs:w g__wheelchart_inner_gap_\WCcount _fp\cs_end: }
+ { \cs:w g__wheelchart_inner_gap_\WCcount _fp \cs_end: }
<
- { \cs:w g__wheelchart_abs_half_angle_minus_new_angle_\WCcount _fp\cs_end: }
+ { \cs:w g__wheelchart_abs_half_angle_minus_new_angle_\WCcount _fp \cs_end: }
{
arc
[
@@ -2212,7 +2224,7 @@
{}
}
} ,
- slices~start~arrow/.style~2~args =
+ slices~start~arrow /. style~2~args =
{
slices~start =
{
@@ -2241,13 +2253,13 @@
(#1) -
\fp_eval:n
{
- \l__wheelchart_counter_or_clockwise_fp * \cs:w g__wheelchart_value_1_fp\cs_end: * 0.5
+ \l__wheelchart_counter_or_clockwise_fp * \cs:w g__wheelchart_value_1_fp \cs_end: * 0.5
* ( \l__wheelchart_total_angle_fp / \WCtotalnum )
}
}
} ,
start~half /. default = 90 ,
- title /. initial= {} ,
+ title /. initial = {} ,
title~left /. initial = {} ,
title~left~sep /. initial = 0.5 ,
title~left~style /. style = { title~left_style /. style = {#1} } ,
@@ -2283,13 +2295,13 @@
{
\cs_set:cpn {#1}
{ \use:e { \clist_item:nn {#2} { \int_mod:nn { \WCcount - 1 } { \clist_count:n {#2} } + 1 } } }
- %note the \use:e such that \WClist<name> also works when given as an argument to pgfmath
+ %note the \use:e so that \WClist<name> also works when given as an argument to pgfmath
%if the list contains a macro, for example
%\begin{tikzpicture}
%\def\n{1}
%\wheelchart[
- % value=\WClistA,
- % WClistA={\n}
+ % value=\WClistA,
+ % WClistA=\n
%]{\exampleforthismanual}
%\end{tikzpicture}
%https://tex.stackexchange.com/questions/671298/clist-item-and-pgfmathsetmacro-causing-an-error
@@ -2331,18 +2343,18 @@
{
\tl_set:Ne \l__wheelchart_key_name_tl { \pgfkeyscurrentname }%it is necessary to define \l__wheelchart_key_name_tl
%because \pgfkeyscurrentname will be overwritten by / errors / unknown~key /. expanded
- \regex_match:nVTF { \{(.+)\} } \l__wheelchart_key_name_tl
+ \regex_match:NVTF \c__wheelchart_braces_regex \l__wheelchart_key_name_tl
{
\tl_set:Ne \l__wheelchart_key_range_tl { \pgfkeyscurrentname }
- \regex_replace_all:nnN { \{(.+)\} } {} \l__wheelchart_key_name_tl
- \regex_replace_all:nnN { [\w\s]+\{(.+)\} } { \1 } \l__wheelchart_key_range_tl
+ \regex_replace_all:NnN \c__wheelchart_braces_regex {} \l__wheelchart_key_name_tl
+ \regex_replace_all:NnN \c__wheelchart_key_braces_regex { \1 } \l__wheelchart_key_range_tl
\str_if_eq:eeTF { \l__wheelchart_key_range_tl } { list }
{
\pgfkeys { / wheelchart , WC_list = { l__wheelchart_list_\l__wheelchart_key_name_tl } {#1} }
\pgfkeys
{
/ wheelchart ,
- \l__wheelchart_key_name_tl /. expand~once = { \cs:w l__wheelchart_list_\l__wheelchart_key_name_tl\cs_end: }
+ \l__wheelchart_key_name_tl /. expand~once = { \cs:w l__wheelchart_list_\l__wheelchart_key_name_tl \cs_end: }
}
}
{
@@ -2393,12 +2405,12 @@
\NewDocumentCommand \wheelchart { O {} m }
{
- {%note the double braces {{...}} such that the contents is in a group and such that & can be used in pgfmath in a tabular
+ {%note the double braces {{...}} so that the contents is in a group and so that & can be used in pgfmath in a tabular
\pgfkeys { / wheelchart , #1 }
\IfPackageLoadedTF { siunitx }
{ \cs_set:Npn \WCperc { \qty { \WCpercentagerounded } { \percent } } }
{ \cs_set:Npn \WCperc { \WCpercentagerounded \, \% } }%the definition of \WCperc is placed inside the command \wheelchart
- %such that \WCperc is not defined outside this command
+ %so that \WCperc is not defined outside this command
\bool_if:NTF \l__wheelchart_legend_only_bool
{
\__wheelchart_initial:n {#2}
@@ -2430,7 +2442,7 @@
{
\g__wheelchart_angle_fp +
(
- \l__wheelchart_counter_or_clockwise_fp * \cs:w g__wheelchart_value_\WCcount _fp\cs_end:
+ \l__wheelchart_counter_or_clockwise_fp * \cs:w g__wheelchart_value_\WCcount _fp \cs_end:
* ( \l__wheelchart_total_angle_fp / \WCtotalnum )
)
}
@@ -2455,7 +2467,7 @@
\fp_gset:cn { g__wheelchart_abs_half_angle_minus_new_angle_\WCcount _fp }
{ abs ( \g__wheelchart_angle_fp - \g__wheelchart_new_angle_fp ) / 2 }
\fp_set:Nn \l__wheelchart_abs_half_angle_minus_new_angle_minus_gap_polar_fp
- { \cs:w g__wheelchart_abs_half_angle_minus_new_angle_\WCcount _fp\cs_end: - \l__wheelchart_gap_polar_fp }
+ { \cs:w g__wheelchart_abs_half_angle_minus_new_angle_\WCcount _fp \cs_end: - \l__wheelchart_gap_polar_fp }
\fp_gzero_new:c { g__wheelchart_outer_gap_\WCcount _fp }
\fp_gzero_new:c { g__wheelchart_inner_gap_\WCcount _fp }
\bool_if:NTF \l__wheelchart_plot_bool
@@ -2466,7 +2478,7 @@
{
\fp_set:Nn \l__wheelchart_gap_max_angle_def_fp
{
- \cs:w g__wheelchart_inner_radius_\WCcount _fp\cs_end: > 0
+ \cs:w g__wheelchart_inner_radius_\WCcount _fp \cs_end: > 0
?
90
:
@@ -2490,8 +2502,8 @@
)
)
}
- \__wheelchart_def_gap:nn { outer } { \cs:w g__wheelchart_outer_radius_\WCcount _fp\cs_end: }
- \__wheelchart_def_gap:nn { inner } { \cs:w g__wheelchart_inner_radius_\WCcount _fp\cs_end: }
+ \__wheelchart_def_gap:nn { outer } { \cs:w g__wheelchart_outer_radius_\WCcount _fp \cs_end: }
+ \__wheelchart_def_gap:nn { inner } { \cs:w g__wheelchart_inner_radius_\WCcount _fp \cs_end: }
\fp_compare:nNnT { \l__wheelchart_abs_half_angle_minus_new_angle_minus_gap_polar_fp } > { 0.01 }
{
\fp_gset:cn { g__wheelchart_inner_radius_\WCcount _fp }
@@ -2508,7 +2520,7 @@
)
)
,
- \cs:w g__wheelchart_inner_radius_\WCcount _fp\cs_end:
+ \cs:w g__wheelchart_inner_radius_\WCcount _fp \cs_end:
)
}
}
@@ -2523,14 +2535,14 @@
\__wheelchart_gdef_count_fp:nn { data_pos } { data~pos }
\__wheelchart_gdef_count_fp:nn { data_sep } { data~sep }
\__wheelchart_def_angle:nnnn
- { \cs:w g__wheelchart_data_angle_pos_\WCcount _fp\cs_end: }
- { \cs:w g__wheelchart_data_angle_shift_\WCcount _fp\cs_end: }
- { \cs:w g__wheelchart_data_pos_\WCcount _fp\cs_end: }
- { \cs:w g__wheelchart_data_sep_\WCcount _fp\cs_end: }
+ { \cs:w g__wheelchart_data_angle_pos_\WCcount _fp \cs_end: }
+ { \cs:w g__wheelchart_data_angle_shift_\WCcount _fp \cs_end: }
+ { \cs:w g__wheelchart_data_pos_\WCcount _fp \cs_end: }
+ { \cs:w g__wheelchart_data_sep_\WCcount _fp \cs_end: }
\cs_set:Npe \WCdataangle { \pgfmathresult }
\__wheelchart_gdef_count_fp:nn { explode } { explode }
\pgfkeysvalueof { / wheelchart / for~loop~start }%this must be placed after the definition of macros such as
- %\WCpercentage such that these macros can be used in the key for loop start
+ %\WCpercentage so that these macros can be used in the key for loop start
\int_compare:nNnT { \WCcount } = { 1 }
{
\begin { scope }
@@ -2601,7 +2613,7 @@
[
shift /. expanded =
{
- \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn\cs_end:
+ \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn \cs_end:
{ \WCcount }
{ \l__wheelchart_slices_angle_pos_fp }
{ \l__wheelchart_slices_angle_shift_fp }
@@ -2639,9 +2651,9 @@
\__wheelchart_for_loop:n
{
\bool_if:NT \l__wheelchart_wheel_lines_bool
- %this is placed inside \__wheelchart_for_loop:n such that wheel lines can be applied for specific slices
+ %this is placed inside \__wheelchart_for_loop:n so that wheel lines can be applied for specific slices
{
- \int_step_inline:nnn { 0 } { \fp_eval:n { round ( \cs:w g__wheelchart_value_\WCcount _fp\cs_end: ) } }
+ \int_step_inline:nnn { 0 } { \fp_eval:n { round ( \cs:w g__wheelchart_value_\WCcount _fp \cs_end: ) } }
%note the \fp_eval:n { round ( ... ) } to avoid the messages Missing character: There is no ... in font nullfont!
{
\bool_if:NTF \l__wheelchart_plot_bool
@@ -2783,14 +2795,14 @@
\fp_compare:nF { \l__wheelchart_lines_fp == 0 && \l__wheelchart_lines_ext_fp == 0 }
{
\draw [ / wheelchart / lines_style ] let \p { l__wheelchart_lines_1 } =
- \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn\cs_end:
+ \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn \cs_end:
{ \WCcount }
- { \cs:w g__wheelchart_data_angle_pos_\WCcount _fp\cs_end: }
- { \cs:w g__wheelchart_data_angle_shift_\WCcount _fp\cs_end: }
- { \cs:w g__wheelchart_data_pos_\WCcount _fp\cs_end: }
+ { \cs:w g__wheelchart_data_angle_pos_\WCcount _fp \cs_end: }
+ { \cs:w g__wheelchart_data_angle_shift_\WCcount _fp \cs_end: }
+ { \cs:w g__wheelchart_data_pos_\WCcount _fp \cs_end: }
{ \l__wheelchart_lines_sep_fp + \l__wheelchart_lines_fp }
in
- \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn\cs_end:
+ \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn \cs_end:
{ \WCcount }
{ \l__wheelchart_lines_angle_pos_fp }
{ \l__wheelchart_lines_angle_shift_fp }
@@ -2838,7 +2850,7 @@
{
\fp_eval:n
{
- \l__wheelchart_lines_ext_dir_int * \cs:w g__wheelchart_data_sep_\WCcount _fp\cs_end:
+ \l__wheelchart_lines_ext_dir_int * \cs:w g__wheelchart_data_sep_\WCcount _fp \cs_end:
}
} ,
0
@@ -2849,7 +2861,7 @@
}
;
}
- \__wheelchart_if_text:nn { data }
+ \__wheelchart_if_text:nnn { data } { o }
{
\fp_compare:nNnTF { \l__wheelchart_lines_ext_fp } = { 0 }
{
@@ -2876,13 +2888,13 @@
\coordinate
[
at =
- \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn\cs_end:
+ \cs:w __wheelchart_point_plot_\bool_to_str:N \l__wheelchart_plot_bool :nnnnn \cs_end:
{ \WCcount }
- { \cs:w g__wheelchart_data_angle_pos_\WCcount _fp\cs_end: }
- { \cs:w g__wheelchart_data_angle_shift_\WCcount _fp\cs_end: }
- { \cs:w g__wheelchart_data_pos_\WCcount _fp\cs_end: }
+ { \cs:w g__wheelchart_data_angle_pos_\WCcount _fp \cs_end: }
+ { \cs:w g__wheelchart_data_angle_shift_\WCcount _fp \cs_end: }
+ { \cs:w g__wheelchart_data_pos_\WCcount _fp \cs_end: }
{
- \cs:w g__wheelchart_data_sep_\WCcount _fp\cs_end: +
+ \cs:w g__wheelchart_data_sep_\WCcount _fp \cs_end: +
(
\l__wheelchart_lines_fp == 0
?
@@ -2902,7 +2914,7 @@
\node [ anchor = \l__wheelchart_data_anchor_tl , align = left , / wheelchart / data_style ]
at ( g__wheelchart_data_coordinate )
{ \pgfkeysvalueof { / wheelchart / data } } ;%a separate \node and not at the end of the \draw with lines_style
- %such that the key lines style is not passed to this \node
+ %so that the key lines style is not passed to this \node
}
\__wheelchart_def_fp:nn { arc_around_line } { arc~around~line }
\__wheelchart_def_fp:nn { arc_data_angle_pos } { arc~data~angle~pos }
@@ -2913,14 +2925,16 @@
\fp_gset:Nn \g__wheelchart_half_ex_over_one_cm_fp { 0.5 ex / 1 cm }%
\endpgfinterruptpicture%
\fp_gset:Nn \g__wheelchart_arc_data_aux_ii_fp { 0 }
- \__wheelchart_if_text:nn { arc~data }
+ \__wheelchart_if_text:nnn { arc~data } {}
{
- \cs_set:Npn \WCperc { \WCpercentagerounded { \, } { \% } }%such that \WCperc follows the arc if used in arc data
+ \cs_set:Npn \WCperc { \WCpercentagerounded { \, } { \% } }%so that \WCperc follows the arc if used in arc data
%this redefinition of \WCperc is local to the group of arc data
\__wheelchart_def_fp:nn { arc_data_pos } { arc~data~pos }
\__wheelchart_def_fp:nn { arc_data_sep } { arc~data~sep }
\__wheelchart_def_fp:nn { arc_data_line_sep_factor } { arc~data~line~sep~factor }
- \cs:w seq_set_split:Nn\pgfkeysvalueof { / wheelchart / arc~data~expand }\cs_end:
+ \__wheelchart_def_fp:nn { arc_data_lines_pos } { arc~data~lines~pos }
+ \__wheelchart_def_fp:nn { arc_data_lines_shift } { arc~data~lines~shift }
+ \cs:w seq_set_split:Nn\pgfkeysvalueof { / wheelchart / arc~data~expand } \cs_end:
\l__wheelchart_arc_data_seq
{ \\ }
{ \pgfkeysvalueof { / wheelchart / arc~data } }
@@ -2928,13 +2942,17 @@
{
\fp_set:Nn \l__wheelchart_arc_data_text_pos_fp
{
- \l__wheelchart_arc_data_pos_fp + 2 * \g__wheelchart_slices_orientation_fp
- * ( 2 * ####1 - \seq_count:N \l__wheelchart_arc_data_seq - 1 ) * sign ( \l__wheelchart_arc_data_dir_fp )
+ \l__wheelchart_arc_data_pos_fp + 4 * \g__wheelchart_slices_orientation_fp *
+ (
+ ####1 - 1 - \l__wheelchart_arc_data_lines_pos_fp * ( \seq_count:N \l__wheelchart_arc_data_seq - 1 )
+ + \l__wheelchart_arc_data_lines_shift_fp
+ )
+ * sign ( \l__wheelchart_arc_data_dir_fp )
* \l__wheelchart_arc_data_line_sep_factor_fp * \g__wheelchart_half_ex_over_one_cm_fp
/
(
- \cs:w g__wheelchart_outer_radius_\WCcount _fp\cs_end:
- - \cs:w g__wheelchart_inner_radius_\WCcount _fp\cs_end:
+ \cs:w g__wheelchart_outer_radius_\WCcount _fp \cs_end:
+ - \cs:w g__wheelchart_inner_radius_\WCcount _fp \cs_end:
+ 2 * \l__wheelchart_arc_data_sep_fp
)
}%the sign is needed because \l__wheelchart_arc_data_dir_fp is not necessarily 1 or -1
@@ -2957,9 +2975,9 @@
/ wheelchart / arc_data_style
}
}%get the length of the path
- %note the option overlay such that this does not increase the bounding box
+ %note the option overlay so that this does not increase the bounding box
%note the {} at the start of text and the braces around \fp_gset:Nn ...
- %such that the compilation does not stall
+ %so that the compilation does not stall
{ 0 }
{ 1 }
{ \l__wheelchart_plot_variable_tl }
@@ -3033,7 +3051,7 @@
{ \l__wheelchart_arc_data_text_pos_fp }
{ \l__wheelchart_arc_data_sep_fp + \g__wheelchart_half_ex_over_one_cm_fp }
+ \l__wheelchart_counter_or_clockwise_fp * \l__wheelchart_arc_data_dir_fp
- * \cs:w c__wheelchart_arc_data_start_factor_\l__wheelchart_arc_data_align_tl _fp\cs_end:
+ * \cs:w c__wheelchart_arc_data_start_factor_\l__wheelchart_arc_data_align_tl _fp \cs_end:
* \l__wheelchart_arc_data_total_angle_plot_false_fp
}
\path
@@ -3188,7 +3206,7 @@
}
\bool_if:NT \l__wheelchart_legend_row_bool
{ \__wheelchart_def_WClegend: }
- \__wheelchart_if_text:nn { middle }
+ \__wheelchart_if_text:nnn { middle } { o }
{ \node [ align = center , / wheelchart / middle_style ] at ( 0 , 0 ) { \pgfkeysvalueof { / wheelchart / middle } } ; }
\pgfkeysvalueof { / wheelchart / legend }
\end { scope }
@@ -3203,4 +3221,6 @@
\end { scope }
}
}
- } \ No newline at end of file
+ }
+
+\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/wheelchart/wheelchart.tex b/graphics/pgf/contrib/wheelchart/wheelchart.tex
index 5f0857f1a6..952fc93a81 100644
--- a/graphics/pgf/contrib/wheelchart/wheelchart.tex
+++ b/graphics/pgf/contrib/wheelchart/wheelchart.tex
@@ -137,7 +137,7 @@
\setcounter{secnumdepth}{2}
\title{The \texttt{wheelchart} package\\[12pt]\large Diagrams with circular or other shapes using \tikzname{} and \LaTeX3}
\author{Matthias Floré}
-\date{Version 3.0 (2024/03/08)}%\\[12pt]
+\date{Version 4.0 (2024/07/28)}%\\[12pt]
\begin{document}
\iftotalpages%
\newsavebox{\fancyfootdefaultbox}%
@@ -155,7 +155,11 @@
\maketitle
\thispagestyle{fancy}
\begin{abstract}
-\noindent This package is based on the package |tikz| (see \cite{TtTaPGFp}) and can be used to draw various kinds of diagrams such as a bar chart, doughnut chart, infographic, pie chart, ring chart, square chart, sunburst chart, waffle chart and wheel chart with \tikzname. It provides several options to customize the diagrams. It is also possible to specify a plot for the shape of the chart. Furthermore a legend can be added and the table of contents can be displayed as one of these diagrams. Other tools for creating wheel charts or pie charts can be found in \cite{MpMP}, \cite{JhcIparowcltopotPGFm}, \cite{Tumfdb}, \cite{XdPCbupp} and \cite{RSVpaaMfp}.% This is the manual for version .
+\noindent This package is based on the package |tikz| (see \cite{TtTaPGFp}) and can be used to draw various kinds of diagrams such as bar charts, doughnut charts, infographics, pie charts, ring charts, square charts, sunburst charts, waffle charts and wheel charts.
+
+\noindent It provides several options to customize the diagrams. It is also possible to specify a plot for the shape of the chart. Furthermore a legend can be added and the table of contents can be displayed as one of these diagrams.
+
+\noindent Other tools for creating wheel charts or pie charts can be found in \cite{MpMP}, \cite{JhcIparowcltopotPGFm}, \cite{Tumfdb}, \cite{XdPCbupp} and \cite{RSVpaaMfp}.% This is the manual for version .
\end{abstract}
\section*{\contentsname}
\iftotalpages
@@ -257,7 +261,7 @@ The default wheelchart with these data is shown below.
\end{tikzpicture}
\end{codeexample}
\end{command}
-\newpage%such that this section has its own block in the header
+\newpage%so that this section has its own block in the header
\section{Additional macros}
\begin{command}{\WCangle\opt{\oarg{number}}\marg{angle pos}\marg{angle shift}\marg{pos}\marg{sep}}
This command gives the angle in degrees of the point which is constructed as follows.
@@ -670,6 +674,11 @@ In the example below, it is necessary to use |arc data expand=e| and to place |\
\begin{key}{/wheelchart/arc data line sep factor=\marg{factor} (initially 1)}
The contents of the key |arc data| can consist of multiple lines separated by |\\|. The \meta{factor} determines the spacing between these lines.
\end{key}
+\begin{key}{/wheelchart/arc data lines pos=\marg{factor} (initially 0.5)}
+\end{key}
+\begin{key}{/wheelchart/arc data lines shift=\marg{value} (initially 0)}
+The positioning of the lines of the key |arc data| is determined by the index $k-1-\text{|arc data lines pos|}\cdot(N-1)+\text{|arc data lines shift|}$ where $N$ is the number of lines and $k\in\{1,\dots,N\}$.
+\end{key}
\begin{key}{/wheelchart/arc data pos=\marg{value} (initially 1)}
\end{key}
\begin{key}{/wheelchart/arc data sep=\marg{value} (initially 1ex/1cm)}
@@ -738,7 +747,6 @@ This key accepts a list of keys which will be applied to the node where the cont
\begin{codeexample}[width=10cm]
\begin{tikzpicture}
\wheelchart[
- at={(5,2)},
caption=Caption,
caption style={font=\scshape},
caption left=Caption left,
@@ -2909,6 +2917,11 @@ The following example is an answer to the question on \url{https://tex.stackexch
\item In v2.0, the key |arc data angle shift| was not taken into account for the key |arc| in combination with the key |arc around text|. This is fixed in v3.0.
\item In v2.0, the number of items for each slice in the \meta{wheelchart data} which can be accessed with the macros |\WCvarA| and so on was determined by the number of items for the last slice. For example, |data{1}=\WCvarD| in combination with the \meta{wheelchart data} |1/black/A/a,2/gray/B| was not possible with v2.0. This is not a limitation anymore with v3.0.
\end{itemize}
+\item[] \textbf{Version 4.0 (2024/07/28)}
+\begin{itemize}
+\item Added the keys |arc data lines pos| and |arc data lines shift|.
+\item Solved an incompatibility if |\\| is used in a key such as |data| inside an environment such as |center|.
+\end{itemize}
\end{itemize}
\begin{thebibliography}{9}
\bibitem{JhcIparowcltopotPGFm}
diff --git a/graphics/pgf/contrib/wordle/README.md b/graphics/pgf/contrib/wordle/README.md
index f1977a1ae7..fdfd996870 100644
--- a/graphics/pgf/contrib/wordle/README.md
+++ b/graphics/pgf/contrib/wordle/README.md
@@ -1,8 +1,33 @@
-wordle is a package to work with Wordle game.
------------------------------------------------------------
-wordle est un package pour travailler avec le jeu du sutom.
------------------------------------------------------------
-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
-Source : https://tex.stackexchange.com/questions/659860/wordle-like-colored-letter-boxes-in-latex \ No newline at end of file
+![v![]()ersion](https://img.shields.io/github/v/tag/AndrewMathas/wordle?color=success&label=version)
+<a href="http://www.latex-project.org/lppl.txt"><img src="https://img.shields.io/badge/license-LPPLv1.3c-blueviolet.svg"></a>
+<a href="https://www.latex-project.org/"><img src="https://img.shields.io/badge/latex-20B2AA?logo=Latex"></a>
+
+# Wordle
+
+A stupidly feature-rich LaTeX package for typesetting **Wordle** puzzles. This package provides a stupidly feature-rich way of creating Wordle puzzles in LaTeX, which [Wikipedia](https://en.wikipedia.org/wiki/Wordle) describes as a hugely popular web-based word game created and developed by Welsh software engineer Josh Wardle.
+
+This package provides the `wordle` environment, which uses the syntax:
+
+```tex
+% \usepackage{wordle}
+\begin{wordle}{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+\end{wordle}
+```
+
+Ce package fournit un moyen stupidement riche en fonctionnalités de créer des puzzles **Wordle** en LaTeX, que [Wikipedia](https://en.wikipedia.org/wiki/Wordle) décrit comme comme un jeu de lettres en ligne extrêmement populaire, créé et développé par l'ingénieur logiciel gallois Josh Wardle.
+
+```tex
+% \usepackage{wordle}
+\begin{GrilleSutom}{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+\end{GrilleSutom}
+```
+
+### Authors
+Andrew Mathas and Cédric Pierquet
+
diff --git a/graphics/pgf/contrib/wordle/doc/wordle-doc-en.pdf b/graphics/pgf/contrib/wordle/doc/wordle-doc-en.pdf
deleted file mode 100644
index aadb07f54b..0000000000
--- a/graphics/pgf/contrib/wordle/doc/wordle-doc-en.pdf
+++ /dev/null
Binary files differ
diff --git a/graphics/pgf/contrib/wordle/doc/wordle-doc-en.tex b/graphics/pgf/contrib/wordle/doc/wordle-doc-en.tex
deleted file mode 100644
index 06352f5ad5..0000000000
--- a/graphics/pgf/contrib/wordle/doc/wordle-doc-en.tex
+++ /dev/null
@@ -1,426 +0,0 @@
-% !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[english,a4paper,11pt]{article}
-\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.1}
-\def\TPdate{03/09/2023}
-\usepackage{amssymb,amsfonts,amsmath}
-\usepackage[utf8]{inputenc}
-%\usepackage[T1]{fontenc}
-\usepackage{wordle}
-\usepackage{awesomebox}
-\usepackage{fontawesome5}
-\usepackage{footnote}
-\makesavenoteenv{tabular}
-\usepackage{enumitem}
-\usepackage{tabularray}
-\usepackage{fancyvrb}
-\usepackage{fancyhdr}
-\fancyhf{}
-\renewcommand{\headrulewidth}{0pt}
-\lfoot{\sffamily\small [wordle]}
-\cfoot{\sffamily\small - \thepage{} -}
-\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
-
-%\usepackage{hvlogos}
-\usepackage{xspace}
-\usepackage{hologo}
-\providecommand\tikzlogo{Ti\textit{k}Z}
-\providecommand\TeXLive{\TeX{}Live\xspace}
-\providecommand\PSTricks{\textsf{PSTricks}\xspace}
-\let\pstricks\PSTricks
-\let\TikZ\tikzlogo
-\newcommand\TableauDocumentation{%
- \begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\sffamily}}
- {\LARGE \LaTeX} & & & & &\\
- & {\LARGE \hologo{pdfLaTeX}} & & & & \\
- & & {\LARGE \hologo{LuaLaTeX}} & & & \\
- & & & {\LARGE \TikZ} & & \\
- & & & & {\LARGE \TeXLive} & \\
- & & & & & {\LARGE \hologo{MiKTeX}} \\
- \end{tblr}
-}
-
-\usepackage{hyperref}
-\urlstyle{same}
-\hypersetup{pdfborder=0 0 0}
-\setlength{\parindent}{0pt}
-\definecolor{LightGray}{gray}{0.9}
-
-\usepackage{babel}
-%\AddThinSpaceBeforeFootnotes
-%\FrenchFootnotes
-
-\usepackage{listings}
-
-\usepackage{newverbs}
-\newverbcommand{\motcletex}{\color{cyan!75!black}}{}
-\newverbcommand{\packagetex}{\color{violet!75!black}}{}
-
-\usepackage[most]{tcolorbox}
-\tcbuselibrary{listingsutf8}
-\newtcblisting{DemoCode}[1][]{%
- enhanced,width=0.95\linewidth,center,%
- bicolor,size=title,%
- colback=cyan!2!white,%
- colbacklower=cyan!1!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={},%
- alsoletter={-},%
- keywordstyle={\color{blue}},%
- classoffset=1,%
- alsoletter={-},%
- morekeywords={center,justify},%
- keywordstyle={\color{violet}},%
- classoffset=2,%
- alsoletter={-},%
- morekeywords={WordleGrid},%
- keywordstyle={\color{green!50!black}},%
- classoffset=3,%
- morekeywords={Colors,Rounded,Unit,Font,ColorLetters,Letters,Style,Thickness,BorderColor},%
- keywordstyle={\color{orange}}
- },%
- #1
-}
-
-\tcbset{vignettes/.style={%
- nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,%
- boxrule=0.75pt,left=7pt,right=1pt,top=0pt,bottom=0.25pt,%
- }
-}
-
-\tcbset{vignetteMaJ/.style={%
- fontupper={\vphantom{pf}\footnotesize\ttfamily},
- vignettes,colframe=purple!50!black,coltitle=white,colback=purple!10,%
- overlay={\begin{tcbclipinterior}%
- \fill[fill=purple!75]($(interior.south west)$) rectangle node[rotate=90]{\tiny \sffamily{\textcolor{black}{\scalebox{0.66}[0.66]{\textbf{MàJ}}}}} ($(interior.north west)+(5pt,0pt)$);%
- \end{tcbclipinterior}}
- }
-}
-
-\newcommand\Cle[1]{{\small\sffamily\textlangle \textcolor{orange}{#1}\textrangle}}
-\newcommand\cmaj[1]{\tcbox[vignetteMaJ]{#1}\xspace}
-
-\begin{document}
-
-\setlength{\aweboxleftmargin}{0.07\linewidth}
-\setlength{\aweboxcontentwidth}{0.93\linewidth}
-\setlength{\aweboxvskip}{8pt}
-
-\pagestyle{fancy}
-
-\thispagestyle{empty}
-
-\vspace{2cm}
-
-\begin{center}
- \begin{minipage}{0.75\linewidth}
- \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
- \begin{center}
- \begin{tabular}{c}
- {\Huge \texttt{wordle} [en]}\\
- \\
- {\LARGE Grids of Wordle,} \\
- \\
- {\LARGE made with \textsf{Ti\textit{k}Z}.} \\
- \end{tabular}
-
- \bigskip
-
- {\small \texttt{Version \TPversion{} -- \TPdate}}
- \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/wordle}}
-\end{tabular}
-\end{center}
-
-\vspace{0.25cm}
-
-{$\blacktriangleright$~~Create Wordle grids Wordle/Sutom\footnotemark\footnotetext{\url{https://en.wikipedia.org/wiki/Wordle}}.}
-
-\vspace{0.25cm}
-
-{$\blacktriangleright$~~Specify colors and font\footnotemark\footnotetext{Ideas from \url{ttps://tex.stackexchange.com/questions/659860/wordle-like-colored-letter-boxes-in-latex}}.
-
-\vspace{0.5cm}
-
-\begin{center}
-\begin{WordleGrid}{CRAZE}
- GRAIL TRACK CRAMP CRABS CRAZY CRAZE
-\end{WordleGrid}
-\end{center}
-
-\begin{center}
-\begin{WordleGrid}[Rounded=0,Colors={lightgray,orange,teal},Style=alt,Unit=0.5,Letters=false]{LADLE}
- FLAIL LAPEL LADLE
-\end{WordleGrid}
-%
-\hspace{5mm}
-%
-\begin{WordleGrid}[Rounded=0,Colors={lightgray,orange,teal},Style=alt,Unit=0.5]{LADLE}
- FLAIL LAPEL LADLE
-\end{WordleGrid}
-\end{center}
-
-\vspace{0.25cm}
-
-%\hfill{}\textit{Merci à Denis Bitouzé et à Gilles Le Bourhis pour leurs retours et idées !}
-
-\smallskip
-
-\vfill
-
-\hrule
-
-\medskip
-
-\TableauDocumentation
-
-\medskip
-
-\hrule
-
-\vspace*{1cm}
-
-\newpage
-
-\phantomsection
-\hypertarget{matoc}{}
-
-\tableofcontents
-
-\vfill
-
-\section{History}
-
-\verb|v0.1.1|~:~~~~Bugfix with english version.
-
-\verb|v0.1.0|~:~~~~Initial version.
-
-\newpage
-
-\section{The wordle package}
-
-\subsection{The game}
-
-\begin{noteblock}
-Wordle is a web-based word game created and developed by Welsh software engineer Josh Wardle. Players have six attempts to guess a five-letter word, with feedback given for each guess in the form of colored tiles indicating when letters match or occupy the correct position.
-
-Every day, a five-letter word is chosen which players aim to guess within six tries. After every guess, each letter is marked as either green, yellow or gray: green indicates that letter is correct and in the correct position, yellow means it is in the answer but not in the right position, while gray indicates it is not in the answer at all. Multiple instances of the same letter in a guess, such as the "o"s in "robot", will be colored green or yellow only if the letter also appears multiple times in the answer; otherwise, excess repeating letters will be colored gray.
-
-\smallskip
-
-\hfill{\scriptsize \url{https://en.wikipedia.org/wiki/Wordle}}
-\end{noteblock}
-
-\subsection{The package}
-
-\begin{noteblock}
-This package can display, in a \textsf{tex} file, a wordle grid (with \TikZ{} and within a \motcletex!minipage!), with ability :
-
-\begin{itemize}
- \item to change dimensions and colors ;
- \item to pick style for misplaced letters ;
- \item to change borders and corners ;
- \item to print or not the letters.
-\end{itemize}
-
-It's possible to "play" with other words than five-letter words !
-\end{noteblock}
-
-\begin{importantblock}
-Most of source code, in \hologo{LaTeX3}, is given by thread from \texttt{tex.stackexchange}, proposed by user \textsf{3141592653589793238}.
-\end{importantblock}
-
-\subsection{Loading of the package, used packages}
-
-\begin{importantblock}
-The package \packagetex!wordle! loads within the preamble.
-
-There's no option, and \packagetex!xcolor! isn't loaded.
-\end{importantblock}
-
-\begin{DemoCode}[listing only]
-\documentclass{article}
-\usepackage{wordle}
-
-\end{DemoCode}
-
-\begin{noteblock}
-\packagetex!wordle! loads the following packages and libraries :
-
-\begin{itemize}
- \item \packagetex!tikz!;
- \item \packagetex!simplekv! ;
- \item \packagetex!xstring!.
-\end{itemize}
-
-It’s mostly compatible with \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex} compilation !
-\end{noteblock}
-
-\vfill~
-
-\pagebreak
-
-\section{WordleGrid environment}
-
-\subsection{Environment}
-
-\begin{cautionblock}
-The environment to display a Wordle grid is \packagetex!WordleGrid!.
-
-It works with keys, between \texttt{[...]} and needs to know :
-
-\begin{itemize}
- \item the good word ;
- \item the different guesses.
-\end{itemize}
-
-The code create the grid and the colors !
-\end{cautionblock}
-
-\begin{DemoCode}[listing only]
-\begin{WordleGrid}[keys]{good word}
- guess n°1
- guess n°2
- guess n°3
-\end{WordleGrid}
-\end{DemoCode}
-
-\begin{noteblock}
-the grid is created with a \motcletex!minipage!, with automatic width and spacings !
-\end{noteblock}
-
-\begin{DemoCode}[]
-%default output
-\begin{WordleGrid}{REBUS}
- ARISE
- ROUTE
- RULES
- REBUS
-\end{WordleGrid}
-\end{DemoCode}
-
-\subsection{Keys and options}
-
-\begin{tipblock}
-The first argument, mandatory and between \texttt{[...]}, proposes the following \Cle{keys} :
-
-\begin{itemize}
- \item \Cle{Colors} : = colors of the boxes \Cle{back,misplaced,good} ;
-
- \hfill{}default : \Cle{WordleBack,WordleBad,WordleGood},%
- \item \Cle{Rounded} := arc for corners, in mm ; \hfill{}default : \Cle{0.1}
- \item \Cle{Unit} := width of cases, in cm ; \hfill{}default : \Cle{1}
- \item \Cle{Font} := font for letters ; \hfill{}default : \Cle{\textbackslash LARGE\textbackslash bfseries\textbackslash sffamily}
- \item \Cle{ColorLetters} := color for letters ; \hfill{}default : \Cle{white}
- \item \Cle{BorderColor} := color fot the border ; \hfill{}default : \Cle{white}
- \item \Cle{Letters} := boolean to print letters ; \hfill{}default : \Cle{true}
- \item \Cle{Style} := style within \Cle{default / other} to change the style ; \hfill{}default : \Cle{default}
- \item \Cle{Thick} := thickness of the borders, in mm. \hfill{}default : \Cle{0.25}
-\end{itemize}
-\vspace*{-\baselineskip}\leavevmode
-\end{tipblock}
-
-\begin{tipblock}
-The second argument, optional and between \texttt{\{...\}} is the correct word.
-
-\smallskip
-
-Different guesses are given within the body of the environment (line by line or space separated).
-\end{tipblock}
-
-\subsection{Examples}
-
-\begin{DemoCode}[]
-\begin{WordleGrid}{BURGH}
- ABATE
- HERBS
- BURLY
- BURGH
-\end{WordleGrid}
-%
-\hspace{5mm}
-%
-\begin{WordleGrid}[Style=alt]{BURGH}
- ABATE HERBS BURLY BURGH
-\end{WordleGrid}
-\end{DemoCode}
-
-\begin{DemoCode}[]
-\begin{WordleGrid}
- [Thickness=0.3,BorderColor=black,%
- Colors={lightgray,orange,teal}]{BURGH}
- ABATE
- HERBS
- BURLY
- BURGH
-\end{WordleGrid}
-%
-\hspace{5mm}
-%
-\begin{WordleGrid}
- [Rounded=0,Thickness=0.3,BorderColor=black,%
- Colors={lightgray,orange,teal}]{BURGH}
- ABATE
- HERBS
- BURLY
- BURGH
-\end{WordleGrid}
-\end{DemoCode}
-
-\begin{DemoCode}[]
-\begin{WordleGrid}[Unit=2,Font=\Huge\ttfamily,ColorLetters=black]{BURGH}
- ABATE
- HERBS
- BURLY
- BURGH
-\end{WordleGrid}
-\end{DemoCode}
-
-\begin{DemoCode}[]
-\begin{WordleGrid}%
- [Unit=0.75,Rounded=0,Colors={cyan,orange,violet},Letters=false]{BURGH}
- ABATE
- HERBS
- BURLY
- BURGH
-\end{WordleGrid}
-\hspace{5mm}
-\begin{WordleGrid}%
- [Unit=0.75,Rounded=0,Colors={cyan,orange,violet},Style=alt]
- {BURGH}
- ABATE
- HERBS
- BURLY
- BURGH
-\end{WordleGrid}
-\hspace{5mm}
-\begin{WordleGrid}%
- [Unit=0.75,Rounded=0,Colors={cyan,orange,violet},Style=alt,Letters=false]
- {BURGH}
- ABATE
- HERBS
- BURLY
- BURGH
-\end{WordleGrid}
-\end{DemoCode}
-
-\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/wordle/doc/wordle-doc-fr.pdf b/graphics/pgf/contrib/wordle/doc/wordle-doc-fr.pdf
deleted file mode 100644
index 3277ca9a99..0000000000
--- a/graphics/pgf/contrib/wordle/doc/wordle-doc-fr.pdf
+++ /dev/null
Binary files differ
diff --git a/graphics/pgf/contrib/wordle/doc/wordle-doc-fr.tex b/graphics/pgf/contrib/wordle/doc/wordle-doc-fr.tex
deleted file mode 100644
index f365cbb459..0000000000
--- a/graphics/pgf/contrib/wordle/doc/wordle-doc-fr.tex
+++ /dev/null
@@ -1,422 +0,0 @@
-% !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[french,a4paper,11pt]{article}
-\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.1}
-\def\TPdate{3 septembre 2023}
-\usepackage{amssymb,amsfonts,amsmath}
-\usepackage[utf8]{inputenc}
-%\usepackage[T1]{fontenc}
-\usepackage{wordle}
-\usepackage{awesomebox}
-\usepackage{fontawesome5}
-\usepackage{footnote}
-\makesavenoteenv{tabular}
-\usepackage{enumitem}
-\usepackage{tabularray}
-\usepackage{fancyvrb}
-\usepackage{fancyhdr}
-\fancyhf{}
-\renewcommand{\headrulewidth}{0pt}
-\lfoot{\sffamily\small [wordle]}
-\cfoot{\sffamily\small - \thepage{} -}
-\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
-
-%\usepackage{hvlogos}
-\usepackage{hologo}
-\providecommand\tikzlogo{Ti\textit{k}Z}
-\providecommand\TeXLive{\TeX{}Live\xspace}
-\providecommand\PSTricks{\textsf{PSTricks}\xspace}
-\let\pstricks\PSTricks
-\let\TikZ\tikzlogo
-\newcommand\TableauDocumentation{%
- \begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\sffamily}}
- {\LARGE \LaTeX} & & & & &\\
- & {\LARGE \hologo{pdfLaTeX}} & & & & \\
- & & {\LARGE \hologo{LuaLaTeX}} & & & \\
- & & & {\LARGE \TikZ} & & \\
- & & & & {\LARGE \TeXLive} & \\
- & & & & & {\LARGE \hologo{MiKTeX}} \\
- \end{tblr}
-}
-
-\usepackage{hyperref}
-\urlstyle{same}
-\hypersetup{pdfborder=0 0 0}
-\setlength{\parindent}{0pt}
-\definecolor{LightGray}{gray}{0.9}
-
-\usepackage{babel}
-\AddThinSpaceBeforeFootnotes
-\FrenchFootnotes
-
-\usepackage{listings}
-
-\usepackage{newverbs}
-\newverbcommand{\motcletex}{\color{cyan!75!black}}{}
-\newverbcommand{\packagetex}{\color{violet!75!black}}{}
-
-\usepackage[most]{tcolorbox}
-\tcbuselibrary{listingsutf8}
-\newtcblisting{DemoCode}[1][]{%
- enhanced,width=0.95\linewidth,center,%
- bicolor,size=title,%
- colback=cyan!2!white,%
- colbacklower=cyan!1!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={},%
- alsoletter={-},%
- keywordstyle={\color{blue}},%
- classoffset=1,%
- alsoletter={-},%
- morekeywords={center,justify},%
- keywordstyle={\color{violet}},%
- classoffset=2,%
- alsoletter={-},%
- morekeywords={GrilleSutom},%
- keywordstyle={\color{green!50!black}},%
- classoffset=3,%
- morekeywords={Couleurs,Arrondi,Unite,Police,CouleurLettres,Lettres,Style,Epaisseur,CouleurBordure},%
- keywordstyle={\color{orange}}
- },%
- #1
-}
-
-\tcbset{vignettes/.style={%
- nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,%
- boxrule=0.75pt,left=7pt,right=1pt,top=0pt,bottom=0.25pt,%
- }
-}
-
-\tcbset{vignetteMaJ/.style={%
- fontupper={\vphantom{pf}\footnotesize\ttfamily},
- vignettes,colframe=purple!50!black,coltitle=white,colback=purple!10,%
- overlay={\begin{tcbclipinterior}%
- \fill[fill=purple!75]($(interior.south west)$) rectangle node[rotate=90]{\tiny \sffamily{\textcolor{black}{\scalebox{0.66}[0.66]{\textbf{MàJ}}}}} ($(interior.north west)+(5pt,0pt)$);%
- \end{tcbclipinterior}}
- }
-}
-
-\newcommand\Cle[1]{{\small\sffamily\textlangle \textcolor{orange}{#1}\textrangle}}
-\newcommand\cmaj[1]{\tcbox[vignetteMaJ]{#1}\xspace}
-
-\begin{document}
-
-\setlength{\aweboxleftmargin}{0.07\linewidth}
-\setlength{\aweboxcontentwidth}{0.93\linewidth}
-\setlength{\aweboxvskip}{8pt}
-
-\pagestyle{fancy}
-
-\thispagestyle{empty}
-
-\vspace{2cm}
-
-\begin{center}
- \begin{minipage}{0.75\linewidth}
- \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
- \begin{center}
- \begin{tabular}{c}
- {\Huge \texttt{wordle} [fr]}\\
- \\
- {\LARGE Des grilles de Wordle (Sutom),} \\
- \\
- {\LARGE avec \textsf{Ti\textit{k}Z}.} \\
- \end{tabular}
-
- \bigskip
-
- {\small \texttt{Version \TPversion{} -- \TPdate}}
- \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/wordle}}
-\end{tabular}
-\end{center}
-
-\vspace{0.25cm}
-
-{$\blacktriangleright$~~Créer des grilles de Wordle/Sutom\footnotemark\footnotetext{\url{https://fr.wikipedia.org/wiki/Wordle}}.}
-
-\vspace{0.25cm}
-
-{$\blacktriangleright$~~Gestion des couleurs, de la taille\footnotemark\footnotetext{Idées venant de \url{ttps://tex.stackexchange.com/questions/659860/wordle-like-colored-letter-boxes-in-latex}}.
-
-\vspace{1cm}
-
-\begin{center}
-\begin{GrilleSutom}{LUCIOLE}
- LAPINES
- LUMIERE
- LOURDES
- LUCIOLE
-\end{GrilleSutom}
-\end{center}
-
-\medskip
-
-\begin{center}
-\begin{GrilleSutom}[Arrondi=0,Couleurs={lightgray,orange,teal},Style=alt,Unite=0.5,Lettres=false]{REBUS}
- ABRIS
- ROUTE
- RUDES
- REBUS
-\end{GrilleSutom}
-%
-\hspace{5mm}
-%
-\begin{GrilleSutom}[Arrondi=0,Couleurs={lightgray,orange,teal},Style=alt,Unite=0.5]{REBUS}
- ABRIS
- ROUTE
- RUDES
- REBUS
-\end{GrilleSutom}
-\end{center}
-
-\vspace{0.5cm}
-
-%\hfill{}\textit{Merci à Denis Bitouzé et à Gilles Le Bourhis pour leurs retours et idées !}
-
-\smallskip
-
-\vfill
-
-\hrule
-
-\medskip
-
-\TableauDocumentation
-
-\medskip
-
-\hrule
-
-\vspace*{1cm}
-
-\newpage
-
-\phantomsection
-\hypertarget{matoc}{}
-
-\tableofcontents
-
-\vfill
-
-\section{Historique}
-
-\verb|v0.1.0|~:~~~~Correction d'un bug avec la version anglaise.
-
-\verb|v0.1.0|~:~~~~Version initiale.
-
-\newpage
-
-\section{Le package wordle}
-
-\subsection{Le principe du jeu}
-
-\begin{noteblock}
-Wordle est un jeu de lettres en ligne gratuit développé en 2021 par Josh Wardle. Ce jeu est une adaptation directe du jeu télévisé américain Lingo (Motus en France) qui propose de faire deviner un mot par plusieurs tentatives, en indiquant pour chacune d'entre-elles la position des lettres bien placées et mal placées.
-
-Le but du jeu est de deviner un mot spécifique de cinq lettres en un maximum de six tentatives, en tapant des lettres sur un écran de six lignes de cinq cases chacune. La personne qui joue inscrit sur la première ligne un mot de cinq lettres de son choix et entre sa proposition. Après chaque proposition, les lettres apparaissent en couleurs : le fond gris représente les lettres qui ne se trouvent pas dans le mot recherché, le fond jaune représente les lettres qui se trouvent ailleurs dans le mot, et le fond vert représente les lettres qui se trouvent à la bonne place dans le mot à trouver.
-
-\smallskip
-
-\hfill{\scriptsize \url{https://fr.wikipedia.org/wiki/Wordle}}
-\end{noteblock}
-
-\subsection{Le package}
-
-\begin{noteblock}
-Le package propose de quoi afficher, dans son document \LaTeX, une grille de Wordle (ou de Sutom) à l'aide de \TikZ{} et d'une \motcletex!minipage!, avec la possibilité :
-
-\begin{itemize}
- \item de spécifier les dimensions, la couleur ;
- \item de choisir le style des lettres mal placées ;
- \item de personnaliser les bordure et les coins ;
- \item d'afficher ou non les lettres.
-\end{itemize}
-
-Contrairement au jeu \og initial \fg, il est possible de travailler avec des mots de longueur différente de 5 !
-\end{noteblock}
-
-\begin{importantblock}
-Une bonne partie du code, en \hologo{LaTeX3}, est issu d'un fil sur \texttt{tex.stackexchange}, et proposé par l'internaute \textsf{3141592653589793238}.
-\end{importantblock}
-
-\subsection{Chargement du package, packages utilisés}
-
-\begin{importantblock}
-Le package se charge, de manière classique, dans le préambule.
-
-Il n'existe pas d'option pour le package, et \packagetex!xcolor! n'est pas chargé.
-\end{importantblock}
-
-\begin{DemoCode}[listing only]
-\documentclass{article}
-\usepackage{wordle}
-
-\end{DemoCode}
-
-\begin{noteblock}
-\packagetex!wordle! charge les packages suivants :
-
-\begin{itemize}
- \item \packagetex!tikz!;
- \item \packagetex!simplekv! ;
- \item \packagetex!xstring!.
-\end{itemize}
-
-Il est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}.
-\end{noteblock}
-
-\vfill~
-
-\pagebreak
-
-\section{Environnement GrilleSutom}
-
-\subsection{Fonctionnement global}
-
-\begin{cautionblock}
-L'environnement dédié à la création de la grille du Sutom est \packagetex!GrilleSutom!.
-
-Il fonctionne avec un système de clés, entre \texttt{[...]}, et nécessite de préciser :
-
-\begin{itemize}
- \item le bon mot ;
- \item les différentes propositions.
-\end{itemize}
-
-Le code se charge de mettre en forme (grâce à une \motcletex!minipage!) la grille et les différentes couleurs d'aide.
-\end{cautionblock}
-
-\begin{DemoCode}[listing only]
-\begin{GrilleSutom}[clés]{mot à trouver}
- proposition n°1
- proposition n°2
- proposition n°3
-\end{GrilleSutom}
-\end{DemoCode}
-
-\begin{noteblock}
-Comme indiqué dans l'introduction, la grille est créée à l'aide d'un environnement \motcletex!minipage!, avec gestion automatique de la largeur et des espacements.
-\end{noteblock}
-
-\begin{DemoCode}[]
-%sortie par défaut
-\begin{GrilleSutom}{SUTOM}
- SAUCE
- SAUTS
- SUTOM
-\end{GrilleSutom}
-\end{DemoCode}
-
-\subsection{Clés et options}
-
-\begin{tipblock}
-Le premier argument, optionnel et entre \texttt{[...]}, propose les \Cle{clés} suivantes :
-
-\begin{itemize}
- \item \Cle{Couleurs} : = couleur des cases, sous la forme \Cle{fond,mal placée,bien placée} ;
-
- \hfill{}défaut : \Cle{cyan!75!black,yellow,red},%
- \item \Cle{Arrondi} := arrondi des coins, en mm ; \hfill{}défaut : \Cle{0.1}
- \item \Cle{Unite} := largeur des cases, en cm ; \hfill{}défaut : \Cle{1}
- \item \Cle{Police} := police des lettres ; \hfill{}défaut : \Cle{\textbackslash LARGE\textbackslash bfseries\textbackslash sffamily}
- \item \Cle{CouleurLettres} := couleur des lettres ; \hfill{}défaut : \Cle{white}
- \item \Cle{CouleurBordure} := couleur de la bordure des cases ; \hfill{}défaut : \Cle{white}
- \item \Cle{Lettres} := booléen pour afficher les lettre ; \hfill{}défaut : \Cle{true}
- \item \Cle{Style} := style parmi \Cle{rond / autre} pour changer le style ; \hfill{}défaut : \Cle{rond}
- \item \Cle{Epaisseur} := épaisseur des traits, en mm. \hfill{}défaut : \Cle{0.25}
-\end{itemize}
-\vspace*{-\baselineskip}\leavevmode
-\end{tipblock}
-
-\begin{tipblock}
-Le second argument, obligatoire et entre \texttt{\{...\}} correspond au mot correct à trouver.
-
-\smallskip
-
-Les différentes propositions sont à donner (ligne par ligne ou séparées par des espaces) dans le corps de l'environnement.
-\end{tipblock}
-
-\subsection{Exemples}
-
-\begin{DemoCode}[]
-\begin{GrilleSutom}{BOURDON}
- BALEINE
- BOURBON
- BROMURE
- BOURDON
-\end{GrilleSutom}
-%
-\hspace{5mm}
-%
-\begin{GrilleSutom}[Style=alt]{BOURDON}
- BALEINE BOURBON BROMURE BOURDON
-\end{GrilleSutom}
-\end{DemoCode}
-
-\begin{DemoCode}[]
-\begin{GrilleSutom}
- [Style=alt,Epaisseur=0.3,CouleurBordure=black,%
- Couleurs={lightgray,orange,teal}]%
- {BOURDON}
- BALEINE BOURBON BROMURE BOURDON
-\end{GrilleSutom}
-%
-\hspace{5mm}
-%
-\begin{GrilleSutom}
- [Arrondi=0,Epaisseur=0.3,CouleurBordure=black,%
- Couleurs={lightgray,orange,teal}]%
- {BOURDON}
- BALEINE BOURBON BROMURE BOURDON
-\end{GrilleSutom}
-\end{DemoCode}
-
-\begin{DemoCode}[]
-\begin{GrilleSutom}[Unite=2,Police=\Huge\ttfamily,CouleurLettres=black]{BOURDON}
- BALEINE
- BOURBON
- BROMURE
- BOURDON
-\end{GrilleSutom}
-\end{DemoCode}
-
-\begin{DemoCode}[]
-\begin{GrilleSutom}%
- [Unite=0.75,Arrondi=0,Couleurs={cyan,orange,violet},%
- Style=alt,Lettres=false]{REBUS}
- ABRIS
- ROUTE
- RUDES
- REBUS
-\end{GrilleSutom}
-\hspace{5mm}
-\begin{GrilleSutom}%
- [Unite=0.75,Arrondi=0,Couleurs={cyan,orange,violet},Style=alt]{REBUS}
- ABRIS
- ROUTE
- RUDES
- REBUS
-\end{GrilleSutom}
-\end{DemoCode}
-
-\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/wordle/tex/wordle.sty b/graphics/pgf/contrib/wordle/tex/wordle.sty
deleted file mode 100644
index 4df1801ba0..0000000000
--- a/graphics/pgf/contrib/wordle/tex/wordle.sty
+++ /dev/null
@@ -1,298 +0,0 @@
-% Author.........: C. Pierquet
-% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
-% Inspiration....: https://tex.stackexchange.com/questions/659860/wordle-like-colored-letter-boxes-in-latex
-
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{wordle}[2023/09/03 v0.1.1 Wordle grid]
-% 0.1.1 Coorection d'un bug sur la version anglaise
-% 0.1.0 Version initiale + quelques modèles
-
-%------Packages utiles
-\RequirePackage{tikz}
-\RequirePackage{simplekv}
-\RequirePackage{xstring}
-
-%commandes utiles
-\usepackage{expl3}
-\ExplSyntaxOn
-
-%boite en [fr]
-\cs_new:Npn \l__sutom_boite_lettre:nn #1#2#3
-{
- \ifboolKV[SUTOM]{Lettres}%
- {%
- \tikz \draw[rounded~corners=\fpeval{#3*\SutomUnit}cm,draw=\SutomBorder,line~width=\SutomWidth~mm,fill=#1] (0,0) rectangle++ (\SutomUnit,\SutomUnit) node[midway,font=\SutomFonte,text=\SutomFonteColor,scale=\SutomUnit] {#2} ;
- }%
- {%
- \tikz \draw[rounded~corners=\fpeval{#3*\SutomUnit}cm,draw=\SutomBorder,line~width=\SutomWidth~mm,fill=#1] (0,0) rectangle++ (\SutomUnit,\SutomUnit) ;
- }%
-}
-
-\cs_new:Npn \l__sutom_boite_lettre_rond:nn #1#2#3#4
-{
- \IfStrEq{\SutomStyle}{rond}
- {%
- \tikz {\draw[rounded~corners=\fpeval{#4*\SutomUnit}cm,draw=\SutomBorder,line~width=\SutomWidth~mm,fill=#1] (0,0) rectangle++ (\SutomUnit,\SutomUnit) ;
- \ifboolKV[SUTOM]{Lettres}%
- {%
- \draw[line~width=\SutomWidth~mm,draw=#2,fill=#2] ({0.5*\SutomUnit},{0.5*\SutomUnit}) circle[radius=\fpeval{0.5*\SutomUnit-0.1*\SutomWidth}] node[font=\SutomFonte,text=\SutomFonteColor,scale=\SutomUnit] {#3} ;
- }%
- {%
- \draw[line~width=\SutomWidth~mm,draw=#2,fill=#2] ({0.5*\SutomUnit},{0.5*\SutomUnit}) circle[radius=\fpeval{0.5*\SutomUnit-0.1*\SutomWidth}];
- }%
- }%
- }%
- {%
- \ifboolKV[SUTOM]{Lettres}%
- {%
- \tikz \draw[rounded~corners=\fpeval{#4*\SutomUnit}cm,line~width=0\SutomWidth~mm,draw=\SutomBorder,fill=#2] (0,0) rectangle++ (\SutomUnit,\SutomUnit) node[midway,font=\SutomFonte,text=\SutomFonteColor,scale=\SutomUnit] {#3} ;
- }%
- {%
- \tikz \draw[rounded~corners=\fpeval{#4*\SutomUnit}cm,line~width=\SutomWidth~mm,draw=\SutomBorder,fill=#2] (0,0) rectangle++ (\SutomUnit,\SutomUnit) ;
- }%
- }%
-}
-
-%boite en [en]
-\cs_new:Npn \l__wordle_boite_lettre:nn #1#2#3
-{
- \ifboolKV[WORDLE]{Letters}%
- {%
- \tikz \draw[rounded~corners=\fpeval{#3*\SutomUnit}cm,draw=\SutomBorder,line~width=\SutomWidth~mm,fill=#1] (0,0) rectangle++ (\SutomUnit,\SutomUnit) node[midway,font=\SutomFonte,text=\SutomFonteColor,scale=\SutomUnit] {#2} ;
- }%
- {%
- \tikz \draw[rounded~corners=\fpeval{#3*\SutomUnit}cm,draw=\SutomBorder,line~width=\SutomWidth~mm,fill=#1] (0,0) rectangle++ (\SutomUnit,\SutomUnit) ;
- }%
-}
-
-\cs_new:Npn \l__wordle_boite_lettre_rond:nn #1#2#3#4
-{
- \IfStrEq{\SutomStyle}{default}
- {%
- \ifboolKV[WORDLE]{Letters}%
- {%
- \tikz \draw[rounded~corners=\fpeval{#4*\SutomUnit}cm,line~width=\SutomWidth~mm,draw=\SutomBorder,fill=#2] (0,0) rectangle++ (\SutomUnit,\SutomUnit) node[midway,font=\SutomFonte,text=\SutomFonteColor,scale=\SutomUnit] {#3} ;
- }%
- {%
- \tikz \draw[rounded~corners=\fpeval{#4*\SutomUnit}cm,line~width=\SutomWidth~mm,draw=\SutomBorder,fill=#2] (0,0) rectangle++ (\SutomUnit,\SutomUnit) ;
- }%
- }%
- {%
- \tikz {\draw[rounded~corners=\fpeval{#4*\SutomUnit}cm,draw=\SutomBorder,line~width=\SutomWidth~mm,fill=#1] (0,0) rectangle++ (\SutomUnit,\SutomUnit) ;
- \ifboolKV[WORDLE]{Letters}%
- {%
- \draw[line~width=\SutomWidth~mm,draw=#2,fill=#2] ({0.5*\SutomUnit},{0.5*\SutomUnit}) circle[radius=\fpeval{0.5*\SutomUnit-0.1*\SutomWidth}] node[font=\SutomFonte,text=\SutomFonteColor,scale=\SutomUnit] {#3} ;
- }%
- {%
- \draw[line~width=\SutomWidth~mm,draw=#2,fill=#2] ({0.5*\SutomUnit},{0.5*\SutomUnit}) circle[radius=\fpeval{0.5*\SutomUnit-0.1*\SutomWidth}];
- }%
- }%
- }%
-}
-
-\seq_new:N \l_wordle_seq % the answer
-\prop_new:N \l_wordle_prop % count letters in wordle
-\seq_new:N \l_words_seq % list of all words
-\prop_new:N \l_word_prop % count letters in word
-\int_new:N \l_letter_int % index of current letter in word
-
-% a conditional for nonnegative prop counter in \l_word_prop
-\prg_new_protected_conditional:Npnn \if_wordle_letter_nonnegative:n #1 {TF}
-{
- \prop_if_in:NnTF \l_word_prop {#1}
- { % letter in in prop
- \prop_get:NnN \l_word_prop {#1} \l_tmpa_tl
- \int_compare:nNnTF {\l_tmpa_tl} < {0}
- {\prg_return_false:} {\prg_return_true:}
- }
- {\prg_return_false:}
-}
-
-% a conditional for comparing letters
-\prg_new_protected_conditional:Npnn \if_wordle_letters_agree:n #1 {T, TF}
-{
- \str_set:Nx \l_tmpa_str {\seq_item:Nn \l_wordle_seq {\l_letter_int}}
- \str_if_eq:nVTF {#1} \l_tmpa_str {\prg_return_true:} {\prg_return_false:}
-}
-
-% add #3 to <prop=#1>.#2
-\cs_new_protected:Npn \wordle__add_to_prop_counter:Nnn #1#2#3
-{
- \prop_put_if_new:Nnn #1 {#2} {0}
- \prop_pop:NnN #1 {#2} \l_tmp_a
- \prop_put:Nnx #1 {#2} {\int_eval:n {#3+\l_tmp_a}}
-}
-
-% make \l_wordle_prop<x> = #x's in wordle_seq
-\cs_new_protected:Npn \count_letters_in_wordle:n #1
-{
- \wordle__add_to_prop_counter:Nnn \l_wordle_prop {#1} {1}%
-}
-
-% first run: subtract correct matches from letter counts
-\cs_new:Npn \count_letters_in_word:n #1
-{
- \int_incr:N \l_letter_int
- \if_wordle_letters_agree:nT {#1}
- { \wordle__add_to_prop_counter:Nnn \l_word_prop {#1} {-1} }%
-}
-
-%commande [fr]
-% on the second run we print a coloured wordle word
-\cs_new:Npn \write_letters_in_word:n #1
-{
- \int_incr:N \l_letter_int
- \if_wordle_letters_agree:nTF {#1}
- { \l__sutom_boite_lettre:nn {\SutomBienPlacee}{#1}{\SutomRounded} }
- {
- % subtract 1 from the prop counter
- \wordle__add_to_prop_counter:Nnn \l_word_prop {#1} {-1}
- % if the counter is non-negative this is a pseudo match
- \if_wordle_letter_nonnegative:nTF {#1}
- { \l__sutom_boite_lettre_rond:nn {\SutomCoulFond}{\SutomCoulMalPlacee}{#1}{\SutomRounded} }
- { \l__sutom_boite_lettre:nn {\SutomCoulFond}{#1}{\SutomRounded} }
- }%
-}
-
-%commande [en]
-% on the second run we print a coloured wordle word
-\cs_new:Npn \write_letters_in_wordle:n #1
-{
- \int_incr:N \l_letter_int
- \if_wordle_letters_agree:nTF {#1}
- { \l__wordle_boite_lettre:nn {\SutomBienPlacee}{#1}{\SutomRounded} }
- {
- % subtract 1 from the prop counter
- \wordle__add_to_prop_counter:Nnn \l_word_prop {#1} {-1}
- % if the counter is non-negative this is a pseudo match
- \if_wordle_letter_nonnegative:nTF {#1}
- { \l__wordle_boite_lettre_rond:nn {\SutomCoulFond}{\SutomCoulMalPlacee}{#1}{\SutomRounded} }
- { \l__wordle_boite_lettre:nn {\SutomCoulFond}{#1}{\SutomRounded} }
- }%
-}
-
-%clés [fr]
-\defKV[SUTOM]{%
- Couleurs=\def\SutomCouleurs{#1},%
- Arrondi=\def\SutomRounded{#1},%
- Unite=\def\SutomUnit{#1},%
- Police=\def\SutomFonte{#1},%
- CouleurLettres=\def\SutomFonteColor{#1},%
- Style=\def\SutomStyle{#1},%
- Epaisseur=\def\SutomWidth{#1},%
- CouleurBordure=\def\SutomBorder{#1}
-}
-
-\setKVdefault[SUTOM]{%
- Couleurs={cyan!75!black,yellow,red},%
- Arrondi=0.1,%
- Unite=1,%
- Police=\LARGE\bfseries\sffamily,%
- CouleurLettres=white,%
- Lettres=true,%
- Style=rond,%
- Epaisseur=0.25,%
- CouleurBordure=white
-}
-
-%environnement [fr]
-\NewDocumentEnvironment{GrilleSutom}{ O{} m b }%
-{%
- \restoreKV[SUTOM]%
- \setKV[SUTOM]{#1}%
- \StrBefore{\SutomCouleurs}{,}[\SutomCoulFond]%
- \StrBetween[1,2]{\SutomCouleurs}{,}{,}[\SutomCoulMalPlacee]%
- \StrBehind[2]{\SutomCouleurs}{,}[\SutomBienPlacee]%
- \StrLen{#2}[\SutomNbLettres]%
- \def\SutomLarg{\fpeval{1.01*\SutomUnit*\SutomNbLettres}}%
- \begin{minipage}{\SutomLarg~cm}
- \lineskip=0pt%
- \parindent=0pt%
- % split the answer into letters
- \seq_set_split:Nnn \l_wordle_seq {} {#2}
- % we need to count the number of times each letter appears in \l_wordle_seq
- \prop_clear:N \l_wordle_prop
- \tl_map_function:nN {#2} \count_letters_in_wordle:n
- % split the solution into words
- \regex_split:nnN {\s} {#3} \l_words_seq
- % process the words
- \seq_map_inline:Nn \l_words_seq
- {
- \int_zero:N \l_letter_int
- \prop_set_eq:NN \l_word_prop \l_wordle_prop
- \tl_map_function:nN {##1} \count_letters_in_word:n
- \int_zero:N \l_letter_int
- \tl_map_function:nN {##1} \write_letters_in_word:n
- \par
- }
-}%
-{%
- \end{minipage}%
-}
-
-%clés [en]
-\definecolor{WordleBack}{HTML}{797D7F}
-\definecolor{WordleBad}{HTML}{CAB557}
-\definecolor{WordleGood}{HTML}{6AAB64}
-
-\defKV[WORDLE]{%
- Colors=\def\SutomCouleurs{#1},%
- Rounded=\def\SutomRounded{#1},%
- Unit=\def\SutomUnit{#1},%
- Fonte=\def\SutomFonte{#1},%
- ColorLetters=\def\SutomFonteColor{#1},%
- Style=\def\SutomStyle{#1},%
- Thickness=\def\SutomWidth{#1},%
- BorderColor=\def\SutomBorder{#1}
-}
-
-\setKVdefault[WORDLE]{%
- Colors={WordleBack,WordleBad,WordleGood},%
- Rounded=0.1,%
- Unit=1,%
- Fonte=\LARGE\bfseries\sffamily,%
- CouleurLettres=white,%
- Letters=true,%
- Style=default,%
- Thick=0.25,%
- BorderColor=white
-}
-
-%environnement [en]
-\NewDocumentEnvironment{WordleGrid}{ O{} m b }
-{%
- \restoreKV[WORDLE]%
- \setKV[WORDLE]{#1}%
- \StrBefore{\SutomCouleurs}{,}[\SutomCoulFond]%
- \StrBetween[1,2]{\SutomCouleurs}{,}{,}[\SutomCoulMalPlacee]%
- \StrBehind[2]{\SutomCouleurs}{,}[\SutomBienPlacee]%
- \StrLen{#2}[\SutomNbLettres]%
- \def\SutomLarg{\fpeval{1.01*\SutomUnit*\SutomNbLettres}}%
- \begin{minipage}{\SutomLarg~cm}
- \parindent=0pt
- \lineskip=0pt
- % split the answer into letters
- \seq_set_split:Nnn \l_wordle_seq {} {#2}
- % we need to count the number of times each letter appears in \l_wordle_seq
- \prop_clear:N \l_wordle_prop
- \tl_map_function:nN {#2} \count_letters_in_wordle:n
- % split the solution into words
- \regex_split:nnN {\s} {#3} \l_words_seq
- % process the words
- \seq_map_inline:Nn \l_words_seq
- {
- \int_zero:N \l_letter_int
- \prop_set_eq:NN \l_word_prop \l_wordle_prop
- \tl_map_function:nN {##1} \count_letters_in_word:n
- \int_zero:N \l_letter_int
- \tl_map_function:nN {##1} \write_letters_in_wordle:n
- \par
- }
-}%
-{%
- \end{minipage}%
-}
-
-\ExplSyntaxOff
-
-\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/wordle/wordle-doc-en.pdf b/graphics/pgf/contrib/wordle/wordle-doc-en.pdf
new file mode 100644
index 0000000000..7845bc31b5
--- /dev/null
+++ b/graphics/pgf/contrib/wordle/wordle-doc-en.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/wordle/wordle-doc-en.tex b/graphics/pgf/contrib/wordle/wordle-doc-en.tex
new file mode 100644
index 0000000000..a638ed9496
--- /dev/null
+++ b/graphics/pgf/contrib/wordle/wordle-doc-en.tex
@@ -0,0 +1,921 @@
+% !TeX TS-program = pdflatex
+
+\documentclass[svgnames]{report}
+\usepackage{wordle}
+\usepackage{manfnt}
+\usepackage{enumitem}
+\setlist[description]{font=\sffamily\bfseries\color{ForestGreen},labelwidth=\textwidth}
+\usepackage{booktabs}
+\usepackage[a4paper,margin=18mm]{geometry}
+\synctex=1
+\parindent=0pt
+\parskip=2mm
+
+\usepackage{cmap} % fix search and cut-and-paste in Acrobat
+\setcounter{secnumdepth}{0}
+
+\usepackage{listings}\lstset{language=[LaTeX]TeX,framerule=2pt}
+\lstset{language=[LaTeX]TeX,
+ texcsstyle=*\bfseries\color{Peru},
+ backgroundcolor=\color{Ivory},
+ numbers=none,
+ breaklines=true,
+ keywordstyle=\color{Sienna},
+ commentstyle=\color{BurlyWood},
+ tabsize=2,
+ morekeywords={Wordle,wordle,GrilleSutom},
+ resetmargins=true,
+}
+% hyperref links to ctan
+\newcommand\ctan[1]{\href{https://www.ctan.org/pkg/#1}{\texttt{#1}}}
+
+\newcommand\Section[1]{\subsection{\textcolor{DarkGreen}{#1}}}
+
+\ExplSyntaxOn
+\NewDocumentCommand\option{ omo }{%
+ \IfNoValueTF{#1}{\textsf{#2}}
+ {%
+ \textbf{\textcolor{Crimson}{#2}}
+ \str_if_empty:nF {#1}{~(default:~\textcolor{DarkRed}{#1})}%
+ \IfNoValueF{#3}{\hfill\textcolor{Gray}{[accepts:~#3]}}%
+ }%
+ \index{#2}%
+}
+\ExplSyntaxOff
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{imakeidx}
+\indexsetup{level=\section*, toclevel=section, noclearpage}
+\makeindex[intoc,columns=3]
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage[skins,listings]{tcolorbox}
+\usetikzlibrary{backgrounds, shapes.geometric} % for tikz={framed,...}
+
+\DeclareTotalTCBox\keyword{ O{} v }{
+ fontupper=\sffamily,
+ nobeforeafter,
+ skin=tile,
+ verbatim,
+ on line,
+ tcbox raise base,
+ top=0pt,bottom=0pt,left=0mm,right=0mm,
+ colback=OldLace,
+ colupper=ForestGreen,
+ #1}
+{#2}
+
+\lstdefinestyle{tikz}{style=tcblatex,
+ classoffset=0,
+ texcsstyle=*\color{DarkGoldenrod},%
+ deletetexcs={begin, end},
+ moretexcs={,%
+ node,
+ draw,
+ true,
+ false
+ },%
+ classoffset=1,
+ keywordstyle=\color{ForestGreen},%
+ morekeywords={wordle,GrilleSutom},
+ classoffset=2,
+ keywordstyle=\color{Crimson},%
+ morekeywords={
+ absent,
+ align,
+ border,
+ borders,
+ case,
+ color,
+ colors,
+ colour,
+ colours,
+ correct,
+ empty,
+ font,
+ frame,
+ frames,
+ letters,
+ lower,
+ name,
+ natural,
+ noalign,
+ noletters,
+ params,
+ present,
+ rounded,
+ rows,
+ scale,
+ sensitive,
+ separation,
+ shape,
+ shapes,
+ size,
+ strict,
+ style,
+ style,
+ text,
+ thickness,
+ tikz,
+ tile,
+ upper,
+ },
+ classoffset=3,
+ keywordstyle=\color{DarkOrange},%
+ morekeywords={
+ hard,
+ standard,
+ sutom,
+ }
+}
+
+\DeclareTCBListing{example}{ !O{} }{%
+ skin=bicolor,
+ colframe=MediumSeaGreen,
+ colbacklower=OldLace,
+ colback=LawnGreen!20,
+ lefthand width=50mm,
+ listing style=tikz,
+ sidebyside,
+ sidebyside align=center,
+ sidebyside gap=4mm,
+ text and listing,
+ text outside listing,
+ boxsep = 0pt,
+ #1
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\makeatletter
+\author{Andrew Mathas and Cédric Pierquet}
+\usepackage{tikz}
+\usetikzlibrary{shadows.blur}
+\tikzset{shadowed/.style={blur shadow={shadow blur steps=5},
+ bottom color=ForestGreen!30,
+ draw=MediumSeaGreen!70,
+ shade,
+ font=\normalfont\Huge\bfseries\scshape,
+ rounded corners=8pt,
+ top color=SeaGreen,
+ },
+ boxes/.style={draw=SeaGreen,
+ fill=Cornsilk,
+ font=\sffamily\small,
+ inner sep=5pt,
+ rectangle,
+ rounded corners=8pt,
+ text=DarkGreen,
+ }
+}
+\newcommand\Wordle{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \node[yshift=-3cm] at (current page.north west)
+ {\begin{tikzpicture}[remember picture, overlay]
+ \draw[shadowed](30mm,0) rectangle node[white]{wordle} (\paperwidth-30mm,16mm);
+ \node[anchor=west,boxes] at (4cm,0cm) {\@author};
+ \node[anchor=east,boxes] at (\paperwidth-4cm,0) {Version \wordle@version};
+ \end{tikzpicture}
+ };
+ \end{tikzpicture}
+ \vspace*{20mm}
+}
+
+\def\@oddfoot{\textsc{Wordle} --- \wordle@version~(released~\wordle@release)\hfill\thepage}
+
+\usepackage[colorlinks=true,linkcolor=blue,urlcolor=MediumBlue]{hyperref}
+\hypersetup{
+ pdfcreator={ Generated by pdfLaTeX },
+ pdfinfo={
+ Author ={ Andrew Mathas and Cédric Pierquet},
+ Keywords={ wordle },
+ License ={ LaTeX Project Public License v1.3c or later },
+ Subject ={ LaTeXing Wordle puzzles },
+ Title ={ Wordle - \wordle@version }
+ },
+}
+\makeatother
+
+\begin{document}
+
+ \Wordle
+
+ This package provides a stupidly feature-rich way of creating
+ \keyword{Wordle} puzzles in \LaTeX, which
+ \href{https://en.wikipedia.org/wiki/Wordle}{Wikipedia} describes as a
+ hugely popular web-based word game created and developed by Welsh
+ software engineer Josh Wardle. This package is an enhanced version of
+ one of the solutions to a question asked by \textcolor{FireBrick}{valerio\_new}
+ on
+ \href{https://tex.stackexchange.com/questions/659860/wordle-like-colored-letter-boxes-in-latex/660056#660056}{tex.stackexchange.com}.
+
+ This package provides the \keyword{wordle} environment, which uses the
+ syntax:
+
+ \begin{tcblisting}{
+ listing only,
+ skin=bicolor,
+ colframe=MediumSeaGreen,
+ colbacklower=OldLace,
+ colback=LawnGreen!20,
+ listing style=tikz,
+ boxsep = 0pt,
+ }
+ % \usepackage{wordle}
+ \begin{wordle}[wordle settings]{solution}[optional tikz commands]
+ guess1 guess2 ...
+ \end{wordle}
+ \end{tcblisting}
+ \index{environment!wordle}
+ \index{wordle}
+
+ and the \keyword{GrilleSutom} environment, for \keyword{Sutom}, the French version of
+ the games:
+
+ \begin{tcblisting}{
+ listing only,
+ skin=bicolor,
+ colframe=MediumSeaGreen,
+ colbacklower=OldLace,
+ colback=LawnGreen!20,
+ listing style=tikz,
+ boxsep = 0pt,
+ }
+ % \usepackage{wordle}
+ \begin{GrilleSutom}[sutom settings]{solution}[optional TikZ commands]
+ guess1 guess2 ...
+ \end{GrilleSutom}
+ \end{tcblisting}
+ \index{environment!GrilleSutom}
+ \index{GrilleSutom}
+ \index{sutom}
+
+ The words in the puzzle can be entered on a single lines, or on separate
+ lines. Here are some examples:
+
+ \begin{example}
+ \begin{wordle}{ANVIL}
+ % English version of sutom (wordle)
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ \begin{example}
+ % French version of wordle (sutom)
+ \begin{GrilleSutom}{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ As in the online puzzles, the \keyword{wordle} environment
+ automatically colours the letter tiles
+ \keyword[colback=WordleCorrect,colupper=White]{green}
+ when the letter is in the same position as the solution, and as
+ \keyword[colback=WordlePresent,colupper=White]{gold} when
+ the letter is in the solution but it is not in the correct position.
+ Similarly, \keyword{GrilleSutom} colours the correct letters
+ \keyword[colback=WordleSutomCorrect,colupper=White]{red}
+ and the present letters
+ \keyword[colback=WordleSutomPresent,colupper=White]{gold}.
+ As described below, these colours can be changed to suit your tastes.
+
+ The number of letters in the puzzle is determined by the solution,
+ being constrained only by the page width.
+
+ \begin{example}
+ \begin{wordle}[rows=4]{orange}
+ normal
+ orders
+ orange
+ \end{wordle}
+ \end{example}
+
+ The letters in the puzzle can be entered in upper case, lower case, or
+ mixed case. By default, the case of the letters is ignored when
+ determining the colours of the letter tiles.
+
+ As described below, the \keyword{wordle} and \keyword{GrilleSutom}
+ environments accept an array of different options that change the
+ colours, fonts, and shapes of the tile. In addition, you can the case
+ sensitivity of the environments, add extra rows to the puzzle, disable
+ special formatting of the \textit{letter tiles}. These options are
+ given as a comma separated list key-value pairs. They can be set
+ locally, using the optional argument of the \keyword|wordle|
+ environment, or they can be set globally (more accurately, in the
+ current \LaTeX\ group) using the \keyword{\WordleSetup} command
+ \index{\textbackslash WordleSetup}, or as global package options, via
+ \keyword{\usepackage[options]{wordle}}. The order of the options does
+ not matter, except that later options take precedence over earlier
+ ones, with the exception of \option{tikz} and \option{tile style} keys
+ which are always applied last.
+
+ The \keyword{wordle} puzzles are drawn using \ctan{TikZ}, with each
+ letter in the puzzle sitting inside a \ctan{TikZ} node. Many of the
+ options control the settings of these nodes.
+
+ The descriptions of the options below are grouped according to their
+ function.
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Wordle styles}
+
+ The \option{style} key can be used to change many characteristics of
+ the tiles in a \keyword{wordle} puzzle, including their colours, the
+ fonts and so on. The more common settings can be setting using the
+ \option{style} keyword. \textit{The style should always be set first
+ because, otherwise, the style settings may override earlier settings.}
+
+ The following styles are supported:
+
+ \textcolor{DarkOrange}{sutom}
+ \index{style!sutom}
+ \index{sutom}
+
+ \begin{example}
+ \begin{wordle}[style=sutom]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ The \textcolor{DarkOrange}{sutom} style is the default
+ style for the \keyword{GrilleSutom} environment.
+
+ \textcolor{DarkOrange}{standard}
+ \index{style!standard}
+
+ \begin{example}
+ \begin{wordle}[style=standard]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ The \textcolor{DarkOrange}{standard} style is the default style for the
+ \keyword{wordle} environment.
+
+ \textcolor{DarkOrange}{hard}
+ \index{style!hard}
+
+ \begin{example}
+ \begin{wordle}[style=hard]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Options for the individual styles of the letter tiles}
+
+ There are four types of letter tiles in \keyword{wordle}:
+ \option{absent}, \option{present}, \option{correct} and
+ \option{empty}, corresponding to letters not in the solution,
+ incorrectly placed letters, correctly placed letters, and empty
+ tiles, respectively. The options in this section can be used to set
+ the text, tile and border colours, shapes, and frames of these tiles.
+
+ The letter tiles in a \keyword{wordle} environment are typeset inside
+ a \ctan{TikZ} \keyword{\node}. The options below control the different
+ style settings of these nodes.
+
+ \option[--]{colours}[comma separated list of valid colours]
+
+ The \option{colours} option is a short-hand for specifying the colours
+ of the \option{absent}, \option{present}, \option{correct} and
+ \option{empty} tiles, in that order. Later colours can be omitted but
+ the colours should be given in this order, from left to right.
+ If only one colour is given then this colour is applied to all tiles.
+
+ \begin{example}
+ \begin{wordle}[colours={LightGray,Orange,Teal}]{cellar}
+ pounds
+ taylor
+ cellar
+ \end{wordle}
+ \end{example}
+
+ The colours can also be set individually using \option{absent colour},
+ \option{present colour}, \option{correct colour} and \option{empty
+ colour}. To support north American dialects, is also possible to use
+ \option{colors}, \option{absent color}, \option{present color},
+ \option{correct color} and \option{empty color}.
+
+ \begin{example}
+ \begin{wordle}[absent colour=DarkGray,present color=Salmon,
+ correct color=SeaGreen]{cellar}
+ pounds
+ taylor
+ cellar
+ \end{wordle}
+ \end{example}
+
+ \option[white]{borders}[comma separated list of valid colours]
+
+ Similar to the \option{colours} option, this is a short-hand for the
+ setting border colour of the \option{absent}, \option{present},
+ \option{correct} and \option{empty} tiles, in that order.
+ If only one colour is given then this colour is applied to all tiles.
+
+ \begin{example}
+ \begin{wordle}[borders={red, orange,blue}]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ You can set the border borders of the individual tiles using
+ \option{absent border}, \option{present border}, \option{correct
+ border} and \option{empty border}
+
+ \option[false]{frames}[comma separated list of true/false]
+
+ This is a short-hand for adding a rectangular frame around the
+ \option{absent}, \option{present}, \option{correct} and \option{empty}
+ tiles, in that order, with the same background colour as the
+ \option{absent} file. This is only useful for non-square tiles.
+
+ \begin{example}
+ \begin{wordle}[frames={false,true,true}, shapes=circle]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ You can set the frames of the individual tiles using
+ \option{absent frame}, \option{present frame},
+ \option{correct frame} and \option{empty~frame}.
+
+ \option[rectangle]{shapes}[comma separated list of TikZ shapes]
+
+ Similar to the \option{colours} option, this is a short-hand for the
+ setting shape colour of the \option{absent}, \option{present},
+ \option{correct} and \option{empty} tiles, in that order.
+
+ \begin{example}
+ \begin{wordle}[shapes={circle, rectangle, circle}]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ You can set the shape shapes of the individual tiles using
+ \option{absent shape}, \option{present shape},
+ \option{correct shape} and \option{empty shape}
+ You can use the shapes provided by the \ctan{TikZ}
+ \texttt{shapes.geometric} package, including \texttt{diamond},
+ \texttt{ellipse}, \texttt{trapezium} and \texttt{star}; see
+ section~71.2 of the \ctan{TikZ} manual.
+
+ \begin{example}
+ % \usepackage{shapes.geometric}
+ \begin{wordle}[shapes={diamond, ellipse, star}]{LADLE}
+ FLAIL
+ LAPEL
+ *
+ LADLE
+ LOVER
+ \end{wordle}
+ \end{example}
+
+ \option[white]{text}[comma separated list of valid colours]
+
+ This is a short-hand for the setting the text colours of the
+ \option{absent}, \option{present}, \option{correct} and \option{empty}
+ tiles, in that order.
+
+ \begin{example}
+ \begin{wordle}[text={red, orange,blue}]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ You can set the text borders of the individual tiles using
+ \option{absent text}, \option{present border}, \option{correct
+ text} and \option{empty border}
+
+
+ \Section{Common tile characteristics}
+
+ The following options apply to all tiles.
+
+ \option[]{noalign} (default) \qquad
+ \option[]{align}
+
+ The options tweak the vertical alignment of the letters in each row of
+ the puzzle. This is only likely to be useful if you have lower case
+ letters in your puzzle.
+
+ \begin{example}
+ \begin{wordle}[align]{agony}
+ groan
+ angry
+ agony
+ \end{wordle}
+ \end{example}
+
+ \begin{example}
+ \begin{wordle}[noalign]{agony} % the default
+ groan
+ angry
+ agony
+ \end{wordle}
+ \end{example}
+
+ \option[\textbackslash Large\textbackslash bfseries\textbackslash sffamily]{font}
+ [LaTeX font specification]
+
+ Sets the font used by all \keyword{wordle} letters. Any valid sequence
+ of \LaTeX\ font commands can be used.
+
+ \begin{example}
+ \begin{wordle}[font=\large\sffamily]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ \option[1mm]{rounded}[a length]
+
+ Set TikZ \texttt{rounded corners} key for the \keyword{wordle} letter tiles.
+
+ \begin{example}
+ \begin{wordle}[rounded=2mm]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ \option[0.5mm]{separation}[a length]
+
+ Sets the separation distance between the \keyword{wordle} letter
+ tiles.
+
+ \begin{example}
+ \begin{wordle}[separation=2mm, borders=black]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ \option[1]{scale}[a number]
+
+ The \option{scale} option rescales the \keyword{wordle} environment.
+ The \option{scale} alters the dimensions sets by the \option{rounded},
+ \option{separation} \option{size} and \option{thickness} options. If
+ you change the scale, then you will almost certainly want
+ to change font size font as well, which you can do using the
+ \option{font} option:
+
+ \begin{example}
+ \begin{wordle}[scale=1.5, font=\huge\bfseries]{SIZE}
+ HELP
+ WISE
+ SIZE
+ \end{wordle}
+ \end{example}
+
+ \option[8mm]{size}[a length]
+
+ The \option{size} option sets the size of the \keyword{wordle} letter
+ tiles. Unlike the \option{scale} option, \option{size} only changes
+ the dimensions of the letter tiles.
+
+ \begin{example}
+ \begin{wordle}[size=10mm, font=\huge\bfseries]{LADLE}
+ FLAIL LAPEL * LADLE
+ \end{wordle}
+ \end{example}
+
+ \option[0.25mm]{thickness}[a length]
+
+ Sets the border thickness of the \keyword{wordle} letter tiles. By
+ default, the borders of the tiles are white, which makes this setting
+ hard to see, so the following example changes the border to red.
+
+ \begin{example}
+ \begin{wordle}[thickness=1mm, borders=red]{LADLE}
+ FLAIL
+ LAPEL
+ LADLE
+ \end{wordle}
+ \end{example}
+
+ \option[--]{tile style}[comma separated list of TikZ style keys]
+
+ A comma-separated list of \ctan{Tikz} node keys that are appended to
+ the style of the \ctan{TikZ} node that contains each of the
+ \keyword{wordle} letters. Some of the options given above can be set
+ directly using the \option{tile style} option. When using the
+ \option{tile style}, be careful not to break the special formatting of
+ letters provided by the \keyword{wordle} environment.\par
+
+ With most of the \keyword{wordle} options, the latter options take
+ precedence, however, the \option{tile style} option is applied last,
+ so it overrides any competing options.
+
+ % TODO: Fix this because it looks like this style is being applied
+ % twice because the PDF file shows a rotation of 90 = 2*45...
+ \begin{example}
+ \begin{wordle}[tile style={rotate=45}]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Extra rows and columns}
+
+ By default, all of the words in a \keyword{wordle} puzzle are assumed
+ to have the same number of letters as the solution, and the number of
+ rows in the puzzle is number of words given in the environment. The
+ options below give more control over the number of rows and columns in
+ the puzzle.
+
+ \option[]{letters} (default)\qquad
+ \option[]{noletters}
+
+ By default, the letters in the puzzle are printed. You can hide the
+ letters from the puzzle, while still keeping the \keyword{wordle} tile
+ colouring, using \option{noletters}.
+
+ \begin{example}
+ \begin{wordle}[letters]{CRAZE} % the default
+ TRACE
+ CREAM
+ CRAZE
+ \end{wordle}
+ \end{example}
+
+ \begin{example}
+ \begin{wordle}[noletters]{CRAZE}
+ TRACE
+ CREAM
+ CRAZE
+ \end{wordle}
+ \end{example}
+
+ \option[false]{strict}[true/false/--]
+
+ By default, the \keyword{wordle} environment does not check that each
+ word in the puzzle has the same length as the solution, so missing
+ and extra letters receive no special processing.
+
+ \begin{example}
+ \begin{wordle}[strict=false]{CRAZE} % the default
+ GRAIL
+ CRAMPS
+ CRAM
+ CRABS
+ \end{wordle}
+ \end{example}
+
+ The \option{strict} option enforces the word length in the puzzle by
+ marking missing letters as incorrect and striking out extra letters.
+
+ \begin{example}
+ \begin{wordle}[strict]{CRAZE}
+ GRAIL
+ CRAMPS
+ CRAM
+ CRABS
+ \end{wordle}
+ \end{example}
+
+ \option[--]{rows}
+
+ By default, a \keyword{wordle} environment displays the words
+ in the puzzle environment with one word per row. You can add extra
+ (blank) rows to the puzzle with the \option{rows} option.
+
+ \begin{example}
+ \begin{wordle}[rows=4]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+ The \option{rows} option only adds extra rows to the puzzle if they
+ are needed. This option does not prevent ``extra'' rows from
+ appearing.
+
+ \begin{example}
+ \begin{wordle}[rows=2]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+
+ \option[]{*}
+
+ You can disable the special colouring of letter tiles in a
+ \keyword{wordle} puzzle by adding an asterisk,~\option{*}, as a
+ \textit{word}, into the puzzle.
+
+ \begin{example}
+ \begin{wordle}{ANVIL}
+ CRANE
+ NATAL
+ * % disable wordle colouring
+ ANNUL
+ ANVIL
+ \end{wordle}
+ \end{example}
+
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Case sensitivity}
+ \index{case~sensitive}
+ \index{case~sensitive!lower case}
+ \index{case~sensitive!natural case}
+ \index{case~sensitive!upper case}
+
+ By default, the letters are printed in upper and lower case, exactly
+ as typed, and the letter comparisons are not case sensitive.
+
+ \option[false]{case~sensitive}
+
+ By default the \keyword{wordle} puzzles are not case sensitive, but
+ you can make them case sensitive using this option. Note that
+ \keyword{case sensitive} is the same as \keyword{case sensitive=true}
+ (and the default option is the same as
+ \keyword{case sensitive=false}).
+
+ \begin{example}
+ \begin{wordle}[case sensitive=false]{youth} % the default
+ North
+ South
+ Youth
+ \end{wordle}
+ \end{example}
+
+ Here is a case sensitive version of this puzzle.
+
+ \begin{example}
+ \begin{wordle}[case sensitive]{youth}
+ North
+ South
+ Youth
+ \end{wordle}
+ \end{example}
+
+ As this puzzle is case sensitive, the \keyword{Y} on the last line is
+ not marked as being correct because it does not match the \keyword{y}
+ in the solution.
+
+ \option[]{natural case} (default) \qquad
+ \option[]{lower case} \qquad
+ \option[]{upper case}
+
+ The \option{lower case} and \option{upper case} options force all
+ letters in the puzzle to be in lower or upper case, respectively.
+
+ \begin{example}
+ \begin{wordle}[lower case]{YOUTH}
+ North
+ South
+ Youth
+ \end{wordle}
+ \end{example}
+
+ \begin{example}
+ \begin{wordle}[upper case]{youth}
+ North
+ South
+ Youth
+ \end{wordle}
+ \end{example}
+
+ As these examples show, both of these options disable the case
+ sensitivity of the tests for colouring the \keyword{wordle} tiles;
+ that is, they set \option{case sensitive=false}. To balance the
+ \option{lower case} and \option{upper case} options, the
+ \option{natural case} option makes the \keyword{wordle} environment
+ restores the default behaviour, which respects the case of the letters
+ as typed into the environment. The \option{natural case} option does
+ not change the \option{case sensitive} setting.
+
+ \begin{example}
+ \begin{wordle}[natural case]{youth} % the default
+ North
+ South
+ youth
+ \end{wordle}
+ \end{example}
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Adding \ctan{TikZ} code}
+
+ The \keyword{wordle} environment is a fancy wrapper around a
+ \keyword{tikzpicture} environment, with some code under the hood that
+ automatically colours the letter tiles according to how well they
+ match the solution. The options in this section describe how to access
+ the underlying \ctan{TikZ} layer.
+
+ \option[]{tikz}[TikZ commands]
+
+ The \option{tikz} option passes \ctan{TikZ} keys to the underlying
+ \keyword{tikzpicture} environment. The \option{tikz} option is almost
+ the same as using a \keyword{\tikzset{...}} command before the
+ \keyword{wordle} environment except that it is applied to the
+ \keyword{tikpicture} environment, which contains the \keyword{wordle}
+ puzzle, such that the \option{tikz} keys are applied \textit{after}
+ all of options above and \textit{before} \option{tile style} is
+ applied.
+
+ \begin{example}
+ % \usetikzlibrary{backgrounds}
+ \begin{wordle}[
+ tikz={framed,
+ background rectangle/.style={
+ double,ultra thick, draw=SteelBlue
+ }
+ }]{youth}
+ North South youth
+ \end{wordle}
+ \end{example}
+
+ As this example indicates, it is advisable to enclose complicated
+ \ctan{TikZ} settings inside braces.
+
+ \option[W]{name}
+
+ All of the tiles in a \keyword{wordle} puzzle are given node names of
+ the form $\langle$\textsf{name}$\rangle$-$\mathsf{r}$-$\mathsf{c}$,
+ for the tile in row~$\mathsf{r}$ and column~$\mathsf{c}$. By default,
+ the prefix \textsf{name} is \texttt{W}. Within reason, the
+ \option{name} prefix can be changed to anything you like using the
+ \option{name} option.
+
+ One way to use the named nodes for the letter tiles is with
+ \ctan{TikZ} \texttt{overlay} and \texttt{remember picture} keys:
+
+ \begin{example}
+ \begin{wordle}[tikz={remember picture}]{CRAZE}
+ TRACE
+ CREAM
+ CRAZE
+ \end{wordle}
+ \end{example}
+
+ This makes it possible, for example, to draw arrows to tiles in a
+ \keyword{wordle} puzzle:
+
+ \begin{example}
+ \tikz[remember picture]\draw[overlay, very thick, opacity=0.5,->,red](0,0)node{No M!} to [out=90, in=180](W-2-5);
+ \end{example}
+
+ A second use of the tile node names is in conjunction with \ctan{TikZ}
+ commands that can be added to a \keyword{wordle} puzzle using the
+ second optional argument to the environment. As with the \option{tikz}
+ option, it is advisable to enclose complicated \ctan{TikZ} commands
+ inside braces.
+
+ \begin{example}
+ \begin{wordle}[name=M,
+ tikz={arr/.style={Red,ultra thick,->}}
+ ]{MACAW}
+ [{
+ \draw[arr](M-1-3.south)--(M-3-2.north)--(M-4-2.north);
+ \draw[arr](M-1-1.south)--(M-3-5)--(M-4-3.north east);
+ }]
+ CRANE HOTLY BASIC MACAW
+ \end{wordle}
+ \end{example}
+
+ In practice, we are not convinced that anyone will find a real use for this!
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{The package code}
+
+ The \keyword{wordle} package is a \LaTeX3 package. There are many
+ comments in the code explaining how the code works. The automatic
+ colouring of the letter tiles is a fun exercise in \LaTeX3
+ programming, which was motivated by a
+ \href{https://tex.stackexchange.com/questions/659860/wordle-like-colored-letter-boxes-in-latex/660056#660056}{tex.stackexchange.com} post.
+
+ Bug reports and feature requests can be made on \href{https://github.com/AndrewMathas/Wordle}{github}.
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \printindex
+
+\end{document}
diff --git a/graphics/pgf/contrib/wordle/wordle-doc-fr.pdf b/graphics/pgf/contrib/wordle/wordle-doc-fr.pdf
new file mode 100644
index 0000000000..09d306b0f3
--- /dev/null
+++ b/graphics/pgf/contrib/wordle/wordle-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/wordle/wordle-doc-fr.tex b/graphics/pgf/contrib/wordle/wordle-doc-fr.tex
new file mode 100644
index 0000000000..039bc7a158
--- /dev/null
+++ b/graphics/pgf/contrib/wordle/wordle-doc-fr.tex
@@ -0,0 +1,767 @@
+% !TeX TS-program = pdflatex
+
+\documentclass[svgnames]{report}
+\usepackage[utf8]{inputenc}
+\usepackage{wordle}
+\usepackage{manfnt}
+\usepackage{enumitem}
+\setlist[description]{font=\sffamily\bfseries\color{ForestGreen},labelwidth=\textwidth}
+\usepackage{booktabs}
+\usepackage[a4paper,margin=18mm]{geometry}
+\synctex=1
+\parindent=0pt
+\parskip=2mm
+
+\usepackage{cmap} % fix search and cut-and-paste in Acrobat
+\setcounter{secnumdepth}{0}
+
+\usepackage{listings}\lstset{language=[LaTeX]TeX,framerule=2pt}
+\lstset{language=[LaTeX]TeX,
+ texcsstyle=*\bfseries\color{Peru},
+ backgroundcolor=\color{Ivory},
+ numbers=none,
+ breaklines=true,
+ keywordstyle=\color{Sienna},
+ commentstyle=\color{BurlyWood},
+ tabsize=2,
+ morekeywords={Wordle,wordle,GrilleSutom},
+ resetmargins=true,
+}
+% hyperref links to ctan
+\newcommand\ctan[1]{\href{https://www.ctan.org/pkg/#1}{\texttt{#1}}}
+
+\newcommand\Section[1]{\subsection{\textcolor{DarkGreen}{#1}}}
+
+\ExplSyntaxOn
+\NewDocumentCommand\option{ omo }{%
+ \IfNoValueTF{#1}{\textsf{#2}}
+ {%
+ \textbf{\textcolor{Crimson}{#2}}
+ \str_if_empty:nF {#1}{~(défaut~:~\textcolor{DarkRed}{#1})}%
+ \IfNoValueF{#3}{\hfill\textcolor{Gray}{[accepte~:~#3]}}%
+ }%
+ \index{#2}%
+}
+\ExplSyntaxOff
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage{imakeidx}
+\indexsetup{level=\section*, toclevel=section, noclearpage}
+\makeindex[intoc,columns=3]
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usepackage[skins,listings]{tcolorbox}
+\usetikzlibrary{backgrounds, shapes.geometric} % for tikz={framed,...}
+
+\DeclareTotalTCBox\keyword{ O{} v }{
+ fontupper=\sffamily,
+ nobeforeafter,
+ skin=tile,
+ verbatim,
+ on line,
+ tcbox raise base,
+ top=0pt,bottom=0pt,left=0mm,right=0mm,
+ colback=OldLace,
+ colupper=ForestGreen,
+ #1}
+{#2}
+
+\lstdefinestyle{tikz}{style=tcblatex,
+ classoffset=0,
+ texcsstyle=*\color{DarkGoldenrod},%
+ deletetexcs={begin, end},
+ moretexcs={,%
+ node,
+ draw,
+ true,
+ false
+ },%
+ classoffset=1,
+ keywordstyle=\color{ForestGreen},%
+ morekeywords={wordle,GrilleSutom},
+ classoffset=2,
+ keywordstyle=\color{Crimson},%
+ morekeywords={
+ absent,
+ Strict,
+ Taille,
+ Lignes,
+ Epaisseur,
+ align,
+ border,
+ borders,
+ Bords,
+ Cadres,
+ Style,
+ Formes,
+ Separation,
+ case,
+ Police,
+ Arrondi,
+ Echelle,
+ NonLettres,
+ color,
+ Couleurs,
+ CouleurBordures,
+ CouleurLettres,
+ bordure,
+ couleur,
+ colours,
+ correct,
+ vide,
+ font,
+ frame,
+ frames,
+ letters,
+ lower,
+ params,
+ name,
+ natural,
+ noalign,
+ noletters,
+ present,
+ rounded,
+ rows,
+ scale,
+ sensitive,
+ separation,
+ shape,
+ shapes,
+ size,
+ strict,
+ style,
+ style,
+ text,
+ thickness,
+ tikz,
+ tile,
+ upper,
+ },
+ classoffset=3,
+ keywordstyle=\color{DarkOrange},%
+ morekeywords={
+ hard,
+ standard,
+ sutom,
+ }
+}
+
+\DeclareTCBListing{example}{ !O{} }{%
+ skin=bicolor,
+ colframe=MediumSeaGreen,
+ colbacklower=OldLace,
+ colback=LawnGreen!20,
+ lefthand width=50mm,
+ listing style=tikz,
+ sidebyside,
+ sidebyside align=center,
+ sidebyside gap=4mm,
+ text and listing,
+ text outside listing,
+ boxsep = 0pt,
+ #1
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\makeatletter
+\author{Andrew Mathas \&\ Cédric Pierquet}
+\usepackage{tikz}
+\usetikzlibrary{shadows.blur}
+\tikzset{shadowed/.style={blur shadow={shadow blur steps=5},
+ bottom color=ForestGreen!30,
+ draw=MediumSeaGreen!70,
+ shade,
+ font=\normalfont\Huge\bfseries\scshape,
+ rounded corners=8pt,
+ top color=SeaGreen,
+ },
+ boxes/.style={draw=SeaGreen,
+ fill=Cornsilk,
+ font=\sffamily\small,
+ inner sep=5pt,
+ rectangle,
+ rounded corners=8pt,
+ text=DarkGreen,
+ }
+}
+\newcommand\Wordle{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \node[yshift=-3cm] at (current page.north west)
+ {\begin{tikzpicture}[remember picture, overlay]
+ \draw[shadowed](30mm,0) rectangle node[white]{wordle} (\paperwidth-30mm,16mm);
+ \node[anchor=west,boxes] at (4cm,0cm) {\@author};
+ \node[anchor=east,boxes] at (\paperwidth-4cm,0) {Version \wordle@version};
+ \end{tikzpicture}
+ };
+ \end{tikzpicture}
+ \vspace*{20mm}
+}
+
+\def\@oddfoot{\textsc{Wordle} --- \wordle@version~(version~du~\wordle@release)\hfill\thepage}
+
+\usepackage[colorlinks=true,linkcolor=blue,urlcolor=MediumBlue]{hyperref}
+\hypersetup{
+ pdfcreator={ Generated by pdfLaTeX },
+ pdfinfo={
+ Author ={ Andrew Mathas et Cédric Pierquet },
+ Keywords={ wordle },
+ License ={ LaTeX Project Public License v1.3c or later },
+ Subject ={ LaTeXing Wordle puzzles },
+ Title ={ Wordle - \wordle@version }
+ },
+}
+\makeatother
+
+\begin{document}
+
+ \Wordle
+
+ Ce package fournit un moyen \textit{stupidement} riche en fonctionnalités de créer des puzzles \keyword{Wordle} en \LaTeX, que \href{https://en.wikipedia.org/wiki/Wordle}{Wikipedia} décrit comme
+ comme un jeu de lettres en ligne extrêmement populaire, créé et développé par l'ingénieur logiciel gallois Josh Wardle. Ce paquet
+ est une version améliorée d'une des solutions à une question posée par \textcolor{FireBrick}{valerio\_new} sur \href{https://tex.stackexchange.com/questions/659860/wordle-like-colored-letter-boxes-in-latex/660056#660056}{tex.stackexchange.com}.
+
+ Ce paquet fournit l'environnement \keyword{GrilleSutom}, qui utilise la syntaxe :
+
+ \begin{tcblisting}{
+ listing only,
+ skin=bicolor,
+ colframe=MediumSeaGreen,
+ colbacklower=OldLace,
+ colback=LawnGreen!20,
+ listing style=tikz,
+ boxsep = 0pt,
+ }
+ % \usepackage{wordle}
+ \begin{GrilleSutom}[params sutom]{solution}[commandes tikz optionnelles]
+ essai1 essai2 ...
+ \end{GrilleSutom}
+ \end{tcblisting}
+ \index{environnement!GrilleSutom}
+ \index{GrilleSutom}
+ \index{sutom}
+
+ et l'environnement \keyword{wordle}, pour la version anglaise du jeu :
+
+ \begin{tcblisting}{
+ listing only,
+ skin=bicolor,
+ colframe=MediumSeaGreen,
+ colbacklower=OldLace,
+ colback=LawnGreen!20,
+ listing style=tikz,
+ boxsep = 0pt,
+ }
+ % \usepackage{wordle}
+ \begin{wordle}[params wordle]{solution}[commandes tikz optionnelles]
+ essai1 essai2 ...
+ \end{wordle}
+ \end{tcblisting}
+ \index{environnement!wordle}
+ \index{wordle}
+
+ Les mots du puzzle peuvent être saisis sur une seule ligne ou sur des lignes séparées. Voici quelques exemples :
+
+ \begin{example}
+ %Version fr du wordle (sutom)
+ \begin{GrilleSutom}{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ \begin{example}
+ % Version en du sutom (wordle)
+ \begin{wordle}{SUTOM}
+ SAUCE
+ SAUTS
+ SUTOM
+ \end{wordle}
+ \end{example}
+
+ Comme pour les puzzles en ligne, l'environnement \keyword{GrilleSutom}
+ colore automatiquement les lettres en
+ \keyword[colback=WordleSutomCorrect,colupper=White]{rouge}
+ lorsque la lettre se trouve dans la même position que la solution, et en
+ \keyword[colback=WordlePresent,colupper=White]{or} lorsque la lettre est dans la solution mais qu'elle n'est pas bien placée.
+ De même, \keyword{GrilleSutom} colore les lettres correctes en
+ \keyword[colback=WordleCorrect,colupper=White]{vert}
+ et les lettres actuelles en
+ \keyword[colback=WordleCorrect,colupper=White]{or}.
+ Comme décrites ci-dessous, ces couleurs peuvent être modifiées en fonction de vos goûts.
+
+ Le nombre de lettres du puzzle est déterminé par la solution, et n'est limité que par la largeur de la page.
+
+ \begin{example}
+ \begin{GrilleSutom}[Lignes=4]{orange}
+ normal
+ ordres
+ orange
+ \end{GrilleSutom}
+ \end{example}
+
+ Les lettres du puzzle peuvent être saisies en majuscules, en minuscules ou en mélange de majuscules et de minuscules. Par défaut, la casse des lettres est ignorée lors de la détermination des couleurs des cases de lettres.
+
+ Comme décrit ci-dessous, les environnements \keyword{wordle} et \keyword{GrilleSutom} acceptent une liste d'options différentes qui modifient les couleurs, les polices et les formes de la tuile. De plus, vous pouvez modifier la sensibilité à la casse des environnements, ajouter des lignes supplémentaires au puzzle, désactiver la mise en forme spéciale des \textit{cases de lettres}. Ces options sont données sous la forme d'une liste séparée par des virgules de paires \texttt{clé-valeur}. Elles peuvent être définies localement, en utilisant l'argument optionnel de l'environnement \keyword|wordle|, ou globalement (plus précisément, dans le groupe \LaTeX\ actuel) en utilisant la commande \keyword{\ParamsSutom} \index{\textbackslash ParamsSutom}, ou comme options globales du package, via \keyword{\usepackage[options]{wordle}}. L'ordre des options n'a pas d'importance, sauf que les options ultérieures ont priorité sur les options précédentes, à l'exception des clés \option{tikz} et \option{tile style} qui sont toujours appliquées en dernier.
+
+ Les puzzles \keyword{wordle} sont dessinés à l'aide de \ctan{TikZ}, chaque lettre du puzzle étant placée à l'intérieur d'un nœud \ctan{TikZ}. De nombreuses options contrôlent les paramètres de ces nœuds. Les descriptions des options ci-dessous sont regroupées en fonction de leur fonction.
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Styles Wordle}
+
+ La clé \option{Style} peut être utilisée pour modifier de nombreuses caractéristiques des cases dans un puzzle \keyword{wordle}, y compris leurs couleurs, les polices et ainsi de suite. Les paramètres les plus courants peuvent être définis à l'aide du mot-clé \option{style}. \textit{Le style doit toujours être défini en premier car, sinon, les paramètres de style peuvent remplacer les paramètres précédents.}
+
+ Les styles suivants sont pris en charge :
+
+ \textcolor{DarkOrange}{sutom}
+ \index{Style!sutom}
+ \index{sutom}
+
+ \begin{example}
+ \begin{GrilleSutom}[Style=sutom]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ En plus de définir les couleurs des cases, les cadres et les formes, le style \textsf{sutom} définit également la taille des cases à 8 mm. Le style \textsf{sutom} est le style par défaut pour l'environnement \keyword{GrilleSutom}.
+
+ \textcolor{DarkOrange}{standard}
+ \index{style!standard}
+
+ \begin{example}
+ \begin{GrilleSutom}[Style=standard]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ Le style \textcolor{DarkOrange}{standard} est le style par défaut pour l'environnement \keyword{wordle}.
+
+ \textcolor{DarkOrange}{hard}
+ \index{style!hard}
+
+ \begin{example}
+ \begin{GrilleSutom}[Style=hard]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Options pour les styles individuels des cases de lettres}
+
+ Il existe quatre types de cases de lettres dans \keyword{wordle} :
+ \option{absent}, \option{present}, \option{correct} et
+ \option{vide}, correspondant respectivement aux lettres qui ne sont pas dans la solution,
+ aux lettres mal placées, aux lettres correctement placées et aux cases vides. Les options de cette section peuvent être utilisées pour
+ définir les couleurs du texte, des cases et des bordures, les formes et les cadres de ces cases.
+
+ Les cases de lettres dans un environnement \keyword{wordle} sont composées à l'intérieur
+ d'un \keyword{\node} \ctan{TikZ}. Les options ci-dessous contrôlent les
+ différents paramètres de style de ces nœuds.
+
+ \option[--]{Couleurs}[liste de couleurs valides séparées par des virgules]
+
+ L'option \option{Couleurs} est un raccourci pour spécifier les
+ couleurs des cases \option{absent}, \option{present}, \option{correct} et
+ \option{vide}, dans cet ordre. Les couleurs suivantes peuvent être omises, mais
+ les couleurs doivent être données dans cet ordre, de gauche à droite.
+ Si une seule couleur est donnée, cette couleur est appliquée à toutes les cases.
+
+ \begin{example}
+ \begin{GrilleSutom}[Couleurs={LightGray,Orange,Teal}]{cellar}
+ pounds
+ taylor
+ cellar
+ \end{GrilleSutom}
+ \end{example}
+
+ Les couleurs peuvent également être définies individuellement à l'aide de \option{couleur absent}, \option{couleur present}, \option{couleur correct} et \option{couleur vide}.
+
+ \begin{example}
+ \begin{GrilleSutom}[couleur absent=DarkGray,couleur present=Salmon,
+ couleur correct=SeaGreen]{cellar}
+ pounds
+ taylor
+ cellar
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[white]{CouleurBordures}[liste de couleurs valides séparées par des virgules]
+
+ de manière similaire à l'option \option{Couleurs}, il s'agit d'un raccourci pour le paramétrage des couleurs des bordures des cases \option{absent}, \option{present},
+ \option{correct} et \option{vide}, dans cet ordre.
+
+ Si une seule couleur est donnée, elle est appliquée à toutes les cases.
+
+ \begin{example}
+ \begin{GrilleSutom}[CouleurBordures={red,orange,blue}]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ Les bordures pour les cases individuelles peuvent être paramétrer via
+ \option{bordure absent}, \option{bordure present}, \option{bordure correct} et \option{bordure vide}.
+
+ \option[false]{Cadres}[liste de booléens true/false séparées par des virgules]
+
+ Il s'agit d'un raccourci pour ajouter un cadre autour des cases \option{absent}, \option{present}, \option{correct} et \option{vide}, dans cet ordre, avec la même couleur que \option{absent}. C'est utile uniquement pour les cases non carrée.
+
+ \begin{example}
+ \begin{GrilleSutom}[Cadres={false,true,true},Formes=circle]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ Les cadres pour les cases individuelles peuvent être paramétrer via \option{cadre absent}, \option{cadre present},
+ \option{cadre correct} and \option{cadre vide}.
+
+ \option[rectangle]{Formes}[liste de formes TikZ séparées par des virgules]
+
+ De même que pour l'option \option{Couleurs}, c'est un raccourci pour paramétrer les formes des cases \option{absent}, \option{present},
+ \option{correct} et \option{vide}, dans cet ordre.
+
+ \begin{example}
+ \begin{GrilleSutom}[Formes={circle, rectangle, circle}]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ Les formes individuelles peuvent être paramétrer via \option{forme absent}, \option{forme present},
+ \option{forme correct} et \option{forme vide}.
+
+ Les formes proposés par le package \ctan{TikZ}
+ \texttt{shapes.geometric}, incluant \texttt{diamond},
+ \texttt{ellipse}, \texttt{trapezium} et \texttt{star} (voir section~71.2 du manuel \ctan{TikZ}).
+
+ \begin{example}
+ % \usepackage{shapes.geometric}
+ \begin{GrilleSutom}[Formes={diamond,ellipse,star}]{LADLE}
+ FLAIL
+ LAPEL
+ *
+ LADLE
+ LOVER
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[white]{CouleurLettres}[liste de couleurs valides séparées par des virgules]
+
+ Il s'agir d'un raccourci pour paramétrer la couleur des lettres des cases \option{absent}, \option{present}, \option{correct} et \option{vide}, dans cet ordre.
+
+ \begin{example}
+ \begin{GrilleSutom}[CouleurLettres={red,orange,blue}]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ Les cases individuelles peuvent être paramétrer via \option{coultxt absent}, \option{coultxt present}, \option{coultxt correct} et \option{coultxt vide}.
+
+
+ \Section{Caractéristiques communes des cases}
+
+ Les options suivantes s'appliquent à toutes les cases.
+
+ \option[]{nonalign} (default) \qquad
+ \option[]{align}
+
+ Cette option s'occupe de l'alignement vertical des lettres. C'est utile essentiellement lors de l'utilisation de minuscules.
+
+ \begin{example}
+ \begin{GrilleSutom}[align]{agony}
+ groan
+ angry
+ agony
+ \end{GrilleSutom}
+ \end{example}
+
+ \begin{example}
+ \begin{GrilleSutom}{agony} % nonalign par defaut
+ groan
+ angry
+ agony
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[\textbackslash Large\textbackslash bfseries\textbackslash sffamily]{Police}
+ [Police \LaTeX]
+
+ Cela permet de paramétrer la police de toutes les lettres. Toute commande valide est acceptée.
+
+ \begin{example}
+ \begin{GrilleSutom}[Police=\large\ttfamily]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[1mm]{Arrondi}[une longueur]
+
+ Cela permet de paramétrer le paramètres \texttt{rounded corners} (de TikZ) pour les cases \keyword{wordle}.
+
+ \begin{example}
+ \begin{GrilleSutom}[Arrondi=2.5mm]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[0.5mm]{Separation}[une longueur]
+
+ Cela permet de paramétrer la séparation entre les cases du \keyword{wordle}.
+
+ \begin{example}
+ \begin{GrilleSutom}[Separation=2mm,CouleurBordures=black]{REBUS}
+ ABRIS
+ ROUTE
+ REBUS
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[1]{Echelle}[un nombre]
+
+ L'option \option{Echelle} applique un facteur à l'environnement \keyword{wordle}.
+ Cette option modifie les dimensions définies par les options \option{Arrondi},
+ \option{Separation}, \option{Taille} et \option{Epaisseur}. Si vous changez l'échelle, vous voudrez également changer la police de caractères via \option{Police} :
+
+ \begin{example}
+ \begin{GrilleSutom}[Echelle=1.5,Police=\huge\bfseries]{SIZE}
+ HELP
+ WISE
+ SIZE
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[8mm]{Taille}[une longueur]
+
+ L'option \option{Taille} définit la taille des cases. Contrairement à l'option \option{Echelle}, \option{Taille} change uniquement la dimension des cases.
+
+ \begin{example}
+ \begin{GrilleSutom}[Taille=10mm,Police=\huge\bfseries]{REPU}
+ ABRI ROUE * REPU
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[0.25mm]{Epaisseur}[une longueur]•
+
+ Cela permet de paramétrer la taille des bordures des cases. Par défaut la couleur est blanche, donc pour illustrer cette option elle sera paramétrer en rouge.
+
+ \begin{example}
+ \begin{GrilleSutom}[Epaisseur=0.75mm,CouleurBordures=red]{LADLE}
+ FLAIL
+ LAPEL
+ LADLE
+ \end{GrilleSutom}
+ \end{example}
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Lignes et colonnes supplémentaires}
+
+ Par défaut, le nombre de lignes et de colonnes de la grille est fixée par les mots donnés.
+
+ \option[]{Lettres} (défaut)\qquad
+ \option[]{NonLettres}
+
+ Par dafut, les lettres sont affichées, mais l'option \option{NonLettres} peuvent être cachées.
+
+ \begin{example}
+ \begin{GrilleSutom}{CRAZE} % the default
+ TRACE
+ CREAM
+ CRAZE
+ \end{GrilleSutom}
+ \end{example}
+
+ \begin{example}
+ \begin{GrilleSutom}[NonLettres]{CRAZE}
+ TRACE
+ CREAM
+ CRAZE
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[false]{Strict}[true/false/--]
+
+ Par défaut, l'environnement ne vérifie pas si tous les mots sont la même taille, donc les lettres \textit{en trop} n'ont pas de style particulier.
+
+ \begin{example}
+ \begin{GrilleSutom}[Strict=false]{CRAZE} % par defaut
+ GRAIL
+ CRAMPS
+ CRAM
+ CRABS
+ \end{GrilleSutom}
+ \end{example}
+
+ L'option booléenne \option{Strict} force un style particulier des lettre \textit{en trop}.
+
+ \begin{example}
+ \begin{GrilleSutom}[Strict]{CRAZE}
+ GRAIL
+ CRAMPS
+ CRAM
+ CRABS
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[--]{Lignes}
+
+ Par défaut, l'environnement \keyword{wordle} affiche le nombre de lignes en adéquation avec le nombre de mots donnés. L'option \option{Lignes} permet de modifier le nombre de lignes (évenuellement vides).
+
+ \begin{example}
+ \begin{GrilleSutom}[Lignes=4]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{GrilleSutom}
+ \end{example}
+
+ \begin{example}
+ \begin{GrilleSutom}[Lignes=2]{ANVIL}
+ CRANE
+ NATAL
+ ANVIL
+ \end{GrilleSutom}
+ \end{example}
+
+ \option[]{*}
+
+ Le style des case peut être annulé en ajoutant un astérisque,~\option{*}, en tant que mot.
+
+ \begin{example}
+ \begin{GrilleSutom}{ANVIL}
+ CRANE
+ NATAL
+ * % annule la mise en forme
+ ANNUL
+ ANVIL
+ \end{GrilleSutom}
+ \end{example}
+
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Sensibilité à la casse}
+ \index{case~sensitive}
+ \index{case~sensitive!lower case}
+ \index{case~sensitive!natural case}
+ \index{case~sensitive!upper case}
+
+ Par défaut, les lettres peuvent être écrites en majuscule ou en minuscule, comme saisies par l'utilisateur.
+
+ L'option (voir doc en anglais) \option{case~sensitive} permet de spécifier un paramétrage de la casse.
+
+ \begin{example}
+ \begin{GrilleSutom}[case sensitive=false]{youth} % par defaut
+ North
+ South
+ Youth
+ \end{GrilleSutom}
+ \end{example}
+
+ \begin{example}
+ \begin{GrilleSutom}[case sensitive]{youth}
+ North
+ South
+ Youth
+ \end{GrilleSutom}
+ \end{example}
+
+ Les options \textit{fines} \option{natural case} (défaut), \option{lower case}et \option{upper case} permettent de travailler plus finement sur la casse des lettres correctes et/ou mal placées.
+
+ \begin{example}
+ \begin{GrilleSutom}[lower case]{YOUTH}
+ North
+ South
+ Youth
+ \end{GrilleSutom}
+ \end{example}
+
+ \begin{example}
+ \begin{GrilleSutom}[upper case]{youth}
+ North
+ South
+ Youth
+ \end{GrilleSutom}
+ \end{example}
+
+ \begin{example}
+ \begin{GrilleSutom}[natural case]{youth} % par defaut
+ North
+ South
+ youth
+ \end{GrilleSutom}
+ \end{example}
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Style \ctan{TikZ} complémentaire}
+
+ \option[]{tikz}[commandes TikZ]
+
+ \begin{example}
+ % \usetikzlibrary{backgrounds}
+ \begin{GrilleSutom}[
+ tikz={framed,
+ background rectangle/.style={
+ double,ultra thick, draw=SteelBlue
+ }
+ }]{youth}
+ North South youth
+ \end{GrilleSutom}
+ \end{example}
+
+ \pagebreak
+
+ \option[W]{Nom}
+
+ \begin{example}
+ \begin{GrilleSutom}[tikz={remember picture}]{CRAZE}
+ TRACE
+ CREAM
+ CRAZE
+ \end{GrilleSutom}
+ \end{example}
+
+ \begin{example}
+ \tikz[remember picture]\draw[overlay, very thick, opacity=0.5,->,red](0,0)node{Pas de M !!!} to [out=90, in=180](W-2-5);
+ \end{example}
+
+ \begin{example}
+ \begin{GrilleSutom}[name=M,
+ tikz={arr/.style={red,ultra thick,->}}
+ ]{MACAW}
+ [{
+ \draw[arr](M-1-3.south)--(M-3-2.north)--(M-4-2.north);
+ \draw[arr](M-1-1.south)--(M-3-5)--(M-4-3.north east);
+ }]
+ CRANE HOTLY BASIC MACAW
+ \end{GrilleSutom}
+ \end{example}
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Section{Le code}
+
+ Le package \keyword{wordle} est écrit en \LaTeX3. Beaucoup de commentaires permettent d'expliciter le fonctionnement du code. La coloration automatique des cases est un exercice amusant en \LaTeX3, motivépar un message issu de
+ \href{https://tex.stackexchange.com/questions/659860/wordle-like-colored-letter-boxes-in-latex/660056#660056}{tex.stackexchange.com}.
+
+ Le dépôt \href{https://github.com/AndrewMathas/Wordle}{github.com/AndrewMathas/Wordle} est disponible pour signaler tout bug.
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \printindex
+
+\end{document}
diff --git a/graphics/pgf/contrib/wordle/wordle.sty b/graphics/pgf/contrib/wordle/wordle.sty
new file mode 100644
index 0000000000..a463f22837
--- /dev/null
+++ b/graphics/pgf/contrib/wordle/wordle.sty
@@ -0,0 +1,670 @@
+% ---------------------------------------------------------------
+% wordle --- A latex package for typesetting wordle puzzles
+%
+% E-mail: andrew.mathas@gmail.com and cpierquet@outlook.fr
+% Released under the LaTeX Project Public License v1.3c or later
+% See http://www.latex-project.org/lppl.txt
+% ----------------------------------------------------------------
+
+\NeedsTeXFormat{LaTeX2e}
+
+% Package version
+\def\wordle@version{0.3.0}
+\def\wordle@release{2024-08-18}
+
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+\DeclareRelease{\wordle@version}{\wordle@release}{wordle.sty}
+\DeclareCurrentRelease{}{\wordle@release}
+
+\ProvidesExplPackage{wordle} {\wordle@release} {\wordle@version}
+ {A latex package for typesetting wordle puzzles}
+
+% ----------------------------------------------------------------
+% Required packages
+%\RequirePackage{xcolor}
+\RequirePackage{tikz}
+
+% ----------------------------------------------------------------
+% predefined tile colours
+
+% from https://www.nytimes.com/games/wordle
+\definecolor{WordleAbsent} {HTML} {797D7F}
+\definecolor{WordlePresent} {HTML} {F7DA21}
+\definecolor{WordleCorrect} {HTML} {6AAB64}
+\definecolor{WordleEmpty} {HTML} {F5F5DC}
+
+\definecolor{WordleHardPresent} {HTML} {95BEFA}
+\definecolor{WordleHardCorrect} {HTML} {FB9B00}
+
+% from https://sutom.nocle.fr/#
+\definecolor{WordleSutomAbsent} {HTML} {0077B7}
+\definecolor{WordleSutomPresent} {HTML} {FFBB00}
+\definecolor{WordleSutomCorrect} {HTML} {EB2152}
+
+% ----------------------------------------------------------------
+% package variables
+
+\bool_new:N \l__wordle_case_sensitive_bool % case sensitive mode (false by default)
+\bool_new:N \l__wordle_strict_bool % strict mode (false by default)
+
+\dim_new:N \l__wordle_grid_dim
+\dim_new:N \l__wordle_rounded_dim
+\dim_new:N \l__wordle_sep_dim
+\dim_new:N \l__wordle_size_dim
+\dim_new:N \l__wordle_thickness_dim
+
+\int_new:N \l__wordle_rows_int
+
+\fp_new:N \l__wordle_scale_fp
+
+\tl_new:N \l__wordle_align_tl
+\tl_new:N \l__wordle_depth_tl
+\tl_new:N \l__wordle_font_tl
+\tl_new:N \l__wordle_name_tl
+\tl_new:N \l__wordle_style_tl
+\tl_new:N \l__wordle_tikz_tl
+\tl_new:N \l__wordle_tile_style_tl
+
+\tl_new:N \l__wordle_present_border_tl
+\tl_new:N \l__wordle_present_colour_tl
+\tl_new:N \l__wordle_present_frame_tl
+\tl_new:N \l__wordle_present_shape_tl
+\tl_new:N \l__wordle_present_text_tl
+
+\tl_new:N \l__wordle_correct_border_tl
+\tl_new:N \l__wordle_correct_colour_tl
+\tl_new:N \l__wordle_correct_frame_tl
+\tl_new:N \l__wordle_correct_shape_tl
+\tl_new:N \l__wordle_correct_text_tl
+
+\tl_new:N \l__wordle_empty_border_tl
+\tl_new:N \l__wordle_empty_colour_tl
+\tl_new:N \l__wordle_empty_frame_tl
+\tl_new:N \l__wordle_empty_shape_tl
+\tl_new:N \l__wordle_empty_text_tl
+
+\tl_new:N \l__wordle_absent_border_tl
+\tl_new:N \l__wordle_absent_colour_tl
+\tl_new:N \l__wordle_absent_frame_tl
+\tl_new:N \l__wordle_absent_shape_tl
+\tl_new:N \l__wordle_absent_text_tl
+
+
+% ----------------------------------------------------------------
+% Assign up to four style attributes from comma separated list to absent,
+% present, correct, empty, respectively. If there is only one entry in
+% the list then everything is set equal to that entry
+\cs_new_nopar:Npn \__wordle_set_style:nn #1#2
+{
+ \seq_set_split:Nnn \l_tmpa_seq {,} {#2}
+ \int_compare:nNnTF {\seq_count:N \l_tmpa_seq} = {1}
+ {
+ \tl_set:co {l__wordle_absent_#1_tl} {#2}
+ \tl_set:co {l__wordle_present_#1_tl} {#2}
+ \tl_set:co {l__wordle_correct_#1_tl} {#2}
+ \tl_set:co {l__wordle_empty_#1_tl} {#2}
+ }
+ {
+ \seq_pop_left:NNT \l_tmpa_seq \l_tmpa_tl { \tl_set:co {l__wordle_absent_#1_tl} {\l_tmpa_tl} }
+ \seq_pop_left:NNT \l_tmpa_seq \l_tmpa_tl { \tl_set:co {l__wordle_present_#1_tl} {\l_tmpa_tl} }
+ \seq_pop_left:NNT \l_tmpa_seq \l_tmpa_tl { \tl_set:co {l__wordle_correct_#1_tl} {\l_tmpa_tl} }
+ \seq_pop_left:NNT \l_tmpa_seq \l_tmpa_tl { \tl_set:co {l__wordle_empty_#1_tl} {\l_tmpa_tl} }
+ }
+}
+
+% apply the wordle styles
+\cs_new_nopar:Npn \__wordle_apply_style:n #1 {
+ \str_case:enF { #1 }
+ {
+ {hard}
+ {
+ \__wordle_set_style:nn {border} {white}
+ \__wordle_set_style:nn {colour} {WordleAbsent,WordleHardPresent,WordleHardCorrect,WordleEmpty}
+ \__wordle_set_style:nn {frame} {false}
+ \__wordle_set_style:nn {shape} {rectangle}
+ \__wordle_set_style:nn {text} {white,white,white,black}
+ }
+
+ {alt}
+ { % alt appears in the English version of Cedric's manual for sutom
+ \__wordle_set_style:nn {border} {white}
+ \__wordle_set_style:nn {colour} {WordleSutomAbsent,WordleSutomPresent,WordleSutomCorrect,WordleEmpty}
+ \__wordle_set_style:nn {frame} {false,true,false,false}
+ \__wordle_set_style:nn {shape} {rectangle,circle,rectangle,circle}
+ \__wordle_set_style:nn {text} {white,white,white,black}
+ \tl_set:Nn \l_wordle_font_tl {\LARGE\bfseries\sffamily}
+
+ }
+
+ {sutom}
+ {
+ \__wordle_set_style:nn {border} {white}
+ \__wordle_set_style:nn {colour} {WordleSutomAbsent,WordleSutomPresent,WordleSutomCorrect,WordleEmpty}
+ \__wordle_set_style:nn {frame} {false,true,false,false}
+ \__wordle_set_style:nn {shape} {rectangle,circle,rectangle,circle}
+ \__wordle_set_style:nn {text} {white,white,white,black}
+ \tl_set:Nn \l_wordle_font_tl {\LARGE\bfseries\sffamily}
+ }
+ }
+ {
+ % default style
+ \__wordle_set_style:nn {border} {white}
+ \__wordle_set_style:nn {colour} {WordleAbsent,WordlePresent,WordleCorrect,WordleEmpty}
+ \__wordle_set_style:nn {frame} {false}
+ \__wordle_set_style:nn {shape} {rectangle}
+ \__wordle_set_style:nn {text} {white,white,white,black}
+ }
+}
+
+% rescale dimensions
+\cs_new_nopar:Npn \__wordle_rescale:n #1
+{
+ \fp_set:Nn \l__wordle_scale_fp {#1}
+ \dim_set:Nn \l__wordle_rounded_dim { \fp_eval:n {#1*\dim_to_decimal_in_mm:n {\l__wordle_rounded_dim }}mm }
+ \dim_set:Nn \l__wordle_sep_dim { \fp_eval:n {#1*\dim_to_decimal_in_mm:n {\l__wordle_sep_dim }}mm }
+ \dim_set:Nn \l__wordle_size_dim { \fp_eval:n {#1*\dim_to_decimal_in_mm:n {\l__wordle_size_dim }}mm }
+ \dim_set:Nn \l__wordle_thickness_dim { \fp_eval:n {#1*\dim_to_decimal_in_mm:n {\l__wordle_thickness_dim}}mm }
+}
+
+
+% ----------------------------------------------------------------
+% just in case we're running an old version of latex
+\providecommand \IfFormatAtLeastTF { \@ifl@t@r \fmtversion }
+
+\IfFormatAtLeastTF { 2022-06-01 }
+ { \ProcessKeyOptions [ wordle ] }
+ {
+ \RequirePackage { l3keys2e }
+ \ProcessKeysOptions { wordle }
+ }
+
+% ----------------------------------------------------------------
+% Define keys for the package options and their defaults
+
+\keys_define:nn { wordle }
+{
+ % apply puzzle styles: sets colours of absent, present, correct and empty tiles
+ style .code:n = {
+ \seq_set_from_clist:Nn \l_tmpa_seq {#1}
+ \seq_map_inline:Nn \l_tmpa_seq { \__wordle_apply_style:n { \str_lowercase:n{##1}} }
+ },
+ Style .meta:n = { style = #1 },
+ style .initial:n = standard,
+
+ % specifying tile colours and shapes
+ borders .code:n = { \__wordle_set_style:nn {border} {#1} },
+ BorderColor .code:n = { \__wordle_set_style:nn {border} {#1} },
+ CouleurBordures.code:n = { \__wordle_set_style:nn {border} {#1} },
+
+ Couleurs .code:n = { \__wordle_set_style:nn {colour} {#1} },
+ colours .code:n = { \__wordle_set_style:nn {colour} {#1} },
+
+ frames .code:n = { \__wordle_set_style:nn {frame} {#1} },
+ Cadres .code:n = { \__wordle_set_style:nn {frame} {#1} },
+ frames .default:n = true,
+ shapes .code:n = { \__wordle_set_style:nn {shape} {#1} },
+ Formes .code:n = { \__wordle_set_style:nn {shape} {#1} },
+
+ % text colour
+ text .code:n = { \__wordle_set_style:nn {text} {#1} },
+ CouleurLettres .code:n = { \__wordle_set_style:nn {text} {#1} },
+
+ % align letters in puzzle
+ align .code:n = {
+ \tl_set:Nn \l__wordle_align_tl {\vphantom{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}
+ \tl_set:Nn \l__wordle_depth_tl {text~depth=0pt}
+ },
+ noalign .code:n = {
+ \tl_set:Nn \l__wordle_align_tl {}
+ \tl_set:Nn \l__wordle_depth_tl {}
+ },
+ nonalign .meta:n = { noalign },
+ align .initial:n = {true},
+
+ absent .tl_set:N = \l__wordle_absent_colour_tl,
+ absent~color .tl_set:N = \l__wordle_absent_colour_tl,
+ couleur~absent .tl_set:N = \l__wordle_absent_colour_tl,
+ absent~colour .tl_set:N = \l__wordle_absent_colour_tl,
+ bordure~absent .tl_set:N = \l__wordle_absent_border_tl,
+ absent~border .tl_set:N = \l__wordle_absent_border_tl,
+ absent~frame .tl_set:N = \l__wordle_absent_frame_tl,
+ cadre~absent .tl_set:N = \l__wordle_absent_frame_tl,
+ absent~frame .default:n = true,
+ absent~shape .tl_set:N = \l__wordle_absent_shape_tl,
+ forme~absent .tl_set:N = \l__wordle_absent_shape_tl,
+ absent~text .tl_set:N = \l__wordle_absent_text_tl,
+ coultxt~absent .tl_set:N = \l__wordle_absent_text_tl,
+
+ correct .tl_set:N = \l__wordle_correct_colour_tl,
+ correct~color .tl_set:N = \l__wordle_correct_colour_tl,
+ correct~colour .tl_set:N = \l__wordle_correct_colour_tl,
+ couleur~correct.tl_set:N = \l__wordle_correct_colour_tl,
+ correct~border .tl_set:N = \l__wordle_correct_border_tl,
+ bordure~correct.tl_set:N = \l__wordle_correct_border_tl,
+ correct~frame .tl_set:N = \l__wordle_correct_frame_tl,
+ cadre~correct .tl_set:N = \l__wordle_correct_frame_tl,
+ correct~frame .default:n = true,
+ correct~shape .tl_set:N = \l__wordle_correct_shape_tl,
+ forme~correct .tl_set:N = \l__wordle_correct_shape_tl,
+ correct~text .tl_set:N = \l__wordle_correct_text_tl,
+ coultxt~correct.tl_set:N = \l__wordle_correct_text_tl,
+
+ empty .tl_set:N = \l__wordle_empty_colour_tl,
+ couleur~vide .tl_set:N = \l__wordle_empty_colour_tl,
+ empty~color .tl_set:N = \l__wordle_empty_colour_tl,
+ empty~colour .tl_set:N = \l__wordle_empty_colour_tl,
+ empty~border .tl_set:N = \l__wordle_empty_border_tl,
+ bordure~vide .tl_set:N = \l__wordle_empty_border_tl,
+ empty~frame .tl_set:N = \l__wordle_empty_frame_tl,
+ cadre~vide .tl_set:N = \l__wordle_empty_frame_tl,
+ empty~frame .default:n = true,
+ empty~shape .tl_set:N = \l__wordle_empty_shape_tl,
+ forme~vide .tl_set:N = \l__wordle_empty_shape_tl,
+ empty~text .tl_set:N = \l__wordle_empty_text_tl,
+ coultxt~vide. tl_set:N = \l__wordle_empty_text_tl,
+
+ present .tl_set:N = \l__wordle_present_colour_tl,
+ couleur~present.tl_set:N = \l__wordle_present_colour_tl,
+ present~color .tl_set:N = \l__wordle_present_colour_tl,
+ present~colour .tl_set:N = \l__wordle_present_colour_tl,
+ present~border .tl_set:N = \l__wordle_present_border_tl,
+ bordure~present.tl_set:N = \l__wordle_present_border_tl,
+ present~frame .tl_set:N = \l__wordle_present_frame_tl,
+ cadre~present .tl_set:N = \l__wordle_present_frame_tl,
+ present~frame .default:n = true,
+ present~shape .tl_set:N = \l__wordle_present_shape_tl,
+ forme~present .tl_set:N = \l__wordle_present_shape_tl,
+ present~text .tl_set:N = \l__wordle_present_text_tl,
+ coultxt~present.tl_set:N = \l__wordle_present_text_tl,
+
+ % text font
+ font .tl_set:N = \l__wordle_font_tl,
+ Fonte .tl_set:N = \l__wordle_font_tl,
+ Police .tl_set:N = \l__wordle_font_tl,
+ font .initial:n = \Large\bfseries\sffamily,
+
+ % tile size
+ size .dim_set:N = \l__wordle_size_dim,
+ Taille .dim_set:N = \l__wordle_size_dim,
+ size .initial:n = 8mm,
+
+ % thickness of tile border
+ thickness .dim_set:N = \l__wordle_thickness_dim,
+ Epaisseur .dim_set:N = \l__wordle_thickness_dim,
+ Thick .code:n = {\dim_set:Nn \l__wordle_thickness_dim {#1mm}},
+ thickness .initial:n = 0.25mm,
+
+ % rounded-corner = #
+ rounded .dim_set:N = \l__wordle_rounded_dim,
+ Arrondi .dim_set:N = \l__wordle_rounded_dim,
+ rounded .default:n = 4pt,
+ Rounded .code:n = {\dim_set:Nn \l__wordle_rounded_dim {#1mm}},
+ rounded .initial:n = 1mm,
+
+ % separation between tiles
+ separation .dim_set:N = \l__wordle_sep_dim,
+ Separation .dim_set:N = \l__wordle_sep_dim,
+ separation .initial:n = 0.5mm,
+
+ % rescale tiles
+ scale .code:n = { \__wordle_rescale:n {#1} },
+ Echelle .code:n = { \__wordle_rescale:n {#1} },
+ scale .initial:n = 1,
+ Unit .code:n = { \__wordle_rescale:n {#1} },
+ Unite .code:n = { \__wordle_rescale:n {#1} },
+
+ % letter case
+ case~sensitive .bool_set:N = \l__wordle_case_sensitive_bool,
+ case~sensitive .default:n = true,
+ case~sensitive .initial:n = false,
+
+ % letter visibility
+ letters .code:n = {\cs_set_eq:NN \__wordle_letter:n \__wordle_letter_natural:n},
+ Lettres .code:n = {\cs_set_eq:NN \__wordle_letter:n \__wordle_letter_natural:n},
+ noletters .code:n = {\cs_set_eq:NN \__wordle_letter:n \__wordle_letter_none:n},
+ NonLettres .code:n = {\cs_set_eq:NN \__wordle_letter:n \__wordle_letter_none:n},
+ letters .initial:n = true,
+
+ % forced letter case
+ natural~case .code:n = {
+ \cs_set_eq:NN \__wordle_letter:n \__wordle_letter_natural:n
+ },
+ lower~case .code:n = {
+ \cs_set_eq:NN \__wordle_letter:n \__wordle_letter_lower:n
+ \bool_set_false:N \l__wordle_case_sensitive_bool
+ },
+ upper~case .code:n = {
+ \cs_set_eq:NN \__wordle_letter:n \__wordle_letter_upper:n
+ \bool_set_false:N \l__wordle_case_sensitive_bool
+ },
+
+ % puzzle specs: rows and columns
+ rows .int_set:N = \l__wordle_rows_int,
+ Lignes .int_set:N = \l__wordle_rows_int,
+ rows .initial:n = 0,
+
+ strict .bool_set:N = \l__wordle_strict_bool,
+ Strict .bool_set:N = \l__wordle_strict_bool,
+ strict .default:n = true,
+ strict .initial:n = false,
+
+ % tikz settings
+ tile~style .tl_set:N = \l__wordle_tile_style_tl,
+ Style~case .tl_set:N = \l__wordle_tile_style_tl,
+ tile~style .initial:n = ,
+
+ name .tl_set:N = \l__wordle_name_tl,
+ Nom .tl_set:N = \l__wordle_name_tl,
+ name .initial:n = W,
+ tikz .tl_set:N = \l__wordle_tikz_tl,
+ tikz .initial:n = ,
+}
+
+% user settings
+\NewDocumentCommand\WordleSetup{ m }{ \keys_set:nn { wordle } {#1} }
+\NewDocumentCommand\ParamsSutom{ m }{ \keys_set:nn { wordle } {#1} }
+
+% ----------------------------------------------------------------
+% Define TikZ Wordle styles for the letters. Using tikz styles both
+% ensures consistency and has the added advantage of taking care of
+% expansion issues with the tile settings
+\tikzset{/Wordle/.is~family, /Wordle,
+ tile/.style = {
+ /tikz, % change back to using tikz keys
+ inner~sep = \l__wordle_sep_dim,
+ minimum~height = \l__wordle_size_dim,
+ minimum~size = \l__wordle_size_dim,
+ rounded~corners= \l__wordle_rounded_dim,
+ line~width = \l__wordle_thickness_dim,
+ font = \l__wordle_font_tl,
+ % scale = \fp_to_decimal:N \l__wordle_scale_fp,
+ text = \tl_use:c {l__wordle_#1_text_tl},
+ fill = \tl_use:c {l__wordle_#1_colour_tl},
+ shape = \tl_use:c {l__wordle_#1_shape_tl},
+ },
+ frame/.style = {
+ /Wordle/tile=#1,
+ /tikz, % change back to using tikz keys
+ draw = \tl_use:c{l__wordle_#1_border_tl},
+ minimum~size = {\l__wordle_size_dim+\l__wordle_thickness_dim},
+ fill = \tl_use:c {l__wordle_#1_colour_tl},
+ shape = rectangle,
+ },
+}
+
+% apply a TikZ setting
+\cs_new_nopar:Npn \__wordle_tikzset:n #1 { \exp_args:Nx \tikzset{#1} }
+
+% ----------------------------------------------------------------
+% preprocessing of the wordle letters
+\cs_new_nopar:Npn \__wordle_letter_none:n #1 {}
+\cs_new_nopar:Npn \__wordle_letter_natural:n #1 {#1}
+\cs_new_nopar:Npn \__wordle_letter_lower:n #1 { \str_lowercase:n {#1} }
+\cs_new_nopar:Npn \__wordle_letter_upper:n #1 { \str_uppercase:n {#1} }
+
+% by default wordle letters are not processed
+\cs_set_eq:NN \__wordle_letter:n \__wordle_letter_natural:n
+
+% Print a letter in a box as a node. There is slightly different behaviour
+% depending on whether the tile is frames or we are in strict mode. The way
+% that the entry is printed depends is controlled by \__wordle_letter:n.
+\cs_new_nopar:Npn \wordle__boxed_letter:nn #1#2
+{
+ % determine the node name, which takes the form <W>-<row>-<col>
+ \tl_set:No \l_tmpa_tl
+ {
+ \l__wordle_name_tl-\int_eval:n{1+\l__wordle_row_index_int}-\int_use:N\l__wordle_letter_index_int
+ }
+
+ % the construction of the node depends on whether the tile is framed
+ \tl_if_eq:cnTF {l__wordle_#1_frame_tl} {true}
+ {
+ % draw the frame
+ \node[/Wordle/frame=absent] % frame use the absent fill colour
+ at ({\l__wordle_letter_index_int*\l__wordle_grid_dim},{-\l__wordle_row_index_int*\l__wordle_grid_dim}){};
+ % draw the tile
+ \node[/Wordle/tile=#1]
+ (\l_tmpa_tl) at ({\l__wordle_letter_index_int*\l__wordle_grid_dim},
+ {-\l__wordle_row_index_int*\l__wordle_grid_dim})
+ { \l__wordle_align_tl\__wordle_letter:n {#2} };
+ }
+ {
+ % draw the tile, with a border
+ \node[/Wordle/frame=#1, /Wordle/tile=#1]
+ (\l_tmpa_tl) at ({\l__wordle_letter_index_int*\l__wordle_grid_dim},
+ {-\l__wordle_row_index_int*\l__wordle_grid_dim})
+ { \l__wordle_align_tl\__wordle_letter:n {#2} };
+ }
+
+ % if strict then put a slash through any extra letters
+ \bool_if:NT \l__wordle_strict_bool
+ {
+ \int_compare:nNnT {\l__wordle_letter_index_int} > {\seq_count:N \l__wordle_answer_seq }
+ {
+ \draw[red,ultra~thick] (\tl_use:N\l_tmpa_tl.south~west)--(\tl_use:N\l_tmpa_tl.north~east);
+ }
+ }
+}
+
+\seq_new:N \l__wordle_answer_seq % the answer
+\prop_new:N \l__wordle_answer_counts_prop % count letters in wordle
+\seq_new:N \l__wordle_solution_seq % list of all words
+\prop_new:N \l__wordle_word_counts_prop % count letters in word
+\int_new:N \l__wordle_letter_index_int % index of current letter in word
+\int_new:N \l__wordle_row_index_int % TikZ row index in solution
+
+% a conditional for non-negative prop counter in \l__wordle_word_counts_prop
+\prg_new_protected_conditional:Npnn \if__wordle_letter_nonnegative:n #1 {TF}
+{
+ \prop_if_in:NnTF \l__wordle_word_counts_prop {#1}
+ { % letter in in prop
+ \prop_get:NnN \l__wordle_word_counts_prop {#1} \l_tmpa_tl
+ \int_compare:nNnTF {\l_tmpa_tl} < {0}
+ {\prg_return_false:} {\prg_return_true:}
+ }
+ {\prg_return_false:}
+}
+
+\cs_generate_variant:Nn \str_if_eq:nVTF {xVTF}
+
+% a conditional for comparing letters
+\prg_new_protected_conditional:Npnn \if__wordle_letters_agree:n #1 {T, TF}
+{
+ \str_set:Nx \l_tmpa_str
+ {\seq_item:Nn \l__wordle_answer_seq {\l__wordle_letter_index_int}}
+
+
+ \bool_if:NTF \l__wordle_case_sensitive_bool
+ {\str_if_eq:nVTF {#1} \l_tmpa_str {\prg_return_true:} {\prg_return_false:}}
+ {\str_if_eq:xVTF {\str_uppercase:n{#1}} \l_tmpa_str {\prg_return_true:} {\prg_return_false:}}
+}
+
+% add #3 to <prop=#1>.#2
+\cs_new_nopar:Npn \wordle__add_to_prop_counter:Nnn #1#2#3
+{
+ \prop_put_if_new:Nnn #1 {#2} {0}
+ \prop_pop:NnN #1 {#2} \l_tmp_a
+ \prop_put:Nnx #1 {#2} {\int_eval:n {#3+\l_tmp_a}}
+}
+
+% make \l__wordle_answer_counts_prop<x> = #x's in wordle_seq
+\cs_new_nopar:Npn \wordle__count_letters_in_answer:n #1
+{
+ \wordle__add_to_prop_counter:Nnn \l__wordle_answer_counts_prop {#1} {1}
+}
+
+% first run: subtract correct matches from letter counts
+\cs_new_nopar:Npn \wordle__count_letters_in_word:n #1
+{
+ \int_incr:N \l__wordle_letter_index_int
+ \if__wordle_letters_agree:nT {#1}
+ { \wordle__add_to_prop_counter:Nnn \l__wordle_word_counts_prop {#1} {-1} }
+}
+
+% on the second run we print a coloured wordle word
+\cs_new_nopar:Npn \wordle__write_letters_in_word:n #1
+{
+ \int_incr:N \l__wordle_letter_index_int
+ \if__wordle_letters_agree:nTF {#1}
+ { \wordle__boxed_letter:nn {correct} {#1} }
+ {
+ % subtract 1 from the prop counter
+ \wordle__add_to_prop_counter:Nnn \l__wordle_word_counts_prop {#1} {-1}
+ % if the counter is non-negative this is a pseudo match
+ \if__wordle_letter_nonnegative:nTF {#1}
+ { \wordle__boxed_letter:nn {present} {#1} }
+ { \wordle__boxed_letter:nn {absent} {#1} }
+ }
+}
+
+\cs_generate_variant:Nn \seq_set_split:Nnn {Nnx}
+\cs_generate_variant:Nn \cs_set_nopar:Nn {NV}
+
+% typeset the word "#1", colouring letters using the wordle convention
+\cs_new_nopar:Npn \wordle__mark_word:n #1
+{
+ \str_if_eq:nnTF {#1} {*}
+ {
+ \cs_set_eq:NN \wordle__process_word:n \wordle__empty_word:n
+ }
+ {
+ \prop_set_eq:NN \l__wordle_word_counts_prop \l__wordle_answer_counts_prop
+ \tl_map_function:nN {#1} \wordle__count_letters_in_word:n
+ \int_zero:N \l__wordle_letter_index_int
+ \tl_map_function:nN {#1} \wordle__write_letters_in_word:n
+
+ % if strict then check lengths
+ \bool_if:NT \l__wordle_strict_bool
+ {
+ \int_while_do:nNnn {\l__wordle_letter_index_int} < {\seq_count:N\l__wordle_answer_seq}
+ {
+ \int_incr:N \l__wordle_letter_index_int
+ \wordle__boxed_letter:nn {absent} {\c_space_tl}
+ }
+ }
+
+ % increment the row index
+ \int_incr:N \l__wordle_row_index_int
+ }
+}
+
+% typeset the word "#1" by putting boxes around each letter
+\cs_new_nopar:Npn \wordle__empty_word:n #1
+{
+ \tl_map_inline:nn {#1}
+ {
+ \int_incr:N \l__wordle_letter_index_int
+ \wordle__boxed_letter:nn {empty} {##1}
+ }
+ % if strict then check lengths
+ \bool_if:NT \l__wordle_strict_bool
+ {
+ \int_while_do:nNnn {\l__wordle_ltter_index_int} < {\seq_count:N\l__wordle_answer_seq}
+ {
+ \int_incr:N \l__wordle_letter_index_int
+ \wordle__boxed_letter:nn {empty} {\c_space_tl}
+ }
+ }
+ \int_incr:N \l__wordle_row_index_int
+}
+
+\cs_set_eq:NN \wordle__process_word:n \wordle__mark_word:n
+
+\NewDocumentEnvironment{wordle}{ O{} m O{} b }
+{
+ % apply wordle environment options
+ \WordleSetup{#1}
+ \begin{tikzpicture}
+
+ % apply any tikz settings -- we need to some expansion trickery to do this
+ \__wordle_tikzset:n {\l__wordle_tikz_tl}
+ \__wordle_tikzset:n {/Wordle/tile/.append~style={\l__wordle_depth_tl,\l__wordle_tile_style_tl}}
+
+ % set grid dimension = box size + separation
+ \dim_set:Nn \l__wordle_grid_dim {\l__wordle_size_dim+\l__wordle_sep_dim}
+
+ % split the answer into letters
+ \bool_if:NTF \l__wordle_case_sensitive_bool
+ { \seq_set_split:Nnn \l__wordle_answer_seq {} {#2} }
+ { \seq_set_split:Nnx \l__wordle_answer_seq {} {\str_uppercase:n {#2}} }
+
+ % count the number of times letters appear in \l__wordle_answer_seq
+ \prop_clear:N \l__wordle_answer_counts_prop
+ \tl_map_function:nN {#2} \wordle__count_letters_in_answer:n
+
+ % split the solution into words
+ \regex_split:nnN {\s} {#4} \l__wordle_solution_seq
+
+ % process the words
+ \int_zero:N \l__wordle_row_index_int
+ \seq_map_inline:Nn \l__wordle_solution_seq
+ {
+ \int_zero:N \l__wordle_letter_index_int
+ \wordle__process_word:n {##1}
+ }
+
+ % if required, add extra required blank rows
+ \int_while_do:nNnn {\l__wordle_row_index_int} < {\l__wordle_rows_int}
+ {
+ \int_zero:N \l__wordle_letter_index_int
+ \int_while_do:nNnn {\l__wordle_letter_index_int} < {\seq_count:N\l__wordle_answer_seq}
+ {
+ \int_incr:N \l__wordle_letter_index_int
+ \wordle__boxed_letter:nn {empty} {\c_space_tl}
+ }
+ \int_incr:N \l__wordle_row_index_int
+ }
+
+ % finally, execute the optional TikZ commands
+ #3
+
+ \end{tikzpicture}
+}{}
+
+% wrapper environment for Gridwordle
+\NewDocumentEnvironment{GridWordle}{ O{} m O{} b }
+ {
+ \begin{wordle}[#1]{#2}[#3]#4]\end{wordle}
+ }
+ {}
+
+% wrapper environment for GrilleSutom
+\NewDocumentEnvironment{GrilleSutom}{ O{} m O{} b }
+ {
+ \begin{wordle}[style=sutom,#1]{#2}[#3]#4\end{wordle}
+ }
+ {}
+
+\endinput
+
+% ----------------------------------------------------------------
+% CHANGE LOG
+%
+% Version 0.3 - \wordle@release
+% - merged AM & CP packages, adding styles and streamlining options, french keys
+%
+% Version 0.2 - \wordle@release
+% - added documentation and cleaned some of the options
+%
+% Version 0.1 - 2022-10-01
+% - initial version
+%
+% ----------------------------------------------------------------
+%
+% Copyright (C) 2022-3 by Andrew Mathas <andrew.mathas@gmail.com>
+% and Cédric Pierquet cpierquet@outlook.fr
+%
+% 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
+% Andrew Mathas.
+%
+% This work consists of the files:
+% wordle.sty
+% wordle.tex