diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/writeongrid/WriteOnGrid.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/writeongrid/WriteOnGrid.sty | 136 |
1 files changed, 92 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/latex/writeongrid/WriteOnGrid.sty b/Master/texmf-dist/tex/latex/writeongrid/WriteOnGrid.sty index e2673d3c581..ea8fbb4a3c9 100644 --- a/Master/texmf-dist/tex/latex/writeongrid/WriteOnGrid.sty +++ b/Master/texmf-dist/tex/latex/writeongrid/WriteOnGrid.sty @@ -2,7 +2,9 @@ % licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{WriteOnGrid}[2024/04/12 v0.1.6 package to write on grid lines] +\ProvidesPackage{WriteOnGrid}[2024/11/05 v0.1.8 package to write on grid lines] +% 0.1.8 Option pour la taille des règlures (via style tikzset) +% 0.1.7 Option pour régler la marge pour les PleinePageCinqCinq % 0.1.6 Commande pour calculer le nombre de lignes à insérer en fin de page / options Auto % 0.1.5 Choix de la réglure pour le seyes (en pretest) + amélioration de la gestion des paragraphes % 0.1.4 Suppression des options de xcolor (définition manuelle des couleurs) @@ -21,6 +23,11 @@ %------Variables \newcounter{lgquadri}%compteur des lignes, qui sera incrémenté +%------Styles +\tikzset{WoGridp/.style={semithick}} +\tikzset{WoGrids/.style={thin}} +\tikzset{WoGridbar/.style={thick}} + %-----Calcul du nombre de lignes/colonnes \NewDocumentCommand\GridCalcNbCols{ O{\ColAuto} m }{% \IfStrEqCase{#2}{% @@ -99,7 +106,7 @@ ReglureSeyes=2 } -\NewDocumentCommand\AffQuadrillage{ O{} D<>{lightgray!50/lightgray!25} }{%affichage simple du quadrillage +\NewDocumentCommand\AffQuadrillage{ O{} D<>{lightgray!66/lightgray!33} }{%affichage simple du quadrillage \setcounter{lgquadri}{0}%on réinitialise les lignes \useKVdefault[Quadrill]%on met les clés par défaut \setKV[Quadrill]{#1}%on lit les clés @@ -151,26 +158,26 @@ \useasboundingbox (0,0) rectangle ({\ValeurCarreau*\QuadNbCol},{-\ValeurCarreau*\QuadNbLig}) ;%on fixe la grille de base, avant élargissement éventuel \IfStrEq{\QuadType}{Seyes}% {% - \draw[xstep=0.8,ystep=0.2,thin,\QuadCoulB] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes - \draw[xstep=0.8,ystep=0.8,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes + \draw[xstep=0.8,ystep=0.2,WoGrids,\QuadCoulB] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes + \draw[xstep=0.8,ystep=0.8,WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes \ifboolKV[Quadrill]{AffBarre} { - \draw[thick,\QuadCoulSeyes] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre Seyes + \draw[WoGridbar,\QuadCoulSeyes] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre Seyes }{} }% {}% \IfStrEq{\QuadType}{5x5}% {% - \draw[xstep=0.5,ystep=0.5,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille 5x5 + \draw[xstep=0.5,ystep=0.5,WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille 5x5 }% {}% \IfStrEq{\QuadType}{Ruled}% {% - \foreach \LLL in {0,1,...,\QuadNbLig} {\draw[,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; } + \foreach \LLL in {0,1,...,\QuadNbLig} {\draw[WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; } %\draw[xstep={\ValeurCarreau*\QuadNbCol},ystep=0.9,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille college \ifboolKV[Quadrill]{AffBarre} { - \draw[thick,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college + \draw[WoGridbar,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college }{} }% {}% @@ -180,7 +187,7 @@ \end{tikzpicture}% } -\NewDocumentEnvironment{EnvQuadrillage}{ O{} D<>{lightgray!50/lightgray!25} }%créer le quadrillage, couleurs ? +\NewDocumentEnvironment{EnvQuadrillage}{ O{} D<>{lightgray!66/lightgray!33} }%créer le quadrillage, couleurs ? {% \setcounter{lgquadri}{0}%on réinitialise les lignes \useKVdefault[Quadrill]%on met les clés par défaut @@ -233,26 +240,26 @@ \useasboundingbox (0,0) rectangle ({\ValeurCarreau*\QuadNbCol},{-\ValeurCarreau*\QuadNbLig}) ;%on fixe la grille de base, avant élargissement éventuel \IfStrEq{\QuadType}{Seyes}% {% - \draw[xstep=0.8,ystep=0.2,thin,\QuadCoulB] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes - \draw[xstep=0.8,ystep=0.8,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes + \draw[xstep=0.8,ystep=0.2,WoGrids,\QuadCoulB] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes + \draw[xstep=0.8,ystep=0.8,WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes \ifboolKV[Quadrill]{AffBarre} { - \draw[thick,\QuadCoulSeyes] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre Seyes + \draw[WoGridbar,\QuadCoulSeyes] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre Seyes }{} }% {}% \IfStrEq{\QuadType}{5x5}% {% - \draw[xstep=0.5,ystep=0.5,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille 5x5 + \draw[xstep=0.5,ystep=0.5,WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille 5x5 }% {}% \IfStrEq{\QuadType}{Ruled}% {% - \foreach \LLL in {0,1,...,\QuadNbLig} {\draw[,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; } + \foreach \LLL in {0,1,...,\QuadNbLig} {\draw[WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; } %\draw[xstep={\ValeurCarreau*\QuadNbCol},ystep=0.9,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille college \ifboolKV[Quadrill]{AffBarre} { - \draw[thick,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college + \draw[WoGridbar,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college }{} }% {}% @@ -280,7 +287,7 @@ \defKV[Quadril]{Grid=\xdef\QuadType{#1},NumSquares=\xdef\QuadNbCar{#1},Enlarge=\xdef\QuadElar{#1}}%déf des clés \setKVdefault[Quadril]{Grid=5x5,NumSquares=17x5,Unit=1,Margin=0,Enlarge=0,Border=false,DispBar=true}%valeurs par défaut -\NewDocumentCommand\DispGrid{ O{} D<>{lightgray!50/lightgray!25} }{%créer le quadrillage +\NewDocumentCommand\DispGrid{ O{} D<>{lightgray!66/lightgray!33} }{%créer le quadrillage \setcounter{lgquadri}{0}%on réinitialise les lignes \useKVdefault[Quadril]%on met les clés par défaut \setKV[Quadril]{#1}%on lit les clés @@ -332,26 +339,26 @@ \useasboundingbox (0,0) rectangle ({\ValeurCarreau*\QuadNbCol},{-\ValeurCarreau*\QuadNbLig}) ;%on fixe la grille de base, avant élargissement éventuel \IfStrEq{\QuadType}{Seyes}% {% - \draw[xstep=0.8,ystep=0.2,thin,\QuadCoulB] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes - \draw[xstep=0.8,ystep=0.8,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes + \draw[xstep=0.8,ystep=0.2,WoGrids,\QuadCoulB] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes + \draw[xstep=0.8,ystep=0.8,WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes \ifboolKV[Quadril]{DispBar} { - \draw[thick,\QuadCoulSeyes] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre Seyes + \draw[WoGridbar,\QuadCoulSeyes] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre Seyes }{} }% {}% \IfStrEq{\QuadType}{5x5}% {% - \draw[xstep=0.5,ystep=0.5,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille 5x5 + \draw[xstep=0.5,ystep=0.5,WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille 5x5 }% {}% \IfStrEq{\QuadType}{Ruled}% {% - \foreach \LLL in {0,1,...,\QuadNbLig} {\draw[,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; } + \foreach \LLL in {0,1,...,\QuadNbLig} {\draw[WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; } %\draw[xstep={\ValeurCarreau*\QuadNbCol},ystep=0.9,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille college \ifboolKV[Quadril]{DispBar} { - \draw[thick,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college + \draw[WoGridbar,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college }{} }% {}% @@ -361,7 +368,7 @@ \end{tikzpicture}% }% -\NewDocumentEnvironment{EnvGrid}{ O{} D<>{lightgray!50/lightgray!25} }%créer le quadrillage +\NewDocumentEnvironment{EnvGrid}{ O{} D<>{lightgray!66/lightgray!33} }%créer le quadrillage {% \setcounter{lgquadri}{0}%on réinitialise les lignes \useKVdefault[Quadril]%on met les clés par défaut @@ -414,26 +421,26 @@ \useasboundingbox (0,0) rectangle ({\ValeurCarreau*\QuadNbCol},{-\ValeurCarreau*\QuadNbLig}) ;%on fixe la grille de base, avant élargissement éventuel \IfStrEq{\QuadType}{Seyes}% {% - \draw[xstep=0.8,ystep=0.2,thin,\QuadCoulB] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes - \draw[xstep=0.8,ystep=0.8,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes + \draw[xstep=0.8,ystep=0.2,WoGrids,\QuadCoulB] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes + \draw[xstep=0.8,ystep=0.8,WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille seyes \ifboolKV[Quadril]{DispBar} { - \draw[thick,\QuadCoulSeyes] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre Seyes + \draw[WoGridbar,\QuadCoulSeyes] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre Seyes }{} }% {}% \IfStrEq{\QuadType}{5x5}% {% - \draw[xstep=0.5,ystep=0.5,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille 5x5 + \draw[xstep=0.5,ystep=0.5,WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille 5x5 }% {}% \IfStrEq{\QuadType}{Ruled}% {% - \foreach \LLL in {0,1,...,\QuadNbLig} {\draw[,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; } + \foreach \LLL in {0,1,...,\QuadNbLig} {\draw[WoGridp,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; } %\draw[xstep={\ValeurCarreau*\QuadNbCol},ystep=0.9,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille college \ifboolKV[Quadril]{DispBar} { - \draw[thick,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college + \draw[WoGridbar,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college }{} }% {}% @@ -482,12 +489,12 @@ %création de la grille \begin{tikzpicture}[remember picture,overlay,x=1cm,y=1cm]% %grille secondaire - \foreach \L in {0,...,\SeyesFullNbLignS} {\draw[\SeyesFullCoulS] ($(current page.north west)+(0,{-(\SeyesFullMargeH-0.3*\SeyesFullReglureSeyes)-\L*0.1*\SeyesFullReglureSeyes})$)--++({\paperwidth},0) ;} + \foreach \L in {0,...,\SeyesFullNbLignS} {\draw[WoGrids,\SeyesFullCoulS] ($(current page.north west)+(0,{-(\SeyesFullMargeH-0.3*\SeyesFullReglureSeyes)-\L*0.1*\SeyesFullReglureSeyes})$)--++({\paperwidth},0) ;} %grille principale - \foreach \C in {1,...,\SeyesFullNbCol} {\draw[\SeyesFullCoulP] ($(current page.north west)+({\SeyesFullMargeG+(0.4*\SeyesFullReglureSeyes)*\C},0)$)--($(current page.south west)+({\SeyesFullMargeG+(0.4*\SeyesFullReglureSeyes)*\C},0)$) ;} - \foreach \L in {0,...,\SeyesFullNbLignP} {\draw[\SeyesFullCoulP] ($(current page.north west)+(0,{-(\SeyesFullMargeH)-\L*(0.4*\SeyesFullReglureSeyes)})$)--++({\paperwidth},0) ;} + \foreach \C in {1,...,\SeyesFullNbCol} {\draw[WoGridp,\SeyesFullCoulP] ($(current page.north west)+({\SeyesFullMargeG+(0.4*\SeyesFullReglureSeyes)*\C},0)$)--($(current page.south west)+({\SeyesFullMargeG+(0.4*\SeyesFullReglureSeyes)*\C},0)$) ;} + \foreach \L in {0,...,\SeyesFullNbLignP} {\draw[WoGridp,\SeyesFullCoulP] ($(current page.north west)+(0,{-(\SeyesFullMargeH)-\L*(0.4*\SeyesFullReglureSeyes)})$)--++({\paperwidth},0) ;} %marge - \draw[\SeyesFullCoulM,thick] ($(current page.north west)+({\SeyesFullMargeG},0)$)--($(current page.south west)+({\SeyesFullMargeG},0)$) ; + \draw[\SeyesFullCoulM,WoGridbar] ($(current page.north west)+({\SeyesFullMargeG},0)$)--($(current page.south west)+({\SeyesFullMargeG},0)$) ; \coordinate (SeyesOrigine) at ($(current page.north west)+({\SeyesFullMargeG},{-\SeyesFullMargeH})$) ; \ifboolKV[SeyesFull]{NumLignes}% {% @@ -564,16 +571,21 @@ } %------page entière 5x5 +%les marges doivent valoir MargeH=0.2+k*0.5 et MargeV=0.3+k'*0.5 \defKV[CxCFull]{% Couleur=\xdef\CCFullCoul{#1},% CouleurMarge=\xdef\CCFullCoulM{#1},% - FormatPapier=\xdef\CCFullFormatPap{#1} + FormatPapier=\xdef\CCFullFormatPap{#1},% + MargeG=\xdef\CCFullMargeG{#1},% + MargeH=\xdef\CCFullMargeH{#1} } \setKVdefault[CxCFull]{% Couleur=lightgray!50,% CouleurMarge=gray,% NumLignes=false,% - FormatPapier=A4 + FormatPapier=A4,% + MargeG=auto,% + MargeH=auto } \NewDocumentEnvironment{PleinePageCinqCinq}{ O{} }%semble OK ^^ @@ -581,24 +593,60 @@ \useKVdefault[CxCFull]% \setKV[CxCFull]{#1}% \IfEq{\CCFullFormatPap}{A4}% - {\xdef\CCFullHautPap{29.7}\xdef\CCFullLargPap{21}\xdef\CCFullMargeG{1.7}\xdef\CCFullMargeH{1.3}}% + {% + \xdef\CCFullHautPap{29.7}\xdef\CCFullLargPap{21}% + \IfEq{\CCFullMargeG}{auto}% + {% + \xdef\CCFullMargeG{1.7}% + }% + {}% + \IfEq{\CCFullMargeH}{auto}% + {% + \xdef\CCFullMargeH{1.3}% + }% + {}% + }% {}% \IfEq{\CCFullFormatPap}{A5}% - {\xdef\CCFullHautPap{21}\xdef\CCFullLargPap{14.8}\xdef\CCFullMargeG{1.2}\xdef\CCFullMargeH{0.8}}% + {% + \xdef\CCFullHautPap{21}\xdef\CCFullLargPap{14.8}% + \IfEq{\CCFullMargeG}{auto}% + {% + \xdef\CCFullMargeG{1.2}% + }% + {}% + \IfEq{\CCFullMargeH}{auto}% + {% + \xdef\CCFullMargeH{0.8}% + }% + {}% + }% {}% \IfSubStr{\CCFullFormatPap}{x}% - {\StrCut{\CCFullFormatPap}{x}{\CCFullLargPap}{\CCFullHautPap}\xdef\CCFullMargeG{1.7}\xdef\CCFullMargeH{1.3}}% + {% + \StrCut{\CCFullFormatPap}{x}{\CCFullLargPap}{\CCFullHautPap}% + \IfEq{\CCFullMargeG}{auto}% + {% + \xdef\CCFullMargeG{1.7}% + }% + {}% + \IfEq{\CCFullMargeH}{auto}% + {% + \xdef\CCFullMargeH{1.3}% + }% + {}% + }% {}% %calcul du nombre de lignes /colonnes ? \xdef\CCFullNbLign{\fpeval{round(\CCFullHautPap/(0.5),0)}}% \xdef\CCFullNbCol{\fpeval{round((\CCFullLargPap)/(0.5),0)}}% \begin{tikzpicture}[remember picture,overlay,x=1cm,y=1cm] %lignes horizontales - \foreach \L in {0,1,...,\CCFullNbLign} {\draw[\CCFullCoul] ($(current page.north west)+(0,{-0.3-\L*0.5})$)--++({\paperwidth},0) ;} + \foreach \L in {0,1,...,\CCFullNbLign} {\draw[WoGridp,\CCFullCoul] ($(current page.north west)+(0,{-0.3-\L*0.5})$)--++({\paperwidth},0) ;} %lignes verticales - \foreach \C in {0,1,...,\CCFullNbCol} {\draw[\CCFullCoul] ($(current page.north west)+({0.2+0.5*\C},0)$)--($(current page.south west)+({0.2+0.5*\C},0)$) ;} + \foreach \C in {0,1,...,\CCFullNbCol} {\draw[WoGridp,\CCFullCoul] ($(current page.north west)+({0.2+0.5*\C},0)$)--($(current page.south west)+({0.2+0.5*\C},0)$) ;} %marge - \draw[\CCFullCoulM,thick] ($(current page.north west)+(\CCFullMargeG,0)$)--($(current page.south west)+(\CCFullMargeG,0)$) ; + \draw[\CCFullCoulM,WoGridbar] ($(current page.north west)+(\CCFullMargeG,0)$)--($(current page.south west)+(\CCFullMargeG,0)$) ; \coordinate (CinqCinqOrigine) at ($(current page.north west)+({\CCFullMargeG},{-\CCFullMargeH})$) ; \ifboolKV[CxCFull]{NumLignes}% {% @@ -703,11 +751,11 @@ \xdef\RuledFullNbLign{\fpeval{round(\RuledFullHautEff/(0.9),0)}}% \begin{tikzpicture}[remember picture,overlay,x=1cm,y=1cm] %lignes horizontales - \foreach \L in {1,...,\RuledFullNbLign} {\draw[\RuledFullCoul] ($(current page.north west)+(0,{-(\L-1)*0.9-\RuledFullMargeH})$)--++({\paperwidth},0) ;} + \foreach \L in {1,...,\RuledFullNbLign} {\draw[WoGridp,\RuledFullCoul] ($(current page.north west)+(0,{-(\L-1)*0.9-\RuledFullMargeH})$)--++({\paperwidth},0) ;} %\foreach \L in {1.5,2.4,...,27.6} {\draw[\RuledFullCoul] ($(current page.north west)+(0,{-\L})$)--++({\paperwidth},0) ;} %lignes verticales - \draw[thick,\RuledFullCoulMarge] ($(current page.north west)+({\RuledFullMarge},0)$)--($(current page.south west)+({\RuledFullMarge},0)$) ; - \draw[thick,\RuledFullCoulMarge] ($(current page.north east)+({-\RuledFullMarge},0)$)--($(current page.south east)+({-\RuledFullMarge},0)$) ; + \draw[WoGridbar,\RuledFullCoulMarge] ($(current page.north west)+({\RuledFullMarge},0)$)--($(current page.south west)+({\RuledFullMarge},0)$) ; + \draw[WoGridbar,\RuledFullCoulMarge] ($(current page.north east)+({-\RuledFullMarge},0)$)--($(current page.south east)+({-\RuledFullMarge},0)$) ; %\foreach \C in {3} {\draw[thick,\RuledFullCoulMarge] ($(current page.north west)+({\C},0)$)--($(current page.south west)+({\C},0)$) ;} %origine \coordinate (RuledOrigine) at ($(current page.north west)+({\RuledFullMarge},{-\RuledFullMargeH})$) ; |