texlive[68783] Master/texmf-dist: proflycee (5nov23)
commits+karl at tug.org
commits+karl at tug.org
Thu Nov 9 23:20:57 CET 2023
Revision: 68783
https://tug.org/svn/texlive?view=revision&revision=68783
Author: karl
Date: 2023-11-09 23:20:57 +0100 (Thu, 09 Nov 2023)
Log Message:
-----------
proflycee (5nov23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
trunk/Master/texmf-dist/doc/latex/proflycee/proflycee-docctan.zip
trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
trunk/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-recreat.tex
Modified: trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex 2023-11-09 22:20:48 UTC (rev 68782)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex 2023-11-09 22:20:57 UTC (rev 68783)
@@ -5,8 +5,8 @@
% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
\documentclass[a4paper,french,11pt]{article}
-\def\PLversion{3.00c}
-\def\PLdate{27 octobre 2023}
+\def\PLversion{3.00d}
+\def\PLdate{5 novembre 2023}
\usepackage{amsfonts}
\usepackage{ProfLycee}
\useproflyclib{piton,minted,pythontex,ecritures}
Modified: trunk/Master/texmf-dist/doc/latex/proflycee/proflycee-docctan.zip
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty 2023-11-09 22:20:48 UTC (rev 68782)
+++ trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty 2023-11-09 22:20:57 UTC (rev 68783)
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2023/10/27 3.00c Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2023/11/05 3.00d Aide pour l'utilisation de LaTeX en lycee]
+% 3.00d Ajout de commandes pour des chateaux de cartes et des allumettes
% 3.00c Ajout de chiffrements (César + Affine + Hill)
% 3.00b Amélioration de la commande des intervalles (spécifier un label pour les bornes)
% 3.00a Ajout de commandes pour travailler avex des intervalles + Nouvelle numérotation
Modified: trunk/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-recreat.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-recreat.tex 2023-11-09 22:20:48 UTC (rev 68782)
+++ trunk/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-recreat.tex 2023-11-09 22:20:57 UTC (rev 68783)
@@ -342,4 +342,142 @@
}
}
+%====CHATEAUCARTES
+\usetikzlibrary{patterns.meta}
+%hauteurs utiles
+\xdef\HoCardsHgt{1}
+\xdef\HoCardsWdt{0.45}
+
+%styles
+\tikzstyle{CarteDroite}=[line width=\fpeval{\HoCardsScale*0.01}cm,rounded corners=\fpeval{\HoCardsScale*\HoCardsRound}cm,DecoDroite]
+\tikzstyle{CarteGauche}=[line width=\fpeval{\HoCardsScale*0.01}cm,rounded corners=\fpeval{\HoCardsScale*\HoCardsRound}cm,DecoGauche]
+\tikzstyle{CarteHoriz}=[line width=\fpeval{\HoCardsScale*0.01}cm,rounded corners=\fpeval{\HoCardsScale*\HoCardsRound}cm,DecoHoriz]
+
+%clés
+\defKV[houseofcards]{Echelle=\def\HoCardsScale{#1},CouleurDeco=\def\HoCardsColor{#1},AngleY=\def\HoCardsAglY{#1},AngleX=\def\HoCardsAglX{#1},PoliceLegende=\def\HoCardsFonteLeg{#1},Deco=\def\HoCardsDeco{#1}}
+\setKVdefault[houseofcards]{Echelle=1,CouleurDeco=black,Arrondi=true,,AngleY=20,AngleX=8,Bas=false,Legende=false,PoliceLegende=\normalsize\normalfont,Deco=remplir}
+
+\newcommand\HoCardsLeft[1]{%
+ \draw[CarteGauche] (#1) --++ ({0.5*\HoCardsHgt},0,{-sqrt(3)*\HoCardsHgt*0.5}) --++ ({0},{\HoCardsWdt},{0}) --++ ({-0.5*\HoCardsHgt},0,{sqrt(3)*\HoCardsHgt*0.5}) --cycle ;
+}
+
+\newcommand\HoCardsRight[1]{%
+ \draw[CarteDroite] (#1) --++ ({-0.5*\HoCardsHgt},0,{-sqrt(3)*\HoCardsHgt*0.5}) --++ ({0},{\HoCardsWdt},{0}) --++ ({0.5*\HoCardsHgt},0,{sqrt(3)*\HoCardsHgt*0.5}) --cycle ;
+}
+
+\newcommand\HoCardsHoriz[1]{%
+ \draw[CarteHoriz] (#1) --++ ({\HoCardsHgt},0,0) --++ ({0},{\HoCardsWdt},{0}) --++ ({-\HoCardsHgt},0,0) --cycle ;
+}
+
+\NewDocumentCommand\ChateauCartes{ O{} m D<>{} }{%
+ \useKVdefault[houseofcards]%
+ \setKV[houseofcards]{#1}%
+ \def\HoCardsNbLevel{#2}%
+ \def\HoCardsRound{0.025}%
+ \ifboolKV[houseofcards]{Arrondi}{\def\HoCardsRound{0}}{}%
+ %style remplir, si clé non reconnue
+ \tikzstyle{DecoDroite}=[fill=\HoCardsColor!20]
+ \tikzstyle{DecoGauche}=[fill=\HoCardsColor!10]
+ \tikzstyle{DecoHoriz}=[fill=\HoCardsColor!15]
+ \IfStrEq{\HoCardsDeco}{vide}
+ {%
+ \tikzstyle{DecoDroite}=[fill=white]
+ \tikzstyle{DecoGauche}=[fill=white]
+ \tikzstyle{DecoHoriz}=[fill=white]
+ }%
+ {}%
+ \IfStrEq{\HoCardsDeco}{hachures}
+ {%
+ \tikzstyle{DecoDroite}=[preaction={fill=white},pattern={Lines[angle={45-2.5*\HoCardsAglY},distance=\fpeval{\HoCardsScale*2}pt]},pattern color=\HoCardsColor]
+ \tikzstyle{DecoGauche}=[preaction={fill=white},pattern={Lines[angle={45-\HoCardsAglY},distance=\fpeval{\HoCardsScale*1.25}pt]},pattern color=\HoCardsColor]
+ \tikzstyle{DecoHoriz}=[preaction={fill=white},pattern={Lines[angle={45+\HoCardsAglY},distance=\fpeval{\HoCardsScale*2}pt]},pattern color=\HoCardsColor]
+ }%
+ {}%
+ \begin{tikzpicture}[x={({-180+\HoCardsAglX}:0.75cm)},y={({180-\HoCardsAglY}:1cm)},z={(90:1cm)},line join=bevel,scale=\HoCardsScale,#3]
+ %nœuds
+ \coordinate (A0-0) at (0,0,0) ;
+ \xintifboolexpr{\HoCardsNbLevel > 1}%
+ {
+ \foreach \i in {1,...,\HoCardsNbLevel}{%
+ \def\j{\inteval{\i-1}}%
+ \coordinate (A\i-0) at ($(A\j-0)+({-0.5*\HoCardsHgt},0,{-sqrt(3)*\HoCardsHgt*0.5})$) ;
+ }
+ \foreach \i in {1,...,\HoCardsNbLevel}{%
+ \foreach \j in {1,...,\i}{%
+ \def\k{\inteval{\j-1}}%
+ \coordinate (A\i-\j) at ($(A\i-\k)+({\HoCardsHgt},0,0)$) ;
+ }
+ }
+ %construction des étages, du bas vers le haut
+ \ifboolKV[houseofcards]{Bas}%
+ {%
+ \foreach \i in {0,...,\inteval{\HoCardsNbLevel-1}}{\HoCardsHoriz{A\HoCardsNbLevel-\i}}%
+ }{}%
+ \foreach \etage in {\inteval{\HoCardsNbLevel-1},...,1}{%
+ \foreach \i in {0,...,\etage}{\HoCardsRight{A\etage-\i}\HoCardsLeft{A\etage-\i}}
+ \foreach \i in {0,...,\inteval{\etage-1}}{\HoCardsHoriz{A\etage-\i}}
+ }
+ }%
+ {%
+ \coordinate (A1-0) at ($(A0-0)+({-0.5*\HoCardsHgt},0,{-sqrt(3)*\HoCardsHgt*0.5})$) ;
+ \coordinate (A1-1) at ($(A1-0)+({\HoCardsHgt},0,0)$) ;
+ \ifboolKV[houseofcards]{Bas}%
+ {%
+ \HoCardsHoriz{A1-0}%
+ }{}%
+ }%
+ %étage du dessus
+ \HoCardsRight{A0-0}\HoCardsLeft{A0-0}
+ %légende éventuelle
+ \ifboolKV[houseofcards]{Legende}%
+ {%
+ \draw ($(A\HoCardsNbLevel-0)!0.5!(A\HoCardsNbLevel-\HoCardsNbLevel)$) node[below,font=\HoCardsFonteLeg] {$n = \HoCardsNbLevel$} ;
+ }{}%
+ \end{tikzpicture}
+}
+
+%====ALLUMETTES
+\definecolor{BoisAllumette}{HTML}{E9D0B8}
+\definecolor{GratteAllumette}{HTML}{D32A0F}
+\xdef\LongueurGratte{0.28cm}
+\xdef\HauteurGratte{0.20cm}
+
+\newcommand{\CalcLg}[2]{%
+ \pgfpointdiff{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}%
+ \pgf at xa=\pgf at x%
+ \pgf at ya=\pgf at y%
+ \pgfmathparse{veclen(\pgf at xa,\pgf at ya)}%
+}
+
+\defKV[allumettes]{CouleurBois=\def\MatchWoodColor{#1},CouleurBout=\def\MatchEndColor{#1},Decal=\def\MatchOffset{#1}}
+\setKVdefault[allumettes]{CouleurBois=BoisAllumette,CouleurBout=GratteAllumette,Decal={0.8*\LongueurGratte},NoirBlanc=false}
+
+\NewDocumentCommand\Allumette{ O{} m }{%1 offset,%2 = ptA>ptB
+ \useKVdefault[allumettes]%
+ \setKV[allumettes]{#1}%
+ \ifboolKV[allumettes]{NoirBlanc}%
+ {%
+ \def\MatchWoodColor{lightgray}\def\MatchEndColor{darkgray}%
+ }%
+ {}%
+ \StrCut{#2}{>}{\AlumPtDep}{\AlumPtArriv}%
+ \pgfmathanglebetweenpoints{\pgfpointanchor{\AlumPtDep}{center}}{\pgfpointanchor{\AlumPtArriv}{center}}\edef\AlumAngle{\pgfmathresult}%
+ \CalcLg{\AlumPtDep}{\AlumPtArriv}\edef\AlumLg{\pgfmathresult}%
+ \begin{scope}[shift={($(\AlumPtDep)+(\AlumAngle:{\MatchOffset})$)},rotate=\AlumAngle]
+ \fill[\MatchWoodColor] (0,-0.0975cm) rectangle++ ({\AlumLg-2*\LongueurGratte-2*\MatchOffset},0.2cm);
+ \fill[\MatchWoodColor!50!black] (0,-0.0975cm) --++ ({\AlumLg-2*\LongueurGratte-2*\MatchOffset},0) --++ (0.05cm,-0.05cm) --++ ({-\AlumLg+2*\LongueurGratte+2*\MatchOffset},0) --++ (-0.05cm,0.05cm);
+ \draw[line join=bevel,line cap=rect] (0,-0.0975cm) -- ++(0,0.2cm) -- ++({\AlumLg-2*\LongueurGratte-2*\MatchOffset},0) -- ++(0,-0.2cm) -- ++(0.05cm,-0.05cm) -- ++({-\AlumLg+2*\LongueurGratte+2*\MatchOffset},0) -- ++(-0.05cm,0.05cm) --cycle ;
+ \shade[draw,ball color=\MatchEndColor,rounded corners=0.1pt] ({\AlumLg-2*\LongueurGratte-2*\MatchOffset},0)--++(0,{0.1cm}) to[out=12.5,in=90]++({2*\LongueurGratte},{-0.1cm}) to[out=-90,in=-17.5]++({-2*\LongueurGratte+0.05cm},{-0.15cm}) --++ (-0.05cm,0.05cm) --cycle ;
+ \end{scope}
+}
+
+\NewDocumentCommand\Allumettes{ O{} m }{%
+ \setsepchar{ }%
+ \readlist*\listeptsalum{#2}%
+ \xintFor* ##1 in {\xintSeq{1}{\listeptsalumlen}}\do{%
+ \itemtomacro\listeptsalum[##1]{\diralum}
+ \Allumette[#1]{\diralum}
+ }%
+}
+
\endinput
\ No newline at end of file
More information about the tex-live-commits
mailing list.