summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/scratch/README10
-rw-r--r--Master/texmf-dist/doc/latex/scratch/scratch-fr.pdfbin452125 -> 452516 bytes
-rw-r--r--Master/texmf-dist/doc/latex/scratch/scratch-fr.tex4
-rw-r--r--Master/texmf-dist/tex/latex/scratch/scratch.sty174
4 files changed, 106 insertions, 82 deletions
diff --git a/Master/texmf-dist/doc/latex/scratch/README b/Master/texmf-dist/doc/latex/scratch/README
index 7ef0b626a68..363390b3a2a 100644
--- a/Master/texmf-dist/doc/latex/scratch/README
+++ b/Master/texmf-dist/doc/latex/scratch/README
@@ -1,11 +1,11 @@
___________________________________
- L'extension
- scratch
-
- v0.32
+ L'extension
+ scratch
- 20 septembre 2017
+ v0.33
+
+ 30 d\'ecembre 2017
___________________________________
Authors : Christian Tellechea
diff --git a/Master/texmf-dist/doc/latex/scratch/scratch-fr.pdf b/Master/texmf-dist/doc/latex/scratch/scratch-fr.pdf
index d3db44e94ae..518e98a2de1 100644
--- a/Master/texmf-dist/doc/latex/scratch/scratch-fr.pdf
+++ b/Master/texmf-dist/doc/latex/scratch/scratch-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/scratch/scratch-fr.tex b/Master/texmf-dist/doc/latex/scratch/scratch-fr.tex
index 7bfa5364e8c..5ae1a317e53 100644
--- a/Master/texmf-dist/doc/latex/scratch/scratch-fr.tex
+++ b/Master/texmf-dist/doc/latex/scratch/scratch-fr.tex
@@ -510,4 +510,8 @@ Toute remarque, remontée de bug ---~je n'ose pas dire amélioration du code~---,
\begin{version}{0.32}{20/09/2017}
>Correction de 2 bugs signalés par G. \textsc{Mandallaz} : la couleur des \verb|\ovallist| n'était pas correcte et la forme des \verb|\selectmenu| n'était pas rectangulaire lorsqu'ils étaient appelés dans un boite ovale.
\end{version}
+
+\begin{version}{0.33}{30/12/2017}
+ >Correction d'un bug signalé par I. \textsc{Eble} : l'affichage des losanges, boites de texte, ovales n'est pas correct dans les blocs lorsque \verb|scale| est différente de 1.
+\end{version}
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/scratch/scratch.sty b/Master/texmf-dist/tex/latex/scratch/scratch.sty
index ead25bbc802..59bd1062cfa 100644
--- a/Master/texmf-dist/tex/latex/scratch/scratch.sty
+++ b/Master/texmf-dist/tex/latex/scratch/scratch.sty
@@ -4,9 +4,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
\def\scrname {scratch} %
-\def\scrver {0.32} %
+\def\scrver {0.33} %
% %
-\def\scrdate {2017/09/20} %
+\def\scrdate {2017/12/30} %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -98,11 +98,11 @@
node[at=(origin),draw=none,anchor=base west,xshift=\scr_xoffset+\scr_xsep,yshift=\scr_yoffset-\scr_boxht-\scr_corner-\scr_ysepsup,text=\scr_current_textcolor](texte){\sffamily\bfseries#2\scr_blockstrut};
\draw[draw=\scr_current_linedark,yshift=\scr_yoffset,xshift=\scr_xoffset](\scr_boxwd+\scr_xsep*2,-\scr_corner)--++(0,-\scr_totht-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\scr_boxwd-2*\scr_xsep+\scr_corner*10,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3,0);
\draw[draw=\scr_current_linelight,yshift=\scr_yoffset,xshift=\scr_xoffset](\scr_corner,-\scr_corner-\scr_ysepsup-\scr_totht-\scr_ysepinf)--++(-\scr_corner,\scr_corner)--++(0,\scr_totht+\scr_ysepsup+\scr_ysepinf-\scr_corner)--++(\scr_corner,\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,\scr_corner)--++(\scr_boxwd+2*\scr_xsep-\scr_corner*10,0)--++(\scr_corner,-\scr_corner);
- \advance\scr_yoffset\dimexpr-\scr_totht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth\relax
+ \advance\scr_yoffset\dimexpr-\scr_totht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth+\scr_extraoffset\relax
\gdef\scr_blockstop{0}%
}
\newcommand*\blockspace[1][1]{%
- \advance\scr_yoffset#1\dimexpr-\scr_blockstruttotht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth\relax
+ \advance\scr_yoffset#1\dimexpr-\scr_blockstruttotht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth+\scr_extraoffset\relax
\gdef\scr_blockstop{1}%
}
\def\blockstop#1{% #1=texte
@@ -124,7 +124,7 @@
node[at=(origin),draw=none,anchor=base west,xshift=\scr_xoffset+\scr_xsep,yshift=\scr_yoffset-\scr_boxht-\scr_corner-\scr_ysepsup,text=\scr_current_textcolor](texte){\sffamily\bfseries#1\scr_blockstrut};
\draw[draw=\scr_current_linedark,yshift=\scr_yoffset,xshift=\scr_xoffset](\scr_boxwd+\scr_xsep*2,-\scr_corner)--++(0,-\scr_totht-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\scr_boxwd-2*\scr_xsep+\scr_corner*2,0);
\draw[draw=\scr_current_linelight,yshift=\scr_yoffset,xshift=\scr_xoffset](\scr_corner,-\scr_corner*2-\scr_ysepsup-\scr_totht-\scr_ysepinf+\scr_corner)--++(-\scr_corner,\scr_corner)--++(0,\scr_totht+\scr_ysepsup+\scr_ysepinf-\scr_corner)--++(\scr_corner,\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,\scr_corner)--++(\scr_boxwd+2*\scr_xsep-\scr_corner*10,0)--++(\scr_corner,-\scr_corner);
- \advance\scr_yoffset\dimexpr-\scr_totht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth\relax
+ \advance\scr_yoffset\dimexpr-\scr_totht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth+\scr_extraoffset\relax
\gdef\scr_blockstop{1}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -149,7 +149,7 @@
node[at=(origin),draw=none,anchor=base west,xshift=\scr_xoffset+\scr_xsep,yshift=\scr_yoffset-\scr_boxht-\scr_corner-\scr_ysepsup,text=\scr_current_textcolor](texte){\sffamily\bfseries#2\scr_blockstrut};
\draw[draw=\scr_current_linedark,yshift=\scr_yoffset,xshift=\scr_xoffset](\scr_boxwd+\scr_xsep*2,-\scr_corner)--++(0,-\scr_totht-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\scr_boxwd-2*\scr_xsep+\scr_corner*10,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3,0);
\draw[draw=\scr_current_linelight,yshift=\scr_yoffset,xshift=\scr_xoffset](\scr_corner,-\scr_corner-\scr_ysepsup-\scr_totht-\scr_ysepinf)--++(-\scr_corner,\scr_corner)--++(0,\scr_totht+\scr_ysepsup+\scr_ysepinf)--(0,0)to[out=\scr_initarcangle,in=180-\scr_initarcangle](\scr_xsep+\scr_initarclength,0)--(\scr_boxwd+2*\scr_xsep-\scr_corner,0)--++(\scr_corner,-\scr_corner);
- \advance\scr_yoffset\dimexpr-\scr_totht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth\relax
+ \advance\scr_yoffset\dimexpr-\scr_totht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth+\scr_extraoffset\relax
\gdef\scr_blockstop{0}%
}
@@ -177,7 +177,7 @@
\draw[draw=\scr_current_linedark,yshift=\scr_yoffset,xshift=\scr_xoffset](\scr_boxwd+\scr_xsep*2,0)--++(0,-\scr_totht-\scr_ysepsup-\scr_ysepinf)--++(-\scr_corner,-\scr_corner)--++(-\scr_boxwd-2*\scr_xsep+\scr_corner*10,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3,0);
\draw[draw=\scr_current_linelight,yshift=\scr_yoffset,xshift=\scr_xoffset](\scr_corner,-\scr_corner-\scr_ysepsup-\scr_totht-\scr_ysepinf)--++(-\scr_corner,\scr_corner)--++(0,\scr_totht+\scr_ysepsup+\scr_ysepinf)--(0,0);
\draw[line width=1.5pt,draw=\current_linesurround,shorten <=-\scr_linewidth,shorten >=-\scr_linewidth](0,0)to[out=15,in=165](\scr_boxwd+2*\scr_xsep,0);
- \advance\scr_yoffset\dimexpr-\scr_totht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth\relax
+ \advance\scr_yoffset\dimexpr-\scr_totht-\scr_ysepsup-\scr_ysepinf-\scr_corner-\scr_linewidth+\scr_extraoffset\relax
\gdef\scr_blockstop{0}%
}
\def\namemoreblocks#1{%
@@ -216,96 +216,99 @@
\scr_cslet{scr_txtloopwd\number\scr_loopnest}\__boxwd
\scr_csedef{toploopx\number\scr_loopnest}{\the\scr_xoffset}% coordonnées du point nord-west
\scr_csedef{toploopy\number\scr_loopnest}{\the\scr_yoffset}%
- \advance\scr_xoffset by \scr_loopblockwidth
- \advance\scr_yoffset\dimexpr-\scr_corner-\scr_ysepsup-\csname scr_txtlooptotht\number\scr_loopnest\endcsname-\scr_ysepinf-\scr_linewidth\relax
+ \advance\scr_xoffset\scr_loopblockwidth
+ \advance\scr_yoffset\dimexpr-\scr_corner-\scr_ysepsup-\csname scr_txtlooptotht\number\scr_loopnest\endcsname-\scr_ysepinf-\scr_linewidth+\scr_extraoffset\relax
\advance\scr_loopnest1
+ \advance\scr_xoffset-\scr_extraoffset
#2%
+ \advance\scr_xoffset\scr_extraoffset
\advance\scr_loopnest-1
\expandafter\let\csname scr_blockstopif_\number\scr_loopnest\endcsname\scr_blockstop
\scr_csedef{bottomifx\number\scr_loopnest}{\the\scr_xoffset}%
\scr_csedef{bottomify\number\scr_loopnest}{\the\scr_yoffset}%
\ifcat\relax\detokenize{#3}\relax\else% si instruction #3
- \advance\scr_yoffset\dimexpr-\scr_blocminheight-\scr_linewidth\relax% épaisseur théorique de la branche "sinon"
+ \advance\scr_yoffset\dimexpr-\scr_blocminheight-\scr_linewidth+\scr_extraoffset\relax% épaisseur théorique de la branche "sinon"
\advance\scr_loopnest1
+ \advance\scr_xoffset-\scr_extraoffset
#3%
+ \advance\scr_xoffset\scr_extraoffset
\advance\scr_loopnest-1
\scr_csedef{bottomelsex\number\scr_loopnest}{\the\scr_xoffset}%
\scr_csedef{bottomelsey\number\scr_loopnest}{\the\scr_yoffset}%
\fi
- \advance\scr_yoffset by \dimexpr-\scr_blocminheight-\scr_linewidth\relax% épaisseur de la branche du bas
+ \advance\scr_yoffset by \dimexpr-\scr_blocminheight-\scr_linewidth+\scr_extraoffset\relax% épaisseur de la branche du bas
\def\scr_current_blockcolor{scrcontrol}%
\edef\scr_current_fillcolor{\ifboolKV[\scrname]{print}{\ifboolKV[\scrname]{fill blocks}{scr_fillgray}{none}}{\scr_current_blockcolor}}%
\edef\scr_current_linelight{\ifboolKV[\scrname]{print}{scr_linegray}{\scr_current_blockcolor}!\scr_contrast!white}%
\edef\scr_current_linedark {\ifboolKV[\scrname]{print}{scr_linegray}{\scr_current_blockcolor}!\scr_contrast!black}%
\edef\scr_current_textcolor{\ifboolKV[\scrname]{print}{\useKV[\scrname]{text color}}{white}}%
+% ############## dessin du corps ##############
\draw[draw=none,fill=\scr_current_fillcolor](\csname toploopx\number\scr_loopnest\endcsname+\scr_corner,\csname toploopy\number\scr_loopnest\endcsname)--++(\scr_corner*3,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10,0)% ligne haut du titre boucle "--\__/---------"
- --++(\scr_corner,-\scr_corner)--++(0,-\csname scr_txtlooptotht\number\scr_loopnest\endcsname-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)% ligne est "\ + | + /"
- --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10+\scr_loopblockwidth,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3-\scr_linewidth,0)--++(-\scr_corner,-\scr_corner)% ligne sud "/--\__/---------"
- --(\csname bottomifx\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomify\number\scr_loopnest\endcsname+\scr_corner)% descente gauche bloc "if"
- \ifcat\relax\detokenize{#3}\relax\else% tracé de la branche du bas du else
- --++(\scr_corner,-\scr_corner)% chanfrein"\" pour raccord sur ligne haut
- \ifnum\csname scr_blockstopif_\number\scr_loopnest\endcsname=1
- --++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*2-\scr_loopblockwidth+\scr_linewidth,0)% ligne haut de la barre else "--\__/---------"
+ --++(\scr_corner,-\scr_corner)--++(0,-\csname scr_txtlooptotht\number\scr_loopnest\endcsname-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)% ligne est "\ + | + /"
+ --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10+\scr_loopblockwidth-\scr_extraoffset_rtwo,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3+\scr_extraoffset,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3-\scr_linewidth+\scr_extraoffset_rtwo_mone,0)--++(-\scr_corner,-\scr_corner)% ligne sud "/--\__/---------"
+ --(\csname bottomifx\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomify\number\scr_loopnest\endcsname+\scr_corner)% descente gauche bloc "if"
+ \ifcat\relax\detokenize{#3}\relax\else% tracé de la branche du bas du else
+ --++(\scr_corner,-\scr_corner)% chanfrein"\" pour raccord sur ligne haut
+ \ifnum\csname scr_blockstopif_\number\scr_loopnest\endcsname=1
+ --++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*2-\scr_loopblockwidth+\scr_linewidth,0)% ligne haut de la barre else "--\__/---------"
+ \else
+ --++(\scr_corner*3+\scr_linewidth-\scr_extraoffset_rtwo,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3+\scr_extraoffset,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10-\scr_loopblockwidth+\scr_extraoffset_rtwo_mone,0)% ligne haut de la barre else "--\__/---------"
+ \fi
+ --++(\scr_corner,-\scr_corner)--++(0,-\scr_loopblockheight-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10+\scr_loopblockwidth-\scr_extraoffset_rtwo,0)--++(-\scr_corner,-\scr_corner)% ligne Est "\ + | + /"
+ --++(-\scr_corner*3+\scr_extraoffset,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3-\scr_linewidth+\scr_extraoffset_rtwo_mone,0)--++(-\scr_corner,-\scr_corner)% ligne sud "/--\__/---------"
+ --(\csname bottomelsex\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomelsey\number\scr_loopnest\endcsname+\scr_corner)% descente gauche bloc "else"
+ \fi
+ --++(\scr_corner,-\scr_corner)% chanfrein "\" pour rejoindre haut de la ligne de fin
+ \ifnum\scr_blockstop=1
+ --++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*2-\scr_loopblockwidth+\scr_linewidth,0)% ligne haut de la barre de fin "--\__/---------"
\else
- --++(\scr_corner*3+\scr_linewidth,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10-\scr_loopblockwidth,0)% ligne haut de la barre else "--\__/---------"
+ --++(\scr_corner*3+\scr_linewidth-\scr_extraoffset_rtwo,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3+\scr_extraoffset,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10-\scr_loopblockwidth+\scr_extraoffset_rtwo_mone,0)% ligne haut de la barre de fin "--\__/---------"
\fi
- --++(\scr_corner,-\scr_corner)--++(0,-\scr_loopblockheight-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10+\scr_loopblockwidth,0)--++(-\scr_corner,-\scr_corner)% ligne Est "\ + | + /"
- --++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3-\scr_linewidth,0)--++(-\scr_corner,-\scr_corner)% ligne sud "/--\__/---------"
- --(\csname bottomelsex\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomelsey\number\scr_loopnest\endcsname+\scr_corner)% descente gauche bloc "else"
- \fi
- --++(\scr_corner,-\scr_corner)% chanfrein "\" pour rejoindre haut de la ligne de fin
- \ifnum\scr_blockstop=1
- --++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*2-\scr_loopblockwidth+\scr_linewidth,0)% ligne haut de la barre de fin "--\__/---------"
- \else
- --++(\scr_corner*3+\scr_linewidth,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10-\scr_loopblockwidth,0)% ligne haut de la barre de fin "--\__/---------"
- \fi
- --++(\scr_corner,-\scr_corner)--++(0,-\scr_loopblockheight-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)% ligne Est "\ + | + /"
- \ifnum#4=1 %infiniteloop
- --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*2,0)% ligne Sud "\---------------"
- \else
- --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3,0)% ligne Sud "\--\__/---------"
- \fi
- --++(-\scr_corner,\scr_corner)
- --(\csname toploopx\number\scr_loopnest\endcsname,\csname toploopy\number\scr_loopnest\endcsname-\scr_corner)--cycle% remontée tout en haut et cycle
- ;%
- \advance\scr_xoffset by -\scr_loopblockwidth
- \draw[draw=\scr_current_linelight](\scr_xoffset+\scr_corner,\scr_yoffset+\scr_linewidth)--++(-\scr_corner,\scr_corner)
+ --++(\scr_corner,-\scr_corner)--++(0,-\scr_loopblockheight-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)% ligne Est "\ + | + /"
+ \ifnum#4=1 %infiniteloop
+ --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*2,0)% ligne Sud "\---------------"
+ \else
+ --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3,0)% ligne Sud "\--\__/---------"
+ \fi
+ --++(-\scr_corner,\scr_corner)
+ --(\csname toploopx\number\scr_loopnest\endcsname,\csname toploopy\number\scr_loopnest\endcsname-\scr_corner)--cycle;% remontée tout en haut et cycle
+ \advance\scr_xoffset\dimexpr-\scr_loopblockwidth\relax
+ % ############## dessin des lignes de relief ##############
+ \draw[draw=\scr_current_linelight](\scr_xoffset+\scr_corner-\scr_extraoffset+\scr_extraoffset,\scr_yoffset+\scr_linewidth-\scr_extraoffset)--++(-\scr_corner,\scr_corner)
--(\csname toploopx\number\scr_loopnest\endcsname,\csname toploopy\number\scr_loopnest\endcsname-\scr_corner)--++(\scr_corner,\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10,0)--++(\scr_corner,-\scr_corner);% remontée gauche + ligne haut bandeau
- \draw[draw=\scr_current_linedark](\csname toploopx\number\scr_loopnest\endcsname+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname,\csname toploopy\number\scr_loopnest\endcsname-\scr_corner)--++(0,-\csname scr_txtlooptotht\number\scr_loopnest\endcsname-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10+\scr_loopblockwidth,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3-\scr_linewidth,0)--++(-\scr_corner,-\scr_corner)--(\csname bottomifx\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomify\number\scr_loopnest\endcsname+\scr_corner);
+ \draw[draw=\scr_current_linedark](\csname toploopx\number\scr_loopnest\endcsname+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname,\csname toploopy\number\scr_loopnest\endcsname-\scr_corner)--++(0,-\csname scr_txtlooptotht\number\scr_loopnest\endcsname-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10+\scr_loopblockwidth-\scr_extraoffset_rtwo,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3+\scr_extraoffset,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3-\scr_linewidth+\scr_extraoffset_rtwo_mone,0)--++(-\scr_corner,-\scr_corner)--(\csname bottomifx\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomify\number\scr_loopnest\endcsname+\scr_corner);
\draw[draw=\scr_current_linelight](\csname bottomifx\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomify\number\scr_loopnest\endcsname+\scr_corner)--++(\scr_corner,-\scr_corner)
- \ifnum\csname scr_blockstopif_\number\scr_loopnest\endcsname=1
- --++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*2-\scr_loopblockwidth+\scr_linewidth,0)
- \else
- --++(\scr_corner*3+\scr_linewidth,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10-\scr_loopblockwidth,0)
- \fi
- --++(\scr_corner,-\scr_corner);
+ \ifnum\csname scr_blockstopif_\number\scr_loopnest\endcsname=1
+ --++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*2-\scr_loopblockwidth+\scr_linewidth,0)
+ \else
+ --++(\scr_corner*3+\scr_linewidth-\scr_extraoffset_rtwo,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3+\scr_extraoffset,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10-\scr_loopblockwidth+\scr_extraoffset_rtwo_mone,0)
+ \fi
+ --++(\scr_corner,-\scr_corner);
\edef\scr_tempname{\ifcat\relax\detokenize{#3}\relax bottomif\else bottomelse\fi}%
\draw[draw=\scr_current_linedark](\csname \scr_tempname x\number\scr_loopnest\endcsname+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname-\scr_loopblockwidth,\csname \scr_tempname y\number\scr_loopnest\endcsname-\scr_corner)--++(0,-\scr_loopblockheight-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)
- \ifnum#4=1 %infiniteloop
- --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*2,0)
- \else
- --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3,0)
- \fi
- ;% ligne Sud de la barre du bas
+ \ifnum#4=1 %infiniteloop
+ --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*2,0)
+ \else
+ --++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10,0)--++(-\scr_corner,-\scr_corner)--++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3,0)
+ \fi;% ligne Sud de la barre du bas
\node[at=(origin),draw=none,anchor=base west,xshift=\csname toploopx\number\scr_loopnest\endcsname+\scr_xsep,yshift=\csname toploopy\number\scr_loopnest\endcsname-\csname scr_txtloopht\number\scr_loopnest\endcsname-\scr_corner-\scr_ysepsup,text=\scr_current_textcolor](texte){\sffamily\bfseries#1\scr_blockstrut};
\ifcat\relax\detokenize{#3}\relax\else
\node[at=(origin),draw=none,anchor=base west,xshift=\csname toploopx\number\scr_loopnest\endcsname+\scr_xsep,yshift=\csname bottomify\number\scr_loopnest\endcsname-\scr_loopblockheight-\scr_corner,text=\scr_current_textcolor](texte){\sffamily\bfseries\useKV[\scrname]{else word}};
- \draw[draw=\scr_current_linedark](\csname bottomifx\number\scr_loopnest\endcsname+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname-\scr_loopblockwidth,\csname bottomify\number\scr_loopnest\endcsname-\scr_corner)--++(0,-\scr_loopblockheight-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10+\scr_loopblockwidth,0)--++(-\scr_corner,-\scr_corner)% ligne Est "\ + | + /"
- --++(-\scr_corner*3,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3-\scr_linewidth,0)--++(-\scr_corner,-\scr_corner)% ligne sud "/--\__/---------"
- --(\csname bottomelsex\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomelsey\number\scr_loopnest\endcsname+\scr_corner)
- ;
+ \draw[draw=\scr_current_linedark](\csname bottomifx\number\scr_loopnest\endcsname+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname-\scr_loopblockwidth,\csname bottomify\number\scr_loopnest\endcsname-\scr_corner)--++(0,-\scr_loopblockheight-\scr_ysepsup-\scr_ysepinf+\scr_corner)--++(-\scr_corner,-\scr_corner)--++(-\csname scr_txtloopwd\number\scr_loopnest\endcsname-2*\scr_xsep+\scr_corner*10+\scr_loopblockwidth-\scr_extraoffset_rtwo,0)--++(-\scr_corner,-\scr_corner)% ligne Est "\ + | + /"
+ --++(-\scr_corner*3+\scr_extraoffset,0)--++(-\scr_corner,\scr_corner)--++(-\scr_corner*3-\scr_linewidth+\scr_extraoffset_rtwo_mone,0)--++(-\scr_corner,-\scr_corner)% ligne sud "/--\__/---------"
+ --(\csname bottomelsex\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomelsey\number\scr_loopnest\endcsname+\scr_corner);
\draw[draw=\scr_current_linelight](\csname bottomelsex\number\scr_loopnest\endcsname-\scr_linewidth,\csname bottomelsey\number\scr_loopnest\endcsname+\scr_corner)--++(\scr_corner,-\scr_corner)% chanfrein "\" pour rejoindre haut de la ligne de fin
\ifnum\scr_blockstop=1
--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*2-\scr_loopblockwidth+\scr_linewidth,0)--++(\scr_corner,-\scr_corner);
\else
- --++(\scr_corner*3+\scr_linewidth,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10-\scr_loopblockwidth,0)--++(\scr_corner,-\scr_corner);
+ --++(\scr_corner*3+\scr_linewidth-\scr_extraoffset_rtwo,0)--++(\scr_corner,-\scr_corner)--++(\scr_corner*3+\scr_extraoffset,0)--++(\scr_corner,\scr_corner)--++(\csname scr_txtloopwd\number\scr_loopnest\endcsname+2*\scr_xsep-\scr_corner*10-\scr_loopblockwidth+\scr_extraoffset_rtwo_mone,0)--++(\scr_corner,-\scr_corner);
\fi
\fi
\ifnum#5=1 %fleche
\edef\scr_arrowcolor{\ifboolKV[\scrname]{print}{scr_flaggray}{scrcontrol}!80!black}%
- \draw[\scr_arrowcolor,line width=1.5pt,-{Triangle[length=1.25ex,width=1.5ex]},rounded corners=1pt](\scr_xoffset+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname-\scr_ex*3.5+1pt,\scr_yoffset+\scr_linewidth+\scr_ysepinf-1.25pt)--++(\scr_loopblockheight,0)--++(0,\scr_loopblockheight+\scr_corner*0.5);
+ \draw[\scr_arrowcolor,line width=1.5pt,-{Triangle[length=\scr_scale*1.25ex,width=\scr_scale*1.5ex]},rounded corners=1pt](\scr_xoffset+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname-\scr_ex*3.5+1pt,\scr_yoffset+\scr_linewidth+\scr_ysepinf-1.25pt)--++(\scr_loopblockheight,0)--++(0,\scr_loopblockheight+\scr_corner*0.5);
\edef\scr_arrowcolor{\ifboolKV[\scrname]{print}{scr_flaggray}{white}}%
- \draw[\scr_arrowcolor,line width=1.5pt,-{Triangle[length=1.25ex,width=1.5ex]},rounded corners=1pt](\scr_xoffset+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname-\scr_ex*3.5,\scr_yoffset+\scr_linewidth+\scr_ysepinf)--++(\scr_loopblockheight,0)--++(0,\scr_loopblockheight+\scr_corner*0.5);
+ \draw[\scr_arrowcolor,line width=\scr_scale*1.5pt,-{Triangle[length=\scr_scale*1.25ex,width=\scr_scale*1.5ex]},rounded corners=1pt](\scr_xoffset+\scr_xsep*2+\csname scr_txtloopwd\number\scr_loopnest\endcsname-\scr_ex*3.5,\scr_yoffset+\scr_linewidth+\scr_ysepinf)--++(\scr_loopblockheight,0)--++(0,\scr_loopblockheight+\scr_corner*0.5);
\fi
\xdef\scr_blockstop{\ifnum#4=1 1\else0\fi}%
}
@@ -344,8 +347,8 @@
\edef\scr_current_linedark {\ifboolKV[\scrname]{print}{scr_linegray}{\scr_current_blockcolor}!\the\numexpr100-\useKV[\scrname]{contrast}\relax!black}%
\edef\scr_current_textcolor{\ifboolKV[\scrname]{print}{\useKV[\scrname]{text color}}{white}}%
\node[rectangle,draw=none,inner xsep=0.2em,fill=\scr_current_fillcolor,text=\scr_current_textcolor](textmenu){\normalfont\sffamily#1\scr_ovalstrut\hskip.6666em \scr_menuselectarrow};
- \draw[draw=\scr_current_linedark,line width=\scr_linewidth](textmenu.south west)--(textmenu.north west)--(textmenu.north east);
- \draw[draw=\scr_current_linelight,line width=\scr_linewidth](textmenu.south west)--(textmenu.south east)--(textmenu.north east);
+ \draw[draw=\scr_current_linedark,line width=\scr_linewidth\ifdefined\scr_scale/\scr_scale\fi](textmenu.south west)--(textmenu.north west)--(textmenu.north east);
+ \draw[draw=\scr_current_linelight,line width=\scr_linewidth\ifdefined\scr_scale/\scr_scale\fi](textmenu.south west)--(textmenu.south east)--(textmenu.north east);
\end{tikzpicture}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -361,7 +364,7 @@
\edef\scr_current_linedark {\ifboolKV[\scrname]{print}{scr_linegray}{\scr_current_blockcolor}!\the\numexpr100-\useKV[\scrname]{contrast}\relax!black}%
\edef\scr_current_textcolor{\ifboolKV[\scrname]{print}{\useKV[\scrname]{text color}}{white}}%
\edef\scr_boolsep{\useKV[\scrname]{bool sep}}%
- \begin{tikzpicture}[inner sep=0pt,outer sep=0pt,minimum size=0pt,baseline=(x.base),line width=\scr_linewidth/2]
+ \begin{tikzpicture}[inner sep=0pt,outer sep=0pt,minimum size=0pt,baseline=(x.base),line width=0.75*\scr_linewidth]
\node(tmp){%
\setbox\scr_box\hbox{\sffamily\bfseries\scr_ovalstrut\kern\scr_thesentinelkern sp #2\xdef\scr_endkern{\number\lastkern}}%
\xdef\scr_totheight{\the\dimexpr\ht\scr_box+\dp\scr_box\relax}%
@@ -371,9 +374,9 @@
\draw[draw=none,use as bounding box](\ifnum\scr_previouskern=\scr_thesentinelkern\space -\scr_boolsep\else -\scr_totheight/2\fi,-\scr_boolsep)rectangle(\scr_retainedwd+\scr_totheight/2,\scr_totheight+\scr_boolsep);%
\draw[fill=\scr_current_fillcolor,draw=none](\scr_boolsep,-\scr_boolsep)--++(\scr_retainedwd-\scr_boolsep*2,0)--++(\scr_totheight/2+\scr_boolsep,\scr_totheight/2+\scr_boolsep)--++(-\scr_totheight/2-\scr_boolsep,\scr_totheight/2+\scr_boolsep)--++(-\scr_retainedwd+\scr_boolsep*2,0)--++(-\scr_totheight/2-\scr_boolsep,-\scr_totheight/2-\scr_boolsep)--cycle;%
\draw[\scr_current_linedark](\scr_retainedwd+\scr_totheight/2,\scr_totheight/2)--(\scr_retainedwd-\scr_boolsep,-\scr_boolsep)--(\scr_boolsep,-\scr_boolsep)
- \ifboolKV[\scrname]{print}{--(-\scr_totheight/2,\scr_totheight/2)}{};
+ \ifboolKV[\scrname]{print}{--(-\scr_totheight/2,\scr_totheight/2)}{};
\draw[\scr_current_linelight](-\scr_totheight/2,\scr_totheight/2)--(\scr_boolsep,\scr_boolsep+\scr_totheight)--(\scr_retainedwd-\scr_boolsep,\scr_boolsep+\scr_totheight)
- \ifboolKV[\scrname]{print}{--(\scr_retainedwd+\scr_totheight/2,\scr_totheight/2)}{};
+ \ifboolKV[\scrname]{print}{--(\scr_retainedwd+\scr_totheight/2,\scr_totheight/2)}{};
\node[inner sep=0pt,outer sep=0pt,minimum size=0pt,draw=none,anchor=south west,text=\scr_current_textcolor](x){\sffamily\bfseries\scr_ovalstrut\kern\scr_thesentinelkern sp #2};%
\end{tikzpicture}%
\endgroup
@@ -384,14 +387,17 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{scratch}[1][]
{\skv_ifempty{#1}{}{\setscratch{#1}}%
- \normalfont
+ \sffamily\normalsize
\edef\scr_ex{\the\dimexpr1ex\relax}% valeur d'1ex pour le tracé de la flèche
\edef\scr_corner{\the\dimexpr\useKV[\scrname]{corner}\relax}%
- \edef\scr_currentscale{\useKV[\scrname]{scale}}%
+ \edef\scr_scale{\useKV[\scrname]{scale}}% échelle
\edef\scr_xsep{\the\dimexpr\useKV[\scrname]{x sep}\relax}%
\edef\scr_ysepsup{\the\dimexpr\useKV[\scrname]{y sepsup}\relax}%
\edef\scr_ysepinf{\the\dimexpr\useKV[\scrname]{y sepinf}\relax}%
- \edef\scr_linewidth{\the\dimexpr\useKV[\scrname]{line width}\relax}%
+ \edef\scr_linewidth{\the\dimexpr\scr_scale\dimexpr\useKV[\scrname]{line width}\relax\relax}% épaisseur des lignes soumises à l'échelle
+ \edef\scr_extraoffset{\the\dimexpr\scr_linewidth-\useKV[\scrname]{line width}\relax}% décalage supplémentaire pour tenir compte de l'échelle = (ech-1)*linewidth
+ \edef\scr_extraoffset_rtwo{\the\dimexpr1.41421\dimexpr\scr_extraoffset\relax\relax}% décalage * racine 2
+ \edef\scr_extraoffset_rtwo_mone{\the\dimexpr.41421\dimexpr\scr_extraoffset\relax\relax}% décalage * (racine 2 -1)
\edef\scr_loopblockwidth{\the\dimexpr\useKV[\scrname]{loop width}\relax}%
\edef\scr_loopblockheight{\the\dimexpr\useKV[\scrname]{loop height}\relax}%
\edef\scr_initarcangle{\useKV[\scrname]{init arcangle}}%
@@ -400,16 +406,28 @@
\edef\scr_moreblockarcangle{\useKV[\scrname]{moreblock arcangle}}%
\setbox\scr_box\hbox{\scr_blockstrut}\edef\scr_blockstruttotht{\the\dimexpr\ht\scr_box+\dp\scr_box\relax}% haut totale du strut
\def\turnleft{\turn_arrow{}}\def\turnright{\turn_arrow{xscale=-1}}%
- \let\blockmove\scr_blockmove\let\blocklook\scr_blocklook\let\blocksound\scr_blocksound
- \let\blockpen\scr_blockpen\let\blockvariable\scr_blockvariable\let\blocklist\scr_blocklist
- \let\blockevent\scr_blockevent\let\blockinit\scr_blockinit
- \let\blockrepeat\scr_blockrepeat\let\blockinfloop\scr_blockinfloop
- \let\blockifelse\scr_blockifelse\let\blockif\scr_blockif
- \let\blockinitclone\scr_blockinitclone\let\blockcontrol\scr_blockcontrol
- \let\blocksensing\scr_blocksensing\let\blockmoreblocks\scr_blockmoreblocks
+ \let\blockmove\scr_blockmove
+ \let\blocklook\scr_blocklook
+ \let\blocksound\scr_blocksound
+ \let\blocklist\scr_blocklist
+ \let\blockpen\scr_blockpen
+ \let\blockvariable\scr_blockvariable
+ \let\blockevent\scr_blockevent
+ \let\blockinit\scr_blockinit
+ \let\blockrepeat\scr_blockrepeat
+ \let\blockinfloop\scr_blockinfloop
+ \let\blockifelse\scr_blockifelse
+ \let\blockif\scr_blockif
+ \let\blockinitclone\scr_blockinitclone
+ \let\blockcontrol\scr_blockcontrol
+ \let\blocksensing\scr_blocksensing
+ \let\blockmoreblocks\scr_blockmoreblocks
+ \scr_xoffset0pt
+ \scr_yoffset0pt
\catcode`\:12 \catcode`\;12 \catcode`\!12 \catcode`\?12 \catcode`\_12
- \begin{tikzpicture}[line width=\scr_linewidth,inner sep=0pt,outer sep=0pt,minimum size=0pt,line cap=round,scale=\scr_currentscale,every node/.style={scale=\scr_currentscale}]
- \node[shape=coordinate](origin){};% origine
+ \begin{tikzpicture}[transform shape,line width=\scr_linewidth,inner sep=0pt,outer sep=0pt,minimum size=0pt,line cap=round,scale=\scr_scale]
+% \begin{tikzpicture}[line width=\scr_linewidth,inner sep=0pt,outer sep=0pt,minimum size=0pt,line cap=round,scale=\scr_scale,every node/.style={scale=\scr_scale}]
+ \node[shape=coordinate](origin){};% origine
}
{\end{tikzpicture}}
@@ -555,4 +573,6 @@ Versions :
|---------+------------+------------------------------------------------------|
| 0.32 | 20/09/2017 | - le node de \selectmenu est désormais "rectangle" |
| | | - la couleur de \ovallist est désormais correcte |
+|---------+------------+------------------------------------------------------|
+| 0.33 | 30/12/2017 | - correction des bugs d'échelle avec l'option scale. |
|---------+------------+------------------------------------------------------| \ No newline at end of file