Debian Codegraph @

texmf-dist/doc/latex/pmdraw/examples/example-23.tex

raw
1 %!TEX root = ../pmdraw.tex
2
3 % *------------------------------*
4 % |``````````````````````````````|
5 % |`````____````____`````````````|
6 % |````|MFMF\ /MFMF|````````````|
7 % |````|MF|MF\/MF|MF|````````````|
8 % |````|MF|\MFMF/|MF|_______`````|
9 % |````|MF|``````|MFMFMFMFMF|````|
10 % |````|MF|``````|MF|````````````|
11 % |````|MF|``````|MF|___`````````|
12 % |``````````````|MFMFMF|````````|
13 % |``````````````|MF|````````````|
14 % |``````````````|MF|````````````|
15 % |``````````````|MF|````````````|
16 % |``````````````````````````````|
17 % *------------------------------*
18
19 % *=-=-=-=-=-=*
20 % signature=MIGFAkEAmmv391yKauIFaeK+QiFHOgiYICstOfBGQL4yppbaT7bj+W+ukERVW6y8lltLZXDwAv4wQPkrkiEynseqaGvj1gJAIi9ghgzQWyPxcSjq00ZlRYkLx/MBGpEwc0tHEQY0o3DPj3AnSCtWoEzgkKIp9aCe1znOxjnhGvDWDIv3ySWKqA==
21 % version=2.0
22 % *=-=-=-=-=-=*
23
24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 % %
26 % Licence %
27 % %
28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29 %
30 % Copyright 2023-10-16 (original release) -- 2026thias Fresacher
31 %
32 % This work may be distributed and/or modified under the
33 % conditions of the LaTeX Project Public License, either version 1.3
34 % of this license or (at your option) any later version.
35 % The latest version of this license is found via
36 % http://www.latex-project.org/lppl.txt.
37
38 \usetikzlibrary{patterns}
39
40 \newcommand{\blockStyles}{
41 \tikzstyle{typeI} = [
42 very thick,
43 rounded corners=5pt,
44 red,
45 preaction={fill, red!3}
46 ]
47 \tikzstyle{typeT} = [
48 very thick,
49 rounded corners=5pt,
50 dash pattern={on 7.5pt off 2.5pt},
51 green,
52 preaction={fill, green!3}
53 ]
54 \tikzstyle{typeB} = [
55 very thick,
56 rounded corners=5pt,
57 dash pattern={on 2.5pt off 2.5pt},
58 blue,
59 preaction={fill, blue!3}
60 ]
61 \tikzstyle{typeO} = [
62 very thick,
63 rounded corners=5pt,
64 dash pattern={on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
65 orange,
66 preaction={fill, orange!3}
67 ]
68 \tikzstyle{typeU} = [
69 very thick,
70 rounded corners=5pt,
71 dash pattern={on 2.5pt off 2.5pt on 2.5pt off 2.5pt on 7.5pt off 2.5pt},
72 violet,
73 preaction={fill, violet!3}
74 ]
75 \tikzstyle{typeN} = [
76 very thick,
77 rounded corners=5pt,
78 dash pattern={on 7.5pt off 2.5pt on 7.5pt off 2.5pt on 2.5pt off 2.5pt},
79 yellow,
80 preaction={fill, yellow!3}
81 ]
82 }
83
84 \pmdProduct[ % Options
85 decorate before={
86 \blockStyles
87 \draw[typeN] (0.6, -3.4) -- (1.4, -3.4) -- (1.4, -1.7) -- (3.6, -1.7) -- (3.6, -3.4) -- (4.4, -3.4) -- (4.4, 0.7) -- (0.6, 0.7) -- cycle;
88 \draw[typeB] (1.6, -3.4) rectangle (3.4, -2.3);
89 \foreach \x in {0,2} {
90 \begin{scope}[shift={(\x,0)}]
91 \draw[typeT] (0.6, 1.3) rectangle (2.4, 2.4);
92 \end{scope}
93 }
94 }
95 ]{ % Added edges
96 {1}{4}
97 }{ % Top Diagram
98 { % Brick 1
99 [ % Options
100 degree=4
101 ]{ % Upper non transversal edges
102 {1}{2}
103 {3}{4}
104 }{ % Lower non transversal edges
105 {1}{2}
106 {3}{4}
107 }{ % Transversal edges
108 \pmdEmpty
109 }
110 }
111 }{ % Bottom Diagram
112 { % Brick 1
113 [ % Options
114 degree=4
115 ]{ % Upper non transversal edges
116 {2}{3}
117 }{ % Lower non transversal edges
118 {2}{3}
119 }{ % Transversal edges
120 {1}{1}
121 {4}{4}
122 }
123 }
124 }
125 \hspace{5em}
126 \pmdProduct[ % Options
127 decorate before={
128 \blockStyles
129 \draw[typeN] (0.6, -3.4) -- (1.4, -3.4) -- (1.4, -1.7) -- (10.6, -1.7) -- (10.6, -3.4) -- (11.4, -3.4) -- (11.4, 0.7) -- (0.6, 0.7) -- cycle;
130 \foreach \x in {0,2,4,7,9} {
131 \begin{scope}[shift={(\x,0)}]
132 \draw[typeT] (0.6, 1.3) rectangle (2.4, 2.4);
133 \end{scope}
134 }
135 \foreach \x in {1,3,8} {
136 \begin{scope}[shift={(\x,0)}]
137 \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
138 \end{scope}
139 }
140 }
141 ]{ % Added edges
142 {1}{5}
143 {9}{11}
144 }{ % Top Diagram
145 { % Brick 1
146 [ % Options
147 degree=6
148 ]{ % Upper non transversal edges
149 {1}{2}
150 {3}{4}
151 {5}{6}
152 }{ % Lower non transversal edges
153 {1}{2}
154 {3}{4}
155 {5}{6}
156 }{ % Transversal edges
157 \pmdEmpty
158 }
159 }{ % Brick 2
160 [ % Options
161 degree=4
162 ]{ % Upper non transversal edges
163 {1}{2}
164 {3}{4}
165 }{ % Lower non transversal edges
166 {1}{2}
167 {3}{4}
168 }{ % Transversal edges
169 \pmdEmpty
170 }
171 }
172 }{ % Bottom Diagram
173 { % Brick 1
174 [ % Options
175 degree=5
176 ]{ % Upper non transversal edges
177 {2}{3}
178 {4}{5}
179 }{ % Lower non transversal edges
180 {2}{3}
181 {4}{5}
182 }{ % Transversal edges
183 {1}{1}
184 }
185 }{ % Brick 2
186 [ % Options
187 blank top=2,
188 blank bottom=2,
189 degree=3
190 ]{ % Upper non transversal edges
191 {3}{4}
192 }{ % Lower non transversal edges
193 {3}{4}
194 }{ % Transversal edges
195 {5}{5}
196 }
197 }
198 }