Debian Codegraph @

texmf-dist/tex/xelatex/na-position/na-position.sty

raw
1 % na-position.sty encodage : UTF8
2 % Created By : Naam Mohamed & Salim Bou and distributed under the LPPL license.
3 % من إنشاء الأستاذين ناعم محمد و سليم بو
4 %edited by : Walid LAOUIDJI
5 %gmail: [email protected]
6 \NeedsTeXFormat{LaTeX2e}
7 \ProvidesPackage{na-position}[2020/06/14 version1.2]
8 %%%%%%%%%%%%%%%
9 \RequirePackage{tkz-tab}
10 \def\Nplot{\left(C_f\right)}
11 \def\Nline{\left(\Delta\right)}
12 \def\plot{f}
13 \def\line{y}
14 \tikzset{pos style/.style = {
15 draw = \tkzTabDefaultWritingColor}}
16 %<------------------------------------------>
17 \newcommand*{\tkzTabPos}[2][]{%
18 \makeatletter
19 \setkeys[TAB]{TL}{#1}%
20 \setcounter{tkz@cnt@lg}{\thetkz@cnt@line}%
21 \stepcounter{tkz@cnt@line}%
22 \setcounter{tkz@cnt@lgnext}{\thetkz@cnt@line}%
23 \setcounter{tkz@cnt@cl}{1}%
24 \setcounter{tkz@cnt@pair}{1}%
25 \setcounter{tkz@cnt@impair}{1}%
26 \foreach \x/\tl in {#2}{
27 \ifthenelse{\isodd{\value{tkz@cnt@cl}}}{
28 \path (N\thetkz@cnt@impair\thetkz@cnt@lg) --coordinate[midway](Z\thetkz@cnt@impair\thetkz@cnt@lg)(N\thetkz@cnt@impair\thetkz@cnt@lgnext);
29 \ifthenelse{\equal{\expandafter\stripspaces\expandafter{\x}}{z}}{
30 \draw[line width =\cmdTAB@tbs@lw, pos style ]
31 ([xshift=-01cm]N\thetkz@cnt@impair\thetkz@cnt@lgnext)..controls+(90:0.5)and+(230:1)..(N\thetkz@cnt@impair\thetkz@cnt@lg);
32 \draw[line width =\cmdTAB@tbs@lw,pos style ]([xshift=01cm]N\thetkz@cnt@impair\thetkz@cnt@lgnext)..controls+(90:0.5)and+(310:1)..
33 (N\thetkz@cnt@impair\thetkz@cnt@lg);
34 \node[anchor=base,font=\scriptsize](pn)at([yshift=-0.2cm]Z\thetkz@cnt@impair\thetkz@cnt@lg){
35 \tabular{c}
36 $\Nplot$
37 \\
38 يقطع
39 $\Nline$
40 \\
41 في النقطة
42 \\
43 { \tiny
44 \ifTAB@VA@help\else\tl\fi}
45 \endtabular
46 } ;
47 }{%
48 \ifthenelse{\equal{\expandafter\stripspaces\expandafter{\x}}{}}{}{
49 %
50 \ifthenelse{\equal{\expandafter\stripspaces\expandafter{\x}}{t}}
51 {
52 \draw[line width = \cmdTAB@tbs@lw,t style]
53 (N\thetkz@cnt@impair\thetkz@cnt@lg) -- %
54 (N\thetkz@cnt@impair\thetkz@cnt@lgnext);
55 }{
56 %
57 \ifthenelse{\equal{\expandafter\stripspaces\expandafter{\x}}{d}}
58 {
59 \draw[line width =\cmdTAB@tbs@lw,double style]%
60 ([yshift = -\cmdTAB@tbs@lw/2] N\thetkz@cnt@impair\thetkz@cnt@lg)--%
61 ([yshift = \cmdTAB@tbs@lw/2] N\thetkz@cnt@impair\thetkz@cnt@lgnext);
62 }{
63 \path (N\thetkz@cnt@impair\thetkz@cnt@lg)--
64 (N\thetkz@cnt@impair\thetkz@cnt@lgnext);
65 \node at (Z\thetkz@cnt@impair\thetkz@cnt@lg){$\x$};
66 }
67 }
68 }
69 }
70 %
71 \stepcounter{tkz@cnt@impair}%
72 }{%
73 \path(M\thetkz@cnt@pair\thetkz@cnt@lg)--%
74 coordinate[midway](S\thetkz@cnt@pair\thetkz@cnt@lg)%
75 (M\thetkz@cnt@pair\thetkz@cnt@lgnext);%
76 %%%%%%
77 \ifthenelse{\equal{\expandafter\stripspaces\expandafter{\x}}{h}}{
78 %
79 \setcounter{tkz@cnt@clnext}{\thetkz@cnt@pair}%
80 \stepcounter{tkz@cnt@clnext}%
81 \pgfmathparse{\cmdTAB@TTS@doubledistance/2+\cmdTAB@tbs@lw}
82 \global\let\tkz@deltax\pgfmathresult
83 \fill[h style]([xshift=\tkz@deltax,yshift=-\cmdTAB@tbs@lw/2]%
84 N\thetkz@cnt@pair\thetkz@cnt@lg)
85 rectangle%
86 ([xshift=-\tkz@deltax,yshift=\cmdTAB@tbs@lw/2]%
87 N\thetkz@cnt@clnext\thetkz@cnt@lgnext);
88 }{%
89 \ifthenelse{\equal{\expandafter\stripspaces\expandafter{\x}}{+}}
90 {
91 \node[inner sep=0pt,, text width=5em, minimum height = 5em, align = center,font=\scriptsize] at ([yshift=10pt]S\thetkz@cnt@pair\thetkz@cnt@lg) {
92 \vbox to 3em{\vfill
93 $\Nplot$ \\
94 {فوق}
95 \\
96 $\Nline$}};
97 }
98 { \ifthenelse{\equal{\expandafter\stripspaces\expandafter{\x}}{-}}
99 {\node[inner sep=0pt,, text width=5em, minimum height = 5em, align = center,font=\scriptsize] at ([yshift=10pt]S\thetkz@cnt@pair\thetkz@cnt@lg) {
100 \vbox to 3em{\vfill
101 $\Nplot$ \\
102 {تحت}
103 \\ $\Nline$}};}{
104 \node at (S\thetkz@cnt@pair\thetkz@cnt@lg) {$\x$};
105 }}}%%%%%%%%%%%%%%%%%%%%%
106 \stepcounter{tkz@cnt@pair}%
107 }%
108 \stepcounter{tkz@cnt@cl}%
109 }
110 }
111 %
112 %<-------------------------------The End ------------------------------------>
113 \endinput