Debian Codegraph @

texmf-dist/doc/latex/pmdraw/examples/example-20.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=MIGEAkApZNAvIXQjbwoh6EWAhz728WwPMnHg/w0+ddfeXNzRY/c4gp83XiAj5krJO30cbhXh3JfXxBR10WBwBtW9NyuVAkBROE7UgLrt3sdO77fFc/WajieFF3XchDzDahDSuKffuZ+8CmHdFmuZv5p5Ne5OwIa3ABluoKZ7XCWyDZeIC7Fl
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[typeI] (0.6, 2.4) -- (1.4, 2.4) -- (1.4, 0.7) -- (3.4, 0.7) -- (3.4, -3.4) -- (2.6, -3.4) -- (2.6, -1.7) -- (0.6, -1.7) -- cycle;
88 \draw[typeT] (1.6, 1.3) rectangle (3.4, 2.4);
89 \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
90 }
91 ]{ % Added edges
92 {1}{3}
93 }{ % Top Diagram
94 { % Brick 1
95 [ % Options
96 degree=3
97 ]{ % Upper non transversal edges
98 {2}{3}
99 }{ % Lower non transversal edges
100 {2}{3}
101 }{ % Transversal edges
102 {1}{1}
103 }
104 }
105 }{ % Bottom Diagram
106 { % Brick 1
107 [ % Options
108 degree=3
109 ]{ % Upper non transversal edges
110 {1}{2}
111 }{ % Lower non transversal edges
112 {1}{2}
113 }{ % Transversal edges
114 {3}{3}
115 }
116 }
117 }
118 \hspace{5em}
119 \pmdProduct[ % Options
120 decorate before={
121 \blockStyles
122 \draw[typeI] (0.6, 2.4) -- (1.4, 2.4) -- (1.4, 0.7) -- (10.4, 0.7) -- (10.4, -3.4) -- (9.6, -3.4) -- (9.6, -1.7) -- (0.6, -1.7) -- cycle;
123 \foreach \x in {0,2,7} {
124 \begin{scope}[shift={(\x,0)}]
125 \draw[typeT] (1.6, 1.3) rectangle (3.4, 2.4);
126 \end{scope}
127 }
128 \foreach \x in {0,2,4,7} {
129 \begin{scope}[shift={(\x,0)}]
130 \draw[typeB] (0.6, -3.4) rectangle (2.4, -2.3);
131 \end{scope}
132 }
133 }
134 ]{ % Added edges
135 {1}{5}
136 {9}{10}
137 }{ % Top Diagram
138 { % Brick 1
139 [ % Options
140 degree=5
141 ]{ % Upper non transversal edges
142 {2}{3}
143 {4}{5}
144 }{ % Lower non transversal edges
145 {2}{3}
146 {4}{5}
147 }{ % Transversal edges
148 {1}{1}
149 }
150 }{ % Brick 2
151 [ % Options
152 blank top=2,
153 degree top=2,
154 blank bottom=2,
155 degree bottom=2
156 ]{ % Upper non transversal edges
157 {3}{4}
158 }{ % Lower non transversal edges
159 {3}{4}
160 }{ % Transversal edges
161 \pmdEmpty
162 }
163 }
164 }{ % Bottom Diagram
165 { % Brick 1
166 [ % Options
167 degree=6
168 ]{ % Upper non transversal edges
169 {1}{2}
170 {3}{4}
171 {5}{6}
172 }{ % Lower non transversal edges
173 {1}{2}
174 {3}{4}
175 {5}{6}
176 }{ % Transversal edges
177 \pmdEmpty
178 }
179 }{ % Brick 2
180 [ % Options
181 degree=3
182 ]{ % Upper non transversal edges
183 {1}{2}
184 }{ % Lower non transversal edges
185 {1}{2}
186 }{ % Transversal edges
187 {3}{3}
188 }
189 }
190 }