summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-05-25 03:02:16 +0000
committerNorbert Preining <norbert@preining.info>2023-05-25 03:02:16 +0000
commited4c98e3a1f3e2160094ac1b05cfc304832cce4d (patch)
tree525f429dcbb1a32940c3c2b0564ec988ffdb5844 /graphics
parentcaf8f98f9740b34fca93a1a42058820632d0b35b (diff)
CTAN sync 202305250302
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/quantikz/README.md4
-rw-r--r--graphics/pgf/contrib/quantikz/quantikz.pdfbin676349 -> 680113 bytes
-rw-r--r--graphics/pgf/contrib/quantikz/quantikz.sty4
-rw-r--r--graphics/pgf/contrib/quantikz/quantikz.tex17
-rw-r--r--graphics/pgf/contrib/quantikz/tikzlibraryquantikz2.code.tex56
-rw-r--r--graphics/pgf/contrib/tikz2d-fr/README.md7
-rw-r--r--graphics/pgf/contrib/tikz2d-fr/doc/tikz2d-fr-doc.pdfbin0 -> 446784 bytes
-rw-r--r--graphics/pgf/contrib/tikz2d-fr/doc/tikz2d-fr-doc.tex556
-rw-r--r--graphics/pgf/contrib/tikz2d-fr/tex/tikz2d-fr.sty223
-rw-r--r--graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdfbin603790 -> 604526 bytes
-rw-r--r--graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex16
-rw-r--r--graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty30
12 files changed, 877 insertions, 36 deletions
diff --git a/graphics/pgf/contrib/quantikz/README.md b/graphics/pgf/contrib/quantikz/README.md
index bd869cdbeb..5210c71145 100644
--- a/graphics/pgf/contrib/quantikz/README.md
+++ b/graphics/pgf/contrib/quantikz/README.md
@@ -4,4 +4,6 @@ The package is quantikz, written by Alastair Kay. Its purpose is to extend tikz
It is covered by a CC-BY 4.0 license.
-Please see the manual for detailed usage. \ No newline at end of file
+Please see the manual for detailed usage.
+
+Two versions are provided: quantikz (v. 0.9.8) as for legacy purposes, and quantikz2, the current release. \ No newline at end of file
diff --git a/graphics/pgf/contrib/quantikz/quantikz.pdf b/graphics/pgf/contrib/quantikz/quantikz.pdf
index c7ffea7fb3..b3ad72f4a2 100644
--- a/graphics/pgf/contrib/quantikz/quantikz.pdf
+++ b/graphics/pgf/contrib/quantikz/quantikz.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/quantikz/quantikz.sty b/graphics/pgf/contrib/quantikz/quantikz.sty
index f040033337..f1ecfaa75f 100644
--- a/graphics/pgf/contrib/quantikz/quantikz.sty
+++ b/graphics/pgf/contrib/quantikz/quantikz.sty
@@ -1,10 +1,10 @@
-%This is the quantikz library for typesetting quantum circuits using LaTeX/Tikz. version 0.9.6
+%This is the quantikz library for typesetting quantum circuits using LaTeX/Tikz. version 1.0.1
% Written by Alastair Kay, 2018. Published under a CC-BY-4.0 licence
% Please email me (alastair.kay@rhul.ac.uk) with any bug reports or feature requests.
% If you find this library useful, please cite its usage in your work, using arXiv:1809.03842, and possibly the DOI: 10.17637/rh.7000520.
% Usage is at your own risk.
-\ProvidesPackage{quantikz}[2023/04/03 typeset quantum circuit diagrams]
+\ProvidesPackage{quantikz}[2023/05/24 typeset quantum circuit diagrams]
\RequirePackage{tikz}[2013/12/13] % pgf version 3.0.0 required
\usetikzlibrary{quantikz2}
diff --git a/graphics/pgf/contrib/quantikz/quantikz.tex b/graphics/pgf/contrib/quantikz/quantikz.tex
index 6f2a7710f8..7f6b5ee15a 100644
--- a/graphics/pgf/contrib/quantikz/quantikz.tex
+++ b/graphics/pgf/contrib/quantikz/quantikz.tex
@@ -336,7 +336,7 @@ You can also slice every step by using option \verb!slice all!, and the labels w
If you need to adjust where the last slice is, use the optional parameter \verb!remove end slices!, which counts the number of columns fewer to add slices to. You can also change the title of each of the slices, by setting \verb!slice titles!. Include the macro \verb!\col! in your specification if you want to use the step number. Note, however, that the columns won't automatically space themselves out to accommodate a very wide label. You can style the slicing lines with the \verb!slice style! key, and the labels with \verb!slice label style!. These can be used to rotate the labels and create a bit more space!
\begin{Code}
\begin{quantikz}[slice all,remove end slices=1,slice titles=slice \col,slice style=blue,slice label style={inner sep=1pt,anchor=south west,rotate=40}]
-& \gate{H} & \ctrl{1} & \meter{} && \\
+& \gate{H} & \ctrl{1} & \meter{} &\setwiretype{n}& \\
& & \targ{} & \ctrl{1} & \gate{H} & \\
& & & \targ{} & &
\end{quantikz}
@@ -465,6 +465,19 @@ Places a quantum wire that occupies that same space as a single-qubit gate with
\end{quantikz}
\end{Code}
+\item [\textbackslash ghost{[w][h]}\{l\}]
+Creates an invisible quantum gate that has the same height as \verb!\gate[][w][h]{l}!. Just like any other gate command, this should come before any other commands in a cell, and cannot be in the same cell as another gate command.
+\begin{Code}
+\begin{quantikz}
+%give the wires the same vertical space as if they had H gates on them
+&&\ghost{H} \\
+&& \ghost{H}
+\end{quantikz}=\begin{quantikz}
+ & \gate{H} & \\
+ & \gate{H} &
+\end{quantikz}
+\end{Code}
+
\item [\textbackslash phase{[s]}\{l\}]
Creates a phase gate (black circle) with label \texttt{l}. The optional parameter \texttt{s} controls the styling via the parameters
@@ -696,7 +709,7 @@ Draw a wave along an entire row. \texttt{s} is standard tikz formatting commands
Present the text in label \texttt{l} as vertically stacked. Can be helpful for slices.
\item [\textbackslash ket\{l\}, \textbackslash bra\{l\}, \textbackslash proj\{l\}, \textbackslash braket\{l\}\{m\}]
-Typeset Dirac notation $\ket{l}$, $\bra{l}$, $\proj{l}$ and $\braket{l}{m}$ respectively. These commands do not require math mode, and the braces will automatically resize to the argument. They are defined to behave well with other packages (e.g.\ physics) that may define the same commands. If you wish to ensure that you are using the version that this package defines, run \textbackslash forceredefine at the end of your preamble (after all packages have loaded). You may also need to be careful of the order in which you load those packages.
+Typeset Dirac notation $\ket{l}$, $\bra{l}$, $\proj{l}$ and $\braket{l}{m}$ respectively. These commands do not require math mode, and the braces will automatically resize to the argument. They are defined to behave well with other packages (e.g.\ physics) that may define the same commands. You may need to be careful of the order in which you load those packages: load quantikz \emph{after} the other package --- if quantikz sees that those commands are already defined, it does not redefine them. If you wish to ensure that you are using the version that this package defines, run \textbackslash forceredefine at the end of your preamble (after all packages have loaded).
% % \item [\textbackslash alias\{n\}]
% % Used in an otherwise empty cell, that gives the current row a name \texttt{n}. This is useful for referring to it for the purposes of vertical positioning.
diff --git a/graphics/pgf/contrib/quantikz/tikzlibraryquantikz2.code.tex b/graphics/pgf/contrib/quantikz/tikzlibraryquantikz2.code.tex
index ac1c7ef831..90a54a257d 100644
--- a/graphics/pgf/contrib/quantikz/tikzlibraryquantikz2.code.tex
+++ b/graphics/pgf/contrib/quantikz/tikzlibraryquantikz2.code.tex
@@ -1,9 +1,12 @@
-%This is the quantikz library for typesetting quantum circuits using LaTeX/Tikz. version 1.0.0
+%This is the quantikz library for typesetting quantum circuits using LaTeX/Tikz. version 1.0.1
% Written by Alastair Kay, 2018. Published under a CC-BY-4.0 licence
% Please email me (alastair.kay@rhul.ac.uk) with any bug reports or feature requests.
% If you find this library useful, please cite its usage in your work, using arXiv:1809.03842, and possibly the DOI: 10.17637/rh.7000520.
% Usage is at your own risk.
+%version 1.0.1
+% the lstick/midstick/rstick commands now correctly resize braces if you're using classical wires based on wire types at the *end* of each wire (so rstick more likely to look good than lstick/midstick!.
+% fixed incompatibility if physics2 package (turned out we both used the same variable name somewhere)
%version 1.0.0
%major new revision with massive under-the-hood changes in how wires work.
%aiming to reduce technical debt in the code as well.
@@ -13,13 +16,7 @@
%some minor changes in optional parameters (e.g. \meter). In practice, these are rarely used, and unlikely to be an issue.
%should always use quantikz and not tikzcd environment
-
-%to-do
-%complete rewrite of manual
-%add isosceles triangle example to manual
-%fix ampersand replacement (is it even necessary any more?). Check beamer.
-
-%\ProvidesPackage{quantikz}[2023/04/03 typeset quantum circuit diagrams]
+%\ProvidesPackage{quantikz}[2023/05/24 typeset quantum circuit diagrams]
% Package(s) to include
\RequirePackage{xargs,ifthen,xstring,xparse,etoolbox,mathtools,pgfmath}
@@ -52,7 +49,7 @@
%full solution suggested here https://tex.stackexchange.com/a/682872/148934
\ExplSyntaxOn
\NewDocumentEnvironment{quantikz}{O{}+b}{
-\gdef\toslice{0}\def\vert{0}%
+\gdef\toslice@qtkz{0}\def\vert@qtkz{0}%
\begin{tikzpicture}[/tikz/commutative~diagrams/.cd, every~diagram,baseline={([yshift=-axis_height]\tikzcdmatrixname)}, #1]
\pgfsetlayers{background,quantback,main}
\tl_set:Nn \l_tmpa_tl { #2 }
@@ -102,7 +99,7 @@
%patch tikzcd to allow for multiple layers of commands that get deferred until later
% \patchcmd\tikzcd@{\tikzpicture}{%
-% \def\toslice{0}\def\vert{0}%
+% \def\toslice{0}\def\vert@qtkz{0}%
% \begin{tikzpicture}}{}{}
%\patchcmd\tikzcd@{\tikzpicture[/tikz/commutative diagrams/.cd,every diagram,#1]}{%
%}{}{}
@@ -123,8 +120,8 @@
\csgundef{cell@width@\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn}
\csgundef{cell@height@\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn}}
%\pgfmathsetmacro{\mname}{random(100000)}
- \ifcsstring{toslice}{1}{\ifcsstring{vert}{0}{\pgfutil@g@addto@macro\tikzcd@atendslices\sliceallr}{\pgfutil@g@addto@macro\tikzcd@atendslices\sliceallvr}}{}
- %\ifthenelse{\toslice=1}{\ifthenelse{\vert=0}{\PackageWarning{quantikz}{We are slicing}\pgfutil@g@addto@macro\tikzcd@atendslices\sliceallr}{\pgfutil@g@addto@macro\tikzcd@atendslices\sliceallvr}}{}
+ \ifcsstring{toslice@qtkz}{1}{\ifcsstring{vert@qtkz}{0}{\pgfutil@g@addto@macro\tikzcd@atendslices\sliceallr}{\pgfutil@g@addto@macro\tikzcd@atendslices\sliceallvr}}{}
+ %\ifthenelse{\toslice=1}{\ifthenelse{\vert@qtkz=0}{\PackageWarning{quantikz}{We are slicing}\pgfutil@g@addto@macro\tikzcd@atendslices\sliceallr}{\pgfutil@g@addto@macro\tikzcd@atendslices\sliceallvr}}{}
}{}{}
%this patching works on modern systems, but I believe is incompatible with the old version that arXiv is running
@@ -147,8 +144,12 @@
I think the culprit is a tikzcd arrow in cell \tikzcd@currentrow-\tikzcd@currentcolumn}}%
\tikzcd@before@paths@hook%
\begin{pgfonlayer}{quantback}
+ \begingroup
+ \tikzcdset{wire types/.code={}}%prevent setting of wire types, which wipes all the work we've done!
+ %\begin{scope} already included in tikzcd@savedpaths so that it has right options
\tikzcd@savedpaths
\end{scope}
+ \endgroup
\end{pgfonlayer}
\tikzcd@atendsavedpaths\tikzcd@atendlabels\tikzcd@atendslices%I just added stuff here instead
\resetwiretypes%reset wire types
@@ -1193,8 +1194,8 @@ phase label/.code={\tikzset{label distance=2mm,anchor=mid,label position=45}
}
%ghost will get height correct if can't be automatically assigned.
-\DeclareExpandableDocumentCommand{\ghost}{O{}O{0pt}O{1.5pt}m}{%optional parameter contains styling info. compulsory is gate text.
- |[inner ysep=4pt,minimum width=#2,minimum height=#3]| \vphantom{#4}
+\DeclareExpandableDocumentCommand{\ghost}{O{0pt}O{1.5pt}m}{%optional parameter contains styling info. compulsory is gate text.
+ |[inner ysep=4pt,minimum width=#1,minimum height=#2]| \vphantom{#3}
}
%%%
@@ -1321,8 +1322,11 @@ phase label/.code={\tikzset{label distance=2mm,anchor=mid,label position=45}
\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\groupoutput@mid\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\newoptions\expandafter\expandafter\expandafter}\expandafter\expandafter\expandafter{\expandafter\options\expandafter}\expandafter{\opts}{#2}%
}
}
+\newcommand{\ifcsstringeitheror}[4]{%
+\ifcsstring{#1}{#2}{#4}{\ifcsstring{#1}{#3}{#4}{}}
+}
%deferred labelling of inputs
-\newcommand{\groupinput@end}[4]{%basic data as keys, lable options, brace options, text
+\newcommand{\groupinput@end}[4]{%basic data as keys, label options, brace options, text
\pgfkeys{/quantikz/gates/.cd,wires=1}
\def\rightbrace{1}
\pgfkeys{/quantikz/gates/.cd,#1}%
@@ -1330,6 +1334,12 @@ phase label/.code={\tikzset{label distance=2mm,anchor=mid,label position=45}
\pgfkeysgetvalue{/quantikz/gates/row}{\row}
\pgfkeysgetvalue{/quantikz/gates/col}{\col}
\xdef\LoopGI{}
+ \ifcsstringeitheror{wire@type@\row}{c}{b}{%is the first wire classical? (should include bundle as well)
+\xdef\LoopGI{\LoopGI($(\tikzcdmatrixname-\row-\col.center)+(0,\pgfkeysvalueof{/tikz/commutative diagrams/classical gap})$)}
+ }
+ \ifcsstringeitheror{wire@type@\the\numexpr\row+\quantwires-1\relax}{c}{b}{%is the last wire classical? (should include bundle as well)
+\xdef\LoopGI{\LoopGI($(\tikzcdmatrixname-\the\numexpr\row+\quantwires-1\relax-\col.center)+(0,-\pgfkeysvalueof{/tikz/commutative diagrams/classical gap})$)}
+ }
\foreach \n in {\row,...,\the\numexpr\row+\quantwires-1\relax} {
\ifnodedefined{\tikzcdmatrixname-\n-\col}{
\xdef\LoopGI{\LoopGI(\tikzcdmatrixname-\n-\col)}
@@ -1353,6 +1363,12 @@ phase label/.code={\tikzset{label distance=2mm,anchor=mid,label position=45}
\pgfkeysgetvalue{/quantikz/gates/row}{\row}
\pgfkeysgetvalue{/quantikz/gates/col}{\col}
\xdef\LoopGO{}
+ \ifcsstringeitheror{wire@type@\row}{c}{b}{%is the first wire classical? (should include bundle as well)
+\xdef\LoopGO{\LoopGO($(\tikzcdmatrixname-\row-\col.center)+(0,\pgfkeysvalueof{/tikz/commutative diagrams/classical gap})$)}
+ }
+ \ifcsstringeitheror{wire@type@\the\numexpr\row+\quantwires-1\relax}{c}{b}{%is the last wire classical? (should include bundle as well)
+\xdef\LoopGO{\LoopGO($(\tikzcdmatrixname-\the\numexpr\row+\quantwires-1\relax-\col.center)+(0,-\pgfkeysvalueof{/tikz/commutative diagrams/classical gap})$)}
+ }
\foreach \n in {\row,...,\the\numexpr\row+\quantwires-1\relax} {
\ifnodedefined{\tikzcdmatrixname-\n-\col}{
\xdef\LoopGO{\LoopGO(\tikzcdmatrixname-\n-\col)}
@@ -1375,6 +1391,12 @@ phase label/.code={\tikzset{label distance=2mm,anchor=mid,label position=45}
\pgfkeysgetvalue{/quantikz/gates/row}{\row}
\pgfkeysgetvalue{/quantikz/gates/col}{\col}
\xdef\LoopGO{}
+ \ifcsstringeitheror{wire@type@\row}{c}{b}{%is the first wire classical? (should include bundle as well)
+\xdef\LoopGO{\LoopGO($(\tikzcdmatrixname-\row-\col.center)+(0,\pgfkeysvalueof{/tikz/commutative diagrams/classical gap})$)}
+ }
+ \ifcsstringeitheror{wire@type@\the\numexpr\row+\quantwires-1\relax}{c}{b}{%is the first wire classical? (should include bundle as well)
+\xdef\LoopGO{\LoopGO($(\tikzcdmatrixname-\the\numexpr\row+\quantwires-1\relax-\col.center)+(0,-\pgfkeysvalueof{/tikz/commutative diagrams/classical gap})$)}
+ }
\foreach \n in {\row,...,\the\numexpr\row+\quantwires-1\relax} {
\ifnodedefined{\tikzcdmatrixname-\n-\col}{
\xdef\LoopGO{\LoopGO(\tikzcdmatrixname-\n-\col)}
@@ -1625,14 +1647,14 @@ phase label/.code={\tikzset{label distance=2mm,anchor=mid,label position=45}
%initialise all the pgfkeys for key=value parameter passing in macro options
\tikzcdset{%
- slice all/.code={\gdef\toslice{1}},
+ slice all/.code={\gdef\toslice@qtkz{1}},
remove end slices/.initial=0,
slice titles/.initial={\col},
slice style/.initial={},
slice label style/.initial={},
thin lines/.code={\resetstyles},
transparent/.code={\maketransparent},
- vertical slice labels/.code={\def\vert{1}},
+ vertical slice labels/.code={\def\vert@qtkz{1}},
align equals at/.code={\setmiddle{#1}},
wire types/.code={\importwiretypes{#1}},
classical gap/.initial=0.03cm, % define separation of classical wires (can override)
diff --git a/graphics/pgf/contrib/tikz2d-fr/README.md b/graphics/pgf/contrib/tikz2d-fr/README.md
new file mode 100644
index 0000000000..e357ba6d6b
--- /dev/null
+++ b/graphics/pgf/contrib/tikz2d-fr/README.md
@@ -0,0 +1,7 @@
+tikz2d-fr is a package to work with some 2D elements.
+----------------------------------------------------------------------
+tikz2d-fr est un package pour travailler avec certains éléments en 2D.
+----------------------------------------------------------------------
+Author : Cédric Pierquet
+email : cpierquet@outlook.fr
+Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz2d-fr/doc/tikz2d-fr-doc.pdf b/graphics/pgf/contrib/tikz2d-fr/doc/tikz2d-fr-doc.pdf
new file mode 100644
index 0000000000..ee2cafa3bf
--- /dev/null
+++ b/graphics/pgf/contrib/tikz2d-fr/doc/tikz2d-fr-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikz2d-fr/doc/tikz2d-fr-doc.tex b/graphics/pgf/contrib/tikz2d-fr/doc/tikz2d-fr-doc.tex
new file mode 100644
index 0000000000..50462633e1
--- /dev/null
+++ b/graphics/pgf/contrib/tikz2d-fr/doc/tikz2d-fr-doc.tex
@@ -0,0 +1,556 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[french,a4paper,11pt]{article}
+\usepackage[margin=2cm,includefoot]{geometry}
+\def\TPversion{0.1.0}
+\def\TPdate{24 Mai 2023}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{amsmath,amssymb}
+\usepackage{tikz2d-fr}
+\usepackage{awesomebox}
+\usepackage{fontawesome5}
+\usepackage{footnote}
+\makesavenoteenv{tabular}
+\usepackage{enumitem}
+\usepackage{tabularray}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [tikz2d-fr]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+
+%\usepackage{hvlogos}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+\newcommand\TableauDocumentation{%
+ \begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\sffamily}}
+ {\LARGE \LaTeX} & & & & &\\
+ & {\LARGE \hologo{pdfLaTeX}} & & & & \\
+ & & {\LARGE \hologo{LuaLaTeX}} & & & \\
+ & & & {\LARGE \TikZ} & & \\
+ & & & & {\LARGE \TeXLive} & \\
+ & & & & & {\LARGE \hologo{MiKTeX}} \\
+ \end{tblr}
+}
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\setlength{\parindent}{0pt}
+\definecolor{LightGray}{gray}{0.9}
+
+\usepackage{babel}
+\AddThinSpaceBeforeFootnotes
+\FrenchFootnotes
+
+\usepackage[most]{tcolorbox}
+\tcbuselibrary{listings}
+\newtcblisting{DemoCode}[1][]{%
+ enhanced,width=0.95\linewidth,center,%
+ bicolor,size=title,%
+ colback=cyan!2!white,%
+ colbacklower=cyan!1!white,%
+ colframe=cyan!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,basicstyle=\small\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={\draw,node,\coordinate,tikz3d-fr},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\TracerSegments,\DefinirPoints,\DefinirPoint,\MarquerPoint,\MarquerPoints,mainlevee},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={Cap,Style,Couleurs,Cycle,Join,line,cap,line,join,Suite,Couleurs,DecalLabel,StyleMarque,Couleur,Math},%
+ keywordstyle={\color{orange}}
+ },%
+ #1
+}
+
+\tcbset{vignettes/.style={%
+ nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,%
+ boxrule=0.75pt,left=7pt,right=1pt,top=0pt,bottom=0.25pt,%
+ }
+}
+
+\tcbset{vignetteMaJ/.style={%
+ fontupper={\vphantom{pf}\footnotesize\ttfamily},
+ vignettes,colframe=ForestGreen!50!black,coltitle=white,colback=purple!25,%
+ overlay={\begin{tcbclipinterior}%
+ \fill[fill=purple!75]($(interior.south west)$) rectangle node[rotate=90]{\tiny \sffamily{\textcolor{Black}{\scalebox{0.85}[0.75]{\textbf{MàJ}}}}} ($(interior.north west)+(5pt,0pt)$);%
+ \end{tcbclipinterior}}
+ }
+}
+
+\newcommand\Cle[1]{{\bfseries\sffamily\textlangle #1\textrangle}}
+\newcommand\cmaj[1]{\tcbox[vignetteMaJ]{#1}\xspace}
+
+\begin{document}
+
+\setlength{\aweboxleftmargin}{0.07\linewidth}
+\setlength{\aweboxcontentwidth}{0.93\linewidth}
+\setlength{\aweboxvskip}{8pt}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\vspace{2cm}
+
+\begin{center}
+ \begin{minipage}{0.75\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{tikz2d-fr}}\\
+ \\
+ {\LARGE Quelques commandes simplifiées (fr)} \\
+ \\
+ {\LARGE pour utiliser avec \TikZ.} \\
+ \end{tabular}
+
+ \bigskip
+
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{center}
+ \end{tcolorbox}
+\end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/tikz2dfr}}
+\end{tabular}
+\end{center}
+
+\vspace{0.25cm}
+
+{$\blacktriangleright$~~Définir et marquer des points.}
+
+\smallskip
+
+{$\blacktriangleright$~~Tracer des segments, avec option(s) de couleurs.}
+
+\vspace{1cm}
+
+\begin{center}
+ \begin{tcolorbox}[enhanced,colframe=cyan,colback=cyan!2,center,width=0.95\linewidth,drop fuzzy shadow=lightgray]
+ \hfill
+ \begin{tikzpicture}
+ \DefinirPoints[Couleur=violet,DecalLabel=0pt]{A/0,0/b B/4,0/b C/3,2/h}
+ \TracerSegments[Suite,Cycle,Couleurs=red,Join=bevel]{A B C}
+ \end{tikzpicture}
+ \hspace{1cm}
+ \begin{tikzpicture}
+ \DefinirPoints[DecalLabel=1pt]{A/0,0/bg B/4,0/bd C/3,2/h}
+ \TracerSegments[Suite,Cycle,Couleurs={red,blue,green}]<thick,mainlevee>{A B C}
+ \MarquerPoints[StyleMarque=x]{A}\MarquerPoints[StyleMarque=+]{B}\MarquerPoints{C}
+ \end{tikzpicture}
+ \hfill~
+
+ \vspace{1cm}
+
+ \hfill~
+ \begin{tikzpicture}
+ \DefinirPoints*{A_1/0:2/ A_2/45:2/ A_3/90:2/ A_4/135:2/ A_5/180:2/ A_6/225:2/ A_7/270:2/ A_8/315:2/}
+ \TracerSegments[Suite,Cycle,Couleurs={red,blue,green,yellow,orange,pink,gray,violet}]<thick,mainlevee=1cm et 1mm>{A_1 A_2 A_3 A_4 A_5 A_6 A_7 A_8}
+ \TracerSegments[]<semithick,densely dotted,mainlevee>{A_1/A_5 A_2/A_6 A_3/A_7 A_4/A_8}
+ \end{tikzpicture}
+ \hfill~
+ \end{tcolorbox}
+\end{center}
+
+\vspace{0.5cm}
+
+%\hfill{}\textit{Merci à Denis Bitouzé et à Gilles Le Bourhis pour leurs retours et idées !}
+
+\smallskip
+
+\vfill
+
+\hrule
+
+\medskip
+
+\TableauDocumentation
+
+\medskip
+
+\hrule
+
+\medskip
+
+\newpage
+
+\phantomsection
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vfill
+
+\part{Historique}
+
+\verb|v0.1.0|~:~~~~Version initiale.
+
+\newpage
+
+\part{Introduction}
+
+\section{Le package tikz2d-fr}
+
+\subsection{Introduction}
+
+\begin{noteblock}
+Le package propose des commandes basiques -- francisées -- pour travailler sur des figures simples en 2D, à l'aide de \TikZ{} avec :
+
+\begin{itemize}
+ \item de quoi simuler un tracé à \textit{main levée} ;
+ \item de quoi définir des points (et donc des nœuds) via \textsf{nom/coordonnées/positionlabel} ;
+ \item de marquer des points (croix, disques) ;
+ \item de quoi tracer des segments (enchaînés ou non) en spécifiant les couleurs éventuelles.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{noteblock}
+
+\begin{importantblock}
+On peut voir ce modeste package comme un \textit{maigre} complément à \TikZ{} et \textsf{tkz-euclide}\footnotemark\footnotetext{\url{https://ctan.org/pkg/tkz-euclide}} qui permet de faire énormément de choses en géométrie euclidienne.
+
+\smallskip
+
+Ainsi, les éventuel points (nœuds) créés par \textsf{tikz2d-fr} seront réutilisables dans toute commande classique de \TikZ{} ou de \textsf{tkz-euclide}.
+
+\smallskip
+
+On peut donc \textit{utiliser} le package \textsf{tikz2d-fr} comme \textit{base} de travail avant des choses plus poussées !
+\end{importantblock}
+
+\subsection{Chargement du package, packages utilisés}
+
+\begin{importantblock}
+Le package se charge, de manière classique, dans le préambule.
+
+Il n'existe pas d'option pour le package, et \texttt{xcolor} n'est pas chargé.
+\end{importantblock}
+
+\begin{DemoCode}[listing only]
+\documentclass{article}
+\usepackage{tikz2d-fr}
+
+\end{DemoCode}
+
+\begin{noteblock}
+\textsf{tikz2d-fr} charge les packages suivantes :
+
+\begin{itemize}
+ \item \texttt{tikz}, \texttt{xstring}, \texttt{simplekv}, \texttt{xintexpr} et \texttt{listofitems} ;
+ \item les librairies \texttt{\textit{tikz}.decorations} et \texttt{\textit{tikz}.decorations.pathmorphing}.
+\end{itemize}
+
+Il est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}.
+\end{noteblock}
+
+\vfill~
+
+\pagebreak
+
+\part{Styles et commandes}
+
+\section{Tracé à main levée}
+
+\subsection{Idée}
+
+\begin{tipblock}
+L'idée est de \textit{proposer} un style \textit{tout prêt} pour simuler un tracé, en \TikZ, à \og main levée \fg.
+
+Il s'agit d'un style \textit{basique} utilisant la librairie \textsf{decorations} avec \textsf{random steps}.
+\end{tipblock}
+
+\begin{DemoCode}[listing only]
+\tikzset{%
+ mainlevee/.style args={#1et#2}{%
+ decorate,decoration={random steps, segment length=#1,amplitude=#2}},
+ mainlevee/.default={5mm et 0.6pt}
+ }
+\end{DemoCode}
+
+\subsection{Utilisation basique}
+
+\begin{cautionblock}
+Il s'agit ni plus ni moins d'un style \TikZ{} à intégrer dans les tracés et constructions \TikZ !
+
+\smallskip
+
+Pour ce style, deux paramètres peuvent être précisés via \Cle{mainlevee=\#1 et \#2} :
+
+\begin{itemize}
+ \item \Cle{\#1} correspond à l'option \textsf{segment length} (longueur des segments \textit{types}) ;
+
+ \hfill{}défaut \Cle{5mm}
+ \item \Cle{\#2} correspond à l'option \textsf{amplitude} (amplitude maximale de la \textit{déformation}).
+
+ \hfill{}défaut \Cle{0.6pt}
+\end{itemize}
+
+Les valeurs \Cle{mainlevee=5mm et 0.6pt} donnent des résultats -- à mon sens -- satisfaisants, mais l'utilisateur pourra modifier à loisir ces paramètres !
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+%la grille a été rajoutée pour la sortie
+\begin{tikzpicture}
+ \draw[thick,mainlevee] (0,0) rectangle (4,4) ;
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \draw[thick,mainlevee=5mm et 2pt] (0,0) rectangle (4,4) ;
+\end{tikzpicture}
+
+\begin{tikzpicture}
+ \draw[thick,mainlevee=10mm et 3mm] (0,0) rectangle (4,4) ;
+\end{tikzpicture}
+\end{DemoCode}
+
+\begin{DemoCode}[text only]
+\hfill~\begin{tikzpicture}
+ \draw[xstep=0.5,ystep=0.5,ultra thin,lightgray] (0,0) grid (4,4);
+ \draw[thick,mainlevee] (0,0) rectangle (4,4) ;
+ \end{tikzpicture}
+ \hspace{1cm}
+ \begin{tikzpicture}
+ \draw[xstep=0.5,ystep=0.5,ultra thin,lightgray] (0,0) grid (4,4);
+ \draw[thick,mainlevee=5mm et 2pt] (0,0) rectangle (4,4) ;
+ \end{tikzpicture}
+ \hspace{1cm}
+ \begin{tikzpicture}
+ \draw[xstep=0.5,ystep=0.5,ultra thin,lightgray] (0,0) grid (4,4);
+ \draw[thick,mainlevee=10mm et 3mm] (0,0) rectangle (4,4) ;
+ \end{tikzpicture}
+ \hfill~
+\end{DemoCode}
+
+\pagebreak
+
+\section{Définir des points}
+
+\subsection{Commandes}
+
+\begin{cautionblock}
+Les commandes \textit{simplifiées} et \textit{francisées} disponible sont :
+
+\begin{itemize}
+ \item \texttt{\textbackslash DefinirPoint} pour définir un point ;
+ \item \texttt{\textbackslash DefinirPoints} pour définir des points ;
+ \item \texttt{\textbackslash MarquerPoint} pour marquer (matérialiser) un point ;
+ \item \texttt{\textbackslash MarquerPoints} pour marquer (matérialiser) des points.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+\begin{tikzpicture}[options tikz]
+ %créer/placer/nommer un point
+ \DefinirPoint(*)[clés]{noeud}{coordonnées}<label>
+ %créer/placer/nommer plusieurs points
+ \DefinirPoints(*)[clés]{liste}
+ %marquer un point
+ \MarquerPoint[clés]{point}
+ %marquer plusieurs points
+ \MarquerPoints[clés]{liste}
+\end{tikzpicture}
+\end{DemoCode}
+
+\subsection{Clés, options et arguments}
+
+\begin{tipblock}
+Les versions étoilées désactivent l'affichage des labels des points.
+
+\smallskip
+
+L'argument optionnel et entre \texttt{[...]} propose les \Cle{clés} suivantes (communes ou spécifiques) :
+
+\begin{itemize}
+ \item \Cle{PosLabel} pour préciser la position (francisée) du label pour les points ; \hfill{}défaut : \Cle{b}
+ \item \Cle{StyleMarque} parmi \Cle{x/o/+} pour spécifier le style de la marque des points ;
+
+ \hfill{}défaut : \Cle{o}
+ \item \Cle{Math} : booléen pour afficher le label en mode math ; \hfill{}défaut : \Cle{false}
+ \item \Cle{TailleMarque} pour spécifier la taille de la marque des points (disque/ croix) ;
+
+ \hfill{}défaut : \Cle{2pt}
+ \item \Cle{Couleur} pour paramétrer la couleur.\hfill{}défaut : \Cle{black}
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{tipblock}
+Les positions pour les labels des points sont \textit{francisées} :
+
+\begin{itemize}
+ \item \Cle{b} : \texttt{bas}
+ \item \Cle{h} : \texttt{haut}
+ \item \Cle{g} : \texttt{gauche}
+ \item \Cle{d} : \texttt{droite}
+ \item \Cle{hg} : \texttt{haut gauche}
+ \item \ldots
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{tipblock}
+De manière un peu plus spécifique :
+
+\begin{itemize}
+ \item le \texttt{<label>} pour la commande \texttt{\textbackslash DefinirPoint} est optionnel, et est identique à \texttt{\{nœud\}} ;
+ \item la \texttt{\{liste\}} pour la commande \texttt{\textbackslash DefinirPoints} est à donner -- par exemple -- sous la forme \texttt{A/2,0/bg B/50:2.5/hd}.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{DemoCode}[]
+\begin{tikzpicture}
+ \DefinirPoints{A/0,0/ B/4,0/ C/3,2/}
+ \DefinirPoints[Math]{H_1/-1,2.5/}
+ \MarquerPoints{A,B,C,H_1}
+\end{tikzpicture}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{tikzpicture}
+ \DefinirPoints[DecalLabel=1pt,Couleur=blue,Math]{A/0,0/bg B/4,0/bd}
+ \DefinirPoints[DecalLabel=1pt,Couleur=red]{C/3,2/h}
+ \MarquerPoints[StyleMarque=x,Couleur=violet]{A}
+ \MarquerPoints[Couleur=orange]{B}
+ \MarquerPoint[StyleMarque=+,Couleur=red]{C}
+\end{tikzpicture}
+\end{DemoCode}
+
+\pagebreak
+
+\section{Tracer des segments}
+
+\subsection{Commandes}
+
+\begin{cautionblock}
+La commande \textit{simplifiée} et \textit{francisée} pour tracer des segments est \texttt{\textbackslash TracerSegments}.
+
+\smallskip
+
+Le fonctionnement de cette commande permet de définir les segments :
+
+\begin{itemize}
+ \item sous la forme \texttt{A/B C/D ...} dans le cas de segments \textit{non forcément contigus} ;
+ \item sous la forme \texttt{A B C ...} dans le cas de segments \textit{contigus} (avec possibilité de \textit{fermer} le chemin).
+\end{itemize}
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+%version liste de segments (AB) et (CD) et ...
+\begin{tikzpicture}
+ \TracerSegments[clés]<options tikz>{ptA/ptB ptC/ptD ...}
+\end{tikzpicture}
+
+%version suite de points (AB) et (BC) et ...
+\begin{tikzpicture}
+ \TracerSegments[Suite,clés]<options tikz>{ptA ptB ptC ...}
+\end{tikzpicture}
+\end{DemoCode}
+
+\subsection{Clés, options et arguments}
+
+\begin{tipblock}
+Concernant les \textsf{clés}, qui correspondent au premier argument, optionnel et entre \texttt{[...]} (certaines clés sont inactives dans certaines situations\ldots) :
+
+\begin{itemize}
+ \item \Cle{Cap} : type de \textit{jointure} pour les segments individuels ;\hfill{}défaut \Cle{round}
+ \item \Cle{Join} : type de \textit{jointure} pour les segments enchaînés ;\hfill{}défaut \Cle{miter}
+ \item \Cle{Couleurs} : sous la forme \Cle{couleur unique} ou \Cle{liste,de,couleurs} (cohérente avec le nombre de segments !) ;
+
+ \hfill{}défaut \Cle{black}
+ \item \Cle{Cycle} : booléen pour préciser qu'on veut \textit{fermer} le chemin ;\hfill{}défaut \Cle{false}
+ \item \Cle{Suite} : booléen pour préciser qu'on veut travaille avec des points enchaînés.
+
+ \hfill{}défaut \Cle{false}
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{tipblock}
+Le deuxième argument, optionnel et entre \texttt{<...>} correspond aux options, en langage \TikZ{} à passer à l'ensemble des segments.
+
+\smallskip
+
+Le troisième argument, obligatoire et entre \texttt{\{...\}} correspond à la suite des segments à tracer :
+
+\begin{itemize}
+ \item sous la forme \texttt{ptA/ptB ptC/ptD ...} pour des segments individuels ;
+ \item sous la forme \texttt{ptA ptB ptC ...} (avec la clé \Cle{Suite}) pour des segments enchaînés.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{noteblock}
+À noter que dans le cas d'une succession de segments (\Cle{Suite}) monochromes, cela revient à un chemin et donc ce sera la clé \Cle{Join=...} qui sera utile.
+\end{noteblock}
+
+\pagebreak
+
+\begin{DemoCode}[]
+\begin{tikzpicture}
+ \TracerSegments[Suite,Couleurs={red,blue,green}]{0,0 4,0 1,3 0,0}
+\end{tikzpicture}
+\begin{tikzpicture}
+ \TracerSegments[Suite,Cap=butt,Couleurs={red,blue,green}]{0,0 4,0 1,3 0,0}
+\end{tikzpicture}
+\begin{tikzpicture}
+ \TracerSegments[Suite,Cap=rect,Couleurs={red,blue,green}]{0,0 4,0 1,3 0,0}
+\end{tikzpicture}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{tikzpicture}
+ \TracerSegments[Cycle,Suite,Couleurs=blue,Join=round]{0,0 4,0 1,3}
+\end{tikzpicture}
+\begin{tikzpicture}
+ \TracerSegments[Couleurs={red,blue,green}]{0,0/4,0 1,3/0,0 4,0/1,3}
+\end{tikzpicture}
+\begin{tikzpicture}
+ \TracerSegments[Suite,Couleurs={yellow,orange}]{0,0 4,0 1,3}
+\end{tikzpicture}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{tikzpicture}
+ \DefinirPoints[DecalLabel=1pt]{A/0,0/bg B/4,0/bd C/3,2/h}
+ \TracerSegments[Suite,Cycle,Couleurs={red,blue,green}]{A B C}
+ \MarquerPoints[StyleMarque=x]{A,B,C}
+\end{tikzpicture}
+\begin{tikzpicture}
+ \DefinirPoints[DecalLabel=1pt,Math]{A/0,0/bg B/4,0/bd C/3,2/h}
+ \TracerSegments[Couleurs={yellow,red}]{A/B B/C}
+ \TracerSegments[Couleurs=blue]{C/A}
+ \MarquerPoints{A,B,C}
+\end{tikzpicture}
+\end{DemoCode}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz2d-fr/tex/tikz2d-fr.sty b/graphics/pgf/contrib/tikz2d-fr/tex/tikz2d-fr.sty
new file mode 100644
index 0000000000..d9e112e796
--- /dev/null
+++ b/graphics/pgf/contrib/tikz2d-fr/tex/tikz2d-fr.sty
@@ -0,0 +1,223 @@
+% Author : C. Pierquet
+% licence : Released under the LaTeX Project Public License v1.3c
+% or later, see http://www.latex-project.org/lppl.txtf
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{tikz2d-fr}[2023/05/23 0.1.0 Petites aides pour l'utilisation de TikZ 2D]
+%0.1.0 Version initiale
+
+%------Packages utiles
+\RequirePackage{tikz,pgffor}
+\RequirePackage{xstring}
+\RequirePackage{xintexpr}
+\RequirePackage{simplekv}
+\RequirePackage{listofitems}
+%------Librairies tikz
+\usetikzlibrary{calc}
+\usetikzlibrary{decorations,decorations.pathmorphing}
+
+%------Style main levée (avant dans ProfLycee)
+\tikzset{%
+ mainlevee/.style args={#1et#2}{decorate,decoration={random steps,segment length=#1,amplitude=#2}},
+ mainlevee/.default={5mm et 0.6pt}
+}
+
+%------Points
+%%------Commandes internes pour les nœuds et points
+\NewDocumentCommand\TransfPosTikzDD{ m }{%défaut below
+ \def\PosTmpLabel{below}
+ \IfEq{#1}{b}{\def\PosTmpLabel{below}}{}
+ \IfEq{#1}{d}{\def\PosTmpLabel{right}}{}
+ \IfEq{#1}{h}{\def\PosTmpLabel{above}}{}
+ \IfEq{#1}{g}{\def\PosTmpLabel{left}}{}
+ \IfEq{#1}{bg}{\def\PosTmpLabel{below left}}{}
+ \IfEq{#1}{bd}{\def\PosTmpLabel{below right}}{}
+ \IfEq{#1}{hg}{\def\PosTmpLabel{above left}}{}
+ \IfEq{#1}{hd}{\def\PosTmpLabel{above right}}{}
+}
+\tikzset{pics/croixdd/.style args={#1/#2}{
+ code={
+ \draw[line width={0.4*#1},rotate=#2] (-#1,0) -- (#1,0);
+ \draw[line width={0.4*#1},rotate=#2] (0,-#1) -- (0, #1);
+ }
+ },
+ pics/croixdd/.default={4pt/0}
+}
+
+%%------Créer/Placer/Nommer Point(s) 2d
+\defKV[TkzTwoDimPoint]{%
+ PosLabel=\xdef\TwoDimLabel{#1},%
+ DecalLabel=\xdef\TwoDimDecalLabel{#1},%
+ StyleMarque=\xdef\TwoDimStylePt{#1},%
+ TailleMarque=\xdef\TwoDimtaillePt{#1},%
+ Couleur=\xdef\TwoDimCoul{#1}
+}
+
+\setKVdefault[TkzTwoDimPoint]{%
+ PosLabel={b},%
+ DecalLabel=2pt,%
+ StyleMarque=o,%
+ TailleMarque=2.5pt,%
+ Couleur=black,%
+ Math=false
+}
+
+\NewDocumentCommand\DefinirPoint{ s O{} m m D<>{#3} }{%
+ %*=label
+ %2=clés
+ %3=nom nœud
+ %4=coordonnées x,y,z
+ %5=label si différent
+ \useKVdefault[TkzTwoDimPoint]%
+ \setKV[TkzTwoDimPoint]{#2}%
+ \TransfPosTikzDD{\TwoDimLabel}
+ \coordinate (#3) at (#4) ;
+ \IfBooleanTF{#1}%on désactive le label avec (*)
+ {}%
+ {\draw (#3) node[\TwoDimCoul,\PosTmpLabel=\TwoDimDecalLabel] {\ifboolKV[TkzTwoDimPoint]{Math}{$#5$}{#5}} ;}%
+}
+
+\NewDocumentCommand\DefinirPoints{ s O{} m }{%
+ %*=labels off
+ %2=clés
+ %3=liste nom/coordonnées/pos
+ \useKVdefault[TkzTwoDimPoint]%
+ \setKV[TkzTwoDimPoint]{#2}%
+ \setsepchar[.]{ ./}%
+ \readlist*\ListePtsPlan{#3}
+ \xintifboolexpr{\ListePtsPlanlen == 1}%
+ {%
+ \IfBooleanTF{#1}%on désactive le label avec (*)
+ {%
+ \DefinirPoint*[#2]{\ListePtsPlan[1,1]}{\ListePtsPlan[1,2]}
+ }%
+ {%
+ \DefinirPoint[#2,PosLabel={\ListePtsPlan[1,3]}]{\ListePtsPlan[1,1]}{\ListePtsPlan[1,2]}
+ }%
+ }%
+ {%
+ \foreach \i in {1,2,...,\ListePtsPlanlen}
+ {%
+ \IfBooleanTF{#1}%on désactive le label avec (*)
+ {%
+ \DefinirPoint*[#2]{\ListePtsPlan[\i,1]}{\ListePtsPlan[\i,2]}
+ }%
+ {%
+ \DefinirPoint[#2,PosLabel={\ListePtsPlan[\i,3]}]{\ListePtsPlan[\i,1]}{\ListePtsPlan[\i,2]}
+ }%
+ }%
+ }%
+}
+
+\NewDocumentCommand\MarquerPoint{ O{} m }{%
+ %1=clés
+ %2=nom nœud
+ \useKVdefault[TkzTwoDimPoint]%
+ \setKV[TkzTwoDimPoint]{#1}%
+ \IfStrEq{\TwoDimStylePt}{o}%
+ {\filldraw[\TwoDimCoul] (#2) circle[radius={\TwoDimtaillePt-0.5pt}] ;}{}%
+ \IfStrEq{\TwoDimStylePt}{x}%
+ {\draw[\TwoDimCoul] (#2) pic{croixdd=\TwoDimtaillePt/45} ;}{}%
+ \IfStrEq{\TwoDimStylePt}{+}%
+ {\draw[\TwoDimCoul] (#2) pic{croixdd=\TwoDimtaillePt/0} ;}{}%
+}
+
+\NewDocumentCommand\MarquerPoints{ O{} m }{%
+ %1=clés
+ %2=liste nom/coordonnées/pos
+ \useKVdefault[TkzTwoDimPoint]%
+ \setKV[TkzTwoDimPoint]{#1}%
+ \foreach \i in {#2}
+ {%
+ \MarquerPoint[#1]{\i}
+ }%
+}
+
+%------Tracer des segments
+\defKV[TraceSegments]{%
+ Cap=\xdef\TracSegCap{#1},%
+ Join=\xdef\TracSegJoin{#1},%
+ Couleurs=\xdef\TracSegCoul{#1}
+}
+
+\setKVdefault[TraceSegments]{%
+ Cap=round,%
+ Couleurs=black,%
+ Cycle=false,%
+ Join=miter,%
+ Suite=false
+}
+
+\NewDocumentCommand\TracerSegments{ O{} D<>{thick} m }{%
+ \useKVdefault[TraceSegments]%
+ \setKV[TraceSegments]{#1}%
+ \ifboolKV[TraceSegments]{Suite}%si on enchaîne les points A->B->C, sinon A/B A/C ...
+ {%
+ \setsepchar{ }%
+ \readlist*\LPTSEGM{#3}%
+ \IfSubStr{\TracSegCoul}{,}%si ',' := un par un, sinon enchaine
+ {%
+ \setsepchar{,}%
+ \readlist*\LCSEGM{\TracSegCoul}%
+ \ifboolKV[TraceSegments]{Cycle}%
+ {%
+ \foreach \i in {1,2,...,\inteval{\LPTSEGMlen-1}}%
+ {%
+ \draw[color={\LCSEGM[\i]},line cap={\TracSegCap},#2] (\LPTSEGM[\i]) -- (\LPTSEGM[\inteval{\i+1}]) ;
+ }%
+ \draw[color={\LCSEGM[-1]},line cap={\TracSegCap},#2] (\LPTSEGM[-1]) -- (\LPTSEGM[1]) ;
+ }%
+ {%
+ \foreach \i in {1,2,...,\inteval{\LPTSEGMlen-1}}%
+ {%
+ \draw[color={\LCSEGM[\i]},line cap={\TracSegCap},#2] (\LPTSEGM[\i]) -- (\LPTSEGM[\inteval{\i+1}]) ;
+ }%
+ }%
+ }%
+ {%
+ \StrSubstitute{#3}{ }{)--(}[\tmplstpts]%
+ \xdef\tmplstptsconv{(\tmplstpts)}%
+ \ifboolKV[TraceSegments]{Cycle}%
+ {%
+ \draw[color={\TracSegCoul},line join={\TracSegJoin},#2] \tmplstptsconv--cycle ;
+ }%
+ {%
+ \draw[color={\TracSegCoul},line join={\TracSegJoin},#2] \tmplstptsconv ;
+ }%
+ }%
+ }%
+ {%
+ \setsepchar[.]{ ./}%
+ \readlist*\LPTSEGM{#3}%
+ \IfSubStr{\TracSegCoul}{,}%si ',' := un par un, sinon enchaine
+ {%
+ \setsepchar{,}
+ \readlist*\LCSEGM{\TracSegCoul}%
+ \xintifboolexpr{\LPTSEGMlen == 1}%
+ {%
+ \draw[color={\LCSEGM[1]},line cap={\TracSegCap},#2] (\LPTSEGM[1,1]) -- (\LPTSEGM[1,2]) ;
+ }%
+ {%
+ \foreach \i in {1,2,...,\LPTSEGMlen}%
+ {%
+ \draw[color={\LCSEGM[\i]},line cap={\TracSegCap},#2] (\LPTSEGM[\i,1]) -- (\LPTSEGM[\i,2]) ;
+ }%
+ }%
+
+ }%
+ {%
+ \xintifboolexpr{\LPTSEGMlen == 1}%
+ {%
+ \draw[color={\TracSegCoul},line cap={\TracSegCap},#2] (\LPTSEGM[1,1]) -- (\LPTSEGM[1,2]) ;
+ }%
+ {%
+ \foreach \i in {1,2,...,\LPTSEGMlen}%
+ {%
+ \draw[color={\TracSegCoul},line cap={\TracSegCap},#2] (\LPTSEGM[\i,1]) -- (\LPTSEGM[\i,2]) ;
+ }%
+ }%
+ }%
+ }%
+}
+
+\endinput \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdf b/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdf
index 9566efab5b..a6610abd58 100644
--- a/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdf
+++ b/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex b/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex
index 548d68c219..5793927f74 100644
--- a/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex
+++ b/graphics/pgf/contrib/tikz3d-fr/doc/tikz3d-fr-doc.tex
@@ -4,8 +4,8 @@
\documentclass[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.0}
-\def\TPdate{02 Mai 2023}
+\def\TPversion{0.1.1}
+\def\TPdate{24 Mai 2023}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
@@ -246,7 +246,9 @@
\part{Historique}
-\verb|v0.1.0|~:~~~~Version initiale.
+\verb|v0.1.1|~:~~~~Tracé des segments individuels avec l'option \textsf{[line cap=round]}
+
+\verb|v0.1.0|~:~~~~Version initiale
\newpage
@@ -257,7 +259,7 @@
\subsection{Introduction}
\begin{noteblock}
-Le package propose des commandes basiques -- francisées -- pour travailler sur des figures simples en 3D, à l'aide de \TikZ{} en utilisant des coordonnées tridimensionnelles :
+Le package propose des commandes basiques -- et francisées -- pour travailler sur des figures simples en 3D, à l'aide de \TikZ{} en utilisant des coordonnées tridimensionnelles :
\begin{itemize}
\item un environnement avec gestion des unités $x/y/z$ ;
@@ -282,7 +284,7 @@ L'idée est de proposer une utilisation des capacités (natives) 3D de \TikZ, en
\begin{importantblock}
Le package se charge, de manière classique, dans le préambule.
-Il n'existe pas d'option pour le package, et \texttt{xcolor} n'est pas chargé avec des options spécifiques.
+Il n'existe pas d'option pour le package, et \texttt{xcolor} n'est pas chargé.
\end{importantblock}
\begin{PresCodeTex}{listing only}
@@ -394,7 +396,7 @@ Une fois l'environnement, via son \textit{repère}, est créé, toute commande e
\subsection{Commandes}
\begin{cautionblock}
-Les commandes \textit{simplifiées} et \textit{francisées} disponible sont :
+Les commandes \textit{simplifiées} et \textit{francisées} disponibles sont :
\begin{itemize}
\item \texttt{\textbackslash PlacePointEspace} pour placer un point dans l'espace ;
@@ -492,7 +494,7 @@ De manière un peu plus spécifique :
\subsection{Commandes}
\begin{cautionblock}
-Les commandes \textit{simplifiée} et \textit{francisé} pour afficher un pavé (ou un cube !) est la commande \texttt{\textbackslash PaveTikzTriDim}.
+La commande \textit{simplifiée} et \textit{francisée} pour afficher un pavé (ou un cube !) est la commande \texttt{\textbackslash PaveTikzTriDim}.
\end{cautionblock}
\begin{PresCodeTex}{listing only}
diff --git a/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty b/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
index b1c028fc15..6ee9118c66 100644
--- a/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
+++ b/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tikz3d-fr}[2023/05/02 0.1.0 Aide pour l'utilisation de TikZ 3D]
+\ProvidesPackage{tikz3d-fr}[2023/05/24 0.1.1 Aide pour l'utilisation de TikZ 3D]
+%0.1.1 Segments avec line cap=round
%0.1.0 Version initiale
%------Packages utiles
@@ -15,7 +16,7 @@
\RequirePackage{listofitems}
%------Librairies tikz
\usetikzlibrary{calc}
-\usetikzlibrary{babel}
+%\usetikzlibrary{babel}
%%------Param3D pour l'environnement
\defKV[paramstridim]{%
@@ -46,6 +47,20 @@
\end{tikzpicture}
}
+\NewDocumentCommand\VecteursBase{ O{3} }{%
+ \IfEq{#1}{3}%
+ {%
+ \draw[->,>=latex] (0,0,0) -- (1,0,0) node[pos=1.1]{x};
+ \draw[->,>=latex] (0,0,0) -- (0,1,0) node[pos=1.1]{y};
+ \draw[->,>=latex] (0,0,0) -- (0,0,1) node[pos=1.1]{z};
+ }{}%
+ \IfEq{#1}{2}%
+ {%
+ \draw[->,>=latex] (0,0,0) -- (1,0,0) node[pos=1.1]{x};
+ \draw[->,>=latex] (0,0,0) -- (0,1,0) node[pos=1.1]{y};
+ }{}%
+}
+
%%------PaveDroitTikZ
\defKV[paramspavetridim]{%
Largeur=\xdef\PFPaveLgDDD{#1},%
@@ -70,8 +85,7 @@
CouleurSommets=black
}
-
-\newcommand\PaveTikzTriDim[1][]{%
+\NewDocumentCommand\PaveTikzTriDim{ O{} }{%
\useKVdefault[paramspavetridim]%
\setKV[paramspavetridim]{#1}%
\ifboolKV[paramspavetridim]{Cube}
@@ -221,14 +235,14 @@
%%------Créer Segment(s) 3d
\NewDocumentCommand\TraceSegmentEspace{ O{} r() r() }{%1=optionstikz,2=A,3=B
- \draw[#1] (#2)--(#3) ;
+ \draw[#1,line cap=round] (#2)--(#3) ;
}
\NewDocumentCommand\TraceSegmentsEspace{ O{} m }{%1=optionstikz,2=liste A/B C/D
\setsepchar[.]{ ./}%
\readlist*\ListePtsEspace{#2}
\foreach \i in {1,2,...,\ListePtsEspacelen}
- {\draw[#1] (\ListePtsEspace[\i,1])--(\ListePtsEspace[\i,2]) ;}
+ {\draw[#1,line cap=round] (\ListePtsEspace[\i,1])--(\ListePtsEspace[\i,2]) ;}
}
%--Petits Cubes
@@ -311,4 +325,6 @@
\IfBooleanTF{#1}
{}
{\end{EnvTikzEspace}}
-} \ No newline at end of file
+}
+
+\endinput \ No newline at end of file