diff options
Diffstat (limited to 'macros/latex/contrib')
268 files changed, 16051 insertions, 75 deletions
diff --git a/macros/latex/contrib/chemnum/README b/macros/latex/contrib/chemnum/README index 645b13c5dd..ff5a15a2b3 100644 --- a/macros/latex/contrib/chemnum/README +++ b/macros/latex/contrib/chemnum/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -chemnum v1.3 2020/12/06 +chemnum v1.3a 2021/01/21 a comprehensive approach for the numbering of chemical compounds @@ -8,7 +8,7 @@ Clemens Niederberger Web: https://github.com/cgnieder/chemnum E-Mail: contact@mychemistry.eu -------------------------------------------------------------------------- -Copyright 2011--2020 Clemens Niederberger +Copyright 2011--2021 Clemens Niederberger This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c diff --git a/macros/latex/contrib/chemnum/chemnum.sty b/macros/latex/contrib/chemnum/chemnum.sty index 26ba6b5c0f..40323d0da4 100644 --- a/macros/latex/contrib/chemnum/chemnum.sty +++ b/macros/latex/contrib/chemnum/chemnum.sty @@ -12,7 +12,7 @@ % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % -------------------------------------------------------------------------- -% Copyright 2011--2020 Clemens Niederberger +% Copyright 2011--2021 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -29,9 +29,9 @@ \RequirePackage{expl3,xparse,l3keys2e} \ExplSyntaxOn -\tl_const:Nn \c_chemnum_date_tl {2020/12/06} +\tl_const:Nn \c_chemnum_date_tl {2021/01/21} \tl_const:Nn \c_chemnum_version_number_tl {1.3} -\tl_const:Nn \c_chemnum_version_suffix_tl {} +\tl_const:Nn \c_chemnum_version_suffix_tl {a} \tl_const:Nx \c_chemnum_version_tl { \c_chemnum_version_number_tl \c_chemnum_version_suffix_tl } \tl_const:Nn \c_chemnum_info_tl @@ -1908,6 +1908,9 @@ \bool_if:nF {#1} { \chemnum_cmpd:nnnn { \c_true_bool } { \c_false_bool } {#2} {#3} } + \tl_set_eq:NN + \l__chemnum_compound_replace_local_format_tl + \l__chemnum_compound_replace_format_tl % set specific replacement options \keys_set_groups:nnn {chemnum} {replace} { replace=false, #2 } \bool_lazy_and:nnTF @@ -2098,3 +2101,4 @@ HISTORY: - \chemnum_if_subcompounds:nTF - \chemnum_count_subcompounds:n - \chemnum_get_subcompound:nn +2021/01/21 v1.3a - fix issue #17 diff --git a/macros/latex/contrib/chemnum/chemnum_en.pdf b/macros/latex/contrib/chemnum/chemnum_en.pdf Binary files differindex 5194431882..1049dd97a2 100644 --- a/macros/latex/contrib/chemnum/chemnum_en.pdf +++ b/macros/latex/contrib/chemnum/chemnum_en.pdf diff --git a/macros/latex/contrib/chemnum/chemnum_en.tex b/macros/latex/contrib/chemnum/chemnum_en.tex index 7ff89e4b1d..19123e1b5c 100644 --- a/macros/latex/contrib/chemnum/chemnum_en.tex +++ b/macros/latex/contrib/chemnum/chemnum_en.tex @@ -12,7 +12,7 @@ % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % -------------------------------------------------------------------------- -% Copyright 2011--2020 Clemens Niederberger +% Copyright 2011--2021 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c diff --git a/macros/latex/contrib/matapli/README.md b/macros/latex/contrib/matapli/README.md new file mode 100644 index 0000000000..27f34ab2cd --- /dev/null +++ b/macros/latex/contrib/matapli/README.md @@ -0,0 +1,12 @@ +# matapli Class + +matapli --- class for the French journal "MATAPLI" of the SMAI, +website: [http://smai.emath.fr/spip.php?article27](http://smai.emath.fr/spip.php?article27) +version 1.0.0 dated 2021/01/20 + +## License + +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. + + + diff --git a/macros/latex/contrib/matapli/doc/bibliomatapli.bib b/macros/latex/contrib/matapli/doc/bibliomatapli.bib new file mode 100644 index 0000000000..a7bba9f24d --- /dev/null +++ b/macros/latex/contrib/matapli/doc/bibliomatapli.bib @@ -0,0 +1,17 @@ +@manual{biblatex, +title = {The {Bib\LaTeX} package}, +subtitle = {Sophisticated Bibliographies in LaTeX}, +author = {Philip Kime and Moritz Wemheuer and +Philipp Lehman}, +url = {https://github.com/plk/biblatex}, +urldate = {2020-06-25}, +date = {2019-12-01}, +version = {3.14} +} + +@online{BitouzeWeb, +Author = {Bitouzé, Denis}, + title = {Site web}, +date = {2020}, +url = {http://gte.univ-littoral.fr/members/dbitouze/pub}, +}
\ No newline at end of file diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/3e.pdf b/macros/latex/contrib/matapli/doc/examples/couverture/3e.pdf Binary files differnew file mode 100644 index 0000000000..2d794595d9 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/3e.pdf diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/4e.pdf b/macros/latex/contrib/matapli/doc/examples/couverture/4e.pdf Binary files differnew file mode 100644 index 0000000000..b410891a2e --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/4e.pdf diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/CIMPA.png b/macros/latex/contrib/matapli/doc/examples/couverture/CIMPA.png Binary files differnew file mode 100644 index 0000000000..458e9835a6 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/CIMPA.png diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/Logo.pdf b/macros/latex/contrib/matapli/doc/examples/couverture/Logo.pdf Binary files differnew file mode 100644 index 0000000000..8785084d22 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/Logo.pdf diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/corona.jpg b/macros/latex/contrib/matapli/doc/examples/couverture/corona.jpg Binary files differnew file mode 100644 index 0000000000..fc3850253b --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/corona.jpg diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/couverture.jpg b/macros/latex/contrib/matapli/doc/examples/couverture/couverture.jpg Binary files differnew file mode 100644 index 0000000000..8b52bdf6fc --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/couverture.jpg diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/couvertureModele.pdf b/macros/latex/contrib/matapli/doc/examples/couverture/couvertureModele.pdf Binary files differnew file mode 100644 index 0000000000..fa9176f81d --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/couvertureModele.pdf diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/couvertureModele.tex b/macros/latex/contrib/matapli/doc/examples/couverture/couvertureModele.tex new file mode 100644 index 0000000000..a413528431 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/couvertureModele.tex @@ -0,0 +1,81 @@ +% compiler avec lualatex +\documentclass{matapli} +%\usepackage{marvosym} +%\usepackage[cam,a4,center]{crop} + +\renewcommand{\numero}{123} %%% modifier chaque numro +\renewcommand{\mois}{Novembre 2020}%%% modifier chaque numro + + +\newcommand{\roundpic}[4][]{ + \tikz\node [circle, inner sep = 5pt, fill=white, draw=black, minimum width = #2, + path picture = { + \node [#1] at (path picture bounding box.center) { + \includegraphics[width=#3]{#4}}; + }] {}; +} +\pagestyle{empty} +\parindent0pt + +\begin{document} + +\newcommand\logo{\includegraphics[width=0.4\paperwidth]{Logo.pdf}} +\newcommand\fond{\includegraphics[width=1.1\paperwidth]{fond.pdf}} +\newcommand\numDate{\No \numero~~ --- ~~ \mois} +\begingroup +\fontspec{libertinussans}%[ + +\begin{tikzpicture}[overlay, remember picture] + \node at (current page.center) {\fond}; + \node[anchor=north west,font=\Huge\bfseries,scale=3] at ($(current page.north west)+(4.7,-3.5)$) {MATAPLI}; + \node[anchor=north west] at ($(current page.north west)+(0.2,-0.2)$) {\logo}; + \node [circle, inner sep = 5pt, fill=white, draw=black, minimum width = 5cm, + path picture = { + \node [] at (path picture bounding box.center) { + \includegraphics[width=5.5cm]{couverture.jpg} + }; + }] at ($(current page.south)+(-3,0.22\paperheight)$) {}; + \node [circle, inner sep = 5pt, fill=white, draw=black, minimum width = 9cm, + path picture = { + \node [] at (path picture bounding box.center) { + \includegraphics[width=9.4cm]{CIMPA.png} + }; + }] at ($(current page.south)+(1,0.5\paperheight)$) {}; + \node [circle, inner sep = 5pt, fill=white, draw=black, minimum width = 3cm, + path picture = { + \node [] at (path picture bounding box.center) { + \includegraphics[width=3cm]{corona.jpg}}; + }] at ($(current page.south)+(1.5,0.23\paperheight)$) {}; + \node[anchor=south east,color=black, font=\bfseries\Huge] at ($(current + page.south east)-(0.5,-0.5)$) {\numDate}; +\end{tikzpicture} +\endgroup + + + +\newpage +\include{redactionModele} %%% %%% modifier chaque numro + +% inner margin : 2cm +% outer margin : 2.5cm +% top : 3cm +% bottom : 2cm +% paperwidth : 17cm +% paperheight : 240 +% on laisse 0.5cm de chaque côté +% on règle la hauteur à la main en fonction de l'image + + + %%%%%%%%%%%%%%%%%%% == Publicit == %%%%%%% +% inner margin +\vspace*{-2.8cm}\hspace*{-1cm}\includegraphics[width=\paperwidth-2cm]{3e} + + +\newpage + + \fancyhead{} + %%%%%%%%%%%%%%%%%%% == Publicit == %%%%%%% +% outer margin + \vspace*{-2.8cm}\hspace{-2cm}\includegraphics[width=\paperwidth-1cm]{4e} +\end{document} +%%%%%%%%%%%%%%%% diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/fond-production.svg b/macros/latex/contrib/matapli/doc/examples/couverture/fond-production.svg new file mode 100644 index 0000000000..e9a4651c0d --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/fond-production.svg @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="210mm" + height="297mm" + viewBox="0 0 210 297" + version="1.1" + id="svg8" + inkscape:version="0.92.3 (2405546, 2018-03-11)" + sodipodi:docname="fond.svg"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.7" + inkscape:cx="257.78896" + inkscape:cy="817.22503" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2560" + inkscape:window-height="1412" + inkscape:window-x="2560" + inkscape:window-y="0" + inkscape:window-maximized="1" /> + <defs + id="defs2" /> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:groupmode="layer" + inkscape:label="Calque 1"> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 590.164,1119.891 c 0.0339,-2.4572 19.74881,-82.7497 20.50354,-83.5044 0.63228,-0.6323 176.82893,-27.5671 180.33278,-27.5671 1.67549,0 1.99618,9.0652 1.99618,56.4286 v 56.4286 H 691.56792 c -80.20362,0 -101.42341,-0.3737 -101.40392,-1.7857 z" + id="path6261" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.70980394;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 335.91097,1114.891 c 0.0315,-3.7322 0.93013,-33.7022 1.99689,-66.6001 1.77865,-54.85198 2.15908,-60.02899 4.58553,-62.40139 1.45528,-1.42286 8.99787,-7.65042 16.76132,-13.83901 l 14.11535,-11.25199 103.74179,28.30947 c 57.05799,15.57022 108.61589,29.63052 114.5731,31.24512 10.31593,2.7959 10.96612,3.2201 13.66385,8.9153 l 2.83252,5.9797 -10.5966,43.2143 -10.59658,43.2143 H 461.42089 335.85364 Z" + id="path6263" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.87450981;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 159.39564,1119.891 c -3.74459,-10.2238 -43.4783,-164.55767 -42.58995,-165.42817 1.63322,-1.60041 84.87199,-37.54807 86.9446,-37.54807 0.9143,0 31.42249,15.97297 67.79596,35.49548 l 66.1336,35.49548 -0.89628,25.09978 c -0.49296,13.8048 -1.24659,39.8855 -1.67472,57.9569 -0.42814,18.0714 -1.12973,36.875 -1.5591,41.7857 l -0.78067,8.9286 h -86.3597 c -67.78655,0 -86.50036,-0.3841 -87.01374,-1.7857 z" + id="path6265" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.58431375;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 2.9964948,1024.5338 c 0,-53.42856 0.5459006,-97.14285 1.2131125,-97.14285 1.8695224,0 107.6717527,26.98011 108.3116727,27.62003 0.31017,0.31016 10.21353,36.81183 22.00749,81.11482 11.79395,44.303 21.7816,81.6759 22.19477,83.0509 0.70895,2.3594 -3.59306,2.5 -76.487919,2.5 H 2.9964948 Z" + id="path6267" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.70980394;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 67.282209,940.73334 C 41.746495,934.26189 16.835781,927.89819 11.925066,926.59179 l -8.9285712,-2.37525 v -91.98423 c 0,-76.74122 0.3229475,-91.98422 1.9488339,-91.98422 1.0718586,0 42.3754303,-2.54929 91.7857143,-5.66508 49.410277,-3.1158 93.340077,-5.84794 97.621777,-6.07143 l 7.78489,-0.40634 14.9709,23.33688 14.97091,23.33689 -12.5437,60.23454 c -6.89904,33.129 -13.48818,64.4663 -14.64255,69.63846 l -2.09886,9.4039 -44.54182,19.22186 -44.54181,19.22184 z" + id="path6269" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.64705884;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 272.28221,950.13707 c -36.14286,-19.44955 -65.86361,-36.22048 -66.04611,-37.26875 -0.40111,-2.3039 27.42084,-135.18544 28.53829,-136.30289 0.43214,-0.43213 24.79818,0.65113 54.14676,2.40726 l 53.36106,3.19295 6.42857,6.59696 c 3.53572,3.62833 19.0389,21.40799 34.45154,39.51037 l 28.02296,32.9134 -19.45327,48.65134 -19.45327,48.65136 -15.71254,12.53607 c -8.64192,6.89484 -16.35542,12.97227 -17.14113,13.5054 -0.78572,0.53313 -31,-14.94393 -67.14286,-34.39347 z" + id="path6271" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.59607846;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 489.6175,990.20569 c -59.60845,-16.3518 -109.85014,-30.09977 -111.6482,-30.55106 -3.19113,-0.80092 -2.80721,-1.97591 16.07784,-49.20581 l 19.34704,-48.3853 60.48244,-20.35893 c 33.26534,-11.19742 61.38422,-20.01289 62.4864,-19.58994 3.19818,1.22725 57.90716,39.5925 59.1097,41.4513 0.59856,0.92518 2.37555,36.55755 3.94888,79.18306 2.5301,68.54639 2.61302,77.48279 0.71775,77.34409 -1.17857,-0.086 -50.9134,-13.5356 -110.52185,-29.88741 z" + id="path6273" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.82352942;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 607.30178,1027.0338 c -2.54416,-5.5158 -3.06409,-13.2519 -5.68166,-84.53786 -1.58468,-43.15654 -2.66298,-78.68468 -2.39623,-78.95143 0.88467,-0.88467 188.37743,-91.77659 191.10046,-92.64085 2.59575,-0.82386 2.67215,2.52402 2.67215,117.10531 0,64.87438 -0.16072,117.95483 -0.35715,117.95643 -0.19643,0 -40.53571,6.1075 -89.64285,13.5684 -49.10715,7.4609 -90.09765,13.5667 -91.09,13.5684 -0.99235,0 -3.06448,-2.7291 -4.60472,-6.0684 z" + id="path6275" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.59215689;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 569.33654,841.38699 c -15.6656,-10.93392 -29.36133,-20.39131 -30.43496,-21.01641 -2.27538,-1.32477 -22.27439,-140.0389 -20.45266,-141.86063 0.6041,-0.6041 32.63417,-15.83762 71.17794,-33.85227 l 70.07956,-32.7539 63.43076,14.85376 c 34.8869,8.16957 64.87717,15.20215 66.64503,15.62795 l 3.21429,0.77418 -0.01,61.7585 -0.01,61.7585 -58.91863,28.4945 c -32.40525,15.67198 -76.3156,36.95477 -97.57857,47.2951 l -38.65996,18.80058 -28.4829,-19.87986 z" + id="path6277" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.48235294;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 379.58397,820.41299 c -17.98404,-21.11924 -32.62573,-38.95674 -32.5371,-39.6389 0.16735,-1.28807 82.13797,-141.536 85.02627,-145.47601 1.41887,-1.93551 6.98134,0.75222 41.63764,20.11891 22,12.29407 40.28402,22.60519 40.63114,22.9136 1.28668,1.14314 19.99906,139.71189 18.9892,140.61863 -1.24082,1.11415 -117.53568,39.87212 -119.62055,39.86635 -0.7856,-0.003 -16.14257,-17.28333 -34.1266,-38.40258 z" + id="path6279" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.63921571;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 284.01861,776.67467 c -27.33069,-1.75553 -49.90637,-3.43753 -50.16818,-3.73779 -0.2618,-0.30026 -7.06184,-10.83164 -15.11119,-23.40307 l -14.63518,-22.85714 6.66757,-24.28572 c 3.66717,-13.35714 10.6965,-38.75 15.62074,-56.42857 l 8.95316,-32.14286 38.46834,-23.87531 c 21.15759,-13.13142 39.45095,-23.89927 40.65192,-23.92857 1.20096,-0.0293 25.11465,10.07174 53.14153,22.44674 l 50.95796,22.5 6.42967,10 6.42967,10 -2.4987,4.28571 c -1.37428,2.35715 -21.05534,35.94643 -43.73567,74.64286 l -41.23696,70.35714 -5.12125,-0.19078 c -2.81669,-0.105 -27.48273,-1.62713 -54.81343,-3.38264 z" + id="path6281" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.6901961;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 3.3454017,621.02168 3.7107806,503.84221 17.282209,502.10509 c 7.464286,-0.95542 14.511712,-1.41038 15.660946,-1.01103 2.22891,0.77453 197.211385,110.45777 198.926285,111.90174 0.55868,0.47043 -5.94742,25.91964 -14.45802,56.55381 l -15.47381,55.69848 -14.8277,1.14795 c -8.15523,0.63137 -52.92069,3.5458 -99.478794,6.47653 l -84.6510932,5.32858 z" + id="path6283" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.22745098;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 134.78969,555.49502 C 80.383085,524.71635 36.025942,499.10062 36.218258,498.57118 36.658019,497.36051 222.56285,355.80499 223.73352,355.78941 c 0.76797,-0.0102 77.82796,69.87751 77.83887,70.59412 0.003,0.16122 2.56768,30.80292 5.70049,68.09265 3.13281,37.28973 5.22009,68.25494 4.63839,68.81157 -1.16645,1.11619 -77.63108,48.45556 -77.98186,48.2787 -0.12029,-0.0606 -44.73312,-25.29277 -99.13972,-56.07143 z" + id="path6285" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.43529412;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 367.81662,585.96027 c -42.53532,-18.76463 -51.42208,-23.17603 -52.26848,-25.94609 -0.93597,-3.06322 -11.20411,-123.53721 -11.14772,-130.79386 0.0227,-2.91785 6.08297,-5.16731 76.01233,-28.21429 41.79323,-13.77401 76.98966,-25.01931 78.21429,-24.98957 1.22463,0.0297 21.28597,9.51189 44.58077,21.07143 l 42.35416,21.01735 -63.24832,95.2318 -63.24833,95.23181 z" + id="path6287" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.2;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 474.47867,653.11801 -40.66068,-22.79436 -6.28097,-10.03658 -6.28098,-10.03658 10.47214,-16.07262 c 5.75968,-8.83995 34.13222,-51.75121 63.05009,-95.35835 37.75574,-56.93435 53.48818,-79.52989 55.80679,-80.15187 3.00303,-0.80558 6.85068,5.82968 55.01621,94.87537 28.48304,52.65785 51.28125,96.22507 50.66271,96.81607 -1.34076,1.28106 -138.89054,65.61445 -140.21145,65.57829 -0.50225,-0.0143 -19.21048,-10.28247 -41.57386,-22.81937 z" + id="path6289" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.33725491;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 724.17257,624.79735 -63.82394,-15.11003 -51.53321,-95.29428 c -28.34326,-52.41186 -51.53321,-95.95969 -51.53321,-96.77294 0,-0.81325 37.34577,-31.25107 82.9906,-67.63961 l 82.99059,-66.16097 9.50941,0.0669 c 5.23017,0.0368 20.92011,0.58806 34.86654,1.22498 l 25.35715,1.15805 v 176.98929 c 0,167.67376 -0.13158,176.98033 -2.5,176.81895 -1.375,-0.0937 -31.22078,-6.96987 -66.32393,-15.28039 z" + id="path6291" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.16470589;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 503.4429,394.54484 -43.12502,-21.1856 -1.46206,-5.48415 c -2.70306,-10.13914 -41.57412,-177.22008 -41.52818,-178.5021 0.025,-0.69727 0.95717,-2.47171 2.07151,-3.94322 1.93708,-2.55795 8.53917,-0.55824 150.3117,45.5279 81.5571,26.51185 149.07977,48.84026 150.05036,49.61868 2.58119,2.07011 -164.61527,135.38739 -169.62186,135.25121 -1.96428,-0.0534 -22.97769,-9.63065 -46.69645,-21.28272 z" + id="path6293" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.29019609;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 264.18071,388.61116 -39.04136,-35.61917 -1.1972,-12.54151 -1.19721,-12.54152 31.88248,-48.66371 31.88248,-48.66371 63.58171,-20.11402 c 34.96994,-11.06272 63.97864,-19.6556 64.46379,-19.0953 1.16585,1.34647 42.89632,180.61112 42.20488,181.30256 -0.29407,0.29408 -34.96047,12.01437 -77.03644,26.04511 l -76.50177,25.51043 z" + id="path6295" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.38431373;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 2.9964948,359.49332 V 217.30998 l 25.3571432,0.92766 25.357143,0.92765 12.142857,7.77258 c 6.678571,4.27492 44.104972,28.78641 83.169772,54.46997 l 71.02693,46.6974 0.69123,5.71428 c 0.38018,3.14286 1.01821,8.67623 1.41784,12.29638 l 0.72661,6.5821 -95.30191,72.62078 -95.301901,72.62078 -13.571428,1.81713 c -7.464286,0.99943 -14.0535719,1.84029 -14.6428576,1.86856 -0.5892857,0.0283 -1.0714286,-63.93109 -1.0714286,-142.13193 z" + id="path6297" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.17647059;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 139.42507,272.23354 C 94.639352,242.77926 58.190468,218.22949 58.427547,217.67849 c 0.237079,-0.551 21.451365,-20.86929 47.142853,-45.15174 25.6915,-24.28245 56.75374,-53.68855 69.02721,-65.34689 L 196.913,85.982878 240.19194,157.04406 c 23.80343,39.08365 43.26937,71.70403 43.25767,72.48975 -0.0177,1.19113 -59.00296,92.24904 -61.7133,95.26934 -0.48547,0.54099 -37.52553,-23.11533 -82.31124,-52.56961 z" + id="path6299" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.07058824;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 24.425066,215.91785 C 13.817923,215.34226 4.6572091,214.79539 4.0679234,214.70256 3.4786377,214.60975 2.9964948,166.96238 2.9964948,108.81952 V 3.1052361 h 99.9726752 99.97267 l -0.73296,6.0714286 c -0.40311,3.3392853 -1.96427,21.4568513 -3.46921,40.2612573 l -2.73628,34.189828 -5.43202,5.235179 c -2.9876,2.879349 -34.62238,32.815351 -70.29948,66.524451 -63.098858,59.61824 -65.026871,61.29321 -70.714284,61.43314 -3.215754,0.0791 -14.525397,-0.32708 -25.13254,-0.90267 z" + id="path6301" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.17647059;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 281.85566,220.60524 c -2.3627,-3.73215 -22.11212,-36.03572 -43.88759,-71.78572 L 198.3763,83.819522 201.42564,45.962379 c 1.67714,-20.821429 3.03811,-38.9821429 3.02438,-40.3571429 -0.0235,-2.3519387 4.73416,-2.4983834 80.33219,-2.4727033 l 80.35714,0.027297 28.71763,81.4622802 28.71764,81.46228 -1.57478,7.45009 c -2.83907,13.43136 0.17687,11.95243 -69.16479,33.91656 -34.62312,10.96695 -63.56593,19.93991 -64.31735,19.93991 -0.75142,0 -3.29934,-3.05357 -5.66204,-6.78571 z" + id="path6303" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.02745098;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 423.38379,160.70115 c -0.56387,-1.42776 -13.32782,-37.3102 -28.36432,-79.738771 L 367.68037,3.8195218 483.42522,3.453929 c 63.65966,-0.2010762 116.0465,-0.06394 116.41519,0.3047477 0.36869,0.3686873 -0.85966,12.7474893 -2.72964,27.5084493 l -3.39999,26.83811 -79.28571,49.539054 c -97.01514,60.61669 -89.73194,56.3722 -91.04128,53.05686 z" + id="path6305" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.17254902;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 568.37945,228.31655 -145.33134,-47.35417 0.1166,-4.28572 c 0.0641,-2.35714 0.53465,-5.69705 1.04561,-7.42201 0.65978,-2.22733 24.94309,-18.11738 83.78618,-54.8264 45.57142,-28.429554 83.82142,-51.947702 85,-52.262551 1.54844,-0.413658 18.88544,28.914851 62.5,105.729511 33.19642,58.46607 60.35714,106.69913 60.35714,107.18457 0,0.48543 -0.48214,0.81698 -1.07143,0.73677 -0.58929,-0.0801 -66.47053,-21.4552 -146.40276,-47.5 z" + id="path6307" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + <path + style="opacity:0.577;fill:#5d8aa8;fill-opacity:0.07058824;fill-rule:evenodd;stroke:none;stroke-width:4.28571415;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 755.53551,282.53484 c -28.00999,-1.4193 -31.29639,-1.85073 -33.74267,-4.4296 -2.0351,-2.1454 -115.77499,-201.055477 -124.19377,-217.191978 -1.11937,-2.145544 -0.61334,-9.998073 1.93327,-30 1.89725,-14.901557 3.45282,-27.2544544 3.45684,-27.450883 0.004,-0.1964286 42.75732,-0.3571429 95.00732,-0.3571429 h 95 V 143.81952 284.53381 l -3.21429,-0.21326 c -1.76786,-0.11729 -17.17887,-0.92086 -34.2467,-1.78571 z" + id="path6309" + inkscape:connector-curvature="0" + transform="scale(0.26458333)" /> + </g> +</svg> diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/fond.pdf b/macros/latex/contrib/matapli/doc/examples/couverture/fond.pdf Binary files differnew file mode 100644 index 0000000000..5ed11a0718 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/fond.pdf diff --git a/macros/latex/contrib/matapli/doc/examples/couverture/redactionModele.tex b/macros/latex/contrib/matapli/doc/examples/couverture/redactionModele.tex new file mode 100644 index 0000000000..e5e916e06b --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/couverture/redactionModele.tex @@ -0,0 +1,56 @@ +\vspace*{-2cm} + + +\section*{Comité de rédaction} + + +\redacteurMatapli{Rédacteur en chef}{Julien \bsc{Salomon}}{Équipe ANGE, INRIA Paris}{\url{salomon@inria.fr}} + +\redacteurMatapli{Rédacteur en chef adjoint}{Maxime \bsc{Chupin}}{CEREMADE, CNRS, Université Paris-Dauphine}{\url{chupin@ceremade.dauphine.fr}} + + +\subsection*{Rédacteurs} + + +\redacteurMatapli{Congrès et colloques}{Thomas \bsc{Haberkorn}}{Fédération Denis Poisson, Université d'Orléans}{\url{thomas.haberkorn@univ-orleans.fr}} + +\redacteurMatapli{Du côté de l'INRIA}{Arthur \bsc{Vidard}}{INRIA Paris}{\url{Arthur.Vidard@inria.fr}} + +\redacteurMatapli{Du côté des écoles d'ingénieurs}{Emmanuel \bsc{Audusse} et Olivier \bsc{Laffite}}{LAGA, Université Paris XIII}{\url{eaudusse@yahoo.fr}, \url{lafitte@math.univ-paris13.fr}} + +\redacteurMatapli{Du côté du réseau MSO}{Véronique \bsc{Maume-Deschamps}}{AMIES, +Université Lyon 1, Institut Camille Jordan}{\url{veronique.maume-deschamps@agence-maths-entreprises.fr}} + +\redacteurMatapli{Du côté des industriels}{Christian \bsc{Gout}}{INSA Rouen}{\url{christian.gout@insa-rouen.fr}} + +\redacteurMatapli{Nouvelles des universités}{Olivier \bsc{Guibé}}{LMRS, Université de Rouen}{\url{olivier.guibe@univ-rouen.fr}} + +\redacteurMatapli{Nouvelles du CNRS}{Mikael de la \bsc{Salle}}{ENS de Lyon site Monod}{\url{mikael.de.la.salle@ens-lyon.fr}} + +\redacteurMatapli{Résumés de livres}{Ana \bsc{Matos}}{Université de Lille 1}{\url{ana.matos@univ-lille1.fr}} + +\redacteurMatapli{Résumés de thèses et HDR}{ Cécile \bsc{Louchet}}{Fédération Denis Poisson, Université d'Orléans}{\url{cecile.louchet@univ-orleans.fr}} + +\redacteurMatapli{Vie de la communauté}{Claire \bsc{Scheid}}{Laboratoire J.A. Dieudonné, Université Côte d'Azur}{\url{claire.scheid@univ-cotedazur.fr}} + + +%\reversemarginpar +\creditcouverture{Illustrations issues des articles avec autorisation des auteurs et autrices.} + +\vfill + +\begin{bloc}\small + \textbf{MATAPLI} --- \textbf{Bulletin \no\numero\ --- \mois}.\\ + Édité par la Société + de Mathématiques Appliquées et Industrielles\\[0.6em] + \begin{tabular}{lp{0.6\linewidth}} + \textbf{Directeur de la publication} & Olivier \bsc{Goubet}, Président de la SMAI\\ + \textbf{Composition, mise en page} & Julien \bsc{Salomon} + et Maxime \bsc{Chupin}\\ + \textbf{Impression} & Présence Graphique,\par 2 rue de la Pinsonnière, 37260 Monts + \end{tabular} +\end{bloc} + + + + diff --git a/macros/latex/contrib/matapli/doc/examples/modeleauteur/chap1.bib b/macros/latex/contrib/matapli/doc/examples/modeleauteur/chap1.bib new file mode 100644 index 0000000000..8afb4b6657 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/modeleauteur/chap1.bib @@ -0,0 +1,10 @@ +@Book{Knuth1984,author = "Donald E. Knuth",title = "The {\TeX}book",publisher = pub-AW,address = pub-AW:adr,pages = "ix + 483",year = "1984",ISBN = "0-201-13448-9 (paperback),0-201-13447-0 (hardcover)",ISBN-13 = "978-0-201-13448-3 (paperback),978-0-201-13447-6 (hardcover)",LCCN = "Z253.4.T47 K58 1984",bibdate = "Fri Jul 22 09:08:51 1994",bibsource = "http://www.math.../texbook3.bib",price = "US\$15.95 (paperback),US\$32.95 (hardcover)",} + +@book{TeXMetafont, +author = {Knuth, Donald Ervin}, +title = {TEX and METAFONT: New Directions in Typesetting}, +year = {1979}, +isbn = {0932376029}, +publisher = {American Mathematical Society}, +address = {USA} +} diff --git a/macros/latex/contrib/matapli/doc/examples/modeleauteur/modele.pdf b/macros/latex/contrib/matapli/doc/examples/modeleauteur/modele.pdf Binary files differnew file mode 100644 index 0000000000..94bf1b699f --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/modeleauteur/modele.pdf diff --git a/macros/latex/contrib/matapli/doc/examples/modeleauteur/modele.tex b/macros/latex/contrib/matapli/doc/examples/modeleauteur/modele.tex new file mode 100644 index 0000000000..7f53c4a00c --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/modeleauteur/modele.tex @@ -0,0 +1,105 @@ +\documentclass{matapli} + +% pour la compilation avec PDFlatex +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + +% pour les exemples +\usepackage{lipsum} + +% on ajoute notre fichier de bibliographie +\addbibresource{chap1.bib} + +\begin{document} + +% titre de l'article +\titre[court={Titre court}]{Titre long de la contribution} + +% on renseigne les auteurs et autrices. Ici avec tous les champs possibles. L'encart en fin d'article n'est généré que si +% le champs minibio est renseigné +\author[ +affiliation = {CNRS, Laboratoire de l'université de France}, +minibio = {Georges \bsc{Felepin} est Ingénieur de Recherche au CNRS. Sa discrétion n'a d'égal que l'ampleur de ses travaux.}, +photo = portrait.png, +email = georges@felepin.fr, +webpage = www.felepin.fr/ +] +{Felepin,Georges} + +% un auteur de type collectif (et non individu) +\author[ +type=collectif, +] +{Centre National de la Recherche Scientifique} + +% table des matières propre à l'article +\articletableofcontents + +% sectionnement de l'article en parties si besoin +% (au dessus de section) +\partie{Un soustitre pour les différentes parties} + +\section{Première section} + +\lipsum[1-4] +Citation, voir~\cite{Knuth1984}. + +\subsection{Sous section} +\lipsum[5] + +\[\int_0^1 f(x)\mathrm{d}x=F(1)-F(0).\] + +\section{Quelques environnements de la classe} + +\lipsum[1] + +\begin{bloc} + \lipsum[10] +\end{bloc} + +\begin{Important} +\lipsum[8] +\end{Important} + +\section{Les interviews} + +\MatapliQuestion[Maxime]{Que se passe-t-il ?} +\MatapliReponse{Laurent}{Rien.} + +\MatapliQuestion{Question sans nom pour la poser ?} +\MatapliReponse{Laurent}{\cite{TeXMetafont}} + +\section{Les maths} + +\begin{theorem}{Test}{test} + Voici mon Théorème, classique, mais efficace. +\end{theorem} + + +\begin{proof} + On y fait référence~\ref{th:test} pour en écrire la preuve. +\end{proof} + +\begin{definition}{Test}{test} + Ma super définition +\end{definition} + +\begin{lemma} + Un petit lemme. +\end{lemma} + +\begin{corollary} + Un corrolaire. +\end{corollary} + +\begin{remark} + Une remarque. +\end{remark} + + +% on imprime la bibliographie avec l'option pour que celle-ci ne crée pas un autre article +\printbibliography[heading=subbibintoc] + +% commande obligatoire pour générer la composition des auteurs et autrices +\printauthors +\end{document} diff --git a/macros/latex/contrib/matapli/doc/examples/modeleauteur/portrait.png b/macros/latex/contrib/matapli/doc/examples/modeleauteur/portrait.png Binary files differnew file mode 100644 index 0000000000..8f74af77f5 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/examples/modeleauteur/portrait.png diff --git a/macros/latex/contrib/matapli/doc/fond-doc.pdf b/macros/latex/contrib/matapli/doc/fond-doc.pdf Binary files differnew file mode 100644 index 0000000000..22218152cc --- /dev/null +++ b/macros/latex/contrib/matapli/doc/fond-doc.pdf diff --git a/macros/latex/contrib/matapli/doc/matapli-doc.pdf b/macros/latex/contrib/matapli/doc/matapli-doc.pdf Binary files differnew file mode 100644 index 0000000000..e1bfe1bf60 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/matapli-doc.pdf diff --git a/macros/latex/contrib/matapli/doc/matapli-doc.tex b/macros/latex/contrib/matapli/doc/matapli-doc.tex new file mode 100644 index 0000000000..656585521a --- /dev/null +++ b/macros/latex/contrib/matapli/doc/matapli-doc.tex @@ -0,0 +1,670 @@ +%% +%% This is the documentation of `matapli.cls', +%% +%% ----------------------------------------------------------------------------- +%% MATAPLI --- SMAI bundle of classes for the French journal "MATAPLI", +%% version 1.0.0 +%% +%% author : Maxime Chupin +%% E-mail: chupin@ceremade.dauphine.fr +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% ----------------------------------------------------------------------------- + +\documentclass{mataplidoc} + +\usepackage{multicol} +\usepackage{pdfpages} + +\title{Classe \Verb+matapli+ pour la revue MATAPLI de la SMAI} +\author{Maxime \bsc{Chupin} \email{chupin@ceremade.dauphine.fr}} +\date{\today} + +\addbibresource{bibliomatapli.bib} + +\begin{document} +%% === Page de garde =================================================== +\thispagestyle{empty} +\begin{tikzpicture}[remember picture, overlay] + \node[below right, shift={(-4pt,4pt)}] at (current page.north west) {% + \includegraphics{fond-doc.pdf}% + }; +\end{tikzpicture}% + +\noindent +\includegraphics{matapli-title}\\ +{\large Documentation de la classe MATAPLI pour la revue de la SMAI}\\[1cm] +\vspace{2cm} + +\hfill\parbox{0.3\textwidth}{\Large\raggedleft + \textbf{Contributor}\\ + Maxime \textsc{Chupin} +} +\vfill +\begin{center} + Version 1.0, 05 janvier 2021 \\ + \url{https://plmlab.math.cnrs.fr/mchupin/matapli} +\end{center} +%% == Page de garde ==================================================== +\newpage + +\maketitle + +\begin{abstract} + La classe \LaTeX{} \Verb+matapli+ est destinée à la composition de la revue + MATAPLI de la SMAI. Cette classe contient à la fois les éléments + permettant de rédiger un article pour cette revue et les éléments + permettant de composer la revue dans sa globalité. +\end{abstract} + +\begin{center} + \url{https://plmlab.math.cnrs.fr/mchupin/matapli} +\end{center} + + +\tableofcontents +\bigskip + +\noindent\textbf{Avertissement :} Les exemples présentés dans cette +documentation ne sont malheureusement pas accompagnés du rendu après +compilation. Pour voir ce que produisent ces exemples, il faudra aller + voir les documents d'exemples fournis (voir section~\ref{sec:exemples}). + + + +\section{Installation} + +La classe \matapli{} est disponible sur le CTAN pour toute installation +récente d'une distribution \LaTeX. + +\begin{center} + \url{https://www.ctan.org/pkg/matapli} +\end{center} + +Vous pouvez évidemment aussi utiliser le fichier \Verb+matapli.cls+ +dans votre répertoire de travail. + + +\subsection{Avec \TeX live sous linux et Mac OSX} + +Pour installer la classe \matapli{} avec \TeX live, il vous faudra +créer, si ce n'est déjà fait, un répertoire local \Verb+texmf+ dans +votre \Verb+home+ pour ensuite y placer le fichier \Verb+matapli.cls+ +en créant l'arborescence nécessaire, dans le répertoire : +\begin{center} + \Verb+~/texmf/tex/latex/matapli/+ +\end{center} +Une fois cela fait, vous pourrez charger la classe \matapli{} +simplement avec le classique : +\begin{latexcode} + \documentclass{matapli} +\end{latexcode} + +\subsection{Avec Mik\TeX{} et Windows} + +Ces deux systèmes sont inconnus du mainteneur de la classe \matapli{} +aussi nous renvoyons à la documentation : +\begin{center} + \url{http://docs.miktex.org/manual/localadditions.html} +\end{center} + +\section{Utilisation} + +Comme toute classe, \matapli{} se charge avec la commande +\Verb+\documentclass+. Comme cette classe est conçue pour être +utilisée avec \texttt{pdflatex} ou \texttt{lualatex}, si +\texttt{pdflatex} est utilisé, il ne faudra pas oublié de renseigner +l'encodage utilisé. + +\begin{latexcode} +\documentclass{matapli} +%% si pdflatex +% \usepackage[utf8]{inputenc} + +\begin{document} + +\end{document} +\end{latexcode} + +\subsection{Modèles d'utilisation}\label{sec:exemples} + +Un modèle est fourni avec la classe \matapli{} dans le répertoire +\texttt{modeleauteur}, à destination des +auteurs et autrices qui écrivent pour la revue. Il est constitué d'un exemple +simple d'utilisation de la classe \matapli{} (à compiler avec +\texttt{pdflatex} mais peut être adapté à \texttt{lualatex}). + +L'exemple fait un tour rapide des fonctionnalités offertes par la +classe \matapli{}. + +\section{Pour les auteurs et autrices d'article} + +Cette partie de la documentation concerne les auteurs ou autrices +désirant écrire un article pour la revue MATAPLI. + +\subsection{Le titre de l'article}\label{sec:titre} + +Le titre de l'article se renseigne avec la commande : + +\commande|\titre[«options»]{«titre de l'article»}|\medskip + +Cette commande offre deux options : +\begin{description} +\item[\Verb+court+ :] qui permet de renseigner un titre court pour le + sommaire et les têtes de page. + \begin{latexcode} + \titre[court={Mon titre court}]{Mon titre plus long} + \end{latexcode} + \item[\Verb+auteur=article/partie+ :] qui permet de spécifier si les auteurs ou + autrices sont relatives à l'article (chapitre) entier, ou aux + sous-partie (voir section~\ref{sec:section}). La valeur par défaut + est \Verb+article+. \emph{Noter que cette option est à ignorer par les + contributeurs et contributrices à la revue MATAPLI.} +\end{description} + + +\subsection{Informations des auteurs et autrices} + +Les auteurs et autrices d'une article (chapitre) ou d'une partie (voir +section suivante) sont à renseigner avec la commande \Verb+\author+ +qui est redéfinie par rapport au comportement classique de \LaTeX. Il +faudra appeler cette commande pour chaque auteur ou autrice. + +\commande|\author[«options»]{«Nom», «Prénom»}|\medskip + +Les options sont sous forme de \texttt{clé=valeur} séparées par des +virgules. Voici la liste de ces options : + +\begin{description} +\item[\Verb+affiliation=\{\meta{Laboratoire, université, etc.}\}+ : + ] qui permet d'indiquer l'affiliation de l'auteur ou de l'autrice, + c'est-à -dire, son laboratoire, son université, son organisme de + recherche, son entreprise, etc. On veillera à mettre des accolades + autour de l'affiliation. +\item[\Verb+email=\meta{email}+ : ] qui permet d'indiquer l'email + de l'auteur ou autrice. On veillera à mettre l'email en texte brut, + c'est-à -dire à \emph{ne pas mettre de commandes pour formater + l'adresse} du type de \verb+\url+ ou \verb+\texttt+. +\item[\Verb+minibio=\{\meta{Petite biographie de l'auteur}\}+ : ] qui + permet d'indiquer une bibliographie courte qui est composée dans + l'encart généré en fin d'article (voir section~\ref{sec:encart}). +\item[\Vert+photo=\meta{nomdufichierimage}+ : ] qui permet d'afficher + une photo dans l'encart généré en fin d'article (voir + section~\ref{sec:encart}). Il faut indiquer le nom du fichier (qui + sera chargé par un \Verb+\includegraphics+), avec s'il a lieu, le + chemin pour y accéder. +\item[\Verb+webpage=\meta{url de la page web}+ : ] qui permet de + renseigner l'url d'une page web relative à l'auteur ou autrice qui + sera composé dans l'encart généré en fin d'article (voir + section~\ref{sec:encart}). +\item[\Verb+type=\meta{unique ou collectif}+ : ] qui permet de + spécifier le type d'auteur pour permettre de renseigner un collectif + (qui ne suit pas la structure nom, prénom). Les deux valeurs + possibles sont \Verb+unique+ ou \Verb+collectif+ et la valeur par + défaut est \Verb+unique+. +\end{description} + +On pourra utiliser les options comme l'exemple suivant le montre. +\begin{latexcode} + \author[ + affiliation = {CNRS, Université de Paris}, + minibio = {Paul \bsc{Lefevre} est Ingénieur de Recherche au CNRS + affecté à l'université de Paris. Ses spécialités sont nombreuses.}, + photo = portrait.jpg, + email = lefrevre@universite.fr, + webpage = www.paul.com + ] + {Lefevre,Paul} + +\author[type=collectif, +webpage = www.cnrs.fr, +photo = logoCNRS.fr +]{Centre National de la Recherche Scientifique} +\end{latexcode} + +\subsection{Commande pour générer l'affichage des auteurs et + autrices. }\label{sec:printauthors} Les commandes de définition d'auteurs et d'autrices se +couplent avec l'utilisation de la commande + +\commande|\printauthors[«option»]|\medskip + +Cette commande se place à la fin de l'article (du chapitre), ou de la +partie. + +La seule option possible est destinée aux articles (au chapitres) où +les auteurs et autrices sont définies pour \emph{les parties} (et non +pour l'entièreté de l'article). Pour cela il faudra utilise l'option +\Verb+partie+ couplée à l'option similaire pour la commande +\Verb+\partie+ (voir section~\ref{sec:section}). + +\begin{latexcode} + \printauthors[partie] +\end{latexcode} + +Le mécanisme de gestion des auteurs et autrices repose sur la création +de fichiers auxiliaires. Ainsi, il faudra compiler le document +\emph{deux fois} pour obtenir le résultat final. + +\subsubsection{Encart généré}\label{sec:encart} + +À la suite de la commande \Verb+\titre+ (ou \Verb+\partie+), les +auteurs et autrices sont indiqué·e·s avec leur noms et prénoms, +l'affiliation et, en note de pied de page, leur adresse email si +celle-ci est renseignée. + +Si les biographies courtes des auteurs ou des autrices sont +renseignées dans les commandes \Verb+\author+, alors des encarts avec +les différentes informations des auteurs et autrices seront générés à +l'endroit de la commande \Verb+\printauthors+. + + +\subsection{Le sectionnement de l'article}\label{sec:section} + +Le sectionnement de l'article est un sectionnement classique de +\LaTeX{} avec la classe \Verb+book+. Un article de MATAPLI est en fait +un chapitre d'une classe \Verb+book+ au détail prêt qu'il a été +rajouté la commande + +\commande|\partie[«option »]|\medskip + +Celle-ci permet de créer des parties à l'intérieur d'un article +(chapitre), et est donc \emph{au dessus} des \Verb+\section+. Les +compteurs des \Verb+(sub*)section+ sont mis à zéro à chaque partie. + +\begin{latexcode} +\titre[Mon titre court]{Le titre long} + +\partie{Une partie} +\section{Une section} +\subsection{Sous-section} +\subsubsection{Sous-sous-section} +\partie{Deuxième partie} +\section{Une section} +\end{latexcode} + + + +\subsection{Quelques commandes et environnements spécifiques} + +La classe \matapli{} fournit quelque commandes et environnements +propres à la classe. + +\subsubsection{Les packages chargés par la classe} + +La classe \matapli{} fournit toutes les commandes des packages +suivants (chargés par la classe\footnote{Nous ne listons ici que les + packages fournissant des commandes du côté utilisateur, et non tous + les package chargés par la classe \matapli{}.}): +\begin{multicols}{2} + \begin{itemize} + \item la classe \Verb+book+ ; + \item \Verb+latexsymb+, \Verb+amssymb+, \Verb+amsthm+, + \Verb+mathtools+ ; + \item \Verb+subfig+ ; + \item \Verb+FiraSans+ et \Verb+newtxsf+ ; + \item \Verb+babel+ avec les options \Verb+english,french+ ; + \item \Verb+adjustbox+ ; + \item \Verb+enumitem+ ; + \item \Verb+graphicx+ ; + \item \Verb+xcolor+ ; + \item \Verb+fancyhdr+ et \Verb+fancybox+ ; + \item \Verb+multicol+ ; + \item \Verb+tabularx+ et \Verb+booktabs+ ; + \item \Verb+url+ et \Verb+hyperref+ ; + \item \Verb+tikz+ et \Verb+tcolorbox+ ; + \item \Verb+biblatex+. + \end{itemize} +\end{multicols} + +\subsubsection{Pour les mathématiques} + +Nous fournissons quelques environnements pour la composition des +mathématiques. Pour les définitions et les théorèmes, nous utilisons +le package \Verb+tcolorbox+, ce qui fait que les environnements dédiés +nécessitent un deuxième argument qui permet de renseigner un +\Verb+label+. + +\paragraph{L'environnement \texttt{theorem}. } L'environnement pour les +théorèmes est le suivant : + +\commande|\begin{theorem}{«Titre du théorème»}{«label»}| + +\commande|\end{theorem}|\medskip + +Les titres et labels peuvent être laissés vides. Notez que le label à +appeler lors de la référence au théorème est à préfixé de \Verb+th:+ +comme l'illustre le code suivant : +\begin{latexcode} + \begin{theorem}{Test}{test} + Voici mon Théorème, classique, mais efficace. + \end{theorem} + + \begin{proof} + On y fait référence~\ref{th:test} pour en écrire la preuve. + \end{proof} +\end{latexcode} + +\paragraph{L'environnement \texttt{definition}. } +L'environnement pour les définitions suit la même syntaxe que celui +pour les théorèmes. + +\commande|\begin{definition}{«Titre de la définition»}{«label»}| +\commande|\end{definition}|\medskip + +\paragraph{Autres environnements classiques. } +La classe \matapli{} fournit aussi des environnements plus classiques +(construit avec l'extension \Verb+ntheorem+) que nous listons +ci-dessous. Ici, les environnements ne prennent pas de \emph{label} en +argument, il faudra donc les ajouter avec la commande \Verb+\label{}+ +le cas échéant. +\begin{description} +\item[L'environnement \Verb+lemma+ : ] pour la composition des lemmes. + \begin{latexcode} + \begin{lemma} + Un petit lemme. + \end{lemma} + \end{latexcode} +\item[L'environnement \Verb+corollary+ : ] pour la composition des + corollaires. + \begin{latexcode} + \begin{corollary} + Un corollaire. + \end{corollary} + \end{latexcode} +\item[L'environnement \Verb+remark+ : ] pour la composition des + remarques. + \begin{latexcode} + \begin{remark} + Une remarque. + \end{remark} + \end{latexcode} +\item[L'environnement \Verb+proof+ : ] pour la composition des + preuve. + \begin{latexcode} + \begin{proof} + Une preuve. + \end{proofx} + \end{latexcode} +\end{description} + +\subsection{Gestion de la bibliographie} + +La classe \matapli{} charge le package \Verb+biblatex+~\cite{biblatex} +pour la gestion bibliographique avec le moteur~\texttt{biber}. Il faudra +donc vous plier à ce fonctionnement. On pourra +consulter~\cite{BitouzeWeb} pour une introduction à \Verb+biblatex+ +(et \LaTeX{} en général). + +\subsubsection{Chargement du fichier de bibliographie} + +Il faudra charger le fichier bibliographique \Verb+.bib+ avec la +commande suivante dans le préambule du document\footnote{Lors de la + soumission d'article, essayer de fournir des noms de fichiers + indiquant l'article en question, soit par une référence au titre, le +nom de l'auteur ou autrice, etc.}. +\begin{latexcode} + \addbibresource{Monfichier.bib} +\end{latexcode} + +\subsubsection{Imprimer la bibliographie} + +Pour composer la liste des références bibliographiques on utilisera la +commande suivante à l'endroit où l'on souhaite la composer : +\begin{latexcode} +\printbibliography[heading=subbibintoc] +\end{latexcode} + +Cette commande va afficher la liste des références en \emph{section} +(et non \emph{chapitre} comme le fonctionnement par défaut), et +l'ajoute à la table des matières. + +\subsubsection{La compilation} + +Il faudra suivre la procédure de compilation suivante, en supposant +que votre document \LaTeX{} est \texttt{mondocument.tex}: +\begin{enumerate} +\item \Verb+pdflatex+ ou \Verb+lualatex+ \texttt{mondocument.tex}; +\item \Verb+biber+ \texttt{mondocument} (sans l'extension + \texttt{.tex}) ; +\item \Verb+pdflatex+ ou \Verb+lualatex+ \texttt{mondocument.tex}; +\item \Verb+pdflatex+ ou \Verb+lualatex+ \texttt{mondocument.tex}. +\end{enumerate} + +\subsection{Pour les articles \emph{interview}} + +Pour les articles sous forme d'interview, la classe \matapli{} fournit +deux commandes. La première permet de composer les questions : + +\commande|\MatapliQuestion[«Nom optionnel»]{«Une question posée»}|\medskip + +L'argument optionnel permet de renseigner le nom de la personne posant +la question comme l'illustre l'exemple suivant : +\begin{latexcode} + \MatapliQuestion[Frédérique Dupont]{Que se passe-t-il ?} + + \MatapliQuestion{Question sans nom pour la poser ?} +\end{latexcode} + + +La deuxième commande permet de composer les réponses. + +\commande|\MatapliReponse{«Nom»}{«Réponse»}|\medskip + +Ici le nom de la personne interviewée est à renseigner obligatoirement +en premier argument. +\begin{latexcode} +\MatapliReponse{Laurent Faitlepain}{Un courte réponse qui suffit largement.} +\end{latexcode} + + +\subsection{Table des matières pour l'article} + +Il est possible de produire une table des matières locale, relative à +l'article (le chapitre) en cours. Cela se fait avec la commande de la +classe \matapli{} : +\commande|\articletableofcontents|\medskip + +qu'il faudra placer juste après la commande \Verb+\titre+. + +\section{Pour la production de la revue} + +Dans cette partie, sont documentés les éléments qui servent plutôt à +la production des numéros complets de la revue. + +\subsection{Gestion des auteurs par parties d'un même article} + +La classe \matapli{} permet de renseigner des auteurs et autrices par +sous partie d'un même article (chapitre). Pour cela, il faudra: +\begin{itemize} +\item utiliser la commande \Verb+\titre+ avec l'argument \Verb+auteur=partie+ +comme décrit en section~\ref{sec:titre} ; +\item utiliser les commandes \Verb+\parties+ avec l'argument + \Verb+auteur=partie+ comme décrit en section~\ref{sec:section} ; +\item renseigner les auteurs et autrices après les commande de + \Verb+\partie+ avec les commandes \Verb+\author+ décrites en + section~\ref{sec:printauthors} ; +\item utiliser la commande \Verb+\printauthors+ à la fin de la partie + avec l'option \Verb+partie+ comme décrit en section~\ref{sec:section} + pour chaque partie. +\end{itemize} + +\subsection{Faire apparaître les traits de coupe sur du A4} + +Pour l'envoie à l'impression, il suffit de charger dans le préambule : +\begin{latexcode} + \usepackage[cam,a4,center]{crop} +\end{latexcode} + +\subsection{Le sommaire} + +Pour générer le sommaire, il suffit d'utiliser la commande : + +\commande|\sommaire|\medskip + +qui est un simple \Verb+\tableofcontents+ avec une profondeur à zéro +et dont l'affichage est un peu modifié. + + +\subsection{Les correspondant·e·s} + +Pour composer les correspondant·e·s de la SMAI dans les divers +laboratoires et centres de recherche, la classe \matapli{} fournit la +commande suivante : + +\commande|\correspondant{«ville»}{«Nom Prénom»}{«laboratoire/université»}{«email»}|\medskip + +Voici un exemple : +\begin{latexcode} +\correspondant{Avignon}{Karime Laporte}{% +Dépt. de Mathématiques\\ +Univ. d'Avignon\\ +33 rue Louis Pasteur\\ +84000 Avignon\\ +}{karime@laporte.fr} +\end{latexcode} + + +\subsection{Les colloques} + +Pour composer les entrées de colloques pour la rubrique dédiée de la +revue MATAPLI, la classe \matapli{} fournit la commande suivante : + +\commande|\colloque{«Titre du colloque»}{«date et lieu»}{«site web»}|\medskip + +Attention, il ne faut pas mettre le site web en argument de la commande +\Verb+\url+. + +Voici un exemple qui permet de fixer les idées : +\begin{latexcode} + \colloque{Journées sur l'analyse statistique et la quantification de l'incertitude des modèles numériques complexes (GdR Mascot num)} + {du 27 au 30 Avril 2021, à Aussois} + {https://www.gdr-mascotnum.fr/mascot20.html} +\end{latexcode} + +\subsection{Les soutenances de doctorat et d'HDR} + +Pour composer les entrées de soutenance de thèse dans la rubrique +dédiée de la revue MATAPLI, la classe \matapli{} fournit deux +environnements. + +\subsubsection{Pour les thèses doctorat} + +Pour les thèses de doctorat, on utilisera l'environnement suivant +encapsulant la description de la thèse : + +\commande|\begin{soutenance}{«nom du/de la docteure»}{«date et lieu»}{«titre»}{«nom du ou de la directrice»}| + +\commande|\end{soutenance}|\medskip + + +Voici un exemple d'utilisation de cet environnement : + +\begin{latexcode} + \begin{soutenance{Dimitri BIENFAIT}% + { Soutenue le 10 octobre 2020 \\ Laboratoire Louis Lagrange et + Université de Cherves}% + { Modélisation et simulation d'un assemblage solide }% + { Stéphane Michel (université des Alpes) et Jérôme Alaise (CNRS). } + Cette thèse s'inscrit dans une longue histoire de recherche en + mathématiques [\dots reste de la description] + \end{soutenance} +\end{latexcode} + +\subsubsection{Pour les thèses d'habilitation à diriger des recherches +(HDR)} + +Pour les thèses d'HDR, on utilisera l'environnement suivant +encapsulant la description de la thèse : + +\commande|\begin{soutenanceHDR}{«nom du/de la docteure»}{«date et lieu»}{«titre»}| + +\commande|\end{soutenanceHDR}|\medskip + + +Voici un exemple d'utilisation de cet environnement : + +\begin{latexcode} + \begin{soutenanceHDR}{Dimitri BIENFAIT}% + { Soutenue le 10 octobre 2020 \\ Laboratoire Louis Lagrange et + Université de Cherves}% + { Modélisation et simulation d'un assemblage solide }% + Cette thèse s'inscrit dans une longue histoire de recherche en + mathématiques [\dots reste de la description] + \end{soutenanceHDR} +\end{latexcode} + + +\subsection{Fichier de style à ajouter pour la compilation de la + revue} + +Pour la production des numéros de la revue, la fonte des titres +d'article (de chapitre) est modifiée. L'ajout à faire dans le +préambule est le suivant : + +\begin{latexcode} +\usepackage{LobsterTwo} +\def\MatapliChapterFont{\LobsterTwo\bfseries} +\end{latexcode} + +Le passage par \Verb+fontspec+ pour la gestion des fontes implique +la compilation avec \texttt{lualatex}. + +\subsection{La date et le numéro de la revue} + +À chaque production de numéro, il faudra redéfinir les commandes suivantes : +\begin{latexcode} +\renewcommand{\numero}{124} %%% à modifier à chaque numéro +\renewcommand{\mois}{Mars 2021}%%% à modifier à chaque numéro +\end{latexcode} + +\subsection{La couverture} + +Un exemple de couverture constituée de la première, deuxième, +troisième et quatrième de couverture est fourni dans le répertoire +\texttt{couverture}. + +La classe \matapli{} fournit deux commandes à cette effet. La première +pour composer les rédacteurs et rédactrices du comité de rédaction. + +\commande|\redacteurMatapli{«titre ou thème»}{«Prénom Nom»}{«affiliation laboratoire université»}{«email»}|\medskip + +Notons que l'email renseigné doit être mis avec la commande +\Verb+\url+ pour permettre de renseigner plusieurs emails. + +\begin{latexcode} + \redacteurMatapli{Rédacteur en chef adjoint}{Maxime \bsc{Chupin}}{CEREMADE, CNRS\\ Université Paris-Dauphine}{\url{chupin@ceremade.dauphine.fr}} +\end{latexcode} + +La deuxième commande fournit par la classe \matapli{} permet de +créditer les illustrations mise en première de couverture. + +\commande|\creditcouverture{«Crédit»}|\medskip + +Cette commande compose les crédits (l'argument de la commande) dans la +marge de la page avec une rotation de 90 degrés, préfixé de « Crédits +: ». + +La classe \matapli{} fournit un exemple de couverture dans le +répertoire \texttt{couverture}. + +\section{Résultat} + +\subsection{Le modèle utilisateur/trice} +\includepdf[pages=-]{examples/modeleauteur/modele} + +\subsection{La couverture} + +\includepdf[pages=-]{examples/couverture/couvertureModele} + +\printbibliography + + + + +\end{document} + +%%% Local Variables: +%%% flyspell-mode: 1 +%%% ispell-local-dictionary: "french" +%%% TeX-engine: luatex +%%% End: diff --git a/macros/latex/contrib/matapli/doc/matapli-title.pdf b/macros/latex/contrib/matapli/doc/matapli-title.pdf Binary files differnew file mode 100644 index 0000000000..16844622a5 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/matapli-title.pdf diff --git a/macros/latex/contrib/matapli/doc/mataplidoc.cls b/macros/latex/contrib/matapli/doc/mataplidoc.cls new file mode 100644 index 0000000000..5df5759319 --- /dev/null +++ b/macros/latex/contrib/matapli/doc/mataplidoc.cls @@ -0,0 +1,230 @@ +% copy of the private class for lualatex-doc, lltxdoc.sty. 2017 version. +% see lualatex-doc.tex for copying conditions +% Manuel Pégourié-Gonnard + +\ProvidesClass{luameshdoc} + +\LoadClass[a4paper]{scrartcl} +\RequirePackage{fontspec} +\RequirePackage{xcolor} +\RequirePackage{metalogo, xspace, ifmtarg, xargs, fancyvrb} +\RequirePackage[french]{babel} +\RequirePackage{enumitem} +\RequirePackage{biblatex} +\RequirePackage{tcolorbox,tikz} +\RequirePackage[colorlinks=true, +linkcolor=darkred, +urlcolor=darkred, +citecolor=darkred +]{hyperref} +%\RequirePackage{bookmark} + +\defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase} +% \setmainfont{Linux Libertine O} +%\setmainfont{Slabo 27px} +\RequirePackage{libertinus-otf} +\setsansfont{Kurier} +\setmonofont[Scale=MatchLowercase]{Monaco} + +\newcommand*\simplelogo [1] {% + \ifcsname #1\endcsname \else \badlogocommand \fi + \lowercase{\expandafter\simple@logo\expandafter{% + \csname #1\expandafter\endcsname\expandafter}}\expandafter{% + \csname #1\endcsname}{#1}} +\newcommand*\simple@logo [3] {% + \newcommand #1 {#2\xspace}% + \pdfstringdefDisableCommands{\def#1{#3\space}}} + +\providecommand \ConTeXt {Con\TeX{}t} +\providecommand \pdfTeX {pdf\TeX} +\providecommand \TeXLive {\TeX\thinspace Live} +\providecommand \MiKTeX {MiK\TeX} +\newcommand\matapli{\Verb+matapli+} +\simplelogo {TeX} +\simplelogo {LaTeX} +\simplelogo {LuaTeX} +\simplelogo {LuaLaTeX} +\simplelogo {XeTeX} +\simplelogo {XeLaTeX} +\simplelogo {ConTeXt} +\simplelogo {pdfTeX} +\simplelogo {MiKTeX} +\simplelogo {TeXLive} + +\colorlet{code}{blue!80!black} +\fvset{formatcom=\color{code}} +\DefineShortVerb| +\catcode`\ 10 % non-breakable space + +\newcommand*\email [1] {<\href{mailto:#1}{#1}>} +\newcommand*\ctan [1] +{\href{http://mirror.ctan.org/#1}{\nolinkurl{#1}}} +\newcommand \file {\nolinkurl} +\newcommand*\note [1] {\noindent\textsf{\bfseries #1.}\quad\ignorespaces} +\newcommand \cmd {\texttt} +\newcommand \code [1] {\texorpdfstring {\texttt{\color{code}#1}} {#1}} +\newcommand*\cs [1] {\code{\textbackslash #1}} + +\newcommandx*\para [2][2] {% + \@ifmtarg{#2}{\para@{#1}{#1}}{\para@{#1}{#2}}} +\newcommand \para@ [2] {% + \par \medskip + \hypertarget{para.#2}{}% + \belowpdfbookmark{#1}{para.#2}% + \noindent + \label{para.#2}% + \makebox [0pt][r] {% + \textsf{\bfseries #1\quad}}% + \ignorespaces +} +\newcommandx*\pararef [3][1, 3] {% + \@ifmtarg{#3}{\para@ref{#1}{#2}{#2}}{\para@ref{#1}{#2}{#3}}} +\newcommand \para@ref [3] {% + \hyperlink{para.#3}{#1{#2}}} +\newcommand*\parapageref [1] {% + \autopagref{para.#1}} + +\newcommand \pf {\textsf} +\newcommand \pk {\pararef[\pf]} + +\newcommandx*\pkdesc [6][6] {% + \para {#1} + \pkditem {Engines} {#3} + \pkditem {Formats} {#4} + \pkditem {Authors} [\\]{#2} + \pkditem {CTAN location} [\\]{#5}[\ctan] + \pkditem {Development url} [\\]{#6}[\url] + \newline +} +\newcommandx*\pkditem [4][2,4] {\@ifnotmtarg{#3}{% + #2\textsf{\bfseries #1:} #4{#3}.% + }} + + +\newenvironment{myquote}{% + \list{}{\leftmargin0pt \rightmargin1em}% +\item\relax + \small +}{% + \endlist +} + + +\definecolor{darkred}{rgb}{0.8,0.1,0.1} + + +\newcommand*\commande{\par\bigskip% + \noindent\hspace{-30pt}% + \SaveVerb[aftersave={% + \UseVerb{Vitem} + }% + ]{Vitem}} + +\newcommand*\textme[1]{\textcolor{black}{\rmfamily\textit{#1}}} +\newcommand*\meta[1]{% % meta + \textme{\ensuremath{\langle}#1\ensuremath{\rangle}}} +\newcommand*\optstar{% % optional star + \meta{\ensuremath{*}}\xspace} +\DefineShortVerb{\|} +\newcommand\R{\mathbf{R}} +\setlength{\fboxsep}{2pt} +\fvset{% + codes={\catcode`\«\active \catcode`\×\active }, + defineactive={\makefancyog\makefancytimes}, + formatcom=\color{darkred}, + frame=single +} +% rendre «...» équivalent à \meta{...} +{\catcode`\«\active + \newcommandx\makefancyog[0][addprefix=\global]{% + \def«##1»{\meta{##1}}}} +% rendre × équivalent à \optstar +{\catcode`\×\active + \newcommandx\makefancytimes[0][addprefix=\global]{% + \def×{\optstar{}}}} + + +\tcbuselibrary{listings,breakable} + +\definecolor{vert}{rgb}{0.1,0.4,0.1} +\definecolor{bleu}{rgb}{0.1,0.1,0.4} +\lstset{ + numberstyle=\footnotesize\color{vert}, + keywordstyle=\ttfamily\bfseries\color{blue}, + basicstyle=\ttfamily\footnotesize, + commentstyle=\itshape\color{vert}, + stringstyle=\ttfamily, + showstringspaces=false, + language=[LaTeX]TeX, + breaklines=true, + breakindent=30pt, + defaultdialect=[LaTeX]TeX, + morekeywords={buildMeshBW,buildMeshBWinc,drawPointsMesh,buildVoronoiBW,buildVoronoiBWinc, + drawPointsMeshinc, meshAddPointBW, + meshAddPointBWinc,drawGmsh,drawGmshinc,gmshVoronoi,gmshVoronoiinc}% frame=tb +} + +\lstdefinelanguage{lua} +{morekeywords={for,end,function,do,if,else,elseif,then, + tex.print,tex.sprint,io.read,io.open,string.find,string.explode,require}, + morecomment=[l]{--}, + morecomment=[s]{--[[}{]]}, + morestring=[b]'' +} + +\newtcblisting{Exemple}{% + arc=0pt,outer arc=0pt, + colback=red!2!white, + colframe=red!75!black, + breakable, + boxsep=0pt,left=5pt,right=5pt,top=5pt,bottom=5pt, bottomtitle = + 3pt, toptitle=3pt, + boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, toprule at break = + 0pt, bottomrule at break = 0pt, + listing options={breaklines}, +} + +\newtcblisting{commandshell}{colback=black,colupper=white,colframe=black, + arc=0pt, + listing only,boxsep=0pt,listing + options={style=tcblatex,language=sh}, + every listing line={\textcolor{red}{\small\ttfamily\bfseries user \$> }}} + +\newtcblisting{latexcode}{ + arc=0pt,outer arc=0pt, + colback=red!2!white, + colframe=red!75!black, + breakable, + boxsep=0pt,left=5pt,right=5pt,top=5pt,bottom=5pt, bottomtitle = + 3pt, toptitle=3pt, + boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, toprule at break = + 0pt, bottomrule at break = 0pt, + listing only,boxsep=0pt,listing + options={breaklines} +} + + + +\newenvironment{optionsenum}[1][] +{\begin{description}[font=\color{darkred}\ttfamily]} + {\end{description}} + +\newenvironment{warning}{% + \setlength{\logowidth}{24pt} + \tcbset{% + arc=0pt,outer arc=0pt,colback=gray!10!white,colframe=gray!60!white, + boxsep=0pt,left=5pt,right=5pt,top=5pt,bottom=5pt, bottomtitle = 3pt, toptitle=3pt, + boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt} + \medskip + \begin{tcolorbox}% + \begin{wrapfigure}[2]{L}{17pt}% + % \raisebox{-5pt}{ + \vspace*{-0.55cm} + \bcinfo + % }% + \end{wrapfigure} + }% + {\end{tcolorbox}\medskip} + +\lstset{moredelim=*[s][\color{red}\rmfamily\itshape]{<}{>}} +\lstset{moredelim=*[s][\color{blue}\rmfamily\itshape]{<<}{>>}} diff --git a/macros/latex/contrib/matapli/tex/matapli.cls b/macros/latex/contrib/matapli/tex/matapli.cls new file mode 100644 index 0000000000..67e580521f --- /dev/null +++ b/macros/latex/contrib/matapli/tex/matapli.cls @@ -0,0 +1,928 @@ +%% +%% This is file `matapli.cls', +%% +%% ----------------------------------------------------------------------------- +%% MATAPLI --- SMAI class for the French SMAI journal "MATAPLI", +%% version 1.0.0 +%% +%% E-mail: chupin@ceremade.dauphine.fr +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% ----------------------------------------------------------------------------- + +\NeedsTeXFormat{LaTeX2e} + +% on charge expl3 pour LaTeX3 +\RequirePackage{expl3} +% on lance la syntax LaTeX3 +\ExplSyntaxOn +\ProvidesExplClass{matapli} +{2021/01/20} +{1.0} +{SMAI class for the French jornal MATAPLI} + +% classe de base +\LoadClass[twoside, 11pt]{book} + +% pour tester si on compile avec lualatex +\RequirePackage{iftex} +\RequirePackage{latexsym,amssymb,subfig,amsthm,mathtools} +% pour la fonte +% cas différent si on utilise LuaLaTeX ou non +\ifluatex +%\RequirePackage[sfdefault,scaled=.85]{FiraSans} +%\RequirePackage{newtxsf} +\RequirePackage[osf]{libertinus-otf} +\else +\RequirePackage{libertine} +\fi +% gestion des langues +\RequirePackage[english,french]{babel} +\frenchbsetup{AutoSpaceFootnotes=false} +\selectlanguage{french} +% pour l'option valign d'incladegraphics +\RequirePackage[export]{adjustbox} +% paramétrage des listes +\RequirePackage{enumitem} +% les graphiques, les couleurs +\RequirePackage{graphicx} +% paramétrer les haut et bas de page +\RequirePackage{fancyhdr} +% pour quelques symboles +\RequirePackage{eurosym} +% gestion de la composition multicolonne +\RequirePackage{multicol} +\RequirePackage{xcolor} +% les tableaux +\RequirePackage{tabularx,booktabs} +% les liens hypertext +\RequirePackage{url} +\PassOptionsToPackage{hyphens}{url} +\RequirePackage[colorlinks = true, +linkcolor = principale, +urlcolor = secondaire, +citecolor = principale, +anchorcolor = principale, +unicode]{hyperref} +% charger tikz +\RequirePackage{tikz} +% les boites colorées +\RequirePackage[breakable,most]{tcolorbox} +% programmation en LaTeX +\RequirePackage{ifthen} +% personnalisation des sections +\RequirePackage{titlesec, titletoc} +% personnalisation des légendes pour figure et tableaux +\RequirePackage{caption} + +% bibliographie biblatex +\RequirePackage[refsection=chapter]{biblatex} + +%%%%%%%% taille des pages %%%%%% +\RequirePackage{calc} +\RequirePackage{geometry} +\geometry{ + paperwidth=170mm, + paperheight=240mm, + inner=20mm, + outer=25mm, + top=30mm, + bottom=20mm +} +%le package pour les marques de découpe pour imprimeur +%\RequirePackage[cam,a4,center]{crop} + +% les couleurs definies +\definecolor{gris}{gray}{0.8} +\definecolor{grisclair}{gray}{0.90} +\definecolor{principale}{RGB}{93,138,168} +\definecolor{secondaire}{RGB}{168, 93, 94} +\definecolor{troisieme}{RGB}{168, 93, 94} +\definecolor{quatrieme}{RGB}{168, 154, 93} +\definecolor{chapitre}{RGB}{0,0,0} + + +% quelques définitions LaTeX3 +\int_new:N \g__matapli_articles_int % compteur des articles (chapter) +\int_new:N \g__matapli_parties_int % compteur des parties dans les articles (chapter) +\int_set:Nn \g__matapli_articles_int {0} % compteur pour le nombre d'articles +\int_set:Nn \g__matapli_parties_int {0} % compteur pour le nombre de parties par articles + +\tl_new:N \g__matapli_auteurs_first_last_names_list_tl % la liste de noms d'auteurs +\tl_new:N \g__matapli_auteurs_affiliation_list_tl % la liste des affilations correspondante +\tl_new:N \g__matapli_auteurs_email_list_tl % la liste des email correspondante +\tl_new:N \g__matapli_auteurs_minibio_list_tl % la liste des minibio correspondante +\tl_new:N \g__matapli_auteurs_photo_list_tl % la liste des photos correspondante +\tl_new:N \g__matapli_auteurs_webpage_list_tl % la liste des webpage correspondantes +\tl_new:N \g__matapli_auteurs_type_list_tl % la liste des type correspondant (unique ou organisation) + + +\tl_new:N \g__matapli_auteurs_first_last_names_tl % variable noms d'auteurs +\tl_new:N \g__matapli_auteurs_affiliation_tl % variable affilations correspondante +\tl_new:N \g__matapli_auteurs_email_tl % variable des email correspondante +\tl_new:N \g__matapli_auteurs_minibio_tl % variable des minibio correspondante +\tl_new:N \g__matapli_auteurs_photo_tl % variable des photos correspondante +\tl_new:N \g__matapli_auteurs_webpage_tl % variable des webpage correspondantes +\tl_new:N \g__matapli_auteurs_type_tl % variable des type correspondant (unique ou organisation) + +% la chaine de caractère de la liste de tous les auteurs +\str_new:N \g__matapli_auteurs_articles_list_str + + +%% on stoppe la syntaxe LaTeX3 +\ExplSyntaxOff + +% les commandes numero et mois avec valeur initiale +\newcommand{\numero}{XXX} +\newcommand{\mois}{Mois Année} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%% définition de l'apparence du chapitre %%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\MatapliChapterFont{} + +\newcommand\chapformat[1]{% + \begin{tikzpicture}[overlay, remember picture] + \fill[principale] ($(current page.north west)-(0.1\hoffset,-0.07\voffset)$) rectangle ($(current + page.north east)+(0.1\hoffset,-2in)$); + \fill[white] ($(current + page.north east)+(-1.5,-0.5in)$) circle (1); + \fill[white] ($(current + page.north east)+(-1,-1.3in)$) circle (0.7); + \fill[white] ($(current + page.north east)+(-2.3,-1.7in)$) circle (0.5); + \node[anchor= west, align=left,text width=\linewidth,font=\Huge\bfseries,color=white, + execute at begin node=\setlength{\baselineskip}{1.5em}] at + ($(current page.north west)+(1,-1in)$) + {\MatapliChapterFont #1 }; + \end{tikzpicture} +} + +\titleformat{\chapter}{\normalfont}{}{0pt}{\chapformat} + +\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{titreHDR}}{}{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%% fin définition des chapitres %%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% définition du titre et parties %%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\ExplSyntaxOn + +% des compteurs globaux +\tl_new:N \g__matapli_titre_auteur_tl +\tl_new:N \g__matapli_titre_court_tl + +% definitions des clés/valeurs pour la commande \titre +\keys_define:nn{matapli/titre}{% + auteur .tl_gset:N = \g__matapli_titre_auteur_tl, + court .tl_gset:N = \g__matapli_titre_court_tl, + auteur .value_required:n = true, + court .value_required:n = true, +} + +% commande titre qui est surcharge \chapter +% arguments optionnels entre [] +% - court={} : pour titre court pour header +% ex. : \titre[court={titre court}]{titre long} +% - auteur=article/partie : défini si les auteurs sont affichés +% juste après le titre de chapitre (article) +% ou si on souhaite afficher les auteurs des parties (partie) + +\NewDocumentCommand\titre { o m } { + % pour les clés à valeur par défaut + \keys_set:nn { matapli/titre } { auteur=article } % + \IfNoValueF {#1} + { + \keys_set:nn { matapli/titre } { #1 } + } + \tl_if_empty:NTF \g__matapli_titre_court_tl {% si pas de titre court + \tl_set:Nn \l__matapli_titre_court_tl {#2}% + }{% si on met un titre court + \tl_set:Nx \l__matapli_titre_court_tl \g__matapli_titre_court_tl + } + \chapter[\tl_use:N \l__matapli_titre_court_tl]{#2} + % increment le compteur des articles + \int_gincr:N \g__matapli_articles_int + % on reset le compteur de partie + \int_set:Nn \g__matapli_parties_int {0} + % si on n'affiche pas les auteurs par partie dans le chapitre + \str_if_eq:VnTF \g__matapli_titre_auteur_tl {article}{% + \__matapli_markauteurs + }{} + \tl_clear:N \g__matapli_titre_auteur_tl + \tl_clear:N \g__matapli_titre_court_tl +} + +\ExplSyntaxOff +%\let\titre\chapter + +% on réinitialise le compteur de section avec les parties dans les chapitre +\newcounter{chapterpart}[chapter] +\@addtoreset{section}{chapterpart} +\newcommand\l@chapterpart{\@dottedtocline{1}{0em}{0em}} + +\ExplSyntaxOn +% option pour afficher les auteurs par parties dans un chapitre +\tl_new:N \g__matapli_partie_auteur_tl +% definitions des clés/valeurs pour la commande \partie +\keys_define:nn{matapli/partie}{% + auteur .tl_gset:N = \g__matapli_partie_auteur_tl, + auteur .value_required:n = true, +} + +% commande qui crée une partie entre section et chapitre +% \partie{Titre de la partie} +% argument optionnel auteur : si on souhaite afficher les auteurs par partie +% \partie[auteur=partie]{Titre de la partie} +\NewDocumentCommand\partie { o m } { + % on incrémente le compte de parties + \int_gincr:N \g__matapli_parties_int + % pour les clés à valeur par défaut + \keys_set:nn { matapli/partie } { auteur=article } + \IfNoValueF {#1} + { + \keys_set:nn { matapli/partie } { #1 } + } + % on incréente le compteur LaTeX2 correspondant + \refstepcounter{chapterpart} + % on ajoute dans la TOC + \addcontentsline{toc}{section}{\protect \scshape{Partie~:~#2 }} + \tcbset{% + arc=0pt,% + outer~arc=0pt,% + colback=gray!10!white,% + colframe=principale,% + boxsep=0pt,% + left=10pt,% + right=10pt,% + top=8pt,% + bottom=10pt,% + bottomtitle = 3pt,% + toptitle=3pt,% + boxrule=0pt,% + bottomrule=0.5pt,% + toprule=0.5pt}% + \medskip + \begin{tcolorbox}[fontupper=\huge\bfseries\scshape,halign=center]% + #2 + \end{tcolorbox}\medskip + % si l'option auteur=partie, alors on affiche les auteurs + \str_if_eq:VnTF \g__matapli_partie_auteur_tl {partie}{% + \__matapli_markauteurs[partie] + }{} + \tl_clear:N \g__matapli_partie_auteur_tl +} +\ExplSyntaxOff + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%% fin titre et sous titre %%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%% définition de l'apparence des section %%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% personnalisation de l'apparence des section et sous-section +\renewcommand\thesection{\arabic{section}} + +\renewcommand{\section}{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\sffamily\bfseries\ruleunder}% +} +\newcommand{\ruleunder}[1]{{#1\par\nobreak\vskip -1ex\noindent\tikz{\draw[color=principale, + line width=2pt] + (0,0)--(1.1\linewidth,0);\fill[color=principale] (1.1\linewidth,0) + circle (5pt);}}\par\nobreak\vskip -1ex} + +\newcommand{\ruleundersub}[1]{{#1\par\nobreak\vskip -1ex\noindent\hspace{-1cm}\tikz{\draw[color=principale, + line width=2pt] + (0,0)--(0.6\linewidth,0);\fill[color=principale] (0,0) + circle (2pt);}}\par\nobreak\vskip -1ex} + +%\renewcommand\thesubsection{\fcolorbox{principale}{principale}{\color{white}\arabic{section}.\arabic{subsection}}} +\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\sffamily\bfseries\ruleundersub}% +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%% fin section %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%% personnalisation des figures et table %%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareCaptionLabelSeparator{tiret}{ — } +\DeclareCaptionFont{matapli}{\color{principale}\bfseries\scshape} +\captionsetup[figure]{labelfont={matapli},name={Figure},textfont=it,labelsep=tiret} +\captionsetup[table]{labelfont={matapli},name={Table},textfont=it,labelsep=tiret} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% fin figures et tables %%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% Sommaire et minitoc %%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{etoc}[2016/09/29]% +\AtBeginDocument{\renewcommand{\contentsname}{Sommaire}} +\newcommand\sommaire{\setcounter{tocdepth}{0} + \tableofcontents} +% pour formater l'apparence des chapitres dans le sommaire +\contentsmargin{0pt} +\titlecontents{chapter}[0pt] +{\large} +{\normalfont\scshape} +{} +{~---~\thecontentspage} +[\vspace{2pt}] + +% local tables des matières pour les chapitres/articles +\newcommand\articletableofcontents{% + \etocmulticolstyle{\noindent\bfseries + \leaders\hrule height1pt\hfill + \MakeUppercase{Table des matières}} + \etocsettocdepth{2} + \localtableofcontents} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%% Fin Sommaire et minitoc %%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%% auteurs et autrices %%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ExplSyntaxOn +% definitions des clés/valeurs pour la commande \author +% avec passage par des variables globales. +\keys_define:nn{matapli/authors}{% + affiliation .tl_gset:N = \g__matapli_auteurs_affiliation_tl, + email .tl_gset:N = \g__matapli_auteurs_email_tl, + minibio .tl_gset:N = \g__matapli_auteurs_minibio_tl, + photo .tl_gset:N = \g__matapli_auteurs_photo_tl, + webpage .tl_gset:N = \g__matapli_auteurs_webpage_tl, + type .tl_gset:N = \g__matapli_auteurs_type_tl, + affiliation .value_required:n = true, + email .value_required:n = true, + minibio .value_required:n = true, + photo .value_required:n = true, + webpage .value_required:n = true, +} + +% commande qui ajoute aux variables globales de stockage de tous les auteur·e·s +% +\cs_new:Nn \__matapli_auteurs:nnnnnnnn +{ + \tl_put_right:Nn \g__matapli_auteurs_first_last_names_list_tl {{#1}} + \tl_put_right:Nn \g__matapli_auteurs_affiliation_list_tl {{#2}} + \tl_put_right:Nn \g__matapli_auteurs_type_list_tl {{#6}} + \tl_put_right:Nn \g__matapli_auteurs_minibio_list_tl {{#4}} + \tl_put_right:Nn \g__matapli_auteurs_photo_list_tl {{#5}} + \tl_put_right:Nn \g__matapli_auteurs_webpage_list_tl {{#8}} + \tl_put_right:Nn \g__matapli_auteurs_email_list_tl {{#3}} + % \tl_item:Nn \g__matapli_auteurs_first_last_names_tl{1} +} +% variation pour permettre l'appel avec des variables +\cs_generate_variant:Nn \__matapli_auteurs:nnnnnnnn { nVVVVVxV } + +% Redéfinition de la commande \author +% \author[ ⟨options⟩ ]{ ⟨Nom⟩ ,⟨Prénom⟩ } +% options sous forme clé=valeur : +% — affiliation : qui permet d’indiquer l’affiliation de l’auteur ou de +% l’autrice, c’est-à -dire, son laboratoire, son université, son +% organisme de recherche, son entreprise, etc. +% – email : à qui permet d’indiquer l’email de l’auteur ou autrice. On +% veillera à mettre l'email en texte brut +% – minibio : qui permet d’indiquer une bibliographie courte +% qui est composée dans l’encart généré en fin d’article. +% – photo : qui permet d’afficher une photo dans l’encart généré +% en fin d’article. Il faut indiquer le nom du fichier (qui sera chargé par un +% \includegraphics ), avec s’il a lieu, le chemin pour y acceder. +% — webpage : qui permet de renseigner l’url d’une page web relative à +% l’auteur ou autrice qui sera composé dans l’encart généré en fin +% d’article +% – type : ⟨unique ou collectif⟩ qui permet de spécifier le type +% d’auteur pour permettre de renseigner un collectif (qui ne suit pas +% la structure nom, prénom). Les deux valeurs possibles +% sont unique ou collectif et la valeur par défaut est unique +\RenewDocumentCommand\author { o m } { + % pour les clés à valeur par défaut + \keys_set:nn { matapli/authors } { type=unique } + \IfNoValueF {#1} + { + \keys_set:nn { matapli/authors } { #1 } + } + \tl_gset:Nn \l__matapli_auteurs_first_last_name_tl {#2} + \__matapli_auteurs:nVVVVVxV + {#2} + {\g__matapli_auteurs_affiliation_tl} + {\g__matapli_auteurs_email_tl} + {\g__matapli_auteurs_minibio_tl} + {\g__matapli_auteurs_photo_tl} + {\g__matapli_auteurs_type_tl} + {author-art-\int_use:N \g__matapli_articles_int} + {\g__matapli_auteurs_webpage_tl} + % on nettoie + \tl_clear:N \g__matapli_auteurs_affiliation_tl + \tl_clear:N \g__matapli_auteurs_type_tl + \tl_clear:N \g__matapli_auteurs_auteurs_first_last_name_tl + \tl_clear:N \g__matapli_auteurs_minibio_tl + \tl_clear:N \g__matapli_auteurs_photo_tl + \tl_clear:N \g__matapli_auteurs_email_tl + \tl_clear:N \g__matapli_auteurs_webpage_tl +} + +% on définit une variable pour écrire les fihiers externes. +\iow_new:N \g_auxfile_iow +\tl_new:N \l__matapli_auteurs_name_tl +\seq_new:N \l__matapli_names_seq + + +% commande à mettre à la fin de son article/chapitre ou la fin de sa partie +% pour générer la liste des auteurs et généré le cas échéant (s'il y a +% une minibio) des encarts avec la description des auteur·e·s. +\NewDocumentCommand\printauthors { o } { + \tl_clear:N \l__matapli_auteurs_name_tl + \seq_clear:N \l__matapli_names_seq + \cs_generate_variant:Nn \regex_split:nnN {nVN} + % on fabrique un fichier auxiliare pour mettre le code \LaTeX + % qui servira à afficher les auteur·e·s après le titre ou les sous parties + \str_if_eq:nnTF{#1}{partie}{% si fonction appelée dans la partie + \iow_open:Nn \g_auxfile_iow {\jobname-chap\int_use:N \g__matapli_articles_int-p\int_use:N \g__matapli_parties_int.aux} + }{ % sinon + \iow_open:Nn \g_auxfile_iow {\jobname-chap\int_use:N \g__matapli_articles_int.aux} + } + \iow_now:Nn \g_auxfile_iow {\begin{center}} % on commence par centrer le texte + % on parcours tous les éléments des listes d'auteur·e·s + \int_step_inline:nn {\tl_count:N \g__matapli_auteurs_first_last_names_list_tl}{ + % % get the ##1-th element from \l_student_group_tl + \tl_set:Nx \l__matapli_auteur_type_tl {\tl_item:Nn\g__matapli_auteurs_type_list_tl{##1}} + \str_if_eq:VnTF{\l__matapli_auteur_type_tl}{unique}{ % si on a un nom propre + \tl_set:Nx \l__matapli_auteurs_name_tl {\tl_item:Nn \g__matapli_auteurs_first_last_names_list_tl {##1}} + \regex_split:nVN {,} \l__matapli_auteurs_name_tl \l__matapli_names_seq + \tl_set:Nx \l__matapli_auteur_email_tl {\tl_item:Nn \g__matapli_auteurs_email_list_tl {##1}} + \tl_if_empty:NTF{\l__matapli_auteur_email_tl}{%true + \str_set:Nn \l__matapli_auteur_email_str {} + }{% false + \str_set:Nx \l__matapli_auteur_email_str {\tl_item:Nn\g__matapli_auteurs_email_list_tl{##1}} + } + \iow_now:Nx \g_auxfile_iow {% + \seq_item:Nn\l__matapli_names_seq {2}~ % prenom + \token_to_str:N \bsc \iow_char:N \{ + \seq_item:Nn\l__matapli_names_seq {1}\iow_char:N \} %nom + \tl_if_empty:NTF{\l__matapli_auteur_email_tl}{ + % rien + }{%False + \token_to_str:N \footnote \iow_char:N \{\token_to_str:N \url \iow_char:N \{ + \l__matapli_auteur_email_str + \iow_char:N \}\iow_char:N \} + } + } + \tl_set:Nx \l__matapli_aff_tl {\tl_item:Nn \g__matapli_auteurs_affiliation_list_tl {##1}} + \tl_if_empty:NTF{\l__matapli_aff_tl}{ % si l'affiliation est vide + \iow_now:Nx \g_auxfile_iow { + \token_to_str:N \par + } % en revient à la ligne + }{% sinon + \iow_now:Nx \g_auxfile_iow {---~ + \tl_item:Nn \g__matapli_auteurs_affiliation_list_tl {##1} + \token_to_str:N \par + } + } + }{% s'il s'agit d'un collectif + \iow_now:Nx \g_auxfile_iow {% + \tl_item:Nn \g__matapli_auteurs_first_last_names_list_tl {##1} + \token_to_str:N \par + } + } + \tl_set:Nx \l__matapli_bio_tl {\tl_item:Nn \g__matapli_auteurs_minibio_list_tl {##1}} + \tl_if_empty:NTF{\l__matapli_bio_tl}{}{ + % si on a une bio + \begin{matapli@auteur}{% + \str_if_eq:VnTF{\l__matapli_auteur_type_tl}{unique}{ % si on a un nom propre + \seq_item:Nn\l__matapli_names_seq {2}~ % prenom + \bsc{\seq_item:Nn\l__matapli_names_seq {1}} %nom + }{% + \tl_item:Nn \g__matapli_auteurs_first_last_names_list_tl {##1} + } + } + \tl_set:Nx \l__matapli_photo_tl {\tl_item:Nn \g__matapli_auteurs_photo_list_tl {##1}} + \tl_if_empty:NTF{\l__matapli_photo_tl}{% pas de photo + \tl_item:Nn \g__matapli_auteurs_minibio_list_tl {##1} + }{% si photo + \noindent\begin{tabularx}{0.9\linewidth}{cp{0.7\linewidth}} + \includegraphics[width=0.18\linewidth,valign=T]{\tl_item:Nn \g__matapli_auteurs_photo_list_tl {##1}} & \tl_item:Nn \g__matapli_auteurs_minibio_list_tl {##1}\par + + \tl_if_empty:NTF{\l__matapli_auteur_email_tl}{}{\textbf{Email~:}~\url{\tl_item:Nn \g__matapli_auteurs_email_list_tl {##1}}\par} + \tl_set:Nx \l__matapli_auteur_webpage_tl {\tl_item:Nn \g__matapli_auteurs_webpage_list_tl {##1}} + \tl_if_empty:NTF{\l__matapli_auteur_webpage_tl}{}{\textbf{Site web~:}~\url{\tl_item:Nn \g__matapli_auteurs_webpage_list_tl {##1}}} + + + \end{tabularx} + } + \end{matapli@auteur} + } + } % fin boucle auteurs + \iow_now:Nn \g_auxfile_iow {\end{center}} +\iow_close:N \g_auxfile_iow +\tl_clear:N \g__matapli_auteurs_first_last_names_list_tl +\tl_clear:N \g__matapli_auteurs_affiliation_list_tl +\tl_clear:N \g__matapli_auteurs_type_list_tl +\tl_clear:N \g__matapli_auteurs_auteurs_first_last_name_list_tl +\tl_clear:N \g__matapli_auteurs_minibio_list_tl +\tl_clear:N \g__matapli_auteurs_photo_list_tl +\tl_clear:N \g__matapli_auteurs_email_list_tl +\tl_clear:N \g__matapli_auteurs_webpage_list_tl +} + +% lecture du fichier auxiliaire pour affichage des auteurs après le titre d'article/chapitre +% ou le titre de la partie. +\NewDocumentCommand\__matapli_markauteurs { o } { + \str_if_eq:nnTF{#1}{partie}{% si fonction appelée dans la partie + \file_if_exist:nTF {\jobname-chap\int_use:N \g__matapli_articles_int-p\int_use:N \g__matapli_parties_int.aux} + { + \input{\jobname-chap\int_use:N \g__matapli_articles_int-p\int_use:N \g__matapli_parties_int.aux} + }{} + }{% + \file_if_exist:nTF {\jobname-chap\int_use:N \g__matapli_articles_int.aux} + { + \input{\jobname-chap\int_use:N \g__matapli_articles_int.aux} + }{} + } +} +\ExplSyntaxOff + + +% environnement interne de formattage de la présentation des auteur·e·s +\newenvironment{matapli@auteur}[1]{% + ~\vfill + \setlength{\logowidth}{17pt} + \tcbset{% + arc=0pt,outer arc=0pt,colback=gray!10!white,colframe=gray!80!white, + boxsep=0pt,left=5pt,right=5pt,top=5pt,bottom=5pt, bottomtitle = 3pt, toptitle=3pt, + boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt} + \medskip + \begin{tcolorbox}[title={\large\bfseries #1}]% + }% + {\end{tcolorbox}\medskip\clearpage} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% definition des entetes et pied de page %%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usetikzlibrary{calc} +\renewcommand{\headrulewidth}{0pt} + + +\fancyhead{} +\fancyhead[E]{ + \begin{tikzpicture}[overlay, remember picture]% + \fill[principale] ($(current page.north west)-(0.1\hoffset,-0.07\voffset)$) rectangle ($(current + page.north east)+(0.1\hoffset,-0.8in)$); + \node[anchor=north west, text=white, font=\large\scshape\bfseries, + minimum size=1in, inner xsep=5mm] at (current page.north + west) {\leftmark}; + \node[anchor=north east, minimum size=1in, inner + xsep=5mm] at (current page.north east) + {\rightmark}; + \end{tikzpicture} +} +\fancyhead[O]{ + \begin{tikzpicture}[overlay, remember picture]% + \fill[principale] ($(current page.north west)-(0.1\hoffset,-0.07\voffset)$) rectangle ($(current + page.north east)+(0.1\hoffset,-0.8in)$); + \node[anchor=north east, text=white, font=\large\scshape\bfseries, + minimum size=1in, inner xsep=5mm] at (current page.north + east) {\leftmark}; + \node[anchor=north west, minimum size=1in, inner + xsep=5mm] at (current page.north west) + {\rightmark}; + \end{tikzpicture} +} +\fancyfoot{} +\fancyfoot[RO]{ + \begin{tikzpicture}[overlay, remember picture]% + \fill[principale] ($(current page.south west)+(-0.1\hoffset,-0.07\voffset)$) rectangle ($(current + page.south east)-(-0.1\hoffset,-0.5in)$); + \node[anchor=south east, text=white, font=\Large\scshape, + inner + xsep=5mm] at ($(current page.south + east)+(0,0.15in)$) {\thepage}; + \end{tikzpicture} +} +\fancyfoot[LE]{ + \begin{tikzpicture}[overlay, remember picture]% + \fill[principale] ($(current page.south west)+(-0.1\hoffset,-0.07\voffset)$) rectangle ($(current + page.south east)-(-0.1\hoffset,-0.5in)$); + \node[anchor=south west, text=white, font=\Large\scshape, + inner + xsep=5mm] at ($(current page.south + west)+(0,0.15in)$) {\thepage}; + \end{tikzpicture} +} + +\fancypagestyle{titreHDR}{\fancyhead{} + \fancyfoot{} + \fancyfoot[RO]{ + \begin{tikzpicture}[overlay, remember picture]% + \fill[principale] ($(current page.south west)+(-0.1\hoffset,-0.07\voffset)$) rectangle ($(current + page.south east)-(-0.1\hoffset,-0.5in)$); + \node[anchor=south east, text=white, font=\Large\scshape, + inner + xsep=5mm] at ($(current page.south + east)+(0,0.15in)$) {\thepage}; + \end{tikzpicture} + } + \fancyfoot[LE]{ + \begin{tikzpicture}[overlay, remember picture]% + \fill[principale] ($(current page.south west)+(-0.1\hoffset,-0.07\voffset)$) rectangle ($(current + page.south east)-(-0.1\hoffset,-0.5in)$); + \node[anchor=south west, text=white, font=\Large\scshape, + inner + xsep=5mm] at ($(current page.south + west)+(0,0.15in)$) {\thepage}; + \end{tikzpicture} + } + +} + +\pagestyle{fancy} + +\renewcommand{\chaptermark}[1]{\markboth{#1}{\sffamily + MATAPLI \no\numero~ --- \mois}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% fin definition des entetes et pied de page %%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% Rubrique soutenances de thèse %%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +% commande pour les soutenances de thèses de doctorat +% 4 arguments : +% - #1 nom du, de la docteure +% - #2 date et lieu +% - #3 titre +% - #4 nom du ou de la directrice +\newenvironment{soutenance}[4]{ + \begin{tcolorbox}[ + colback=gray!5!white, + boxrule=0pt, + boxsep=0pt, + breakable, + enhanced jigsaw, + borderline west={2pt}{0pt}{principale}, + %colbacktitle={black}, + ] + \noindent $\blacktriangleright$~\textit{Thèse soutenue par} : \textbf{#1}\par\smallskip + \noindent$\blacktriangleright$~\textit{Sous la direction de } : #4\par + \begin{center} + \interlinepenalty10000 + \hrule\medskip + {\bfseries\ignorespaces#3\unskip}\par + \penalty10000 \vskip3pt plus 3pt + {\slshape\ignorespaces#2\unskip} + \medskip\hrule + \end{center} + \noindent\textbf{Résumé : } +} +{\end{tcolorbox}\bigskip} + +% commande pour les soutenances d'HDR +% 3 arguments +% - #1 nom +% - #2 date et lieu +% - #3 titre +\newenvironment{soutenanceHDR}[3]{ + \begin{tcolorbox}[ + colback=gray!5!white, + boxrule=0pt, + boxsep=0pt, + breakable, + enhanced jigsaw, + borderline west={2pt}{0pt}{principale}, + % colbacktitle={black}, + ] + \noindent $\blacktriangleright$~\textit{Habilitation soutenue par} : \textbf{#1}\par\smallskip + \begin{center} + \interlinepenalty10000 + \hrule\medskip + {\bfseries\ignorespaces#3\unskip}\par + \penalty10000 \vskip3pt plus 3pt + {\slshape\ignorespaces#2\unskip} + \medskip\hrule + \end{center} + \noindent\textbf{Résumé : } + } + {\end{tcolorbox}\bigskip} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% fin Rubrique soutenances de thèse %%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% Rubrique correspondant %%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%% pour l'affichage des correspondant·e·s +% 3 arguments : +% - #1 ville +% - #2 Nom Prénom +% - #3 laboratoire/université +% - #4 email +\newcommand{\correspondant}[4]{% + \noindent% + \begin{empty} + \small% + \renewcommand{\arraystretch}{0.9}% + \begin{minipage}{0.95\columnwidth} + \setlength{\baselineskip}{0.9\baselineskip} + {\textbf{#1}\hfill\textit{#2}}\\ + #3\\ + \texttt{#4} + \end{minipage} + \end{empty} +} + +\let\corrsp\correspondant +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% Fin Rubrique correspondant %%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% Rubrique colloque %%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% pour la composition des colloques +% 3 arguments : +% - #1 : Titre du colloque +% - #2 : date et lieu +% - #3 : site web à ne pas mettre dans un \url +\newcommand\colloque[3]{% +\noindent$\blacktriangleright$~\textsc{#1}\\ +\textit{#2}\\ +\url{#3}\\[0.4em] +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% Fin Rubrique colloque %%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% itemize +\setlist[itemize,1]{label={\color{principale}\small$\blacksquare$}} + +\renewcommand\thefigure{\arabic{figure}} +\renewcommand\thetable{\arabic{table}} +\renewcommand\theequation{\arabic{equation}} + + + + + +% environnement d'affichage d'un bloc avec titre. +% \begin{bloc}{Titre} +% ... contenu +% \end{bloc} +\newenvironment{bloc}[1][]{% + \tcbset{% + arc=0pt,outer + arc=0pt,colback=gray!10!white,colframe=principale, + boxsep=0pt,left=10pt,right=10pt,top=8pt,bottom=10pt, + bottomtitle = 3pt, toptitle=3pt, + boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, + fonttitle=\scshape\bfseries} + \medskip + \begin{tcolorbox}[halign=center,title={#1}]}% + {\end{tcolorbox}\medskip +} + + + +\RequirePackage[tikz]{bclogo} +\RequirePackage{lettrine} +% environnement Important, sans titre, avec +% ajout d'une icone important au début du texte +% \begin{Important} +% ...... +% \end{Important} +\newenvironment{Important}{% + \setlength{\logowidth}{24pt} + \tcbset{% + arc=0pt,outer arc=0pt,colback=gray!10!white,colframe=gray!60!white, + boxsep=0pt,left=5pt,right=5pt,top=5pt,bottom=5pt, bottomtitle = 3pt, toptitle=3pt, + boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt} + \medskip + \begin{tcolorbox}% + \lettrine[ + % lines=2, + % lraise=0.05, + findent=.5em]{\bcinfo}{} + }% + {\end{tcolorbox}\medskip} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% les articles interview %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% commande pour composer une question dans un article/chapitre/partie +% de type interview +% \MatapliQuestion[optionel]{Question} où l'argument optionel est le nom de +% la personne ou organisme qui pose la question +\NewDocumentCommand\MatapliQuestion { o m } { + \par\bigskip\noindent + \begingroup% + \bfseries + \bgroup\color{principale}$\blacktriangleright$ + \IfNoValueTF {#1}{ % + }% + {% + #1 : + }% + \egroup + {#2} + \endgroup + \smallskip +} +% commande pour composer la réponse à une question dans un +% article/chapitre/partie de type interview +% \MatapliReponse{Nom}{Réponse} +\newcommand\MatapliReponse[2]{\par\noindent\textbf{\color{principale}$\blacktriangleright$ + #1 :~} {\itshape #2}} + + +% la famille de font par défault +\renewcommand{\familydefault}{\sfdefault} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%% Les théorèmes etc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\tcbuselibrary{theorems} +\newtcbtheorem[number within=chapter, +number freestyle={\noexpand\arabic{\tcbcounter}}, +]{theorem}{Théorème}% +{ arc=0pt,outer + arc=0pt,colback=gray!10!white,colframe=principale, + boxsep=0pt,left=10pt,right=10pt,top=8pt,bottom=10pt, + bottomtitle = 3pt, toptitle=3pt, + boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, + fonttitle=\scshape\bfseries, + separator sign={~: }}{th} + +\newtcbtheorem[number within=chapter, +number freestyle={\noexpand\arabic{\tcbcounter}}, +]{definition}{Définition}% +{ arc=0pt,outer + arc=0pt,colback=gray!10!white,colframe=secondaire, + boxsep=0pt,left=10pt,right=10pt,top=8pt,bottom=10pt, + bottomtitle = 3pt, toptitle=3pt, + boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, + fonttitle=\scshape\bfseries, + separator sign={~: }}{def} + +\newtheorem{lemma}{Lemme}[chapter] +\renewcommand{\thelemma}{\arabic{lemma}} +\newtheorem{corollary}{Corollaire}[chapter] +\renewcommand{\thecorollary}{\arabic{corollary}} + +\newtheorem*{remark}{Remarque} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%% couverture %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% commande pour composer les rédacteurs et rédactrices du comité +% de rédaction de la revue +% 4 arguments +% #1 : le titre ou le thèmes +% #2 : le prénom nombre +% #3 : l'affiliation (labo et université) +% #4 : l'adresse email (ajouter \url pour permettre plusieurs emails) +\newcommand\redacteurMatapli[4]{% + \medskip + {\textbf{#1}\hfill\textbf{#2}}\par + {\small + \hfill\begin{minipage}{\dimexpr\textwidth-0.5cm} + \noindent#3\hfill{\scriptsize#4} + \end{minipage}\par + } +} + +% commande pour créditer les illustrations de la couverture en deuxième de couverture +\newcommand\creditcouverture[1]{\marginpar{ +\hspace*{2cm} +\rotatebox{90}{ +\scriptsize \itshape Couverture : #1} +} +} diff --git a/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf b/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf Binary files differindex c9d2523cd8..d922ac97c5 100644 --- a/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf +++ b/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf b/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf Binary files differindex 262cc371f8..165d028636 100644 --- a/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf +++ b/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf b/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf Binary files differindex d935b4b70e..1e55c902c6 100644 --- a/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf +++ b/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf b/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf Binary files differindex 6342368be6..7eccba622b 100644 --- a/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf +++ b/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-tabular.pdf b/macros/latex/contrib/reledmac/examples/1-tabular.pdf Binary files differindex 64968b4a1d..5a2a274974 100644 --- a/macros/latex/contrib/reledmac/examples/1-tabular.pdf +++ b/macros/latex/contrib/reledmac/examples/1-tabular.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf b/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf Binary files differindex 26c3b5b51f..fbc924e5be 100644 --- a/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf +++ b/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-verses.pdf b/macros/latex/contrib/reledmac/examples/1-verses.pdf Binary files differindex 7d07c413ba..48eb6b37ff 100644 --- a/macros/latex/contrib/reledmac/examples/1-verses.pdf +++ b/macros/latex/contrib/reledmac/examples/1-verses.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-antilabe.pdf b/macros/latex/contrib/reledmac/examples/2-antilabe.pdf Binary files differindex b3ec2ef9c3..4051cf43fb 100644 --- a/macros/latex/contrib/reledmac/examples/2-antilabe.pdf +++ b/macros/latex/contrib/reledmac/examples/2-antilabe.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf b/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf Binary files differindex 938e42afb1..682c1cbbe1 100644 --- a/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf +++ b/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf b/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf Binary files differindex 0b86975b36..fbb4ceaaf9 100644 --- a/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf +++ b/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-glossaries.pdf b/macros/latex/contrib/reledmac/examples/2-glossaries.pdf Binary files differindex 421644ada5..b0857eb76c 100644 --- a/macros/latex/contrib/reledmac/examples/2-glossaries.pdf +++ b/macros/latex/contrib/reledmac/examples/2-glossaries.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-indexing.pdf b/macros/latex/contrib/reledmac/examples/2-indexing.pdf Binary files differindex 16562f138e..75f5b0fde0 100644 --- a/macros/latex/contrib/reledmac/examples/2-indexing.pdf +++ b/macros/latex/contrib/reledmac/examples/2-indexing.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf b/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf Binary files differindex 11fce5520c..fb3dc53f79 100644 --- a/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf +++ b/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf b/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf Binary files differindex de91a9348a..4b83cb8c3f 100644 --- a/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf +++ b/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-linespacing.pdf b/macros/latex/contrib/reledmac/examples/2-linespacing.pdf Binary files differindex bb8a68c10f..e1d5188bac 100644 --- a/macros/latex/contrib/reledmac/examples/2-linespacing.pdf +++ b/macros/latex/contrib/reledmac/examples/2-linespacing.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf b/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf Binary files differindex dc02a3a8a0..e348e2c4bd 100644 --- a/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf +++ b/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-notes-width.pdf b/macros/latex/contrib/reledmac/examples/2-notes-width.pdf Binary files differindex 0e454bb775..5595dce49f 100644 --- a/macros/latex/contrib/reledmac/examples/2-notes-width.pdf +++ b/macros/latex/contrib/reledmac/examples/2-notes-width.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf b/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf Binary files differindex 2a43b55f34..4e55ada708 100644 --- a/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf +++ b/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-performances.pdf b/macros/latex/contrib/reledmac/examples/2-performances.pdf Binary files differindex ca78759c71..0e46cd89b9 100644 --- a/macros/latex/contrib/reledmac/examples/2-performances.pdf +++ b/macros/latex/contrib/reledmac/examples/2-performances.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf b/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf Binary files differindex c7d63023a6..2cb0f2fbbc 100644 --- a/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf +++ b/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf b/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf Binary files differindex 3ca76d7dc1..f31e67b074 100644 --- a/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf +++ b/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf Binary files differindex f7a9a6d5ee..0eda587dfb 100644 --- a/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf +++ b/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf b/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf Binary files differindex 3a6f8c02bc..3fff132699 100644 --- a/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf +++ b/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf Binary files differindex 5ba5c47035..1c54e5cbd6 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf Binary files differindex 50d1b174a6..b433a80bae 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf Binary files differindex 9419444506..c4e2ccc2cc 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf Binary files differindex f749efdf81..10b6adfeb5 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf Binary files differindex 0a91e61571..e0289ac44b 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf Binary files differindex 0b2a5bd0fb..3ae7b3834f 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf Binary files differindex 3b27233bf2..bf8e7f8b22 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf Binary files differindex e3b46f18b2..7080c95c41 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf Binary files differindex 2496171f58..6be0623679 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf Binary files differindex 688c8042ba..f46132b5e9 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf Binary files differindex 92861900ec..351789d748 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf Binary files differindex de7314016b..551c8e4b78 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf Binary files differindex 03d9e6fab7..e8694c0d08 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf Binary files differindex 35c35f4c81..737621201c 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf Binary files differindex a06839b10a..add1ae9773 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf Binary files differindex cd0a6386e9..1418987930 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf Binary files differindex 766b117702..363bc877d0 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf Binary files differindex 15a8f5d7ad..9f8bd3e55d 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf Binary files differindex d8eb74224c..62aadc9696 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf Binary files differindex c9d50ec3d9..fa2703711a 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf Binary files differindex 01090e0a24..5e169a7118 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf Binary files differindex 7083080621..80b794ccf7 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf Binary files differindex 65b216de75..aed5bab126 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf diff --git a/macros/latex/contrib/reledmac/migration.pdf b/macros/latex/contrib/reledmac/migration.pdf Binary files differindex 1c3949dc13..37cf227d04 100644 --- a/macros/latex/contrib/reledmac/migration.pdf +++ b/macros/latex/contrib/reledmac/migration.pdf diff --git a/macros/latex/contrib/reledmac/reledmac.dtx b/macros/latex/contrib/reledmac/reledmac.dtx index df809b04ab..eefa3d1c61 100644 --- a/macros/latex/contrib/reledmac/reledmac.dtx +++ b/macros/latex/contrib/reledmac/reledmac.dtx @@ -571,6 +571,8 @@ % \changes{v2.35.0}{2020/11/29}{Add \protect\cs{linenumannotationothersidetrue}.} % \changes{v2.35.0}{2020/11/29}{Add new hooks: \protect\cs{Xnolinenumber}, \protect\cs{Xendnolinenumber}, \protect\cs{Xnolinenumberifannotation}, \protect\cs{Xendnolinenumberifannotation}.} % \changes{v2.35.1}{2020/12/20}{Fix a bug when printing ending page number in endnotes and using the \protect\package{hyperref} package.} +% \changes{v2.36.0}{2020/01/21}{Fix bug with sublineation on right side of parallel typesetting.} +% \changes{v2.36.0}{2020/01/21}{Add \protect\cs{Xnonote} and \protect\cs{nonoteX}.} % Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename) % has version number \fileversion, last revised \filedate.}} % @@ -2255,7 +2257,6 @@ % \label{displayoptions} % \subsection{Introduction} % \changes{v1.0.0}{2012/09/15}{New generic commands to customize footnote display.} -% \subsection{Introduction} % Some commands can be used to change the way the footnotes are displayed.\footnote{In the code of \macpackage, these commands are called \enquote{hooks}.} % All can have an optional argument \oarg{s}, which is the letter of the series\,---\,or % a list of letters separated by comma\,---\,depending on which option is applied. @@ -2320,6 +2321,14 @@ % change the \protect\cs{hsize} within the document, call % the arrangement macro again afterwards to take account of the new % value. +% \subsection{Disabling footnote} +% \DescribeMacro{Xnonote}\DescribeMacro{nonoteX} +% Some time, you may want to export your edition without notes, but don't want to modify globally your code. +% +% \cs{Xnonote}\oarg{s} allow to disable critical notes for the series \meta{s}. +% +% \cs{nonoteX}\oarg{s} is the same for familiar notes. +% % \subsection{Control number printing} % \subsubsection{Print line number only at first time} % \DescribeMacro{\Xnumberonlyfirstinline}\label{Xnumberonlyfirstinline} @@ -4450,7 +4459,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2020/12/20 v2.35.1 typesetting critical editions]% +\ProvidesPackage{reledmac}[2021/01/21 v2.36.0 typesetting critical editions]% % \end{macrocode} % % \subsection{Package options} @@ -6176,11 +6185,12 @@ % \end{macro} % % \begin{macro}{\ifsublines@} +% \begin{macro}{\ifsublines@R} % \begin{macro}{\sublines@true} % \begin{macro}{\sublines@false} % We maintain an associated flag, \protect\cs{ifsublines@}, % to tell us whether we're within -% a sub-line range or not. +% a sub-line range or not (and the equivalent for right side: \cs{ifsublines@R}) % % You may wonder why we do not just use the value of \protect\cs{subline@num} % to determine this---treating anything greater than $0$ as an @@ -6195,10 +6205,12 @@ % interrupted by several stage directions. % \begin{macrocode} \newif\ifsublines@ +\newif\ifsublines@R% % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\absline@num} % The count \protect\cs{absline@num} stores the @@ -6852,16 +6864,28 @@ % do not really take effect until the next line of text. Instead % they set a flag that notifies \protect\cs{@nl} of the necessary action. % \begin{macrocode} -\newcommand*{\sub@on}{\ifsublines@ +\newcommand*{\sub@on}{% + \ifboolexpr{% + bool{sublines@}% + or% + (bool{sublines@R} and bool{ledRcol})% + }{% \let\sub@change=\relax - \else + }{% \def\sub@change{1}% - \fi} -\newcommand*{\sub@off}{\ifsublines@ + }% +}% +\newcommand*{\sub@off}{% + \ifboolexpr{% + bool{sublines@}% + or% + (bool{sublines@R} and bool{ledRcol})% + }{% \def\sub@change{-1}% - \else + }{% \let\sub@change=\relax - \fi} + }% +}% % \end{macrocode} % \end{macro} @@ -6916,7 +6940,7 @@ \newcommand*{\@set}[1]{% \ifledRcol - \ifsublines@ + \ifsublines@R% \subline@numR=#1\relax \else \line@numR=#1\relax @@ -6985,7 +7009,7 @@ \newcommand*{\set@line@action}{% \ifledRcol \xright@appenditem{\the\absline@numR}\to\actionlines@listR - \ifsublines@ + \ifsublines@R% \@l@dtempcnta=-\subline@numR \else \@l@dtempcnta=-\line@numR @@ -7014,7 +7038,7 @@ \newcommand*{\sub@action}{% \ifledRcol \xright@appenditem{\the\absline@numR}\to\actionlines@listR - \ifsublines@ + \ifsublines@R% \xright@appenditem{-1001}\to\actions@listR \else \xright@appenditem{-1002}\to\actions@listR @@ -7706,18 +7730,35 @@ % \begin{macrocode} -\newcommand*{\startsub}{\dimen0\lastskip - \ifdim\dimen0>0pt \unskip \fi - \ifledRcol \write\linenum@outR{\string\sub@on}% - \else \write\linenum@out{\string\sub@on}% - \fi - \ifdim\dimen0>0pt \hskip\dimen0 \fi} -\def\endsub{\dimen0\lastskip - \ifdim\dimen0>0pt \unskip \fi - \ifledRcol \write\linenum@outR{\string\sub@off}% - \else \write\linenum@out{\string\sub@off}% - \fi - \ifdim\dimen0>0pt \hskip\dimen0 \fi} +\newcommand*{\startsub}{% + \dimen0\lastskip% + \ifdim\dimen0>0pt% + \unskip% + \fi% + \ifledRcol% + \write\linenum@outR{\string\sub@on}% + \else% + \write\linenum@out{\string\sub@on}% + \fi% + \ifdim\dimen0>0pt% + \hskip\dimen0% + \fi% +}% + +\def\endsub{% + \dimen0\lastskip% + \ifdim\dimen0>0pt% + \unskip% + \fi% + \ifledRcol% + \write\linenum@outR{\string\sub@off}% + \else% + \write\linenum@out{\string\sub@off}% + \fi% + \ifdim\dimen0>0pt% + \hskip\dimen0% + \fi% +}% % \end{macrocode} % \end{macro} @@ -10463,7 +10504,7 @@ % \end{macrocode} % \end{macro} % \begin{macro}{\set@txtbeforenotesX} -% The \cs{set@txtbeforenotesX} does the same for the \cs{textbeforenotesX}. +% The \cs{set@txtbeforenotesX} does the same for the \cs{txtbeforenotesX}. % \begin{macrocode} \newcommand{\set@txtbeforenotesX}{% \unless\ifnofamiliar@% @@ -14980,6 +15021,8 @@ \csgdef{Xsymlinenum@#1}{}% \csgdef{Xsymlinenumannotation@#1}{}% + \newtoggle{Xnonote@#1}% + \newtoggle{Xnonumber@#1}% \newtoggle{Xnolinenumber@#1}% \newtoggle{Xnolinenumberifannotation@#1}% @@ -15029,6 +15072,7 @@ % \changes{v1.23.0}{2015/04/29}{Prevent spurious spaces when \protect\cs{Afootnote} and similar commands are followed by spaces (bug added on 1.0.0!).} % \begin{macrocode} \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{% + \nottoggle{Xnonote@#1}{% \if@edtext@secondarg@% \ifledRcol% \ifcsstring{Xonlyside@#1}{L}{\led@error@note@called@onrightside{#1footnote}}{}% @@ -15125,6 +15169,7 @@ \else% \led@err@FootnoteNotInSecondArgEdtext{#1}% \fi% + }{\@noneed@Footnotetrue}% End of \nottoggle{Xnonote@#1}{% \ignorespaces% } % \end{macrocode} @@ -15174,6 +15219,7 @@ \csgdef{widthX@#1}{\hsize}% \expandafter\csgdef{innotemarkX@#1}##1{\ledinnotemark{##1}}% \csgdef{txtbeforenotesX@#1}{}% + \newtoggle{nonoteX@#1}% \newtoggle{txtbeforesnotesX@#1@typeset}%Not directly used by user, but internal \newtoggle{txtbeforenotesonlyonceX@#1}% % End of for familiar footnotes. @@ -15191,6 +15237,7 @@ % \begin{macrocode} \global\expandafter\newcommand\csname footnote#1\endcsname[2][]{% + \nottoggle{nonoteX@#1}{% \begingroup% \prepare@prenotesX{#1}% \newcommand{\content}{##2}% @@ -15247,6 +15294,7 @@ {\let\index\orig@@index}% {}% \endgroup% + }{}%End of the notoggleX@#1 } % \end{macrocode} % Then define the counters. @@ -15758,6 +15806,8 @@ \newhooktoggle@series{Xstanzaonlyfirst}% \newhookcommand@series{Xstanzaseparator}% + \newhooktoggle@series{Xnonote}% + \newhooktoggle@series{Xonlypstart} \newhooktoggle@series{Xnonbreakableafternumber} \newhooktoggle@series{Xlemmadisablefontselection} @@ -15828,7 +15878,7 @@ \newhooktoggle@series{txtbeforenotesonlyonceX}% \newhookcommand@series@reload{widthX}{familiar}% \newhookcommand@series{innotemarkX}[][1]% - + \newhooktoggle@series{nonoteX}% \ifundef{\hsizeX}% {% \newcommandx{\hsizeX}[2][1,usedefault]{% diff --git a/macros/latex/contrib/reledmac/reledmac.pdf b/macros/latex/contrib/reledmac/reledmac.pdf Binary files differindex 5480783174..1af494b089 100644 --- a/macros/latex/contrib/reledmac/reledmac.pdf +++ b/macros/latex/contrib/reledmac/reledmac.pdf diff --git a/macros/latex/contrib/reledmac/reledpar.dtx b/macros/latex/contrib/reledmac/reledpar.dtx index 02f99ecd0b..b460ec7a22 100644 --- a/macros/latex/contrib/reledmac/reledpar.dtx +++ b/macros/latex/contrib/reledmac/reledpar.dtx @@ -348,6 +348,7 @@ % \changes{v2.24.2}{2020/09/16}{Fix some bugs with lineation by page, when a numbered section starts at the very beginning of page.} % \changes{v2.24.3}{2020/11/08}{Fix bug with hanging verse in parallel typesetting.} % \changes{v2.25.0}{2020/11/29}{Add compatibility with \protect\cs{linenumannotationothersidetrue} of \protect\macpackage.}. +% \changes{v2.25.1}{2021/01/21}{\protect\cs{ifsublines@R} migrated to \protect\macpackage} % ^^A PW added following as the definitions are at some unknown elsewhere % % \newcommand{\egstart}{% @@ -1404,7 +1405,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledpar}[2020/11/29 v2.25.0 reledmac extension for parallel texts]% +\ProvidesPackage{reledpar}[2021/01/21 v2.25.1 reledmac extension for parallel texts]% % \end{macrocode} % \subsection{Package's requirement} @@ -2462,7 +2463,6 @@ % \begin{macro}{\line@numR} % \begin{macro}{\subline@numR} % \begin{macro}{\absline@numR} -% \begin{macro}{\ifsublines@R} % The count \protect\cs{line@numR} stores the line number that is used in % the right text's marginal line numbering and in notes. % The count \protect\cs{subline@numR} stores @@ -2472,18 +2472,15 @@ % of the right text section: that is, the number we have actually printed, % no matter what numbers we attached to them. % -% The boolean \cs{ifsublines@R} is set to true when we start subline on rightside. % \begin{macrocode} \newcount\line@numR \newcount\subline@numR \newcount\absline@numR -\newif\ifsublines@R% % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro}{\line@listR} % \begin{macro}{\insertlines@listR} @@ -4512,7 +4509,7 @@ \global\resumenumberingR@startfalse% \add@msdata@firstlineofpage% \else - \ifnum\next@actionR<-4999\relax % 9/05 added relax here + \ifnum\next@actionR<-4999\relax% \@l@dtempcnta=-\next@actionR \advance\@l@dtempcnta by -5001\relax \ifsublines@R diff --git a/macros/latex/contrib/reledmac/reledpar.pdf b/macros/latex/contrib/reledmac/reledpar.pdf Binary files differindex e1538235bd..0f60806681 100644 --- a/macros/latex/contrib/reledmac/reledpar.pdf +++ b/macros/latex/contrib/reledmac/reledpar.pdf diff --git a/macros/latex/contrib/teubner/README b/macros/latex/contrib/teubner/README index 1031c6c12d..214ed7971c 100644 --- a/macros/latex/contrib/teubner/README +++ b/macros/latex/contrib/teubner/README @@ -1,6 +1,6 @@ -This accompanies the teubner bundle version 5.0 dated November 2020 or later. +This accompanies the teubner bundle version 5.2 dated January 2021 or later. -Copyright 2010-2020 Claudio Beccari +Copyright 2010-2021 Claudio Beccari The bundle contains the files @@ -41,7 +41,7 @@ a suitable command from within another open file that loads teubner. Please, be sure to work with a *2010* updated collection of the CBfonts; moreover with a *2019* or later updated version of the TeX system; with a babel version 3.9g or later; with the language description file greek.ldf -version 1.9b or later; teubner version 5.0 and later patches the +version 1.9b or later; package teubner, version 5.2 and later, patches the modifications of greek.ldf 1.10 so as cope with the ancient Greek numbering system. The teubner package does not work with previous versions of the above pieces of software; it may even produce fatal errors; therefore be sure to work only with a complete and up-to-date TeX system installation. diff --git a/macros/latex/contrib/teubner/teubner-doc.pdf b/macros/latex/contrib/teubner/teubner-doc.pdf Binary files differindex 8e7dd8cca7..6fda0f7ca1 100644 --- a/macros/latex/contrib/teubner/teubner-doc.pdf +++ b/macros/latex/contrib/teubner/teubner-doc.pdf diff --git a/macros/latex/contrib/teubner/teubner-doc.tex b/macros/latex/contrib/teubner/teubner-doc.tex index 651f46cf2a..a9add6fa3e 100644 --- a/macros/latex/contrib/teubner/teubner-doc.tex +++ b/macros/latex/contrib/teubner/teubner-doc.tex @@ -45,7 +45,7 @@ \thanks{This paper documents \texttt{teubner.sty} version \fileversion\ of \filedate.}\\ A package to extend the \textsf{greek} option\\ of the \babel\ package} \author{Claudio Beccari\thanks{\texttt{claudio dot beccari at gmail dot com}}} -\date{November 2020}% <---- this is the date of the teubenr-doc document! +\date{Janualy 2021}% <---- this is the date of the teubenr-doc document! \def\comando#1{\expandafter\texttt\expandafter{\string#1}} \def\cs#1{\texttt{\char92#1}} \def\ARG#1{\texttt{\char123}\meta{#1}\texttt{\char125}} @@ -111,7 +111,7 @@ The \pack{teubner} package is loaded in the usual way, but there are some simple \end{quote} -Since \pack{teubner} is a module that adds to the |greek.ldf| support for \pack{babel} package the functionalities needed by the Hellenists, it must be loaded after the latter. If you load it before and/or if you load it after, but you invoked the \texttt{babel} package without specifying the \meta{greek} language and the \texttt{ancient} Greek language attribute, \texttt{teubner} refuses to completely load and outputs a message very clear on this subject, so that you know what you should do in order to use the facilities offered by this module. +Since \pack{teubner} is a module that adds to the |greek.ldf| support for \pack{babel} package the functionalities needed by the Hellenists, it must be loaded after the latter. If you load it before and/or if you load it after, but you invoked the \texttt{babel} package without specifying the \meta{greek} language (with or without the \texttt{ancient} Greek language attribute\footnote{It is sufficient to specify the language \texttt{greek} to \pack{babel}, and \pack{teubner} provides to set the ancient attribute. If you specify also the \texttt{ancient} attribute to \texttt{babel}, this sends a message informing you that this attribute has been specified a second time.}) \texttt{teubner} refuses to completely load and outputs a message very clear on this subject, so that you know what you should do in order to use the facilities offered by this module. \noindent\textbf{Warning}: Some people like the Lipsian font shape and want to load it also for writing mathematics with it. No problem, but they shouldn't do this with \pack{teubner}, which is useful only to typeset Greek text. For using other alphabets in mathematics there are more suitable ways that rely on the commands described in the \texttt{fntguide.pdf} distributed with every \TeX\ system in \texttt{\$TEXMFDIST\slash doc\slash latex\slash base/}. @@ -139,7 +139,7 @@ You should never need (and therefore never use) the \textit{or} option for two r \noindent\textbf{Warning}: You might need to use the \textit{10pt} option because your Greek font collection is the minimal one. But if you are using \texttt{teubner}, you are likely to seek the best possible typeset text; therefore you should download and install the full collection of the Greek CB fonts. This full collection is generally already available with any complete distribution of the \TeX\ system. -If you are using Latin fonts different from the CM , EC, or LM collections, you have to control what you get with or without the option \textit{boldLipsian}; generally speaking, this option is best used with darker normal fonts; I have tried the Times, the Palatino, and the Fourier ones, and actually this option is desirable. This might not be true with other vector fonts. +If you are using Latin fonts different from the CM, CM-Super, EC, or LM collections, you have to control what you get with or without the option \textit{boldLipsian}; generally speaking, this option is best used with darker normal fonts; I have tried the Times, the Palatino, and the Fourier ones, and actually this option is desirable. This might not be true with other vector fonts. With the inclusion of the extended accent macros in the \pack{teubner} package (see below), the named accented glyphs should not be needed anymore; these accented glyph name macros are not defined by default, but for backwards compatibility they are available if the \emph{GlyphNames} option is specified; with the 2013 new Greek support for the \babel\ package, the extended accent macros are defined in a more efficient way and you should not need them any more; therefore, unless you specify this option, you avoid overloading the internal \TeX\ memory areas, thus leaving extra space for more useful packages. I suggest you to let the \emph{default} option \textit{NoGlyphNames} act as its name implies, and make use of the extended accent macros, should the need arise (see below). Moreover, if your keyboard has facilities for entering polytonic Greek, or if you install a keyboard driver that allows you to do so, you can directly input Greek text with the Greek alphabet, without using the transliteration provided by the Greek support for \babel. diff --git a/macros/latex/contrib/teubner/teubner.dtx b/macros/latex/contrib/teubner/teubner.dtx index fc126c7554..109f12c144 100644 --- a/macros/latex/contrib/teubner/teubner.dtx +++ b/macros/latex/contrib/teubner/teubner.dtx @@ -4,7 +4,7 @@ \input docstrip.tex \keepsilent \preamble -Copyright 2001--2020 Claudio Beccari All rights reserved. +Copyright 2001--2021 Claudio Beccari All rights reserved. This system is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -43,7 +43,7 @@ See the end of the file. %<package>\ProvidesPackage{teubner}[% %<tbtx>\ProvidesPackage{teubnertx}[% %<*driver,package,tbtx> -2020/11/17 v.5.0 +2021/01/21 v.5.2 %<package>Extensions for Greek philology] %<tbtx>Access to the LGR encoded Greek fonts that match the TX fonts] %</driver,package,tbtx> @@ -84,7 +84,7 @@ See the end of the file. %</driver> % \fi % -% \CheckSum{4130} +% \CheckSum{4132} % \begin{multicols}{2}\tableofcontents\end{multicols} % % @@ -3316,17 +3316,17 @@ $\displaystyle\left.% % Both |\greeknumeral| and |\Greeknumeral|, the latter producing % upper case Greek numerals, while the former produces lower case % ones, resort to robust internal macros if the |greek.ldf| language -% description style; they are renamed versions of the original macros -% that ar perfect for modern Greek usage; therefore we simply let the -% glyph placeholders for the vales 6, 90, and 900, originally indicated -% with the place hoders |\textstigma| and |\textkoppa|, (together with +% description style is active; they are renamed versions of the original +% macros that are perfect for modern Greek usage; therefore we simply let +% the glyph placeholders for the vales 6, 90, and 900, originally indicated +% with the place holders |\textstigma| and |\textkoppa|, (together with % their capital glyph counterparts) the the place holders for % |\textdigamma| and |\textqoppa|; with the value~6, we decided to use % either the stigma or the digamma sign by using the usual asterisk % added to the macro names; the \LaTeX\,3 language greatly simplifies % this task. % -% Therefore |\Greeknumeral| and% |\greeknumeral| macros are redefined +% Therefore |\Greeknumeral| and |\greeknumeral| macros are redefined % by means of |\RenewDocumentCommand| that assures solidity and by % resorting to the internal |greek.ldf| macros, we avoid all the tests % that the previous version had to make in order to handle the @@ -3340,7 +3340,9 @@ $\displaystyle\left.% % |greek.ldf| file; we define the |\grtoday| date in lower case % letters that differs from the |\today| one, because the numerals % for the day and the year are composed with the Greek numeral macros -% just defined, The optional asterisk ti |\grtoday| is passed directly to the |\greeknumeral| macros, although in a complicated way in order to avoid messing the |\expandafter| workings +% just defined, The optional asterisk to |\grtoday| is passed directly +% to the |\greeknumeral| macros, although in a complicated way in order +% to avoid messing the |\expandafter| workings % \begin{macrocode} % @@ -3358,7 +3360,8 @@ $\displaystyle\left.% {\let\textstigmagreek\textdigamma \let\textStigmagreek\textDigamma}% \bbl@greek@GreekNum\@firstoftwo{#2}\egroup} -\NewDocumentCommand\grtoday{ s }% +\providecommand\grtoday{} +\RenewDocumentCommand\grtoday{ s }% {\bgroup\IfBooleanTF{#1}% {\greeknumeral*{\the\day}\space\gr@c@month\space\greeknumeral*{\the\year}}% {\greeknumeral{\the\day}\space\gr@c@month\space\greeknumeral{\the\year}}% diff --git a/macros/latex/contrib/teubner/teubner.pdf b/macros/latex/contrib/teubner/teubner.pdf Binary files differindex aeba0adac1..e0b8b627bc 100644 --- a/macros/latex/contrib/teubner/teubner.pdf +++ b/macros/latex/contrib/teubner/teubner.pdf diff --git a/macros/latex/contrib/teubner/teubner.txt b/macros/latex/contrib/teubner/teubner.txt index d46ad3eb24..003111a0f2 100644 --- a/macros/latex/contrib/teubner/teubner.txt +++ b/macros/latex/contrib/teubner/teubner.txt @@ -1,9 +1,9 @@ - THE TEUBNER PACKAGE VERSION 5/0 OF NOVEMBER 2020 + THE TEUBNER PACKAGE VERSION 5.2 OF JANUARY 2021 EXTENSION FOR PHILOLOGICAL TYPESETTING -Copyright 2001-2004-2020 Claudio Beccari +Copyright 2001-2004-2021 Claudio Beccari The programs contained in this bundle can be distributed and/or modified under the terms of the LaTeX Project Public License (LPPL), version 1.3c @@ -29,7 +29,7 @@ These two .pdf files are already contained in the bundle. File teubner-doc.pdf is the documentation file that shows what can be done with this extension package and displays several examples. -Version 5.0 of the teubner package is compliant with the Greek language +Version 5.2 of the teubner package is compliant with the Greek language support to babel version 3.9g, that makes use of the encoding independent LICR (LaTeX Internal Character Representation) of the Greek characters & diacritics; it contains also the macros that allow using the LGR encoded @@ -43,10 +43,10 @@ transform Arabic numerals into the classical Milesian and Attic number representations. From version 5.0 the teubner package has been patched in order to re-establish the above number transformations; some other improvements have been added that are transparent to the end user, since -deal with the package internal workings. But these improvements require -a recent installation of the TeX system, because they use interfaces to -the new LaTeX 3 language; the minimum date of the LaTeX kernel should -not be earlier than January 2019. +they deal with the package internal workings. But these improvements +require a recent installation of the TeX system, because they use +interfaces to the new LaTeX 3 language; the minimum date of the LaTeX +kernel should not be earlier than January 2019. Some time ago Antonis Tsolomitis uploaded the package txfontsb which adds the possibility of using nice TX compatible Greek fonts when using @@ -65,17 +65,18 @@ teubner-doc.pdf document. Although Tsolomitis' fonts satisfy very well the everyday typesetting necessities of the Greek users and blend well also with the TX math fonts, they do not satisfy the requirements of the teubner package. This -is why the processing of the teubner.dtx file generates also the file +is why the processing of the teubner.dtx file generates also the file teubnertx.sty that is being input at begin document time if the user specified the TX fonts by calling the txfonts package. -In order to use this extension package with LaTeX you have to -install it. May be the very installation of your (recent) TeX system -distribution already provided for this task; may be your TeX system is -configured to load missing packages on the fly. In any case you can -check and possibly run your Package Manager (with MiKTeX follow the path -Programs|MiKTeX Settings|Packages; with TeXlive and MacTeX (if their -installation configuration was not the default complete one) run tlmgr. +In order to use this extension package with LaTeX you have to install it. +May be the very installation of your (recent) TeX system distribution +already provided for this task; may be your TeX system is configured to +load missing packages on the fly. In any case you can check and possibly +run your Package Manager (with MiKTeX follow the path: + Programs|MiKTeX Settings|Packages; +with TeXlive and MacTeX (if their installation configuration was not +the default complete one) run tlmgr. If you feel more comfortable to do everything by yourself and/or want to make a personal installation, run teubner.dtx through pdflatex; the @@ -85,14 +86,12 @@ depends very much on your particular implementation of the TeX system, but if your system copes with the TDS (standard TeX Directory Structure) and has a multiplicity of different TeX directory trees, you probably have a \localtexmf rooted TDS, or a /texmf one in your Home directory -containing a tex directory tree which on turn contains a latex directory. +containing a /tex directory tree which on turn contains a latex directory. Under the latter one create a new directory named, say, teubner, and move to this folder the teubner.sty, and teubnertx.sty files. -I suggest you to create a directory /teubner in the /doc directory of -the locally rooted structure and move there both teubner-doc.pdf and -the teubner.pdf file that you get by running pdflatex directly on -teubner.dtx. +I suggest to create a directory /teubner in the /doc directory of the +locally rooted structure and move there both teubner-doc.pdf and the teubner.pdf file that you get by running pdflatex directly on teubner.dtx. For what concerns fonts, they should already be installed with a recent TeX system distribution; this means that there are already all the @@ -167,7 +166,7 @@ you use LaTeX, you know what are its pros and cons. Happy philological LaTeXing! -Claudio Beccari November 2020 +Claudio Beccari January 2021 Professor Emeritus Politecnico di Torino, Italy claudio dot beccari at gmail dot com diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/NamedGraphs.pdf b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/NamedGraphs.pdf Binary files differnew file mode 100644 index 0000000000..9ca6ab3684 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/NamedGraphs.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Andrasfai.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Andrasfai.tex new file mode 100644 index 0000000000..41c7b2b578 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Andrasfai.tex @@ -0,0 +1,63 @@ +%!TEX root = /Users/ego/Boulot/TKZ/tkz-berge/NamedGraphs/doc/NamedGraphs-main.tex +\newpage\section{Andrasfai graph} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Andrasfai +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grAndrasfai}{\oarg{options}\var{$k$}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/AndrasfaiGraph.html} + +\emph{The k-Andrásfai graph is a circulant graph on $3k-1$ nodes whose indices are given by the integers 1,\dots,$3k-1$ that are congruent to 1 (mod 3). +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +} + +\medskip +\end{NewMacroBox} + +\bigskip + +\subsection{\tkzname{Andrásfai graph : k=7, order 20}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.7] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grAndrasfai[RA=7]{7} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Andrásfai graph : k=8, order 23}} + +\bigskip\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grAndrasfai[RA=7]{8} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage +\subsection{\tkzname{Andrásfai graph : k=9, order 26}} + +\bigskip\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grAndrasfai[RA=7]{9} +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Balaban.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Balaban.tex new file mode 100644 index 0000000000..ee3870c80b --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Balaban.tex @@ -0,0 +1,88 @@ +\newpage\section{Balaban}\label{balaban} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––– Balaban's graph ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\begin{NewMacroBox}{grBalaban}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/Balaban10-Cage.html} + +\emph{The Balaban 10-cage is one of the three(3,10)-cage graphs (Read 1998, p. 272). The Balaban (3,10)-cage was the first known example of a 10-cage (Balaban 1973; Pisanski 2001). Embeddings of all three possible (3,10)-cages (the others being the Harries graph and Harries-Wong graph) are given by Pisanski et al. (2001). Several embeddings are illustrated below, with the three rightmost being given by Pisanski and Randić (2000) +It is a Hamiltonian graph and has Hamiltonian cycles. It has 1003 distinct LCF notations, with four of length two (illustrated above) and 999 of length 1. +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +} +\end{NewMacroBox} + +\subsection{\tkzname{Balaban graph : first form}} +\begin{center} +\begin{tkzexample}[vbox] + \begin{tikzpicture}[scale=.6] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grBalaban[form=1,RA=7,RB=3,RC=3] + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage + +\subsection{\tkzname{Balaban graph : second form}} +\begin{center} +\begin{tkzexample}[vbox] + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{gray}{blue!50} + \grBalaban[form=2,RA=7,RB=7,RC=4,RD=2.5] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Balaban graph : third form} } +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{brown}{orange} + \grBalaban[form=3,RA=7,RB=6.5,RC=5.6,RD=5.6,RE=4.6] + \end{tikzpicture} + \end{tkzexample} +\end{center} + + +\vfill\newpage + +\subsection{\tkzname{Balaban graph : Balaban 11-Cage}} + + +The Balaban 11-cage is the unique 11-cage graph, discovered by Balaban (1973) and proven unique by McKay and Myrvold (2003). It has 112 vertices, 168 edges, girth 11 (by definition), diameter 8 and chromatic number 3. + + +\begin{center} +\begin{tkzexample}[vbox] + \begin{tikzpicture}[scale=.7] + \renewcommand*{\VertexInnerSep}{3pt} + \renewcommand*{\VertexLineWidth}{0.4pt} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{blue!50!black} + \grLCF[Math,RA=7]{% + 44,26,-47,-15,35,-39,11,-27,38,-37,43,14,28,51,-29,-16,41,-11,% + -26,15,22,-51,-35,36,52,-14,-33,-26,-46,52,26,16,43,33,-15,% + 17,-53,23,-42,-35,-28,30,-22, 45,-44,16,-38,-16,50,-55,20,28,% + -17,-43,47, 34,-26,-41,11,-36,-23,-16,41,17,-51,26,-33,47,17,% + -11,-20 ,-30,21,29,36,-43,-52,10,39,-28,-17,-52,51,26,37,-17,% + 10,-10,-45,-34,17,-26,27,-21,46,53,-10,29,-50,35,15,-47,-29,-41,% + 26,33,55,-17,42,-26,-36,16}{1} + \end{tikzpicture} +\end{tkzexample} + +\end{center} + + + + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Bipartite.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Bipartite.tex new file mode 100644 index 0000000000..169ff1a4fc --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Bipartite.tex @@ -0,0 +1,134 @@ +\newpage\section{Complete BiPartite Graph}\label{bipart} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––– Complete BiPartite graph ––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grCompleteBipartite}{\oarg{options}\var{$p$}\var{$q$}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/CompleteBipartiteGraph.html} + +\emph{A complete bipartite graph is a bipartite graph (i.e., a set of graph vertices decomposed into two disjoint sets such that no two graph vertices within the same set are adjacent) such that every pair of graph vertices in the two sets are adjacent. If there are $p$ and $q$ graph vertices in the two sets, the complete bipartite graph (sometimes also called a complete bigraph) is denoted $K_{p,q}$ . The below figures show $K_{3,2}$ and $K_{3,3}$. $K_{3,3}$ is also known as the utility graph (and the circulant graph $Ci_{1,3}(6)$), and is the unique 4-cage graph.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +From Wikipedia : \url{http://en.wikipedia.org/wiki/Complete_bipartite_graph} + +\emph{In the mathematical field of graph theory, a complete bipartite graph or biclique is a special kind of bipartite graph where every vertex of the first set is connected to every vertex of the second set. the graph $K_{1,3}$ is also called a claw.} +\end{NewMacroBox} + +\subsection{\tkzname{Complete bipartite graphs $K_{3,2}$ and $K_{3,3}$} } + %G=LCF_graph(6,[3,-3],3) +\begin{center} +\begin{tkzexample}[vbox] + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCompleteBipartite[RA=2,RB=2,RS=3]{3}{2} +\end{tikzpicture}\hspace*{2cm} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCompleteBipartite[RA=2,RB=2,RS=3]{3}{3} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{\tkzname{Complete bipartite graphs $K_{3,5}$}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=1.5] + \GraphInit[vstyle=Art] + \grCompleteBipartite[RA=3,RB=2,RS=5]{3}{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage + +\subsection{\tkzname{Complete bipartite graph : $K_{18,18}$ }} + +The complete bipartite graph illustrated below plays an important role in the novel Foucault's Pendulum by Umberto Eco. + +\href{http://mathworld.wolfram.com/CycleGraph.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\vfill +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90,scale=1.4] + \GraphInit[vstyle=Art] + \grCompleteBipartite[RA=0.5,RB=0.5,RS=9]{18}{18} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +A complete bipartite graph $K_{n,n}$ is a circulant graph (if the order is equal to $2n$ then $L=1,3,\dots,n$). +The code is on the next page + +\bigskip +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{6}{1,3} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{8}{1,3} +\end{tikzpicture} + +\vspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{10}{1,3,5} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{12}{1,3,5} +\end{tikzpicture} + +\vspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{14}{1,3,5,7} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{16}{1,3,5,7} +\end{tikzpicture} + +\vfill\newpage +\begin{tkzexample}[code only] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{6}{1,3} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{8}{1,3} +\end{tikzpicture} + +\vspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{10}{1,3,5} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{12}{1,3,5} +\end{tikzpicture} + +\vspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] +\grCirculant[RA=3]{14}{1,3,5,7} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] +\grCirculant[RA=3]{16}{1,3,5,7} +\end{tikzpicture} +\end{tkzexample} + + +\endinput + diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Bull.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Bull.tex new file mode 100644 index 0000000000..49fb3bb21b --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Bull.tex @@ -0,0 +1,24 @@ +\newpage\section{Bull} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Bull +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +The bull graph, 5 vertices, 5 edges, resembles to the head of a bull if drawn properly. +The bull graph is a simple graph on 5 nodes and 5 edges whose name derives from its resemblance to a schematic illustration of a bull + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[node distance=4cm] + \GraphInit[vstyle=Shade] + \Vertex{a0} + \NOEA(a0){a2} + \NOEA(a2){a4} + \NOWE(a0){a1} + \NOWE(a1){a3} + \Edges(a0,a1,a3) + \Edges(a0,a2,a4) + \Edge(a1)(a2) + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Cage.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Cage.tex new file mode 100644 index 0000000000..520b38555f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Cage.tex @@ -0,0 +1,43 @@ +\newpage\section{Cage}\label{cage} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Cage –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{Cage Graphs}{} + +\medskip +From Wikipedia \url{http://en.wikipedia.org/wiki/Cage_(graph_theory)}\\ +\emph{In the mathematical area of graph theory, a cage is a regular graph that has as few vertices as possible for its girth.\\ +Formally, an $(r,g)$-graph is defined to be a graph in which each vertex has exactly $r$ neighbors, and in which the shortest cycle has length exactly $g$. It is known that an $(r,g)$-graph exists for any combination of $r \geq 2$ and $g \geq 3$. An $(r,g)$-cage is an $(r,g)$-graph with the fewest possible number of vertices, among all $(r,g)$-graphs.} + +\medskip +From MathWorld \url{http://mathworld.wolfram.com/CageGraph.html}\\ +\emph{A $(r,g)$-cage graph is a $v$-regular graph of girth $g$ having the minimum possible number of nodes. When $v$ is not explicitly stated, the term "$g$-cage" generally refers to a $(3,g)$-cage.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +Examples : + +\medskip +\begin{tabular}{ll} + \bottomrule +$(r,g)$ & Names \\ +\midrule +$(3,3)$ & complete graph $K_4$ \\ +$(3,4)$ & complete bipartite graph $K_{3,3}$ Utility Graph\ref{bipart} \\ +$(3,5)$ & Petersen graph \ref{petersen} \\ +$(3,6)$ & Heawood graph \ref{heawood} \\ +$(3,7)$ & McGee graph \ref{mcgee} \\ +$(3,8)$ & Levi graph \ref{levi} \\ +$(3,10)$ & Balaban 10-cage \ref{balaban} \\ +$(3,11)$ & Balaban 11-cage \ref{balaban} \\ +$(3,12)$ & Tutte 12-cage \\ +$(4,3)$ & complete graph $K_5$ \\ +$(4,4)$ & complete bipartite graph $K_{4,4}$ \ref{bipart} \\ +$(4,5)$ & Robertson graph\ref{robertson} \\ +$(4,6)$ & Wong (1982)\ref{wong} \\ +\end{tabular} +\end{NewMacroBox} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Chvatal.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Chvatal.tex new file mode 100644 index 0000000000..72b5cd7e46 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Chvatal.tex @@ -0,0 +1,73 @@ +\newpage\section{Chvatal} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grChvatal}{\oarg{options}} + +\medskip +From Wikipedia : \url{http://en.wikipedia.org/wiki/Václav_Chvátal} + +\emph{Chvátal first learned of graph theory in 1964, on finding a book by Claude Berge in a Pilsen bookstore, and his first mathematical publication, at the age of 19, concerned directed graphs that cannot be mapped to themselves by any nontrivial graph homomorphism.\hfill\break +Gallery Theorem—which determines the number of guards required to survey the +walls of a polygonal art gallery (and has prompted much research), and constructed the smallest triangle-free 4-chromatic 4-regular graph, a beautiful graph now known as the Chvatal graph.} + + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/ChvatalGraph.html} + +\emph{The Chvátal graph is a quartic graph on 12 nodes and 24 edges. It has chromatic number 4, and girth 4.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +The Chvátal graph is implemented in \tkzname{tkz-berge} as \tkzcname{grChvatal} with three forms. +\end{NewMacroBox} + +\medskip +\subsection{\tkzname{Chvatal graph I}} + +\bigskip + +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture}[scale=.7] + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \SetGraphShadeColor{blue!50!black}{blue}{gray} + \grChvatal[RA=6,RB=2] + \end{tikzpicture} + \end{tkzexample} + +\end{center} + +\vfill\newpage +\subsection{\tkzname{Chvatal graph II}} + +\bigskip +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue!50!black}{gray} + \grChvatal[form=2,RA=7,RB=4,RC=1.4] + \end{tikzpicture} + \end{tkzexample} + +\end{center} + + +\vfill\newpage +\subsection{\tkzname{Chvatal graph III}} + +\bigskip +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue!50!black}{gray} + \grChvatal[form=3,RA=7] + \end{tikzpicture} + \end{tkzexample} + +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Cocktail_Party.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Cocktail_Party.tex new file mode 100644 index 0000000000..3ed5e45ced --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Cocktail_Party.tex @@ -0,0 +1,50 @@ +\newpage\section{Cocktail Party graph}\label{cocktail} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Cocktail Party –––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grCocktailParty}{\oarg{options}\var{integer}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/CocktailPartyGraph.html} + +\emph{The cocktail party graph of order , also called the hyperoctahedral graph (Biggs 1993, p. 17) is the graph consisting of two rows of paired nodes in which all nodes but the paired ones are connected with a graph edge. It is the graph complement of the ladder graph , and the dual graph of the hypercube graph.\hfill\break +This graph arises in the handshake problem. It is a complete n-partite graph that is denoted by Brouwer et al. (1989, pp. 222-223), and is distance-transitive, and hence also distance-regular.\hfill\break +The cocktail party graph of order is isomorphic to the circulant graph.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +The Chvátal graph is implemented in \tkzname{tkz-berge} as \tkzcname{grCocktailParty} with two forms. +\end{NewMacroBox} + +\subsection{\tkzname{Cocktail Party graph form 1 }} +\tikzstyle{VertexStyle} = [shape = circle, + shading = ball,% + ball color = green,% + minimum size = 24pt,% + draw] +\SetVertexMath +\tikzstyle{EdgeStyle} = [thick,% + double = orange,% + double distance = 1pt] +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \grCocktailParty[RA=3,RS=5]{4} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Cocktail Party graph form 2 }} + +\vspace*{2cm} +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \grCocktailParty[form=2,RA=4,RS=6]{4} + \end{tikzpicture} +\end{tkzexample} +\end{center} +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Coxeter.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Coxeter.tex new file mode 100644 index 0000000000..937ef0194f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Coxeter.tex @@ -0,0 +1,122 @@ +\newpage\section{Coxeter} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Coxeter ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +From MathWorld : \url{http://mathworld.wolfram.com/CoxeterGraph.html} + +The Coxeter graph is a nonhamiltonian cubic symmetric graph on 28 vertices and 42 edges. + + +\subsection{\tkzname{Coxeter graph I}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90,scale=1] + \GraphInit[vstyle=Art] + \SetGraphArtColor{magenta}{gray} + \grCycle[RA=5,prefix=a]{7} + \begin{scope}[rotate=-20]\grEmptyCycle[RA=4,prefix=b]{7}\end{scope} + \grCirculant[RA=3,prefix=c]{7}{2} + \grCirculant[RA=1.4,prefix=d]{7}{3} + \EdgeIdentity{a}{b}{7} + \EdgeIdentity{b}{c}{7} + \EdgeIdentity{b}{d}{7} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage +\subsection{\tkzname{Coxeter graph II}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{magenta}{gray} + \grCycle[RA=7,prefix=b]{24} + \grEmptyStar[RA=3,prefix=a]{4} + \EdgeDoubleMod{a}{3}{0}{1}{b}{24}{0}{8}{2} + \EdgeDoubleMod{a}{3}{0}{1}{b}{24}{7}{8}{2} + \EdgeDoubleMod{a}{3}{0}{1}{b}{24}{18}{8}{2} + \EdgeDoubleMod{a}{4}{3}{0}{b}{24}{22}{8}{2} + \EdgeInGraphMod*{b}{24}{6}{5}{8} + \EdgeInGraphMod*{b}{24}{11}{1}{8} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage + +\subsection{\tkzname{Coxeter graph III}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{magenta}{gray} + \grCycle[RA=7,prefix=c]{7} + \grEmptyCycle[RA=6,prefix=b]{7} + \begin{scope}[rotate=12.85]\grEmptyCycle[RA=5,prefix=a]{14}\end{scope} + \EdgeIdentity{b}{c}{7} + \EdgeDoubleMod{b}{7}{0}{1}{a}{14}{0}{2}{6} + \EdgeDoubleMod{b}{7}{0}{1}{a}{14}{13}{2}{6} + \EdgeInGraphModLoop{a}{14}{4}{0}{0} + \EdgeInGraphModLoop{a}{14}{6}{1}{1} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Tutte-Coxeter graph ––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\vfill\newpage +\subsection{\tkzname{Tutte-Coxeter graph I}} + +\tikzstyle{VertexStyle} = [very thin,draw, + shape = circle, + color = white, + fill = black, + inner sep = 0pt, + minimum size = 18pt] +\tikzstyle{EdgeStyle} = [thick, + double = brown, + double distance = 1pt] + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=3] + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue}{cyan} + \begin{scope}[rotate=5]\grCycle[RA=2.5,prefix=a]{10}\end{scope} + \begin{scope}[rotate=-10]\grCirculant[RA=1.8,prefix=b]{10}{5}\end{scope} + \begin{scope}[rotate=36]\grCirculant[RA=1.1,prefix=c]{10}{3}\end{scope} + \EdgeIdentity{a}{b}{10} + \EdgeIdentity{b}{c}{10} + \end{tikzpicture} +\end{tkzexample} +\end{center} +% + +\vfill\newpage +\subsection{\tkzname{Tutte-Coxeter graph II}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue}{darkgray} + \grLCF[RA=7]{-13,-9,7,-7,9,13}{5} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Crown.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Crown.tex new file mode 100644 index 0000000000..c880642ca7 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Crown.tex @@ -0,0 +1,55 @@ +\newpage\section{Crown}\label{crown} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Crown ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grCrown}{\oarg{options}\var{integer}} + + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/CrownGraph.html} + +\emph{The Crown graph for an integer is the graph with vertex set +$\{x_0,x_1,\dots,x_{n-1},y_0,y_1,\dots,y_{n-1}\}$\hfill\break +and edge set \hfill\break +$\{(x_i,x_j): 0\leq i,j\leq n-1,i \not=j\}$.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +The Crown graph is implemented in \tkzname{tkz-berge} as \tkzcname{grCrown} with two forms. +\end{NewMacroBox} + + +\subsection{\tkzname{Crown graph form 1}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} +\tikzstyle{VertexStyle} = [shape = circle, + shading = ball, + ball color = green, + minimum size = 24pt, + draw] +\tikzstyle{EdgeStyle} = [thick, + double = orange, + double distance = 1pt] +\SetVertexLabel\SetVertexMath +\grCrown[RA=3,RS=6]{4} + \end{tikzpicture} +\end{tkzexample} + +\end{center} + +\vfill\newpage +\subsection{\tkzname{Crown graph form 2}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCrown[form=2,RA=4,RS=6]{4} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-CubicSymmetric.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-CubicSymmetric.tex new file mode 100644 index 0000000000..3281249060 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-CubicSymmetric.tex @@ -0,0 +1,44 @@ +\newpage\section{Cubic Symmetric Graphs} +%<––––––––––––––––––––––––––––––––––––––––––––––––––--–––––––––––––––––––––––> +%<–––––––––––––––––––––––Cubic Symmetric Graphs –––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +A cubic symmetric graph is a symmetric cubic (i.e., regular of order 3). Such graphs were first studied by Foster (1932). They have since been the subject of much interest and study. Since cubic graphs must have an even number of vertices, so must cubic symmetric graphs. + +The circulant graph , is illustrated below. + +\subsection{\tkzname{Cubic Symmetric Graph form 1}} + +\vspace*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \SetVertexNoLabel + \grLCF[RA=6]{3,-3}{4} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage + +\subsection{\tkzname{Cubic Symmetric Graph form 2}} + +\vspace*{1cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \tikzstyle{VertexStyle} = [shape = circle,% + color = white, + fill = black, + very thin, + inner sep = 0pt,% + minimum size = 18pt, + draw] + \tikzstyle{EdgeStyle} = [thick,% + double = brown,% + double distance = 1pt] + \grLCF[Math,RA=6]{3,-3}{4} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Desargues.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Desargues.tex new file mode 100644 index 0000000000..496041579b --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Desargues.tex @@ -0,0 +1,88 @@ +\newpage\section{Desargues}\label{desargues} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Desargues –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grDesargues}{\oarg{options}} + +\medskip +From Wikipedia : \url{http://en.wikipedia.org/wiki/Desargues_graph} + +\emph{ In the mathematical field of graph theory, the Desargues graph is a 3-regular graph with 20 vertices and 30 edges, formed as the Levi graph of the Desargues configuration.The Desargues graph can also be formed as a double cover of the Petersen graph, as the generalized Petersen graph G(10,3), or as the bipartite Kneser graph $H_{5,2}$.} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/DesarguesGraph.html} + +\emph{ The Desargues graph is a cubic symmetric graph distance-regular graph on 20 vertices and 30 edges, illustrated above in several embeddings. It can be represented in LCF notation as (Frucht 1976) and is isomorphic to the bipartite Kneser graph . It is the incidence graph of the Desargues configuration.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +The Desargues graph is implemented in \tkzname{tkz-berge} as \tkzcname{grDesargues} with two forms. +\end{NewMacroBox} + + +\tikzstyle{VertexStyle} = [shape = circle,% + color = white, + fill = black, + very thin, + inner sep = 0pt,% + minimum size = 18pt, + draw] +\tikzstyle{EdgeStyle} = [thick,% + double = brown,% + double distance = 1pt] +\SetVertexMath +\subsection{\tkzname{The Desargues graph : form 1}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.6] + \grDesargues[Math,RA=6] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{The Desargues graph : form 2}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grDesargues[form=2,Math,RA=7] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{The Desargues graph wth \tkzname{LCF notation}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \grLCF[Math,RA=6]{5,-5,9,-9}{5} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage +\subsection{The Desargues graph with \tkzcname{grGeneralizedPetersen}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \tikzstyle{VertexStyle} = [shape = circle,% + color = white, + fill = black, + very thin, + inner sep = 0pt,% + minimum size = 18pt, + draw] + \tikzstyle{EdgeStyle} = [thick,% + double = brown,% + double distance = 1pt] + \grGeneralizedPetersen[Math,RA=6]{10}{3} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Doyle.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Doyle.tex new file mode 100644 index 0000000000..4f6a55c1fc --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Doyle.tex @@ -0,0 +1,85 @@ +\newpage\section{Doyle}\label{doyle} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Doyle ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grDoyle}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/DoyleGraph.html} + +\emph{The Doyle graph, sometimes also known as the Holt graph (MaruÅ¡iÄ et al. 2005), is the symmetric quartic graph on 27 nodes illustrated. It is a Symmetric Graph. Three embeddings are illustrated below.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +The Doyle graph is implemented in \tkzname{tkz-berge} as \tkzcname{grDoyle} with three forms. +\end{NewMacroBox} + +\subsection{\tkzname{The Doyle graph : form 1}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.6] + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{red}{Maroon}{fondpaille} + \SetVertexNoLabel + \grDoyle[RA=7,RB=5,RC=3] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{The Doyle graph : form 2}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{red}{Magenta}{white} + \SetVertexNoLabel + \grDoyle[form=2,RA=7] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{The Doyle graph : form 3}} +\begin{center} + \begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetGraphArtColor{red}{Magenta}{red} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grDoyle[form=3,RA=7,RB=2] + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage + +\subsection{27 nodes but not isomorphic to the Doyle graph} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.6] + \tikzstyle{VertexStyle} = [shape = circle, + ball color = gray!60, + minimum size = 16pt,draw] + \tikzstyle{EdgeStyle} = [thick,color=black,% + double = orange,% + double distance = 1pt] + \SetVertexNoLabel + \grCycle[RA=7.5]{9} + \grEmptyCycle[prefix=b,RA=5.5]{9} + \grCirculant[prefix=c,RA=3.5]{9}{4} + \EdgeIdentity{b}{c}{9} + \EdgeMod{a}{c}{9}{1} + \EdgeMod{a}{b}{9}{1} + \EdgeInGraphMod{b}{9}{2} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Dyck.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Dyck.tex new file mode 100644 index 0000000000..dfa3a2aab5 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Dyck.tex @@ -0,0 +1,39 @@ +\newpage\section{Dyck graph}\label{dyck} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Nauru ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grDick}{\oarg{options}} + +From Wikipedia \url{http://en.wikipedia.org/wiki/Dyck_graph} + +\emph{In the mathematical field of graph theory, the Dyck graph is a 3-regular graph with 32 vertices and 48 edges, named after Walther von Dyck. It has chromatic number 2, radius 5, diameter 5 and girth 6. It is also a 3-vertex-connected and a 3-edge-connected graph. +} + +\medskip +From MathWorld \url{http://mathworld.wolfram.com/DyckGraph.html} + +\emph{The Dyck graph is unique cubic symmetric graph on 32 nodes, illustrated below in one of embeddings.} + +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{NewMacroBox} + +\subsection{\tkzname{Dyck graph}} + +It can be represented in LCF notation as $\big[5,-5,13,-13\big]^8$ + + + +\subsection{\tkzname{Dyck graph with LCF notation}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \grLCF[RA=7]{5,-5,13,-13}{8}% + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Folkman.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Folkman.tex new file mode 100644 index 0000000000..2c357f15cc --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Folkman.tex @@ -0,0 +1,118 @@ +\newpage\section{Folkman}\label{folkman} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Folkman –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grFolkman}{\oarg{options}} + +\medskip +From MathWorld : \url{http://mathworld.wolfram.com/FolkmanGraph.html} + +\emph{The Folkman graph is a semisymmetric graph that has the minimum possible number of nodes 20.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{NewMacroBox} + + +\subsection{\tkzname{Folkman Graph LCF embedding}} +The code is + +\begin{tkzexample}[code only] +\grLCF[RA=7]{5,-7,-7,5}{5}\end{tkzexample} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.8] + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue}{darkgray} + \grFolkman[RA=6] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage + + +\subsection{\tkzname{Folkman Graph embedding 1}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=45]% + \tikzstyle{VertexStyle} = [shape = circle, + shading = ball, + ball color = gray!60, + inner sep = 3pt, + draw] + \tikzstyle{EdgeStyle} = [thick,orange] + \SetVertexNoLabel + \grCycle[prefix=a,RA=3]{4}% + \grCycle[prefix=b,RA=4]{4}% + \grCycle[prefix=c,RA=5]{4}% + \grCycle[prefix=d,RA=6]{4}% + \grCycle[prefix=e,RA=7]{4}% + \foreach \r/\s/\t in {a/d/e,b/e/a,c/a/b,d/b/c,e/c/d}{% + \Edges(\r0,\s1,\r2,\t3,\r0) + } + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage + +\subsection{\tkzname{Folkman Graph embedding 1 new code}} +{ \tikzstyle{VertexStyle} =[shape = circle,% + shading = ball,% + inner sep = 4pt,% + draw] + \tikzstyle{EdgeStyle} = [thin,blue] + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} +\begin{scope}[shift={(1,1)},rotate=45]\grEmptyPath[prefix=a,RA=1]{5} + \end{scope} +\begin{scope}[shift={(-1,1)},rotate=135]\grEmptyPath[prefix=b,RA=1]{5} + \end{scope} +\begin{scope}[shift={(-1,-1)},rotate=225]\grEmptyPath[prefix=c,RA=1]{5} + \end{scope} +\begin{scope}[shift={(1,-1)},rotate=315]\grEmptyPath[prefix=d,RA=1]{5} + \end{scope} + \EdgeIdentity*{a}{b}{0,...,4} \EdgeIdentity*{b}{c}{0,...,4} + \EdgeIdentity*{c}{d}{0,...,4} \EdgeIdentity*{d}{a}{0,...,4} + \EdgeDoubleMod{a}{5}{0}{1}{b}{5}{3}{1}{1} + \EdgeDoubleMod{a}{5}{2}{1}{b}{5}{0}{1}{2} + \EdgeDoubleMod{a}{5}{1}{1}{d}{5}{0}{1}{3} + \EdgeDoubleMod{c}{5}{2}{1}{b}{5}{0}{1}{2} + \EdgeDoubleMod{c}{5}{0}{1}{b}{5}{3}{1}{1} + \EdgeDoubleMod{c}{5}{1}{1}{d}{5}{0}{1}{3} + \Edges(a0,d4,c0) + \end{tikzpicture} +\end{tkzexample} +\end{center} +} +\vfill\newpage + +\subsection{\tkzname{Folkman Graph embedding 3}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.8] + \SetVertexNoLabel + \tikzstyle{VertexStyle} = [shape = circle, + shading = ball, + ball color = gray!60, + inner sep = 3pt, + draw] + \tikzstyle{EdgeStyle} = [thick,orange] + \grEmptyCycle[prefix=a,RA=1.85]{5} \grEmptyCycle[prefix=b,RA=3.7]{5} + \grCycle[prefix=c,RA=6]{10} + \EdgeDoubleMod{a}{5}{0}{1}{b}{5}{1}{1}{4} + \EdgeDoubleMod{a}{5}{0}{1}{b}{5}{4}{1}{4} + \EdgeDoubleMod{b}{5}{0}{1}{c}{10}{9}{2}{4} + \EdgeDoubleMod{b}{5}{0}{1}{c}{10}{1}{2}{4} + \EdgeDoubleMod{a}{5}{0}{1}{c}{10}{8}{2}{4} + \EdgeDoubleMod{a}{5}{0}{1}{c}{10}{2}{2}{4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Foster.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Foster.tex new file mode 100644 index 0000000000..3f05835387 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Foster.tex @@ -0,0 +1,39 @@ +\newpage\section{Foster}\label{foster} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Foster –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\begin{NewMacroBox}{grFoster}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/FosterGraph.html} + +\emph{The Foster graph is a graph on 90 vertices and 135 arcs. It has a unique order-15 LCF notations.} + +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + \end{NewMacroBox} + +\subsection{\tkzname{Foster graph}} + +The macros is based on + +\begin{tkzexample}[code only] +\grLCF[Math,RA=7]{17, -9, 37, -37, 9, -17}{15}\end{tkzexample} + +\vspace*{1cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.6] + \renewcommand*{\VertexInnerSep}{2pt} + \renewcommand*{\EdgeLineWidth}{0.5pt} + \GraphInit[vstyle=Art] + \tikzset{VertexStyle/.append style={minimum size=2pt}} + \SetGraphColor{red}{blue} + \grLCF[Math,RA=6]{17, -9, 37, -37, 9, -17}{15} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Franklin.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Franklin.tex new file mode 100644 index 0000000000..b7f5bc4d66 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Franklin.tex @@ -0,0 +1,71 @@ +\newpage\section{Franklin}\label{franklin} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Franklin ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grFranklin}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/FranklinGraph.html} + +\emph{The Franklin graph is the 12-vertex cubic graph shown above whose embedding on the Klein bottle divides it into regions having a minimal coloring using six colors, thus providing the sole counterexample to the Heawood conjecture.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +The Franklin graph is implemented in \tkzname{tkz-berge} as \tkzcname{grFranklin}. +\end{NewMacroBox} + +\tikzstyle{VertexStyle} = [shape = circle,% + color = white, + fill = black, + very thin, + inner sep = 0pt,% + minimum size = 18pt, + draw] +\tikzstyle{EdgeStyle} = [thick,% + double = brown,% + double distance = 1pt] +\newcounter{tempi}\setcounter{tempi}{0} + +\subsection{\tkzname{The Franklin graph : embedding 1}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.7] + \grFranklin[Math,RA=7] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{The Franklin graph : embedding 2}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCycle[Math,RA=4,prefix=a]{6} + \grCycle[Math,RA=6,prefix=b]{6} + \foreach \x in {0,...,5}{% + \ifthenelse{\isodd{\x}}{% + \pgfmathsetcounter{tempi}{\x-1}}{% + \pgfmathsetcounter{tempi}{\x+1}} + \Edge(a\x)(b\thetempi) +} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage +\subsection{\tkzname{The Franklin graph : with LCF notation embedding 3}} + +\space*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grLCF[Math,RA=7]{-5,-3,3,5}{3} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Gray.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Gray.tex new file mode 100644 index 0000000000..d2f16f9124 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Gray.tex @@ -0,0 +1,32 @@ +\newpage\section{Gray} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Gray –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +From MathWorld :\url{ http://mathworld.wolfram.com/GrayGraph.html} + +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + + +The Gray graph is a cubic semisymmetric graph on 54 vertices. It was discovered by Marion C. Gray in 1932, and was first published by Bouwer (1968). Malnic et al. (2004) showed that the Gray graph is indeed the smallest possible cubic semisymmetric graph. + +It is the incidence graph of the Gray configuration. + +The Gray graph has a single order-9 LCF Notation and five distinct order-1 LCF notations. + +The Gray graph has girth 8, graph diameter 6 + +It can be represented in LCF notation as $\big[-25,7,-7,13,-13,25\big]^9$ + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \SetGraphArtColor{gray}{red} + \grLCF[Math,RA=6]{-25,7,-7,13,-13,25}{9} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Groetzsch.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Groetzsch.tex new file mode 100644 index 0000000000..491f9450d8 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Groetzsch.tex @@ -0,0 +1,88 @@ +\newpage\section{Groetzsch} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– groetzsch ––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grGrotzsch}{\oarg{options}\var{$k$}} + +\medskip +From Wikipedia : \url{http://en.wikipedia.org/wiki/Grötzsch_graph} + +\emph{The Grötzsch graph is a triangle-free graph with 11 vertices, 20 edges, and chromatic number 4. It is named after German mathematician Herbert Grötzsch, and its existence demonstrates that the assumption of planarity is necessary in Grötzsch's theorem (Grötzsch 1959) that every triangle-free planar graph is 3-colorable.} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/GroetzschGraph.html} + +\emph{The Grötzsch graph is smallest triangle-free graph with chromatic number four. It is identical to the Mycielski Graph of order four.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\end{NewMacroBox} + + +%GrotzschGraph +\tikzstyle{VertexStyle} = [shape = circle, + shading = ball, + ball color = gray!60, + inner sep = 3pt, + draw] +\SetVertexNoLabel +\tikzstyle{EdgeStyle} = [thick,orange] + +\subsection{\tkzname{Grotzsch Graph : first form}} + +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \grGrotzsch[RA=3,RB=6]{6}% + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage\null +\subsection{\tkzname{Grotzsch Graph : second form}} +\SetVertexLabel +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grGrotzsch[form=2,RA=6,RB=3]{6}% + \end{tikzpicture} +\end{tkzexample} +\end{center} + + + +\vfill\newpage\null +\subsection{\tkzname{Grotzsch Graph : third form}} +From Wikipedia : \url{http://en.wikipedia.org/wiki/Complete_bipartite_graph} + +\tikzstyle{VertexStyle} = [shape = circle, + shading = ball, + ball color = blue!60, + inner sep = 6pt, + draw] +\SetVertexNoLabel +\tikzstyle{EdgeStyle} = [thick,double= red, + double distance = 1pt] + +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture}[rotate=-18] + \draw[scale=.5,samples at={-6.4,-6.3,...,6.4}, + smooth,thick, + variable=\t, + double= red, + double distance = 1pt] + plot ({3*(1.5*cos(\t r) +3*cos(1.5*\t r))},% + {3*(1.5*sin(\t r) -3*sin(1.5*\t r))}); + \begin{scope}[rotate=36] + \grStar[prefix=a,RA=2.2]{6}% + \grEmptyCycle[prefix=b,RA=4.4]{5}% + \end{scope} + \end{tikzpicture} + \end{tkzexample} + +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Harries.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Harries.tex new file mode 100644 index 0000000000..88e5ca6df8 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Harries.tex @@ -0,0 +1,48 @@ +\newpage\section{Harries graph}\label{harries} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Nauru ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grHarries}{\oarg{options}} + +From Wikipedia \url{http://en.wikipedia.org/wiki/Harries_graph} + +\emph{In the mathematical field of graph theory, the Harries graph or Harries (3-10)-cage is a 3-regular undirected graph with 70 vertices and 105 edges. +The Harries graph has chromatic number 2, chromatic index 3, radius 6, diameter 6, girth 10 and is Hamiltonian. It is also a 3-vertex-connected and 3-edge-connected non-planar cubic graph.} + +\medskip +From MathWorld \url{http://mathworld.wolfram.com/HarriesGraph.html} + +\emph{The Harries graph has 678 distinct LCF notations, two of which are order 5 (illustrated below) and 674 of which are order 1..} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{NewMacroBox} + +\subsection{\tkzname{Harries graph} with \tkzcname{grHarries}} + +The macro uses the LCF notation : $\big[-29,-19,-13,13,21,-27,27,33,-13,13,19,-21,-33,29\big]^5$ + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \grHarries[RA=7] + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsection{\tkzname{Harries graph with LCF notation}} +It can be also represented in LCF notation as $\big[-35,9,15,-15,23,-27,27,-35,15,-15,-9,-27,27,-23\big]^5$ + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \grLCF[RA=7]{-35,9,15,-15,23,-27,27,-35,15,-15,-9,-27,27,-23}{5}% + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Heawood.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Heawood.tex new file mode 100644 index 0000000000..1f8aec714a --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Heawood.tex @@ -0,0 +1,47 @@ +\newpage\section{Heawood graph}\label{heawood} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– HEAWOOD ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grHeawood}{\oarg{options}} + +\medskip +From Wikipedia \url{http://en.wikipedia.org/wiki/Heawood_graph} + +\emph{The Heawood graph is an undirected graph with 14 vertices and 21 edges. Each vertex is adjacent to exactly three edges (that is, it is a cubic graph), and all cycles in the graph have six or more edges. Percy John Heawood (1861-1955) was an English mathematician who spent a large amount of time on questions related to the four colour theorem.} + +\medskip +From MathWorld \url{http://mathworld.wolfram.com/HeawoodGraph.html} + +\emph{The Heawood graph is the unique $(3,6)$-cage graph and Moore graph and is graph illustrated below in one of his embeddings.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{NewMacroBox} + +\subsection{\tkzname{Heawood graph}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.75] + \GraphInit[vstyle=Shade] + \grHeawood[RA=7] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +It can be represented in LCF notation as $\big[5,-5\big]^7$ + +\tkzcname{grLCF[RA=5]\{5,9\}\{7\}} gives the result because $-5 = 9\ mod\ 14$. + +\subsection{\tkzname{Heawood graph with LCF notation}}\label{lcf2} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grLCF[RA=7]{5,9}{7}% + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex new file mode 100644 index 0000000000..f13cca73bc --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex @@ -0,0 +1,41 @@ +\newpage\section{Hypercube} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Hypercube –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +From Wikipedia :\url{http://en.wikipedia.org/wiki/Hypercube_graph} + +In the mathematical field of graph theory, the hypercube graph $Q_n$ is a special regular graph with $2n$ vertices, which correspond to the subsets of a set with $n$ elements. Two vertices labelled by subsets S and T are joined by an edge if and only if S can be obtained from T by adding or removing a single element. Each vertex of $Q_n$ is incident to exactly $n$ edges (that is, $Q_n$ is $n$-regular), so the total number of edges is $2^{n-1}n$. +The name comes from the fact that the hypercube graph is the one-dimensional skeleton of the geometric hypercube. +Hypercube graphs should not be confused with cubic graphs, which are graphs that are 3-regular. The only hypercube that is a cubic graph is $Q_3$. + +\tikzstyle{VertexStyle} = [shape = circle,% + fill = red,% + inner sep = 3pt,% + outer sep = 0pt,% + draw] +\SetVertexNoLabel + +\subsection{\tkzname{The hypercube graph $Q_4$} } + +The code is on the next page. + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.75] + \grCycle[RA=8]{8} + \pgfmathparse{8*(1-4*sin(22.5)*sin(22.5))} + \let\tkzbradius\pgfmathresult + \grCirculant[prefix=b,RA=\tkzbradius]{8}{3} + \makeatletter + \foreach \vx in {0,...,7}{% + \pgfmathsetcounter{tkz@gr@n}{mod(\vx+1,8)} + \pgfmathsetcounter{tkz@gr@a}{mod(\vx+7,8)} + \pgfmathsetcounter{tkz@gr@b}{mod(\thetkz@gr@n+1,8)} + \Edge(a\thetkz@gr@n)(b\thetkz@gr@b) + \Edge(b\thetkz@gr@a)(a\vx) + } + \makeatother +\end{tikzpicture} +\end{tkzexample} +\end{center} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Koenisberg.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Koenisberg.tex new file mode 100644 index 0000000000..525d493fe1 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Koenisberg.tex @@ -0,0 +1,61 @@ +\newpage\section{The Seven Bridges of Königsberg}\label{seven} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––– Königsberg ––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grKonisberg}{\oarg{options}\var{$k$}} + +\medskip +From MathWorld : \url{http://mathworld.wolfram.com/KoenigsbergBridgeProblem.html} + +\emph{The Königsberg bridge problem asks if the seven bridges of the city of Königsberg (left figure; Kraitchik 1942), formerly in Germany but now known as Kaliningrad and part of Russia, over the river Preger can all be traversed in a single trip without doubling back, with the additional requirement that the trip ends in the same place it began. This is equivalent to asking if the multigraph on four nodes and seven edges (right figure) has an Eulerian circuit. This problem was answered in the negative by Euler (1736), and represented the beginning of graph theory.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +From Wikipedia : \url{http://en.wikipedia.org/wiki/Seven_Bridges_of_Königsberg} + +\emph{The paper written by Leonhard Euler on the Seven Bridges of Königsberg and published in 1736 is regarded as the first paper in the history of graph theory.\hfill\break +The Seven Bridges of Königsberg is a famous solved mathematics problem inspired by an actual place and situation. The city of Königsberg, Prussia (now Kaliningrad, Russia) is set on the Pregel River, and included two large islands which were connected to each other and the mainland by seven bridges. The problem is to decide whether it is possible to walk a route that crosses each bridge exactly once.\hfill\break +In 1736, Leonhard Euler proved that it was not possible. In proving the result, Euler formulated the problem in terms of graph theory, by abstracting the case of Königsberg — first, by eliminating all features except the landmasses and the bridges connecting them; second, by replacing each landmass with a dot, called a vertex or node, and each bridge with a line, called an edge or link. The resulting mathematical structure is called a graph.} +\end{NewMacroBox} + +\subsection{\tkzname{Königsberg graph} with \tkzcname{grKonisberg}} +\begin{center} +\begin{tkzexample}[vbox] + \begin{tikzpicture}[node distance=4cm] + \grKonisberg + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzcname{Königsberg graph} : fine embedding} +\begin{center} +\begin{tkzexample}[vbox] + \begin{tikzpicture} + \renewcommand*{\VertexBallColor}{orange!50!red} + \renewcommand*{\EdgeDoubleDistance}{2pt} + \SetGraphUnit{4} + \GraphInit[vstyle=Shade] + \tikzset{LabelStyle/.style = {draw, + fill = yellow, + text = red}} + \Vertex{A} + \EA(A){B} + \EA(B){C} + {\SetGraphUnit{8} + \NO(B){D}} + \Edge[label=1](B)(D) + \tikzset{EdgeStyle/.append style = {bend left}} + \Edge[label=4](A)(B) + \Edge[label=5](B)(A) + \Edge[label=6](B)(C) + \Edge[label=7](C)(B) + \Edge[label=2](A)(D) + \Edge[label=3](D)(C) + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Levi.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Levi.tex new file mode 100644 index 0000000000..b0d5053f6f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Levi.tex @@ -0,0 +1,79 @@ +\newpage\section{Levi Graph}\label{levi} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Levy –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grLevi}{\oarg{options}} + +\medskip + +From Wikipedia \url{http://en.wikipedia.org/wiki/Levi_graph} + +\emph{In combinatorics a Levi graph or incidence graph is a bipartite graph associated with an incidence structure. From a collection of points and lines in an incidence geometry or a projective configuration, we form a graph with one vertex per point, one vertex per line, and an edge for every incidence between a point and a line.\hfil\break +In the mathematical field of graph theory, the Tutte–Coxeter graph or Tutte eight-cage is a 3-regular graph with 30 vertices and 45 edges. As the unique smallest cubic graph of girth 8 it is a cage and a Moore graph. It is bipartite, and can be constructed as the Levi graph of the generalized quadrangle. } + +From MathWord : \url{http://mathworld.wolfram.com/LeviGraph.html} + +\emph{It has 30 nodes and 45 edges. It has girth 8, diameter 4, chromatic number 2. The Levi graph is a generalized polygon which is the point/line incidence graph of the generalized quadrangle . The graph was first discovered by Tutte (1947), and is also called the Tutte-Coxeter graph , Tutte's cage or "Tutte's (3,8)-cage".The Levi graph is the unique (3,8)-cage graph.\hfil\break +The incidence graph of a generic configuration is sometimes known as a Levi graph (Coxeter 1950).} + +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +Some examples of Levi Graphs with this definition are~: +\begin{itemize} +\item Desargues graph +\item Heawood graph +\item Heawood graph +\item Pappus graph +\item Gray graph +\item Tutte eight-cage +\end{itemize} + +\end{NewMacroBox} + +The two forms can be draw with : + + \begin{tkzexample}[code only] + \grLevi[RA=7]\end{tkzexample} + +and + + \begin{tkzexample}[code only] + \grLevi[form=2,RA=7,RB=5,RC=3]\end{tkzexample} + +You can see on the next pages, the two forms. +\vfill\newpage +Now I show you how to code this graph. + +\subsection{\tkzname{Levy graph :form 1}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \grLCF[prefix=a,RA=6]{-13,-9,7,-7,9,13}{5} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage + +\subsection{\tkzname{Levy graph :form 2}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCycle[prefix=a,RA=7]{10} + \EdgeInGraphMod{a}{10}{5} + \grEmptyCycle[prefix=b,RA=5]{10} + \grEmptyCycle[prefix=c,RA=3]{10} + \EdgeInGraphMod{c}{10}{4} + \end{tikzpicture} +\end{tkzexample} +\end{center} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-McGee.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-McGee.tex new file mode 100644 index 0000000000..b72ec439db --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-McGee.tex @@ -0,0 +1,59 @@ +\newpage\section{Mc Gee}\label{mcgee} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Mc Gee –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grMcGee}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/McGeeGraph.html} + +\emph{The McGee graph is the unique 7-cage graph. It has 24 nodes, 36 edges, girth 7, diameter 4, and is a cubic graph. It has chromatic number 3.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\end{NewMacroBox} + +\bigskip +\subsection{\tkzname{McGee graph with }\tkzcname{grMcGee}} + +\bigskip +The same result is obtained with + +\begin{tkzexample}[code only] + \grLCF[Math,RA=6]{-12,7,-7}{8}\end{tkzexample} + +\medskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \grMcGee[Math,RA=6] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +Others embeddings +\subsection{\tkzname{McGee graph with }\tkzcname{grLCF}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \grLCF[Math,RA=6]{-12,-6,6,-12,7,-7,-12,6,-6,-12,7,-7}{2} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{McGee graph with }\tkzcname{grLCF}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \grLCF[Math,RA=6]{-12,6,-7,-12,7,-8,11,-6,6,-11,8,% + -7,-12,7,-6,-12,7,-11,-8,7,-7,8,11,-7}{1} + \end{tikzpicture} +\end{tkzexample} +\end{center} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Moebius.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Moebius.tex new file mode 100644 index 0000000000..111d503453 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Moebius.tex @@ -0,0 +1,167 @@ +\newpage\section{Möbius-Kantor Graph}\label{moebius} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Moebius –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grMobiusKantor}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/Moebius-KantorGraph.html} + +\emph{The unique cubic symmetric graph on 16 nodes, illustrated above in several embeddings. It is 24 edges, girth 6, diameter 4, chromatic number 2, and is nonplanar but Hamiltonian. It can be represented in LCF notation and is identical to a generalized Petersen graph . +} + +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{NewMacroBox} + + + + +\subsection{\tkzname{Möbius Graph : form I}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphArtColor{red}{olive} + \SetVertexNoLabel + \grMobiusKantor[RA=7] +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Möbius Graph : form II}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=22.5] + \GraphInit[vstyle=Shade] + \SetGraphArtColor{red!50}{brown!50} + \SetVertexNoLabel + \grMobiusKantor[form=2,RA=7,RB=3] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage + \subsection{\tkzname{Möbius Graph : form III}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grMobiusKantor[form=3,RA=7,RB=2] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Möbius Graph with LCF notation}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grLCF[RA=7]{5,-5}{8} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Möbius Graph with \tkzcname{grGeneralizedPetersen}} } + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grGeneralizedPetersen[RA=7,RB=4]{8}{3} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Moebius Ladder –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +A Möbius ladder of order $2n$ is a simple graph obtained by introducing a twist in a prism graph of order $2n$ that is isomorphic to the circulant graph with order $2n$ and $L=\{1,n\}$ + +\url{http://mathworld.wolfram.com/MoebiusLadder.html} + +\subsection{\tkzname{Möbius Ladder Graph}} + + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grMobiusLadder[RA=7,RB=2]{8}% + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage +\subsection{\tkzname{Circulant Graph isomorphic to the last graph}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grCirculant[RA=7]{16}{1,8}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput + +\newpage\section{Möbius-Kantor Graph}\label{MK} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––Möbius-Kantor Graph –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{% +\newmacro{Möbius-Kantor Graph : \tkzcname{grMobiusKantor}}}{lightgray} + \tkzcname{grMobiusKantor[|RA|=\meta{Number}]\var{Number}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/Moebius-KantorGraph.html} + +\emph{The unique cubic symmetric graph on 16 nodes, illustrated above in two embeddings. It is 24 edges, girth 6, diameter 4, chromatic number 2, and is nonplanar but Hamiltonian. It is identical to the generalized Petersen graph.} +\href{http://mathworld.wolfram.com/Moebius-KantorGraph.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +The Möbius-Kantor Graph is implemented in \tkzname{tkz-berge} as \tkzcname{grMobiusKantor}. +\end{NewMacroBox} + +\subsection{Möbius-Kantor Graph with \tkzcname{grGeneralizedPetersen}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grGeneralizedPetersen[RA=7,RB=4]{3}{1} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage\null + + +\subsection{\tkzname{MobiusKantor graph}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grMobiusKantor[RA=5] + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Nauru.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Nauru.tex new file mode 100644 index 0000000000..52d55f2d52 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Nauru.tex @@ -0,0 +1,37 @@ +\newpage\section{Nauru graph}\label{nauru} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Nauru ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grNauru}{\oarg{options}} + +From Wikipedia \url{http://en.wikipedia.org/wiki/Nauru_graph} + +\emph{TIn the mathematical field of graph theory, the Nauru graph is a symmetric bipartite cubic graph with 24 vertices and 36 edges. It was named by David Eppstein after the twelve-pointed star in the flag of Nauru. It has chromatic number 2, , diameter 4, radius 4 and girth 6. It is also a 3-vertex-connected and 3-edge-connected graph.} + +\medskip +From MathWorld \url{http://mathworld.wolfram.com/NauruGraph.html} + +\emph{The Nauru graph is the name given by Eppstein (2007) to the generalized Petersen graph GP(12,5) , which is also cubic symmetric graph , the permutation star graph of order 4, and the incidence graph of the Coxeter configuration. The name derives from the resemblance of the central star polygon in the generalized Petersen embedding to the 12-point star on the flag of the Pacific island nation of Nauru. The Nauru graph is graph illustrated below in one of his embeddings.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{NewMacroBox} + +\subsection{\tkzname{Nauru graph}} + +It can be represented in LCF notation as $\big[5, −9, 7, −7, 9, −5\big]^4$ + +\tkzcname{grLCF[RA=5]\{5,9\}\{7\}} gives the result because $-5 = 9\ mod\ 14$. + +\subsection{\tkzname{Nauru graph with LCF notation}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \grLCF[RA=7]{5, −9, 7, −7, 9, −5}{4}% + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Pappus.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Pappus.tex new file mode 100644 index 0000000000..539790b1d9 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Pappus.tex @@ -0,0 +1,61 @@ +\newpage\section{Pappus} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––– Pappus ––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grPappus}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/PappusGraph.html} + +\emph{A cubic symmetric distance-regular graph on 18 vertices, illustrated below in three embeddings. It can be represented in LCF notation $[5,7,-7,7,-7,-5]^3$ (Frucht 1976).} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +From Wikipedia : \url{http://en.wikipedia.org/wiki/Pappus_graph} +\emph{In the mathematical field of graph theory, the Pappus graph is a 3-regular graph with 18 vertices and 27 edges, formed as the Levi graph of the Pappus configuration. It is a distance-regular graph, one of only 14 such cubic graphs according to Cubic symmetric graphs.} + +This macro can be used with three different forms. +\end{NewMacroBox} + +\bigskip + + +\subsection{\tkzname{Pappus Graph : form 1}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.7] + \GraphInit[vstyle=Art] + \grPappus[RA=7] +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Pappus Graph : form 2}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grPappus[form=2,RA=7,RB=5,RC=3] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Pappus Graph : form 3}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{gray}{blue} + \grPappus[form=3,RA=7,RB=5,RC=2.5] + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Petersen.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Petersen.tex new file mode 100644 index 0000000000..1029e3252d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Petersen.tex @@ -0,0 +1,175 @@ +%!TEX root = /Users/ego/Boulot/TKZ/tkz-berge/NamedGraphs/doc/NamedGraphs-main.tex +\newpage\section{Petersen}\label{petersen} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Petersen –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grPetersen}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/PetersenGraph.html} + +\emph{The Petersen graph is the graph , illustrated below in several embeddings, possessing 10 nodes, all of whose nodes have degree three. The Petersen graph is implemented in \tkzname{tkz-berge} as \tkzcname{grPetersen}. +The Petersen graph has girth 5, diameter 2, edge chromatic number 4, chromatic number 3.} + +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +From Wikipedia : \url{http://en.wikipedia.org/wiki/Petersen_graph} + +\emph{In graph theory, the Petersen graph is an undirected graph with 10 vertices and 15 edges. It is a small graph that serves as a useful example and counterexample for many problems in graph theory. The Petersen graph is named for Julius Petersen, who in 1898 constructed it to be the smallest bridgeless cubic graph with no three-edge-coloring. Although the graph is generally credited to Petersen, it had in fact first appeared 12 years earlier, in 1886.} + +This macro can be used with three different forms. +\end{NewMacroBox} + + \subsection{\tkzname{Petersen graph : form 1}} +\begin{center} +\begin{tkzexample}[latex=8cm] +\begin{tikzpicture}[scale=.8] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grPetersen[form=1,RA=5,RB=3]% + \end{tikzpicture} +\end{tkzexample} +\end{center} +\vfill\newpage +\subsection{\tkzname{Petersen graph : form 2}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grPetersen[form=2,RA=7,RB=3]% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Petersen graph : form 3}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grPetersen[form=3,RA=7]% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{The line graph of the Petersen graph}} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} +\GraphInit[vstyle=Art]\SetGraphArtColor{white}{blue} + \begin{scope}[rotate=-90] \grCirculant[RA=1.5,prefix=a]{5}{2}\end{scope} + \begin{scope}[rotate=-18] \grEmptyCycle[RA=4,prefix=b]{5}{2} \end{scope} + \begin{scope}[rotate=18] \grCycle[RA=7,prefix=c]{5} \end{scope} + \EdgeIdentity{a}{b}{5} + \EdgeIdentity{b}{c}{5} + \EdgeDoubleMod{b}{5}{0}{1}{a}{5}{2}{1}{5} + \EdgeDoubleMod{c}{5}{0}{1}{b}{5}{1}{1}{5} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Petersen Gen –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\begin{NewMacroBox}{grGeneralizedPetersen}{\oarg{RA=\meta{Number},RB=\meta{Number}}\var{integer}\var{integer}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/GeneralizedPetersenGraph.html} + +\emph{The generalized Petersen graph , also denoted $GP(n,k)$ , for $n \geq 3$ and $1\leq k \leq \lfloor (n-1)/2\rfloor $ is a graph consisting of an inner star polygon (circulant graph ) and an outer regular polygon (cycle graph ) with corresponding vertices in the inner and outer polygons connected with edges. has nodes and edges. The Petersen graph is implemented in \tkzname{tkz-berge} as \tkzcname{grGeneralizedPetersen}.} +\href{http://mathworld.wolfram.com/GeneralizedPetersenGraph.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +From Wikipedia : \url{http://en.wikipedia.org/wiki/Petersen_graph} +\emph{In 1950 H. S. M. Coxeter introduced a family of graphs generalizing the Petersen graph. These graphs are now called generalized Petersen graphs, a name given to them in 1969 by Mark Watkins. In Watkins' notation, $G(n,k)$ is a graph with vertex set\hfill\break + ${u_0, u_1,\dots, u_{n-1}, v_0, v_1, \dots, v_{n-1}}$\hfill\break +and edge set\hfill\break +${u_i u_{i+1}, u_i v_i, v_i u_{i+k}: i = 0,\dots,n-1}$\hfill\break +where subscripts are to be read modulo $n$ and $k<n/2$. Coxeter's notation for the same graph would be $\{n\}+\{n/k\}.$ +The Petersen Graph itself is $G(5,2)$ or $\{5\}+\{5/2\}$. +} + +This macro can be used with three different forms. +\end{NewMacroBox} + +\subsection{\tkzname{Generalized Petersen graph} GP(5,1)} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90,scale=.6] + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \renewcommand*{\VertexInnerSep}{4pt} + \grGeneralizedPetersen[RA=5,RB=2]{5}{1} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{The Petersen graph} GP(5,2)} + +\vspace*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \renewcommand*{\VertexInnerSep}{8pt} + \grGeneralizedPetersen[RA=7,RB=4]{5}{2} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Generalized Petersen graph} GP(6,2)} + +\vspace*{2cm}\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \renewcommand*{\VertexInnerSep}{8pt} + \grGeneralizedPetersen[RA=7,RB=4]{6}{2} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Generalized Petersen graph} GP(7,3)} + +\vspace*{2cm}\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \renewcommand*{\VertexInnerSep}{8pt} + \grGeneralizedPetersen[RA=7,RB=4]{7}{3} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Generalized Petersen graph} GP(11,5)} + +\vspace*{2cm}\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90] + \renewcommand*{\VertexInnerSep}{8pt} + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \grGeneralizedPetersen[RA=7,RB=4]{11}{5} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Platonic.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Platonic.tex new file mode 100644 index 0000000000..a29fcf126b --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Platonic.tex @@ -0,0 +1,338 @@ +%!TEX root = /Users/ego/Boulot/TKZ/tkz-berge/NamedGraphs/doc/NamedGraphs-main.tex +\newpage\section{ The five Platonics Graphs} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Platonic graphs –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +The Platonic Graphs are the graphs formed by the edges and vertices of the five regular Platonic solids. The five Platonics Graphs are illustrated below. + +\begin{enumerate} + \item tetrahedral + \item octahedral + \item cube + \item icosahedral + \item dodecahedral +\end{enumerate} + + +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grTetrahedral}{\oarg{RA=Number}} +From MathWord : \url{http://mathworld.wolfram.com/TetrahedralGraph.html} + +\emph{\tkzname{Tetrahedral Graph} is the unique polyhedral graph on four nodes which is also the complete graph and therefore also the wheel graph . It is implemented as \tkzcname{grTetrahedral}} +\href{http://mathworld.wolfram.com/TetrahedralGraph.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein} +} +It has : + +\begin{enumerate} + \item 4 nodes, + \item 6 edges, + \item graph diameter 1. +\end{enumerate} + +The Tetrahedral Graph is 3-Regular +\end{NewMacroBox} + +\subsection{\tkzname{Tetrahedral}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.6] + \GraphInit[vstyle=Shade] + \renewcommand*{\VertexInnerSep}{4pt} + \SetVertexNoLabel\SetGraphShadeColor{red!50}{black}{red} + \grTetrahedral[RA=5] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\clearpage\newpage +\subsection{\tkzname{Tetrahedral LCF embedding}} + +\vspace*{2cm} +\begin{center} + \begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=18] + \renewcommand*{\VertexInnerSep}{8pt} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{2,-2}{2} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\clearpage\newpage +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\begin{NewMacroBox}{grOctahedral}{\oarg{RA=\meta{Number},RB=\meta{Number}}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/OctahedralGraph.html} + +\emph{\tkzname{Octahedral Graph} is isomorphic to the circulant graph $CI_{[1,2]}(6)$ . Two embeddings of this graph are illustrated below. It is implemented as \tkzcname{grOctahedral} or as \tkzcname{grSQCycle\{6\}}.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +It has : + +\begin{enumerate} + \item 6 nodes, + \item 12 edges, + \item graph diameter 2. +\end{enumerate} + +\medskip + The Octahedral Graph is 4-Regular. +\end{NewMacroBox} + + +\medskip +\subsection{\tkzname{Octahedral}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grOctahedral[RA=6,RB=2] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage\null +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grSQCycle[RA=5]{6} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage\null +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\medskip +\begin{NewMacroBox}{grCubicalGraph}{\oarg{RA=\meta{Number},RB=\meta{Number}}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/CubicalGraph.html} + +\emph{\tkzname{Cubical Graph} is isomorphic to a generalized Petersen graph $PG_{[4,1]}$, to a bipartite Kneser graph , to a crown graph and it is equivalent to the Cycle Ladder $CL(4)$. Two embeddings of this graph are illustrated below. It is implemented as \tkzcname{grCubicalGraph} or \tkzcname{grPrism\{4\}}.} +\href{http://mathworld.wolfram.com/CubicalGraph.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +It has : + +\begin{enumerate} + \item 8 nodes, + \item 12 edges, + \item graph diameter 3. +\end{enumerate} + + The Cubical Graph is 3-Regular. +\end{NewMacroBox} + +\subsection{\tkzname{Cubical Graph : form 1}} +\begin{center} + \begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCubicalGraph[RA=5,RB=2] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage\null +\subsection{\tkzname{Cubical Graph : form 2}} +\begin{center} + \begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCubicalGraph[form=2,RA=7,RB=4] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Cubical LCF embedding}} + +\vspace*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=18] + \GraphInit[vstyle=Art]\renewcommand*{\VertexInnerSep}{8pt} + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{3,-3}{4} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\clearpage\newpage +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\begin{NewMacroBox}{grIcosahedral}{\oarg{RA=\meta{Number},RB=\meta{Number},RC=\meta{Number}}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/IcosahedralGraph.html} + +\emph{The \tkzname{Icosahedral Graph} is the Platonic graph whose nodes have the connectivity of the icosahedron, illustrated above in a number of embeddings. The icosahedral graph has 12 vertices and 30 edges. Since the icosahedral graph is regular and Hamiltonian, it has a generalized LCF notation.} +\href{http://mathworld.wolfram.com/IcosahedralGraph.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +It has : + +\begin{enumerate} + \item 12 nodes, + \item 30 edges, + \item graph diameter 3. +\end{enumerate} + +\medskip + The Icosahedral Graph is 5-Regular. +\end{NewMacroBox} + +\medskip + +\subsection{\tkzname{Icosahedral forme 1 }} + +\tikzstyle{EdgeStyle}= [thick,% + double = orange,% + double distance = 1pt] + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.8] + \GraphInit[vstyle=Art]\renewcommand*{\VertexInnerSep}{4pt} + \SetGraphArtColor{red}{orange} + \grIcosahedral[RA=5,RB=1] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\clearpage\newpage + +\subsection{\tkzname{Icosahedral forme 2 }} +\vspace*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=-30] + \GraphInit[vstyle=Art] \renewcommand*{\VertexInnerSep}{8pt} + \SetGraphArtColor{red!50}{orange} + \grIcosahedral[form=2,RA=8,RB=2,RC=.8] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage + +\subsection{\tkzname{Icosahedral} \tkzname{RA=1} et \tkzname{RB=7}} +\begin{center} +\begin{tkzexample}[vbox] + \begin{tikzpicture} + \GraphInit[vstyle=Art] \renewcommand*{\VertexInnerSep}{8pt} + \SetGraphArtColor{red!50}{orange} + \grIcosahedral[RA=1,RB=7] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\clearpage\newpage +\subsection{\tkzname{Icosahedral LCF embedding 1}} + +\vspace*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=18] + \GraphInit[vstyle=Art] \renewcommand*{\VertexInnerSep}{8pt} + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{-4,-3,4}{6} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\clearpage\newpage +\subsection{\tkzname{Icosahedral LCF embedding 2}} + +\vspace*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=18] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{-2,2,3}{6} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\clearpage\newpage +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\begin{NewMacroBox}{grDodecahedral}{\oarg{RA=\meta{Number},RB=\meta{Number},RC=\meta{Number},RD=\meta{Number}}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/DodecahedralGraph.html} + +\emph{The \tkzname{Icosahedral Graph} is the Platonic graph corresponding to the connectivity of the vertices of a dodecahedron, illustrated above in four embeddings. The left embedding shows a stereographic projection of the dodecahedron, the second an orthographic projection, the third is from Read and Wilson, and the fourth is derived from LCF notation.} +\href{http://mathworld.wolfram.com/DodecahedralGraph.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +It has : + +\begin{enumerate} + \item 20 nodes, + \item 30 edges, + \item graph diameter 5. +\end{enumerate} + +\medskip + The Dodecahedral Graph is 3-Regular. +\end{NewMacroBox} + +\medskip +\subsection{\tkzname{Dodecahedral}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=18,scale=.6] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{orange} + \grDodecahedral[RA=7,RB=4,RC=2,RD=1] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{\tkzname{Dodecahedral other embedding}} + +\vspace*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCycle[RA=7,prefix=a]{10} + \grSQCycle[RA=4,prefix=b]{10} + \foreach \v in {0,...,9} + {\Edge(a\v)(b\v)} + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage +\subsection{\tkzname{Dodecahedral LCF embedding}} + +\vspace*{2cm} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=18] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{10,7,4,-4,-7,10,-4,7,-7,4}{2} + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Robertson.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Robertson.tex new file mode 100644 index 0000000000..ce8807ce0b --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Robertson.tex @@ -0,0 +1,243 @@ +\newpage\section{Robertson}\label{robertson} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Robertson –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grRobertson}{\oarg{options}\var{$k$}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/RobertsonGraph.html} + +\medskip +\emph{The Robertson graph is the unique (4,5)-cage graph, illustrated below. It has 19 vertices and 38 edges. It has girth 5, diameter 3, chromatic number 3, and is a quartic graph.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\end{NewMacroBox} + +\subsection{\tkzname{Robertson graph with \tkzcname{grRobertson} }} + +The cage + +\medskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.6] + \GraphInit[vstyle=Art] + \SetGraphArtColor{black}{gray} + \grRobertson[RA=7] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +\clearpage\newpage +\subsection{\tkzname{Fine embedding of the Robertson graph from RV}} + +\begin{center} + \begin{tikzpicture}[scale=.8] + \tikzstyle{TempEdgeStyle}= [thick,black,% + double = gray,% + double distance = 1.5pt]% + \SetVertexNoLabel + \renewcommand*{\VertexBigMinSize}{10pt} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \SetUpEdge[style = {thick,% + double = orange,% + double distance = 1pt}] + \SetGraphShadeColor{gray}{black}{gray} + \tikzstyle{EdgeStyle} = [TempEdgeStyle] + \begin{scope}[rotate=-30] + \grEmptyCycle[RA=5.4]{3} + \end{scope} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right=10] + \grCycle[prefix=b,RA=4]{12} + \tikzstyle{EdgeStyle}= [TempEdgeStyle] + \grCirculant[prefix=c,RA=2]{4}{2} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend left] + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{4}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right] + \EdgeDoubleMod{c}{4}{0}{1} + {b}{12}{8}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{11}{4}{3} + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{0}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend left=60] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{8}{4}{3} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right=60] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{2}{4}{3} + \tikzstyle{EdgeStyle}=[TempEdgeStyle,in=-50,out=-120, + relative,looseness=2.5] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{5}{4}{3} + \end{tikzpicture} +\end{center} + +\clearpage\newpage +Code for the Robertson Graph + +\medskip +\begin{tkzexample}[code only] +\begin{tikzpicture}[scale=.9] + \tikzstyle{TempEdgeStyle}= [thick,black,% + double = gray,% + double distance = 1.5pt]% + \SetVertexNoLabel + \renewcommand*{\VertexBigMinSize}{14pt} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \SetUpEdge[style = {thick,% + double = orange,% + double distance = 1pt}] + + \SetGraphShadeColor{gray}{black}{gray} + \tikzstyle{EdgeStyle} = [TempEdgeStyle] + \begin{scope}[rotate=-30] + \grEmptyCycle[RA=5.4]{3} + \end{scope} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right=10] + \grCycle[prefix=b,RA=4]{12} + \tikzstyle{EdgeStyle}= [TempEdgeStyle] + \grCirculant[prefix=c,RA=2]{4}{2} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend left] + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{4}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right] + \EdgeDoubleMod{c}{4}{0}{1} + {b}{12}{8}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{11}{4}{3} + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{0}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend left=60] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{8}{4}{3} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right=60] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{2}{4}{3} + \tikzstyle{EdgeStyle}=[TempEdgeStyle,in=-50,out=-120, + relative,looseness=2.5] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{5}{4}{3} + \end{tikzpicture} +\end{tkzexample} + +\clearpage\newpage +\subsection{\tkzname{Robertson graph with new styles}} + +The code with new styles, the result is on the next page. + +\bigskip +\begin{tkzexample}[code only] + \begin{tikzpicture}[scale=1] + \GraphInit[vstyle=Art] + \SetGraphArtColor{gray}{red} + \begin{scope}[rotate=-30] + \grEmptyCycle[RA=5]{3} + \end{scope} + {\tikzset{EdgeStyle/.append style = {bend right=10}} + \grCycle[prefix=b,RA=3.5]{12}} + \grCirculant[prefix=c,RA=2]{4}{2} + {\tikzset{EdgeStyle/.append style = {bend left}} + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{4}{3}{4}} + {\tikzset{EdgeStyle/.append style = {bend right}} + \EdgeDoubleMod{c}{4}{0}{1} + {b}{12}{8}{3}{4}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{11}{4}{3} + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{0}{3}{4} + {\tikzset{EdgeStyle/.append style = {bend left=60}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{8}{4}{3}} + {\tikzset{EdgeStyle/.append style = {bend right=60}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{2}{4}{3}} + {\tikzset{EdgeStyle/.append style = {in=-50,out=-120,% + relative,looseness=2.5}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{5}{4}{3}} + \end{tikzpicture} +\end{tkzexample} + +\begin{center} +\begin{tikzpicture}[scale=1] +\GraphInit[vstyle=Art] +\SetGraphArtColor{gray}{red} +\begin{scope}[rotate=-30] + \grEmptyCycle[RA=5]{3} +\end{scope} +{\tikzset{EdgeStyle/.append style = {bend right=10}} +\grCycle[prefix=b,RA=3.5]{12}} +\grCirculant[prefix=c,RA=2]{4}{2} +{\tikzset{EdgeStyle/.append style = {bend left}} +\EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{4}{3}{4}} +{\tikzset{EdgeStyle/.append style = {bend right}} + \EdgeDoubleMod{c}{4}{0}{1} + {b}{12}{8}{3}{4}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{11}{4}{3} + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{0}{3}{4} +{\tikzset{EdgeStyle/.append style = {bend left=60}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{8}{4}{3}} +{\tikzset{EdgeStyle/.append style = {bend right=60}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{2}{4}{3}} + {\tikzset{EdgeStyle/.append style = {in=-50,out=-120,% + relative,looseness=2.5}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{5}{4}{3}} +\end{tikzpicture} +\end{center} +\clearpage\newpage +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Robertson Wegner –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{NewMacroBox}{grRobertsonWegner}{\oarg{options}\var{$k$}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/Robertson-WegnerGraph.html} + +\medskip +\emph{he Robertson-Wegner graph is of the four (5,5)-cage graphs, also called Robertson's cage . Like the other (5,5)-cages, the Robertson-Wegner graph has 30 nodes. It has 75 edges, girth 5, diameter 3, and chromatic number 4.} +\href{http://mathworld.wolfram.com/Robertson-WegnerGraph.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\end{NewMacroBox} + +\subsection{\tkzname{Robertson-Wegner graph}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90,scale=.6] + \GraphInit[vstyle=Art] + \tikzset{VertexStyle/.append style={minimum size=2pt}} + \grRobertsonWegner[RA=6] + \end{tikzpicture} +\end{tkzexample} +\end{center} + +The next code gives the same result + +\begin{tkzexample}[code only] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \grLCF[RA=6]{6,12}{15} + \EdgeInGraphMod{a}{30}{9}{1}{6} \EdgeInGraphMod*{a}{30}{15}{2}{6} + \EdgeInGraphMod*{a}{30}{9}{3}{6} + \end{tikzpicture} +\end{tkzexample} + + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Tutte.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Tutte.tex new file mode 100644 index 0000000000..b97887549b --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Tutte.tex @@ -0,0 +1,44 @@ +\newpage\section{Tutte-Coxeter}\label{tutte} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––– Tutte –––––––––––––––––––––––––––––––> +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + + +\begin{NewMacroBox}{grTutteCoxeter}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/LeviGraph.html} + +\emph{The Levi graph is the unique (3,8)-cage graph and Moore graph. It is also distance-regular and is also called the Tutte-Coxeter graph or Tutte's 8-cage.} + +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\medskip +From Wikipedia : \url{http://en.wikipedia.org/wiki/Tutte–Coxeter_graph} + +\emph{In the mathematical field of graph theory, the Tutte–Coxeter graph or Tutte eight-cage is a 3-regular graph with 30 vertices and 45 edges. As the unique smallest cubic graph of girth 8 it is a cage and a Moore graph. It is bipartite, and can be constructed as the Levi graph of the generalized quadrangle. The graph is named after William Thomas Tutte and H. S. M. Coxeter; it was discovered by Tutte (1947) but its connection to geometric configurations was investigated by both authors in a pair of jointly published papers (Tutte 1958; Coxeter 1958a).} +\end{NewMacroBox} + +\subsection{\tkzname{Tutte-Coxeter graph (3,8)-cage or Levi graph}} +An other method to get the same result is~: + +\medskip +\begin{tkzexample}[code only] + \grLCF[RA=7]{-13,-9,7,-7,9,13}{5}\end{tkzexample} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.7] + \GraphInit[vstyle=Art] + \tikzset{VertexStyle/.append style={minimum size=2pt}} + \SetGraphArtColor{blue}{darkgray} + \grTutteCoxeter +\end{tikzpicture} +\end{tkzexample} + +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Wong.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Wong.tex new file mode 100644 index 0000000000..70441c32f2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Wong.tex @@ -0,0 +1,32 @@ +\newpage\section{Wong}\label{wong} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––-––––––––––––> +%<–––––––––––––––––––– Wong (5,5)-cages –––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––-–––––––> +\begin{NewMacroBox}{grWong}{\oarg{options}} + +\medskip +From MathWord : \url{http://mathworld.wolfram.com/WongGraph.html} + +\emph{The Wong graph is one of the four $(5,5)$-cage graphs. Like the other -cages, the Wong graph has 30 nodes. It has 75 edges, girth 5, diameter 3, chromatic number 4.} +\href{http://mathworld.wolfram.com/topics/GraphTheory.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{NewMacroBox} + + +\subsection{\tkzname{Wong graph}} +You can see the cage definition here : \ref{cage} + +\bigskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=90,scale=.6] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{blue} + \grWong[RA=7] + \end{tikzpicture} +\end{tkzexample} +\end{center} + + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-couverture.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-couverture.tex new file mode 100644 index 0000000000..b39cf6e625 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-couverture.tex @@ -0,0 +1,28 @@ +\thispagestyle{empty} +\null\vfill +\begin{center} +\textcolor{Brown}{\fontsize{30}{30}\selectfont{\upshape Gallery of named graphs}} + +\vspace{0.25cm} +\hfill\textcolor{Brown}{\fontsize{14}{14}\selectfont{\upshape with tkz-berge.sty by Alain Matthes}} +\end{center} + +\vspace{3cm} +\begin{tikzpicture}[scale=5] + \SetVertexNoLabel + \tikzstyle{VertexStyle} = [draw, + shape = circle, + shading = ball, + ball color = red!50, + inner sep = 10pt, + outer sep = 0pt] + \tikzstyle{EdgeStyle} = [thick,line width= 2pt,color=red] + \draw[fill = white,color = white] circle (0.55cm); + \draw (0,0) node[circle,draw,shade, + ball color = orange, + minimum size = 3cm] (am){\textbf{AlterMundus}}; + \grIcosahedral[RA=1.4,RB=0.8] +\end{tikzpicture} +\vfill\newpage\null\thispagestyle{empty} +\endinput + diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-main.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-main.tex new file mode 100644 index 0000000000..cfb4ba47ea --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-main.tex @@ -0,0 +1,192 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% NamedGraphs encodage : utf8 % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Créé par Alain Matthes le 14/03/2007 % +% Copyright (c) 2021 __AlterMundus__ All rights reserved. % +% version : 1.1 % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License , either version 1.3 +% of this license or (at your option) any later version and/or +% 2. under the GNU Public License. +% See http://www.latex-project.org/lppl.txt for details. +% graphs from graph theory + +\documentclass[DIV = 14, + fontsize = 10, + headinclude = false, + footinclude = false, + index = totoc, + twoside, + headings = small]{tkz-doc} +\usepackage{etoc} +\gdef\tkznameofpack{NamedGraphs} +\gdef\tkzversionofpack{1.1} +\gdef\tkzdateofpack{2021/01/18} +\gdef\tkznameofdoc{NamedGraphs} +\gdef\tkzversionofdoc{1.1} +\gdef\tkzdateofdoc{2021/01/18} +\gdef\tkzauthorofpack{Alain Matthes} +\gdef\tkzadressofauthor{} +\gdef\tkznamecollection{AlterMundus} +\gdef\tkzurlauthor{} +\gdef\tkzengine{lualatex} +\gdef\tkzurlauthorcom{http://altermundus.fr} + + +% -- Packages --------------------------------------------------- +\usepackage[dvipsnames,svgnames]{xcolor} +\usepackage{calc} +\usepackage{tkz-berge} +\usetikzlibrary{calc,positioning,shapes} +\usepackage[colorlinks]{hyperref} +\hypersetup{ + linkcolor=Gray, + citecolor=Green, + filecolor=Mulberry, + urlcolor=NavyBlue, + menucolor=Gray, + runcolor=Mulberry, + linkbordercolor=Gray, + citebordercolor=Green, + filebordercolor=Mulberry, + urlbordercolor=NavyBlue, + menubordercolor=Gray, + runbordercolor=Mulberry, + pdfsubject={Euclidean Geometry}, + pdfauthor={\tkzauthorofpack}, + pdftitle={\tkznameofpack}, + pdfcreator={\tkzengine} +} + +\usepackage{tkzexample} + +%\usepackage[saved]{tkzexample} +%\def\tkzFileSavedPrefix{tkzNamed} +\usepackage{fontspec} +\setmainfont{texgyrepagella}% + [Extension = .otf , + UprightFont = *-regular, + ItalicFont = *-italic, + BoldFont = *-bold, + BoldItalicFont = *-bolditalic] +\setsansfont{texgyreheros}[ + Extension = .otf, + UprightFont = *-regular , + ItalicFont = *-italic , + BoldFont = *-bold , + BoldItalicFont = *-bolditalic , +] + +\setmonofont{lmmono10-regular.otf}[ + Numbers={Lining,SlashedZero}, + ItalicFont=lmmonoslant10-regular.otf, + BoldFont=lmmonolt10-bold.otf, + BoldItalicFont=lmmonolt10-boldoblique.otf, +] +\newfontfamily\ttcondensed{lmmonoltcond10-regular.otf} +%% (La)TeX font-related declarations: +\linespread{1.05} % Pagella needs more space between lines + +\usepackage{unicode-math} +\usepackage{fourier-otf,zorna} +\usepackage{datetime,multicol,lscape} +\usepackage[french]{babel} +\usepackage[autolanguage]{numprint} +\usepackage{microtype} +\usepackage{array,multirow,multido,booktabs} +\usepackage{shortvrb,fancyvrb} +\usepackage{fancybox} +\usepackage{stmaryrd} +\usepackage{xkeyval,array} +\usepackage[weather]{ifsym} +\RequirePackage{makeidx} +\makeindex + + +\title{The package : NamedGraphs} +\author{Alain Matthes} + +\AtBeginDocument{\MakeShortVerb{\|}} + + + + +%<---------------------------------------------------------------------------> +\begin{document} +\parindent=0pt +\author{\tkzauthorofpack} +\title{\tkznameofpack} +\date{\today} +\clearpage +\thispagestyle{empty} +\maketitle + +\clearpage + + +\nameoffile{\tkznameofpack} + +\defoffile{\tkzname{NamedGraphs.pdf} is not a beginner or advanced tutorial, not a study of graphs, it's only a gallery of undirected graphs made with the package \tkzname{tkz-berge.sty}. Some of graphs have names, sometimes inspired by the graph's topology, and sometimes after their discoverer. \textbf{NamedGraphs.pdf} presents some of them. A lot of references can be found here \url{http://mathworld.wolfram.com} +} + +\presentation + +\vspace{1cm} + +\tkzHand Firstly, I would like to thank \textbf{Till Tantau} for the beautiful LATEX package, namely TikZ. + +\tkzHand I am grateful to \textbf{Michel Bovani} for providing the \tkzname{fourier} font. + +\tkzHand I received much valuable advice and guidance on Graph Theory from \textbf{Rafael Villarroel}\\ \url{http://graphtheoryinlatex.blogspot.com/}. + +\tkzHand The names of graphs can be found here \href{http://mathworld.wolfram.com/topics/SimpleGraphs.html}% + {\textcolor{blue}{MathWorld}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + + +\clearpage +\tableofcontents + +\clearpage\newpage + +\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} + +\input{NamedGraphs-Andrasfai.tex} +\input{NamedGraphs-Balaban.tex} +\input{NamedGraphs-Bipartite.tex} +\input{NamedGraphs-Bull.tex} +\input{NamedGraphs-Cage.tex} +\input{NamedGraphs-Cocktail_Party.tex} +\input{NamedGraphs-Coxeter.tex} +\input{NamedGraphs-Chvatal.tex} +\input{NamedGraphs-Crown.tex} +\input{NamedGraphs-Cubicsymmetric.tex} +\input{NamedGraphs-Desargues.tex} +\input{NamedGraphs-Doyle.tex} +\input{NamedGraphs-Folkman.tex} +\input{NamedGraphs-Foster.tex} +\input{NamedGraphs-Franklin.tex} +\input{NamedGraphs-Gray.tex} +\input{NamedGraphs-Groetzsch.tex} +\input{NamedGraphs-Heawood.tex} +\input{NamedGraphs-Hypercube.tex} +\input{NamedGraphs-Koenisberg.tex} +\input{NamedGraphs-Levi.tex} +\input{NamedGraphs-Mcgee.tex} +\input{NamedGraphs-Moebius.tex} +\input{NamedGraphs-Pappus.tex} +\input{NamedGraphs-Petersen.tex} +\input{NamedGraphs-Platonic.tex} +\input{NamedGraphs-Robertson.tex} +\input{NamedGraphs-Tutte.tex} +\input{NamedGraphs-Wong.tex} + +\clearpage\newpage +\printindex +\end{document} + diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-1-0.tex new file mode 100644 index 0000000000..41f9be6502 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-1-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.7] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grAndrasfai[RA=7]{7} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-2-0.tex new file mode 100644 index 0000000000..b9382cd185 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-2-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grAndrasfai[RA=7]{8} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-3-0.tex new file mode 100644 index 0000000000..36ce893fe1 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-1-3-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grAndrasfai[RA=7]{9} +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-10-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-10-1-0.tex new file mode 100644 index 0000000000..3d0e57f776 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-10-1-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \SetVertexNoLabel + \grLCF[RA=6]{3,-3}{4} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-10-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-10-2-0.tex new file mode 100644 index 0000000000..1078db0a10 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-10-2-0.tex @@ -0,0 +1,24 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \tikzstyle{VertexStyle} = [shape = circle,% + color = white, + fill = black, + very thin, + inner sep = 0pt,% + minimum size = 18pt, + draw] + \tikzstyle{EdgeStyle} = [thick,% + double = brown,% + double distance = 1pt] + \grLCF[Math,RA=6]{3,-3}{4} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-1-0.tex new file mode 100644 index 0000000000..57bf074287 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-1-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.6] + \grDesargues[Math,RA=6] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-2-0.tex new file mode 100644 index 0000000000..7802a9c2ae --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-2-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grDesargues[form=2,Math,RA=7] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-3-0.tex new file mode 100644 index 0000000000..7d43cca61b --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-3-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \grLCF[Math,RA=6]{5,-5,9,-9}{5} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-4-0.tex new file mode 100644 index 0000000000..3b894009c2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-11-4-0.tex @@ -0,0 +1,24 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \tikzstyle{VertexStyle} = [shape = circle,% + color = white, + fill = black, + very thin, + inner sep = 0pt,% + minimum size = 18pt, + draw] + \tikzstyle{EdgeStyle} = [thick,% + double = brown,% + double distance = 1pt] + \grGeneralizedPetersen[Math,RA=6]{10}{3} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-1-0.tex new file mode 100644 index 0000000000..aaad85f436 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-1-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.6] + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{red}{Maroon}{fondpaille} + \SetVertexNoLabel + \grDoyle[RA=7,RB=5,RC=3] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-2-0.tex new file mode 100644 index 0000000000..f70511ef9c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-2-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{red}{Magenta}{white} + \SetVertexNoLabel + \grDoyle[form=2,RA=7] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-3-0.tex new file mode 100644 index 0000000000..40c9d752a7 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-3-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \SetGraphArtColor{red}{Magenta}{red} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grDoyle[form=3,RA=7,RB=2] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-4-0.tex new file mode 100644 index 0000000000..3199fdf61a --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-12-4-0.tex @@ -0,0 +1,27 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.6] + \tikzstyle{VertexStyle} = [shape = circle, + ball color = gray!60, + minimum size = 16pt,draw] + \tikzstyle{EdgeStyle} = [thick,color=black,% + double = orange,% + double distance = 1pt] + \SetVertexNoLabel + \grCycle[RA=7.5]{9} + \grEmptyCycle[prefix=b,RA=5.5]{9} + \grCirculant[prefix=c,RA=3.5]{9}{4} + \EdgeIdentity{b}{c}{9} + \EdgeMod{a}{c}{9}{1} + \EdgeMod{a}{b}{9}{1} + \EdgeInGraphMod{b}{9}{2} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-1-0.tex new file mode 100644 index 0000000000..80fb682723 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-1-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.8] + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue}{darkgray} + \grFolkman[RA=6] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-2-0.tex new file mode 100644 index 0000000000..c4ced93e3a --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-2-0.tex @@ -0,0 +1,28 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=45]% + \tikzstyle{VertexStyle} = [shape = circle, + shading = ball, + ball color = gray!60, + inner sep = 3pt, + draw] + \tikzstyle{EdgeStyle} = [thick,orange] + \SetVertexNoLabel + \grCycle[prefix=a,RA=3]{4}% + \grCycle[prefix=b,RA=4]{4}% + \grCycle[prefix=c,RA=5]{4}% + \grCycle[prefix=d,RA=6]{4}% + \grCycle[prefix=e,RA=7]{4}% + \foreach \r/\s/\t in {a/d/e,b/e/a,c/a/b,d/b/c,e/c/d}{% + \Edges(\r0,\s1,\r2,\t3,\r0) + } + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-3-0.tex new file mode 100644 index 0000000000..08f313a205 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-3-0.tex @@ -0,0 +1,30 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} +\begin{scope}[shift={(1,1)},rotate=45]\grEmptyPath[prefix=a,RA=1]{5} + \end{scope} +\begin{scope}[shift={(-1,1)},rotate=135]\grEmptyPath[prefix=b,RA=1]{5} + \end{scope} +\begin{scope}[shift={(-1,-1)},rotate=225]\grEmptyPath[prefix=c,RA=1]{5} + \end{scope} +\begin{scope}[shift={(1,-1)},rotate=315]\grEmptyPath[prefix=d,RA=1]{5} + \end{scope} + \EdgeIdentity*{a}{b}{0,...,4} \EdgeIdentity*{b}{c}{0,...,4} + \EdgeIdentity*{c}{d}{0,...,4} \EdgeIdentity*{d}{a}{0,...,4} + \EdgeDoubleMod{a}{5}{0}{1}{b}{5}{3}{1}{1} + \EdgeDoubleMod{a}{5}{2}{1}{b}{5}{0}{1}{2} + \EdgeDoubleMod{a}{5}{1}{1}{d}{5}{0}{1}{3} + \EdgeDoubleMod{c}{5}{2}{1}{b}{5}{0}{1}{2} + \EdgeDoubleMod{c}{5}{0}{1}{b}{5}{3}{1}{1} + \EdgeDoubleMod{c}{5}{1}{1}{d}{5}{0}{1}{3} + \Edges(a0,d4,c0) + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-4-0.tex new file mode 100644 index 0000000000..75f7017f00 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-13-4-0.tex @@ -0,0 +1,28 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.8] + \SetVertexNoLabel + \tikzstyle{VertexStyle} = [shape = circle, + shading = ball, + ball color = gray!60, + inner sep = 3pt, + draw] + \tikzstyle{EdgeStyle} = [thick,orange] + \grEmptyCycle[prefix=a,RA=1.85]{5} \grEmptyCycle[prefix=b,RA=3.7]{5} + \grCycle[prefix=c,RA=6]{10} + \EdgeDoubleMod{a}{5}{0}{1}{b}{5}{1}{1}{4} + \EdgeDoubleMod{a}{5}{0}{1}{b}{5}{4}{1}{4} + \EdgeDoubleMod{b}{5}{0}{1}{c}{10}{9}{2}{4} + \EdgeDoubleMod{b}{5}{0}{1}{c}{10}{1}{2}{4} + \EdgeDoubleMod{a}{5}{0}{1}{c}{10}{8}{2}{4} + \EdgeDoubleMod{a}{5}{0}{1}{c}{10}{2}{2}{4} +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-14-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-14-1-0.tex new file mode 100644 index 0000000000..1ee8a1a8c1 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-14-1-0.tex @@ -0,0 +1,19 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.6] + \renewcommand*{\VertexInnerSep}{2pt} + \renewcommand*{\EdgeLineWidth}{0.5pt} + \GraphInit[vstyle=Art] + \tikzset{VertexStyle/.append style={minimum size=2pt}} + \SetGraphColor{red}{blue} + \grLCF[Math,RA=6]{17, -9, 37, -37, 9, -17}{15} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-1-0.tex new file mode 100644 index 0000000000..601154c67c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-1-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.7] + \grFranklin[Math,RA=7] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-2-0.tex new file mode 100644 index 0000000000..f677961191 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-2-0.tex @@ -0,0 +1,21 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grCycle[Math,RA=4,prefix=a]{6} + \grCycle[Math,RA=6,prefix=b]{6} + \foreach \x in {0,...,5}{% + \ifthenelse{\isodd{\x}}{% + \pgfmathsetcounter{tempi}{\x-1}}{% + \pgfmathsetcounter{tempi}{\x+1}} + \Edge(a\x)(b\thetempi) +} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-3-0.tex new file mode 100644 index 0000000000..9ea14cf74c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-15-3-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grLCF[Math,RA=7]{-5,-3,3,5}{3} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-16-0-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-16-0-0.tex new file mode 100644 index 0000000000..05c9d2ec50 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-16-0-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \SetGraphArtColor{gray}{red} + \grLCF[Math,RA=6]{-25,7,-7,13,-13,25}{9} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-1-0.tex new file mode 100644 index 0000000000..9b75eea077 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-1-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \grGrotzsch[RA=3,RB=6]{6}% + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-2-0.tex new file mode 100644 index 0000000000..994cef0a79 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-2-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grGrotzsch[form=2,RA=6,RB=3]{6}% + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-3-0.tex new file mode 100644 index 0000000000..9994c13ae6 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-17-3-0.tex @@ -0,0 +1,24 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture}[rotate=-18] + \draw[scale=.5,samples at={-6.4,-6.3,...,6.4}, + smooth,thick, + variable=\t, + double= red, + double distance = 1pt] + plot ({3*(1.5*cos(\t r) +3*cos(1.5*\t r))},% + {3*(1.5*sin(\t r) -3*sin(1.5*\t r))}); + \begin{scope}[rotate=36] + \grStar[prefix=a,RA=2.2]{6}% + \grEmptyCycle[prefix=b,RA=4.4]{5}% + \end{scope} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-18-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-18-1-0.tex new file mode 100644 index 0000000000..66782736c6 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-18-1-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}% + \GraphInit[vstyle=Shade] + \grHeawood[RA=7] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-18-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-18-2-0.tex new file mode 100644 index 0000000000..05e2c80afb --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-18-2-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \grLCF[RA=7]{5,9}{7}% + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-19-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-19-1-0.tex new file mode 100644 index 0000000000..a320c8bc94 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-19-1-0.tex @@ -0,0 +1,26 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grCycle[RA=8]{8} + \pgfmathparse{8*(1-4*sin(22.5)*sin(22.5))} + \let\tkzbradius\pgfmathresult + \grCirculant[prefix=b,RA=\tkzbradius]{8}{3} + \makeatletter + \foreach \vx in {0,...,7}{% + \pgfmathsetcounter{tkz@gr@n}{mod(\vx+1,8)} + \pgfmathsetcounter{tkz@gr@a}{mod(\vx+7,8)} + \pgfmathsetcounter{tkz@gr@b}{mod(\thetkz@gr@n+1,8)} + \Edge(a\thetkz@gr@n)(b\thetkz@gr@b) + \Edge(b\thetkz@gr@a)(a\vx) + } + \makeatother +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-1-0.tex new file mode 100644 index 0000000000..092d89b07f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-1-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture}[scale=.6] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grBalaban[form=1,RA=7,RB=3,RC=3] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-2-0.tex new file mode 100644 index 0000000000..6d8375a0b8 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-2-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{gray}{blue!50} + \grBalaban[form=2,RA=7,RB=7,RC=4,RD=2.5] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-3-0.tex new file mode 100644 index 0000000000..7280fbab94 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-3-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{brown}{orange} + \grBalaban[form=3,RA=7,RB=6.5,RC=5.6,RD=5.6,RE=4.6] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-4-0.tex new file mode 100644 index 0000000000..1dcae5cf4d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-2-4-0.tex @@ -0,0 +1,25 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture}[scale=.7] + \renewcommand*{\VertexInnerSep}{3pt} + \renewcommand*{\VertexLineWidth}{0.4pt} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{blue!50!black} + \grLCF[Math,RA=7]{% + 44,26,-47,-15,35,-39,11,-27,38,-37,43,14,28,51,-29,-16,41,-11,% + -26,15,22,-51,-35,36,52,-14,-33,-26,-46,52,26,16,43,33,-15,% + 17,-53,23,-42,-35,-28,30,-22, 45,-44,16,-38,-16,50,-55,20,28,% + -17,-43,47, 34,-26,-41,11,-36,-23,-16,41,17,-51,26,-33,47,17,% + -11,-20 ,-30,21,29,36,-43,-52,10,39,-28,-17,-52,51,26,37,-17,% + 10,-10,-45,-34,17,-26,27,-21,46,53,-10,29,-50,35,15,-47,-29,-41,% + 26,33,55,-17,42,-26,-36,16}{1} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-20-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-20-1-0.tex new file mode 100644 index 0000000000..28bcd3b3f3 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-20-1-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture}[node distance=4cm] + \grKonisberg + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-20-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-20-2-0.tex new file mode 100644 index 0000000000..1c140d8925 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-20-2-0.tex @@ -0,0 +1,33 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \renewcommand*{\VertexBallColor}{orange!50!red} + \renewcommand*{\EdgeDoubleDistance}{2pt} + \SetGraphUnit{4} + \GraphInit[vstyle=Shade] + \tikzset{LabelStyle/.style = {draw, + fill = yellow, + text = red}} + \Vertex{A} + \EA(A){B} + \EA(B){C} + {\SetGraphUnit{8} + \NO(B){D}} + \Edge[label=1](B)(D) + \tikzset{EdgeStyle/.append style = {bend left}} + \Edge[label=4](A)(B) + \Edge[label=5](B)(A) + \Edge[label=6](B)(C) + \Edge[label=7](C)(B) + \Edge[label=2](A)(D) + \Edge[label=3](D)(C) + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-0-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-0-0.tex new file mode 100644 index 0000000000..386b996553 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-0-0.tex @@ -0,0 +1,11 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-1-0.tex new file mode 100644 index 0000000000..bd00b63a4f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-1-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \grLCF[prefix=a,RA=6]{-13,-9,7,-7,9,13}{5} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-2-0.tex new file mode 100644 index 0000000000..5b4f3141e3 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-21-2-0.tex @@ -0,0 +1,19 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCycle[prefix=a,RA=7]{10} + \EdgeInGraphMod{a}{10}{5} + \grEmptyCycle[prefix=b,RA=5]{10} + \grEmptyCycle[prefix=c,RA=3]{10} + \EdgeInGraphMod{c}{10}{4} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-1-0.tex new file mode 100644 index 0000000000..5038b00b0e --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-1-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \grMcGee[Math,RA=6] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-2-0.tex new file mode 100644 index 0000000000..1e50d3d40e --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-2-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \grLCF[Math,RA=6]{-12,-6,6,-12,7,-7,-12,6,-6,-12,7,-7}{2} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-3-0.tex new file mode 100644 index 0000000000..51d446b811 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-22-3-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \grLCF[Math,RA=6]{-12,6,-7,-12,7,-8,11,-6,6,-11,8,% + -7,-12,7,-6,-12,7,-11,-8,7,-7,8,11,-7}{1} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-1-0.tex new file mode 100644 index 0000000000..d8d3151877 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-1-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphArtColor{red}{olive} + \SetVertexNoLabel + \grMobiusKantor[RA=7] +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-2-0.tex new file mode 100644 index 0000000000..d05ad25be3 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-2-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=22.5] + \GraphInit[vstyle=Shade] + \SetGraphArtColor{red!50}{brown!50} + \SetVertexNoLabel + \grMobiusKantor[form=2,RA=7,RB=3] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-3-0.tex new file mode 100644 index 0000000000..9b3892a74d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-3-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grMobiusKantor[form=3,RA=7,RB=2] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-4-0.tex new file mode 100644 index 0000000000..e9fcbbd8dc --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-4-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grLCF[RA=7]{5,-5}{8} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-5-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-5-0.tex new file mode 100644 index 0000000000..7dddbf751c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-5-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grGeneralizedPetersen[RA=7,RB=4]{8}{3} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-6-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-6-0.tex new file mode 100644 index 0000000000..40ab948db1 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-6-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grMobiusLadder[RA=7,RB=2]{8}% + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-7-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-7-0.tex new file mode 100644 index 0000000000..f1f0448ac3 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-23-7-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grCirculant[RA=7]{16}{1,8}% +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-1-0.tex new file mode 100644 index 0000000000..b4185cf645 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-1-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.7] + \GraphInit[vstyle=Art] + \grPappus[RA=7] +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-2-0.tex new file mode 100644 index 0000000000..590ac78fcb --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-2-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grPappus[form=2,RA=7,RB=5,RC=3] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-3-0.tex new file mode 100644 index 0000000000..d828fd4bb2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-24-3-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{gray}{blue} + \grPappus[form=3,RA=7,RB=5,RC=2.5] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-1-0.tex new file mode 100644 index 0000000000..bb01c70ff8 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-1-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.8] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grPetersen[form=1,RA=5,RB=3]% + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-2-0.tex new file mode 100644 index 0000000000..9b5b33350d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-2-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grPetersen[form=2,RA=7,RB=3]% +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-3-0.tex new file mode 100644 index 0000000000..ee2317b7c9 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-3-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}% + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{olive} + \grPetersen[form=3,RA=7]% +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-4-0.tex new file mode 100644 index 0000000000..71a2ed9398 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-4-0.tex @@ -0,0 +1,21 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} +\GraphInit[vstyle=Art]\SetGraphArtColor{white}{blue} + \begin{scope}[rotate=-90] \grCirculant[RA=1.5,prefix=a]{5}{2}\end{scope} + \begin{scope}[rotate=-18] \grEmptyCycle[RA=4,prefix=b]{5}{2} \end{scope} + \begin{scope}[rotate=18] \grCycle[RA=7,prefix=c]{5} \end{scope} + \EdgeIdentity{a}{b}{5} + \EdgeIdentity{b}{c}{5} + \EdgeDoubleMod{b}{5}{0}{1}{a}{5}{2}{1}{5} + \EdgeDoubleMod{c}{5}{0}{1}{b}{5}{1}{1}{5} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-5-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-5-0.tex new file mode 100644 index 0000000000..bd84e43583 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-5-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90,scale=.6] + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \renewcommand*{\VertexInnerSep}{4pt} + \grGeneralizedPetersen[RA=5,RB=2]{5}{1} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-6-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-6-0.tex new file mode 100644 index 0000000000..4c83f7904a --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-6-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \renewcommand*{\VertexInnerSep}{8pt} + \grGeneralizedPetersen[RA=7,RB=4]{5}{2} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-7-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-7-0.tex new file mode 100644 index 0000000000..09669b469f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-7-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \renewcommand*{\VertexInnerSep}{8pt} + \grGeneralizedPetersen[RA=7,RB=4]{6}{2} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-8-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-8-0.tex new file mode 100644 index 0000000000..84fca5f647 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-8-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \renewcommand*{\VertexInnerSep}{8pt} + \grGeneralizedPetersen[RA=7,RB=4]{7}{3} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-9-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-9-0.tex new file mode 100644 index 0000000000..14cbf67b37 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-25-9-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \renewcommand*{\VertexInnerSep}{8pt} + \GraphInit[vstyle=Art]\SetGraphArtColor{red}{olive} + \grGeneralizedPetersen[RA=7,RB=4]{11}{5} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-1-0.tex new file mode 100644 index 0000000000..900f4816b6 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-1-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.6] + \GraphInit[vstyle=Shade] + \renewcommand*{\VertexInnerSep}{4pt} + \SetVertexNoLabel\SetGraphShadeColor{red!50}{black}{red} + \grTetrahedral[RA=5] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-10-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-10-0.tex new file mode 100644 index 0000000000..947532725c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-10-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=18] + \GraphInit[vstyle=Art] \renewcommand*{\VertexInnerSep}{8pt} + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{-4,-3,4}{6} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-11-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-11-0.tex new file mode 100644 index 0000000000..ead99f0ad2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-11-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=18] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{-2,2,3}{6} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-12-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-12-0.tex new file mode 100644 index 0000000000..03df840244 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-12-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=18,scale=.6] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{orange} + \grDodecahedral[RA=7,RB=4,RC=2,RD=1] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-13-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-13-0.tex new file mode 100644 index 0000000000..d9a593527c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-13-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grCycle[RA=7,prefix=a]{10} + \grSQCycle[RA=4,prefix=b]{10} + \foreach \v in {0,...,9} + {\Edge(a\v)(b\v)} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-14-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-14-0.tex new file mode 100644 index 0000000000..2c0e1e8884 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-14-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=18] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{10,7,4,-4,-7,10,-4,7,-7,4}{2} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-2-0.tex new file mode 100644 index 0000000000..11d26edb65 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-2-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=18] + \renewcommand*{\VertexInnerSep}{8pt} + \GraphInit[vstyle=Art] + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{2,-2}{2} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-3-0.tex new file mode 100644 index 0000000000..f4ba7fe93a --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-3-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grSQCycle[RA=5]{6} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-4-0.tex new file mode 100644 index 0000000000..781f7c76ef --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-4-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grCubicalGraph[RA=5,RB=2] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-5-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-5-0.tex new file mode 100644 index 0000000000..fa89a71cea --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-5-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grCubicalGraph[form=2,RA=7,RB=4] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-6-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-6-0.tex new file mode 100644 index 0000000000..739c2e87ba --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-6-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=18] + \GraphInit[vstyle=Art]\renewcommand*{\VertexInnerSep}{8pt} + \SetGraphArtColor{red!50}{orange} + \grLCF[RA=7]{3,-3}{4} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-7-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-7-0.tex new file mode 100644 index 0000000000..44f280b936 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-7-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.8] + \GraphInit[vstyle=Art]\renewcommand*{\VertexInnerSep}{4pt} + \SetGraphArtColor{red}{orange} + \grIcosahedral[RA=5,RB=1] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-8-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-8-0.tex new file mode 100644 index 0000000000..688cd51d4e --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-8-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=-30] + \GraphInit[vstyle=Art] \renewcommand*{\VertexInnerSep}{8pt} + \SetGraphArtColor{red!50}{orange} + \grIcosahedral[form=2,RA=8,RB=2,RC=.8] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-9-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-9-0.tex new file mode 100644 index 0000000000..96af13b98d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-26-9-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \GraphInit[vstyle=Art] \renewcommand*{\VertexInnerSep}{8pt} + \SetGraphArtColor{red!50}{orange} + \grIcosahedral[RA=1,RB=7] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-1-0.tex new file mode 100644 index 0000000000..a9a3824767 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-1-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.6] + \GraphInit[vstyle=Art] + \SetGraphArtColor{black}{gray} + \grRobertson[RA=7] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-2-0.tex new file mode 100644 index 0000000000..d633023fc9 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-2-0.tex @@ -0,0 +1,54 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.9] + \tikzstyle{TempEdgeStyle}= [thick,black,% + double = gray,% + double distance = 1.5pt]% + \SetVertexNoLabel + \renewcommand*{\VertexBigMinSize}{14pt} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \SetUpEdge[style = {thick,% + double = orange,% + double distance = 1pt}] + + \SetGraphShadeColor{gray}{black}{gray} + \tikzstyle{EdgeStyle} = [TempEdgeStyle] + \begin{scope}[rotate=-30] + \grEmptyCycle[RA=5.4]{3} + \end{scope} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right=10] + \grCycle[prefix=b,RA=4]{12} + \tikzstyle{EdgeStyle}= [TempEdgeStyle] + \grCirculant[prefix=c,RA=2]{4}{2} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend left] + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{4}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right] + \EdgeDoubleMod{c}{4}{0}{1} + {b}{12}{8}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{11}{4}{3} + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{0}{3}{4} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend left=60] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{8}{4}{3} + \tikzstyle{EdgeStyle}= [TempEdgeStyle,bend right=60] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{2}{4}{3} + \tikzstyle{EdgeStyle}=[TempEdgeStyle,in=-50,out=-120, + relative,looseness=2.5] + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{5}{4}{3} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-3-0.tex new file mode 100644 index 0000000000..3c65413dd2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-3-0.tex @@ -0,0 +1,41 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture}[scale=1] + \GraphInit[vstyle=Art] + \SetGraphArtColor{gray}{red} + \begin{scope}[rotate=-30] + \grEmptyCycle[RA=5]{3} + \end{scope} + {\tikzset{EdgeStyle/.append style = {bend right=10}} + \grCycle[prefix=b,RA=3.5]{12}} + \grCirculant[prefix=c,RA=2]{4}{2} + {\tikzset{EdgeStyle/.append style = {bend left}} + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{4}{3}{4}} + {\tikzset{EdgeStyle/.append style = {bend right}} + \EdgeDoubleMod{c}{4}{0}{1} + {b}{12}{8}{3}{4}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{11}{4}{3} + \EdgeDoubleMod{c}{4}{0}{1}% + {b}{12}{0}{3}{4} + {\tikzset{EdgeStyle/.append style = {bend left=60}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{8}{4}{3}} + {\tikzset{EdgeStyle/.append style = {bend right=60}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{2}{4}{3}} + {\tikzset{EdgeStyle/.append style = {in=-50,out=-120,% + relative,looseness=2.5}} + \EdgeDoubleMod{a}{3}{0}{1}% + {b}{12}{5}{4}{3}} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-4-0.tex new file mode 100644 index 0000000000..47e5975821 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-27-4-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Art] + \grLCF[RA=6]{6,12}{15} + \EdgeInGraphMod{a}{30}{9}{1}{6} \EdgeInGraphMod*{a}{30}{15}{2}{6} + \EdgeInGraphMod*{a}{30}{9}{3}{6} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-28-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-28-1-0.tex new file mode 100644 index 0000000000..544c5bc8f0 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-28-1-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=.7] + \GraphInit[vstyle=Art] + \tikzset{VertexStyle/.append style={minimum size=2pt}} + \SetGraphArtColor{blue}{darkgray} + \grTutteCoxeter +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-29-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-29-1-0.tex new file mode 100644 index 0000000000..ab8e9baade --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-29-1-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90,scale=.6] + \GraphInit[vstyle=Art] + \SetGraphArtColor{red}{blue} + \grWong[RA=7] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-1-0.tex new file mode 100644 index 0000000000..3adf1b2311 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-1-0.tex @@ -0,0 +1,19 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCompleteBipartite[RA=2,RB=2,RS=3]{3}{2} +\end{tikzpicture}\hspace*{2cm} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCompleteBipartite[RA=2,RB=2,RS=3]{3}{3} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-2-0.tex new file mode 100644 index 0000000000..64e9a64e8f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-2-0.tex @@ -0,0 +1,15 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=1.5] + \GraphInit[vstyle=Art] + \grCompleteBipartite[RA=3,RB=2,RS=5]{3}{5} +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-3-0.tex new file mode 100644 index 0000000000..f360ec4091 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-3-3-0.tex @@ -0,0 +1,39 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{6}{1,3} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{8}{1,3} +\end{tikzpicture} + +\vspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{10}{1,3,5} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3]{12}{1,3,5} +\end{tikzpicture} + +\vspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] +\grCirculant[RA=3]{14}{1,3,5,7} +\end{tikzpicture}\hspace*{12pt} +\begin{tikzpicture} + \GraphInit[vstyle=Art] +\grCirculant[RA=3]{16}{1,3,5,7} +\end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-4-0-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-4-0-0.tex new file mode 100644 index 0000000000..e3e58b3ce1 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-4-0-0.tex @@ -0,0 +1,22 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[node distance=4cm] + \GraphInit[vstyle=Shade] + \Vertex{a0} + \NOEA(a0){a2} + \NOEA(a2){a4} + \NOWE(a0){a1} + \NOWE(a1){a3} + \Edges(a0,a1,a3) + \Edges(a0,a2,a4) + \Edge(a1)(a2) + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-6-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-6-1-0.tex new file mode 100644 index 0000000000..0bc97c4694 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-6-1-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \grCocktailParty[RA=3,RS=5]{4} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-6-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-6-2-0.tex new file mode 100644 index 0000000000..89fb40d566 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-6-2-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \grCocktailParty[form=2,RA=4,RS=6]{4} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-1-0.tex new file mode 100644 index 0000000000..5b88ecb8d3 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-1-0.tex @@ -0,0 +1,22 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[rotate=90,scale=1] + \GraphInit[vstyle=Art] + \SetGraphArtColor{magenta}{gray} + \grCycle[RA=5,prefix=a]{7} + \begin{scope}[rotate=-20]\grEmptyCycle[RA=4,prefix=b]{7}\end{scope} + \grCirculant[RA=3,prefix=c]{7}{2} + \grCirculant[RA=1.4,prefix=d]{7}{3} + \EdgeIdentity{a}{b}{7} + \EdgeIdentity{b}{c}{7} + \EdgeIdentity{b}{d}{7} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-2-0.tex new file mode 100644 index 0000000000..9cbbc3ddf0 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-2-0.tex @@ -0,0 +1,23 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{magenta}{gray} + \grCycle[RA=7,prefix=b]{24} + \grEmptyStar[RA=3,prefix=a]{4} + \EdgeDoubleMod{a}{3}{0}{1}{b}{24}{0}{8}{2} + \EdgeDoubleMod{a}{3}{0}{1}{b}{24}{7}{8}{2} + \EdgeDoubleMod{a}{3}{0}{1}{b}{24}{18}{8}{2} + \EdgeDoubleMod{a}{4}{3}{0}{b}{24}{22}{8}{2} + \EdgeInGraphMod*{b}{24}{6}{5}{8} + \EdgeInGraphMod*{b}{24}{11}{1}{8} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-3-0.tex new file mode 100644 index 0000000000..f85bd2e7ca --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-3-0.tex @@ -0,0 +1,23 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{magenta}{gray} + \grCycle[RA=7,prefix=c]{7} + \grEmptyCycle[RA=6,prefix=b]{7} + \begin{scope}[rotate=12.85]\grEmptyCycle[RA=5,prefix=a]{14}\end{scope} + \EdgeIdentity{b}{c}{7} + \EdgeDoubleMod{b}{7}{0}{1}{a}{14}{0}{2}{6} + \EdgeDoubleMod{b}{7}{0}{1}{a}{14}{13}{2}{6} + \EdgeInGraphModLoop{a}{14}{4}{0}{0} + \EdgeInGraphModLoop{a}{14}{6}{1}{1} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-4-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-4-0.tex new file mode 100644 index 0000000000..0421c01f34 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-4-0.tex @@ -0,0 +1,20 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture}[scale=3] + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue}{cyan} + \begin{scope}[rotate=5]\grCycle[RA=2.5,prefix=a]{10}\end{scope} + \begin{scope}[rotate=-10]\grCirculant[RA=1.8,prefix=b]{10}{5}\end{scope} + \begin{scope}[rotate=36]\grCirculant[RA=1.1,prefix=c]{10}{3}\end{scope} + \EdgeIdentity{a}{b}{10} + \EdgeIdentity{b}{c}{10} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-5-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-5-0.tex new file mode 100644 index 0000000000..60e847cab2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-7-5-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue}{darkgray} + \grLCF[RA=7]{-13,-9,7,-7,9,13}{5} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-1-0.tex new file mode 100644 index 0000000000..2387ea7625 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-1-0.tex @@ -0,0 +1,17 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture}[scale=.7] + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \SetGraphShadeColor{blue!50!black}{blue}{gray} + \grChvatal[RA=6,RB=2] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-2-0.tex new file mode 100644 index 0000000000..c58fb0cbf7 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-2-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue!50!black}{gray} + \grChvatal[form=2,RA=7,RB=4,RC=1.4] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-3-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-3-0.tex new file mode 100644 index 0000000000..f3af535ca9 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-8-3-0.tex @@ -0,0 +1,16 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + + \begin{tikzpicture} + \GraphInit[vstyle=Art] + \SetGraphArtColor{blue!50!black}{gray} + \grChvatal[form=3,RA=7] + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-9-1-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-9-1-0.tex new file mode 100644 index 0000000000..1b7ceb4428 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-9-1-0.tex @@ -0,0 +1,23 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} +\tikzstyle{VertexStyle} = [shape = circle, + shading = ball, + ball color = green, + minimum size = 24pt, + draw] +\tikzstyle{EdgeStyle} = [thick, + double = orange, + double distance = 1pt] +\SetVertexLabel\SetVertexMath +\grCrown[RA=3,RS=6]{4} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-9-2-0.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-9-2-0.tex new file mode 100644 index 0000000000..1a0413e5d2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/latex/tkzNamed-9-2-0.tex @@ -0,0 +1,14 @@ +% +% tkz-namedgraphs (27/05/2011) +% +% Coding (utf8) Creator (TeX) +% Author Alain Matthes +\input{tkzpreamblenamed.ltx} + +\begin{document} + +\begin{tikzpicture} + \grCrown[form=2,RA=4,RS=6]{4} + \end{tikzpicture} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/tkzpreamblenamed.ltx b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/tkzpreamblenamed.ltx new file mode 100644 index 0000000000..fb0fc3b909 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/examples/tkzpreamblenamed.ltx @@ -0,0 +1,3 @@ +\documentclass[border=3mm]{standalone} +\usepackage{tkz-berge} +
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/README.md b/macros/latex/contrib/tkz/tkz-berge/README.md new file mode 100644 index 0000000000..1946302786 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/README.md @@ -0,0 +1,68 @@ +# tkz-berge — tools for classic graphs of graph theory + +Release 2.0 2021/01/20 + +## Description + +The package tkz-berge.sty is a collection of some useful macros if you want to + draw some classic graphs of the graph theory or to make others graphs. +The macros are designed to give math teachers (and students) easy access +at the programmation of drawing graphswith TikZ. I therefore hope that my + packages provide ideal tools for teachers wanting to offer their students fine documents of maths. +Some of graphs have names, sometimes inspired by th + +## Licence + +The scontents package may be modified and distributed under the terms and +conditions of the [LaTeX Project Public License](https://www.latex-project.org/lppl/), version 1.3c or greater. + + +## Requirements + +The package compiles with utf8, pdflatex and lualatex, loads and depends on updated versions of: +- [tkz-graph] +- [tikz](https://ctan.org/pkg/tikz) + +## Installation + +The package `tkz-berge` is present in TeXLive and MiKTeX, use the package +manager to install. + +You can experiment with the `tkz-berge` and `tkz-graph` packages by placing all of the +distribution files in the directory containing your current tex file. + + +## How to use it + +To use the package `tkz-berge`, place the following line in the preamble of +your LaTeX document: + +``` +\usepackage{tkz-berge} +``` +If you use the xcolor package, load that package before tkz-berge to avoid + package conflicts. + +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{tkz-berge} + +## Documentation + +The documentation is in english. +Documentation for `tkz-berge` is available on `CTAN`. + +## Examples + +All examples given in documentation will be stored on `CTAN` as standalone +files, ready for compilation. + +Other examples, in french, are on my site: [http://altermundus.fr](http://altermundus.fr) + +## History + +- 2.00 correction of bugs and new documentation +- 1.00 first version + +## Author + +Alain Matthes, 5 rue de Valence, Paris 75005, al (dot) ma (at) mac (dot) com diff --git a/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-classic.tex b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-classic.tex new file mode 100644 index 0000000000..cca3b768fe --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-classic.tex @@ -0,0 +1,616 @@ +\section{Classic Graphs} +%<––––––––––––––––––––––– graphes classiques –––––––––––––––––––––––––> +\subsubsection{Cycle graph} +\begin{NewMacroBox}{grCycle}{\oarg{local options}\var{order}} + +\medskip +\emph{A cycle graph $C_n$ is a graph on $n$ nodes containing a single cycle through all nodes. Cycle graphs can be generated using \tkzcname{grCycle} in the \tkzname{tkz-berge.sty} package. Special cases include the triangle graph and the square graph.} + +\medskip +External links : + +\medskip +\begin{itemize} + +\item \href{http://mathworld.wolfram.com/CycleGraph.html}% + {\textcolor{blue}{MathWorld - CycleGraph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + +\item \href{http://en.wikipedia.org/wiki/Cycle_graph}% + {\textcolor{blue}{Wikipedia}} + +\end{itemize} +\end{NewMacroBox} + +\subsubsection{Special cases : the triangle graph and the square graph} + + +\begin{center} +\begin{tkzexample}[small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grCycle[prefix=a,RA=3]{5} + \grCycle[x=4,y=3,prefix=b,RA=2]{3} + \grCycle[prefix=d,y=6,rotation=30,RA=2]{4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsubsection{Complete graph} +\begin{NewMacroBox}{grComplete}{\oarg{local options}\var{order}} + +\medskip +\emph{The more simple definition is "an undirected graph with an edge between every pair of vertices" or a complete graph is a simple graph in which each pair of graph vertices is connected by an edge. The complete graph with $n$ graph vertices is denoted $K_n$. This graph has $\frac{n(n-1)}{2}$ undirected edges.\\ +Geometrically, $K_3$ relates to a triangle,$ K_4$ a tetrahedron is the tetrahedral graph as well as the wheel graph , $K_5$ a pentachoron, etc \dots} + +\medskip +External links : + +\medskip +\begin{itemize} + +\item \href{http://en.wikipedia.org/wiki/Complete_graph}% + {\textcolor{blue}{Wikipedia}} + +\item \href{http://mathworld.wolfram.com/grComplete.html}% + {\textcolor{blue}{MathWorld - Complete graph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{itemize} +\end{NewMacroBox} + + +\subsubsection{Complete Graph order 4} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \renewcommand*{\VertexBallColor}{green!50!black} + \GraphInit[vstyle=Shade] + \grComplete[RA=5]{7} +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage\null + +\subsubsection{Complete Graph order 4} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \renewcommand*{\VertexBallColor}{green!50!black} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grComplete[RA=7]{16} +\end{tikzpicture} +\end{tkzexample} +\end{center} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newpage +\subsubsection{Circulant graph} +\begin{NewMacroBox}{grCirculant}{\oarg{local options}\var{order}} + +\medskip +\emph{The circulant graph is defined for any order $n$ at least 3, and every subset $L$ of integers which are less than or equal to $n/2$. A circulant graph is a graph in which the $i$th graph vertex is adjacent to the ($i+j$)th and ($i-j$)th graph vertices for each $j$ in a list $L$ . The circulant graphs with $L=\{1;\dots;[n/2]\}$ gives the complete graphs and the circulant graph with $L=\{1\}$ gives the cyclic graphs. The Möbius ladders are examples of circulant graphs.\\ + In graph theory, a graph whose adjacency matrix is circulant is called a circulant graph.\\ +The circulant graph on vertices on a list of nodes is implemented as \tkzcname{grCirculant} in the \tkzname{tkz-berge.sty} package.} + +\medskip +External links : + +\href{http://mathworld.wolfram.com/CirculantGraph.html}% + {\textcolor{blue}{MathWorld - CirculantGraph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} +\end{NewMacroBox} + +\tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = green!40!black,% + minimum size = 16pt,% + draw}} +\SetUpEdge[style = {thick,% + double = orange,% + double distance = 1pt}] + +\SetVertexNoLabel +\tikzset{EdgeStyle/.style = {thick, + double= orange, + double distance = 1pt}} + +\subsubsection{Graph order 5 with L=\{1\}} + +This is a cycle graph. + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCirculant[RA=3]{5}{1}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Graph order 5 with L=\{2\}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCirculant[RA=3]{5}{2}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{Graph order 5 with L=\{1,2\}} + +This graph is complete with an order $5$. + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCirculant[RA=3]{5}{1,2}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{Graph order 10 with L=\{1,2,3,4,5\}} + +This graph is also complete + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCirculant[RA=4]{10}{1,2,3,4,5}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +It's interesting to remark that the numbers 3 and 10 are primer, so if $L=\{3\} $ the graph is containing an Eulerian circuit. + + +\subsubsection{Graph order 10 with L=\{3\}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCirculant[RA=4]{10}{3}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage\null +\tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = gray!30,% + minimum size = 24pt,% + draw}} +\tikzset{EdgeStyle/.style = {thick,% + double = orange,% + double distance = 1pt}} +\SetVertexMath + +\subsubsection{Graph order 21 with L=\{1,3,10\}} + +\SetVertexNoLabel +\begin{tikzpicture} + \grCirculant[Math,RA=7]{21}{1,3,10} +\end{tikzpicture} +%<––––––––––––––––––––––––––– STAR –––––––––––––––––––––––––––––––––––> +\newpage +\subsubsection{Star graph} + +\begin{NewMacroBox}{grStar}{\oarg{local options}\var{order}} + +\medskip +\emph{A star graph $S_n$ is a n-graph with one node having vertex degree $n-1$ and the other $n-1$ having vertex degree $1$. Star graphs can be generated using \tkzcname{grStar} in the \tkzname{tkz-berge.sty} package.} + +\medskip +External links : + +\medskip +\begin{itemize} +\item \href{http://mathworld.wolfram.com/StarGraph.html}% + {\textcolor{blue}{MathWorld - StarGraph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{Weisstein}} +\end{itemize} +\end{NewMacroBox} + +\tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = orange!40!,% + minimum size = 26pt,% + draw}} +\SetUpEdge[style={thick,% + double = orange,% + double distance = 1pt}] +\SetVertexNoLabel +\tikzset{EdgeStyle/.style = {thick, + double= orange, + double distance = 1pt }} + +\subsubsection{Star graph} +\begin{center} + \begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=30,scale=.8] + \grStar[RA=7]{8}% +\end{tikzpicture} +\end{tkzexample} +\end{center} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newpage +\subsubsection{Square graph} + + \begin{NewMacroBox}{grSQCycle}{\oarg{local options}\var{Number}} + +\medskip +\emph{A star graph $S_n$ is a n-graph with one node having vertex degree $n-1$ and the other $n-1$ having vertex degree $1$. Star graphs can be generated using \tkzcname{grStar} in the \tkzname{tkz-berge.sty} package.} + +\medskip +External links : + +\medskip +\begin{itemize} +\item \href{http://mathworld.wolfram.com/SquareGraph.html}% + {\textcolor{blue}{MathWorld - SquareGraph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{Weisstein}} +\end{itemize} +\end{NewMacroBox} + +\subsubsection{Square Cycle graph} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.8] + \grSQCycle[RA=7]{10}% +\end{tikzpicture} +\end{tkzexample} +\end{center} +<–––––––––––––––––––––––––––– WHEEL –––––––––––––––––––––––––––––> +\newpage +\subsubsection{Wheel graph} + +\begin{NewMacroBox}{grWheel}{\oarg{local options}\var{Number}} + +\medskip +\emph{A wheel graph of order $n$ is a graph that contains a cycle of order $n-1$, and for which every vertex in the cycle is connected to one other vertex. The wheel can be defined as the graph , where is the singleton graph and is the cycle graph.} + +\medskip +External links : + +\medskip +\begin{itemize} +\item \href{http://mathworld.wolfram.com/WheelGraph.html}% + {\textcolor{blue}{MathWorld - WheelGraph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{Weisstein}} +\end{itemize} +\end{NewMacroBox} + +\tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = orange!40,% + minimum size = 24pt,% + draw}} +\SetUpEdge[style={thick,% + double = orange,% + double distance = 1pt}] + +\SetVertexNoLabel +\tikzset{EdgeStyle/.style = {thick,double= orange,double distance = 1pt}} + +\vfill +\subsubsection{Wheel graph} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[scale=.8] + \grWheel[RA=7]{13}% +\end{tikzpicture} +\end{tkzexample} +\end{center} +%<–––––––––––––––––––––––––––– LADDER ––––––––––––––––––––––––––> +\newpage +\subsubsection{Ladder graph} + +\begin{NewMacroBox}{grLadder}{\oarg{local options}\var{Number}} + +\medskip +\begin{tabular}{llc} + \toprule +options & default & definition \\ +\midrule +\TOline{RA } { |4| } {radius circle n°1 } +\TOline{RS } { |0| } {distance between two lines } +\TOline{prefix } { |a| } {prefix for vertices } +\TOline{prefixx} { |b| } {prefix for vertices } +\TOline{Math } { |false|} {math mode } +\bottomrule +\end{tabular} + +\medskip +\emph{The ladder graph $L_n$ or cyclic ladder graph is equivalent to the grid graph having two rails and $n$ rungs between them.} + +\medskip +External links : + +\medskip +\begin{itemize} +\item \href{http://mathworld.wolfram.com/LadderGraph.html}% + {\textcolor{blue}{MathWorld - LadderGraph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{Weisstein}} +\end{itemize} +\end{NewMacroBox} + +\vfill +\subsubsection{Ladder graph} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grLadder[RA=2,RS=4]{6}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill +%<––––––––––––––––––––––––––– Prism CYCLE LADDER –––––––––––––––––––––––> +\newpage +\subsubsection{Prism graph} + +\begin{NewMacroBox}{grPrism}{\oarg{local options}\var{Number}} + +\medskip +\begin{tabular}{llc} + \toprule +options & default & definition \\ +\midrule +\TOline{RA } { |4| } {radius circle n°1 } +\TOline{RB } { |3| } {radius circle n°2 } +\TOline{prefix } { |a| } {prefix for vertices } +\TOline{prefixx } { |b| } {prefix for vertices } +\TOline{Math } { |false|} {math mode } +\bottomrule +\end{tabular} + +\medskip +\emph{An $n$-prism graph has $2n$ nodes and $3n$ edges, and is equivalent to the generalized Petersen graph with arguments $n$ and $1$. For odd $n$, the $n$-prism is isomorphic to the circulant graph with an order $2n$ and with arguments $2$ and $n$.\\ +The 3-prism graph is the line graph of the complete bipartite graph with arguments $2$ and $3$ . The 4-prism graph is isomorphic with the cubical graph.} + + +\medskip +External links : + +\medskip +\begin{itemize} +\item \href{http://mathworld.wolfram.com/PrismGraph.html}% + {\textcolor{blue}{MathWorld - Prism Graph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{Weisstein}} +\end{itemize} +\end{NewMacroBox} + +\subsubsection{Cycle Ladder graph} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}[rotate=15,scale=.7] + \grPrism[RA=6,RB=3]{6}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{Cycle Ladder graph number 3} +\begin{center} +\begin{tkzexample}[] +\begin{tikzpicture}[scale=.7] + \grPrism[RA=6,RB=3]{3}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{Cycle Ladder graph number 4} +\begin{center} +\begin{tkzexample}[] +\begin{tikzpicture}[scale=.7] + \grPrism[RA=6,RB=3]{4}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +%<––––––––––––––––––––––––––––– bipartite ––––––––––––––––––––––––––––––––> +\newpage +\subsubsection{Complete Bipartite graph} + +\begin{NewMacroBox}{grCompleteBipartite}{\oarg{local options}\var{Number 1}\var{Number 2}} + +\medskip +\begin{tabular}{llc} + \toprule +options & default & definition \\ +\midrule +\TOline{RA }{|4| } {radius circle n°1} +\TOline{RB }{|3| } {radius circle n°2 } +\TOline{RS }{|1| } {distance between two lines } +\TOline{form }{|1| } {integer to obtain a new embedding of a graph} +\TOline{prefix }{|a| } {prefix for vertices } +\TOline{prefixx}{|b| } {prefix for vertices } +\TOline{Math }{|false| } {math mode } +\bottomrule +\end{tabular} + +\medskip +\emph{A complete bipartite graph is a bipartite graph (i.e., a set of graph vertices decomposed into two disjoint sets such that no two graph vertices within the same set are adjacent) such that every pair of graph vertices in the two sets are adjacent.} + +\medskip +External links : + +\medskip +\begin{itemize} +\item \href{http://mathworld.wolfram.com/CompleteBipartiteGraph.html}% + {\textcolor{blue}{MathWorld - CompleteBipartite Graph}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{Weisstein}} +\end{itemize} +\end{NewMacroBox} + + + +\subsubsection{Bipartite graph 1,5}\label{cl17} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCompleteBipartite[RA=4,RB=2.5,RS=4]{1}{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Bipartite graph 3,5}\label{bi1} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grCompleteBipartite[RA=4,RB=3,RS=6]{3}{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newpage +\subsubsection{Triangular Grid graph} + + +\begin{NewMacroBox}{grTriangularGrid}{\oarg{local options}\var{Number}} + +\medskip +\begin{tabular}{llc} + \toprule +options & default & definition \\ +\bottomrule +\TOline{RA }{|4| }{distance between two vertices } +\TOline{form }{|1| }{integer to obtain a new embedding of a graph} +\TOline{prefix}{|a| }{prefix for vertices } +\TOline{Math }{|false|}{math mode } +\bottomrule +\end{tabular} + +\emph{Number=$n$ is the number of vertices of the first row then the graph order is $\dfrac{n(n-1)}{2} $. +There are three embeddings. You can use the option \tkzname{form} with an integer between $1$ and $3$.} +\end{NewMacroBox} + +\medskip + + +\subsubsection{n=8 order=28 form 1}\label{cl18a} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexLabel + \grTriangularGrid[prefix=G,Math,RA=1.5]{8}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{n=6 order=15 form 2} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grTriangularGrid[RA=2,form=2]{6}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{n=6 order=15 form 3} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \grTriangularGrid[RA=2,form=3]{6}% +\end{tikzpicture} +\end{tkzexample} +\end{center} +%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newpage +\subsubsection{LCF Lederberg-Coxeter-Fruchte} + +\begin{NewMacroBox}{grLCF}{\oarg{RA=\meta{Number}} \var{List of numbers} \var{Number}} +\emph{LCF = Lederberg-Coxeter-Fruchte (see the link below for some examples).} + +\medskip +External links : + +\medskip +\begin{itemize} +\item \href{http://mathworld.wolfram.com/LCFNotation.html}% + {\textcolor{blue}{MathWorld-LCF Notation}} by % + \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{Weisstein}} +\end{itemize} +\end{NewMacroBox} + + +\subsubsection{\texorpdfstring{$\big[2,-2\big]^2$}{}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}% + \grLCF[RA=5]{2,-2}{2}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{\texorpdfstring{$\big[3,-3\big]^4$}{}} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture}% + \grLCF[RA=5]{3,-3}{4}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Ljubljana graph} +From Wikipedia \url{http://en.wikipedia.org/wiki/Ljubljana_graph} + +\emph{The Ljubljana graph was first published in 1993 by Brouwer, Dejter and Thomassen. +In 1972, Bouwer was already talking of a 112-vertices edge- but not vertex-transitive cubic graph found by R. M. Foster, but unpublished. Conder, MalniÄ, MaruÅ¡iÄ, Pisanski and PotoÄnik rediscovered this 112-vertices graph in 2002 and named it the Ljubljana graph after the capital of Slovenia. They proved that it was the unique 112-vertices edge- but not vertex-transitive cubic graph and therefore that was the graph found by Foster.} + +It can be represented in LCF notation as : + +\[ +\begin{array}{l} +\Big[ 47, -23, -31, 39, 25, -21, -31, -41, 25, 15, 29, -41, -19, 15, -49, 33, 39, -35, -21, 17,\\ -33, 49, 41, 31, -15, -29, 41, 31, -15, -25, 21, 31, -51, -25, 23, 9, -17, 51, 35, -29, 21,\\ -51, -39, 33, -9, -51, 51, -47, -33, 19, 51, -21,29, 21, -31, -39\Big]^2 +\end{array} +\] + + + \begin{center} +\begin{tikzpicture} +\GraphInit[vstyle=Art] +\SetGraphArtColor{black!50}{darkgray} +\tikzset{VertexStyle/.append style = { + minimum size = 3pt}} + \grLCF[RA=7]{47, -23, -31, 39, 25, -21, -31, -41, 25, 15, 29, -41, -19, 15, -49, 33, 39, -35, -21, 17, -33, 49, 41, 31, -15, -29, 41, 31, -15, -25, 21, 31, -51, -25, 23, 9, -17, 51, 35, -29, 21, -51, -39, 33, -9, -51, 51, -47, -33, 19, 51, -21, 29, 21, -31, -39}{2}% +\end{tikzpicture} +\end{center} + +\begin{tkzexample}[code only] +\GraphInit[vstyle=Art] +\SetGraphArtColor{black!50}{darkgray} +\tikzset{VertexStyle/.append style = { + minimum size = 3pt}} +\begin{tikzpicture}% + \grLCF[RA=7]{47, -23, -31, 39, 25, -21, -31, -41, 25, 15, 29, -41, -19, 15,% + -49, 33, 39, -35, -21, 17, -33, 49, 41, 31, -15, -29, 41, 31, -15, -25, 21,% + 31, -51, -25, 23, 9, -17, 51, 35, -29, 21, -51, -39, 33, -9, -51, 51, -47,% + -33, 19, 51, -21, 29, 21, -31, -39}{2}% +\end{tikzpicture} +\end{tkzexample} +\vfill +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-macros-e.tex b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-macros-e.tex new file mode 100644 index 0000000000..94f1f8aa18 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-macros-e.tex @@ -0,0 +1,457 @@ +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\section{Macros and Edges in a graph} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Edge in a graph from one vertex \tkzcname{EdgeInGraphFromOneToComp}} + +\begin{NewMacroBox}{EdgeInGraphFromOneToComp}{\oarg{local options}\var{prefix}\var{order}\var{from}} + +\begin{tabular}{llc} +\hline +Arguments & & Definition \\ +\midrule +\TAline{order} {}{order of the graph} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{llc} +\midrule +options & default & definition \\ +\midrule +\TOline{RA} {4} { radius circle} +\TOline{prefix} {a} {prefix for vertices } +\TOline{Math} {false} {math mode } +\bottomrule +\end{tabular} + +\medskip +\emph{This macro works on an unique graph. |from| is integer. |EdgeInGraph| designs a macro that works only in a graph defined by a prefix. The result is some edges between the vertex |from| and the others vertices. } +\end{NewMacroBox} + + + + + +\subsubsection{Empty Cycle} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=4,prefix=a]{8}% + \EdgeInGraphFromOneToComp{a}{8}{3} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill +\newpage +\subsection{Edges in a graph - a loop \tkzcname{EdgeInGraphLoop}}% +\begin{NewMacroBox}{EdgeInGraphLoop}{\var{prefix}\var{order}} +\emph{This macro is useful with vertices on a circle . |order| in an integer.} +\end{NewMacroBox} + + +\subsubsection{Empty Cycle} +\begin{center} + \begin{tkzexample}[very small] + \begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=2,prefix=a]{8}% + \EdgeInGraphLoop{a}{8} + \end{tikzpicture}\end{tkzexample} +\end{center} + +\subsubsection{Empty Cycle} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture}[node distance=4cm] + \GraphInit[vstyle=Shade] + \Vertices{square}{a0,a1,a2,a3} + \EdgeInGraphLoop{a}{4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges in a graph - a loop \tkzcname{EdgeInGraphLoop*}} +\begin{NewMacroBox}{EdgeInGraphLoop*}{\var{prefix}\var{order}} + +\medskip +\emph{Not exactly a loop, there is no edge between the first and the last vertex.} +\end{NewMacroBox} + +\subsubsection{Empty Cycle} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grEmptyCycle[RA=4,prefix=a]{8}% + \EdgeInGraphLoop*{a}{8} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Empty Path} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \grEmptyPath[prefix=h,RA=2,RS=2]{6} + \EdgeInGraphLoop*{h}{6} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill +\newpage +\subsection{Sequence of edges in a graph \tkzcname{EdgeInGraphSeq}} +\begin{NewMacroBox}{EdgeInGraphSeq}{\var{prefix}\var{start}\var{end}} + +\medskip +\emph{This macro gives a sequence of edges between |start| and |end|.\\ +|start| and |end| are two integers. } +\end{NewMacroBox} + +\subsubsection{EdgeInGraphSeq} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=2,prefix=a]{8}% + \EdgeInGraphSeq{a}{2}{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges in a graph \tkzcname{EdgeInGraphMod}} +\begin{NewMacroBox}{EdgeInGraphMod}{\var{prefix}\var{order}\var{add}} + +\medskip +\emph{This macro works on an unique graph. Edges between $v_i$ and $v_j$ with $i$ in $0,...,(\text{\#2}-1)$ and $j=\text{Mod(i+\#3,\#2)}$.\\ +\#2 = |order| and \#3 = |add|.\\ +|Mod| is like |mod| but the result is a positive integer. } +\end{NewMacroBox} + +\subsubsection{EdgeInGraphMod} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=2,prefix=a]{8}% + \EdgeInGraphMod{a}{8}{2} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{EdgeInGraphMod 2} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=3,prefix=a]{13}% + \EdgeInGraphMod{a}{13}{3} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges in a graph \tkzcname{EdgeInGraphMod*}} +\begin{NewMacroBox}{EdgeInGraphMod*}{\var{prefix}\var{order}\var{add}\var{start}\var{step}} + +\medskip +\emph{Edges between $v_i$ and $v_j$ with $i$ in $\#4,\#4+\#5,...,(\text{\#2}-1)$ and $j=\text{Mod(i+\#3,\#2)}$}\\ +\#2 = |order|, \#3 = |add|, \#4 = |start|, \#5 = |step|.\\ +\end{NewMacroBox} + +\subsubsection{EdgeInGraphMod*} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[prefix=a]{17}% + \EdgeInGraphMod*{a}{17}{5}{1}{2} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges in a graph \tkzcname{EdgeInGraphModLoop}} +\begin{NewMacroBox}{EdgeInGraphModLoop}{\var{prefix}\var{order}\var{add}\var{start}} + +\medskip +\emph{ |order|, |add| and |start| are integers.\\ +Edges between $v_i$ and $v_j$ with $i$ from $\#4$, $j=\text{Mod(i+\#3,\#2)}$ and then $i=j$ until $j=\#4$\\ +\#2 = |order|, \#3 = |add| and \#4 = |start|.} +\end{NewMacroBox} + +\subsubsection{EdgeInGraphModLoop} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=4]{7} + \EdgeInGraphModLoop{a}{7}{2}{1} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{EdgeInGraphModLoop} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=4]{8} + \EdgeInGraphModLoop{a}{8}{2}{1} +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\newpage +\subsection{Edges between two graphs with the same order \tkzcname{EdgeIdentity}} + +\begin{NewMacroBox}{EdgeIdentity}{\var{prefix1}\var{prefix2}\var{order}} + +\medskip +\emph{|order| is an integer. This macro gives edges between two graphs.\\ +Edges between $v_i$ and $v_j$ with $i=j$ in $0,...,(\text{\#3}-1)$.\\ +\#3 = |order|.\\} +\end{NewMacroBox} + +\subsubsection{EdgeIdentity} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[prefix=v,RA=3]{5} + \grEmptyCycle[prefix=w,RA=1]{5} + \EdgeIdentity{v}{w}{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill +\newpage +\subsection{Edges between two graphs with the same order \tkzcname{EdgeIdentity*}} + +\begin{NewMacroBox}{EdgeIdentity*}{\var{prefix1}\var{prefix2}\var{list}} + +\medskip +\emph{|list| is a list of integers. This macro gives edges between two graphs.\\ +Edges between $v_i$ and $v_j$ with $i=j$ in |list|.\\} + +\end{NewMacroBox} + +\subsubsection{EdgeIdentity*} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \begin{scope}[rotate=30] + \grEmptyCycle[RA=3,prefix=a]{5}% + \end{scope} + \grEmptyCycle[RA=5,prefix=b]{5}% + \EdgeIdentity*{a}{b}{0,...,4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{EdgeIdentity*} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \begin{scope}[rotate=30] + \grEmptyCycle[RA=3,prefix=a]{5}% + \end{scope} + \grEmptyCycle[RA=5,prefix=b]{5}% + \EdgeIdentity*{a}{b}{0,2,4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges between two graphs \tkzcname{EdgeFromOneToAll}} +\begin{NewMacroBox}{EdgeFromOneToAll}{\var{prefix1}\var{prefix2}\var{from}\var{order}} + +\medskip +\emph{The graphs must to have the same order. |from| and |order| are integers.} +\end{NewMacroBox} + +\subsubsection{EdgeFromOneToAll} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grPath[form=1,RA=2,RS=0]{5} + \grPath[form=1,prefix=b,RA=2,RS=4]{5} + \EdgeFromOneToAll{a}{b}{1}{5} +\end{tikzpicture}\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges between two graphs \tkzcname{EdgeFromOneToSeq}} +\begin{NewMacroBox}{EdgeFromOneToSeq}{\var{prefix1}\var{prefix2}\var{from}\var{start}\var{end}} + +\medskip +\emph{|from|, |start| and |end| are integers. This macro builds edges between the vertex with an indice |from| through the vertices with an indice in the sequence |start|,...,|end|.} +\end{NewMacroBox} + +\subsubsection{EdgeFromOneToSeq} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grPath[form=1,RA=2,RS=0]{5} + \grPath[form=1,prefix=b,RA=2,RS=4]{5} + \EdgeFromOneToSeq{a}{b}{1}{2}{4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges between two graphs \tkzcname{EdgeFromOneToSel}} +\begin{NewMacroBox}{EdgeFromOneToSel}{\var{prefix1}\var{prefix2}\var{from}\var{list}} + +\medskip +\emph{This macro builds edges between the vertex with an indice |from| through the vertices with an indice in the list |list|.} +\end{NewMacroBox} + + +\subsubsection{EdgeFromOneToSel} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grPath[form=1,RA=2]{5} + \grPath[form=1,prefix=b,RA=2,RS=4]{5} + \EdgeFromOneToSel{a}{b}{1}{0,2,4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges between two graphs \tkzcname{EdgeFromOneToComp}} +\begin{NewMacroBox}{EdgeFromOneToComp}{\var{prefix1}\var{prefix2}\var{from}\var{order2}} + +\medskip +\emph{This macro builds edges between the vertex with an indice |from| through all the vertices of the second graph, except the vertex with an indice |from|.} +\end{NewMacroBox} + +\subsubsection{EdgeFromOneToComp} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grPath[form=1,RA=2,RS=0]{5} + \grPath[form=1,prefix=b,RA=2,RS=4]{5} + \EdgeFromOneToComp{a}{b}{2}{3} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges between two graphs \tkzcname{EdgeMod}}% +\begin{NewMacroBox}{EdgeMod}{\var{prefix1}\var{prefix2}\var{order}\var{step}} + +\medskip +\emph{This macro works on two graphs with the same order. We get edges between $v_i$ and $v_j$ with $i$ in $0,...,(\text{\#2}-1)$ and $j=\text{Mod(i+\#4,\#3)}$.\\ +\#3 = |order| and \#4 = |step|.} +\end{NewMacroBox} + +\subsubsection{EdgeMod} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[prefix=a,RA=6]{9} + \grEmptyCycle[prefix=b,RA=3]{9} + \EdgeMod{a}{b}{9}{1} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges between two graphs \tkzcname{EdgeMod*}}% +\begin{NewMacroBox}{EdgeMod*}{\var{prefix1}\var{prefix2}\var{order}\var{step1}\var{step2}} + +\medskip +\emph{This macro works on two graphs with the same order. We get edges between $v_i$ and $v_j$ with $i$ in $0,...,(\text{\#3}-1)$ with a step $\text{\#5}$ and $j=\text{Mod(i+\#4,\#3)}$.\\ +\#3 = |order| , \#4 = |step1| and \#5 = |step2|.} +\end{NewMacroBox} + + +\subsubsection{\tkzcname{EdgeMod*} }%with |step1|=1 and |step2|=2 +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[prefix=a,RA=6]{8} + \grEmptyCycle[prefix=b,RA=4]{8} + \EdgeMod*{a}{b}{8}{1}{2} +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{EdgeMod* }%with |step1|=2 and |step2|=1 +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[prefix=a,RA=6]{8} + \grEmptyCycle[prefix=b,RA=2]{8} + \EdgeMod*{a}{b}{8}{1}{1} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{Edges between two graphs \tkzcname{EdgeDoubleMod}}% +\begin{NewMacroBox}{EdgeDoubleMod}{\var{prefix1}\var{nb}\var{nb}\var{nb}\var{prefix2}\var{nb}\var{nb}\var{nb}\var{end}} + +For the first node, the numbers are : +\var{order1}\var{start1}\var{add1} + +\medskip +For the second node, the numbers are : +\var{order2}\var{start2}\var{add2}\var{end} + +\medskip +\emph{Edges between $v_i$ and $v_j$ with $i=\text{Mod(\#3+(\#4*k),\#2)}$ and j=$\text{Mod(\#7+(\#8*k),\#6)}$ $k$ is an integer from $0$ to |end|.\\ +\#2 = |order1|, \#3 = |start1| and \#4 = |add1|.\\ +\#6 = |order2|, \#7 = |start2| and \#8 = |add2|.} +\end{NewMacroBox} + + +\subsubsection{EdgeDoubleMod} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \begin{scope}[rotate=-90] + \grEmptyCycle[RA=2,prefix=a]{5} + \end{scope} + \begin{scope}[rotate=-18] + \grEmptyCycle[RA=4,prefix=b]{5} + \end{scope} + \EdgeDoubleMod{b}{5}{0}{1}% + {a}{5}{2}{1}{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{EdgeDoubleMod with two graphs and different orders} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[prefix=a,RA=5]{10} + \grEmptyCycle[prefix=b,RA=7]{20} + \EdgeDoubleMod{a}{10}{0}{1}% + {b}{20}{0}{2}{10} +\end{tikzpicture} +\end{tkzexample} +\end{center} +\endinput diff --git a/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-macros.tex b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-macros.tex new file mode 100644 index 0000000000..5a3ded84cb --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-macros.tex @@ -0,0 +1,326 @@ +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\section{Macros and Vertices} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{\tkzcname{grEmptyCycle}} + +\begin{NewMacroBox}{grEmptyCycle}{\oarg{local options}\var{order}} +\begin{tabular}{llc} +Arguments & & Definition \\ +\midrule +\TAline{order} {}{order of the graph} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{llc} + +Options & default & definition \\ +\midrule +\TOline{RA} {4} { radius circle} +\TOline{prefix} {a} {prefix for vertices } +\TOline{Math} {false} {math mode } +\bottomrule +\end{tabular} + +\medskip +\emph{The number of nodes in a graph is called its order. The argument "order" is an integer superior to $1$. |RA| defines the radius of the circle.} +\end{NewMacroBox} + + +\bigskip +\subsubsection{Empty Cycle} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=1.5]{3} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Empty Cycle and \tkzcname{SetVertexNoLabel}} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \SetVertexNoLabel + \GraphInit[vstyle=Shade] + \grEmptyCycle[RA=1.5]{2} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Empty Cycle and \tkzname{Math}} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \grEmptyCycle[Math,RA=1.5]{4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{Empty Cycle, \tkzcname{SetVertexMath} and \tkzname{prefix}} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \SetVertexMath + \GraphInit[vstyle=Shade] + \grEmptyCycle[prefix=N,RA=1.5]{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Empty Cycle and Classic style} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \SetVertexMath + \GraphInit[vstyle=Classic] + \grEmptyCycle[RA=1.5]{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Empty Cycle and Simple style} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Simple] + \grEmptyCycle[RA=1.5]{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\newpage +\subsection{\tkzcname{grEmptyPath}} +\begin{NewMacroBox}{grEmptyPath}{\oarg{local options}\var{order}} +\begin{tabular}{llc} +\hline +Arguments & & Definition \\ +\midrule +\TAline{order} {}{order of the graph} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{>{\color{green!50!black}}lllc} + \toprule +options & default & definition \\ +\midrule +\TOline{RA} {4 cm}{ distance between two vertices} +\TOline{RS} {? cm}{ distance between the first line and the new one} \\ +\TOline{prefix} {a} {prefix for vertices } +\TOline{Math} {false} {math mode } +\bottomrule +\end{tabular} + +\medskip +\emph{|Order| is the number of nodes. |RA| defines the radius of the circle. |RS| defines the distance between the graph and the baseline.} + +\end{NewMacroBox} + +\bigskip +\tikzset{VertexStyle/.style = {shape = circle,% + shading = ball,% + ball color = green!30, + minimum size = 24pt, + draw}} +\tikzset{EdgeStyle= {color=red!30, + double= green!50!black, + double distance = 2pt}} +\SetVertexLabel +\SetVertexMath +\subsubsection{Empty Path, \tkzname{RA} and \tkzname{Math}} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \grEmptyPath[Math,RA=2]{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Empty Path, \tkzname{RA} and \tkzname{prefix}} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \grEmptyPath[prefix=h,RA=2]{6} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsubsection{Empty Path, vertical path with \tkzname{form=2}} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \grEmptyPath[form=2,prefix=v,RA=2]{3} +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsubsection{Two Empty Paths} +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \grEmptyPath[Math,prefix=p,RA=2,RS=0]{5} + \grEmptyPath[Math,prefix=q,RA=2,RS=3]{5} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \grEmptyPath[Math,prefix=p,RA=2,RS=0,form=2]{5} + \grEmptyPath[Math,prefix=q,RA=2,RS=4,form=2]{5} +\end{tikzpicture} +\end{tkzexample} + \end{center} + +\subsubsection{How to move a graph ?} + +\begin{center} +\begin{tkzexample}[very small] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{blue!60!black!30}{blue}{white} + \grPath[Math,prefix=u,RA=2,RS=0]{4} + \grPath[Math,prefix=v,RA=2,RS=3]{4} + \begin{scope}[xshift=1 cm] + \grPath[Math,prefix=t,RA=2,RS=5]{4} + \end{scope} + \begin{scope}[shift={(4 cm,8cm)}] + \grPath[Math,prefix=x,RA=2,RS=0]{4} + \end{scope} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +% \newpage +% \subsection{Empty Star} +% \begin{NewMacroBox}{grEmptyStar}{\oarg{local options}\var{order}} +% \begin{tabular}{llc} +% \toprule +% Arguments & & Definition \\ +% \midrule +% \TAline{order} {}{order of the graph} +% \bottomrule +% \end{tabular} +% +% \medskip +% \begin{tabular}{>{\color{green!50!black}}lllc} +% \toprule +% options & default & definition \\ +% \midrule +% \TOline{RA} {4 cm}{ radius circle} +% \TOline{prefix} {a} {prefix for vertices } +% \TOline{Math} {false} {math mode } +% \bottomrule +% \end{tabular} +% +% \medskip +% \emph{|RA| defines the radius of the circle. |order| is an integer and it's the order of the graph.} +% \end{NewMacroBox} +% +% \bigskip +% \subsubsection{Empty Star} +% \begin{center} +% \begin{tkzexample}[very small] +% \begin{tikzpicture} +% \SetVertexMath +% \grEmptyStar[prefix=s,RA=3]{6} +% \end{tikzpicture} +% \end{tkzexample} +% \end{center} +% +% \newpage +% \subsection{Empty Grid} +% \begin{NewMacroBox}{grEmptyGrid}{\oarg{local options}\var{c}\var{r}} +% \begin{tabular}{llc} +% \toprule +% Arguments & & Definition \\ +% \midrule +% \TAline{r} {}{number of rows} +% \TAline{c} {} {number of columns} +% \bottomrule +% \end{tabular} +% +% \medskip +% \begin{tabular}{llc} +% \toprule +% options & default & definition \\ +% \midrule +% \TOline{RA} {4 cm}{ distance between two columns } +% \TOline{RB} {3 cm} {distance between two rows } +% \TOline{prefix} {3 cm} {distance between two rows } +% \TOline{Math} {false} {math mode } +% \bottomrule +% \end{tabular} +% +% \medskip +% \emph{|c| and |r| are integers.} +% +% \end{NewMacroBox} +% +% \bigskip +% \subsubsection{Prefix} +% \begin{center} +% \begin{tkzexample}[very small] +% \begin{tikzpicture} +% \tikzset{VertexStyle/.style ={shape = circle, +% shading = ball, +% ball color = Blue!60,% +% minimum size = 24pt,% +% draw}} +% \SetVertexMath +% \grEmptyGrid[prefix=G,RA=2,RB=4]{5}{3} +% \end{tikzpicture}\end{tkzexample} +% \end{center} +% +% \newpage +% \subsection{Empty Ladder} +% \begin{NewMacroBox}{grEmptyLadder}{\oarg{local options}\var{c}} +% \begin{tabular}{llc} +% \toprule +% Arguments & & Definition \\ +% \midrule +% \TAline{c} {}{number of columns.} +% \bottomrule +% \end{tabular} +% +% \medskip +% \begin{tabular}{llc} +% options & default & definition \\ +% \midrule +% \TOline{RA} {4 cm}{ distance between two columns } +% \TOline{RB} {3 cm}{ distance between two rows } +% \TOline{prefix} {a} {prefix for vertices } +% \TOline{prefix} {b} {prefix for vertices } +% \TOline{Math} {false} {math mode } +% \bottomrule +% \end{tabular} +% +% \medskip +% \emph{ |c| is an integer. There are only two rows with different prefix.} +% \end{NewMacroBox} +% +% \bigskip +% \subsubsection{Empty Ladder} +% \begin{center} +% \begin{tkzexample}[very small] +% \begin{tikzpicture} +% \tikzset{VertexStyle/.style ={shape = diamond, +% shading = ball, +% ball color = yellow!60,% +% minimum size = 24pt,% +% draw}} +% \SetVertexMath +% \grEmptyLadder[RA=2,RB=4]{5} +% \end{tikzpicture} +% \end{tkzexample} +% \end{center} + +\endinput + + diff --git a/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-main.tex b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-main.tex new file mode 100644 index 0000000000..5ad81802dc --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-main.tex @@ -0,0 +1,270 @@ +% encoding : utf8 +% tkz-berge.tex +% Created by Alain Matthes on 2008-01-19. +% Copyright (C) 2009 Alain Matthes +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License , either version 1.3 +% of this license or (at your option) any later version and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details.% +% See http://www.latex-project.org/lppl.txt for details. +% +% +% ``tkzdoc-berge-us'' is the english doc of tkz-berge +% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% tkz-berge.sty encodage : utf8 % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Créé par Alain Matthes le 19/02/2007 % +% Copyright (c) 2006 __Collège Sévigné__ All rights reserved. % +% version : 2.7 c % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Fichier .tex de présentation du package tkz-graph.sty +% d'après le code de DTK. + +\documentclass[DIV = 14, + fontsize = 10, + headinclude = false, + footinclude = false, + index = totoc, + twoside, + headings = small]{tkz-doc} +\usepackage{etoc} +\gdef\tkznameofpack{tkz-berge} +\gdef\tkzversionofpack{v 1.00 c} +\gdef\tkzdateofpack{2011/05/25} +\gdef\tkznameofdoc{doc-tkz-berge} +\gdef\tkzversionofdoc{v 1.00 c} +\gdef\tkzdateofdoc{2011/05/25} +\gdef\tkzauthorofpack{Alain Matthes} +\gdef\tkzadressofauthor{} +\gdef\tkznamecollection{AlterMundus} +\gdef\tkzurlauthor{http://altermundus.fr} +\gdef\tkzengine{lualatex} +\gdef\tkzurlauthorcom{http://altermundus.fr} + +% -- Packages --------------------------------------------------- +\usepackage[dvipsnames,svgnames]{xcolor} +\usepackage{calc} +\usepackage{tkz-berge} +\usetikzlibrary{calc,positioning,shapes} +\usepackage[colorlinks,pdfencoding=auto]{hyperref} +\hypersetup{ + linkcolor=Gray, + citecolor=Green, + filecolor=Mulberry, + urlcolor=NavyBlue, + menucolor=Gray, + runcolor=Mulberry, + linkbordercolor=Gray, + citebordercolor=Green, + filebordercolor=Mulberry, + urlbordercolor=NavyBlue, + menubordercolor=Gray, + runbordercolor=Mulberry, + pdfsubject={Euclidean Geometry}, + pdfauthor={\tkzauthorofpack}, + pdftitle={\tkznameofpack}, + pdfcreator={\tkzengine} +} +\usepackage{tkzexample} +\usepackage{fontspec} +\setmainfont{texgyrepagella}% + [Extension = .otf , + UprightFont = *-regular, + ItalicFont = *-italic, + BoldFont = *-bold, + BoldItalicFont = *-bolditalic] +\setsansfont{texgyreheros}[ + Extension = .otf, + UprightFont = *-regular , + ItalicFont = *-italic , + BoldFont = *-bold , + BoldItalicFont = *-bolditalic , +] + +\setmonofont{lmmono10-regular.otf}[ + Numbers={Lining,SlashedZero}, + ItalicFont=lmmonoslant10-regular.otf, + BoldFont=lmmonolt10-bold.otf, + BoldItalicFont=lmmonolt10-boldoblique.otf, +] +\newfontfamily\ttcondensed{lmmonoltcond10-regular.otf} +%% (La)TeX font-related declarations: +\linespread{1.05} % Pagella needs more space between lines + +\usepackage{unicode-math} +\usepackage{fourier-otf,zorna} +\usepackage{datetime,multicol,lscape} +\usepackage[french]{babel} +\usepackage[autolanguage]{numprint} +\usepackage{microtype} +\usepackage{array,multirow,multido,booktabs} +\usepackage{shortvrb,fancyvrb} +\usepackage{fancybox} +\usepackage{stmaryrd} +\usepackage{xkeyval,array} +\usepackage[weather]{ifsym} +\usepackage[format=hang,margin=10pt]{caption} +\usepackage{multicol} +\usepackage{makeidx} +\makeindex + +\title{The package : tkz-berge.sty} +\author{Alain Matthes} + +\AtBeginDocument{\MakeShortVerb{\|}} + + + +\begin{document} + +\parindent=0pt +\author{\tkzauthorofpack} +\title{\tkznameofpack} +\date{\today} +\clearpage +\thispagestyle{empty} +\maketitle + +\clearpage + +\tkzSetUpColors[background=white,text=darkgray] + +\let\rmfamily\ttfamily + +\nameoffile{\tkznameofpack} +\defoffile{The package \tkzname{\tkznameofpack} is a collection of some useful macros if you want to draw some classic graphs of the graph theory or to make others graphs. The kind of graphs that I will present, are sometimes called combinatorial graphs to distinguish them from the graphs of functions. Often, the word graph is short for graph of a function. A combinatorial graph is a very simple structure, a bunch of dots, some of which are connected by lines. Some of graphs have names, sometimes inspired by the graph's topology, and sometimes after their discoverer.\hfil\break +Why tkz-berge.sty ?\hfil\break +Claude Berge (1926 – 2002) was a French mathematician, recognized as one of the modern founders of combinatorics and graph theory. He played a major role in the renaissance of combinatorics and he is remembered for his famous conjecture on perfect graphs, solved some months after his death.} + +\presentation + +\vfill +\lefthand\ Firstly, I would like to thank \textbf{Till Tantau} for the beautiful LATEX package, namely TikZ. + +\lefthand I am grateful to \textbf{Michel Bovani} for providing the \tkzname{fourier} font. + +\lefthand\ I received much valuable advice and guidance on Graph Theory from \textbf{Rafael Villarroel}\\ \url{http://graphtheoryinlatex.blogspot.com/}. + +\lefthand\ The names of graphs can be found here \href{http://mathworld.wolfram.com/topics/SimpleGraphs.html}% + {\textcolor{blue}{MathWorld - SimpleGraphs}} by \href{http://en.wikipedia.org/wiki/Eric_W._Weisstein}% + {\textcolor{blue}{E.Weisstein}} + + +\vspace{1cm} +Please report typos or any other comments to this documentation to \href{mailto:al.ma@mac.com}{\textcolor{blue}{Alain Matthes}} +This file can be redistributed and/or modified under the terms of the LATEX +Project Public License Distributed from CTAN archives in directory \url{CTAN:// +macros/latex/base/lppl.txt}. + +\clearpage +\tableofcontents +\clearpage + +\newpage +List of the main macros : + +\medskip + +\begin{multicols}{2} + \begin{itemize} + \item \tkzcname{grEmptyCycle} + \item \tkzcname{grEmptyPath} + \item \tkzcname{grEmptyStar} + \item \tkzcname{grEmptyGrid} + \item \tkzcname{grEmptyLadder} + \item \tkzcname{EdgeInGraphFromOneToComp} + \item \tkzcname{EdgeInGraphLoop} + \item \tkzcname{EdgeInGraphSeq} + \item \tkzcname{EdgeInGraphMod} + \item \tkzcname{EdgeInGraphMod*} + \item \tkzcname{grCompleteBipartite} + \item \tkzcname{EdgeInGraphModLoop} + \item \tkzcname{EdgeIdentity} + \item \tkzcname{EdgeIdentity*} + \item \tkzcname{EdgeFromOneToAll} + \item \tkzcname{EdgeFromOneToSeq} + \item \tkzcname{EdgeFromOneToSel} + \item \tkzcname{EdgeFromOneToComp} + \item \tkzcname{EdgeMod} + \item \tkzcname{EdgeMod*} + \item \tkzcname{EdgeDoubleMod} + \item \tkzcname{grPath} + \item \tkzcname{grCycle} + \item \tkzcname{grComplete} + \item \tkzcname{grCirculant} + \item \tkzcname{grStar} + \item \tkzcname{grSQCycle} + \item \tkzcname{grWheel} + \item \tkzcname{grLadder} + \item \tkzcname{grPrism} + \item \tkzcname{grCompleteBipartite} + \item \tkzcname{grTriangularGrid} + \item \tkzcname{grLCF} + \item \tkzcname{grWriteExplicitLabels} + \item \tkzcname{grWriteExplicitLabel} + \item \tkzcname{AssignVertexLabel} + \end{itemize} +\end{multicols} + +Classic graphs : + +\medskip + +\begin{multicols}{2} + \begin{itemize} +\item \tkzcname{grAndrasfai} +\item \tkzcname{grBalaban} +\item \tkzcname{grChvatal} +\item \tkzcname{grCocktailParty} +\item \tkzcname{grCrown} +\item \tkzcname{grCubicalGraph} +\item \tkzcname{grDesargues} +\item \tkzcname{grDodecahedral} +\item \tkzcname{grDoyle} +\item \tkzcname{grFoster} +\item \tkzcname{grFolkman} +\item \tkzcname{grFranklin} +\item \tkzcname{grGeneralizedPetersen} +\item \tkzcname{grGrotzsch} +\item \tkzcname{grHeawood} +\item \tkzcname{grIcosahedral} +\item \tkzcname{grKonisberg} +\item \tkzcname{grLevi} +\item \tkzcname{grMcGee} +\item \tkzcname{grMobiusKantor} +\item \tkzcname{grMobiusLadder} +\item \tkzcname{grOctahedral} +\item \tkzcname{grPappus} +\item \tkzcname{grPetersen} +\item \tkzcname{grRobertson} +\item \tkzcname{grRobertsonWegner} +\item \tkzcname{grTetrahedral} +\item \tkzcname{grTutteCoxeter} +\item \tkzcname{grWong} +\end{itemize} +\end{multicols} + + +See the document "NamedGraph" for all the classic named graphs that you can draw with the package \tkzname{tkz-berge.sty}. +\include{TKZdoc-berge-macros} +\include{TKZdoc-berge-macros-e} +\include{TKZdoc-berge-classic} +\include{TKZdoc-berge-style} + +\clearpage\newpage +\small\printindex + +\end{document} + + + +
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-style.tex b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-style.tex new file mode 100644 index 0000000000..cfb0934e1c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-berge-style.tex @@ -0,0 +1,58 @@ +\section{Macros and Styles} + +\subsection{How to change the background color and text color} + +You can use the following macro : + +\begin{NewMacroBox}{tkzSetUpColors}{\oarg{local options}} + +\begin{tabular}{llc} + Options & default & definition \\ +\midrule +\TOline{background} {white} {couleur du fond } +\TOline{text} {black} {couleur du texte } +\end{tabular} +\end{NewMacroBox} + + + + +\subsection{Modification of labels \tkzcname{AssignVertexLabel}} + +\begin{NewMacroBox}{AssignVertexLabel}{\oarg{local options}\var{prefix}\var{List of names}} +\begin{tabular}{lll} + Arguments & & example \\ +\midrule +\TAline{prefix} {} {\tkzcname{AssignVertexLabel\{a\}\{Alter\}}} +\TAline{List of names} {} {\tkzcname{AssignVertexLabel\{a\}\{Paris,Lyon\}}} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{llc} + Options & default & definition \\ +\midrule +\TOline{size} {\tkzcname{normalsize}} {taille de la fonte } +\TOline{color} {black} {couleur du texte } +\TOline{Math} {false} {math mode } +\end{tabular} +\end{NewMacroBox} + +\medskip +\subsubsection{AssignStyle and \tkzcname{AssignVertexLabel}} +First step : We create an empty graph without labels. + +Second step : We place labels with the macro \tkzcname{AssignVertexLabel} \begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetVertexNoLabel + \grCycle{6} + \tikzset{AssignStyle/.append style = {below=12pt}} + \AssignVertexLabel[color = blue,% + size = \footnotesize]{a}{% + Paris,Lyon,Marseille,Bordeaux,Reims,Saint-Etienne} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-gr-installation.tex b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-gr-installation.tex new file mode 100644 index 0000000000..93224a0f42 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/doc/latex/TKZdoc-gr-installation.tex @@ -0,0 +1,91 @@ +\chap{Installation}\label{ins} + +You could simply create a folder (directory) \tikz[remember picture,baseline=(n1.base)]\node [fill=green!50,draw] (n1) {prof}; which path is : \colorbox{red!50}{ texmf/tex/latex/prof}. \colorbox{green!50}{texmf} is generally the personnal folder, here ways of this folder on my two computers: + +\medskip +\begin{itemize}\setlength{\itemsep}{10pt} +\item with OS X \colorbox{blue!30}{\textbf{/Users/ego/Library/texmf}}; +\item with Ubuntu \colorbox{blue!30}{\textbf{/home/ego/texmf}}. +\end{itemize} + +If you choose a custom location for your files, I suppose that you know why! +The installation that I propose, is valid only for one user. + +\medskip +\begin{enumerate} +\item Store the files \tikz[remember picture,baseline=(n2.base)]\node [fill=green!50,draw] (n2) {tkz-arith.sty, tkz-graph.sty and tkz-berge.sty}; in the folder \colorbox{green!50}{prof}. +\item Open a terminal, then type \colorbox{red!50}{|sudo texhash|} + +\medskip +\begin{figure}[htbp] + \begin{center} + \includegraphics[scale=.5]{term.pdf} + \end{center} +\end{figure} + +\item Check that \textcolor{red}{xkeyval, ifthen and tikz 2.0} are installed because they are obligatory. +\end{enumerate} + +My folder texmf is structured as in the diagram below: + +\medskip +\begin{tikzpicture} [remember picture,rotate=90] + +\node (texmf) at (4,2) [draw,fill=blue!30 ] {texmf}; +\node (tex) at (6,0) [draw ] {tex}; +\node (doc) at (0,0) [draw ] {doc}; +\node (generic) at (7,-4) [draw ] {generic}; +\node (docgen) at (0,-4) [draw ] {generic}; +\node (latex) at (4,-4) [draw ] {latex}; +\node (pgf) at (7,-7) [draw,fill=orange] {pgf}; +\node (pre) at (6,-7) [draw,fill=orange] {pgf}; +\node (xkey) at (5,-7) [draw ] {xkeyval}; +\node (four) at (4,-7) [draw ] {fourier}; +\node (prof) at (3,-7) [draw,fill=green ] {{prof}}; +\node (etc) at (2,-7) [draw ] {etc...}; +\node (dpgf) at (0,-7) [draw,fill=orange] {pgf}; +\node (cls) at (8,-11) [draw,fill=green ] {prof.cls}; +\node (qcm) at (7,-11) [draw,fill=green ] {alterqcm.sty}; +\node (fonc) at (6,-11) [draw,fill=orange] {tkz-base.sty}; +\node (esp) at (5,-11) [draw,fill=orange] {tkz-fct.sty}; +\node (tuk) at (4,-11) [draw,fill=orange] {tkz-arith.sty}; +\node (tab) at (3,-11) [draw,fill=orange] {tkz-2d.sty}; +\node (base) at (2,-11) [draw,fill=orange] {tkz-tab.sty}; +\node (gra) at (1,-11) [draw,fill=orange] {tkz-berge.sty}; +\node (pcfg) at (0,-11) [draw,fill=green ] {prof.cfg}; +\node (ppcfg) at (-1,-11) [draw,fill=green ] {profparam.cfg}; +\node (bbp) at (-2,-11) [draw,fill=orange] {bbpage.cfg}; +\draw (doc.west) |- (4, 1); +\draw (tex.west) |- (4, 1); +\draw (latex.west) |- (6,-2); +\draw (generic.west) |- (6,-2); +\draw (xkey.west) |- (5,-6); +\draw (prof.west) |- (3,-6); +\draw (four.west) |- (4,-6); +\draw (pre.west) |- (4,-6); +\draw (etc.west) |- (4,-6); +\draw (cls.west) |- (4,-9); +\draw (qcm.west) |- (7,-9); +\draw (fonc.west) |- (6,-9); +\draw (esp.west) |- (5,-9); +\draw (tuk.west) |- (4,-9); +\draw (tab.west) |- (3,-9); +\draw (base.west) |- (2,-9); +\draw (gra.west) |- (1,-9); +\draw (pcfg.west) |- (0,-9); +\draw (ppcfg.west) |- (-1,-9); +\draw (bbp.west) |- (4,-9); +\draw[-open triangle 90] (pgf.west) -- (generic.east); +\draw[-open triangle 90] (4,1) -- (texmf.east); +\draw[-open triangle 90] (6,-2) -- (tex.east); +\draw[-open triangle 90] (4,-6) -- (latex.east); +\draw[-open triangle 90] (3,-9) -- (prof.east); +\draw[-open triangle 90] (dpgf.west) -- (docgen.east); +\draw[-open triangle 90] (docgen.west) -- (doc.east); +\end{tikzpicture} + +\begin{tikzpicture}[remember picture,overlay] + \path[->,thin,red,>=latex] (n1) edge [bend left] (prof); + \path[->,thin,red,>=latex] (n2) edge [bend left] (prof); +\end{tikzpicture} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/doc/tkz-berge-screen.pdf b/macros/latex/contrib/tkz/tkz-berge/doc/tkz-berge-screen.pdf Binary files differnew file mode 100644 index 0000000000..4ac20af32a --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/doc/tkz-berge-screen.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/Grid.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/Grid.pdf Binary files differnew file mode 100644 index 0000000000..9ef039b55d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/Grid.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/gr-Circulant.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/gr-Circulant.pdf Binary files differnew file mode 100644 index 0000000000..f9742d24c2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/gr-Circulant.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/gr-Complet-16.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/gr-Complet-16.pdf Binary files differnew file mode 100644 index 0000000000..e42c968c12 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/gr-Complet-16.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/gr-edgeingraphmodloop.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/gr-edgeingraphmodloop.pdf Binary files differnew file mode 100644 index 0000000000..2488590cc8 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/gr-edgeingraphmodloop.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/grCLadder.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/grCLadder.pdf Binary files differnew file mode 100644 index 0000000000..2255aad19d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/grCLadder.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/grDoubleMod.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/grDoubleMod.pdf Binary files differnew file mode 100644 index 0000000000..2a73aab461 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/grDoubleMod.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/grExtraChords.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/grExtraChords.pdf Binary files differnew file mode 100644 index 0000000000..b1f3b10377 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/grExtraChords.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/grLadder.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/grLadder.pdf Binary files differnew file mode 100644 index 0000000000..d67602a061 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/grLadder.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/grSQCycle.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/grSQCycle.pdf Binary files differnew file mode 100644 index 0000000000..da31c80792 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/grSQCycle.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/grStar.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/grStar.pdf Binary files differnew file mode 100644 index 0000000000..46c00b08b9 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/grStar.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/grWheel.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/grWheel.pdf Binary files differnew file mode 100644 index 0000000000..d3b1efb32d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/grWheel.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/hypercube.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/hypercube.pdf Binary files differnew file mode 100644 index 0000000000..091638a868 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/hypercube.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/hypercube_simple.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/hypercube_simple.pdf Binary files differnew file mode 100644 index 0000000000..5c183b79e6 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/hypercube_simple.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/hypercubed.pdf b/macros/latex/contrib/tkz/tkz-berge/examples/hypercubed.pdf Binary files differnew file mode 100644 index 0000000000..a1c753c7c3 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/hypercubed.pdf diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/Grid.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/Grid.tex new file mode 100644 index 0000000000..839e4a6aa0 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/Grid.tex @@ -0,0 +1,21 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} +%\usetikzlibrary{calc} +\begin{document} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{blue!60!black!30}{blue}{white} +\begin{center} + \begin{tikzpicture} + \grGrid[Math,RA=2,RB=2]{3}{5} + \end{tikzpicture} +\end{center} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-Circulant.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-Circulant.tex new file mode 100644 index 0000000000..678de92cea --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-Circulant.tex @@ -0,0 +1,51 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} + +\begin{document} + + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3.5]{4}{1} +\end{tikzpicture} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3.5]{6}{1,3} +\end{tikzpicture} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3.5]{8}{1,3} +\end{tikzpicture} +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3.5]{10}{1,3,5} +\end{tikzpicture} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \grCirculant[RA=3.5]{12}{1,3,5} +\end{tikzpicture} +\begin{tikzpicture} + \GraphInit[vstyle=Art] +\grCirculant[RA=3.5]{14}{1,3,5,7} +\end{tikzpicture} + +\begin{tikzpicture} + \GraphInit[vstyle=Art] +\grCirculant[RA=3.5]{16}{1,3,5,7} +\end{tikzpicture} +\begin{tikzpicture} + \GraphInit[vstyle=Art] +\grCirculant[RA=3.5]{21}{1} +\end{tikzpicture} +% +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-Complet-16.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-Complet-16.tex new file mode 100644 index 0000000000..e7563b31a5 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-Complet-16.tex @@ -0,0 +1,28 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} + +\begin{document} + +\begin{center} +\begin{tikzpicture} + \SetVertexNoLabel + \tikzstyle{VertexStyle}=[shape = circle, + shading = ball, + ball color = green!40!black,% + minimum size = 20pt,% + draw] + \tikzstyle{EdgeStyle} =[thick,% + double= orange,% + double distance = 1pt] + \grCirculant[RA=6]{16}{2,3,4,5,6,7,8} +\end{tikzpicture} +\end{center} +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-edgeingraphmodloop.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-edgeingraphmodloop.tex new file mode 100644 index 0000000000..86df830342 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/gr-edgeingraphmodloop.tex @@ -0,0 +1,26 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} +\begin{document} + \begin{tikzpicture} + \grEmptyCycle[RA=4]{7} + \EdgeInGraphModLoop{a}{7}{2}{1} + \end{tikzpicture} + + \begin{tikzpicture} + \grEmptyCycle[RA=4]{8} + \EdgeInGraphModLoop{a}{8}{2}{1} + \end{tikzpicture} + + \begin{tikzpicture} + \grEmptyCycle[RA=4]{8} + \EdgeInGraphModLoop{a}{8}{3}{1} + \end{tikzpicture} +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/grCLadder.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grCLadder.tex new file mode 100644 index 0000000000..626f3e7cec --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grCLadder.tex @@ -0,0 +1,39 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} + +\begin{document} + +\tikzstyle{EdgeStyle}= [thick,% + double = orange,% + double distance = 1pt] +\begin{center} + + \tikzstyle{VertexStyle}=[shape = circle, + shading = ball, + ball color = green!30, + minimum size = 24pt, + draw] + \SetVertexLabel + \tikzstyle{EdgeStyle}= [color=red!30, + double= green!50!black, + double distance = 2pt] +\begin{tikzpicture} +\grPrism[RA=5,RB=3]{6}% +\end{tikzpicture} + +\begin{tikzpicture} +\grPrism[RA=5,RB=3]{4}% +\end{tikzpicture} + + +\end{center} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/grDoubleMod.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grDoubleMod.tex new file mode 100644 index 0000000000..42c2fccbd4 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grDoubleMod.tex @@ -0,0 +1,23 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} +%\usetikzlibrary{calc} +\begin{document} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{blue!60!black!30}{blue}{white} +\begin{center} + \begin{tikzpicture} + \grCycle[RA=7]{27} + \EdgeDoubleMod{a}{27}{0}{3} + {a}{27}{13}{3}{9} + \end{tikzpicture} +\end{center} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/grExtraChords.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grExtraChords.tex new file mode 100644 index 0000000000..c3ce1095fe --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grExtraChords.tex @@ -0,0 +1,64 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} + +\begin{document} + +\tikzstyle{VertexStyle}=[shape = circle,% + fill = red!50, + very thin, + inner sep = 0pt,% + minimum size = 16pt, + draw] +\tikzstyle{EdgeStyle}= [thick,% + double= lightgray,% + double distance = 1pt] + + \SetVertexLabel +\begin{tikzpicture} + \grEmptyCycle[RA=4]{30} + \EdgeInGraphMod*{a}{30}{9}{1}{6} +\end{tikzpicture} + +\begin{tikzpicture} + \grEmptyCycle[RA=4]{30} + \EdgeInGraphMod{a}{30}{9} +\end{tikzpicture} + +\begin{tikzpicture} + \grEmptyCycle[RA=5]{30} + \EdgeInGraphMod*{a}{30}{9}{1}{6} +\end{tikzpicture} + +\begin{center} + \begin{tikzpicture}[rotate=90] + \grLCF[RA=6]{6,12}{15} + \end{tikzpicture} +\end{center} + + +\begin{center} + \begin{tikzpicture}[rotate=90] + \grLCF[RA=6]{6,12}{15} + \SetUpEdge[color=red] + \EdgeInGraphMod*{a}{30}{9}{1}{6} + \end{tikzpicture} +\end{center} + +\begin{center} + \begin{tikzpicture}[rotate=90] + \grLCF[RA=6]{6,12}{15} + \EdgeInGraphMod*{a}{30}{9}{1}{6} + \EdgeInGraphMod*{a}{30}{15}{2}{6} + \EdgeInGraphMod*{a}{30}{9}{3}{6} + \end{tikzpicture} +\end{center} + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/grLadder.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grLadder.tex new file mode 100644 index 0000000000..d2ab402846 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grLadder.tex @@ -0,0 +1,27 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} +%\usetikzlibrary{calc} +\begin{document} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{green!30}{green!50!black}{red!30} +\begin{center} +\begin{tikzpicture} +\grLadder[RA=2,RS=3]{6}% +\end{tikzpicture} +\end{center} + +\begin{center} +\begin{tikzpicture} +\grLadder[RA=3,RS=4]{4}% +\end{tikzpicture} +\end{center} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/grSQCycle.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grSQCycle.tex new file mode 100644 index 0000000000..fade3b4f64 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grSQCycle.tex @@ -0,0 +1,34 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} +%\usetikzlibrary{calc} +\thispagestyle{empty} +\begin{document} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{black!50}{darkgray}{white} + \SetVertexMath +\begin{center} + \begin{tikzpicture} + \grSQCycle[RA=5]{8}% + \end{tikzpicture} +\end{center} + +\begin{center} + \begin{tikzpicture} + \grSQCycle[RA=5]{6}% + \end{tikzpicture} +\end{center} + +\begin{center} + \begin{tikzpicture} + \grSQCycle[RA=5]{9}% + \end{tikzpicture} +\end{center} +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/grStar.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grStar.tex new file mode 100644 index 0000000000..4a0d75d919 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grStar.tex @@ -0,0 +1,37 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} + +\begin{document} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{orange!60}{red}{white} + \SetVertexMath +\begin{center} + \begin{tikzpicture} + \grEmptyStar[RA=3]{6} + \end{tikzpicture} +\end{center} + + +\begin{center} + \begin{tikzpicture} + \grStar[RA=3]{7} + \end{tikzpicture} +\end{center} + + +\begin{center} + \begin{tikzpicture} + \grStar[RA=4]{10} + \end{tikzpicture} +\end{center} + + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/grWheel.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grWheel.tex new file mode 100644 index 0000000000..28f563de4c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/grWheel.tex @@ -0,0 +1,28 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} +\begin{document} + \GraphInit[vstyle=Shade] + \SetGraphShadeColor{orange!60!black!30}{Brown}{white} +\begin{center} + \begin{tikzpicture} + \grWheel[RA=3]{5} + \end{tikzpicture} +\end{center} + + +\begin{center} + \begin{tikzpicture} + \grWheel[RA=4]{10} + \end{tikzpicture} +\end{center} + + +\end{document} diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/hypercube_simple.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/hypercube_simple.tex new file mode 100644 index 0000000000..8ae56a4875 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/hypercube_simple.tex @@ -0,0 +1,32 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} +\begin{document} +\SetVertexSimple +\SetVertexNoLabel +\begin{center} + \begin{tikzpicture} + \grCycle[RA=8]{8} + \pgfmathparse{8*(1-4*sin(22.5)*sin(22.5))} + \let\tkzbradius\pgfmathresult + \grCirculant[prefix=b,RA=\tkzbradius]{8}{3} +\makeatletter + \foreach \vx in {0,...,7}{% + \pgfmathsetcounter{tkz@gr@n}{mod(\vx+1,8)} + \pgfmathsetcounter{tkz@gr@a}{mod(\vx+7,8)} + \pgfmathsetcounter{tkz@gr@b}{mod(\thetkz@gr@n+1,8)} + \Edge(a\thetkz@gr@n)(b\thetkz@gr@b) + \Edge(b\thetkz@gr@a)(a\vx) + } +\makeatother +\end{tikzpicture} +\end{center} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/examples/latex/hypercubed.tex b/macros/latex/contrib/tkz/tkz-berge/examples/latex/hypercubed.tex new file mode 100644 index 0000000000..f5c33f4693 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/examples/latex/hypercubed.tex @@ -0,0 +1,38 @@ +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[]{article} +\usepackage[utf8]{inputenc} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{fullpage} +\usepackage[upright]{fourier} +\usepackage{tkz-berge} +\thispagestyle{empty} +\begin{document} +\tikzstyle{SimpleVertexStyle} = [shape = circle,% + fill = red,% + inner sep = 3pt,% + outer sep = 0pt,% + draw] +\SetVertexSimple +\SetVertexNoLabel + +\begin{center} + \begin{tikzpicture} + \grCycle[RA=8]{8} + \pgfmathparse{8*(1-4*sin(22.5)*sin(22.5))} + \let\tkzbradius\pgfmathresult + \grCirculant[prefix=b,RA=\tkzbradius]{8}{3} + \makeatletter + \foreach \vx in {0,...,7}{% + \pgfmathsetcounter{tkz@gr@n}{mod(\vx+1,8)} + \pgfmathsetcounter{tkz@gr@a}{mod(\vx+7,8)} + \pgfmathsetcounter{tkz@gr@b}{mod(\thetkz@gr@n+1,8)} + \Edge(a\thetkz@gr@n)(b\thetkz@gr@b) + \Edge(b\thetkz@gr@a)(a\vx) + }\makeatother + \end{tikzpicture} + +\end{center} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-berge/latex/tkz-berge.sty b/macros/latex/contrib/tkz/tkz-berge/latex/tkz-berge.sty new file mode 100644 index 0000000000..be735bc3d8 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-berge/latex/tkz-berge.sty @@ -0,0 +1,1838 @@ + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % % + % tkz-berge.sty encodage : utf8 % + % % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % % + % Créé par Alain Matthes le 08-05-2007. % + % contribution : Rafael Villarroel 2007 (RV) % + % contribution : Rafael Villarroel 2009 (RV) % + % % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + % modif Doyle form 1 + % add \setkeys[GR]{edge}{#1}% in edge's macros + % remove somme bugs with pgf 2.00 cvs + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%% Objet : Création de graphes classiques +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tkz-berge}[2011/06/01 2.00 tkz-berge for named graphs] + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\RequirePackage{tkz-graph} +\def\tkzutil@empty{} +\def\tkzutil@firstofone#1{#1} +\def\tkzutil@firstoftwo#1#2{#1} +\def\tkzutil@secondoftwo#1#2{#2} +%<--------------------------------------------------------------------------–> +\long\def\tkzutil@ifundefined#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\tkzutil@firstoftwo + \else + \expandafter\tkzutil@secondoftwo + \fi} +%\input{tkz-tools-arith.tex} +\tkzutil@ifundefined{pgfmath@function@isfactor}{% + \pgfmathdeclarefunction{isfactor}{2}{% +\begingroup +\c@pgfmath@counta#1\relax% +\c@pgfmath@countb#2\relax% +\c@pgfmath@countc#1\relax% +\divide\c@pgfmath@counta by\c@pgfmath@countb% +\multiply\c@pgfmath@counta by\c@pgfmath@countb% +\advance\c@pgfmath@countc by-\c@pgfmath@counta% +\ifnum\c@pgfmath@countc=0 \def\pgfmathresult{1}% +\else + \def\pgfmathresult{0}% + \fi +\pgfmath@smuggleone\pgfmathresult% +\endgroup} +}{} + + +\edef\tkzAtCode{\the\catcode`\@} +\catcode`\@=11\relax +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcounter{tkz@bg@cnt} +% NAMED GRAPHS +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Graphes cls +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\define@cmdkey [GR] {cl} {L}{} +\define@boolkey [GR] {cl} {Math}[true]{} +\define@boolkey [GR] {cl} {inv}[true]{} +\define@cmdkey [GR] {cl} {RA}{} +\define@cmdkey [GR] {cl} {RB}{} +\define@cmdkey [GR] {cl} {RC}{} +\define@cmdkey [GR] {cl} {RD}{} +\define@cmdkey [GR] {cl} {RE}{} +\define@cmdkey [GR] {cl} {RS}{} +\define@cmdkey [GR] {cl} {prefix}{} +\define@cmdkey [GR] {cl} {prefixx}{} +\define@cmdkey [GR] {cl} {prefixxx}{} +\define@cmdkey [GR] {cl} {prefixxxx}{} +\define@cmdkey [GR] {cl} {prefixxxxx}{} +\define@cmdkey [GR] {cl} {form}{} +\define@cmdkey [GR] {cl} {num}{} +\define@cmdkey [GR] {cl} {rotation}{} +\define@cmdkey [GR] {cl} {x}{} +\define@cmdkey [GR] {cl} {y}{} +\define@cmdkey [GR] {cl} {r}{} +\define@cmdkey [GR] {cl} {d}{} +\presetkeys [GR] {cl} {RA = 4, + RB = 3, + RC = 2, + RD = 1, + RE = 0.5, + RS = 0, + form = 1, + prefix = a, + prefixx = b, + prefixxx = c, + prefixxxx = d, + prefixxxxx = e, + num = {}, + Math = false, + x = 0, + y = 0, + r = 0, + d = 0, + rotation = 0}{} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Tools Graphes particuliers +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Some tools +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grMathSep}{_} +\newcommand*{\grLabelSep}{;} + +\newcommand*{\write@math}[3]{% + \Vertex[x = #1,y = #2,% + L = \cmdGR@cl@prefix\grMathSep{#3}]{\cmdGR@cl@prefix#3}} +\newcommand*{\write@nomath}[3]{% + \Vertex[x = #1,y = #2]{\cmdGR@cl@prefix#3}} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Empty graphs +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grEmptyCycle}{\@ifstar% + \grEmptyCycleStar% + \grEmptyCycleNoStar} +\newcommand*{\grEmptyCycleNoStar}[2][]{% + \begingroup% + \setkeys[GR]{cl}{#1}% + \pgfmathsetcounter{tkz@gr@p}{#2-1} + \edef\tkz@auxctp{\thetkz@gr@p} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \pgfmathparse{360/#2*\V@x+\cmdGR@cl@rotation} + \let\tkz@angle\pgfmathresult% +\pgfmathsetmacro{\x@result}{% + \cmdGR@cl@RA*cos(\tkz@angle)+\cmdGR@cl@r*cos(\cmdGR@cl@d)} + \pgfmathsetmacro{\y@result}{% + \cmdGR@cl@RA*sin(\tkz@angle)+\cmdGR@cl@r*sin(\cmdGR@cl@d)} + \ifGR@cl@Math% + \presetkeys [GR] {vertex} {Math = true}{}% + \Vertex[x = \x@result+\cmdGR@cl@x,% + y = \y@result+\cmdGR@cl@y,% + L = \cmdGR@cl@prefix\grMathSep{\V@x}]{\cmdGR@cl@prefix\V@x}% + \else% + \Vertex[x = \x@result+\cmdGR@cl@x,% + y = \y@result+\cmdGR@cl@y]{\cmdGR@cl@prefix\V@x}% + \fi% + }% + \endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand{\grEmptyCycleStar}[2][]{% + \begingroup% + \setkeys[GR]{cl}{#1}% + \setcounter{tkz@gr@a}{0} + \setcounter{tkz@gr@b}{0} + \foreach \V@x in {#2}{\stepcounter{tkz@gr@b}{1}} + \foreach \V@x in {#2}{% + \pgfmathsetmacro{\x@result}{% + \cmdGR@cl@RA*cos((360/\thetkz@gr@b)*\thetkz@gr@a+\cmdGR@cl@rotation)% + +\cmdGR@cl@r*cos(\cmdGR@cl@d)% + } + \pgfmathsetmacro{\y@result}{% + \cmdGR@cl@RA*sin((360/\thetkz@gr@b)*\thetkz@gr@a+\cmdGR@cl@rotation)% + +\cmdGR@cl@r*sin(\cmdGR@cl@d)% + } + \ifGR@cl@Math% + \Vertex[% + x=\x@result+\cmdGR@cl@x, + y=\y@result+\cmdGR@cl@y, + L=$\V@x$]{\cmdGR@cl@prefix\thetkz@gr@a}% + \else% + \Vertex[% + x=\x@result+\cmdGR@cl@x, + y=\y@result+\cmdGR@cl@y, + L=\V@x]{\cmdGR@cl@prefix\thetkz@gr@a}% + \fi% + \stepcounter{tkz@gr@a}% + } + \endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grEmptyPath from (RV) +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grEmptyPath}{\@ifstar% + \grEmptyPathStar% + \grEmptyPathNoStar} +\newcommand*{\grEmptyPathNoStar}[2][]{% +\begingroup% +\setkeys[GR]{cl}{#1}% +\pgfmathsetcounter{tkz@gr@a}{#2-1} +\edef\tkz@auxctp{\thetkz@gr@a} + \ifcase\cmdGR@cl@form +\or +\def\tkzb@result{0} +\foreach \V@x in {0,...,\tkz@auxctp}{% + \pgfmathsetmacro{\x@result}{\cmdGR@cl@RA*(\V@x)*cos(\cmdGR@cl@rotation)} + \pgfmathsetmacro{\y@result}{\cmdGR@cl@RA*(\V@x)*sin(\cmdGR@cl@rotation)} + \pgfmathsetmacro{\x@coord}{\x@result+\cmdGR@cl@x+\cmdGR@cl@r*cos(\cmdGR@cl@d)} + \pgfmathsetmacro{\y@coord}{\y@result+\cmdGR@cl@y+ + \cmdGR@cl@r*sin(\cmdGR@cl@d)+\cmdGR@cl@RS} + \ifGR@cl@Math% + \presetkeys [GR] {vertex} {Math = true}{}% + \ifthenelse{\equal{\cmdGR@cl@num}{}}{% + \write@math{\x@coord}{\y@coord}{\V@x}}{% + \write@math{\x@coord}{\y@coord}{\V@x\grLabelSep\cmdGR@cl@num}}% + \else + \ifthenelse{\equal{\cmdGR@cl@num}{}}{% + \write@nomath{\x@coord}{\y@coord}{\V@x}}{% + \write@nomath{\x@coord+\cmdGR@cl@x}{\y@coord}{% + \V@x\grLabelSep\cmdGR@cl@num}}% + \fi}% + \or +\foreach \V@x in {0,...,\tkz@auxctp}{% + \pgfmathsetmacro{\x@result}{% + \cmdGR@cl@RA*(2*\V@x-\thetkz@gr@a)*0.5*cos(\cmdGR@cl@rotation)} + \pgfmathsetmacro{\y@result}{% + \cmdGR@cl@RA*(2*\V@x-\thetkz@gr@a)*0.5*sin(\cmdGR@cl@rotation)} + \pgfmathsetmacro{\x@coord}{% + \x@result+\cmdGR@cl@x+\cmdGR@cl@r*cos(\cmdGR@cl@d)} + \pgfmathsetmacro{\y@coord}{% + \y@result+\cmdGR@cl@y+\cmdGR@cl@r*sin(\cmdGR@cl@d)+\cmdGR@cl@RS} + \ifGR@cl@Math% + \presetkeys [GR] {vertex} {Math = true}{}% + \ifthenelse{\equal{\cmdGR@cl@num}{}}{% + \write@math{\x@coord}{\y@coord}{\V@x}}{% + \write@math{\x@coord}{\y@coord}{\cmdGR@cl@num\grLabelSep\V@x}}% + \else + \ifthenelse{\equal{\cmdGR@cl@num}{}}{% + \write@nomath{\x@coord}{\y@coord}{\V@x}}{% + \write@nomath{\x@coord}{\y@coord}{\cmdGR@cl@num\grLabelSep\V@x}}% + \fi +}% +\fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand{\grEmptyPathStar}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \setcounter{tkz@gr@a}{0} + \ifcase\cmdGR@cl@form + \or + % form 1 + \foreach \V@x in {#2}{% + \pgfmathsetmacro{\x@result}{\cmdGR@cl@RA*\value{tkz@gr@a}*cos(\cmdGR@cl@rotation)% + +\cmdGR@cl@r*cos(\cmdGR@cl@d)}% + \pgfmathsetmacro{\y@result}{\cmdGR@cl@RA*\value{tkz@gr@a}*sin(\cmdGR@cl@rotation)% + +\cmdGR@cl@r*sin(\cmdGR@cl@d)}% + \ifGR@cl@Math% + \Vertex[% + x=\x@result+\cmdGR@cl@x, + y=\y@result+\cmdGR@cl@y, + L=$\V@x$]{\cmdGR@cl@prefix\thetkz@gr@a}% + \else% + \Vertex[% + x=\x@result+\cmdGR@cl@x, + y=\y@result+\cmdGR@cl@y, + L=\V@x]{\cmdGR@cl@prefix\thetkz@gr@a}% + \fi% + \stepcounter{tkz@gr@a}% + }% + \or + % form 2 + \setcounter{tkz@gr@a}{0} + \setcounter{tkz@gr@b}{0} + \foreach \V@x in {#2}{\stepcounter{tkz@gr@b}{1}} + \foreach \V@x in {#2}{% + \pgfmathsetmacro{\x@result}{\cmdGR@cl@RA*(2*\value{tkz@gr@a}-\value{tkz@gr@b}+1)*0.5% + *cos(\cmdGR@cl@rotation)% + +\cmdGR@cl@r*cos(\cmdGR@cl@d)% + } + \pgfmathsetmacro{\y@result}{\cmdGR@cl@RA*(2*\value{tkz@gr@a}-\value{tkz@gr@b}+1)*0.5% + *sin(\cmdGR@cl@rotation)% + +\cmdGR@cl@r*sin(\cmdGR@cl@d)% + } + \ifGR@cl@Math% + \Vertex[% + x=\x@result+\cmdGR@cl@x, + y=\y@result+\cmdGR@cl@y, + L=$\V@x$]{\cmdGR@cl@prefix\thetkz@gr@a}% + \else% + \Vertex[% + x=\x@result+\cmdGR@cl@x, + y=\y@result+\cmdGR@cl@y, + L=\V@x]{\cmdGR@cl@prefix\thetkz@gr@a}% + \fi% + \stepcounter{tkz@gr@a} + } + \fi + \endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grEmptyStar +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grEmptyStar}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \pgfmathsetcounter{tkz@gr@a}{#2-1} + \ifGR@cl@Math\presetkeys [GR] {vertex} {Math = true}{}% + \write@math{0}{0}{\thetkz@gr@a}% + \else + \write@nomath{0}{0}{\thetkz@gr@a}% + \fi + \grEmptyCycle[#1]{\thetkz@gr@a} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grEmptyGrid +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand{\grEmptyGrid}[3][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \pgfmathsetcounter{tkz@gr@a}{#2-1} + \edef\tkz@auxctpa{\thetkz@gr@a} + \pgfmathsetcounter{tkz@gr@b}{#3-1} + \edef\tkz@auxctpb{\thetkz@gr@b} + \foreach \V@x in {0,...,\tkz@auxctpa}{% + \foreach \V@y in {0,...,\tkz@auxctpb}{% + \ifGR@cl@Math\presetkeys [GR] {vertex} {Math = true}{}% + \write@math{\cmdGR@cl@RA*\V@x}{\cmdGR@cl@RB*\V@y}{\V@x\grLabelSep\V@y}% + \else + \write@nomath{\cmdGR@cl@RA*\V@x}{\cmdGR@cl@RB*\V@y}{\V@x\grLabelSep\V@y}% + \fi}% + } +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grEmptyLadder +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grEmptyLadder}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grEmptyPath[#1,RS=0]{#2} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grEmptyPath[#1,prefix=\tkzb@ptemp,RS=\tkzb@rtemp]{#2} +\endgroup% +} + + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Edges +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeInGraphFromOneToComp}[4][]{% #4 +\begingroup% + \setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@ta}{#3-1} + \edef\tkz@auxctp{\thetkz@gr@ta} + \foreach \cx in {0,...,\tkz@auxctp}{% + \ifthenelse{\equal{\cx}{#4}}{}{\Edge[#1](#2#4)(#2\cx)}% + }% +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% new tool EdgeInGraphLoop loop 0--1--2.........n--0 +% star 0--1--2.........n- +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeInGraphLoop}{\@ifstar% + \EdgeInGraphLoopStar% + \EdgeInGraphLoopNoStar} +\newcommand*{\EdgeInGraphLoopNoStar}[3][]{% #4 +\begingroup% +\setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@ta}{#3-1} + \setcounter{tkz@gr@n}{0} + \Edge[#1](#2\thetkz@gr@ta)(#2\thetkz@gr@n) + \pgfmathaddtocounter{tkz@gr@ta}{-1} + \edef\tkz@auxctp{\thetkz@gr@ta} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \stepcounter{tkz@gr@n} + \Edge[#1](#2\V@x)(#2\thetkz@gr@n)% + }% +\endgroup% +} +\newcommand*{\EdgeInGraphLoopStar}[3][]{% #4 +\begingroup% +\setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@ta}{#3-2} + \setcounter{tkz@gr@n}{0} + \edef\tkz@auxctp{\thetkz@gr@ta} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \stepcounter{tkz@gr@n} + \Edge[#1](#2\V@x)(#2\thetkz@gr@n)% + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% new tool EdgeInGraphMod replace nextmod +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeInGraphMod}{\@ifstar% + \EdgeInGraphModStar% + \EdgeInGraphModNoStar} +\newcommand*{\EdgeInGraphModNoStar}[4][]{% #2 order +\begingroup% + \setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@ta}{#3-1} + \edef\tkz@auxctp{\thetkz@gr@ta} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \pgfmathsetcounter{tkz@gr@tb}{Mod(\V@x+#4,#3)} + \Edge[#1](#2\thetkz@gr@tb)(#2\V@x)% + }% +\endgroup% +} +%#1 prefix #2 order #3 add #4 start #5 décalage +\newcommand*{\EdgeInGraphModStar}[6][]{% +\begingroup% + \setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@ta}{#5} + \whiledo{\value{tkz@gr@ta}<#3}{% + \pgfmathsetcounter{tkz@gr@n}{Mod(\thetkz@gr@ta+#4,#3)} + \Edge[#1](#2\thetkz@gr@ta)(#2\thetkz@gr@n) + \pgfmathaddtocounter{tkz@gr@ta}{#6}% + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% EdgeInGraphModLoop dep #4 add #3 mod #2 until #4 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand*{\EdgeInGraphModLoop}[5][]{% #2 order +\begingroup% + \setkeys[GR]{edge}{#1}% + \setcounter{tkz@gr@ta}{#5} + \setcounter{tkz@gr@n}{#3} + \whiledo{\not\equal{\value{tkz@gr@n}}{#5}}{% + \pgfmathsetcounter{tkz@gr@n}{Mod(\thetkz@gr@ta+#4,#3)} + \Edge[#1](#2\thetkz@gr@ta)(#2\thetkz@gr@n)% + \setcounter{tkz@gr@ta}{\thetkz@gr@n} + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% EdgeIdentity +% la version étoilée permet d'utliser une sélection +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeIdentity}{\@ifstar% + \EdgeIdentityStar% + \EdgeIdentityNoStar} +\newcommand*{\EdgeIdentityNoStar}[4][]{% +\begingroup% + \setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@e}{#4-1} + \edef\tkz@auxctp{\thetkz@gr@e} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \Edge[#1](#2\V@x)(#3\V@x)% + }% +\endgroup% +} +\newcommand*{\EdgeIdentityStar}[4][]{% +\begingroup% + \setkeys[GR]{edge}{#1}% + \foreach \V@x in {#4}{% + \Edge[#1](#2\V@x)(#3\V@x)% + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% EdgeFromOneToAll vertex #1#3 through #2 0...#2 n-1 #5 order of the graph +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeFromOneToAll}[5][]{% #4 = order of the graph +\begingroup% + \setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@e}{#5-1} + \edef\tkz@auxctp{\thetkz@gr@e} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \Edge[#1](#2#4)(#3\V@x)% + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% EdgeFromOneToSeq vertex #1#3 through #2#4...#2#5 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeFromOneToSeq}[6][]{% #4 +\begingroup% + \setkeys[GR]{edge}{#1}% + \foreach \V@x in {#5,...,#6}{% + \Edge[#1](#2#4)(#3\V@x)% + }% +\endgroup% +} %<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% EdgeFromOneToSel vertex #1#3 through #2#4...#2#5 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeFromOneToSel}[5][]{% #4 +\begingroup% + \setkeys[GR]{edge}{#1}% + \foreach \V@x in {#5}{% + \Edge[#1](#2#4)(#3\V@x)% + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% EdgeFromOneToComplement vertex #1#3 through #2#4...#2#5 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeFromOneToComp}[5][]{% +\begingroup% + \setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@e}{#5-1} + \edef\tkz@auxctp{\thetkz@gr@e} + \foreach \cx in {0,...,\tkz@auxctp}{% + \ifthenelse{\equal{\cx}{#4}}{}{\Edge[#1](#2#4)(#3\cx)}% + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% new tool EdgeMod replace nextmod +% identity with step like nextmod ??? +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeMod}{\@ifstar% + \EdgeModStar% + \EdgeModNoStar} +\newcommand*{\EdgeModNoStar}[5][]{%#3 order #4 step +\begingroup% + \setkeys[GR]{edge}{#1}% + \pgfmathsetcounter{tkz@gr@e}{#4-1} + \edef\tkz@auxctp{\thetkz@gr@e} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \pgfmathsetcounter{tkz@gr@tb}{Mod(\V@x+#5,#4)} + \Edge[#1](#2\V@x)(#3\thetkz@gr@tb)% + }% +\endgroup% +} +%#1 prefix #2 prefix #3 order #4 order inf #5 step +\newcommand*{\EdgeModStar}[6][]{% +\begingroup% + \setkeys[GR]{edge}{#1}% + \setcounter{tkz@gr@ta}{0} + \whiledo{\value{tkz@gr@ta}<#4}{% + \pgfmathsetcounter{tkz@gr@tb}{Mod(\thetkz@gr@ta+#5,#4)} + \Edge[#1](#2\thetkz@gr@ta)(#3\thetkz@gr@tb)% + \pgfmathaddtocounter{tkz@gr@ta}{#6}}% +\endgroup% +}% +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% new tool EdgeInGraphSeq sequence i--i+1--.....--j +% or i--i+k--...--j +% #1 options #2 graph #3 from #4 to +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeInGraphSeq}[4][]{% #4 +\begingroup% +\setkeys[GR]{edge}{#1}% + \foreach \V@x in {#3,...,#4}{% + \pgfmathsetcounter{tkz@gr@n}{\V@x+1} + \Edge[#1](#2\V@x)(#2\thetkz@gr@n)}% +\endgroup% +}% + +%%%%%%%%%%% NEW COMMANDS +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% new tool EdgeSeq sequence +% #1 options #2 first graph #3 second graph #4 from #5 to +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand{\EdgeSequence}[5][]{% +\begingroup% +\setkeys[GR]{edge}{#1}% + \foreach \V@x in {#4,...,#5}{% + \pgfmathsetcounter{tkz@gr@n}{\V@x+1} + \Edge[#1](#2\V@x)(#3\thetkz@gr@n)}% +\endgroup% +}% +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% EdgeDoubleMod by RV +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\EdgeDoubleMod}[9]{% +\begingroup% + \foreach \V@x in {0,...,#9}{% + \pgfmathsetcounter{tkz@gr@c}{Mod(#3+(#4*\V@x),#2)} + \pgfmathsetcounter{tkz@gr@n}{Mod(#7+(#8*\V@x),#6)} + \Edge(#1\thetkz@gr@c)(#5\thetkz@gr@n) + }% +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grPath +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grPath}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grEmptyPath[#1]{#2} + \ifthenelse{\equal{\cmdGR@cl@num}{}}{% + \ifthenelse{\equal{#2}{1}}{}{% + \EdgeInGraphLoop*{\cmdGR@cl@prefix}{#2}% + }}{% + \ifthenelse{\equal{#2}{1}}{}{% + \ifcase\cmdGR@cl@form + \or + \pgfmathsetcounter{tkz@gr@ta}{#2-2} + \setcounter{tkz@gr@n}{0} + \edef\tkz@auxctp{\thetkz@gr@ta} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \stepcounter{tkz@gr@n} + \Edge(\cmdGR@cl@prefix\V@x\grLabelSep\cmdGR@cl@num)% + (\cmdGR@cl@prefix\thetkz@gr@n\grLabelSep\cmdGR@cl@num)% + }% + \or + \EdgeInGraphLoop*{\cmdGR@cl@prefix\cmdGR@cl@num\grLabelSep}{#2} + \fi% + }} +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grGrid +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grGrid}[3][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grEmptyGrid[#1]{#2}{#3} + \pgfmathsetcounter{tkz@gr@a}{#2-2} + \edef\tkz@auxctpa{\thetkz@gr@a} + \pgfmathsetcounter{tkz@gr@b}{#3-2} + \edef\tkz@auxctpb{\thetkz@gr@b} + \foreach \V@x in {0,...,\tkz@auxctpa}{% + \foreach \V@y in {0,...,\tkz@auxctpb}{% + \pgfmathsetcounter{tkz@gr@c}{\V@x+1} + \pgfmathsetcounter{tkz@gr@d}{\V@y+1} + \Edge(\cmdGR@cl@prefix\V@x\grLabelSep\V@y)% + (\cmdGR@cl@prefix\V@x\grLabelSep\thetkz@gr@d) + \Edge(\cmdGR@cl@prefix\V@x\grLabelSep\V@y)% + (\cmdGR@cl@prefix\thetkz@gr@c\grLabelSep\V@y)% + }% + }% + \pgfmathsetcounter{tkz@gr@a}{#2-2} + \pgfmathsetcounter{tkz@gr@b}{#3-1} + \edef\tkz@auxctpa{\thetkz@gr@a} + \foreach \V@x in {0,...,\tkz@auxctpa}{% + \pgfmathsetcounter{tkz@gr@c}{\V@x+1} + \Edge(\cmdGR@cl@prefix\V@x\grLabelSep\thetkz@gr@b)% + (\cmdGR@cl@prefix\thetkz@gr@c\grLabelSep\thetkz@gr@b)% + }% + \pgfmathsetcounter{tkz@gr@a}{#2-1} + \pgfmathsetcounter{tkz@gr@b}{#3-2} + \edef\tkz@auxctpb{\thetkz@gr@b} + \foreach \V@y in {0,...,\tkz@auxctpb}{% + \pgfmathsetcounter{tkz@gr@d}{\V@y+1} + \Edge(\cmdGR@cl@prefix\thetkz@gr@a\grLabelSep\V@y)% + (\cmdGR@cl@prefix\thetkz@gr@a\grLabelSep\thetkz@gr@d)% + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grComplete +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grComplete}[2][]{% #1 options #2 ordre du graphe +\begingroup% + \setkeys[GR]{cl}{#1}% + \grEmptyCycle[#1]{#2}% + \pgfmathsetcounter{tkz@gr@a}{#2-1} + \edef\tkz@auxctp{\thetkz@gr@a} + \foreach \ia in {0,...,\tkz@auxctp}% + {\foreach \ib in {\ia,...,\tkz@auxctp} + {\Edge(\cmdGR@cl@prefix\ia)(\cmdGR@cl@prefix\ib)}% + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grCycle +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grCycle}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1} + \grEmptyCycle[#1]{#2} + \EdgeInGraphLoop{\cmdGR@cl@prefix}{#2} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grLCF +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand{\grLCF}[3][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \setcounter{tkz@gr@a}{#3} + \setcounter{tkz@gr@b}{0} + \foreach \V@x in {#2}{\stepcounter{tkz@gr@b}} + \pgfmathsetcounter{tkz@gr@c}{\thetkz@gr@a * \thetkz@gr@b} + \setcounter{tkz@gr@b}{\thetkz@gr@c} + \grCycle[#1]{\thetkz@gr@c} +%<––––––––––––––––––––––––– End Vertex ––––––––––––––––––––––––––––––––––––> + \pgfmathsetcounter{tkz@gr@a}{#3-1} + \edef\tkz@auxctp{\thetkz@gr@a} + \setcounter{tkz@gr@e}{0} + \foreach \V@k in {0,...,\tkz@auxctp}{% + \foreach \n in {#2}{% + \ifthenelse{\n < 0}{% + \pgfmathsetcounter{tkz@gr@b}{\n+\thetkz@gr@c}}{% + \pgfmathsetcounter{tkz@gr@b}{\n}} + \pgfmathsetcounter{tkz@gr@n}% + {Mod(\thetkz@gr@e+\thetkz@gr@b,\thetkz@gr@c)} + \Edge(\cmdGR@cl@prefix\thetkz@gr@e)(\cmdGR@cl@prefix\thetkz@gr@n) + \stepcounter{tkz@gr@e}% + }% + }% +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grStar +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grStar}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grEmptyStar[#1]{#2} + \pgfmathsetcounter{tkz@gr@p}{#2-1} + \EdgeInGraphFromOneToComp{\cmdGR@cl@prefix}{#2}{\thetkz@gr@p} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grWheel +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grWheel}[2][]{ +\begingroup% + \setkeys[GR]{cl}{#1}% + \grStar[#1]{#2} + \pgfmathsetcounter{tkz@gr@e}{#2-1} + \EdgeInGraphLoop{\cmdGR@cl@prefix}{\thetkz@gr@e} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grSQCircle +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grSQCycle}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grCycle[#1]{#2}% + \EdgeInGraphMod{\cmdGR@cl@prefix}{#2}{2} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grLadder +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grLadder}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grPath[#1,RS=0]{#2} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RS} + \grPath[#1,prefix=\tkzb@ptemp,RS=\tkzb@rtemp]{#2} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{#2} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grPrism +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grPrism}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grCycle[#1]{#2} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grCycle[#1,RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{#2} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{#2} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grCompleteBipartite +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grCompleteBipartite}[3][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \pgfmathsetcounter{tkz@gr@a}{#2-1} + \pgfmathparse{(\cmdGR@cl@RA * \thetkz@gr@a) /2} + \let\tkzRAxpos\pgfmathresult% + \pgfmathsetcounter{tkz@gr@a}{#3-1} + \pgfmathparse{(\cmdGR@cl@RB * \thetkz@gr@a) /2} + \let\tkzRBxpos\pgfmathresult% + \ifdim\tkzRBxpos pt > \tkzRAxpos pt\relax% + \pgfmathadd{\tkzRBxpos}{-\tkzRAxpos} + \let\tkzaxpos\pgfmathresult% + \def\tkzbxpos{0} + \else% + \pgfmathadd{\tkzRAxpos}{-\tkzRBxpos} + \let\tkzbxpos\pgfmathresult% + \def\tkzaxpos{0} + \fi% + \begin{scope}[xshift=\tkzaxpos cm] + \grEmptyPath[#1,RS=0]{#2} + \end{scope} + \begin{scope}[xshift=\tkzbxpos cm] + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RS} + \edef\tkzb@stemp{\cmdGR@cl@RB} + \grEmptyPath[#1,RA=\tkzb@stemp,prefix=\tkzb@ptemp,RS=\tkzb@rtemp]{#3} + \end{scope} + \pgfmathsetcounter{tkz@gr@p}{#2-1} + \pgfmathsetcounter{tkz@gr@e}{#3-1} + \edef\tkz@auxctp{\thetkz@gr@e} + \foreach \cpx in {0,...,\tkz@auxctp}{% + \EdgeFromOneToAll{\cmdGR@cl@prefixx}{\cmdGR@cl@prefix}{\cpx}{#2} + }% +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grTriangularGrid +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grTriangularGrid}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1} + \ifcase\cmdGR@cl@form + \or +%<––––––––––––––––––––– form 1 equilateral triangle ––––––––––––––––––––––––> + \pgfmathsetcounter{tkz@gr@a}{#2-1} + %\pgfmathsetcounter{tkz@gr@b}{#2} + \edef\tkz@auxctp{\thetkz@gr@a} + \foreach \lg in {0,...,\tkz@auxctp}{% + \pgfmathsetcounter{tkz@gr@b}{#2-\lg} + \setcounter{tkz@gr@b}{\thetkz@gr@b} + \edef\tkzb@rtemp{\cmdGR@cl@RA} + \edef\tkzb@ptemp{\cmdGR@cl@prefix} + \pgfmathmultiply{\cmdGR@cl@RA}{\lg} + \let\myresult\pgfmathresult + \pgfmathparse{\cmdGR@cl@RA*\lg/2} + \let\tkzaxpos\pgfmathresult + \begin{scope}[xshift=\tkzaxpos cm] + \grPath[#1,% + RA = \tkzb@rtemp,% + RS = \myresult,% + prefix = \tkzb@ptemp,% + num = \lg]{\thetkz@gr@b}% + \end{scope}% + } + \or +%<––––––––––––––––––––––––––– form 2 right triangle ––––––––––––––––––––––––> + \pgfmathsetcounter{tkz@gr@a}{#2-1} + % \pgfmathsetcounter{tkz@gr@b}{#2} + \edef\tkz@auxctp{\thetkz@gr@a} + \foreach \lg in {0,...,\tkz@auxctp}{% + \pgfmathsetcounter{tkz@gr@b}{#2-\lg} + \setcounter{tkz@gr@b}{\thetkz@gr@b} + \edef\tkzb@rtemp{\cmdGR@cl@RA} + \edef\tkzb@ptemp{\cmdGR@cl@prefix} + \pgfmathmultiply{\cmdGR@cl@RA}{\lg} + \let\myresult\pgfmathresult + \grPath[#1,% + RA = \tkzb@rtemp,% + RS = \myresult,% + prefix = \tkzb@ptemp,% + num = \lg,form=1]{\thetkz@gr@b}% + } + \or + \pgfmathsetcounter{tkz@gr@a}{#2-1} + \pgfmathsetcounter{tkz@gr@b}{#2} + \edef\tkz@auxctp{\thetkz@gr@a} + \foreach \lg in {0,...,\tkz@auxctp}{% + \pgfmathsetcounter{tkz@gr@b}{#2-\lg} + \setcounter{tkz@gr@b}{\thetkz@gr@b} + \edef\tkzb@rtemp{\cmdGR@cl@RA} + \edef\tkzb@ptemp{\cmdGR@cl@prefix} + \pgfmathmultiply{\cmdGR@cl@RA}{\lg} + \let\myresult\pgfmathresult + \begin{scope}[xshift=\myresult cm] + \grPath[#1,% + RA = \tkzb@rtemp,% + RS = \myresult,% + prefix = \tkzb@ptemp,% + num = \lg,form=1]{\thetkz@gr@b}% + \end{scope}% + } + \fi% + \pgfmathsetcounter{tkz@gr@a}{#2-2} + \edef\tkz@auxctp{\thetkz@gr@a} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \pgfmathsetcounter{tkz@gr@e}{\thetkz@gr@a-\V@x} + \edef\tkz@auxctpb{\thetkz@gr@e} + \foreach \V@y in {0,...,\tkz@auxctpb}{% + \pgfmathsetcounter{tkz@gr@b}{\V@y+1} + \Edge(\cmdGR@cl@prefix\V@x\grLabelSep\V@y)% + (\cmdGR@cl@prefix\V@x\grLabelSep\thetkz@gr@b) + \pgfmathsetcounter{tkz@gr@p}{\V@x+1} + \Edge(\cmdGR@cl@prefix\V@x\grLabelSep\thetkz@gr@b)% + (\cmdGR@cl@prefix\thetkz@gr@p\grLabelSep\V@y) + }% + } +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grHeawood +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grHeawood}[1][]{% #1 options #2 ordre du graphe +\begingroup% + \setkeys[GR]{cl}{#1}% + \grCycle[#1]{14} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{14}{5}{0}{2} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grCirculant #1 option #2 vertex #3 add k +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grCirculant}[3][]{% +\begingroup% + \setkeys[GR]{cl}{#1} + \grEmptyCycle[#1]{#2}% + \pgfmathisprime{#2}% + \ifnum\pgfmathresult=1\relax + \foreach \kci in {#3}{% + \EdgeInGraphMod{\cmdGR@cl@prefix}{#2}{\kci}}% + \else + \foreach \kci in {#3}{% + \pgfmathisfactor{#2}{\kci}% + \ifnum\pgfmathresult=1\relax + \pgfmathsetcounter{tkz@gr@a}{\kci-1} + \edef\tkz@auxctp{\thetkz@gr@a} + \foreach \start in {0,...,\tkz@auxctp}{% + \setcounter{tkz@gr@i}{\start}% + \setcounter{tkz@gr@n}{#2}% + \whiledo{\not\equal{\value{tkz@gr@n}}{\start}}{% + \pgfmathsetcounter{tkz@gr@n}{Mod(\thetkz@gr@i+\kci,#2)} + \Edge(\cmdGR@cl@prefix\thetkz@gr@i)% + (\cmdGR@cl@prefix\thetkz@gr@n)% + \pgfmathsetcounter{tkz@gr@i}{\thetkz@gr@n}% + }% + }% + \else + \EdgeInGraphMod{\cmdGR@cl@prefix}{#2}{\kci} + \fi + }% + \fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grPetersenG +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grGeneralizedPetersen}[3][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grCycle[#1]{#2} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@pptemp{\cmdGR@cl@prefixx} + \edef\tkzb@ptemp{\cmdGR@cl@prefix} + \grCirculant[#1,RA=\tkzb@rtemp,prefix=\tkzb@pptemp]{#2}{#3} + \EdgeIdentity{\tkzb@ptemp}{\cmdGR@cl@prefixx}{#2} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grPetersen +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grStartwo}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \pgfmathsetcounter{tkz@gr@e}{3*#2-2} + \pgfmathsetcounter{tkz@gr@a}{3*#2-1} + \grEmptyCycle[#1]{\thetkz@gr@a} + \EdgeInGraphMod{\cmdGR@cl@prefix}{\thetkz@gr@a}{#2}% +\endgroup% +} + +\newcommand*{\grPetersen}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \ifcase\cmdGR@cl@form + \or + \grCycle[#1]{5}% + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grStartwo[#1,RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{2} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{5} + \or + \grCycle[#1]{6} + \begin{scope}[rotate=30] + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grStar[#1,RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{4} + \end{scope} + \setcounter{tkz@gr@a}{2} + \foreach \V@x in {0,...,5}{% + \ifthenelse{\equal{\thetkz@gr@a}{-1}}{% + \setcounter{tkz@gr@a}{2}}{% + }% + \Edge(\cmdGR@cl@prefix\V@x)(\cmdGR@cl@prefixx\thetkz@gr@a) + \addtocounter{tkz@gr@a}{-1}% + }% + \or + \grEmptyStar[#1]{10} + \EdgeInGraphLoop{\cmdGR@cl@prefix}{9} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{9}{4}{0}{3} + \foreach \V@x in {2,5,8}{% + \Edge(\cmdGR@cl@prefix\V@x)(\cmdGR@cl@prefix 9)}% + \fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grPlatonic +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grTetrahedral}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \begin{scope}[rotate=90] + \grWheel[#1]{4}% + \end{scope} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grOctahedral +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grOctahedral}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grComplete[#1]{3}% + \begin{scope}[rotate=-60] + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grComplete[#1,RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{3}% + \end{scope} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{3} + \EdgeMod{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{3}{1} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grCubicalGraph +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grCubicalGraph}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grCycle[#1]{4} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grCycle[#1,RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{4} + \ifcase\cmdGR@cl@form + \or + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{4} + \or + \EdgeMod*{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{4}{1}{2} + \EdgeMod*{\cmdGR@cl@prefixx}{\cmdGR@cl@prefix}{4}{1}{2} + \fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grIcosahedral +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grIcosahedral}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \ifcase\cmdGR@cl@form + \or + \grCycle[#1]{6}% + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grCirculant[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{6}{2} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{6} + \EdgeMod{\cmdGR@cl@prefixx}{\cmdGR@cl@prefix}{6}{1} + \EdgeMod{\cmdGR@cl@prefixx}{\cmdGR@cl@prefix}{6}{-1} + \or + \grCycle[#1]{3} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{6}% + \begin{scope}[rotate=60] + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \grCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{3}% + \end{scope} + \setcounter{tkz@gr@a}{2} + \foreach \st in {5,0,1}{% + \foreach \v in {0,1,2}{% + \pgfmathsetcounter{tkz@gr@n}{Mod((\thetkz@gr@a*\v)+\st,6)}% + \Edge(\cmdGR@cl@prefix\v)(\cmdGR@cl@prefixx\thetkz@gr@n) + }% + }% + \setcounter{tkz@gr@a}{2} + \foreach \v in {0,1,2}{% + \foreach \st in {0,1,2}{% + \pgfmathsetcounter{tkz@gr@n}{Mod(\thetkz@gr@a*\v+\st,6)}% + \Edge(\cmdGR@cl@prefixxx\v)(\cmdGR@cl@prefixx\thetkz@gr@n) + }% + }% + \fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grDodecahedral +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grDodecahedral}[1][]{% +\begingroup% +\setkeys[GR]{cl}{#1}% + \ifcase\cmdGR@cl@form + \or + \grCycle[#1]{10} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grCirculant[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{10}{2} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{10} + \or + \grCycle[#1]{5} + \begin{scope}[rotate=36] + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \grEmptyCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{5} + \end{scope} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grEmptyCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{5} + \begin{scope}[rotate=36] + \edef\tkzb@rtemp{\cmdGR@cl@RD} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxxx} + \grCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{5}% + \end{scope} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{5} + \EdgeIdentity{\cmdGR@cl@prefixxx}{\cmdGR@cl@prefixxxx}{5} + \EdgeIdentity{\cmdGR@cl@prefixx}{\cmdGR@cl@prefixxx}{5} + \EdgeMod{\cmdGR@cl@prefixx}{\cmdGR@cl@prefixxx}{5}{-1} + \or + \grCycle[#1]{5} + \begin{scope}[rotate=36] + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \grEmptyCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{5} + \end{scope} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{10} + \EdgeInGraphLoop{\cmdGR@cl@prefixxx}{5} + \EdgeDoubleMod{\cmdGR@cl@prefix}{5}{0}{1}% + {\cmdGR@cl@prefixx}{10}{0}{2}{5} + \EdgeDoubleMod{\cmdGR@cl@prefixxx}{5}{0}{1}% + {\cmdGR@cl@prefixx}{10}{1}{2}{5} + \or + \grLCF[#1]{10,7,4,-4,-7,10,-4,7,-7,4}{2} + \or + \grCycle[#1]{10} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grEmptyCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{6} + \begin{scope}[rotate=45] + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \grEmptyCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{4}% + \end{scope} + \setcounter{tkz@gr@a}{0} + \foreach \v in {1,4,6,9}{% + \Edge(\cmdGR@cl@prefix\v)(\cmdGR@cl@prefixxx\thetkz@gr@a) + \stepcounter{tkz@gr@a} + }% + \setcounter{tkz@gr@a}{0} + \foreach \v in {2,1,5,4}{% + \Edge(\cmdGR@cl@prefixx\v)(\cmdGR@cl@prefixxx\thetkz@gr@a) + \stepcounter{tkz@gr@a} + }% + \setcounter{tkz@gr@a}{0} + \foreach \v in {0,2,3,5,7,8}{% + \Edge(\cmdGR@cl@prefix\v)(\cmdGR@cl@prefixx\thetkz@gr@a) + \stepcounter{tkz@gr@a} + }% + \Edge(\cmdGR@cl@prefixxx0)(\cmdGR@cl@prefixxx3) + \Edge(\cmdGR@cl@prefixxx1)(\cmdGR@cl@prefixxx2) + \Edge(\cmdGR@cl@prefixx0)(\cmdGR@cl@prefixx1) + \Edge(\cmdGR@cl@prefixx0)(\cmdGR@cl@prefixx5) + \Edge(\cmdGR@cl@prefixx3)(\cmdGR@cl@prefixx2) + \Edge(\cmdGR@cl@prefixx3)(\cmdGR@cl@prefixx4) +\fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grMobiusKantor +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grMobiusKantor}[1][]{% #1 options #2 ordre du graphe +\begingroup% + \setkeys[GR]{cl}{#1} + \ifcase\cmdGR@cl@form + \or + \grCycle[#1]{16} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{16}{5}{0}{2} + \or + \grCycle[#1]{8} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grCirculant[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{8}{3} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{8} + \or + \grCirculant[#1]{8}{3} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grCycle[#1,RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{8} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{8} + \fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grMoebiusLadder +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grMobiusLadder}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1} + \grEmptyCycle[#1]{#2} + \pgfmathsetcounter{tkz@gr@p}{#2-1} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \grEmptyCycle[RA=\tkzb@rtemp,prefix=\tkzb@ptemp]{#2}% + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{#2} + \EdgeInGraphLoop*{\cmdGR@cl@prefix}{#2} + \EdgeInGraphLoop*{\cmdGR@cl@prefixx}{#2} + \Edge(\cmdGR@cl@prefix0)(\cmdGR@cl@prefixx\thetkz@gr@p) + \Edge(\cmdGR@cl@prefixx0)(\cmdGR@cl@prefix\thetkz@gr@p) +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grCocktailParty +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grCocktailParty}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \pgfmathsetcounter{tkz@gr@p}{#2-1} + \grPath[#1,RS=0]{#2} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RS} + \grPath[#1,prefix=\tkzb@ptemp,RS=\tkzb@rtemp]{#2} + \edef\tkz@auxctp{\thetkz@gr@p} + \foreach \cpx in {0,...,\tkz@auxctp}{% + \EdgeFromOneToComp{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{\cpx}{#2} + } +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grCrown +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grCrown}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \pgfmathsetcounter{tkz@gr@p}{#2-1} + \grEmptyPath[#1,RS=0]{#2} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RS} + \grEmptyPath[#1,prefix=\tkzb@ptemp,RS=\tkzb@rtemp]{#2} + \edef\tkz@auxctp{\thetkz@gr@p} + \foreach \cpx in {0,...,\thetkz@gr@p}{% + \EdgeFromOneToComp{\cmdGR@cl@prefix}{\cmdGR@cl@prefixx}{\cpx}{#2} + } +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grMcGee +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grMcGee}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{-12,7,-7}{8} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grRobertson +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grRobertson}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{8,4,7,4,8,5,7,4,7,8,4,5,7,8,4,8,4,8,4}{1} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grRobertsonWegner +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grRobertsonWegner}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{6,12}{15} + \EdgeInGraphMod{\cmdGR@cl@prefix}{30}{9}{1}{6} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{30}{15}{2}{6} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{30}{9}{3}{6} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grDoyle +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grDoyle}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \ifcase\cmdGR@cl@form + \or + \grCycle[#1]{9} + \begin{scope}[rotate=18] + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grCirculant[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{9}{2} + \end{scope} + \EdgeMod{\cmdGR@cl@prefixx}{\cmdGR@cl@prefix}{9}{1} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \grCirculant[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{9}{4} + \EdgeIdentity{\cmdGR@cl@prefix}{\cmdGR@cl@prefixxx}{9} + \EdgeMod{\cmdGR@cl@prefixx}{\cmdGR@cl@prefixxx}{9}{1} + \or + \grCycle[#1]{27} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{0}{3} + {\cmdGR@cl@prefix}{27}{13}{3}{9} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{1}{3} + {\cmdGR@cl@prefix}{27}{5}{3}{9} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{0}{3} + {\cmdGR@cl@prefix}{27}{20}{3}{9} + \or + \grCycle[#1]{27} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{17}{1} + {\cmdGR@cl@prefix}{27}{10}{-2}{4} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{26}{1} + {\cmdGR@cl@prefix}{27}{19}{-2}{4} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{8}{1} + {\cmdGR@cl@prefix}{27}{1}{-2}{4} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{4}{1} + {\cmdGR@cl@prefix}{27}{27}{-2}{3} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{8}{1} + {\cmdGR@cl@prefix}{27}{1}{-2}{4} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{14}{1} + {\cmdGR@cl@prefix}{27}{7}{-2}{2} + \EdgeDoubleMod{\cmdGR@cl@prefix}{27}{23}{1} + {\cmdGR@cl@prefix}{27}{16}{-2}{2} + \Edge(\cmdGR@cl@prefix9)(\cmdGR@cl@prefix13)% + \Edge(\cmdGR@cl@prefix18)(\cmdGR@cl@prefix22)% + \fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grDesargues +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grDesargues}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \ifcase\cmdGR@cl@form + \or + \grLCF[#1]{5,-5,9,-9}{5} + \or + \grGeneralizedPetersen[#1]{10}{3} + \fi +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grKonisberg +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% #1 prefix #2 indice #2 prefix #3 indice choisie entre #4 et #5 ... +\newcommand{\grKonisberg}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grCycle[#1]{4} + \Edge[style={bend left}](\cmdGR@cl@prefix1)(\cmdGR@cl@prefix2) + \Edge[style={bend left}](\cmdGR@cl@prefix2)(\cmdGR@cl@prefix3) + \Edge(\cmdGR@cl@prefix0)(\cmdGR@cl@prefix2) +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grWong +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand{\grWong}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{8,4,12,4,8,4}{5} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{30}{15}{0}{3} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{30}{16}{1}{6} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{30}{18}{4}{6} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grTutte +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand{\grTutteCoxeter}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{-13,-9,7,-7,9,13}{5} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grFoster +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand{\grFoster}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{17,-9,37,-37,9,-17}{15} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grFolkman +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand{\grFolkman}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{5,-7,-7,5}{5} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grFranklin +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand{\grFranklin}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{5,-5}{6} +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grNauru +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand{\grNauru}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{5, −9, 7, −7, 9, −5}{4} +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grDick +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand{\grDick}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{5,-5,13,-13}{8} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grHarries +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\newcommand{\grHarries}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \grLCF[#1]{-29,-19,-13,13,21,-27,27,33,-13,13,19,-21,-33,29}{5} +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grAndrasfai +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcounter{tkza@tmp} + \newcommand*{\grAndrasfai}[2][]{% + \begingroup + \setkeys[GR]{cl}{#1}% + \pgfmathsetcounter{tkz@bg@cnt}{3*#2-1} + \grEmptyCycle[#1]{\thetkz@bg@cnt} + \pgfmathsetcounter{tkza@tmp}{\thetkz@bg@cnt/2} + \pgfmathsetcounter{tkza@tmp}{\thetkz@bg@cnt+1} + \pgfmathsetcounter{tkz@gr@p}{1} + \whiledo{\value{tkz@gr@p} < \value{tkza@tmp}}{% + \EdgeInGraphMod*{\cmdGR@cl@prefix}{\thetkz@bg@cnt}{\thetkz@gr@p}{0}{1} + \pgfmathsetcounter{tkz@gr@p}{\thetkz@gr@p+3} + } +\endgroup +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grGrotzsch +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grGrotzsch}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \ifcase\cmdGR@cl@form + \or + \begin{scope}[rotate=18]% + \grStar[#1]{6}% + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{5}% + \Edges(\cmdGR@cl@prefix0,\cmdGR@cl@prefixx1,% + \cmdGR@cl@prefix2,\cmdGR@cl@prefixx3,% + \cmdGR@cl@prefix4,\cmdGR@cl@prefixx0,% + \cmdGR@cl@prefix1,\cmdGR@cl@prefixx2,% + \cmdGR@cl@prefix3,\cmdGR@cl@prefixx4,\cmdGR@cl@prefix0) + \end{scope} + \or + \begin{scope}[rotate=18]% + \grStar[#1]{6}% + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \begin{scope}[rotate=-36]% + \grCirculant[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{5}{2}% + \end{scope} + \EdgeDoubleMod{a}{5}{0}{1}% + {b}{5}{1}{1}{4} + \EdgeIdentity{a}{b}{5} + \end{scope} +\fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grLevi +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grLevi}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \ifcase\cmdGR@cl@form + \or + \grLCF[#1]{-13,-9,7,-7,9,13}{5} + \or + \grCycle[#1]{10} + \EdgeInGraphMod{\cmdGR@cl@prefix}{10}{5} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{10} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{10} + \EdgeInGraphMod{\cmdGR@cl@prefixxx}{10}{4} +\fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grPappus +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grPappus}[1][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \ifcase\cmdGR@cl@form +\or + \grLCF[#1]{5,7,-7,7,-7,-5}{3} +\or + \begin{scope}[rotate=30]% + \grCycle[#1]{6} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{6} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \grCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{6} + \EdgeDoubleMod{\cmdGR@cl@prefixxx}{6}{0}{2}% + {\cmdGR@cl@prefixx}{6}{5}{2}{2} + \EdgeDoubleMod{\cmdGR@cl@prefixxx}{6}{5}{2}% + {\cmdGR@cl@prefix}{6}{1}{2}{2} + \EdgeDoubleMod{\cmdGR@cl@prefixx}{6}{0}{2}% + {\cmdGR@cl@prefix}{6}{0}{2}{2} +\end{scope} +\or + \begin{scope}[rotate=30] + \grCycle[#1]{6} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grCirculant[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{6}{2} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{6} + \EdgeIdentity{\cmdGR@cl@prefixx}{\cmdGR@cl@prefix}{6} + \EdgeInGraphMod{\cmdGR@cl@prefixxx}{6}{3} +\end{scope} +\fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grChvatal +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grChvatal}[1][]{% +\begingroup% +\setkeys[GR]{cl}{#1}% +\ifcase\cmdGR@cl@form +\or + \begin{scope}[rotate=45] + \grCycle[#1]{4} + \end{scope} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \begin{scope}[rotate=22.25] + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{8} + \end{scope} + \EdgeInGraphMod{\cmdGR@cl@prefixx}{8}{4} + \EdgeInGraphMod*{\cmdGR@cl@prefixx}{8}{1}{1}{2} + \EdgeInGraphMod*{\cmdGR@cl@prefixx}{8}{3}{1}{2} + \EdgeDoubleMod{\cmdGR@cl@prefix}{4}{0}{1}% + {\cmdGR@cl@prefixx}{8}{1}{2}{3} + \EdgeDoubleMod{\cmdGR@cl@prefix}{4}{0}{1}% + {\cmdGR@cl@prefixx}{8}{0}{2}{3} +\or + \begin{scope}[rotate=18] + \grCycle[#1]{5} + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{5} + \end{scope} + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{2} + \EdgeDoubleMod{\cmdGR@cl@prefix}{5}{0}{1}% + {\cmdGR@cl@prefixx}{5}{1}{1}{4} + \EdgeDoubleMod{\cmdGR@cl@prefix}{5}{0}{1}% + {\cmdGR@cl@prefixx}{5}{4}{1}{4} + \EdgeFromOneToSel{\cmdGR@cl@prefixxx}{\cmdGR@cl@prefixx}{0}{4,0,1} + \EdgeFromOneToSel{\cmdGR@cl@prefixxx}{\cmdGR@cl@prefixx}{1}{1,2,3} + \Edge(\cmdGR@cl@prefixx3)(\cmdGR@cl@prefixx4) + \Edge(\cmdGR@cl@prefixx0)(\cmdGR@cl@prefixxx1) + \Edge(\cmdGR@cl@prefixx2)(\cmdGR@cl@prefixxx0) +\or + \grCycle[#1]{12} + \Edges(\cmdGR@cl@prefix0,\cmdGR@cl@prefix6,\cmdGR@cl@prefix3,% + \cmdGR@cl@prefix8,\cmdGR@cl@prefix11,\cmdGR@cl@prefix5,% + \cmdGR@cl@prefix2,\cmdGR@cl@prefix9,\cmdGR@cl@prefix0) + \Edges(\cmdGR@cl@prefix1,\cmdGR@cl@prefix7,\cmdGR@cl@prefix10,% + \cmdGR@cl@prefix4,\cmdGR@cl@prefix1) +\fi +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grBalaban +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\newcommand*{\grBalaban}[1][]{% +\begingroup% +\setkeys[GR]{cl}{#1}% +\ifcase\cmdGR@cl@form +\or + \grCycle[#1]{50} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{50}{9}{3}{5} + \EdgeInGraphMod*{\cmdGR@cl@prefix}{50}{25}{0}{5} + \begin{scope}[rotate=12] + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grCirculant[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{10}{3} + \end{scope} + \begin{scope}[rotate=24] + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \grCirculant[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{10}{3} + \end{scope} + \EdgeDoubleMod{\cmdGR@cl@prefix}{50}{1}{5}% + {\cmdGR@cl@prefixx}{10}{0}{1}{10} + \EdgeDoubleMod{\cmdGR@cl@prefix}{50}{4}{5}% + {\cmdGR@cl@prefixxx}{10}{0}{1}{10} +\or + \begin{scope}[rotate=9] + \grCycle[#1]{10} + \end{scope} + \begin{scope}[rotate=-9] + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{10} + \end{scope} + \begin{scope}[rotate=6] + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{30} + \EdgeInGraphMod*{\cmdGR@cl@prefixxx}{30}{1}{0}{3} + \EdgeInGraphMod*{\cmdGR@cl@prefixxx}{30}{1}{1}{3} + \EdgeInGraphMod*{\cmdGR@cl@prefixxx}{30}{15}{1}{3} + \end{scope} + \begin{scope}[rotate=9] + \edef\tkzb@ptemp{\cmdGR@cl@prefixxxx} + \edef\tkzb@rtemp{\cmdGR@cl@RD} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{20} + \EdgeInGraphMod*{\cmdGR@cl@prefixxxx}{20}{7}{0}{2} + \EdgeInGraphMod*{\cmdGR@cl@prefixxxx}{20}{5}{1}{2} + \end{scope} + \EdgeDoubleMod{\cmdGR@cl@prefix}{10}{0}{1} + {\cmdGR@cl@prefixxx}{30}{0}{3}{9} + \EdgeDoubleMod{\cmdGR@cl@prefixx}{10}{0}{1}% + {\cmdGR@cl@prefixxx}{30}{29}{3}{9} + \EdgeDoubleMod{\cmdGR@cl@prefixxx}{30}{0}{3}% + {\cmdGR@cl@prefixxxx}{20}{0}{2}{9} + \EdgeDoubleMod{\cmdGR@cl@prefixxx}{30}{2}{3}% + {\cmdGR@cl@prefixxxx}{20}{1}{2}{9} +\or +\grEmptyCycle[#1]{10} +\begin{scope}[rotate=9] + \edef\tkzb@ptemp{\cmdGR@cl@prefixx} + \edef\tkzb@rtemp{\cmdGR@cl@RB} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{20} +\end{scope} +\begin{scope}[rotate=13] + \edef\tkzb@ptemp{\cmdGR@cl@prefixxx} + \edef\tkzb@rtemp{\cmdGR@cl@RC} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{10} +\end{scope} +\begin{scope}[rotate=-13] + \edef\tkzb@ptemp{\cmdGR@cl@prefixxxx} + \edef\tkzb@rtemp{\cmdGR@cl@RD} + \grEmptyCycle[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{10} +\end{scope} +\begin{scope}[rotate=9] + \edef\tkzb@ptemp{\cmdGR@cl@prefixxxxx} + \edef\tkzb@rtemp{\cmdGR@cl@RE} + \grCirculant[#1,prefix=\tkzb@ptemp,RA=\tkzb@rtemp]{20}{6} +\end{scope} + \EdgeIdentity{\cmdGR@cl@prefixx}{\cmdGR@cl@prefixxxxx}{20} + \EdgeDoubleMod{\cmdGR@cl@prefix}{10}{0}{1}% + {\cmdGR@cl@prefixx}{20}{0}{2}{10} + \EdgeDoubleMod{\cmdGR@cl@prefix}{10}{0}{1}% + {\cmdGR@cl@prefixx}{20}{19}{2}{10} + \EdgeInGraphMod{\cmdGR@cl@prefix}{10}{5} + \EdgeDoubleMod{\cmdGR@cl@prefixxx}{10}{0}{1}% + {\cmdGR@cl@prefixx}{20}{0}{2}{10} + \EdgeDoubleMod{\cmdGR@cl@prefixxxx}{10}{0}{1}% + {\cmdGR@cl@prefixx}{20}{19}{2}{10} + \EdgeDoubleMod{\cmdGR@cl@prefixxxx}{10}{0}{1}% + {\cmdGR@cl@prefixxx}{10}{1}{1}{10} + \EdgeDoubleMod{\cmdGR@cl@prefixxxx}{10}{1}{1}% + {\cmdGR@cl@prefixxx}{10}{0}{1}{10} +\fi +\endgroup% +} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Labels +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +% #2 label/prefix/num +\define@cmdkey [GR] {WL} {color}[black]{} +\define@cmdkey [GR] {WL} {labelstyle}{} +\define@cmdkey [GR] {WL} {size}{} +\define@cmdkey [GR] {WL} {style}{} +\presetkeys [GR] {WL} {color = black,% + labelstyle = {},% + size = {},% + style = {}}{} +\newcommand{\grWriteExplicitLabels}[2][]{% +\begingroup% + \setkeys[GR]{WL}{#1}% + \foreach \text/\where in {#2}{% + \node at (\where) {\text}; + }% +\endgroup% +} +\newcommand{\grWriteExplicitLabel}[2][]{% +\begingroup% + \setkeys[GR]{cl}{#1}% + \node at (\where) {\text}; +\endgroup% +}% +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% AssignVertexLabel +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\tikzset{AssignStyle/.style={}} +\define@cmdkey [GR] {AVL} {color}{} +\define@cmdkey [GR] {AVL} {size}{} +\define@cmdkey [GR] {AVL} {mathsize}{} +\define@boolkey[GR] {AVL} {Math}[true]{} +\presetkeys [GR] {AVL} {size = \normalsize,% + mathsize = \displaystyle,% + color = black,% + Math = false}{} \newcommand*{\AssignVertexLabel}[3][]{% +\begingroup% + \setkeys[GR]{AVL}{#1} + \foreach \name [count=\xi from 0] in {#3}{% + \ifGR@AVL@Math% + \node at (#2\xi) + {$\textcolor{\cmdGR@AVL@color}{\cmdGR@AVL@mathsize\name}$}; + \else + \node[AssignStyle] at (#2\xi) + {\textcolor{\cmdGR@AVL@color}{\cmdGR@AVL@size\name}}; + \fi} + +\endgroup% +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% grEdgeForTree +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% #1 prefix #2 indice #2 prefix #3 indice choisie entre #4 et #5 ... +\newcommand{\grEdgeForTree}[5]{% +\begingroup% + \foreach \V@x in {#4,...,#5}{% + \Edge(#1#2)(#3\V@x)% + }% +\endgroup% +} + +\newcommand{\grSubtreeOfCage}[3][]{% + \begingroup + \setkeys[GR]{cl}{#1}% + \edef\tkzb@rtemp{\cmdGR@cl@RA} + \edef\tkzb@rtempx{\cmdGR@cl@RB} + \edef\tkzb@ptemp{\cmdGR@cl@prefix} + \ifthenelse{\isodd{#3}}% + % odd girth + {% + \pgfmathsetcounter{tkz@gr@a}{(#3-3)/2} + \Vertex{\cmdGR@cl@prefix 0\grLabelSep 0} + \edef\tkz@auxctp{\thetkz@gr@a} + \foreach \V@x in {0,...,\tkz@auxctp}{% + \pgfmathsetcounter{tkz@gr@b}{#2*((#2-1)^\V@x)}% + \pgfmathsetmacro{\sep@path}{\tkzb@rtemp/((#2-1)^\V@x)}% + \pgfmathsetmacro{\y@h}{\tkzb@rtempx*(\V@x+1)}% + \pgfmathsetcounter{tkz@gr@c}{\V@x+1}% + \grEmptyPath[% + prefix=\tkzb@ptemp\thetkz@gr@c\grLabelSep, + form=2, + RA=\sep@path, + x=0, + y=\y@h]{\thetkz@gr@b}% + }% + % edges from the root of the tree + \EdgeFromOneToAll{\tkzb@ptemp0\grLabelSep}% + {\tkzb@ptemp1\grLabelSep}{0}{#2} + % ca = levels from where extra edges emerge + % cb = edges per vertex + \pgfmathsetcounter{tkz@gr@a}{\thetkz@gr@a-1} +\edef\tkz@auxctpa{\thetkz@gr@a} + \foreach \V@y in {0,...,\tkz@auxctpa}{% + \pgfmathsetcounter{tkz@gr@b}{#2*(#2-1)^\V@y-1} +\edef\tkz@auxctpb{\thetkz@gr@b} + \foreach \a in {0,...,\tkz@auxctpb}{% + \pgfmathsetcounter{tkz@gr@c}{\a*(#2-1)}% + \pgfmathsetcounter{tkz@gr@d}{\a*(#2-1)+(#2-2)}% + \pgfmathsetcounter{tkz@gr@ta}{\V@y+1} + \pgfmathsetcounter{tkz@gr@tb}{\V@y+2} + \EdgeFromOneToSeq{\tkzb@ptemp\thetkz@gr@ta\grLabelSep}% + {\tkzb@ptemp\thetkz@gr@tb\grLabelSep}{\a}% + {\thetkz@gr@c}{\thetkz@gr@d} + }% + }% + }% + % even girth + {% + \pgfmathsetcounter{tkz@gr@a}{(#3-2)/2} + \foreach \V@x in {0,...,\thetkz@gr@a}{% + \pgfmathsetcounter{tkz@gr@b}{2*((#2-1)^\V@x)}% + \pgfmathsetmacro{\sep@path}{\tkzb@rtemp/((#2-1)^\V@x)}% + \pgfmathsetmacro{\y@h}{\tkzb@rtempx*\V@x}% + \pgfmathsetcounter{tkz@gr@c}{\V@x}% + \grEmptyPath[% + prefix=\tkzb@ptemp\thetkz@gr@c\grLabelSep, + form=2, + RA=\sep@path, + x=0, + y=\y@h]{\thetkz@gr@b}% + }% + %%%%% + \Edge% + (\tkzb@ptemp0\grLabelSep0)% + (\tkzb@ptemp0\grLabelSep1) + %%%% + \pgfmathsetcounter{tkz@gr@a}{\thetkz@gr@a-1} + \foreach \V@y in {0,...,\thetkz@gr@a}{% + \pgfmathsetcounter{tkz@gr@b}{2*(#2-1)^\V@y-1} + \foreach \a in {0,...,\thetkz@gr@b}{% + \pgfmathsetcounter{tkz@gr@c}{\a*(#2-1)}% + \pgfmathsetcounter{tkz@gr@d}{\a*(#2-1)+(#2-2)}% + \pgfmathsetcounter{tkz@gr@ta}{\V@y} + \pgfmathsetcounter{tkz@gr@tb}{\V@y+1} + \EdgeFromOneToSeq{\tkzb@ptemp\thetkz@gr@ta\grLabelSep}% + {\tkzb@ptemp\thetkz@gr@tb\grLabelSep}{\a}% + {\thetkz@gr@c}{\thetkz@gr@d} + }% + }% + }% + \endgroup +} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% The End +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\catcode`\@=\tkzAtCode\relax +\endinput diff --git a/macros/latex/contrib/tkz/tkz-graph/README.md b/macros/latex/contrib/tkz/tkz-graph/README.md new file mode 100644 index 0000000000..a889549c2f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/README.md @@ -0,0 +1,62 @@ +# tkz-graph — for graph theory + +Release 2.0 2021/01/20 + +## Description + +The package tkz-graph.sty is a collection of some useful macros if you want to + draw manually a graph of the graph theory. The kind of graphs that I will + present, are sometimes called combinatorial graphs to distinguish them from + the graphs of functions. The macros are designed to give math + teachers (and students) easy access at the programmation of drawing graphs + with TikZ. I therefore hope that my packages provide ideal tools for + teachers wanting to offer their students fine documents of maths. + +## Licence + +The scontents package may be modified and distributed under the terms and +conditions of the [LaTeX Project Public License](https://www.latex-project.org/lppl/), version 1.3c or greater. + + +## Requirements + +The package compiles with utf8, pdflatex and lualatex, loads and depends on updated versions of: +- [tikz](https://ctan.org/pkg/tikz) + +## Installation + +The package `tkz-graph` is present in TeXLive and MiKTeX, use the package +manager to install. + +You can experiment with the `tkz-graph` package by placing all of the +distribution files in the directory containing your current tex file. + + +## How to use it + +To use the package `tkz-graph`, place the following line in the preamble of +your LaTeX document: + +``` +\usepackage{tkz-graph} +``` + +## Documentation + +Documentation for `tkz-graph` is available on `CTAN`. + +## Examples + +All examples given in documentation will be stored on `CTAN` as standalone +files, ready for compilation. + +Other examples, in french, are on my site: [http://altermundus.fr](http://altermundus.fr) + +## History + +- 2.00 correction of bugs and new documentation +- 1.00 first version + +## Author + +Alain Matthes, 5 rue de Valence, Paris 75005, al (dot) ma (at) mac (dot) com diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-Dijkstra.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-Dijkstra.tex new file mode 100644 index 0000000000..7f8b81d08b --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-Dijkstra.tex @@ -0,0 +1,152 @@ +\section{Dijkstra} + +{\large Algorithme de Dijkstra :} Plus courte chaîne du sommet $E$ au sommet $S$. + +\medskip + +\subsection{Dijkstra exemple 1} + +\medskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Dijkstra] + \SetGraphUnit{4} + \Vertices{square}{B,C,D,A} + \SetGraphUnit{2.82} + \NOWE(B){E} + \NOEA(C){S} + \Edge[label=$3$](E)(A) + \Edge[label=$1$](E)(B) + \Edge[label=$1$](A)(B) + \Edge[label=$3$](B)(C) + \Edge[label=$3$,style={pos=.25}](A)(C) + \Edge[label=$5$,style={pos=.75}](B)(D) + \Edge[label=$4$](A)(D) + \Edge[label=$1$](S)(D) + \Edge[label=$3$](C)(S) + \Edge[label=$1$](C)(D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + + +\def\ry{$\vrule width 5pt$} +\def\iy{$\infty$} + +%<–––––––––––––––––——————————————————————————————————————————————————————————> +\vbox{\tabskip=0pt \offinterlineskip +\def\tablerule{\noalign{\hskip\tabskip\hrule}} +\halign to \hsize{\strut#&\vrule # \tabskip=0.6em plus8em& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#\tabskip=0pt\cr\tablerule +&& $E$ && $A$ && $B$ && $C$ && $D$ && $S$ && Choix &\cr\tablerule +&& $0$ && \iy && \iy && \iy && \iy && \iy && $E$ &\cr\tablerule +&& \ry && $3(E)$ && $1(E)$ && \iy && \iy && \iy && $B$ &\cr\tablerule +&& \ry && $2(B)$ && \ry && $4(B)$ && $6(B)$ && \iy && $A$ &\cr\tablerule +&& \ry && \ry && \ry && $4(B)$ && $6(B)$ && \iy && $C$ &\cr\tablerule +&& \ry && \ry && \ry && \ry && $5(C)$ && $7(C)$ && $D$ &\cr\tablerule +&& \ry && \ry && \ry && \ry && \ry && $6(D)$ && $S$ &\cr\tablerule}} +%<–––––––––––––––––——————————————————————————————————————————————————————————> + +\medskip + +Le plus court chemin est donc $EBCDS$ + +\vfill\newpage +\subsection{Dijkstra exemple 2} + +\medskip +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Dijkstra] + \SetGraphUnit{4} + \Vertices{square}{G,D,A,F} + \WE(F){H} + \EA(A){B} + \EA(D){C} + \NO(A){E} + \Edge[label=$1$](H)(F) + \Edge[label=$4$](G)(F) + \Edge[label=$2$](H)(G) + \Edge[label=$2$](G)(D) + \Edge[label=$3$](D)(C) + \Edge[label=$4$](F)(E) + \Edge[label=$3$](A)(D) + \Edge[label=$2$](A)(E) + \Edge[label=$1$](A)(B) + \Edge[label=$2$](A)(C) + \Edge[label=$2$](C)(B) + \Edge[label=$3$](E)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} +%<–––––––––––––––––——————————————————————————————————————————————————————————> +\vbox{\tabskip=0pt \offinterlineskip +\def\tablerule{\noalign{\hskip\tabskip\hrule}} +\halign to \hsize{\strut#&\vrule # \tabskip=0.6em plus8em& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#\tabskip=0pt\cr\tablerule +&& $H$ && $F$ && $G$ && $E$ && $D$ && $A$ && $C$ && $B$ && Choix &\cr\tablerule +&& $0$ && \iy && \iy && \iy && \iy && \iy && \iy && \iy && $H$ &\cr\tablerule +&& \ry && $1(H)$ && $2(H)$ && \iy && \iy && \iy && \iy && \iy && $F$ &\cr\tablerule +&& \ry && \ry && $2(H)$ && $5(F)$ && \iy && \iy && \iy && \iy && $G$ &\cr\tablerule +&& \ry && \ry && \ry && $5(F)$ && $4(G)$ && \iy && \iy && \iy && $D$ &\cr\tablerule +&& \ry && \ry && \ry && $5(F)$ && \ry && $7(D)$ && $7(D)$ && \iy && $E$ &\cr\tablerule +&& \ry && \ry && \ry && \ry && \ry && $7(D)$ && $7(D)$ && $8(E)$ && $A$ &\cr\tablerule +&& \ry && \ry && \ry && \ry && \ry && \ry && $7(D)$ && $8(E)$ && $C$ &\cr\tablerule +&& \ry && \ry && \ry && \ry && \ry && \ry && \ry && $8(E)$ && $B$ &\cr\tablerule}} +%<–––––––––––––––––——————————————————————————————————————————————————————————> + +Le plus court chemin est donc $HFEB$ + +\begin{tkzexample}[code only] +\def\ry{$\vrule width 5pt$} +\def\iy{$\infty$} +\vbox{\tabskip=0pt \offinterlineskip +\def\tablerule{\noalign{\hskip\tabskip\hrule}} +\halign to \hsize{\strut#&\vrule # \tabskip=0.6em plus8em& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#& +\hfil#\hfil& \vrule#\tabskip=0pt\cr\tablerule +&& $H$ && $F$ && $G$ && $E$ && $D$ && $A$ && $C$ && $B$% +&& Choix &\cr\tablerule +&& $0$ && \iy && \iy && \iy && \iy && \iy && \iy && \iy% +&& $H$ &\cr\tablerule +&& \ry && $1(H)$ && $2(H)$ && \iy && \iy && \iy && \iy && \iy% +&& $F$ &\cr\tablerule +&& \ry && \ry && $2(H)$ && $5(F)$ && \iy && \iy && \iy && \iy% +&& $G$ &\cr\tablerule +&& \ry && \ry && \ry && $5(F)$ && $4(G)$ && \iy && \iy && \iy% +&& $D$ &\cr\tablerule +&& \ry && \ry && \ry && $5(F)$ && \ry && $7(D)$ && $7(D)$ && \iy% +&& $E$ &\cr\tablerule +&& \ry && \ry && \ry && \ry && \ry && $7(D)$ && $7(D)$ && $8(E)$% +&& $A$ &\cr\tablerule +&& \ry && \ry && \ry && \ry && \ry && \ry && $7(D)$ && $8(E)$% +&& $C$ &\cr\tablerule +&& \ry && \ry && \ry && \ry && \ry && \ry && \ry && $8(E)$% +&& $B$ &\cr\tablerule}} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-Welsh.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-Welsh.tex new file mode 100644 index 0000000000..842b22c8b1 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-Welsh.tex @@ -0,0 +1,246 @@ +\section{Colorisation Welsh} +%<–––––––––––––––––––––––––– graphs with colors ––––––––––––––––––––––––––—––> +Ce chapitre montre comment colorer des sommets. Le plus simple est d'utiliser le style \tkzname{Welsh} et la macro \tkzcname{AddVertexColor} afin de colorer les sommets. + +\subsection{La macro \tkzcname{AddVertexColor} } + +\begin{NewMacroBox}{AddVertexColor}{\var{color}\var{List of vertices}} + +\medskip +\emph{Cette macro permet de colorer des sommets. Le premier argument est la couleur, le second une liste de sommets.} +\end{NewMacroBox} + +\subsection{Exemple d'utilisation } + +\medskip +Une compagnie aérienne propose des vols directs entre certaines villes, notées A, B, C, D, E, F et G. Cela conduit au graphe $\mathcal{G}$ suivant, dont les sommets sont les villes et les arêtes représentent les liaisons aériennes : + + \begin{center} +\begin{tikzpicture} +\renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{center} + +\begin{enumerate} + +\item Sur les cartes d'embarquement, la compagnie attribue à chaque aéroport une couleur, de sorte que deux aéroports liés par un vol direct aient des couleurs différentes. + + Proposer un coloriage adapté‚ cette condition. +\item Que peut-on en déduire sur le nombre chromatique de $\mathcal{G}$ ? +\end{enumerate} + + + +\begin{center} +\begin{tkzltxexample}[] +\begin{tikzpicture} +\renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{tkzltxexample} +\end{center} + +\bigskip +\begin{minipage}{7cm} + \begin{tikzpicture} +\renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) + \end{tikzpicture} +\end{minipage} +\hfill +\begin{minipage}{7cm} + \begin{tabular}{cc} + \hline + \itshape Sommet & \itshape Degré \\ + \hline + B & $5$ \\ + E & $5$ \\ + C & $4$ \\ + D & $4$ \\ + A & $3$ \\ + G & $3$ \\ + F & $2$ \\ + \hline + \end{tabular} +\end{minipage} + +\begin{tkzltxexample}[] + \begin{tikzpicture} +\renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{tkzltxexample} + +\bigskip +\begin{minipage}{7cm} + \begin{tikzpicture} + \renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \SetVertexNoLabel + \AddVertexColor{red}{B,F} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{minipage} +\hfill +\begin{minipage}{7cm} +\begin{tabular}{ccc} +\hline +\itshape Sommet & \itshape Degré & \itshape Couleur\\ +\hline +B & $5$ & rouge\\ +E & $5$ & \\ +C & $4$ & \\ +D & $4$ & \\ +A & $3$ & \\ +G & $3$ & \\ +F & $2$ & rouge\\ +\hline +\end{tabular} +\end{minipage} + +\begin{tkzltxexample}[] +\begin{tikzpicture} + \renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \SetVertexNoLabel + \AddVertexColor{red}{B,F} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{tkzltxexample} + +\bigskip +\begin{minipage}{7cm} + \begin{tikzpicture} + \renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \SetVertexNoLabel + \AddVertexColor{red}{B,F} \AddVertexColor{blue}{E,A} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{minipage} +\hfill +\begin{minipage}{7cm} +\begin{tabular}{ccc} +\hline +\itshape Sommet & \itshape Degré & \itshape Couleur\\ +\hline +B & $5$ & rouge\\ +E & $5$ & bleu\\ +C & $4$ & \\ +D & $4$ & \\ +A & $3$ & bleu\\ +G & $3$ & \\ +F & $2$ & rouge\\ +\hline +\end{tabular} +\end{minipage} + +\begin{tkzltxexample}[] +\begin{tikzpicture} + \renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \SetVertexNoLabel + \AddVertexColor{red}{B,F} + \AddVertexColor{blue}{E,A} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) + \Edges(B,E) +\end{tikzpicture} +\end{tkzltxexample} + +\bigskip +\begin{minipage}{7cm} +\begin{tikzpicture} + \renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \SetVertexNoLabel + \AddVertexColor{red}{B,F} \AddVertexColor{blue}{E,A} + \AddVertexColor{green}{C,G} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{minipage} +\hfill +\begin{minipage}{7cm} +\begin{tabular}{ccc} +\hline +\itshape Sommet & \itshape Degré & \itshape Couleur\\ +\hline +B & $5$ & rouge\\ +E & $5$ & bleu\\ +C & $4$ & vert\\ +D & $4$ & \\ +A & $3$ & bleu\\ +G & $3$ & vert\\ +F & $2$ & rouge\\ +\hline +\end{tabular} +\end{minipage} + +\begin{tkzltxexample}[] +\begin{tikzpicture} + \renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \SetVertexNoLabel + \AddVertexColor{red}{B,F} \AddVertexColor{blue}{E,A} + \AddVertexColor{green}{C,G} + \Vertex[Node]{D}} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{tkzltxexample} + +\bigskip +\begin{minipage}{7cm} +\begin{tikzpicture} + \renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \SetVertexNoLabel + \AddVertexColor{red}{B,F} \AddVertexColor{blue}{E,A} + \AddVertexColor{green}{C,G} \AddVertexColor{yellow}{D} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E) +\end{tikzpicture} +\end{minipage} +\hfill +\begin{minipage}{7cm} +\begin{tabular}{ccc} +\hline +\itshape Sommet & \itshape Degré & \itshape Couleur\\ +\hline +B & $5$ & rouge\\ +E & $5$ & bleu\\ +C & $4$ & vert\\ +D & $4$ & jaune\\ +A & $3$ & bleu\\ +G & $3$ & vert\\ +F & $2$ & rouge\\ +\hline +\end{tabular} +\end{minipage} + +\begin{tkzltxexample}[] + \begin{tikzpicture} + \renewcommand*{\VertexLineWidth}{2pt} + \GraphInit[vstyle=Welsh] + \Vertices[unit=3]{circle}{A,B,C,D,E,F,G} + \SetVertexNoLabel + \AddVertexColor{red}{B,F} \AddVertexColor{blue}{E,A} + \AddVertexColor{green}{C,G}\AddVertexColor{yellow}{D} + \Vertex[Node]{D}} + \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A)\Edges(B,E) +\end{tikzpicture} +\end{tkzltxexample} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-annales.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-annales.tex new file mode 100644 index 0000000000..043a1cb5a6 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-annales.tex @@ -0,0 +1,1164 @@ +\section{Annales.} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Amérique du nord juin 2003 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Amérique du nord juin 2003} + +Soit le graphe G joint en annexe constitué des sommets A, B, C, D, E, F et G. + +\begin{enumerate} +\item Quel est son ordre et le degré de chacun de ses sommets ? +\item Reproduire sur la copie et compléter le tableau des distances entre deux sommets de G : + +\medskip +\begin{center} +\begin{tabular}{|l|c|c|c|c|c|c|c|}\hline +Distance & A & B & C & D & E & F & G \\ \hline +A & X & & & & & & \\ \hline +B & X & X & & & & & \\ \hline +C & X & X & X & & & & \\ \hline +D & X & X & X & X & & & \\ \hline +E & X & X & X & X & X & & \\ \hline +F & X & X & X & X & X & X & \\ \hline +G & X & X & X & X & X & X & X \\ \hline +\end{tabular} +\end{center} + +\medskip +En déduire le diamètre de ce graphe. +\item + \begin{enumerate} + \item Donner un sous-graphe complet d'ordre 3 de G. + +Qu'en déduire pour le nombre chromatique de G ? + \item Proposer une coloration du graphe G et en déduire son nombre chromatique. + \end{enumerate} +\item Donner la matrice M associée à G (vous numéroterez les lignes et les colonnes dans l'ordre alphabétique). +\item En utilisant la matrice $ M_2$ donnée en annexe 1, déduire le nombre de chaînes de longueur 2 partant de A sans y revenir. +\end{enumerate} + +\medskip +\begin{minipage}[]{10cm} +\begin{tikzpicture} + \Vertex[x=1.3,y=3.8]{A} + \Vertex[x=4.2,y=5.5]{B} + \Vertex[x=7.3,y=4]{C} + \Vertex[x=8.5,y=1.5]{D} + \Vertex[x=5,y=0]{E} + \Vertex[x=3.6,y=4]{F} + \Vertex[x=0.7,y=1]{G} + \Edges(A,B,C,D,E,G,A,F,E,C) + \Edge(B)(F) +\end{tikzpicture} +\end{minipage} +\begin{minipage}[]{5cm} +M$^2 = +\begin{pmatrix} + 3 & 1 & 1 & 0 & 2 & 1 & 0\\ + 1 & 3 & 0 & 1 & 2 & 1 & 1\\ + 1 & 0 & 3 & 1 & 1 & 2 & 1\\ + 0 & 1 & 1 & 2 & 1 & 1 & 1\\ + 2 & 2 & 1 & 1 & 4 & 0 & 0\\ + 1 & 1 & 2 & 1 & 0 & 3 & 2\\ + 0 & 1 & 1 & 1 & 0 & 2 & 2\\ +\end{pmatrix}$ +\end{minipage} + +\medskip +\begin{tkzexample}[code only] +\begin{tikzpicture} + \Vertex[x=1.3,y=3.8]{A} \Vertex[x=4.2,y=5.5]{B} + \Vertex[x=7.3,y=4]{C} \Vertex[x=8.5,y=1.5]{D} + \Vertex[x=5,y=0]{E} \Vertex[x=3.6,y=4]{F} + \Vertex[x=0.7,y=1]{G} + \Edges(A,B,C,D,E,G,A,F,E,C) \Edge(B)(F) +\end{tikzpicture} +\end{tkzexample} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Antilles-Guyane juin 2003 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Antilles-Guyane juin 2003 }\label{ag03} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\begin{enumerate} +\item Un musée est constitué de 9 salles notées A, B, C, D, E, F, G, H et S. + +Le plan du musée est représenté ci-dessous : + +\medskip +\begin{center} +\begin{tikzpicture} +\draw (0,0) rectangle (8,6); +\draw(2,0)--(2,0.7); +\draw(2,1.3)--(2,2.7); +\draw(2,3.3)--(2,4.7); +\draw(2,5.3)--(2,6); +\draw(4,0)--(4,0.7); +\draw(4,1.3)--(4,2.7); +\draw(4,3.3)--(4,4.7); +\draw(4,5.3)--(4,6); +\draw(6,0)--(6,0.7); +\draw(6,1.3)--(6,2.7); +\draw(6,3.3)--(6,4.7); +\draw(6,5.3)--(6,6); +\draw(2,5.3)--(2,6); +\draw(4,5.3)--(4,6); +\draw(6,5.3)--(6,6); +\draw(2,2)--(2.7,2); +\draw(3.3,2)--(4.7,2); +\draw(5.3,2)--(6,2); +\draw(2,4)--(2.7,4); +\draw(3.3,4)--(4.7,4); +\draw(5.3,4)--(8,4); +\node at (1,3){S}; +\node at (3,3){G}; +\node at (3,1){D}; +\node at (3,5){A}; +\node at (5,1){H}; +\node at (5,3){E}; +\node at (5,5){B}; +\node at (7,2){F}; +\node at (7,5){C}; +\end{tikzpicture} +\end{center} + +\medskip +Ainsi, un visiteur qui se trouve dans la salle S peut atteindre directement les salles A, B ou G. S'il se trouve dans la salle C, il peut se rendre directement dans la salle B, mais pas dans la salle F. + +On s'intéresse au parcours d'un visiteur dans ce musée. On ne se préoccupe pas de la manière dont le visiteur accède au musée ni comment il en sort. Cette situation peut être modélisée par un graphe, les sommets étant les noms des salles, les arêtes représentant les portes de communication. + + \begin{enumerate} + \item Dessiner un graphe modélisant la situation décrite. + \item Est-il possible de visiter le musée, en empruntant chaque porte une fois et une seule ? + +Justifier en utilisant un théorème du cours sur les graphes. +\item Pour rompre une éventuelle monotonie, le conservateur du musée souhaite différencier chaque salle de sa ou des salles voisines (c'est-à -dire accessibles par une porte) par la moquette posée au sol. Quel est le nombre minimum de types de moquettes nécessaires pour répondre à ce souhait ? Justifier. + \end{enumerate} +\item On note $M$ la matrice à 9 lignes et 9 colonnes associée au graphe précédent, en convenant de l'ordre suivant des salles S, A, B, C, D, E, F, G, H. Le graphe n'étant pas orienté, comment cela se traduit-il sur la matrice ? +\item On donne la matrice : + +\[M^4 = +\begin{pmatrix} +18 & 12 & 11 & 02 & 20 & 12 & 06 & 12 & 12\\ +12 & 20 & 03 & 06 & 11 & 20 & 05 & 18 & 05\\ +11 & 03 & 16 & 00 & 19 & 03 & 08 & 04 & 12\\ +02 & 06 & 00 & 03 & 01 & 07 & 01 & 04 & 01\\ +20 & 11 & 19 & 01 & 31 & 09 & 11 & 12 & 19\\ +12 & 20 & 03 & 07 & 09 & 28 & 09 & 20 & 09\\ +06 & 05 & 08 & 01 & 11 & 09 & 09 & 08 & 09\\ +12 & 18 & 04 & 04 & 12 & 20 & 08 & 20 & 06\\ +12 & 05 & 12 & 01 & 19 & 09 & 09 & 06 & 17\\ +\end{pmatrix}\] + + \begin{enumerate} + \item Combien y-a-t-il de chemins qui en 4 étapes, partent de D et reviennent à D ? + \item Combien y-a-t-il de chemins qui en 4 étapes, partent de S et reviennent à C ? Les citer. + \item Est-il toujours possible de joindre en 4 étapes deux salles quelconques ? Justifier. + \end{enumerate} +\end{enumerate} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +Code du graphe précédent, uniquement fait avec tikz sans tkz-berge + +\bigskip +\begin{tkzexample}[code only] +\begin{tikzpicture} + \draw (0,0) rectangle (8,6); + \draw(2,0)--(2,0.7); + \draw(2,1.3)--(2,2.7); + \draw(2,3.3)--(2,4.7); + \draw(2,5.3)--(2,6); + \draw(4,0)--(4,0.7); + \draw(4,1.3)--(4,2.7); + \draw(4,3.3)--(4,4.7); + \draw(4,5.3)--(4,6); + \draw(6,0)--(6,0.7); + \draw(6,1.3)--(6,2.7); + \draw(6,3.3)--(6,4.7); + \draw(6,5.3)--(6,6); + \draw(2,5.3)--(2,6); + \draw(4,5.3)--(4,6); + \draw(6,5.3)--(6,6); + \draw(2,2)--(2.7,2); + \draw(3.3,2)--(4.7,2); + \draw(5.3,2)--(6,2); + \draw(2,4)--(2.7,4); + \draw(3.3,4)--(4.7,4); + \draw(5.3,4)--(8,4); + \node at (1,3){S}; + \node at (3,3){G}; + \node at (3,1){D}; + \node at (3,5){H}; + \node at (5,1){H}; + \node at (5,3){E}; + \node at (5,5){B}; + \node at (7,2){F}; + \node at (7,5){C}; +\end{tikzpicture} +\end{tkzexample} + + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Asie juin 2003 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Asie juin 2003 }\label{asj03} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + + +\bigskip +\begin{minipage}[l]{0,58\textwidth} +Dans la ville de GRAPHE, on s'intéresse aux principales rues permettant de relier différents lieux ouverts au public, à savoir la mairie (M), le centre commercial (C), la bibliothèque (B), la piscine (P) et le lycée (L). Chacun de ces lieux est désigné par son initiale. Le tableau ci-contre donne les rues existant entre ces lieux. +\end{minipage}\hfill +\begin{minipage}[]{0,38\textwidth} +\begin{center} + \begin{tabular}{|*{5}{c|} c|} \cline{2-6} + \multicolumn{1}{c|}{} + & B & C & L & M & P \\ \hline + B & & X & & X & X \\ \hline + C & X & & X & X & \\ \hline + L & & X & & X & \\ \hline + M & X & X & X & & X \\ \hline + P & X & & & X & \\ \hline + \end{tabular} +\end{center} +\end{minipage} + +\medskip +\begin{enumerate} +\item Dessiner un graphe représentant cette situation. +\item Montrer qu'il est possible de trouver un trajet empruntant une fois et une seule toutes les rues de ce plan. Justifier. Proposer un tel trajet. + +Est-il possible d'avoir un trajet partant et arrivant du même lieu et passant une fois et une seule par toutes les rues ? + + +\begin{minipage}[b]{0,3\textwidth} +\item + Dimitri habite dans cette ville ; le graphe ci-contre donne le \textbf{nouveau} plan du quartier avec les sens de circulation dans les différentes rues et le temps de parcours entre les différents lieux. +\end{minipage} +\hspace{1cm} + \begin{minipage}[c]{0,68\textwidth} + \begin{tikzpicture}[>=latex] + \SetGraphUnit{4} + \tikzset{VertexStyle/.style = {shape = circle, + draw = black, + inner sep = 2pt,% + minimum size = 6mm, + outer sep = 0pt, + fill = gray!60}} + \Vertex {P} + \NOEA(P){B} + \SOEA(P){M} + \NOEA(B){D} + \SOEA(B){C} + \SOEA(C){L} + \tikzset{LabelStyle/.style = {fill=white}} + \tikzset{EdgeStyle/.style = {<->}} + \Edge[label=$4$](P)(M) + \Edge[label=$9$](C)(M) + \Edge[label=$4$](C)(L) + \Edge[label=$5$](C)(D) + \Edge[label=$10$](B)(M) + \tikzset{EdgeStyle/.style = {<->,bend right}} + \Edge[label=$11$](L)(D) + \tikzset{EdgeStyle/.style = {->}} + \Edge[label=$3$](C)(B) + \Edge[label=$10$](D)(B) + \Edge[label=$10$](L)(M) + \Edge[label=$10$](B)(P) + \end{tikzpicture} + \end{minipage} +\end{enumerate} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +Code du graphe précédent + +\bigskip +\begin{tkzexample}[code only] +\begin{minipage}[c]{0,68\textwidth} +\begin{tikzpicture}[>=latex] + \SetGraphUnit{4} + \tikzset{VertexStyle/.style = {shape = circle, + draw = black, + inner sep = 2pt,% + minimum size = 6mm, + outer sep = 0pt, + fill = gray!60}} + \Vertex {P} + \NOEA(P){B} + \SOEA(P){M} + \NOEA(B){D} + \SOEA(B){C} + \SOEA(C){L} + \tikzset{LabelStyle/.style = {fill=white}} + \tikzset{EdgeStyle/.style = {<->}} + \Edge[label=$4$](P)(M) + \Edge[label=$9$](C)(M) + \Edge[label=$4$](C)(L) + \Edge[label=$5$](C)(D) + \Edge[label=$10$](B)(M) + \tikzset{EdgeStyle/.style = {<->,bend right}} + \Edge[label=$11$](L)(D) + \tikzset{EdgeStyle/.style = {->}} + \Edge[label=$3$](C)(B) + \Edge[label=$10$](D)(B) + \Edge[label=$10$](L)(M) + \Edge[label=$10$](B)(P) +\end{tikzpicture} +\end{minipage} +\end{tkzexample} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% France juin 2003 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{France juin 2003 }\label{frj03} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +Un concert de solidarité est organisé dans une grande salle de spectacle. À ce concert sont conviés sept artistes de renommée internationale Luther Allunison (A), John Biaise (B), Phil Colline (C), Bob Ditlâne (D), Jimi Endisque (E), Robert Fripe (F) et Rory Garaguerre (G). + +Les différents musiciens invités refusant de jouer avec certains autres, l'organisateur du concert doit prévoir plusieurs parties de spectacle. Les arêtes du graphe $\Gamma$ ci-dessous indiquent quels sont les musiciens qui refusent de jouer entre eux. + +\medskip +\begin{center} +\begin{tikzpicture} + \SetGraphUnit{4} + \GraphInit[vstyle=Normal] + \tikzset{EdgeStyle/.style = {line width = 2pt}} + \tikzset{VertexStyle/.append style = {line width = 2pt}} + \Vertex{D} + \SOEA(D){E} + \EA(E){F} + \NOEA(F){G} + \NOWE(G){A} + \NOWE(A){B} + \SOWE(B){C} + \Edges(F,G,A,D,F,B,E,G,C,F,A,E,C,B) +\end{tikzpicture} +\end{center} + +\medskip +\begin{enumerate} +\item Déterminer la matrice associée au graphe $\Gamma$ (les sommets de $\Gamma$ étant classés dans l'ordre alphabétique). +\item Quelle est la nature du sous-graphe de $\Gamma '$ constitué des sommets A, E, F et G ? + +Que peut-on en déduire pour le nombre chromatique $\chi(\Gamma)$ du graphe $\Gamma$ ? +\item Quel est le sommet de plus haut degré de $\Gamma$ ? + +En déduire un encadrement de $\chi(\Gamma)$. +\item Après avoir classé l'ensemble des sommets de $\Gamma$ par ordre de degré décroissant, colorier le graphe $\Gamma$ figurant en annexe. +\item Combien de parties l'organisateur du concert doit-il prévoir ? + +Proposer une répartition des musiciens pour chacune de ces parties. +\end{enumerate} + +\medskip + +\begin{tkzexample}[code only] +\begin{tikzpicture} + \SetGraphUnit{4} + \GraphInit[vstyle=Normal] + \tikzset{EdgeStyle/.style = {line width = 2pt}} + \tikzset{VertexStyle/.append style = {line width = 2pt}} + \Vertex{D} + \SOEA(D){E}\EA(E){F} + \NOEA(F){G}\NOWE(G){A} + \NOWE(A){B}\SOWE(B){C} + \Edges(F,G,A,D,F,B,E,G,C,F,A,E,C,B) +\end{tikzpicture} +\end{tkzexample} + + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% CE juin 2003 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Centres Étrangers juin 2003 }\label{cej03} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\bigskip +Un livreur d'une société de vente à domicile doit, dans son après-midi, charger son camion à l'entrepôt noté A, livrer cinq clients que nous noterons B, C, D, E et F, puis retourner à l'entrepôt. Le réseau routier, tenant compte des sens de circulation, et les temps de parcours (en minutes) sont indiqués sur le graphe G suivant : + +\medskip +\begin{center} + \begin{tikzpicture}[>=latex] + \SetGraphUnit{4} + \Vertex {F} + \NOWE(F){A} + \NOEA(F){B} + \SOEA(F){C} + \SOWE(F){D} + \SOWE(A){E} + \tikzstyle{EdgeStyle}=[->] + \tikzstyle{LabelStyle}=[fill=white] + \Edge[label=$4$](A)(E) + \Edge[label=$4$](E)(D) + \Edge[label=$9$](D)(A) + \Edge[label=$2$](B)(A) + \Edge[label=$11$](C)(B) + \Edge[label=$3$](D)(F) + \Edge[label=$6$](F)(A) + \tikzstyle{EdgeStyle}=[->,bend left=15] + \Edge[label=$2$](D)(C) + \Edge[label=$2$](C)(D) + \Edge[label=$3$](F)(B) + \Edge[label=$3$](B)(F) + \Edge[label=$6$](F)(C) + \Edge[label=$6$](C)(F) + \end{tikzpicture} +\end{center} + +\begin{enumerate} +\item Donner la matrice M associée au graphe G. + +On utilisera le modèle suivant : + +\begin{center} + \begin{tabular}{|*{7}{c|}}\cline{2-7} + \multicolumn{1}{c|}{}% + & A & B & C & D & E & F \\ \hline + A & & & & & & \\ \hline + B & & & & & & \\ \hline + C & & & & & & \\ \hline + D & & & & & & \\ \hline + E & & & & & & \\ \hline + F & & & & & & \\ \hline + \end{tabular} +\end{center} + +\item On donne la matrice M$^6$ : + +\[\text{M}^6 = +\begin{pmatrix} + 8 & 6 & 6 & 3 & 4 & 6 \\ + 19 & 11 & 12 & 9 & 6 & 16\\ + 36 & 28 & 23 & 22 & 18 & 34\\ + 37 & 24 & 25 & 17 & 15 & 31\\ + 15 & 12 & 9 & 10 & 8 & 15\\ + 28 & 22 & 19 & 15 & 15 & 26\\ +\end{pmatrix}\] + +On s'intéresse aux chemins partant de l'entrepôt A et se terminant en A. + + \begin{enumerate} + \item Combien existe-t-il de chemins de longueur 6 reliant A à A ? + \item Citer ces chemins. + \item Parmi ceux qui passent par tous les sommets du graphe, lequel minimise le temps de parcours ? + \item Quelle conséquence peut tirer le livreur du dernier résultat ? + \end{enumerate} +\item Au départ de sa tournée, le livreur a choisi de suivre l'itinéraire le plus rapide. Malheureusement, le client C n'est pas présent au passage du livreur et celui-ci décide de terminer sa livraison par ce client. Indiquer quel est le chemin le plus rapide pour revenir à l'entrepôt A à partir de C. La réponse devra être justifiée. +\end{enumerate} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +Code du graphe précédent + +\bigskip +\begin{tkzexample}[code only] +\begin{tikzpicture}[>=latex] + \SetGraphUnit{3} + \Vertex {F} + \NOWE(F){A} + \NOEA(F){B} + \SOEA(F){C} + \SOWE(F){D} + \SOWE(A){E} + \tikzstyle{EdgeStyle}=[->] + \tikzstyle{LabelStyle}=[fill=white] + \Edge[label=$4$](A)(E) + \Edge[label=$4$](E)(D) + \Edge[label=$9$](D)(A) + \Edge[label=$2$](B)(A) + \Edge[label=$11$](C)(B) + \Edge[label=$3$](D)(F) + \Edge[label=$6$](F)(A) + \tikzstyle{EdgeStyle}=[->,bend left=15] + \Edge[label=$2$](D)(C) + \Edge[label=$2$](C)(D) + \Edge[label=$3$](F)(B) + \Edge[label=$3$](B)(F) + \Edge[label=$6$](F)(C) + \Edge[label=$6$](C)(F) +\end{tikzpicture} +\end{tkzexample} +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Amérique du Nord mai 2004 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Amérique du Nord juin 2004 }\label{anm04} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + + +\textbf{Les parties A et B sont indépendantes.} + +\textbf{Partie A} + +On considère le graphe G$_{1}$ ci-dessous : + +\bigskip + +\begin{center} +\begin{tikzpicture}[>=latex] + \SetGraphUnit{6} + \Vertex{F}% + \NOEA(F){B} + \SOEA(F){E} + \EA(B){C} + \EA(E){D} + \NO(D){A} + \Edges(B,F,E,D,A,E,B,A,F,B,C,F,D) +\end{tikzpicture} +\end{center} + +\medskip + +\begin{enumerate} +\item Justifier les affirmations suivantes : + +A$_{1}$ : \og le graphe G$_1$ admet au moins une chaîne eulérienne \fg. + +A$_{2}$ ; \og La chaîne DABCFBEFAE n'est pas une chaîne eulérienne de G$_1$ \fg. + +\item Déterminer un sous-graphe complet de G$_1$, ayant le plus grand ordre possible. En déduire un minorant du nombre chromatique $\gamma$ de ce graphe. + +\item Déterminer un majorant de ce nombre chromatique. (On justifiera la réponse). + +\item En proposant une coloration du graphe G$_1$, déterminer son nombre chromatique. + +\end{enumerate} + +\medskip + +\textbf{Partie B} + +Soit la matrice M d'un graphe orienté G$_2$ dont les sommets A, B, C, D et E sont pris dans l'ordre alphabétique. + +On donne \[ + M = +\begin{pmatrix} + 0 & 1 & 1 & 1 & 0\\ + 1 & 0 & 1 & 0 & 1\\ + 1 & 1 & 0 & 0 & 1\\ + 0 & 1 & 0 & 0 & 1\\ + 1 & 1 & 0 & 1 & 0\\ +\end{pmatrix} +\] +~et~ +\[ + \text{M}^3 = +\begin{pmatrix} + 6 & 6 & 4 & 5 & 3\\ + 5 & 6 & 5 & 3 & 6\\ + 5 & 7 & 4 & 3 & 6\\ + 3 & 5 & 3 & 3 & 3\\ + 6 & 6 & 3 & 3 & 5\\ +\end{pmatrix}. +\] +\begin{enumerate} +\item Construire le graphe G$_2$. +\item Déterminer le nombre de chaînes de longueur 3 reliant B à D. Les citer toutes. +\end{enumerate} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +Code du graphe précédent + +\bigskip +\begin{tkzexample}[code only] +\begin{tikzpicture}[>=latex] + \SetGraphUnit{6} + \Vertex{F} + \NOEA(F){B} + \SOEA(F){E} + \EA(B){C} + \EA(E){D} + \NO(D){A} + \Edges(B,F,E,D,A,E,B,A,F,B,C,F,D) +\end{tikzpicture} +\end{tkzexample} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% CE mai 2004 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Centres étrangers mai 2004 }\label{cem04} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\bigskip +Un jardinier possède un terrain bien ensoleillé avec une partie plus ombragée. + +Il décide d'y organiser des parcelles où il plantera 8 variétés de légumes : + +\medskip +\begin{center}\begin{minipage}[t]{0.48\textwidth} + \begin{itemize} + \item de l'ail (A), + \item des courges (Co), + \item des choux (Ch), + \item des poireaux (Px), + \item des pois (Po), + \item des pommes de terre (Pt), + \item des radis (R), + \item et des tomates (T). + \end{itemize} +\end{minipage}\end{center} + +\medskip +Il consulte un almanach où figurent des incompatibilités de plantes, données par les deux tableaux : + +\medskip + +\begin{minipage}[t]{0.46\textwidth} +\begin{tabular}{|l|l|}\hline + \multicolumn{2}{|p{7cm}|}{Expositions incompatibles de plantes}\\ +\hline + \multicolumn{1}{|p{3.5cm}|}{Plantes d'ombre partielle} + &\multicolumn{1}{|p{3.5cm}|}{Plantes de plein soleil}\\ +\hline + & \\ + & choux \\ + pois & tomates \\ + radis & courges \\ + & \\ + & \\ +\hline + \multicolumn{2}{|p{7cm}|}{Par exemple : les pois sont incompatibles avec les + choux, les tomates et les courges}\\ \hline +\end{tabular} +\end{minipage} +\hfill +\raisebox{6pt}{\begin{minipage}[t]{0.46\textwidth} +\begin{tabular}{|l|l|}\hline +\multicolumn{2}{|p{7cm}|}{Associations incompatibles de} \\ +\multicolumn{2}{|p{7cm}|}{plantes dans une même parcelle}\\ \hline + pois & ail, poireaux\\ \hline +pommes de & courges, radis et\\ +terre & tomates\\ \hline +& tomates, ail\\ +choux & poireaux et courges\\ \hline +courges & tomates\\ \hline +\multicolumn{2}{|p{7cm}|}{Par exemple : les pois sont incompatibles avec +l'ail et les poireaux}\\ \hline +\end{tabular} +\end{minipage}} + +\medskip + +Pour tenir compte de ces incompatibilités le jardinier décide de modéliser la situation sous la forme d'un graphe de huit sommets, chaque sommet représentant un légume. +\medskip +\begin{enumerate} +\item Sur la feuille annexe : compléter le graphe mettant en évidence les incompatibilités d'exposition ou les associations incompatibles indiquées dans les deux tableaux ci-dessus. + +\item Calculer la somme des degrés des sommets du graphe, en déduire le nombre de ses arêtes. + +\item Rechercher un sous-graphe complet d'ordre 4, qu'en déduit-on pour le nombre chromatique du graphe ? + +\item Donner le nombre chromatique du graphe et l'interpréter en nombre minimum de parcelles que le jardinier devra créer. + +\item Donner une répartition des plantes pur parcelle de façon à ce que chaque parcelle contienne exactement deux types de plantes et que le nombre de parcelles soit minimum. + +\item Donner une répartition des plantes de façon à ce qu'une parcelle contienne trois plantes et que le nombre de parcelles soit minimum. +\end{enumerate} + +\medskip +\begin{center} + \begin{tikzpicture} + \tikzstyle{VertexStyle}= [shape = circle, + fill = white,% + minimum size = 26pt,% + draw] + \Vertex[x=1,y=0.8]{R} + \Vertex[x=0.2,y=3.3]{Po} + \Vertex[x=0,y=2]{Pt} + \Vertex[x=0.9,y=5]{Px} + \Vertex[x=3.5,y=5]{A} + \Vertex[x=5.6,y=3.4]{T} + \Vertex[x=5.3,y=2]{Co} + \Vertex[x=3.3,y=0.2]{Ch} + \Edges(Po,Px,Po,A,Po,T,Po,Co,Po,Ch) + \end{tikzpicture} +\end{center} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +Code du graphe précédent + +\bigskip +\begin{tkzexample}[code only] +\begin{tikzpicture} + \tikzstyle{VertexStyle}= [shape = circle, + fill = white,% + minimum size = 26pt,% + draw] + \Vertex[x=1,y=0.8]{R} + \Vertex[x=0.2,y=3.3]{Po} + \Vertex[x=0,y=2]{Pt} + \Vertex[x=0.9,y=5]{Px} + \Vertex[x=3.5,y=5]{A} + \Vertex[x=5.6,y=3.4]{T} + \Vertex[x=5.3,y=2]{Co} + \Vertex[x=3.3,y=0.2]{Ch} + \Edges(Po,Px,Po,A,Po,T,Po,Co,Po,Ch) +\end{tikzpicture} +\end{tkzexample} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% France mai 2004 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{France juin 2004} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +Le graphe ci-dessous indique, sans respecter d'échelle, les parcours possibles entre les sept bâtiments d'une entreprise importante. + +\medskip +\begin{tikzpicture} + \SetGraphUnit{5} + \Vertex{A} + \NOEA(F){B} + \SOEA(F){E} + \EA(B){C} + \EA(E){D} + \NO(D){A} + \Edges(F,E,F,D,F,C,F,A,F,B,A,E,E,D,D,A,B,A,C,B,E,B) +\end{tikzpicture} + +Un agent de sécurité effectue régulièrement des rondes de surveillance. Ses temps de parcours en minutes entre deux bâtiments sont les +suivants : + +\medskip +\begin{center} +\begin{minipage}{0.5\textwidth} + \begin{itemize} + \item AB : 16 minutes ; + \item AG : 12 minutes ; + \item BC : 8 minutes ; + \item BE : 12 minutes ; + \item BG : 8 minutes ; + \item CD : 7 minutes ; + \item CE : 4 minutes ; + \item CG : 10 minutes ; + \item DE : 2 minutes ; + \item EF : 8 minutes ; + \item EG : 15 minutes ; + \item FG : 8 minutes. + \end{itemize} +\end{minipage} +\end{center} + +\medskip +Sur chaque arête, les temps de parcours sont indépendants du sens de parcours. + +\begin{enumerate} +\item En justifiant la réponse, montrer qu'il est possible que l'agent de sécurité passe une fois et une seule par tous les chemins de cette usine. Donner un exemple de trajet. + +\item L'agent de sécurité peut-il revenir à son point de départ après avoir parcouru une fois et une seule tous les chemins ? Justifier la réponse. + +\item Tous les matins, l'agent de sécurité part du bâtiment A et se rend au bâtiment D. + +En utilisant un algorithme que l'on explicitera, déterminer le chemin qu'il doit suivre pour que son temps de parcours soit le plus court possible, et donner ce temps de parcours. +\end{enumerate} + +\medskip +\begin{tkzexample}[code only] +\begin{tikzpicture} + \SetGraphUnit{5} + \Vertex{A} \NOEA(F){B} \SOEA(F){E} + \EA(B){C} \EA(E){D} \NO(D){A} + \Edges(F,E,F,D,F,C,F,A,F,B,A,E,E,D,D,A,B,A,C,B,E,B) +\end{tikzpicture} +\end{tkzexample} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% La Reunion mai 2004 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{La Réunion juin 2004 }\label{larj04} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + + +\textbf{Partie A} + +On note $G$ le graphe représenté ci-dessous et $M$ sa matrice obtenue en prenant les sommets dans l'ordre alphabétique. La matrice $M^3$ est également donnée. + +\medskip +\begin{center} +\begin{tikzpicture}[>=latex] + \SetGraphUnit{4.5} + \Vertex {e} + \NOEA(e){f} + \SOEA(e){d} + \SOEA(f){h} + \Vertex[position={above of=e,yshift=2cm}]{g} + \Vertex[position={left of=g,xshift=-1cm}]{c} + \Vertex[position={left of=d,xshift=-2cm}]{a} + \SOWE(c){b} + \Edges(a,c,g) \Edges(d,h,f,e,d,a,e,g,a,b,c,e) + \Edge[style={bend left}](g)(h) +\end{tikzpicture} +\end{center} + +\bigskip +\begin{center} + $M^3 = \begin{pmatrix} + 10 & 8 & 11 & 10 & 12 & 5 & 13 & 4\\ + 8 & 2 & 7 & 3 & 5 & 2 & 4 & 3\\ + 11 & 7 & 8 & 6 & 12 & 3 & 10 & 5\\ + 10 & 3 & 6 & 2 & 11 & 1 & 4 & 8\\ + 12 & 5 & 12 & 11 & 8 & 8 & 13 & 3\\ + 5 & 2 & 3 & 1 & 8 & 0 & 2 & 6\\ + 13 & 4 & 10 & 4 & 13 & 2 & 6 & 9\\ + 4 & 3 & 5 & 8 & 3 & 6 & 9 & 0\\ +\end{pmatrix}$ +\end{center} + + +\bigskip +Dire, en justifiant votre réponse, si les affirmations suivantes sont vraies ou + fausses : + +\begin{enumerate} +\item L'ordre du graphe est égal au plus grand des degrés des sommets. +\item Le graphe $G$ contient un sous-graphe complet d'ordre $3$. +\item Les sommets de $G$ peuvent être coloriés avec trois couleurs sans que deux sommets adjacents soient de même couleur. +\item Il est possible de parcourir ce graphe en passant une fois et une seule par chaque arête. +\item Il existe au moins un chemin de longueur $3$ qui relie chaque sommet à chacun des sept autres sommets du graphe. +\item il y a $72$ chemins de longueur $3$ qui relient le sommet $e$ à chacun des huit sommets du graphe. +\end{enumerate} + +\newpage + +\textbf{ Partie B} + +Le graphe suivant représente un réseau de lignes d'autobus. Les sommets du graphe désignent les arrêts. Les poids des arêtes sont les durées de parcours, en minutes, entre deux arrêts (correspondances comprises). + +\medskip +\begin{center} +\begin{tikzpicture}[>=latex] + \SetGraphUnit{4.5} + \Vertex {e} + \NOEA(e){f} + \SOEA(e){d} + \SOEA(f){h} + \Vertex[position={above of=e,yshift=2cm}]{g} + \Vertex[position={left of=g,xshift=-1cm}]{c} + \Vertex[position={left of=d,xshift=-2cm}]{a} + \SOWE(c){b} + \tikzstyle{LabelStyle}=[fill=white] + \Edge[label=$3$](a)(b) + \Edge[label=$11$](a)(c) + \Edge[label=$6$](a)(e) + \Edge[label=$17$](a)(d) + \Edge[style={pos=.25},label=$20$](a)(g) + \Edge[label=$5$](c)(b) + \Edge[label=$6$](c)(e) + \Edge[label=$7$](c)(g) + \Edge[label=$7$](f)(e) + \Edge[label=$3$](d)(e) + \Edge[label=$9$](d)(h) + \Edge[label=$6$](g)(e) + \Edge[style={bend left},label=$11$](g)(h) + \Edge[label=$4$](f)(h) +\end{tikzpicture} +\end{center} + +\medskip +Déterminer, à l'aide d'un algorithme, la durée minimum pour aller de l'arrêt $a$ à l'arrêt $h$ et donner ce trajet. +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +Code du graphe précédent + +\medskip +\begin{tkzexample}[code only] +\begin{tikzpicture}[>=latex] + \SetGraphUnit{4.5} + \Vertex {e} + \NOEA(e){f} + \SOEA(e){d} + \SOEA(f){h} + \Vertex[position={above of=e,yshift=2cm}]{g} + \Vertex[position={left of=g,xshift=-1cm}]{c} + \Vertex[position={left of=d,xshift=-2cm}]{a} + \SOWE(c){b} + \Edges(a,c,g) \Edges(d,h,f,e,d,a,e,g,a,b,c,e) + \Edge[style={bend left}](g)(h) +\end{tikzpicture} +\end{tkzexample} + +et + +\begin{tkzexample}[code only] +\begin{tikzpicture}[>=latex] + \SetGraphUnit{4.5} + \Vertex {e} + \NOEA(e){f} + \SOEA(e){d} + \SOEA(f){h} + \Vertex[position={above of=e,yshift=2cm}]{g} + \Vertex[position={left of=g,xshift=-1cm}]{c} + \Vertex[position={left of=d,xshift=-2cm}]{a} + \SOWE(c){b} + \tikzstyle{LabelStyle}=[fill=white] + \Edge[label=$3$](a)(b) + \Edge[label=$11$](a)(c) + \Edge[label=$6$](a)(e) + \Edge[label=$17$](a)(d) + \Edge[style={pos=.25},label=$20$](a)(g) + \Edge[label=$5$](c)(b) + \Edge[label=$6$](c)(e) + \Edge[label=$7$](c)(g) + \Edge[label=$7$](f)(e) + \Edge[label=$3$](d)(e) + \Edge[label=$9$](d)(h) + \Edge[label=$6$](g)(e) + \Edge[style={bend left},label=$11$](g)(h) + \Edge[label=$4$](f)(h) +\end{tikzpicture} +\end{tkzexample} + +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Amérique du Sud Nov 2006}\label{amsn06} +\begin{enumerate} +\item À l'occasion de la coupe du monde de football 2006 en Allemagne, une agence touristique organise des voyages en car à travers les différentes villes où se joueront les matchs d'une équipe nationale. + +Les routes empruntées par les cars sont représentées par le graphe ci-dessous. Le long de chaque arête figure la distance en kilomètres séparant les villes. +Les lettres B, D, F, H, K, M, N et S représentent les villes Berlin, Dortmnd, Francfort, Hambourg, Kaiserslautern, Munich, Nuremberg et Stuttgart. + +\bigskip + +\begin{center} +\begin{tikzpicture} + \Vertex[x=0 ,y=0]{K} + \Vertex[x=0 ,y=2]{F} + \Vertex[x=-1,y=4]{D} + \Vertex[x=3 ,y=7]{H} + \Vertex[x=8 ,y=5]{B} + \Vertex[x=9 ,y=2]{N} + \Vertex[x=5 ,y=0]{M} + \Vertex[x=3 ,y=1]{S} + \tikzstyle{LabelStyle}=[fill=white,sloped] + \tikzstyle{EdgeStyle}=[bend left] + \Edge[label=$120$](K)(F) + \Edge[label=$650$](H)(S) + \Edge[label=$780$](H)(M) + \Edge[label=$490$](D)(B) + \Edge[label=$600$](D)(M) + \Edge[label=$580$](B)(M) + \Edge[label=$600$](H)(N) + \Edge[label=$490$](F)(H) + \tikzstyle{EdgeStyle}=[bend right] + \Edge[label=$630$](S)(B) + \Edge[label=$210$](S)(N) + \Edge[label=$230$](S)(M) +\end{tikzpicture} +\end{center} + +\bigskip +En précisant la méthode utilisée, déterminer le plus court chemin possible pour aller de Kaiserslautern à Berlin en utilisant les cars de cette agence. +\item Pour des raisons de sécurité, les supporters de certaines équipes nationales participant à la coupe du monde de football en 2006 ne peuvent être logés dans le même hôtel. + +On donne ci-dessous le graphe d'incompatibilité entre les supporters de différentes équipes : par exemple, un supporter de l'équipe A ne peut être logé avec un supporter de l'équipe P. + +\bigskip +\begin{center} +\begin{tikzpicture} + \tikzstyle{EdgeStyle}=[bend left] + \Vertex[x=0,y=0]{G} + \Vertex[x=0,y=3]{A} + \Vertex[x=3,y=5]{P} + \Vertex[x=4,y=2]{C} + \Vertex[x=8,y=3]{Q} + \Vertex[x=7,y=0]{E} + \Vertex[x=3,y=-1]{R} + \Edges(G,A,P,Q,E) \Edges(C,A,Q) \Edges(C,R,G) \Edges(P,E,A) +\end{tikzpicture} +\end{center} + +\bigskip +\begin{enumerate} +\item Déterminer le nombre chromatique de ce graphe en justifiant la valeur trouvée. +\item Proposer une répartition des supporters par hôtel en utilisant un nombre minimum d'hôtels. +\end{enumerate} +\end{enumerate} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\vfill\newpage\null +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +% Liban juin 2006 +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> +\subsection{Liban juin 2006 }\label{lib06} +%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> + +\begin{enumerate} +\item Dans un parc, il y a cinq bancs reliés entre eux par des allées. + +On modélise les bancs par les sommets A, B, C, D, E et les allées par les arêtes du +graphe G ci-dessous : + + +\medskip +\begin{center} +\begin{tikzpicture} + \SetGraphUnit{3} + \tikzstyle{VertexStyle}=[shape = circle, + fill = black, + minimum size = 20pt, + text = white, + draw] + \Vertex[L= {\textbf{E}}]{E} + \NOEA[L = {\textbf{A}}](E){A} + \SOEA[L = {\textbf{D}}](E){D} + \EA[L = {\textbf{C}}](D){C} + \NOEA[L = {\textbf{B}}](C){B} + \tikzstyle{EdgeStyle}=[double = orange,% + double distance = 1pt,% + thick,% + bend right = 20] + \Edges(B,A,E,D,C,B,D) +\end{tikzpicture} +\end{center} + +\medskip + +\begin{enumerate} +\item On désire peindre les bancs de façon que deux bancs reliés par une allée soient +toujours de couleurs différentes. + +Donner un encadrement du nombre minimal de couleurs nécessaires et justifier. + +Déterminer ce nombre. +\item Est-il possible de parcourir toutes les allées de ce parc sans passer deux fois par +la même allée? +\end{enumerate} +\item Une exposition est organisée dans le parc. La fréquentation devenant trop importante, on décide d'instaurer un plan de circulation : certaines allées deviennent à sens unique, d'autres restent à double sens. Par exemple la circulation dans l'allée +située entre les bancs B et C pourra se faire de B vers C et de C vers B, alors que la circulation dans l'allée située entre les bancs A et B ne pourra se faire que de A vers B. Le graphe G$'$ ci-dessous modélise cette nouvelle situation : + +\medskip +\begin{center} +\begin{tikzpicture} + \SetGraphUnit{3} + \tikzstyle{VertexStyle}=[shape = circle, + fill = black, + minimum size = 20pt, + text = white, + draw] + \tikzstyle{TempStyle}=[double = orange,% + double distance = 1pt] + \Vertex[L= {\textbf{E}}]{E} + \NOEA[L = {\textbf{A}}](E){A} + \SOEA[L = {\textbf{D}}](E){D} + \EA[L = {\textbf{C}}](D){C} + \NOEA[L = {\textbf{B}}](C){B} + \tikzstyle{EdgeStyle}=[TempStyle,% + post,% + bend right = 20] + \Edges(A,E,D,C,B,D) + \tikzstyle{EdgeStyle}=[TempStyle,% + pre,% + bend right = 20] + \Edges(B,A) + \tikzstyle{EdgeStyle}=[TempStyle,% + pre,% + bend left = 20] + \Edges(A,E,D,C,B) +\end{tikzpicture} +\end{center} + +\begin{enumerate} +\item Donner la matrice M associée au graphe G$'$. (On ordonnera les sommets +par ordre alphabétique). +\item On donne M$^5 += \begin{pmatrix} +1& 6& 9& 6& 10\\ +4& 5& 7& 11& 5\\ +4& 6& 6& 11& 5\\ +1& 5& 10& 6& 10\\ +6& 5& 5& 14& 2\\ +\end{pmatrix}$ + +Combien y a-t-il de chemins de longueur 5 permettant de se rendre du +sommet D au sommet B ? + +Les donner tous. +\item Montrer qu'il existe un seul cycle de longueur 5 passant par le sommet A. + +Quel est ce cycle ? + +En est-il de même pour le sommet B ? + \end{enumerate} +\end{enumerate} + +\vfill\newpage\null +Code des graphes précédents + +\begin{tkzexample}[code only] +\begin{tikzpicture} + \SetGraphUnit{3} + \tikzstyle{VertexStyle}=[shape = circle, + fill = black, + minimum size = 20pt, + text = white, + draw] + \Vertex[L= {\textbf{E}}]{E} + \NOEA[L = {\textbf{A}}](E){A} + \SOEA[L = {\textbf{D}}](E){D} + \EA[L = {\textbf{C}}](D){C} + \NOEA[L = {\textbf{B}}](C){B} + \tikzstyle{EdgeStyle}=[double = orange, + double distance = 1pt, + thick, + bend right = 20] + \Edges(B,A,E,D,C,B,D) +\end{tikzpicture} +\end{tkzexample} + +\begin{tkzexample}[code only] +\begin{tikzpicture} + \SetGraphUnit{3} + \tikzstyle{VertexStyle}=[shape = circle, + fill = black, + minimum size = 20pt, + text = white, + draw] + \tikzstyle{TempStyle}=[double = orange, + double distance = 1pt] + \Vertex[L= {\textbf{E}}]{E} + \NOEA[L = {\textbf{A}}](E){A} + \SOEA[L = {\textbf{D}}](E){D} + \EA[L = {\textbf{C}}](D){C} + \NOEA[L = {\textbf{B}}](C){B} + \tikzstyle{EdgeStyle}=[TempStyle, + post, + bend right = 20] + \Edges(A,E,D,C,B,D) + \tikzstyle{EdgeStyle}=[TempStyle,% + pre,% + bend right = 20] + \Edges(B,A) + \tikzstyle{EdgeStyle}=[TempStyle,% + pre,% + bend left = 20] + \Edges(A,E,D,C,B) +\end{tikzpicture} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-couverture.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-couverture.tex new file mode 100644 index 0000000000..2832491236 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-couverture.tex @@ -0,0 +1,31 @@ +\thispagestyle{empty} +\null\vfill +\begin{center} +\textcolor{Brown}{\fontsize{30}{30}\selectfont{\upshape tkz-graph.sty}} + +\vspace{0.25cm} +\hfill\textcolor{Brown}{\fontsize{14}{14}\selectfont{\upshape Alain Matthes}} +\end{center} + +\vspace{3cm} +\begin{center} +\begin{tikzpicture}[scale=5] + \SetVertexNoLabel + \tikzstyle{VertexStyle}=[draw, + shape = circle, + shading = ball, + ball color = blue!50, + inner sep = 10pt, + outer sep = 0pt] + \tikzstyle{EdgeStyle}= [thick, + double = blue,% + double distance = 1pt] + \draw[fill = white,color = white] circle (0.55cm); + \draw (0,0) node[circle,draw,shade, + ball color = orange, + minimum size = 3cm] (am){\textbf{AlterMundus}}; + \grIcosahedral[RA=1.4,RB=0.8] +\end{tikzpicture} +\end{center} +\vfill\newpage\null\thispagestyle{empty} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-edge.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-edge.tex new file mode 100644 index 0000000000..1c662139ca --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-edge.tex @@ -0,0 +1,116 @@ +\section{Edge avec tkz-graph} + +\begin{NewMacroBox}{Edge}{\oarg{local options}\varp{Vertex A}\varp{Vertex B}} + +\begin{tabular}{lllc} +options & défaut & définition \\ \midrule +\TOline{local} {false} {booléen désactive EdgeStyle } +\TOline{color} {\textbackslash EdgeColor} {couleur de l'arête} +\TOline{lw} {\textbackslash EdgeLineWidth} {épaisseur de l'arête.} +\TOline{label} {\{\}} {le label} +\TOline{labeltext} {black} {couleur du texte} +\TOline{labelcolor} {white} {couleur du fond du label } +\TOline{labelstyle} {\{\}} {modication du style du label} +\TOline{style} {pos=.5} {modification du style général} \bottomrule +\end{tabular} + +\medskip +\emph{Cette macro permet de tracer une arête entre deux sommets. Dans les exemples et dans le chapitre sur les styles, l'usage des styles est expliqué. } +\end{NewMacroBox} + + + +\medskip +\subsection{Utilisation de \addbs{Edge}} + On peut remarquer qu'il y a deux sortes d'arêtes au niveau de la forme : les segments et les arcs. De plus, ces arêtes peuvent avoir un label. La notion de style est importante car on peut définir pour toutes les arêtes un même style dès le début. + +par défaut : + +\begin{tkzexample}[latex=8cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \Vertex{a} + \EA(a){b} + \SO[unit=2](a){c} + \EA(c){d} + {\SetGraphUnit{2} + \SO(c){e}} + \EA(e){f} + \Edge(a)(b) + \tikzset{EdgeStyle/.style = {-,bend left}} + \Edge(c)(d) + \tikzset{EdgeStyle/.style = {->,bend right=60}} + \Edge(e)(f) +\end{tikzpicture} +\end{tkzexample} + + + + +\vfill +\newpage + +\subsection{Arête particulière la boucle : \tkzname{Loop}} + +\begin{NewMacroBox}{Loop}{\oarg{local options}\varp{Vertex}} +\begin{tabular}{lllc} +options & défaut & définition \\ +\midrule +\TOline{color} {black } {} +\TOline{lw} {0.8pt } {} +\TOline{label} {\{\} } {} +\TOline{labelstyle} {\{\} } {} +\TOline{style} {\{\} } {} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Exemple avec \tkzcname{Loop}} +\begin{center} +\begin{tkzexample}[vbox, small] +\begin{tikzpicture} + \useasboundingbox (-1,-2) rectangle (8,2); + \SetVertexSimple + \SetGraphUnit{5} + \Vertex{A} + \EA(A){B} + \Edge[style={->}](A)(B) + \Loop[dist=3cm,dir=EA,style={thick,->}](B) + \Loop[dist=5cm,dir=WE,style={thick,->}](A) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill +\newpage +\subsection{Multiple arêtes \tkzcname{Edges}} + +\begin{NewMacroBox}{Edges}{\oarg{local options}\varp{Vertex A,Vertex B,\dots}} + +\begin{tabular}{llc} +options & défaut & définition \\ +\midrule +\TOline{color} {black} {} +\TOline{lw} {thick} {} +\TOline{label} {\{\} } {} +\TOline{labelstyle}{\{\}} {} +\TOline{style} {\{\} } {} +\bottomrule +\end{tabular} + +\medskip +\emph{ Cette macro permet de définir une série d'arêtes en une seule fois.} +\end{NewMacroBox} + +\subsubsection{Exemple avec \tkzcname{Edges}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetGraphUnit{4} + \GraphInit[vstyle=Art] + \Vertices{circle}{a0,a1,a2,a3,a4,a5,a6,a7} + \Edges(a0,a3,a6,a1,a4,a7,a2,a5,a0) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-label.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-label.tex new file mode 100644 index 0000000000..597803dfdc --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-label.tex @@ -0,0 +1,125 @@ +\section{Les labels} +% Options sur les labels +Rappel : Si aucun label n'est donné alors l'affichage du label est celui de la référence du \tkzname{vertex}. Il est possible de modifier localement le comportemnt des labels + +\subsection{Options concernant les labels} + +L'option suivante permet de définir un label, celui-ci peut être en mode texte ou bien en mode math. + +\subsubsection{Option \tkzname{L}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \Vertex[L=$\alpha$] {a} + \EA[unit=4](a){b} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Option \tkzname{Math}} +Le label est en mode math. Il est inutile de placer L en mode math si l'option est utilisée. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \Vertex[Math] {A_1} + \Vertex[Math,L=\alpha,x=4,y=0] {a} +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Suppression d'un label, Option \tkzname{NoLabel}} +Cette option supprime l'affichage du label. Il est préférable d'utiliser \tkzname{SetVertexNoLabel} si on veut généraliser à tous les sommets. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \SetGraphUnit{4} + \Vertex[NoLabel]{A} + \EA[NoLabel](A){B} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Option \tkzname{LabelOut}, \tkzname{Lpos} et \tkzname{Ldist}} + +La première option permet de placer le label hors du node, la deuxième positionne le label autour du sommet et la dernière spécifie la distance entre le label et le sommet. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \Vertex[LabelOut]{A} + \Vertex[LabelOut,Lpos=60, + Ldist=.5cm,x=2,y=0]{B} + \Vertex[LabelOut,Lpos=60,x=4,y=0]{C} +\end{tikzpicture} +\end{tkzexample} + + +\vfill\newpage +On peut souhaiter appliquer une option pour tous les sommets. + +\subsection{\tkzcname{SetVertexNoLabel}} +On peut souhaiter ne pas avoir de label pour tous les sommets avec un style prédéfini. + +\begin{NewMacroBox}{SetVertexNoLabel}{} +\emph{ Cette macro permet de supprimer les labels sur tous les sommets. Elle agit globalement sur tous les sommets. Elle correspond à l'option \tkzname{NoLabel}.} +\end{NewMacroBox} + +\subsubsection{Suppression des labels} + +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetGraphUnit{4} + \SetVertexNoLabel + \Vertex{A}\EA(A){B} +\end{tikzpicture} +\end{tkzexample} + + +\subsection{\tkzcname{SetVertexMath} } +\begin{NewMacroBox}{SetVertexMath}{} +\emph{Cette macro permet d'appliquer l'option \tkzname{Math} à plusieurs sommets. Elle agit globalement sur tous les sommets. Elle correspond à l'option \tkzname{Math}} +\end{NewMacroBox} + +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture} + \SetVertexMath + \Vertex {A_1} \EA[unit=3](A_1){A_2}\texttt{} +\end{tikzpicture} +\end{tkzexample} + +\subsection{\tkzcname{SetVertexLabel}} +\begin{NewMacroBox}{SetVertexLabel}{} +\emph{ Cette macro autorise les labels. Elle agit globalement sur tous les sommets.} +\end{NewMacroBox} + +\subsubsection{Labels supprimés puis autorisés.} + Dans l'exemple qui suit, les labels sont supprimés puis autorisés. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \SetVertexNoLabel + \SetGraphUnit{2} + \Vertex {A} \EA(A){B} + \SetVertexLabel \EA(B){C} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Label en dehors du sommet \tkzcname{SetVertexLabelOut}} + +\begin{NewMacroBox}{SetVertexLabelOut}{} +\emph{\tkzcname{SetVertexLabelOut} Dans les exemples précédents, les sommets sont des petits disques colorés, généralement en noir et dans ce cas par défaut le label est à l'extérieur. On peut contrôler la position à l'aide des labels avec \tkzname{Ldist} et\tkzname{Lpos}.} +\end{NewMacroBox} + +\begin{NewMacroBox}{SetVertexLabelIn}{} +\emph{\tkzcname{SetVertexLabelIn} permet d'écrire le label dans le sommet.} +\end{NewMacroBox} + +Cette macro permet d'appliquer l'option à plusieurs sommets. \tkzcname{SetVertexLabelIn} annule l'effet. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \SetGraphUnit{3} + \SetVertexLabelOut + \Vertex {A} \EA(A){B} + \SetVertexLabelIn \SO[unit=3](B){C} +\end{tikzpicture} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-main.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-main.tex new file mode 100644 index 0000000000..3c4ab83c37 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-main.tex @@ -0,0 +1,237 @@ +% encoding : utf8 +% tkz-doc-graph +% Created by Alain Matthes on 2021/01/20. +% Copyright (C) 2021 Alain Matthes +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License , either version 1.3 +% of this license or (at your option) any later version and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details.% +% See http://www.latex-project.org/lppl.txt for details. +% +% +% ``tkzdoc-graph-fr'' is the french doc of tkz-graph +% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% tkz-doc-graph encodage : utf8 % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Created by Alain Matthes 2007/09/02 % +% Copyright (c) 2021 __Altermundus__ All rights reserved. % +% version : 2.0 % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\documentclass[DIV = 14, + fontsize = 10, + headinclude = false, + footinclude = false, + index = totoc, + twoside, + headings = small]{tkz-doc} +\usepackage{etoc} +\gdef\tkznameofpack{tkz-graph} +\gdef\tkzversionofpack{2.0c} +\gdef\tkzdateofpack{2021/01/20} +\gdef\tkznameofdoc{doc-tkz-graph} +\gdef\tkzversionofdoc{2.0c} +\gdef\tkzdateofdoc{2021/01/20} +\gdef\tkzauthorofpack{Alain Matthes} +\gdef\tkzadressofauthor{} +\gdef\tkznamecollection{AlterMundus} +\gdef\tkzurlauthor{} +\gdef\tkzengine{lualatex} +\gdef\tkzurlauthorcom{http://altermundus.fr} + +% -- Packages --------------------------------------------------- +\usepackage[dvipsnames,svgnames]{xcolor} +\usepackage{calc} +\usepackage{tkz-berge} +\usetikzlibrary{calc,positioning,shapes} +\usepackage[colorlinks]{hyperref} +\hypersetup{ + linkcolor=Gray, + citecolor=Green, + filecolor=Mulberry, + urlcolor=NavyBlue, + menucolor=Gray, + runcolor=Mulberry, + linkbordercolor=Gray, + citebordercolor=Green, + filebordercolor=Mulberry, + urlbordercolor=NavyBlue, + menubordercolor=Gray, + runbordercolor=Mulberry, + pdfsubject={Euclidean Geometry}, + pdfauthor={\tkzauthorofpack}, + pdftitle={\tkznameofpack}, + pdfcreator={\tkzengine} +} + \usepackage{bookmark} +\usepackage{tkzexample} +\usepackage{fontspec} +\setmainfont{texgyrepagella}% + [Extension = .otf , + UprightFont = *-regular, + ItalicFont = *-italic, + BoldFont = *-bold, + BoldItalicFont = *-bolditalic] +\setsansfont{texgyreheros}[ + Extension = .otf, + UprightFont = *-regular , + ItalicFont = *-italic , + BoldFont = *-bold , + BoldItalicFont = *-bolditalic , +] + +\setmonofont{lmmono10-regular.otf}[ + Numbers={Lining,SlashedZero}, + ItalicFont=lmmonoslant10-regular.otf, + BoldFont=lmmonolt10-bold.otf, + BoldItalicFont=lmmonolt10-boldoblique.otf, +] +\newfontfamily\ttcondensed{lmmonoltcond10-regular.otf} +%% (La)TeX font-related declarations: +\linespread{1.05} % Pagella needs more space between lines + +\usepackage{unicode-math} +\usepackage{fourier-otf,zorna} +\usepackage{datetime,multicol,lscape} +\usepackage[french]{babel} +\usepackage[autolanguage]{numprint} +\usepackage{array,multirow,multido,booktabs} +\usepackage{shortvrb,fancyvrb} +\usepackage{fancybox} +\usepackage{stmaryrd} +\usepackage{xkeyval,array} +\usepackage[weather]{ifsym} +\RequirePackage{makeidx} +\makeindex + +\title{The package : tkz-graph.sty} +\author{Alain Matthes} + +\AtBeginDocument{\MakeShortVerb{\|}} + +\begin{document} + +\parindent=0pt +\author{\tkzauthorofpack} +\title{\tkznameofpack} +\date{\today} +\clearpage +\thispagestyle{empty} +\maketitle +\definecolor{iceberg}{rgb}{0.44, 0.65, 0.82} + +\AddToShipoutPicture*{% +\setlength\unitlength{1mm} +\put(70,120){% +\begin{tikzpicture}[scale=4] + \SetVertexNoLabel + \tikzstyle{VertexStyle}=[draw, + shape = circle, + shading = ball, + ball color = blue!50, + inner sep = 10pt, + outer sep = 0pt] + \tikzstyle{EdgeStyle}= [thick, + double = blue,% + double distance = 1pt] + \draw (0,0) node[circle,draw,shade, + ball color = iceberg, + minimum size = 2cm] (am){\textbf{tkz-graph}}; + \grIcosahedral[RA=1.4,RB=0.8] +\end{tikzpicture} +} +} + + +\clearpage +\tkzSetUpColors[background=white,text=darkgray] +\let\rmfamily\ttfamily + +\nameoffile{\tkznameofpack} +\defoffile{Le package \tkzname{tkz-graph.sty} est un package pour créer à l'aide de \TIKZ\ des graphes le plus simplement possible. Il fera partie d'une série de modules ayant comme point commun, la création de dessins utiles dans l'enseignement des mathématiques. La lecture de cette documentation va , je l'espère, vous permettre d'apprécier la simplicité d'utilisation de \TIKZ\ et vous permettre de commencer à le pratiquer. Il est accompagné du package \tkzname{tkz-berge.sty} qui permet de tracer des graphes particuliers de la théorie des graphes.} + +\presentation + +\vspace*{1cm} +\lefthand\ Je souhaite remercier \textbf{Till Tantau} pour avoir créé le merveilleux outil \href{http://sourceforge.net/projects/pgf/}{Ti\emph{k}Z}. + + +\vspace*{12pt} +\lefthand\ Vous trouverez de nombreux exemples sur mon site~: +\href{http://altermundus.fr/pages/download.html}{altermundus.fr} + +\vfill +Vous pouvez envoyer vos remarques, et les rapports sur des erreurs que vous aurez constatées à l'adresse suivante~: \href{mailto:al.ma@mac.com}{\textcolor{blue}{Alain Matthes}}. + +This file can be redistributed and/or modified under the terms of the LATEX +Project Public License Distributed from CTAN archives in directory \url{CTAN:// +macros/latex/base/lppl.txt}. + + + + \clearpage + \tableofcontents + \clearpage + + +Liste des macros dans l'ordre d'apparition : + +\medskip +\begin{itemize} +\item \tkzcname{SetVertexLabelOut} +\item \tkzcname{SetVertexLabelIn} +\item \tkzcname{SetVertexMath} +\item \tkzcname{SetVertexNoMath} +\item \tkzcname{SetUpVertex} +\item \tkzcname{Vertex} +\item \tkzcname{EA} +\item \tkzcname{WE} +\item \tkzcname{NO} +\item \tkzcname{SO} +\item \tkzcname{NOEA} +\item \tkzcname{NOWE} +\item \tkzcname{SOEA} +\item \tkzcname{SOWE} +\item \tkzcname{Vertices} +\item \tkzcname{SetUpEdge} +\item \tkzcname{Edge} +\item \tkzcname{Edges} +\item \tkzcname{Loop} +\item \tkzcname{grProb} +\item \tkzcname{SetGraphShadeColor} +\item \tkzcname{SetGraphArtColor} +\item \tkzcname{SetGraphColor} +\item \tkzcname{AddVertexColor} +\end{itemize} + +\vfill +%<--------------------------------------------------------------------------> +\renewcommand*{\VertexLightFillColor}{fondpaille} +%\include{TKZdoc-gr-installation} +\include{TKZdoc-gr-presentation} +\include{TKZdoc-gr-vertex} +\include{TKZdoc-gr-vertices} +\include{TKZdoc-gr-label} +\include{TKZdoc-gr-edge} +\include{TKZdoc-gr-style} +\include{TKZdoc-gr-prob} +\include{TKZdoc-gr-Welsh} +\include{TKZdoc-gr-annales} +\include{TKZdoc-gr-Dijkstra} +%<--------------------------------------------------------------------------> + +\clearpage\newpage +\small\printindex + +\end{document} + diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-presentation.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-presentation.tex new file mode 100644 index 0000000000..dd30cf63e1 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-presentation.tex @@ -0,0 +1,206 @@ +\section{Premiers graphes avec tkz-graph.sty} + + \tkzname{TikZ} est un outil que je trouve très agréable à utiliser pour la création de graphes. J'ai trouvé si simple son utilisation que je me suis demandé si cela avait un sens de créer un package pour la création de graphes. Pas de théorie des graphes dans ce package, seulement des outils pour leur construction. Trois arguments peuvent intervenir pour soutenir mon effort : + +\begin{enumerate} + +\item Certains utilisateurs n'ont pas envie d'apprendre quoi que ce soit sur \TIKZ\; cela est respectable et une simplification du code par l'intermédiaire d'un package peut avoir une certaine utilité. La syntaxe n'est plus tout à fait celle de \TIKZ\ mais celle de \LATEX. +\item Il est possible finalement de jouer avec les styles et d'optimiser certains situations, ainsi la création d'un graphe sans la moindre coordonnée est possible. On peut obtenir des variantes du graphe, simplement en jouant avec les styles. +\item La création de ce que l'on peut appeler les graphes classiques de la théorie des graphes. +\item Et pour terminer, cela peut être une approche en douceur de l'utilisation de \TIKZ\, par l'intermédiaire des options. + +\end{enumerate} + +Que peut apporter \tkzname{tkz-graph.sty} ? Il facilite la gestion des styles des sommets et des arêtes, et également le positionnement de ceux-ci. + +\subsection{Exemple simple avec \tkzname{tkz-graph}} +Avant d'expliquer le fonctionnement des différentes macros, il est possible de tester si le package est bien installé avec l'exemple simple suivant. Le code complet est donné. Le préambule peut évidemment être modifié. + + +\medskip +\begin{minipage}{.45\textwidth} +\begin{tkzltxexample}[] +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : LuaLaTeX +\documentclass[border=3mm]{standalone} +\usepackage{tkz-graph} +\begin{document} + +\begin{tikzpicture}[scale=1.75] + \GraphInit[vstyle=Art] + \Vertex{A} + \Vertex[x=4,y=0]{B} + \Vertex[x=1,y=2]{C} + \Edge[style={bend left}](B)(A) + \Edges(A,B,C,A) +\end{tikzpicture} +\end{document} +\end{tkzltxexample} +\end{minipage} +\hfil\begin{minipage}{.40\textwidth} + \begin{tikzpicture}[scale=1.75] + \GraphInit[vstyle=Art] + \Vertex{A} + \Vertex[x=4,y=0]{B} + \Vertex[x=1,y=2]{C} + \Edge[style={bend left}](B)(A) + \Edges(A,B,C,A) +\end{tikzpicture} + \end{minipage} + +\newpage +\subsection{Exemple classique avec \tkzname{tkz-graph}} + +Voyons un exemple classique. Nous allons utiliser un style scolaire \tkzname{vstyle=Normal} ainsi que les macros \tkzcname{Vertices}, \tkzcname{NOEA} et \tkzcname{Edges} qui permet de créer une "chaîne" d'arêtes (edges). L'environnement \tkzname{scope} fait partie de \TIKZ, il est utilisé ici afin d'appliquer une rotation. + +\begin{center} +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture} + \GraphInit[vstyle=Normal] + \SetGraphUnit{2} + \begin{scope}[rotate=-135] + \Vertices{circle}{A,B,C,E} + \end{scope} + \NOEA[unit=1.414](E){D} + \Edges(A,B,E,D,C,E,A,C,B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Modification du style} +Un style plus esthétique peut être choisi avec \tkzcname{GraphInit}. J'ai choisi \tkzname{Art} parmi une liste que vous découvrirez plus tard. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \begin{scope}[rotate=-135] + \Vertices[unit=2]{circle}{A,B,C,E} + \end{scope} + \NOEA[unit=1.414](E){D} + \Edges(A,B,E,D,C,E,A,C,B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{La ville de Königsberg avec \tkzname{tkz-graph}} + + +\begin{tkzexample}[latex=8cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Shade] + \tikzset{LabelStyle/.style= {draw, + fill = yellow, + text = red}} + \Vertex{A} + \EA(A){B} + \EA(B){C} + \SetGraphUnit{6} + % modifie la distance entre les nodes + \NO(B){D} + \Edge[label=1](B)(D) + \tikzset{EdgeStyle/.append style = {bend left}} + \Edge[label=4](A)(B) + \Edge[label=5](B)(A) + \Edge[label=6](B)(C) + \Edge[label=7](C)(B) + \Edge[label=2](A)(D) + \Edge[label=3](D)(C) +\end{tikzpicture} +\end{tkzexample} + + + + +\medskip +Ce dernier exemple était important sur un plan historique, mais il était un peu compliqué car on doit modifier des styles. + +\subsection{La ville de Königsberg avec \TIKZ\ mais sans \tkzname{tkz-graph}} + +Voyons l'exemple précédent, sans l'utilisation du package \tkzname{tkz-graph}. +L'exemple peut être vu sur cet excellent site \url{http://www.texample.net/tikz/examples/bridges-of-konigsberg/}, voici le code complet. The result is on the next page. +D'abord le préambule + +\begin{tkzltxexample}[left margin=3cm,right margin=3cm] +% The seven bridges of Königsberg +% Author : Alain Matthes +% Encoding : UTF8 +% Engine : PDFLaTeX +\documentclass[border=3mm]{standalone} +\usepackage{fullpage} +\usepackage{tikz} +\usetikzlibrary{arrows,shapes,positioning} +\begin{document} +\end{tkzltxexample} + +Ensuite les styles principaux + +\begin{tkzltxexample}[left margin=3cm,right margin=3cm] +\begin{center} +\begin{tikzpicture} + \useasboundingbox (-1,-1) rectangle (11,11); + \tikzset{VertexStyle/.style = {shape = circle, + ball color = orange, + text = black, + inner sep = 2pt, + outer sep = 0pt, + minimum size = 24 pt}} + \tikzset{EdgeStyle/.style = {thick, + double = orange, + double distance = 1pt}} + \tikzset{LabelStyle/.style = {draw, + fill = yellow, + text = red}} +\end{tkzltxexample} + + enfin, le tracé +\begin{tkzltxexample}[left margin=3cm,right margin=3cm] + \node[VertexStyle](A){A}; + \node[VertexStyle,right=of A](B){B}; + \node[VertexStyle,right=of B](C){C}; + \node[VertexStyle,above= 7 cm of B](D){D}; + \draw[EdgeStyle](B) to node[LabelStyle]{1} (D) ; + \tikzset{EdgeStyle/.append style = {bend left}} + \draw[EdgeStyle](A) to node[LabelStyle]{2} (B); + \draw[EdgeStyle](B) to node[LabelStyle]{3} (A); + \draw[EdgeStyle](B) to node[LabelStyle]{4} (C); + \draw[EdgeStyle](C) to node[LabelStyle]{5} (B); + \draw[EdgeStyle](A) to node[LabelStyle]{6} (D); + \draw[EdgeStyle](D) to node[LabelStyle]{7} (C); + \end{tikzpicture} +\end{center} +\end{document} +\end{tkzltxexample} + +\begin{center} +\begin{tikzpicture}[scale=.75] + \useasboundingbox (-1,-1) rectangle (11,11); + \tikzset{VertexStyle/.style = {shape = circle, + ball color = orange, + text = black, + inner sep = 2pt, + outer sep = 0pt, + minimum size = 24 pt}} + \tikzset{EdgeStyle/.style = {thick, + double = orange, + double distance = 1pt}} + \tikzset{LabelStyle/.style = {draw, + fill = yellow, + text = red}} + + \node[VertexStyle](A){A}; + \node[VertexStyle,right= 4cm of A](B){B}; + \node[VertexStyle,right= 4cm of B](C){C}; + \node[VertexStyle,above= 7 cm of B](D){D}; + \draw[EdgeStyle](B) to node[LabelStyle]{1} (D) ; + \tikzset{EdgeStyle/.append style = {bend left}} + \draw[EdgeStyle](A) to node[LabelStyle]{2} (B); + \draw[EdgeStyle](B) to node[LabelStyle]{3} (A); + \draw[EdgeStyle](B) to node[LabelStyle]{4} (C); + \draw[EdgeStyle](C) to node[LabelStyle]{5} (B); + \draw[EdgeStyle](A) to node[LabelStyle]{6} (D); + \draw[EdgeStyle](D) to node[LabelStyle]{7} (C); +\end{tikzpicture} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-prob.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-prob.tex new file mode 100644 index 0000000000..1ed52fd86d --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-prob.tex @@ -0,0 +1,147 @@ +\section{Graphes probabilistes } +%<–––––––––––––––––––––––––– graphes probabilistes ––––––––––––––––––––––––––> +\subsection{La macro \tkzcname{grProb} } +\begin{NewMacroBox}{grProb}{\oarg{local options} \var{left} \var{right} \var{N}\var{S}\var{W}\var{E}} + +\begin{tabular}{lll} +Arguments & & Définition \\ + \midrule + \TAline{Vertex-left} {}{Nom du sommet à gauche} + \TAline{Vertex-right} {}{Nom du sommet à droite} + \TAline{label N} {}{Étiquette située en haut} + \TAline{label S} {}{Étiquette située en bas} + \TAline{label W} {}{Étiquette située à gauche} + \TAline{label E} {}{Étiquette située à droite} + \bottomrule + \end{tabular} + +\medskip +\begin{tabular}{lll} +options & défaut & définition \\ +\midrule +\TOline{unit} {4cm} {distance entre les sommets } +\TOline{LposA} {180} {angle si label extérieur en A } +\TOline{LposB} {0 } {angle si label extérieur en B } +\TOline{Ldist} {0cm} {écart entre le node et le label } +\TOline{LoopDist} {4cm} {longueur des boucles } +\bottomrule +\end{tabular} + +\medskip +\emph{Cette macro permet de créer un graphe probabiliste d'ordre 2. } +\end{NewMacroBox} + +\subsection{Utilisation de \tkzcname{grProb} } + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \useasboundingbox (-2.5,-2) rectangle (7.5,2); + \grProb{A}{B}{NO}{SO}{WE}{EA} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\begin{tkzexample}[latex=5cm] +\begin{tikzpicture}[scale=.5] + \useasboundingbox (-2.5,-2) rectangle (5,2); + \grProb[unit=4]{\Rain}{\Sun}{0,4}{0,3}{0,6}{0,7} +\end{tikzpicture} +\end{tkzexample} + + + + + +\subsection{\tkzcname{grProb} et le style par défaut } +\begin{center} +\begin{tkzexample}[latex=5cm] +\begin{tikzpicture}[scale=.5] + \useasboundingbox (-2.5,-2) rectangle (5,2); + \grProb{A}{B}{0,8}{0,6}{0,2}{0,4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{\tkzcname{grProb} et le style « Simple »} +\begin{center} +\begin{tkzexample}[latex=5cm] +\begin{tikzpicture}[scale=.5] +\useasboundingbox (-2.5,-2) rectangle (5,2); +\SetVertexSimple +\grProb[Ldist=0.2cm]{Paris}{Lyon}% + {\scriptstyle\dfrac{2}{3}}{\scriptstyle\dfrac{3}{4}}% + {\scriptstyle\dfrac{1}{3}}{\scriptstyle\dfrac{1}{4}}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Utilisation d'un style personnalisé} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \useasboundingbox (-2.5,-2.5) rectangle (7.5,2.5); + \tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = Orange, + minimum size = 20pt, + draw,color=white}} + \tikzset{LabelStyle/.style = {draw,color=orange,fill=white}} + \tikzset{EdgeStyle/.style = {->, thick, + double = orange, + double distance = 1pt}} + +\grProb[Ldist=0.1cm,LposA=0,LposB=180]% + {Paris}{Lyon}% + {\scriptstyle\dfrac{2}{3}}{\scriptstyle\dfrac{3}{4}}% + {\scriptstyle\dfrac{1}{3}}{\scriptstyle\dfrac{1}{4}}% +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill +\newpage +\subsection{La macro \tkzcname{grProbThree}} + +\begin{NewMacroBox}{grProbThree}{\oarg{local options} \var{right} \var{up}\var{down} \var{rr/ru/rd}\var{uu/ud/ur}\var{dd/dr/du}} + +\begin{tabular}{llc} +Arguments & & Définition \\ +\midrule +\TAline{Vertex-right} {}{Nom du sommet à droite} +\TAline{Vertex-up} {}{Nom du sommet en haut} +\TAline{Vertex-down} {}{Nom du sommet en bas} +\TAline{rr/ru/rd} {}{arête partant de r vers r etc\dots} +\TAline{uu/ud/ur} {}{arête partant de u vers u etc\dots} +\TAline{dd/dr/du} {}{arête partant de d vers d etc\dots} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{llc} +Options & Défaut & Définition \\ +\midrule +\TOline{unit} {4cm} {distance entre les sommets } +\TOline{LposA} {180} {angle si label extérieur en A } +\TOline{LposB} {0 } {angle si label extérieur en B } +\TOline{Ldist} {0cm} {écart entre le node et le label } +\TOline{LoopDist} {4cm} {longueur des boucles } +\bottomrule +\end{tabular} + +\medskip +\emph{Cette macro permet de créer un graphe probabiliste d'ordre 3. } +\end{NewMacroBox} + +\subsubsection{Graphe probabiliste d'ordre 3} +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture}[scale=.75] + \tikzset{LabelStyle/.style = {draw,fill=white}} + \grProbThree[unit=4]{\Rain}{\Sun}{\Cloud} + {0.1/0.3/0.6}{0.2/0.3/0.5}{0.25/0.35/0.4} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-style.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-style.tex new file mode 100644 index 0000000000..c444c78015 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-style.tex @@ -0,0 +1,848 @@ +\section{Modification des styles des sommets} + +Différentes méthodes sont possibles mais il faut distinguer une utilisation globale ou locale. + +Les trois principaux styles sont \tkzname{VertexStyle}, \tkzname{EdgeStyle} et \tkzname{LabelStyle}. Le dernier est attaché aux étiquettes que peuvent avoir les arêtes. + +\begin{enumerate} +\item \tkzcname{GraphInit} permet de choisir un style prédfini et il est possible de retoucher ces styles en modifiant les valeurs choisies par défaut. +\item Les styles des sommets, des arêtes et étiquettes peuvent être personnalisés avec \tkzname{VertexStyle}, \tkzname{EdgeStyle} et \tkzname{LabelStyle}. On peut redéfinir ces styles avec \tkzcname{tikzset\{VertexStyle/.append style = \{ ... \}\}} ou bien \tkzcname{tikzset\{VertexStyle/.style = \{ ... \}\}}. La première méthode modifie un style existant alors que la seconde définit un style . +\item On peut utiliser les anciennes macros : \tkzcname{SetVertexSimple}, \tkzcname{SetVertexNormal}, \tkzcname{SetUpVertex} et \tkzcname{SetUpEdge} . + +\end{enumerate} + +\medskip +Il est possible de mélanger tout cela en sachant que la dernière définition d'un style l'emporte. + +\medskip +\begin{NewMacroBox}{GraphInit}{\oarg{local options}} +\begin{tabular}{llc} +Options & Défaut & Définition \\ \midrule +\TOline{vstyle} {Normal} {} \bottomrule +\end{tabular} + +\medskip +Les possibilités pour \tkzname{vstyle} sont : + +\begin{enumerate} + \item Empty, + \item Hasse, + \item Simple, + \item Classic, + \item Normal, + \item Shade, + \item Dijkstra + \item Welsh, + \item Art, + \item Shade Art. +\end{enumerate} + +\emph{Il y a pour le moment 10 styles pré-définis. Il est possible de modifier les valeurs par défaut.} +\end{NewMacroBox} + + +Utilisation des styles pré-définis + +\begin{enumerate} +\item GraphInit par défaut + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Normal] + \Vertex{A}\EA(A){B} + \Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Empty|} + +\begin{center} +\begin{tkzexample}[latex=7cm] + \begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Empty] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Hasse|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Hasse] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Simple|} + +\begin{center} +\begin{tkzexample}[latex=7cm] + \begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Simple] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Classic|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Classic] + \Vertex[Lpos=-90]{A} + \EA[Lpos=-90](A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + \item GraphInit et \tkzname{|vstyle=Normal|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Normal] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Classic] + \Vertex[Lpos=-90]{Paris} + \EA[Lpos=-90](Paris){Berlin} + \Edge (Paris)(Berlin) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Shade|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Shade] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Dijkstra|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Dijkstra] + \Vertex{A}\EA(A){B}\Edge[label=$7$](A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Welsh|} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Welsh] + \Vertex[Lpos=-90]{A} + \EA[Lpos=-90](A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Art|} +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Art] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\item GraphInit et \tkzname{|vstyle=Shade Art|} +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Shade Art] + \Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} +\end{center} +\end{enumerate} + +\newpage +\tkzname{|vstyle|} est basé sur les macros suivantes qui peuvent être redéfinies. + +\medskip +\begin{tabular}{lc}\toprule +Commandes pour les styles & utilisation \\ \midrule +|\newcommand*{\VertexInnerSep}{0pt} | &\\ +|\newcommand*{\VertexOuterSep}{0pt} | &\\ +|\newcommand*{\VertexDistance}{3cm} | &\\ +|\newcommand*{\VertexShape}{circle}| &\\ +|\newcommand*{\VertexLineWidth}{0.8pt}| &\\ +|\newcommand*{\VertexLineColor}{black}| &\\ +|\newcommand*{\VertexLightFillColor}{white}| &\\ +|\newcommand*{\VertexDarkFillColor}{black}| &\\ +|\newcommand*{\VertexTextColor}{black}| &\\ +|\newcommand*{\VertexFillColor}{black}| &\\ +|\newcommand*{\VertexBallColor}{orange}| &\\ +|\newcommand*{\VertexBigMinSize}{24pt}| &\\ +|\newcommand*{\VertexInterMinSize}{18pt}| &\\ +|\newcommand*{\VertexSmallMinSize}{12pt}| &\\ +|\newcommand*{\EdgeFillColor}{orange}| &\\ +|\newcommand*{\EdgeArtColor}{orange}| &\\ +|\newcommand*{\EdgeColor}{black}| &\\ +|\newcommand*{\EdgeDoubleDistance}{1pt}| &\\ +|\newcommand*{\EdgeLineWidth}{0.8pt}| &\\ \bottomrule +\end{tabular} + + + +\subsection{Modification de \tkzname{vstyle=Art}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Art] + \renewcommand*{\VertexInnerSep}{8pt} + \renewcommand*{\EdgeLineWidth}{3pt} + \renewcommand*{\VertexBallColor}{blue!50} + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill +\newpage + +\subsection{Modification du style \tkzname{VertexStyle} par défaut} + +Il est possible de redéfinir le style \tkzcname{SetVertexSimple}. + +Par défaut : + +\begin{tkzltxexample}[] +\tikzset{VertexStyle/.style = { + shape = circle, + fill = black, + inner sep = 0pt, + outer sep = 0pt, + minimum size = 8pt, + draw] +\end{tkzltxexample} + +maintenant si on utilise ceci : + +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetVertexSimple + \tikzset{VertexStyle/.style = { + shape = rectangle, + fill = red,% + inner sep = 0pt, + outer sep = 0pt, + minimum size = 10pt, + draw}} + \SetGraphUnit{3} + \Vertex{A}\EA(A){B} +\end{tikzpicture} +\end{tkzexample} + +\subsection{Modification d'un style \tkzname{VertexStyle}} + +C'est le style par défaut pour les sommets mais on peut le modifier. Voici quelques exemples utilisés plus tard dans ce document + +par défaut : + +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} +\SetGraphUnit{3} +\tikzset{VertexStyle/.style = {% + shape = circle, + shading = ball, + ball color = Orange, + minimum size = 20pt,draw}} + \SetVertexNoLabel + \Vertex{A}\EA[unit=3](A){B} +\end{tikzpicture} +\end{tkzexample} + + ou bien encore: + +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} +\SetGraphUnit{4} +\tikzset{VertexStyle/.style = {% + shape = circle, + shading = ball, + ball color = green!40!black,% + minimum size = 30pt,draw}} +\SetVertexNoLabel +\Vertex{A}\EA[unit=3](A){B} +\end{tikzpicture} +\end{tkzexample} + \vfill +\newpage + +\begin{NewMacroBox}{SetVertexSimple}{\oarg{local options}} + +\medskip +\emph{Il est possible de modifier les styles prédéfinis. La macro \tkzcname{SetVertexSimple} permet d'affiner le style \og Simple \fg des sommets.} +\begin{tabular}{llc} + \toprule +options & default & definition \\ \midrule +\TOline{Shape} {\textbackslash VertexShape }{} +\TOline{MinSize} {\textbackslash VertexSmallMinSize}{} +\TOline{LineWidth} {\textbackslash VertexLineWidth }{} +\TOline{LineColor} {\textbackslash VertexLineColor }{} +\TOline{FillColor} {\textbackslash VertexFillColor }{} \bottomrule +\end{tabular} +\end{NewMacroBox} + +\medskip +\subsection{Autre style \tkzcname{SetVertexSimple}} + +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetVertexSimple[Shape=diamond, + FillColor=blue!50] + \Vertices[unit=3]{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{\tkzcname{SetVertexSimple}, \tkzname{inner sep} et \tkzname{outer sep}} +\begin{center} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} +\SetGraphUnit{3} +\SetVertexSimple[MinSize = 12pt, + LineWidth = 4pt, + LineColor = red,% + FillColor = blue!60] +\tikzset{VertexStyle/.append style = + {inner sep = 0pt,% + outer sep = 2pt}} +\Vertices{circle}{A,B,C,D,E} +\Edges(A,B,C,D,E,A,C,E,B,D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill +\newpage +\begin{NewMacroBox}{SetVertexNormal}{\oarg{local options}} +\begin{tabular}{llc} +Options & Défaut & Définition \\ \midrule +\TOline{color} {\textbackslash EdgeColor } {} +\TOline{label} {no default } {} +\TOline{labelstyle} {no default } {} +\TOline{labeltext} {\textbackslash LabelTextColor } {} +\TOline{labelcolor} {\textbackslash LabelFillColor } {} +\TOline{style} {no default } {} +\TOline{lw} {\textbackslash EdgeLineWidth } {} + \bottomrule +\end{tabular} + +\medskip +\emph{Macro semblable à la précédente.} +\end{NewMacroBox} + +\subsection{Autre style \tkzcname{SetVertexNormal}} +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetGraphUnit{3} + \SetVertexNormal[Shape = rectangle,% + LineWidth = 2pt,% + FillColor = green!50] + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\vfill\newpage +\begin{NewMacroBox}{SetUpVertex}{\oarg{local options}} +\begin{tabular}{llc} +Options & Défaut & Définition \\ \midrule +\TOline{Lpos} {-90 } {position label externe } +\TOline{Ldist} {0cm } {distance du label } +\TOline{style} {{} } {permet d'affiner le style } +\TOline{NoLabel} {false} {supprime le label } +\TOline{LabelOut}{false} {Label externe } \bottomrule +\end{tabular} + +\medskip +\emph{Cette macro permet de modifier les options précédentes. } +\end{NewMacroBox} + +\subsection{\tkzcname{SetUpVertex}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \SetGraphUnit{3} + \SetUpVertex[Lpos=-60,LabelOut] + \Vertex{A}\EA(A){B} +\end{tikzpicture} +\end{tkzexample} + + +\subsection{\tkzcname{SetUpVertex} et \tkzcname{tikzset}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} +\SetGraphUnit{4} +\SetVertexLabel +\SetUpVertex[Lpos=-60,LabelOut] +\tikzset{VertexStyle/.append style = + {outer sep = .5\pgflinewidth}} +\renewcommand*{\VertexLineWidth}{6pt} +\Vertex{A}\EA(A){B}\Edge(A)(B) +\end{tikzpicture} +\end{tkzexample} + +\vfill\newpage +\section{Modification des styles des arêtes} + +\subsection{Utilisation de l'option \tkzname{style} de la macro \tkzcname{Edge}} + +\subsubsection{Exemple 1} +\begin{tkzexample}[latex=8cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \Vertex{e} + \EA(e){f} + \Edge(f)(e) + \Edge[style={bend left}](f)(e) + \Edge[style={bend right}](f)(e) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Exemple 2} +\begin{tkzexample}[latex=8cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \Vertex{e} + \EA(e){f} + \Edge[style={->,bend left}](f)(e) + \Edge[style={<-,bend right}](f)(e) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Exemple 3} +\begin{tkzexample}[latex=8cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \Vertex{a} + \EA(a){b} + \NO(b){c} + \SetUpEdge[style={->,bend right,ultra thick}, + color=red] + \Edge(a)(b) + \Edge(b)(c) + \Edge(c)(a) +\end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{Modification des styles par défaut \tkzcname{SetUpEdge}} + +Cette macro a une action globale et permet de rédéfinir un style. + +\begin{NewMacroBox}{SetUpEdge}{\oarg{local options}} +\begin{tabular}{llc} +Options & Défaut & Définition \\ +\midrule +\TOline{lw} {-90 } {position label externe } +\TOline{color}{\textbackslash EdgeLineWidth} {position label externe } +\TOline{label} {0cm } {distance du label } +\TOline{labelstyle} {{} } {permet d'affiner le style } +\TOline{labeltext} {false} {supprime le label } +\TOline{style}{false} {Label externe } \bottomrule +\end{tabular} + +\medskip +\emph{Cette macro permet de modifier les options précédentes. } +\end{NewMacroBox} + + +\subsubsection{Utilisation de \tkzcname{SetUpEdge} Exemple 1} +\begin{center} +{ \tikzset{VertexStyle/.style = {shape = circle, + draw = black, + fill = orange, + inner sep = 2pt, + outer sep = 0.5pt, + minimum size = 6mm, + line width = 1pt}} + \tikzset{every to/.style = {line width = 2pt, + color = orange}} +\begin{tkzexample}[vbox] + \begin{tikzpicture} + \SetGraphUnit{4} \SetUpEdge[lw=3pt] + \Vertex{A} + \EA (A){B} \NO (B){C} + \SO (B){D} \EA (B){E} + \Edges(A,B,C,A,D,E,C) + \end{tikzpicture} +\end{tkzexample} +} +\end{center} + + +\subsubsection{Utilisation de \tkzcname{SetUpEdge} Exemple 2} +{ \tikzset{VertexStyle/.style = { + shape = circle, + draw = black, + fill = orange, + inner sep = 2pt, + outer sep = 1pt, + minimum size = 6mm, + line width = 2pt}} +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture} + \SetGraphUnit{3} + \SetUpEdge[lw=1.5pt] + \Vertex{A} + \EA(A){B} \WE(A){C} \NO(A){D} + \SO(A){E} \NOEA(A){F} \NOWE(A){G} + \SOEA(A){H} \SOWE(A){I} + \foreach \v in {B,C,D,E,F,G,H,I}{% + \Edge(A)(\v)} + \end{tikzpicture} +\end{tkzexample} } + +\subsection{Arête avec label \tkzname{LabelStyle}} + + +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture} + \SetGraphUnit{4} + \tikzset{VertexStyle/.style = + {draw, + shape = circle, + shading = ball, + ball color = green!40!black, + minimum size = 24pt, + color = white}} + \tikzset{EdgeStyle/.style = + {->,bend right, + thick, + double = orange, + double distance = 1pt}} + \Vertex{a} + \EA(a){b} + \NO(b){c} + \tikzset{LabelStyle/.style = + {fill=white}} + \Edge[label=$1$](a)(b) + \Edge[label=$2$](b)(c) + \Edge[label=$3$](c)(a) +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Utiliser un style intermédiaire} + +\begin{tkzltxexample}[] + \SetGraphUnit{4} + \tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = Maroon!50, + minimum size = 24pt, + draw}} + \tikzset{TempEdgeStyle/.style = {ultra thick, + double = Maroon!50, + double distance = 2pt}} + \tikzset{LabelStyle/.style = {color = brown, + text=black}} +\end{tkzltxexample} + + +\begin{center} + \SetGraphUnit{4} + \tikzset{VertexStyle/.style = {shape = circle, + shading = ball, + ball color = Maroon!50, + minimum size = 24pt, + draw}} + \tikzset{TempEdgeStyle/.style = {ultra thick, + double = Maroon!50, + double distance = 2pt}} + \tikzset{LabelStyle/.style = {color = brown, + text=black}} +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture}[scale=.8] + \Vertex{A} + \EA(A){B} \EA(B){C} + \SetGraphUnit{8} + \NO(B){D} + \tikzset{EdgeStyle/.style = {TempEdgeStyle}} + \Edge[label=1](B)(D) + \tikzset{EdgeStyle/.style = {TempEdgeStyle,bend left}} + \Edge[label=4](A)(B) \Edge[label=5](B)(A) + \Edge[label=6](B)(C) \Edge[label=7](C)(B) + \Edge[label=2](A)(D) \Edge[label=3](D)(C) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\vfill\newpage + +\section{Changement de couleurs dans les styles prédéfinis} +Trois macros sont proposées + +\subsection{\tkzcname{SetGraphShadeColor}} +\begin{NewMacroBox}{SetGraphShadeColor}{\var{ball color}\var{color}\var{double}} +\emph{\tkzcname{SetGraphShadeColor} permet de modifier les couleurs pour le style \tkzname{Shade}.} +\end{NewMacroBox} + +\subsubsection{Exemple} +Cet exemmple utilise une macrio de \tkzname{tkz-berge}\NamePack{tkz-berge} +\begin{center} +\begin{tkzexample}[latex=7cm] + \begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphUnit{4} + \SetVertexNoLabel + \SetGraphShadeColor{red!50}{black}{red} + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) + \end{tikzpicture} +\end{tkzexample} + +\end{center} + +\newpage +\subsection{\tkzcname{SetGraphArtColor}} +\begin{NewMacroBox}{SetGraphArtColor}{\var{ball color}\var{color}} +\emph{\tkzcname{SetGraphArtColor} permet de modifier les couleurs pour le style \tkzname{Art}.} +\end{NewMacroBox} + +\subsubsection{Exemple} +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \SetVertexArt + \SetGraphArtColor{green!40!black}{magenta} + \SetGraphUnit{4} + \SetVertexNoLabel + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) + \end{tikzpicture} + \end{tkzexample} +\end{center} + + +\vfill\newpage +\subsection{\tkzcname{SetGraphColor}} +\begin{NewMacroBox}{SetGraphColor}{\var{fill color}\var{color}} +\emph{\tkzcname{SetGraphColor} permet de modifier les couleurs pour le style \tkzname{Normal}.} +\end{NewMacroBox} + + +\subsubsection{Exemple avec \tkzcname{SetGraphColor}} +\begin{center} + \begin{tkzexample}[vbox] + \begin{tikzpicture} + \SetGraphColor{yellow}{blue} + \SetGraphUnit{4} + \SetVertexNoLabel + \Vertices{circle}{A,B,C,D,E} + \Edges(A,B,C,D,E,A,C,E,B,D) + \end{tikzpicture} + \end{tkzexample} +\end{center} + + + +\newpage + +\subsection{Variation I autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetVertexNormal[Shape = circle, + FillColor = orange, + LineWidth = 2pt] + \SetUpEdge[lw = 1.5pt, + color = black, + labelcolor = white, + labeltext = red, + labelstyle = {sloped,draw,text=blue}] + \Vertex[x=0 ,y=0]{K} + \Vertex[x=0 ,y=2]{F} + \Vertex[x=-1,y=4]{D} + \Vertex[x=3 ,y=7]{H} + \Vertex[x=8 ,y=5]{B} + \Vertex[x=9 ,y=2]{N} + \Vertex[x=5 ,y=0]{M} + \Vertex[x=3 ,y=1]{S} + \tikzset{EdgeStyle/.append style = {bend left}} + \Edge[label = $120$](K)(F) + \Edge[label = $650$](H)(S) + \Edge[label = $780$](H)(M) + \Edge[label = $490$](D)(B) + \Edge[label = $600$](D)(M) + \Edge[label = $580$](B)(M) + \Edge[label = $600$](H)(N) + \Edge[label = $490$](F)(H) + \tikzset{EdgeStyle/.append style = {bend right}} + \Edge[label = $630$](S)(B) + \Edge[label = $210$](S)(N) + \Edge[label = $230$](S)(M) +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsection{Variation II autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetVertexNormal[Shape = circle, + FillColor = orange, + LineWidth = 2pt] + \SetUpEdge[lw = 1.5pt, + color = black, + labelcolor = white, + labeltext = red, + labelstyle = {sloped,draw,text=blue}] + \tikzstyle{EdgeStyle}=[bend left] + \Vertex[x=0, y=0]{G} + \Vertex[x=0, y=3]{A} + \Vertex[x=3, y=5]{P} + \Vertex[x=4, y=2]{C} + \Vertex[x=8, y=3]{Q} + \Vertex[x=7, y=0]{E} + \Vertex[x=3, y=-1]{R} + \Edges(G,A,P,Q,E) \Edges(C,A,Q) \Edges(C,R,G) \Edges(P,E,A) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Variation III autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \GraphInit[vstyle=Shade] + \SetGraphUnit{3} + \Vertex{e} + \NOEA(e){f}\SOEA(e){d} + \SOEA(f){h}\NOWE(f){g} + \WE(g){c} \SOWE(e){a} \SOWE(c){b} + \tikzstyle{LabelStyle}=[fill=white] + \tikzstyle{EdgeStyle}=[color=red] + \Edge[label=$3$](a)(b) + \Edge[label=$11$](a)(c) + \Edge[label=$6$](a)(e) + \Edge[label=$17$](a)(d) + \Edge[style={pos=.25},label=$20$](a)(g) + \Edge[label=$5$](c)(b) + \Edge[label=$6$](c)(e) + \Edge[label=$7$](c)(g) + \Edge[label=$7$](f)(e) + \Edge[label=$3$](d)(e) + \Edge[label=$9$](d)(h) + \Edge[label=$6$](g)(e) + \Edge[style={bend left,out=45,in=135},label=$11$](g)(h) + \Edge[label=$4$](f)(h) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Variation IV autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + \SetUpEdge[lw = 1.5pt, + color = orange, + labelcolor = gray!30, + labelstyle = {draw}] + \SetGraphUnit{3} + \GraphInit[vstyle=Normal] + \Vertex{P} + \NOEA(P){B} + \SOEA(P){M} + \NOEA(B){D} + \SOEA(B){C} + \SOEA(C){L} + \tikzset{EdgeStyle/.style={->}} + \Edge[label=$3$](C)(B) + \Edge[label=$10$](D)(B) + \Edge[label=$10$](L)(M) + \Edge[label=$10$](B)(P) + \tikzset{EdgeStyle/.style={<->}} + \Edge[label=$4$](P)(M) + \Edge[label=$9$](C)(M) + \Edge[label=$4$](C)(L) + \Edge[label=$5$](C)(D) + \Edge[label=$10$](B)(M) + \tikzset{EdgeStyle/.style={<->,relative=false,in=0,out=60}} + \Edge[label=$11$](L)(D) +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Variation V autour des styles} + +\begin{center} +\begin{tkzexample}[vbox] +\begin{tikzpicture} + + \SetUpEdge[lw = 1.5pt, + color = orange, + labelcolor = white] + \GraphInit[vstyle=Normal] \SetGraphUnit{3} + \tikzset{VertexStyle/.append style={fill = red!50}} + \Vertex{P} + \NOEA(P){B} \SOEA(P){M} \NOEA(B){D} + \SOEA(B){C} \SOEA(C){L} + \tikzset{EdgeStyle/.style={->}} + \Edge[label=$3$](C)(B) + \Edge[label=$10$](D)(B) + \Edge[label=$10$](L)(M) + \Edge[label=$10$](B)(P) + \tikzset{EdgeStyle/.style={<->}} + \Edge[label=$4$](P)(M) + \Edge[label=$9$](C)(M) + \Edge[label=$4$](C)(L) + \Edge[label=$5$](C)(D) + \Edge[label=$10$](B)(M) + \tikzset{EdgeStyle/.style={<->,relative=false,in=0,out=60}} + \Edge[label=$11$](L)(D) +\end{tikzpicture} +\end{tkzexample} +\end{center} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-vertex.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-vertex.tex new file mode 100644 index 0000000000..27b9327923 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-vertex.tex @@ -0,0 +1,242 @@ +\section{Vertex} +%<------------------------------------------------------------------------> +C'est bien évidemment la macro essentielle qui permet de placer des sommets. Les sommets peuvent être placés avec un système de coordonnées rectangulaires ou bien polaires ou encore relativement les uns par rapport aux autres. Quelques dispositions particulières sont également possibles. + +\subsection{\tkzcname{Vertex}} +\begin{NewMacroBox}{Vertex}{\oarg{local options}\var{Name}} +Un sommet se caractérise par~: +\begin{itemize} +\item sa référence, +\item sa position, +\item son label, +\item et le style. +\end{itemize} + +\medskip +Un argument non vide \IargName{Vertex}{Name} est obligatoire. Cet argument définit le nom de référence du node. C'est celui que l'on doit utiliser dans toute création de sommet (\tkzcname{Vertex}) Il ne faut pas le confondre avec le \tkzname{label} (étiquette) qui sera utilisé pour l'affichage. +On peut vouloir afficher $M_1$ alors que le nom lui sera $M1$. + +\medskip +Des options sont utilisées pour définir les quatre premières caractéristiques. Les styles texte et graphique sont traités séparément. + +\medskip +\begin{tabular}{llc} +\midrule +Options & Défaut & Définition \\ +\midrule +\TOline{x} {\{\}}{abscisse} +\TOline{y} {\{\}}{ordonnée} +\TOline{a} {\{\}}{angle} +\TOline{d} {\{\}}{distance} +\TOline{Node} {false}{utilisation d'une référence déjà définie} +\TOline{position} {\{\}}{style qui permet un positionnement relatif } +\TOline{dir} {\textbackslash EA}{direction pour un positionnement relatif } +\midrule +\TOline{empty} {false}{booléen permettant de ne pas afficher le sommet} +\midrule +\TOline{NoLabel} {false}{booléen supprime le label} +\TOline{LabelOut}{false}{booléen Label extérieur au node} +\TOline{L} {\{\}}{Le label} +\TOline{Math} {false}{booléen qui affiche le label en mode math} +\TOline{Ldist} {0cm }{distance du label au node} +\TOline{Lpos} {0 }{position du label par rapport au node} +\bottomrule +\end{tabular} + +\medskip +\emph{Cette macro permet de définir un sommet qui a un nom \tkzname{name} et un label.\\ +Si \tkzname{L}$=${} alors \tkzname{label} = \tkzname{Name} sinon \tkzname{label} = \tkzname{L}.} +\end{NewMacroBox} + +\subsubsection{Utilisation de coordonnées cartésiennes} +\tkzcname{Vertex[x=\meta{number},y=\meta{number}]\var{name}}. Coordonnées cartésiennes $x$ et $y$. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \GraphInit[vstyle=Normal] + \draw[help lines] (0,0) grid (2,2); + \Vertex{A} % par défaut x = 0 et y = 0 + \Vertex[x=2 , y=0]{B} \Vertex[x=2 , y=2]{C} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Utilisation de coordonnées polaires} + + \tkzcname{Vertex[a=\meta{number},d=\meta{number}]\var{vertex}} Les coordonnées polaires peuvent être aussi utilisées. J'ai utilisé une grille d'aide afin de constater le placement du sommet. + + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \GraphInit[vstyle=Normal] + \draw[help lines] (-2,0) grid (2,2); + \draw[red] (2,0) arc (0:180: 2 cm); + \Vertex{A} + \Vertex[a=45 , d=2 cm]{B} + \Vertex[a=135 , d=2 cm]{C} +\end{tikzpicture} +\end{tkzexample} + + + + + +\subsubsection{Option \tkzname{Node} : utilisation d'une position référencée} +Cette option permet de placer un sommet sur un Node déjà défini ou bien + un objet du type \og~coordinate~\fg. + % pb taile du node pour M ?? +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \GraphInit[vstyle=Normal] + \draw[help lines] (0,0) grid (2,2); + \Vertex{A} \Vertex[x=2 , y=2]{B} + \coordinate (M) at ($ (A)!.5!(B) $){}; + \Vertex[Node]{M} +\end{tikzpicture} +\end{tkzexample} + +\vfill +%<------------------------------------------------------------------------–> +% ShortCuts +%<------------------------------------------------------------------------–> + +\newpage +\subsection{Raccourcis pour placement relatif} + +Pour effectuer des placements relatifs, il est nécessaire de définir une distance unité entre deux sommets. La macro suivante permet de définir cette distance. + +\begin{NewMacroBox}{SetGraphUnit}{\var{nombre}} +\emph{Cette macro permet de définir la distance entre deux sommets. La distance se réfère aux centres de ces sommets et le nombre est exprimé en \tkzname{cm}. Par défaut, l'unité est $1$ cm.} + +utilisation :\tkzcname{SetGraphUnit\{2\}} +\end{NewMacroBox} + +\begin{NewMacroBox}{ShortCut}{\oarg{local options}\varp{vertex A}\var{vertex B}} +Ces raccourcis permettent de créer un \tkzname{vertex B} relativement à un +\tkzname{vertex A}. La distance entre les deux sommets est déterminé par la valeur de \tkzname{unit} et par les unités de \TIKZ. Horizontalement et verticalement la distance est définie par \tkzname{unit}$\times$\tkzname{x} et +\tkzname{unit}$\times$\tkzname{y}. La valeur de \tkzname{unit} peut être redéfinie par la macro \tkzcname{SetGraphUnit} ou bien avec l'option \tkzname{unit}. Avec l'option la définition est locale; avec la macro, la définition est globale mais elle peut être locale si elle est intervient dans un goupe \TEX ou un environnement \tkzname{scope}. +Les raccourcis sont : + +\medskip +\begin{tabular}{lll} +\hline +Raccourcis & & Définition \\ +\midrule +\TMline{EA} {} {à l'est } +\TMline{WE} {} {à l'ouest} +\TMline{NO} {} {au nord} +\TMline{SO} {} {au sud} +\TMline{NOEA} {} {au nord-est soit "nord" puis "est"} +\TMline{NOWE} {} {au nord-ouest soit "nord" puis "ouest" } +\TMline{SOEA} {} {au sud-est soit "sud" puis "est"} +\TMline{SOWE} {} {au sud-ouest soit "sud" puis "ouest"} +\bottomrule +\end{tabular} + +\medskip +\emph{\tkzcname{NOEA} est un raccourci pour \tkzcname{NO}\tkzcname{EA}. par défaut, la distance entre les sommets avec ce raccourci est $\sqrt{2}\times$ \tkzname{unit}=$\sqrt{2}$. Les options sont celles de la macro \tkzcname{Vertex}. } +\end{NewMacroBox} + +Nous allons d'abord modifier la distance entre deux noeuds d'une façon générale avec \tkzcname{SetGraphUnit\{2\}} sinon par défaut \tkzname{unit =1}. + +\subsubsection{Utilisation des raccourcis avec les valeurs par défaut} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \draw[help lines] (-1,-1) grid (1,1); + \GraphInit[vstyle=Normal] + \Vertex{A} + \EA(A){B} \WE(A){C} \NO(A){D} \SO(A){E} + \NOEA(A){F} \NOWE(A){G} \SOEA(A){H} \SOWE(A){I} + \foreach \v in {B,C,D,E,F,G,H,I}{\Edge(A)(\v)} +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Modification de l'unité avec \tkzcname{SetGraphUnit }} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \draw[help lines] (-2,-2) grid (2,2); + \SetGraphUnit{2} + \GraphInit[vstyle=Normal] + \Vertex{A} + \EA(A){B} \WE(A){C} \NO(A){D} \SO(A){E} + \NOEA(A){F} \NOWE(A){G} \SOEA(A){H} \SOWE(A){I} + \foreach \v in {B,C,D,E,F,G,H,I}{\Edge(A)(\v)} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Modification des unités de \TIKZ\ : \tkzname{x=2 cm,y=1 cm} } +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[x=2 cm,y=1 cm] + \draw[help lines] (-1,-1) grid (1,1); + \GraphInit[vstyle=Normal] + \Vertex{A} + \EA(A){B} \WE(A){C} \NO(A){D} \SO(A){E} + \NOEA(A){F} \NOWE(A){G} \SOEA(A){H} \SOWE(A){I} + \foreach \v in {B,C,D,E,F,G,H,I}{\Edge(A)(\v)} +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Exemple classique} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \draw[help lines] (-2,-2) grid (4,2); + \SetGraphUnit{2} + \coordinate (O) at (0,0); + \NOEA(O){A} \NOWE(O){B} \SOEA(O){D} + \SOWE(O){C} \NOEA(D){E} + \Edges(B,C,D,A,E,D,B,A,C) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Autre exemple classique} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \draw[help lines] (0,-2) grid (4,2); + \SetGraphUnit{2} + \GraphInit[vstyle=Normal] + \Vertex{A} + \EA(A){B} \NO(B){C} \SO(B){D} \EA(B){E} + \Edges(A,B,C,A,D,E,C) +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Modication locale de \tkzname{unit} avec l'option} +Le plus simple : +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \draw[help lines] (0,0) grid (2,3); + \SetGraphUnit{2} + \Vertex{A} \EA(A){B} + \NO[unit=3](B){C} + \NO(A){D} +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Modication locale de \tkzname{unit} avec l'environnement \tkzname{scope}} +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture} + \draw[help lines] (0,0) grid (2,3); + \SetGraphUnit{2} + \Vertex{A} \EA(A){B} + \begin{scope} + \SetGraphUnit{3} \NO(B){C} + \end{scope} + \NO(A){D} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Modication locale de \tkzname{unit} avec un groupe \TEX} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \draw[help lines] (0,0) grid (2,3); + \SetGraphUnit{2} + \Vertex{A} \EA(A){B} + {\SetGraphUnit{3} \NO(B){C}} + \NO(A){D} +\end{tikzpicture} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-vertices.tex b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-vertices.tex new file mode 100644 index 0000000000..d99a92dae9 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/latex/TKZdoc-gr-vertices.tex @@ -0,0 +1,172 @@ +\section{Placement de sommets sur une forme géométrique} +Il s'agit ici de placer un groupe de sommets suivant une direction donnée ou bien encore suivant une forme prédéfinie. Les sommets sont placés avec comme support une figure géométrique simple. La macro principale utilise une direction définie à l'aide de l'option dir, la version étoilée une forme particulière triangulaire, carrée etc... + + +\begin{NewMacroBox}{Vertices}{\oarg{local options}\var{type}\var{List of vertices}} +\emph{Il y a donc plusieurs types de formes géométriques, droite, triangle, carrés et cercles. La macro \tkzcname{SetGraphUnit} permet de modifier les longueurs. Pour les sommets alignés, ceux-ci sont placés suivant une direction donnée par |EA|, |WE|, |NO|, |SO|, |NOEA|, |NOWE|, |SOEA|, |SOWE|.} + +\medskip +\begin{tabular}{llc} + \toprule +Premier Argument & & Définition \\ +\midrule +\TAline{line } {} {Sommets alignés, une option détermine la direction} +\TAline{tr1 } {} {première forme de triangle} +\TAline{tr2 } {} {deuxième forme de triangle} +\TAline{tr3 } {} {troisième forme de triangle} +\TAline{tr4 } {} {quatrième forme de triangle} +\TAline{square} {} {quatre sommets sur un carré} +\TAline{circle} {} {sommets sur une cercle} +\bottomrule +\end{tabular} + +\medskip +\emph{Le second argument est une liste de noms pour les sommets.} + +\medskip +\begin{tabular}{llc} +\midrule +Options & Défaut & Définition \\ +\midrule +\TOline{dir} {EA} {permet de placer plusieurs sommets alignés} +\bottomrule +\end{tabular} + +\medskip +\emph{Les options sont celles d'un sommet (Vertex).} +\end{NewMacroBox} + + + +\subsection{\tkzcname{Vertices} à partir d'un sommet défini par des coordonnnées} + + +\begin{center} +\begin{tkzexample}[latex=7cm, ,small] +\begin{tikzpicture} + \SetGraphUnit{2} + \draw[help lines] (0,0) grid (5,2); + \Vertices[x=1,y=2]{line}{A,B,C} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{\tkzcname{Vertices} à partir d'une position donnée.} + +\begin{center} +\begin{tkzexample}[latex=7cm, ,small] +\begin{tikzpicture}[rotate=45] + \SetGraphUnit{2} + \draw[help lines] (0,0) grid (5,2); + \coordinate (A) at (1,1); + \Vertices[Node]{line}{A,B,C} +\end{tikzpicture} +\end{tkzexample} +\end{center} + +\subsection{Exemples avec une direction } + Il s'agit ici de placer une liste de sommets suivant une direction donnée, cette direction est définie à l'aide de l'option \tkzname{dir}. + + +\begin{center} +\begin{tkzexample}[latex=7cm, ,small] +\begin{tikzpicture} + \GraphInit[vstyle=Art] + \Vertices[dir=\NOEA]{line}{A,B,C,D} + \Vertices[dir=\NOWE]{line}{A,E,F,G} +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsection{Placement sur un triangle } + +Il y a différentes possibilités avec une forme triangulaire, mais les triangles sont isocèles rectangles. Voici dans l'ordre les formes \tkzname{tr1}, \tkzname{tr2} , \tkzname{tr3} et \tkzname{tr4} + + +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture}\SetGraphUnit{2} + \Vertices{tr1}{A,B,C} +\end{tikzpicture}\hspace*{2cm} +\begin{tikzpicture}\SetGraphUnit{2} + \Vertices{tr2}{A,B,C} +\end{tikzpicture} +\end{tkzexample} + +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture}\SetGraphUnit{2} + \Vertices{tr3}{A,B,C} +\end{tikzpicture}\hspace*{2cm} +\begin{tikzpicture}\SetGraphUnit{2} + \Vertices{tr4}{A,B,C} +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Utilisation d'un carré} + + +Deux autres possibilités de placer un node. La première utilise un node obtenu à l'aide d'une intersection (voir le pgfmanual). Dans la première, j'ai redéfini la distance unité entre deux sommets à l'aide de \tkzcname{SetGraphUnit}. + +\begin{center} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \SetGraphUnit{3} + \GraphInit[vstyle=Shade] + \Vertices{square}{A,B,C,D} + \coordinate (E) at (intersection of A--C and B--D); + \Vertex[Node]{E}% voir option node +\end{tikzpicture} +\end{tkzexample} +\end{center} + + +\subsection{Utilisation d'un cercle } + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \SetGraphUnit{2} + \Vertices{circle}{A,B,C,D} +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Utilisation d'un cercle et positionnement des labels } + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} \SetGraphUnit{2} + \GraphInit[vstyle=Classic] + \Vertices{circle}{A,B,C,D,E,F} +\end{tikzpicture} +\end{tkzexample} + + + +\subsection{Rotation et labels externes } + +|Lpos| = \tkzname{angle de la rotation}. Cela permet de faire une rotation du label autour du centre de chaque sommet et de suivre la rotation du graphe. Il suffit pour comprendre cette option de compiler l'exemple en l'omettant. + + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[rotate=90] + \GraphInit[vstyle=Classic] + \Vertices[Lpos=90,unit=2]{circle}{A,B,C,D,E,F} +\end{tikzpicture} +\end{tkzexample} + +\subsection{Placement sur un cercle } + +Avec des labels externes, il faut procéder avec précaution. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5] + \SetGraphUnit{4} + \GraphInit[vstyle=Classic] + \begin{scope}[rotate=45] + \Vertices[Lpos=45]{circle}{C,E,A,B} + \end{scope} + \NOEA[Lpos=90,unit=2.828](E){D} + \Edges(A,B,E,D,C,E,A,C,B) +\end{tikzpicture} +\end{tkzexample} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/doc/tkz-graph-screen.pdf b/macros/latex/contrib/tkz/tkz-graph/doc/tkz-graph-screen.pdf Binary files differnew file mode 100644 index 0000000000..ad826dad3e --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/doc/tkz-graph-screen.pdf diff --git a/macros/latex/contrib/tkz/tkz-graph/example/test-graph.pdf b/macros/latex/contrib/tkz/tkz-graph/example/test-graph.pdf Binary files differnew file mode 100644 index 0000000000..92a28d6f03 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/example/test-graph.pdf diff --git a/macros/latex/contrib/tkz/tkz-graph/example/test-graph.tex b/macros/latex/contrib/tkz/tkz-graph/example/test-graph.tex new file mode 100644 index 0000000000..62df83a7d7 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/example/test-graph.tex @@ -0,0 +1,12 @@ +\documentclass[border=3mm]{standalone} +\usepackage{tkz-graph} +\begin{document} +\begin{tikzpicture}[scale=1.75] + \GraphInit[vstyle=Art] + \Vertex{A} + \Vertex[x=4,y=0]{B} + \Vertex[x=1,y=2]{C} + \Edge[style={bend left}](B)(A) + \Edges(A,B,C,A) +\end{tikzpicture} +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-graph/latex/tkz-graph.sty b/macros/latex/contrib/tkz/tkz-graph/latex/tkz-graph.sty new file mode 100644 index 0000000000..c17a24c4ff --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-graph/latex/tkz-graph.sty @@ -0,0 +1,1026 @@ +% tkz-graph.sty v2.0 +% Copyright 2021 Alain Matthes +% 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 Alain Matthes. + +%<---------------------------------------------------------------------------> +% Objet : Création de graphes +%<---------------------------------------------------------------------------> +\def\fileversion{2.00} +\def\filedate{2021/01/20} +\typeout{2021/01/20 v 2.00 tkz-graph.sty} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tkz-graph}[2021/01/20 2.00 base for graphs] +%<---------------------------------------------------------------------------> + +\ifx\e@alloc\@undefined +\RequirePackage{etex} +\fi +\RequirePackage{ifthen} +\RequirePackage{xkeyval} +\RequirePackage{tikz} +\usetikzlibrary{arrows} +%<---------------------------------------------------------------------------> +% todo remove some counters +\newcounter{tkz@gr@a} +\newcounter{tkz@gr@b} +\newcounter{tkz@gr@c} +\newcounter{tkz@gr@e} +\newcounter{tkz@gr@d} +\newcounter{tkz@gr@p} +\newcounter{tkz@gr@i} +\newcounter{tkz@gr@n} +\newcounter{tkz@gr@ta} +\newcounter{tkz@gr@tb} +%<---------------------------------------------------------------------------> +% Init vertex +%<---------------------------------------------------------------------------> +%<---------------------------------------------------------------------------> +\def\tkz@gr@background@color{white} +\def\tkz@gr@text@color{black} +\global\edef\tkz@suc@bkc{\tkz@gr@background@color} +\global\edef\tkz@suc@txt{\tkz@gr@text@color} +\pgfkeys{ +/tkzsupcol/.cd, + background/.code = {\global\edef\tkz@suc@bkc{#1}}, + text/.code = {\global\edef\tkz@suc@txt{#1}}, +} +\def\tkzSetUpColors{\pgfutil@ifnextchar[{\tkz@SetUpColors}{\tkz@SetUpColors[]}} +\def\tkz@SetUpColors[#1]{% +\begingroup +\pgfkeys{% +/tkzsupcol/.cd, + background = \tkz@gr@background@color, + text = \tkz@gr@text@color + } +\pgfqkeys{/tkzsupcol}{#1} +\pagecolor{\tkz@suc@bkc} +\color{\tkz@suc@txt} +\endgroup +} + +\newcommand*{\GraphUnit}{1} +\newcommand*{\VertexInnerSep}{2pt} +\newcommand*{\VertexOuterSep}{0pt} +\newcommand*{\VertexDistance}{3cm} +\newcommand*{\VertexShape}{circle} +\newcommand*{\VertexLineWidth}{0.5pt} +\newcommand*{\VertexLineColor}{\tkz@suc@txt} +\newcommand*{\VertexLightFillColor}{\tkz@suc@bkc} +\newcommand*{\VertexDarkFillColor}{\tkz@suc@txt} +\newcommand*{\VertexTextColor}{\tkz@suc@txt} +\newcommand*{\VertexFillColor}{\tkz@suc@txt} +\newcommand*{\VertexBallColor}{orange} +\newcommand*{\VertexBigMinSize}{24pt} +\newcommand*{\VertexInterMinSize}{18pt} +\newcommand*{\VertexSmallMinSize}{12pt} +\newcommand*{\EdgeFillColor}{orange} +\newcommand*{\EdgeArtColor}{orange} +\newcommand*{\EdgeColor}{\tkz@suc@txt} +\newcommand*{\EdgeDoubleDistance}{1pt} +\newcommand*{\EdgeLineWidth}{0.8pt} +\newcommand*{\LabelTextColor}{\tkz@suc@txt} +\newcommand*{\LabelFillColor}{\tkz@suc@bkc} + +\tikzset{pre/.style={<-,shorten <=1pt,>=stealth',semithick}} +\tikzset{post/.style={->,shorten <=1pt,>=stealth',semithick}} +%<---------------------------------------------------------------------------> +% Simple Vertex +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {SVS} {Shape}{} +\define@cmdkey [GR] {SVS} {MinSize}{} +\define@cmdkey [GR] {SVS} {LineWidth}{} +\define@cmdkey [GR] {SVS} {LineColor}{} +\define@cmdkey [GR] {SVS} {FillColor}{} +\define@cmdkey [GR] {SVS} {InnerSep}{} +\define@cmdkey [GR] {SVS} {OuterSep}{} +\presetkeys [GR] {SVS} {Shape = \VertexShape, + MinSize = \VertexSmallMinSize, + LineWidth = \VertexLineWidth, + LineColor = \VertexLineColor, + InnerSep = \VertexInnerSep, + OuterSep = \VertexOuterSep, + FillColor = \VertexFillColor}{} +\newcommand*{\SetVertexSimple}[1][]{\GR@SetVertexSimple[#1]}% +\def\GR@SetVertexSimple[#1]{% +\setkeys[GR]{SVS}{#1}% +\presetkeys[GR]{vertex}{NoLabel = true}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \cmdGR@SVS@Shape, + color = \cmdGR@SVS@LineColor, + fill = \cmdGR@SVS@FillColor, + inner sep = \cmdGR@SVS@InnerSep, + outer sep = \cmdGR@SVS@OuterSep, + minimum size = \cmdGR@SVS@MinSize, + line width = \cmdGR@SVS@LineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor}} +\tikzset{LabelStyle/.style={}}} +%<---------------------------------------------------------------------------> +% Shade Vertex +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {shade} {Shape}{} +\define@cmdkey [GR] {shade} {MinSize}{} +\define@cmdkey [GR] {shade} {LineWidth}{} +\define@cmdkey [GR] {shade} {LineColor}{} +\define@cmdkey [GR] {shade} {BallColor}{} +\define@cmdkey [GR] {shade} {InnerSep}{} +\define@cmdkey [GR] {shade} {OuterSep}{} +\presetkeys [GR] {shade} {Shape = \VertexShape, + MinSize = \VertexBigMinSize, + LineWidth = \VertexLineWidth, + LineColor = \VertexLineColor, + InnerSep = \VertexInnerSep, + OuterSep = \VertexOuterSep, + BallColor = \VertexBallColor}{} +\newcommand*{\SetVertexShade}[1][]{\GR@SetVertexShade[#1]}% +\def\GR@SetVertexShade[#1]{% +\setkeys[GR]{shade}{#1}% +\presetkeys[GR]{vertex}{NoLabel = false}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \cmdGR@shade@Shape, + ball color = \cmdGR@shade@BallColor, + inner sep = \cmdGR@shade@InnerSep, + outer sep = \cmdGR@shade@OuterSep, + minimum size = \cmdGR@shade@MinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor,% color outside + double = \EdgeFillColor,% inside + double distance = \EdgeDoubleDistance}}% +\tikzset{LabelStyle/.style={}}} +%<---------------------------------------------------------------------------> +% Art Vertex +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {art} {Shape}{} +\define@cmdkey [GR] {art} {MinSize}{} +\define@cmdkey [GR] {art} {LineWidth}{} +\define@cmdkey [GR] {art} {LineColor}{} +\define@cmdkey [GR] {art} {BallColor}{} +\define@cmdkey [GR] {art} {InnerSep}{} +\define@cmdkey [GR] {art} {OuterSep}{} +\presetkeys [GR] {art} {Shape = \VertexShape, + MinSize = \VertexSmallMinSize, + LineWidth = \VertexLineWidth, + LineColor = \VertexLineColor, + InnerSep = \VertexInnerSep, + OuterSep = \VertexOuterSep, + BallColor = \VertexBallColor}{} +\newcommand*{\SetVertexArt}[1][]{\GR@SetVertexArt[#1]}% +\def\GR@SetVertexArt[#1]{% +\setkeys[GR]{art}{#1}% +\presetkeys[GR]{vertex}{NoLabel = true}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \cmdGR@art@Shape, + ball color = \cmdGR@art@BallColor, + inner sep = \cmdGR@art@InnerSep, + outer sep = \cmdGR@art@OuterSep, + minimum size = \cmdGR@art@MinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeArtColor}} +\tikzset{LabelStyle/.style = {}}} +%<---------------------------------------------------------------------------> +% Normal Vertex +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {SVN} {Shape}{} +\define@cmdkey [GR] {SVN} {MinSize}{} +\define@cmdkey [GR] {SVN} {LineWidth}{} +\define@cmdkey [GR] {SVN} {LineColor}{} +\define@cmdkey [GR] {SVN} {FillColor}{} +\define@cmdkey [GR] {SVN} {TextColor}{} +\define@cmdkey [GR] {SVN} {InnerSep}{} +\define@cmdkey [GR] {SVN} {OuterSep}{} +\presetkeys [GR] {SVN} {Shape = \VertexShape, + MinSize = \VertexInterMinSize, + LineWidth = \VertexLineWidth, + LineColor = \VertexLineColor, + FillColor = \VertexLightFillColor, + InnerSep = \VertexInnerSep, + OuterSep = \VertexOuterSep, + TextColor = \VertexTextColor}{} +\newcommand*{\SetVertexNormal}[1][]{\GR@SetVertexNormal[#1]}% +\def\GR@SetVertexNormal[#1]{% +\setkeys[GR]{SVN}{#1}% +\tikzset{VertexStyle/.style = {shape = \cmdGR@SVN@Shape, + minimum size = \cmdGR@SVN@MinSize, + line width = \cmdGR@SVN@LineWidth, + color = \cmdGR@SVN@LineColor, + fill = \cmdGR@SVN@FillColor, + text = \cmdGR@SVN@TextColor, + inner sep = \cmdGR@SVN@InnerSep, + outer sep = \cmdGR@SVN@OuterSep, + draw}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor}} +\tikzset{LabelStyle/.style={}}} +\SetVertexNormal% default +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {init} {unit}{} +\define@choicekey*[GR]{init}{vstyle}[\val\nr]{Empty,% + Hasse,% + Simple,% + Classic,% + Normal,% + Shade,% + Dijkstra,% + Welsh,% + Art,% + Shade Art}{% +\edef\GR@init@vstyle{\nr} +\ifcase\nr\relax +% Empty +\presetkeys [GR] {vertex} {LabelOut = false}{}% +\tikzset{VertexStyle/.style = {shape = \VertexShape, + color = \VertexLineColor, + fill = \VertexLightFillColor, + inner sep = \VertexInnerSep, + outer sep = 0.5\pgflinewidth, + text = \VertexTextColor, + minimum size = \VertexSmallMinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth,\EdgeColor}} +\tikzset{LabelStyle/.style={}} +\or +% Hasse +\presetkeys [GR] {vertex} {NoLabel = true}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \VertexShape, + color = \VertexLineColor, + fill = \VertexLightFillColor, + inner sep = \VertexInnerSep, + outer sep = 0.5\pgflinewidth, + text = \VertexTextColor, + minimum size = \VertexSmallMinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor}} +\tikzset{LabelStyle/.style={}} +\or +% Simple +\presetkeys [GR] {vertex} {NoLabel = true}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \VertexShape, + color = \VertexLineColor, + fill = \VertexDarkFillColor, + inner sep = \VertexInnerSep, + outer sep = 0.5\pgflinewidth, + text = \VertexTextColor, + minimum size = \VertexSmallMinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor}} +\tikzset{LabelStyle/.style={}} +% Classic +\or +\presetkeys [GR] {vertex} {LabelOut = true}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \VertexShape, + color = \VertexLineColor, + fill = \VertexDarkFillColor, + inner sep = \VertexInnerSep, + outer sep = 0.5\pgflinewidth, + text = \VertexTextColor, + minimum size = \VertexSmallMinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor}} +\tikzset{LabelStyle/.style={}} +% Normal +\or +\presetkeys [GR] {vertex} {LabelOut = false}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \VertexShape, + minimum size = \VertexInterMinSize, + line width = \VertexLineWidth, + color = \VertexLineColor, + outer sep = 0.5\pgflinewidth, + fill = \VertexLightFillColor, + text = \VertexTextColor, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor}} +\tikzset{LabelStyle/.style={}} +% Shade +\or +\presetkeys [GR] {vertex} {LabelOut = false}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \VertexShape, + ball color = \VertexBallColor, + color = \VertexLineColor, + text = \VertexTextColor, + inner sep = \VertexInnerSep, + outer sep = \VertexOuterSep, + minimum size = \VertexBigMinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor,% color outside + double = \EdgeFillColor,% inside + double distance = \EdgeDoubleDistance}}% +\tikzset{LabelStyle/.style={}} +% Dijkstra +\or +\presetkeys [GR] {vertex} {LabelOut = false}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \VertexShape, + color = \VertexLineColor, + fill = \VertexLightFillColor, + inner sep = \VertexInnerSep, + outer sep = 0.5\pgflinewidth, + text = \VertexTextColor, + minimum size = \VertexInterMinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor}} +\tikzset{LabelStyle/.style={}} +% Welsh +\or +\presetkeys [GR] {vertex} {LabelOut = true}{}% +\tikzset{VertexStyle/.style = {draw, + shape = \VertexShape, + color = \VertexLineColor, + fill = \VertexLightFillColor, + inner sep = \VertexInnerSep, + outer sep = \VertexOuterSep, + text = \VertexTextColor, + minimum size = \VertexSmallMinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor}}% +\tikzset{LabelStyle/.style={}} +% Art +\or +\presetkeys [GR] {vertex} {NoLabel = true}{}% +\tikzset{VertexStyle/.style = {shape = \VertexShape, + ball color = \VertexBallColor, + color = \VertexLineColor, + inner sep = \VertexInnerSep, + outer sep = \VertexOuterSep, + minimum size = \VertexSmallMinSize, + line width = \VertexLineWidth}}% +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeArtColor}} +\tikzset{LabelStyle/.style = {}} +% ShadeArt +\or +\presetkeys [GR] {vertex} {NoLabel = true}{}% +\tikzset{VertexStyle/.style = {shape = \VertexShape, + ball color = \VertexBallColor, + inner sep = \VertexInnerSep, + outer sep = \VertexOuterSep, + minimum size = \VertexSmallMinSize, + line width = \VertexLineWidth}} +\tikzset{EdgeStyle/.style = {line width = \EdgeLineWidth, + \EdgeColor, + double = \EdgeFillColor, + double distance = .5\EdgeDoubleDistance}} +\tikzset{LabelStyle/.style = {}} +\fi% +} + +\presetkeys [GR] {init} {vstyle = Normal,% + unit = \GraphUnit}{} + +\newcommand*{\SetGraphUnit}[1]{\renewcommand{\GraphUnit}{#1}}% + +\newcommand*{\GraphInit}[1][]{\setkeys[GR]{init}{#1}% +\edef\GraphUnit{\cmdGR@init@unit}% +}% +%<---------------------------------------------------------------------------> +% Colors +%<---------------------------------------------------------------------------> +\newcommand*{\SetGraphShadeColor}[3]{% + \tikzset{VertexStyle/.append style = {ball color=#1}} + \tikzset{EdgeStyle/.append style = {color=#2,double=#3}} +} +\newcommand*{\SetGraphArtColor}[2]{% + \tikzset{VertexStyle/.append style = {ball color=#1}} + \tikzset{EdgeStyle/.append style = {color=#2}} +} +\newcommand*{\SetGraphColor}[2]{% + \tikzset{VertexStyle/.append style = {fill=#1}} + \tikzset{EdgeStyle/.append style = {color=#2}} +} +\newcommand*{\AddVertexColor}[2]{% +\begingroup + \tikzset{VertexStyle/.append style = {fill=#1}} + \foreach \v in {#2} + {\Vertex[Node,NoLabel]{\v}} +\endgroup +} +%<---------------------------------------------------------------------------> +\newcommand*{\SetVertexNoLabel}{% + \presetkeys [GR] {vertex} {NoLabel = true}{}% +} +% add RV +\newcommand*{\SetVertexLabel}{% + \presetkeys [GR] {vertex} {NoLabel = false}{}% +} +%<---------------------------------------------------------------------------> +\newcommand*{\SetVertexLabelOut}{% + \presetkeys [GR] {vertex} {LabelOut = true}{}% +} +\newcommand*{\SetVertexLabelIn}{% + \presetkeys [GR] {vertex} {LabelOut = false}{}% +} +\newcommand*{\SetVertexMath}{% + \presetkeys [GR] {vertex} {Math = true}{}% + \presetkeys [GR] {cl} {Math = true}{}% +} +\newcommand*{\SetVertexNoMath}{% + \presetkeys [GR] {vertex} {Math = false}{}% + \presetkeys [GR] {cl} {Math = false}{}% +} +%<---------------------------------------------------------------------------> +% Init SetUpVertex +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {SUV} {Lpos}{} +\define@cmdkey [GR] {SUV} {Ldist}{} +\define@cmdkey [GR] {SUV} {Style}{} +\define@cmdkey [GR] {SUV} {MinSize}{} +\define@cmdkey [GR] {SUV} {LineWidth}{} +\define@cmdkey [GR] {SUV} {TextColor}{} +\define@cmdkey [GR] {SUV} {LineColor}{} +\define@cmdkey [GR] {SUV} {FillColor}{} +\define@cmdkey [GR] {SUV} {InnerSep}{} +\define@cmdkey [GR] {SUV} {OuterSep}{} +\define@cmdkey [GR] {SUV} {Unit}{} +\define@boolkey [GR] {SUV} {NoLabel} [true]{} +\define@boolkey [GR] {SUV} {LabelOut}[true]{} +\define@boolkey [GR] {SUV} {Math}[true]{} +\presetkeys [GR] {SUV} {Ldist = 0cm, + Lpos = 0, + Style = {}, + LabelOut = false, + NoLabel = false, + Math = false, + Unit = \GraphUnit, + MinSize = \VertexInterMinSize, + TextColor = \VertexTextColor, + LineColor = \VertexLineColor, + FillColor = \VertexLightFillColor, + LineWidth = \VertexLineWidth, + InnerSep = \VertexInnerSep, + OuterSep = \VertexOuterSep}{} +%<---------------------------------------------------------------------------> +% SetUpVertex +%<---------------------------------------------------------------------------> +\newcommand*{\SetUpVertex}[1][]{\GR@SetUpVertex[#1]}% +\def\GR@SetUpVertex[#1]{% +\setkeys[GR]{SUV}{#1}% +\presetkeys [GR] {vertex} {Lpos = \cmdGR@SUV@Lpos, + Ldist = \cmdGR@SUV@Ldist, + style = \cmdGR@SUV@Style, + unit = \cmdGR@SUV@Unit}{}% +\tikzset{VertexStyle/.append style = {inner sep = \cmdGR@SUV@InnerSep, + outer sep = \cmdGR@SUV@OuterSep, + minimum size = \cmdGR@SUV@MinSize, + text = \cmdGR@SUV@TextColor, + color = \cmdGR@SUV@LineColor, + fill = \cmdGR@SUV@FillColor, + line width = \cmdGR@SUV@LineWidth}} +\ifGR@SUV@NoLabel% + \presetkeys [GR] {vertex} {NoLabel = true}{}% +\fi% +\ifGR@SUV@LabelOut% + \presetkeys [GR] {vertex} {LabelOut = true}{}% +\fi% +\ifGR@SUV@Math% + \presetkeys [GR] {vertex} {Math = true}{}% +\fi% +} +%<---------------------------------------------------------------------------> +% Init Vertex +%<---------------------------------------------------------------------------> +\define@boolkey [GR] {vertex} {empty}[true]{} +\define@cmdkey [GR] {vertex} {unit}{} +\define@cmdkey [GR] {vertex} {x}{} +\define@cmdkey [GR] {vertex} {y}{} +\define@cmdkey [GR] {vertex} {a}{} +\define@cmdkey [GR] {vertex} {d}{} +\define@boolkey [GR] {vertex} {Node}[true]{} +\define@cmdkey [GR] {vertex} {dir}{} +\define@cmdkey [GR] {vertex} {style}{} +\define@cmdkey [GR] {vertex} {position}{} +\define@cmdkey [GR] {vertex} {L}{} +\define@cmdkey [GR] {vertex} {Lpos}{} +\define@cmdkey [GR] {vertex} {Ldist}{} +\define@boolkey [GR] {vertex} {NoLabel}[true]{} +\define@boolkey [GR] {vertex} {Math}[true]{} +\define@boolkey [GR] {vertex} {LabelOut}[true]{} +\presetkeys [GR] {vertex} {Node = false, + NoLabel = false, + LabelOut = false, + empty = false, + Math = false, + x = {}, + y = {}, + a = {}, + d = {}, + unit = \GraphUnit, + dir = \EA, + position = {}, + style = {}, + L = {}, + Ldist = 0cm, + Lpos = 0}{} +%<---------------------------------------------------------------------------> +% Vertex +%<---------------------------------------------------------------------------> +\newcommand*{\Vertex}[1][]{\@vertex[#1]}% +\def\@vertex[#1]#2{% + \setkeys[GR]{vertex}{#1}% + \@@vertex{#2}% +} +% coord rect todo coord polar and pos relative +\def\@@vertex#1{% + \def\nstyle{VertexStyle} +%<---------------------------------------------------------------------------> +\ifGR@vertex@Node% + \pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} + \pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} + \edef\cmdGR@vertex@x{\pgf@x} + \edef\cmdGR@vertex@y{\pgf@y} +\fi% +%<---------------------------------------------------------------------------> +\ifGR@vertex@empty% + \begin{scope} + \ifthenelse{\not\equal{\cmdGR@vertex@x}{}}{% + \protected@edef\@tempa{% + \noexpand\node[inner sep = 0pt](#1)% + at (\cmdGR@vertex@x,\cmdGR@vertex@y){}}% + \@tempa;}{% + \ifthenelse{\not\equal{\cmdGR@vertex@d}{}}{% + \protected@edef\@tempa{% + \noexpand\node[inner sep = 0pt](#1)% + at (\cmdGR@vertex@a:\cmdGR@vertex@d){}}% + \@tempa;}{% + \protected@edef\@tempa{% + \noexpand \node[inner sep = 0pt](#1)% + [\cmdGR@vertex@position]{}}% + \@tempa;}}% + \end{scope} +\else + \begin{scope}[label distance = \cmdGR@vertex@Ldist] + \ifGR@vertex@NoLabel + \def\vertex@Label{}% + \def\cmdGR@vertex@L{}% + \def\vertex@Name{} + \else% + \ifGR@vertex@Math + \ifthenelse{\equal{\cmdGR@vertex@L}{}}{% + \def\vertex@Name{$#1$}}{\def\vertex@Name{$\cmdGR@vertex@L$}} + \else + \ifthenelse{\equal{\cmdGR@vertex@L}{}}{% + \def\vertex@Name{#1}}{\def\vertex@Name{\cmdGR@vertex@L}} + \fi% + \ifGR@vertex@LabelOut% + \def\nstyle{VertexStyle,% + label={[text = \cmdGR@SVN@TextColor,\cmdGR@vertex@style]% + \cmdGR@vertex@Lpos:\vertex@Name}} + \def\vertex@Label{} + \else% + \def\vertex@Label{\vertex@Name} + \fi + \fi +%<---------------------------------------------------------------------------> + \ifthenelse{\not\equal{\cmdGR@vertex@x}{}}{% + \protected@edef\@tempa{% + \noexpand\node[outer sep=0pt,\cmdGR@vertex@style,\nstyle](#1) + at (\cmdGR@vertex@x,\cmdGR@vertex@y){% + \noexpand\vertex@Label}}% + \@tempa;% + }{% + \ifthenelse{\not\equal{\cmdGR@vertex@d}{}}{% + \protected@edef\@tempa{% + \noexpand\node[outer sep=0pt,\cmdGR@vertex@style,\nstyle](#1) + at (\cmdGR@vertex@a:\cmdGR@vertex@d){% + \noexpand\vertex@Label}}% + \@tempa;% + }{% + \protected@edef\@tempa{% + \noexpand\node[outer sep=0pt,\cmdGR@vertex@style,\nstyle](#1)% + [\cmdGR@vertex@position]{% + \noexpand\vertex@Label}}% + \@tempa;}}% + \end{scope} +\fi% +} +%<---------------------------------------------------------------------------> +% End of Vertex +%<---------------------------------------------------------------------------> +% EA east of #2 +%<---------------------------------------------------------------------------> +\newcommand*{\EA}[1][]{\@droite[#1]}% +\def\@droite[#1](#2)#3{% +\begingroup% + \setkeys[GR]{vertex}{#1}% + \path (#2)--++(\cmdGR@vertex@unit,0) coordinate (#3); + \Vertex[#1,Node]{#3} +\endgroup% +}% +%<---------------------------------------------------------------------------> +% WE west of #2 +%<---------------------------------------------------------------------------> +\newcommand*{\WE}[1][]{\@gauche[#1]}% +\def\@gauche[#1](#2)#3{% +\begingroup% + \setkeys[GR]{vertex}{#1}% + \path (#2)--++(-\cmdGR@vertex@unit,0) coordinate (#3); + \Vertex[#1,Node]{#3} + \endgroup% +} +%<---------------------------------------------------------------------------> +% NO north of #2 +%<---------------------------------------------------------------------------> +\newcommand*{\NO}[1][]{\@haut[#1]}% +\def\@haut[#1](#2)#3{% +\begingroup% + \setkeys[GR]{vertex}{#1}% + \path (#2)--++(0,\cmdGR@vertex@unit) coordinate (#3); + \Vertex[#1,Node]{#3} +\endgroup% +} +%<---------------------------------------------------------------------------> +% SO south of #2 +%<---------------------------------------------------------------------------> +\newcommand*{\SO}[1][]{\@bas[#1]}% +\def\@bas[#1](#2)#3{% +\begingroup% + \setkeys[GR]{vertex}{#1}% + \path (#2)--++(0,-\cmdGR@vertex@unit) coordinate (#3); + \Vertex[#1,Node]{#3} +\endgroup% +} +%<---------------------------------------------------------------------------> +% NOEA north east of #2 +%<---------------------------------------------------------------------------> +\newcommand*{\NOEA}[1][]{\@hautdroite[#1]}% +\def\@hautdroite[#1](#2)#3{% +\begingroup% + \setkeys[GR]{vertex}{#1}% + \path (#2)--++(\cmdGR@vertex@unit,\cmdGR@vertex@unit) coordinate (#3); + \Vertex[#1,Node]{#3} +\endgroup% +} + +%<---------------------------------------------------------------------------> +% NOWE north west of #2 +%<---------------------------------------------------------------------------> +\newcommand*{\NOWE}[1][]{\@hautgauche[#1]}% +\def\@hautgauche[#1](#2)#3{% +\begingroup% + \setkeys[GR]{vertex}{#1}% + \path (#2)--++(-\cmdGR@vertex@unit,\cmdGR@vertex@unit) coordinate (#3); + \Vertex[#1,Node]{#3} +\endgroup% +} +%<---------------------------------------------------------------------------> +% SOEA south east of #2 +%<---------------------------------------------------------------------------> +\newcommand*{\SOEA}[1][]{\@basdroite[#1]}% +\def\@basdroite[#1](#2)#3{% +\begingroup% + \setkeys[GR]{vertex}{#1}% + \path (#2)--++(\cmdGR@vertex@unit,-\cmdGR@vertex@unit) coordinate (#3); + \Vertex[#1,Node]{#3} +\endgroup% +} +%<---------------------------------------------------------------------------> +% SOWE south west of #2 +%<---------------------------------------------------------------------------> +\newcommand*{\SOWE}[1][]{\@basgauche[#1]}% +\def\@basgauche[#1](#2)#3{% +\begingroup% + \setkeys[GR]{vertex}{#1}% + \path (#2)--++(-\cmdGR@vertex@unit,-\cmdGR@vertex@unit) coordinate (#3); + \Vertex[#1,Node]{#3} +\endgroup% +} + +%<---------------------------------------------------------------------------> +% Vertices +%<---------------------------------------------------------------------------> +\newcommand*{\Vertices}[1][]{\Vertices@NoStar[#1]}% +\def\Vertices@NoStar[#1]#2#3{% +\setkeys[GR]{vertex}{#1}% +\begingroup% + \setcounter{tkz@gr@p}{0} + \@for\liste:=#3\do{% + \stepcounter{tkz@gr@p}% + \global\expandafter\let\csname label@\alph{tkz@gr@p}\endcsname\liste} + \ifthenelse{\equal{#2}{line}}{% + \setcounter{tkz@gr@p}{0} + \foreach \fin in {#3}{% + \ifthenelse{\value{tkz@gr@p}=0}{% + \global\let\deb\fin + \Vertex[#1]{\fin} + \stepcounter{tkz@gr@p} + }{% + \cmdGR@vertex@dir[#1,x={},y={},a={},d={},Node=false](\deb){\fin} + \global\let\deb\fin + } + }% + }{ + \ifthenelse{\equal{#2}{square}}{% + \begin{scope}[rotate=45] + \Vertex[#1,Lpos=-135]{\label@a} + \EA[#1,Lpos=-45,x={},y={},Node=false](\label@a){\label@b} + \NO[#1,Lpos=45, x={},y={},Node=false](\label@b){\label@c} + \WE[#1,Lpos=135,x={},y={},Node=false](\label@c){\label@d} + \end{scope} +}{% + \ifthenelse{\equal{#2}{tr1}}{% + \Vertex[#1]{\label@a} + \EA[#1,x={},y={},Node=false](\label@a){\label@b} + \NO[#1,x={},y={},Node=false](\label@b){\label@c}}{% + \ifthenelse{\equal{#2}{tr2}}{% + \Vertex[#1]{\label@a} + \NO[#1,x={},y={},Node=false](\label@a){\label@b} + \EA[#1,x={},y={},Node=false](\label@b){\label@c}}{% + \ifthenelse{\equal{#2}{tr3}}{% + \Vertex[#1]{\label@a} + \NO[#1,x={},y={},Node=false](\label@a){\label@b} + \WE[#1,x={},y={},Node=false](\label@b){\label@c}}{% + \ifthenelse{\equal{#2}{tr4}}{% + \Vertex[#1]{\label@a} + \WE[#1,x={},y={},Node=false](\label@a){\label@b} + \NO[#1,x={},y={},Node=false](\label@b){\label@c}}{% + \ifthenelse{\equal{#2}{circle}}{% + \pgfmathdivide{360}{\value{tkz@gr@p}}% + \global\let\gr@angle\pgfmathresult% + \setcounter{tkz@gr@p}{0} + \foreach \lab in {#3}{% + \pgfmathmultiply{\gr@angle}{\thetkz@gr@p}% + \let\gr@newangle\pgfmathresult% + \pgfmathadd{\cmdGR@vertex@Lpos}{\gr@newangle} + \let\gr@posangle\pgfmathresult% + \Vertex[#1, + a = \gr@newangle, + d = \cmdGR@vertex@unit, + Lpos = \gr@posangle]{\lab} + \stepcounter{tkz@gr@p}% + }% + }{}% + }}}}}}% +\endgroup% +} +%<---------------------------------------------------------------------------> +% Edge style +%<---------------------------------------------------------------------------> +\tikzset{LabelStyle/.style={}}% add 03/04/2009 +\tikzset{EdgeStyle/.style={}} +%<---------------------------------------------------------------------------> +% Init SetUpEdge +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {SUE} {color}{} +\define@cmdkey [GR] {SUE} {label}{} +\define@cmdkey [GR] {SUE} {labelstyle}{} +\define@cmdkey [GR] {SUE} {labeltext}{} +\define@cmdkey [GR] {SUE} {labelcolor}{} +\define@cmdkey [GR] {SUE} {style}{} +\define@cmdkey [GR] {SUE} {lw}{} +\presetkeys [GR] {SUE} {color = \EdgeColor, + lw = \EdgeLineWidth, + label = {}, + labeltext = \LabelTextColor, + labelcolor = \LabelFillColor, + labelstyle = {}, + style = {}}{} +%<---------------------------------------------------------------------------> +% SetUpEdge +%<---------------------------------------------------------------------------> +\newcommand*{\SetUpEdge}[1][]{\@SetUpEdge[#1]}% +\def\@SetUpEdge[#1]{% +\setkeys [GR] {SUE} {#1}% +\presetkeys [GR] {edge} {color = \cmdGR@SUE@color, + lw = \cmdGR@SUE@lw, + label = \cmdGR@SUE@label, + labeltext = \cmdGR@SUE@labeltext, + labelcolor = \cmdGR@SUE@labelcolor, + labelstyle = \cmdGR@SUE@labelstyle, + style = \cmdGR@SUE@style}{} +\tikzset{LabelStyle/.style={}} +\tikzset{EdgeStyle/.style={}}} +\newcommand*{\DisableEdgeStyle}{\tikzset{EdgeStyle/.style={}}} +%<---------------------------------------------------------------------------> +% Init Edge +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {edge} {color}{} +\define@cmdkey [GR] {edge} {lw}{} +\define@cmdkey [GR] {edge} {double}{} +\define@cmdkey [GR] {edge} {incolor}{} +\define@cmdkey [GR] {edge} {dd}{} +\define@cmdkey [GR] {edge} {style}{} +\define@cmdkey [GR] {edge} {label}{} +\define@cmdkey [GR] {edge} {labeltext}{} +\define@cmdkey [GR] {edge} {labelcolor}{} +\define@cmdkey [GR] {edge} {labelstyle}{} +\define@boolkey[GR] {edge} {local}[true]{} +\presetkeys [GR] {edge} {style = {pos=.5}, + lw = \EdgeLineWidth, + label = {}, + labeltext = \LabelTextColor, + labelcolor = \LabelFillColor, + labelstyle = {}, + local = false, + double = {}, + dd = \EdgeDoubleDistance, + incolor = \EdgeFillColor, + color = \EdgeColor}{} +%<---------------------------------------------------------------------------> +% Edge +%<---------------------------------------------------------------------------> +\newcommand*{\Edge}[1][]{\@edge[#1]}% +\def\@edge[#1](#2)(#3){% +\setkeys[GR]{edge}{#1}% + \begingroup% +\ifthenelse{\equal{\cmdGR@edge@double}{}}{% +\tikzset{LocalEdgeStyle/.style={color = \cmdGR@edge@color, + line width = \cmdGR@edge@lw}}}{% +\tikzset{LocalEdgeStyle/.style={line width = \cmdGR@edge@dd, + color = \cmdGR@edge@double, + double distance = \cmdGR@edge@lw, + double = \cmdGR@edge@color}}}% +\ifGR@edge@local% + \tikzset{EdgeStyle/.style={}}% + \fi + \ifthenelse{\equal{\cmdGR@edge@label}{}}{% + \protected@edef\@tempa{% + \noexpand \draw[LocalEdgeStyle,\cmdGR@edge@style,EdgeStyle]}% + \@tempa (#2) to (#3)}{% + \protected@edef\@tempa{% + \noexpand \draw[LocalEdgeStyle,\cmdGR@edge@style,EdgeStyle] (#2) to% + node[fill = \cmdGR@edge@labelcolor, + text = \cmdGR@edge@labeltext, + \cmdGR@edge@labelstyle,LabelStyle]}\@tempa + {\cmdGR@edge@label} (#3)}% + ; +\endgroup% +}% +%<---------------------------------------------------------------------------> +% Edges +%<---------------------------------------------------------------------------> +\newcommand*{\Edges}[1][]{\@edges[#1]}% +\def\@edges[#1](#2){% +\setkeys[GR]{edge}{#1}% + \begingroup% + \setcounter{tkz@gr@p}{0} + \foreach \fin in {#2}{% + \ifthenelse{\value{tkz@gr@p}=0}{% + \global\let\deb\fin + \stepcounter{tkz@gr@p}}{% + \Edge[#1](\deb)(\fin) + \global\let\deb\fin + }% + } + \endgroup% +}% +%<---------------------------------------------------------------------------> +% Init loop +%<---------------------------------------------------------------------------> +\define@choicekey*[GR]{loop}{dir}[\val\nr]{WE,EA,NO,SO,NOWE,NOEA,SOWE,SOEA}{% +\ifcase\nr\relax +\tikzset{LoopStyle/.style = {in=225, out=135, distance=\cmdGR@loop@dist}}% +\or +\tikzset{LoopStyle/.style = {in= 45, out=-45, distance=\cmdGR@loop@dist}}% +\or +\tikzset{LoopStyle/.style = {in=135, out= 45, distance=\cmdGR@loop@dist}}% +\or +\tikzset{LoopStyle/.style = {in=-45, out=-135, distance=\cmdGR@loop@dist}}% +\or +\tikzset{LoopStyle/.style = {in=180, out=90, distance=\cmdGR@loop@dist}}% +\or +\tikzset{LoopStyle/.style = {in=90, out=0, distance=\cmdGR@loop@dist}}% +\or +\tikzset{LoopStyle/.style = {in=-90, out=-180, distance=\cmdGR@loop@dist}}% +\or +\tikzset{LoopStyle/.style = {in=0, out=-90, distance=\cmdGR@loop@dist}}% +\fi% +} +\define@cmdkey [GR] {loop} {color}{} +\define@cmdkey [GR] {loop} {label}{} +\define@cmdkey [GR] {loop} {labelstyle}{} +\define@cmdkey [GR] {loop} {style}{} +\define@cmdkey [GR] {loop} {dist}{} +\presetkeys [GR] {loop} {style = {pre,thick},%` + label = {},% + labelstyle = {},% + color = \tkz@suc@txt,% + dist = 4cm,% + dir = WE}{} +%<---------------------------------------------------------------------------> +% loop +%<---------------------------------------------------------------------------> +\newcommand*{\grLoop}[1][]{\tkzGR@loop[#1]}% +\def\tkzGR@loop[#1](#2){% +\setkeys[GR]{loop}{#1}% +\protected@edef\@tempa{% +\noexpand \draw[\cmdGR@loop@color] (#2)% + edge [EdgeStyle,LoopStyle,\cmdGR@loop@style]% + node [LabelStyle,\cmdGR@loop@labelstyle]% + {\cmdGR@loop@label} (#2)}\@tempa;% +}% +%<---------------------------------------------------------------------------> +% Init Graphes probabilistes +%<---------------------------------------------------------------------------> +\define@cmdkey [GR] {grpb} {unit}{} +\define@cmdkey [GR] {grpb} {LposA}{} +\define@cmdkey [GR] {grpb} {LposB}{} +\define@cmdkey [GR] {grpb} {Ldist}{} +\define@cmdkey [GR] {grpb} {LoopDist}{} +\presetkeys [GR] {grpb} {LposA = 180,% + LposB = 0,% + Ldist = 0cm,% + LoopDist = 4cm, + unit = 4}{} +%<---------------------------------------------------------------------------> +% Graphes probabilistes +%<---------------------------------------------------------------------------> +\newcommand*{\grProb}[7][]{% +\setkeys[GR]{grpb}{#1}% +\tikzset{LabelStyle/.append style ={pos=.5}} +\Vertex[Lpos=\cmdGR@grpb@LposA,Ldist=\cmdGR@grpb@Ldist,L=#2]{grA} +\EA[unit=\cmdGR@grpb@unit,Lpos=\cmdGR@grpb@LposB, + Ldist=\cmdGR@grpb@Ldist,L=#3](grA){grB} +\Edge[style={post,bend left=60},label={$#4$},labelstyle={above}](grA)(grB) +\Edge[style={post,bend left=60},label={$#5$},labelstyle={below}](grB)(grA) +\grLoop[dist=\cmdGR@grpb@LoopDist,dir=WE,label={$#6$},labelstyle={left}](grA) +\grLoop[dist=\cmdGR@grpb@LoopDist,dir=EA,label={$#7$},labelstyle={right}](grB) +}% +\newcommand*{\grProbThree}[7][]{% +\setkeys[GR]{grpb}{#1}% +\begin{scope}[] + \tikzset{LabelStyle/.append style ={pos=.5}} + \Vertices[empty,unit=\cmdGR@grpb@unit]{circle}{grA,grB,grC} + \Vertex[Node,Lpos=\cmdGR@grpb@LposA,Ldist=\cmdGR@grpb@Ldist,L=#2]{grA} + \Vertex[Node,Lpos=\cmdGR@grpb@LposA,Ldist=\cmdGR@grpb@Ldist,L=#3]{grB} + \Vertex[Node,Lpos=\cmdGR@grpb@LposA,Ldist=\cmdGR@grpb@Ldist,L=#4]{grC} + \foreach \x/\y/\z in {#5} {% + \grLoop[dist=\cmdGR@grpb@LoopDist,dir=EA,label={$\x$}](grA) +\Edge[style={post,bend right=20},label={$\y$}](grA)(grB) +\Edge[style={post,bend right=20},label={$\z$}](grA)(grC)} +\foreach \x/\y/\z in {#6} {% + \grLoop[dist=\cmdGR@grpb@LoopDist,dir=NO,label={$\x$}](grB) +\Edge[style={post,bend right=20},label={$\y$}](grB)(grA) +\Edge[style={post,bend right=20},label={$\z$}](grB)(grC)} + \foreach \x/\y/\z in {#7} {% + \grLoop[dist=\cmdGR@grpb@LoopDist,dir=SO,label={$\x$}](grC) + \Edge[style={post,bend right=20},label={$\y$}](grC)(grA) + \Edge[style={post,bend right=20},label={$\z$}](grC)(grB)} +\end{scope} +} +%<---------------------------------------------------------------------------> +% End Graphes probabilistes +%<---------------------------------------------------------------------------> +\let\Loop\grLoop +\newcommand{\SetVertexLabeledSmall}{% +\SetVertexLabel% +\tikzset{VertexStyle/.style = {draw, + shape = circle, + inner sep = 1pt, + minimum size = 10pt}} +\tikzset{EdgeStyle/.style = {double = \tkz@suc@txt, + double distance = 1pt, + color = \tkz@suc@bkc, + line width = 0.7pt}} +} +\newcommand{\SetVertexNotLabeledSmall}{% + \tikzset{EdgeStyle/.style = {double = \tkz@suc@txt, + double distance = 1pt, + color = \tkz@suc@bkc, + line width = 0.7pt}} + \SetVertexNoLabel + \SetVertexSimple[MinSize=6pt,FillColor=gray] + \renewcommand*{\VertexLineWidth}{0pt} +}% + +\newcommand{\SetVertexForPresentation}[3]{% + \GraphInit[vstyle=Shade] + \SetVertexNoLabel + \renewcommand*{\VertexBigMinSize}{12pt}% + \renewcommand*{\EdgeDoubleDistance}{2pt}% + \renewcommand*{\EdgeLineWidth}{0.7pt}% + \SetGraphShadeColor{#1}{#2}{#3} +}% + +\newcommand{\setxyzvec}[1][20]{% + \pgfmathsetmacro{\xone}{cos(180+#1)}% + \pgfmathsetmacro{\yone}{sin(180+#1)}% + \pgfmathsetmacro{\xtwo}{cos(360-#1)}% + \pgfmathsetmacro{\ytwo}{sin(360-#1)}% + \pgfsetxvec{\pgfpoint{\xone cm}{\yone cm}}% + \pgfsetyvec{\pgfpoint{\xtwo cm}{\ytwo cm}}% + \pgfsetzvec{\pgfpoint{0cm}{1cm}}% +} +\endinput + |