Debian Codegraph @

texmf-dist/doc/metapost/mp-geom2d/mp-geom2d-doc-preamb.tex

raw
1
2 \usepackage[math-style=ISO]{xcharter-otf}
3 \usepackage[left=4cm]{geometry}
4 \usepackage{xspace}
5 \usepackage[svgnames]{xcolor}
6 \usepackage{multicol}
7 \usepackage{hologo}
8 \usepackage{listings}
9 \usepackage{showexpl} % examples
10 \usepackage{mflogo}
11 \usepackage{babel}
12 \usepackage{tikz}
13 \usepackage{url}
14 \usepackage{tikz}
15 \usepackage{luamplib}
16 \usepackage{siunitx}
17 \usepackage{pdflscape}
18 \usepackage{csquotes}
19 \usepackage{fancyvrb,xparse,xargs}
20 \usepackage{imakeidx}
21 \usepackage[colorlinks]{hyperref}
22 \usepackage{isodate}
23 \setmonofont{FiraMono}[
24 %BoldFont=FiraCode-Bold,
25 %Contextuals=Alternate, % Activate the calt feature
26 %Scale=MatchLowercase
27 ]
28 \usepackage{biblatex}
29
30 \makeindex[title=Index, columns=2]
31 %\usepackage[verbatim]{lstfiracode} % Activate ligatures in verbatim
32 \usepackage[most]{tcolorbox}
33 \tcbuselibrary{listings,breakable}
34 \addbibresource{locctan.bib}
35 \newcommand\package[1]{\href{https://ctan.org/pkg/#1}{#1}}
36
37 \newtcolorbox{colourband}[1][]{%
38 arc=0pt,outer arc=0pt,enhanced, breakable, spread sidewards, left*=0pt, right*=0pt, boxrule=0pt, colback=LightSteelBlue!10, #1}
39
40
41 \definecolor{hellgelb}{rgb}{1,1,0.85}
42 \definecolor{colKeys}{rgb}{0,0,1}
43 \definecolor{colIdentifier}{rgb}{0,0,0}
44 \definecolor{colComments}{rgb}{0.3,0.7,0.3}
45 \definecolor{colString}{rgb}{0,0.5,0}
46 \definecolor{mpcode}{rgb}{0.5,0.1,0.1}
47
48 \lstset{%
49 language=metapost,%
50 float=hbp,%
51 basicstyle=\ttfamily, %
52 identifierstyle=\color{DarkSlateGrey}, %
53 keywordstyle=\color{DarkBlue}, %
54 stringstyle=\color{Green}, %
55 commentstyle=\color{LightSlateGrey}\itshape, %
56 columns=flexible, %
57 tabsize=4, %
58 extendedchars=true, %
59 showspaces=false, %
60 showstringspaces=false, %
61 numbers=left,
62 numbersep=1em,
63 numberstyle=\tiny\color{gray}, %
64 breaklines=true, %
65 breakautoindent=true,
66 captionpos=b,
67 xleftmargin=0em,
68 sensitive=true,
69 morekeywords=[10]{colorie,
70 colorieAvecTransparence,trace,fermeture,fleche,pointe,pointes,marque,gddLabel,avecCrayon,ChampVecteurs,ChampVecteursDD,EtiquetteChemin,hachure,
71 withPen,gddAlphaFill, gddArrow,gddDraw, gddDrawCircleArc, gddDrawPoint,
72 gddDrawPoints,gddFill, gddHatch,gddMark, gddClose,PathTag,
73 VectorField,
74 VectorFieldDD,},
75 keywordstyle=[10]\color{Salmon},
76 morekeywords=[7]{%
77 Abscisse,Addition,AdditionAbscisses,AdditionOrdonnee,AdditionVecteur,AireTriangle,Arc,ArcEntrePoints,arccos,arctan,arcsin,AsymptoteHyperbole,AxeDeSimilitude,AxeRadical,Axes,AxesBords,
78 AngleBetweenVectors, AngleBisector, ArcBetweenPoints, AxialSymmetry, Axis,AxisOfSimilitude,
79 Barycentre,Bissectrice,
80 Barycenter,
81 CadreRepere,Centre,CentreRadical,Cercle,CercleCirconscrit,CercleCP,CercleD,CercleEuler,CercleExinscrit,CercleInscrit,CerclePrincipale,CercleTroisPoints,ch,Chemin,cos,Courbe,CourbeDat,CourbeEnPolaires,
82 CoVertex,
83 Center, CenterRotation, CenterSimilarity,CentralSymmetry, Circle, CircleCP, CircleD,
84 CirclesIntersection, CircleThreePoints, CircumscribedCircle, CoVertex,
85 Curve, CurveData,
86 Debut,DemiHyperbole,DemiGrandAxe,DemiPetitAxe,Directrice,DistancePointDroite,Droite,DroiteParallele,DroitePerpendiculaire,
87 Directrix,
88 Ellipse,EllipseF, EllipseFD,EquationDroite,Excentricite,exp,
89 EllipseTangent, EndWindow,EscribedCircle, EulerCircle,Excentricity,
90 ExternalCommonTangent, ExternalEllipseTangent,
91 Fenetre, Fin,FinFenetre,Foyer,
92 Focus, Frame, FrameBox, FrameGrid, FrameMinMax,
93 gddEnPlace,gddTraceArcDeCercle,gddTraceObjet,Graduations,GraduationsBords,GrilleRepere,
94 gddBegin, gddClip, gddEnd, gddInPlace,
95 gddObjectDrawing,
96 Homothetie,HyperboleF,HyperboleFD,
97 HatchPattern, Homothety, HyperbolaAsymptote, HyperbolaF, HyperbolaFD, HyperbolaVertex,
98 Inclinaison,IntersectionCercles,IntersectionDroiteCercle,IntersectionDroites,Inversion,IsoBarycentre,
99 InscribedCircle, InternalCommonTangent, Inverse, IsoBarycenter,
100 LigneBrisee,ln,Longueur,LongueurSegment,
101 Length, Line, LinesIntersection, LineCircleIntersection, LineEquation, LineIntersection, LineMark,
102 Marque,MarqueTrait,Milieu,
103 Mark, MidPoint,
104 NombreCotesPolygone,
105 Norme,
106 Norm,
107 Ordonnee,OrdonneeRelativePointDroite,Orthocentre,
108 Orthocenter,OrthoSign,
109 PairImp,PairTOPoint,ParaboleFD,ParametreConiqueCoef,
110 ParametreCouleurPoint,
111 ParametreExtensionDroite,
112 ParametrePointeType,
113 ParametreTaillePoint,Point,PointDansRepere,PointDe,
114 PointImp,PointIntersection,PointPolaire,PointPolygone,PointTOPair,Polygone,PolygoneRegulier,ProduitScalaire,ProjectionPointSurDroite,ProjectionPointSurDroite,
115 ParabolaFD, ParabolaVertex, ParallelLine, Path, PerpendicularLine,
116 Plot, PointInBasis, PointLineDistance, PointLineRelativeDistance, PointOf, PointOnLineProjection, PointSum,PolarCurve, PolarPoint, Polygon, PolygonNumberOfSides, PolygonPoint,Polyline, PrincipalCircle,
117 Rayon,Repere,RepereMinMax,ReportSurDroite,Representation,Rotation,RotationCentre,
118 RadicalAxes, RadicalCenter, Radius, RegularPolygon,ReportOnLine,
119 ScalaireVecteur,SchemaHachure,Segment,SegmentTOVecteur,sh,SigneOrtho,SimilitudeACentre,sin,Sommet,SoustractionVecteur,SymetrieAxiale,SymetrieCentrale,
120 ScalarProduct, ScalarVector, Segment, SegmentLength, SegmentTOVector, SemiHyperbola, SemiMajorAxis, SemiMinorAxis, SetConicCoef, SetLineExtension, SetPointColor,SetPointSize,SetPointType, SideAxis, SideGraduations, Slope,
121 tan,TangenteCommuneExterieure,TangenteCommuneInterieure,TangenteExterieureEllipse,TangenteEllipse,th,Triangle,
122 TriangleArea,
123 Unites,
124 Units,
125 Vecteur,VecteurP,VecteursAngle,Vertex,
126 Vector,
127 VectorP,
128 VectorSubstract,
129 VectorSum,
130 Window, Xcoordinate, XcoordinateSum, Ycoordinate, YcoordinateSum,},
131 keywordstyle=[7]\color{FireBrick},
132 morekeywords=[8]{gddO,gddA,gddB,gddC,gddD,gddE,gddF,gddT,gddP,gddS,gddX,gddPX,gddU,gddW,gddClip,gddCouleurCerclePoint,gddCouleurPoint,gddExtensionDroite,gddTaillePoint,gddPointeType,
133 gddXlabel,gddYlabel, _E, Pi, gddC2Dparam ,
134 AliceBlue,
135 AntiqueWhite,
136 Aqua,
137 Aquamarine,
138 Azure,
139 Beige,
140 Bisque,
141 Black,
142 BlanchedAlmond,
143 Blue,
144 BlueViolet,
145 Brown,
146 BurlyWood,
147 CadetBlue,
148 Chartreuse,
149 Chocolate,
150 Coral,
151 CornflowerBlue,
152 Cornsilk,
153 Crimson,
154 Cyan,
155 DarkBlue,
156 DarkCyan,
157 DarkGoldenrod,
158 DarkGray,
159 DarkGreen,
160 DarkGrey,
161 DarkKhaki,
162 DarkMagenta,
163 DarkOliveGreen,
164 DarkOrange,
165 DarkOrchid,
166 DarkRed,
167 DarkSalmon,
168 DarkSeaGreen,
169 DarkSlateBlue,
170 DarkSlateGray,
171 DarkSlateGrey,
172 DarkTurquoise,
173 DarkViolet,
174 DeepPink,
175 DeepSkyBlue,
176 DimGray,
177 DimGrey,
178 DodgerBlue,
179 FireBrick,
180 FloralWhite,
181 ForestGreen,
182 Fuchsia,
183 Gainsboro,
184 GhostWhite,
185 Gold,
186 Goldenrod,
187 Gray,
188 Green,
189 GreenYellow,
190 Grey,
191 Honeydew,
192 HotPink,
193 IndianRed,
194 Indigo,
195 Ivory,
196 Khaki,
197 Lavender,
198 LavenderBlush,
199 LawnGreen,
200 LemonChiffon,
201 LightBlue,
202 LightCoral,
203 LightCyan,
204 LightGoldenrod,
205 LightGoldenrodYellow,
206 LightGray,
207 LightGreen,
208 LightGrey,
209 LightPink,
210 LightSalmon,
211 LightSeaGreen,
212 LightSkyBlue,
213 LightSlateBlue,
214 LightSlateGray,
215 LightSlateGrey,
216 LightSteelBlue,
217 LightYellow,
218 Lime,
219 LimeGreen,
220 Linen,
221 Magenta,
222 Maroon,
223 MediumAquamarine,
224 MediumBlue,
225 MediumOrchid,
226 MediumPurple,
227 MediumSeaGreen,
228 MediumSlateBlue,
229 MediumSpringGreen,
230 MediumTurquoise,
231 MediumVioletRed,
232 MidnightBlue,
233 MintCream,
234 MistyRose,
235 Moccasin,
236 NavajoWhite,
237 Navy,
238 NavyBlue,
239 OldLace,
240 Olive,
241 OliveDrab,
242 Orange,
243 OrangeRed,
244 Orchid,
245 PaleGoldenrod,
246 PaleGreen,
247 PaleTurquoise,
248 PaleVioletRed,
249 PapayaWhip,
250 PeachPuff,
251 Peru,
252 Pink,
253 Plum,
254 PowderBlue,
255 Purple,
256 Red,
257 RosyBrown,
258 RoyalBlue,
259 SaddleBrown,
260 Salmon,
261 SandyBrown,
262 SeaGreen,
263 Seashell,
264 Sienna,
265 Silver,
266 SkyBlue,
267 SlateBlue,
268 SlateGray,
269 SlateGrey,
270 Snow,
271 SpringGreen,
272 SteelBlue,
273 Tan,
274 Teal,
275 Thistle,
276 Tomato,
277 Turquoise,
278 Violet,
279 VioletRed,
280 Wheat,
281 White,
282 WhiteSmoke,
283 Yellow,
284 YellowGreen},
285 keywordstyle=[8]\color{Sienna},
286 morekeywords=[9]{},
287 keywordstyle=[9]\color{Olive}
288 }
289 \lstset{explpreset={pos=t,wide=false,rframe={},preset=\centering}}
290 \lstdefinestyle{syntax}{backgroundcolor=\color{blue!15},numbers=none,xleftmargin=0pt,xrightmargin=0pt,
291 frame=single}
292 \lstdefinestyle{code}{backgroundcolor=\color{red!15},%numbers=left,
293 xleftmargin=0pt,xrightmargin=0pt,
294 frame=single}
295
296 \newtcblisting{mpcode}{
297 arc=0pt,outer arc=0pt,
298 colback=mpcode!3,
299 breakable,
300 boxsep=0pt,left=2pt,right=2pt,top=0pt,bottom=0pt, bottomtitle =
301 3pt, toptitle=3pt,
302 boxrule=0pt,bottomrule=0.pt,toprule=0.pt, toprule at break =
303 0pt, bottomrule at break = 0pt,
304 listing only,boxsep=0pt,listing
305 options={breaklines}
306 }
307
308 \makeatletter
309 \tcbset{%
310 listing metapost/.code={%
311 \def\tcbuselistingtext@input{\begin{mplibcode}
312 background:=(.988,.976,.976); input \jobname.listing;
313 \end{mplibcode}}%
314 }
315 }
316 \makeatother
317 \newtcblisting[auto counter,]{ExempleMP}[1][]{%
318 arc=0pt,outer arc=0pt,
319 colback=FireBrick!3,
320 colframe=FireBrick,
321 breakable,fontupper=\small,
322 boxsep=0pt,left=2pt,right=2pt,top=0pt,bottom=2pt, bottomtitle =
323 3pt, toptitle=3pt, lefttitle=5pt,
324 boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, toprule at break =
325 0pt, bottomrule at break = 0pt,
326 listing side text,
327 listing metapost,
328 title={\bfseries\sffamily Exemple~\thetcbcounter},
329 listing options={breaklines},#1
330 }
331
332
333 \newcommand\mpgeomdd{\texttt{mp-geom2d}\xspace}
334 \newcommand\fichier[1]{\texttt{#1}}
335 \newcommand\variableGDD[1]{\texttt{\color{Sienna}#1}}
336 \newcommand\typeMP[1]{\texorpdfstring{\texttt{\color{Tomato}#1}}{#1}}
337 \newcommand\typeGDD[1]{\texorpdfstring{\texttt{\color{Sienna}#1}}{#1}}
338 \newcommand\foncGDD[1]{\texorpdfstring{\texttt{\color{Sienna}#1}}{#1}}
339
340 \newenvironment{Note}{
341 \noindent\textbf{Note~---~}}
342 {}
343
344
345
346 %
347 \colorlet{code}{blue!80!black}
348 \newcommand\cmd{\texttt}
349 \newcommand\code[1]{\texorpdfstring{\texttt{\color{code}#1}}{#1}}
350 \newcommand*\cs[1]{\code{\textbackslash #1}}
351 \newcommand*\macro{\par\bigskip\noindent\hspace{-30pt}%
352 \SaveVerb[aftersave={%
353 \UseVerb{Vitem}%
354 }%
355 ]{Vitem}%
356 % \bigskip
357 }
358 \newcommand\vitem[1][]{\SaveVerb[%
359 aftersave={\item[\textnormal{\UseVerb[#1]{vsave}}]}]{vsave}}
360 \newcommand*\textme[1]{\textcolor{black}{\rmfamily\textit{#1}}}
361 \newcommand*\meta[1]{% % meta
362 \textme{\ensuremath{\langle}#1\ensuremath{\rangle}}%
363 }
364 \newcommand*\optstar{% % optional star
365 \meta{\ensuremath{*}}\xspace
366 }
367 \DefineShortVerb{\|}
368 \setlength{\fboxsep}{2pt}
369 \fvset{%
370 codes={\catcode`\«\active \catcode`\×\active },
371 defineactive={\makefancyog\makefancytimes},
372 formatcom=\color{FireBrick},
373 frame=single
374 }
375 % rendre «...» équivalent à \meta{...}
376 {\catcode`\«\active
377 \newcommandx\makefancyog[0][addprefix=\global]{%
378 \def«##1»{\meta{##1}}}}
379 % rendre × équivalent à \optstar
380 {\catcode`\×\active
381 \newcommandx\makefancytimes[0][addprefix=\global]{%
382 \def×{\optstar{}}}}
383
384 \NewDocumentEnvironment{Macro}{ov}{%
385 \Verb+#2+
386 }{%
387 }
388 \newcommand{\return}[1]{~$\rightarrow$~#1}
389 \newcommand{\indication}[1]{\hfill(\itshape #1)}
390
391 \newcommand{\R}{\mathbf{R}}
392
393 \newcommand{\gddVersion}{1.4}
394 \newcommand{\gddDate}{2025-12-03}
395
396 \makeatletter
397 \renewcommand{\l@subsection}{\@dottedtocline{2}{2.0em}{2.8em}}
398 \makeatother