File notes/Makefile changed (mode: 100644) (index 47a6b36..1f1f3c6) |
|
1 |
|
######################### |
|
2 |
|
# Tutorials on Makefile # |
|
3 |
|
######################### |
|
4 |
|
|
1 |
5 |
# http://www.gnu.org/software/make/manual/make.html |
# http://www.gnu.org/software/make/manual/make.html |
2 |
6 |
# http://nuclear.mutantstargoat.com/articles/make/ |
# http://nuclear.mutantstargoat.com/articles/make/ |
3 |
7 |
|
|
4 |
|
|
|
5 |
|
# Makefile global options. |
|
|
8 |
|
########################### |
|
9 |
|
# Makefile global options # |
|
10 |
|
########################### |
6 |
11 |
|
|
7 |
12 |
MAKEFLAGS:= -j |
MAKEFLAGS:= -j |
8 |
13 |
# Maximize parallel execution whenever possible |
# Maximize parallel execution whenever possible |
9 |
14 |
OPTIONSPANDOC:= --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code --top-level-division=chapter -M date="$$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" |
OPTIONSPANDOC:= --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code --top-level-division=chapter -M date="$$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" |
10 |
15 |
# Options common to all invokations of pandoc. Cf https://pandoc.org/MANUAL.html to understand them. |
# Options common to all invokations of pandoc. Cf https://pandoc.org/MANUAL.html to understand them. |
11 |
16 |
.DEFAULT_GOAL:= all |
.DEFAULT_GOAL:= all |
|
17 |
|
# By default, we construct all the files. |
12 |
18 |
FIG_FOLDER = fig/*/ |
FIG_FOLDER = fig/*/ |
13 |
19 |
# Folder where source code for figures are present. |
# Folder where source code for figures are present. |
14 |
20 |
FIG_SOURCE = $(FIG_FOLDER)*.tex |
FIG_SOURCE = $(FIG_FOLDER)*.tex |
|
... |
... |
FIG_SOURCE = $(FIG_FOLDER)*.tex |
16 |
22 |
FIG_PDF = $(FIG_FOLDER)*.pdf |
FIG_PDF = $(FIG_FOLDER)*.pdf |
17 |
23 |
# Figures in pdf format |
# Figures in pdf format |
18 |
24 |
|
|
|
25 |
|
######### |
|
26 |
|
# Rules # |
|
27 |
|
######### |
|
28 |
|
|
19 |
29 |
# "Phony" rule to compile the figures into pdf using latexmk |
# "Phony" rule to compile the figures into pdf using latexmk |
20 |
30 |
# This must be run before compiling the pdf. |
# This must be run before compiling the pdf. |
21 |
31 |
|
|
|
... |
... |
$(FIG_SOURCE): |
30 |
40 |
|
|
31 |
41 |
.PHONY: fig_svg $(FIG_PDF) |
.PHONY: fig_svg $(FIG_PDF) |
32 |
42 |
fig_svg: $(FIG_PDF) |
fig_svg: $(FIG_PDF) |
33 |
|
$(FIG_PDF): | $(FIG_SOURCE) |
|
|
43 |
|
$(FIG_PDF): $(FIG_SOURCE) |
34 |
44 |
# $(FIG_SOURCE) is an "order-only" pre-requisite. Cf. http://www.gnu.org/software/make/manual/make.html#Types-of-Prerequisites |
# $(FIG_SOURCE) is an "order-only" pre-requisite. Cf. http://www.gnu.org/software/make/manual/make.html#Types-of-Prerequisites |
35 |
45 |
# This means that we force fig to be executed before executing fig_svg |
# This means that we force fig to be executed before executing fig_svg |
36 |
46 |
pdf2svg $@ $(addsuffix .svg,$(basename $@)) |
pdf2svg $@ $(addsuffix .svg,$(basename $@)) |
|
... |
... |
clean: |
89 |
99 |
rm -f lectures_notes.pdf lectures_notes.odt lectures_notes.html |
rm -f lectures_notes.pdf lectures_notes.odt lectures_notes.html |
90 |
100 |
rm -f temp.html temp.pdf temp.odt |
rm -f temp.html temp.pdf temp.odt |
91 |
101 |
rm -f ../README.html |
rm -f ../README.html |
92 |
|
find fig/*/ -type f -not -name '*.tex' -and -not -name '*.def' -delete |
|
|
102 |
|
find fig/*/ -type f -not -name '*.tex' -and -not -name '*.def' -and -not -name '*.sty' -delete |
93 |
103 |
# Every file that does not have the extension .tex or the extension .def is removed from all the folders in fig. |
# Every file that does not have the extension .tex or the extension .def is removed from all the folders in fig. |
94 |
104 |
|
|
95 |
105 |
# "Phony" rule to indent properly the latex files |
# "Phony" rule to indent properly the latex files |
|
... |
... |
clean: |
97 |
107 |
#clean_latex: $(FIG_SOURCE) |
#clean_latex: $(FIG_SOURCE) |
98 |
108 |
#$(FIG_SOURCE): |
#$(FIG_SOURCE): |
99 |
109 |
# latexindent -w -s $@ |
# latexindent -w -s $@ |
|
110 |
|
# git clean -ni |
File notes/fig/fd/tikz-dependency.sty changed (mode: 100644) (index b7f5087..937183a) |
54 |
54 |
edge horizontal padding/.code = {\pgfmathsetlengthmacro{\dt@linkoffset}{#1}}, |
edge horizontal padding/.code = {\pgfmathsetlengthmacro{\dt@linkoffset}{#1}}, |
55 |
55 |
edge horizontal padding = 4pt, |
edge horizontal padding = 4pt, |
56 |
56 |
% vertical offset of the edge style from the word |
% vertical offset of the edge style from the word |
57 |
|
edge vertical padding/.code = {\pgfmathsetlengthmacro{\dt@linkdist}{#1}}, |
|
|
57 |
|
edge vertical padding/.code = {\pgfmathsetlengthmacro{\dt@linkdist}{#1}}, |
58 |
58 |
edge vertical padding = 0ex, |
edge vertical padding = 0ex, |
59 |
59 |
% should links be placed above or below the sentence |
% should links be placed above or below the sentence |
60 |
60 |
edge below/.is if = dt@linkbelow, |
edge below/.is if = dt@linkbelow, |
|
65 |
65 |
segmented edge/.code = {\dt@arcedgefalse}, |
segmented edge/.code = {\dt@arcedgefalse}, |
66 |
66 |
arc angle/.store in = \dt@arcangle, |
arc angle/.store in = \dt@arcangle, |
67 |
67 |
arc angle = 60, |
arc angle = 60, |
68 |
|
% an explicit offset to compensate the y position of the edge |
|
69 |
|
edge start y offset/.code = {\pgfmathsetlengthmacro{\dt@EdgeStartOffsetY}{#1}}, |
|
70 |
|
edge start y offset = 0, |
|
|
68 |
|
% an explicit offset to compensate the y position of the edge |
|
69 |
|
edge start y offset/.code = {\pgfmathsetlengthmacro{\dt@EdgeStartOffsetY}{#1}}, |
|
70 |
|
edge start y offset = 0, |
71 |
71 |
% an explicit offset to compensate the x position of the edge |
% an explicit offset to compensate the x position of the edge |
72 |
72 |
edge start x offset/.code = {\pgfmathsetlengthmacro{\dt@EdgeStartOffsetX}{#1}}, |
edge start x offset/.code = {\pgfmathsetlengthmacro{\dt@EdgeStartOffsetX}{#1}}, |
73 |
73 |
edge start x offset = 0, |
edge start x offset = 0, |
|
83 |
83 |
reserved/edge style/.style = {->, >=stealth, black, solid, rounded corners = 2, line cap = round, segmented edge}, |
reserved/edge style/.style = {->, >=stealth, black, solid, rounded corners = 2, line cap = round, segmented edge}, |
84 |
84 |
edge style/.style = {reserved/edge style/.append style = {#1}}, |
edge style/.style = {reserved/edge style/.append style = {#1}}, |
85 |
85 |
reserved/label style/.style = { |
reserved/label style/.style = { |
86 |
|
anchor = mid, |
|
87 |
|
draw, solid, |
|
88 |
|
black, |
|
89 |
|
scale = .7, |
|
90 |
|
text height = 1.5ex, text depth = 0.25ex, % needed to center text vertically |
|
91 |
|
inner sep=.5ex, |
|
92 |
|
outer sep = 0pt, |
|
93 |
|
rounded corners = 2pt, |
|
94 |
|
text = black, |
|
95 |
|
fill = white}, |
|
|
86 |
|
anchor = mid, |
|
87 |
|
draw, solid, |
|
88 |
|
black, |
|
89 |
|
scale = .7, |
|
90 |
|
text height = 1.5ex, text depth = 0.25ex, % needed to center text vertically |
|
91 |
|
inner sep=.5ex, |
|
92 |
|
outer sep = 0pt, |
|
93 |
|
rounded corners = 2pt, |
|
94 |
|
text = black, |
|
95 |
|
fill = white}, |
96 |
96 |
label style/.style = {reserved/label style/.append style = {#1}}, |
label style/.style = {reserved/label style/.append style = {#1}}, |
97 |
97 |
hide label/.style = {reserved/label style/.append style = {opacity = 0, text opacity = 0}}, |
hide label/.style = {reserved/label style/.append style = {opacity = 0, text opacity = 0}}, |
98 |
98 |
show label/.style = {reserved/label style/.append style = {opacity = 1, text opacity = 1}}, |
show label/.style = {reserved/label style/.append style = {opacity = 1, text opacity = 1}}, |
99 |
99 |
text only label/.style = {reserved/label style/.append style = {opacity=0, text opacity=1}}, |
text only label/.style = {reserved/label style/.append style = {opacity=0, text opacity=1}}, |
100 |
100 |
reserved/text style/.style = { |
reserved/text style/.style = { |
101 |
|
text height=1.5ex, text depth = 0.25ex, % needed to center text vertically |
|
102 |
|
inner sep = .5ex}, |
|
|
101 |
|
text height=1.5ex, text depth = 0.25ex, % needed to center text vertically |
|
102 |
|
inner sep = .5ex}, |
103 |
103 |
text style/.style = {reserved/text style/.append style = {#1}}, |
text style/.style = {reserved/text style/.append style = {#1}}, |
104 |
104 |
% group styling |
% group styling |
105 |
105 |
reserved/group style/.style = { |
reserved/group style/.style = { |
106 |
|
inner sep = 0, |
|
107 |
|
draw, solid, |
|
108 |
|
outer sep = .5ex, |
|
109 |
|
rounded corners = 2pt}, |
|
|
106 |
|
inner sep = 0, |
|
107 |
|
draw, solid, |
|
108 |
|
outer sep = .5ex, |
|
109 |
|
rounded corners = 2pt}, |
110 |
110 |
group style/.style = {reserved/group style/.append style = {#1}}, |
group style/.style = {reserved/group style/.append style = {#1}}, |
111 |
111 |
% themes for text |
% themes for text |
112 |
112 |
text theme/.is choice, |
text theme/.is choice, |
|
144 |
144 |
|
|
145 |
145 |
\newenvironment{dependency}[1][]{% |
\newenvironment{dependency}[1][]{% |
146 |
146 |
\begin{tikzpicture}[/depgraph/.cd, #1] |
\begin{tikzpicture}[/depgraph/.cd, #1] |
147 |
|
\begin{scope} |
|
148 |
|
}{% |
|
149 |
|
\end{scope}% |
|
|
147 |
|
\begin{scope} |
|
148 |
|
}{% |
|
149 |
|
\end{scope}% |
150 |
150 |
\end{tikzpicture}% |
\end{tikzpicture}% |
151 |
151 |
} |
} |
152 |
152 |
|
|
153 |
153 |
\NewEnviron{deptext}[1][]{% |
\NewEnviron{deptext}[1][]{% |
154 |
154 |
\begin{scope} |
\begin{scope} |
155 |
155 |
\matrix (\dt@depid)[% |
\matrix (\dt@depid)[% |
156 |
|
nodes = {/depgraph/reserved/text style}, |
|
157 |
|
column sep = 0, |
|
158 |
|
row sep = -.5ex, |
|
159 |
|
matrix of nodes, |
|
160 |
|
ampersand replacement = \&, |
|
161 |
|
nodes in empty cells, |
|
162 |
|
#1] { |
|
|
156 |
|
nodes = {/depgraph/reserved/text style}, |
|
157 |
|
column sep = 0, |
|
158 |
|
row sep = -.5ex, |
|
159 |
|
matrix of nodes, |
|
160 |
|
ampersand replacement = \&, |
|
161 |
|
nodes in empty cells, |
|
162 |
|
#1] { |
163 |
163 |
\BODY% |
\BODY% |
164 |
164 |
};% |
};% |
165 |
165 |
\pgfmathtruncatemacro\dt@tmp{\pgfmatrixcurrentrow} |
\pgfmathtruncatemacro\dt@tmp{\pgfmatrixcurrentrow} |
|
171 |
171 |
|
|
172 |
172 |
\newcommand{\settgtlayer}{% |
\newcommand{\settgtlayer}{% |
173 |
173 |
\ifnum\dt@tgtlayer=0% |
\ifnum\dt@tgtlayer=0% |
174 |
|
\ifdt@linkbelow% |
|
175 |
|
\pgfmathtruncatemacro{\dt@tgtlayer}{\dt@numrows}% |
|
176 |
|
\else% |
|
177 |
|
\pgfmathtruncatemacro{\dt@tgtlayer}{1}% |
|
178 |
|
\fi% |
|
|
174 |
|
\ifdt@linkbelow% |
|
175 |
|
\pgfmathtruncatemacro{\dt@tgtlayer}{\dt@numrows}% |
|
176 |
|
\else% |
|
177 |
|
\pgfmathtruncatemacro{\dt@tgtlayer}{1}% |
|
178 |
|
\fi% |
179 |
179 |
\fi% |
\fi% |
180 |
180 |
} |
} |
181 |
181 |
|
|
|
186 |
186 |
\settgtlayer |
\settgtlayer |
187 |
187 |
\def\anchorpoint{north} |
\def\anchorpoint{north} |
188 |
188 |
\ifdt@linkbelow |
\ifdt@linkbelow |
189 |
|
\def\anchorpoint{south} |
|
|
189 |
|
\def\anchorpoint{south} |
190 |
190 |
\fi |
\fi |
191 |
191 |
\def\source{\dt@depid-\dt@tgtlayer-#2} |
\def\source{\dt@depid-\dt@tgtlayer-#2} |
192 |
|
|
|
|
192 |
|
|
193 |
193 |
\ifdim\dt@linkheight=0pt |
\ifdim\dt@linkheight=0pt |
194 |
|
\pgfmathsetmacro{\distance}{\dt@linkstep * 4} |
|
|
194 |
|
\pgfmathsetmacro{\distance}{\dt@linkstep * 4} |
195 |
195 |
\else |
\else |
196 |
|
\pgfmathsetlengthmacro{\distance}{\dt@linkheight} |
|
|
196 |
|
\pgfmathsetlengthmacro{\distance}{\dt@linkheight} |
197 |
197 |
\fi |
\fi |
198 |
198 |
\pgfmathsetlengthmacro{\dt@startdist}{\dt@linkdist} |
\pgfmathsetlengthmacro{\dt@startdist}{\dt@linkdist} |
199 |
199 |
\ifdt@linkbelow |
\ifdt@linkbelow |
200 |
|
\pgfmathsetmacro{\distance}{-(\dt@linkstep * 4)} |
|
201 |
|
\pgfmathsetlengthmacro{\dt@startdist}{-\dt@startdist} |
|
|
200 |
|
\pgfmathsetmacro{\distance}{-(\dt@linkstep * 4)} |
|
201 |
|
\pgfmathsetlengthmacro{\dt@startdist}{-\dt@startdist} |
202 |
202 |
\fi |
\fi |
203 |
203 |
\node at (\source) (\rootref) [yshift=\distance, /depgraph/.cd, reserved/label style, #1] {#3}; |
\node at (\source) (\rootref) [yshift=\distance, /depgraph/.cd, reserved/label style, #1] {#3}; |
204 |
204 |
\draw [/depgraph/.cd, reserved/edge style, #1] (\rootref) -- ($(\source.\anchorpoint) + (0, \dt@startdist)$); |
\draw [/depgraph/.cd, reserved/edge style, #1] (\rootref) -- ($(\source.\anchorpoint) + (0, \dt@startdist)$); |
|
215 |
215 |
\def\dest{\wordref{\dt@tgtlayer}{#3}} |
\def\dest{\wordref{\dt@tgtlayer}{#3}} |
216 |
216 |
\def\depname{#4} |
\def\depname{#4} |
217 |
217 |
\ifdim\dt@linkheight=0pt |
\ifdim\dt@linkheight=0pt |
218 |
|
\pgfmathsetlengthmacro{\distance}{abs(\offb - \offa)*\dt@linkstep} |
|
|
218 |
|
\pgfmathsetlengthmacro{\distance}{abs(\offb - \offa)*\dt@linkstep} |
219 |
219 |
\else |
\else |
220 |
|
\pgfmathsetlengthmacro{\distance}{\dt@linkheight} |
|
|
220 |
|
\pgfmathsetlengthmacro{\distance}{\dt@linkheight} |
221 |
221 |
\fi |
\fi |
222 |
222 |
\groupedge[#1]{\source}{\dest}{\depname}{\distance} |
\groupedge[#1]{\source}{\dest}{\depname}{\distance} |
223 |
|
\end{scope}} |
|
|
223 |
|
\end{scope}} |
224 |
224 |
|
|
225 |
225 |
\newlength{\xca} |
\newlength{\xca} |
226 |
226 |
\newlength{\yca} |
\newlength{\yca} |
|
255 |
255 |
\begin{scope}[/depgraph/.cd, #1] |
\begin{scope}[/depgraph/.cd, #1] |
256 |
256 |
\def\anchorpoint{north} |
\def\anchorpoint{north} |
257 |
257 |
\ifdt@linkbelow |
\ifdt@linkbelow |
258 |
|
\def\anchorpoint{south} |
|
|
258 |
|
\def\anchorpoint{south} |
259 |
259 |
\fi |
\fi |
260 |
260 |
\pgfextractx{\xca}{\pgfpointanchor{#2}{\anchorpoint}} |
\pgfextractx{\xca}{\pgfpointanchor{#2}{\anchorpoint}} |
261 |
261 |
\pgfextractx{\xcb}{\pgfpointanchor{#3}{\anchorpoint}} |
\pgfextractx{\xcb}{\pgfpointanchor{#3}{\anchorpoint}} |
|
263 |
263 |
\pgfextracty{\ycb}{\pgfpointanchor{#3}{\anchorpoint}} |
\pgfextracty{\ycb}{\pgfpointanchor{#3}{\anchorpoint}} |
264 |
264 |
\pgfmathsetlengthmacro{\ydiff}{\yca-\ycb} |
\pgfmathsetlengthmacro{\ydiff}{\yca-\ycb} |
265 |
265 |
\ifdim\xca>\xcb |
\ifdim\xca>\xcb |
266 |
|
\pgfmathsetlengthmacro{\doff}{-\dt@linkoffset} |
|
267 |
|
\pgfmathsetlengthmacro{\dslant}{-\dt@linkslant} |
|
|
266 |
|
\pgfmathsetlengthmacro{\doff}{-\dt@linkoffset} |
|
267 |
|
\pgfmathsetlengthmacro{\dslant}{-\dt@linkslant} |
268 |
268 |
\else |
\else |
269 |
|
\pgfmathsetlengthmacro{\doff}{\dt@linkoffset} |
|
270 |
|
\pgfmathsetlengthmacro{\dslant}{\dt@linkslant} |
|
|
269 |
|
\pgfmathsetlengthmacro{\doff}{\dt@linkoffset} |
|
270 |
|
\pgfmathsetlengthmacro{\dslant}{\dt@linkslant} |
271 |
271 |
\fi |
\fi |
272 |
272 |
\addtocounter{dt@labelid}{1} |
\addtocounter{dt@labelid}{1} |
273 |
273 |
\xdef\dt@lastlabel{\dt@depid-\the\value{dt@labelid}} |
\xdef\dt@lastlabel{\dt@depid-\the\value{dt@labelid}} |
274 |
274 |
\pgfmathsetlengthmacro{\dt@startdist}{\dt@linkdist} |
\pgfmathsetlengthmacro{\dt@startdist}{\dt@linkdist} |
275 |
275 |
\pgfmathsetlengthmacro{\dt@enddist}{#5} |
\pgfmathsetlengthmacro{\dt@enddist}{#5} |
276 |
276 |
\ifdt@linkbelow |
\ifdt@linkbelow |
277 |
|
\pgfmathsetlengthmacro{\dt@startdist}{-\dt@startdist} |
|
278 |
|
\pgfmathsetlengthmacro{\dt@enddist}{-\dt@enddist} |
|
|
277 |
|
\pgfmathsetlengthmacro{\dt@startdist}{-\dt@startdist} |
|
278 |
|
\pgfmathsetlengthmacro{\dt@enddist}{-\dt@enddist} |
279 |
279 |
\fi |
\fi |
280 |
|
|
|
|
280 |
|
|
281 |
281 |
% Calculate edge anchors. -edge-first-corner and -edge-second-corner are only |
% Calculate edge anchors. -edge-first-corner and -edge-second-corner are only |
282 |
282 |
% meaningful for segmented edge, but we also draw the nodes for arc edge, someone |
% meaningful for segmented edge, but we also draw the nodes for arc edge, someone |
283 |
|
% may always find these anchors useful... |
|
284 |
|
\node (\dt@lastlabel-edge-origin) [coordinate] at ($(#2.\anchorpoint) + (\doff,\dt@startdist) + (\dt@EdgeStartOffsetX,0) + (0,\dt@EdgeStartOffsetY)$) {}; |
|
|
283 |
|
% may always find these anchors useful... |
|
284 |
|
\node (\dt@lastlabel-edge-origin) [coordinate] at ($(#2.\anchorpoint) + (\doff,\dt@startdist) + (\dt@EdgeStartOffsetX,0) + (0,\dt@EdgeStartOffsetY)$) {}; |
285 |
285 |
\node (\dt@lastlabel-edge-first-corner) [coordinate] at ($(\dt@lastlabel-edge-origin) + (\dslant,\dt@enddist)$) {}; |
\node (\dt@lastlabel-edge-first-corner) [coordinate] at ($(\dt@lastlabel-edge-origin) + (\dslant,\dt@enddist)$) {}; |
286 |
286 |
\node (\dt@lastlabel-edge-second-corner) [coordinate] at ($(#3.\anchorpoint) + (\dt@EdgeEndOffsetX,0) + (0,\dt@EdgeStartOffsetY) + (-\dslant,\dt@enddist+\dt@startdist+\ydiff)$) {}; |
\node (\dt@lastlabel-edge-second-corner) [coordinate] at ($(#3.\anchorpoint) + (\dt@EdgeEndOffsetX,0) + (0,\dt@EdgeStartOffsetY) + (-\dslant,\dt@enddist+\dt@startdist+\ydiff)$) {}; |
287 |
287 |
\node (\dt@lastlabel-edge-endpoint) [coordinate] at ($(#3.\anchorpoint) + (0,\dt@startdist) + (\dt@EdgeEndOffsetX,0)$) {}; |
\node (\dt@lastlabel-edge-endpoint) [coordinate] at ($(#3.\anchorpoint) + (0,\dt@startdist) + (\dt@EdgeEndOffsetX,0)$) {}; |
288 |
|
|
|
|
288 |
|
|
289 |
289 |
\ifdt@arcedge |
\ifdt@arcedge |
290 |
|
% link above, left to right |
|
291 |
|
\pgfmathsetmacro{\dt@arcin}{180-\dt@arcangle} |
|
292 |
|
\pgfmathsetmacro{\dt@arcout}{\dt@arcangle} |
|
293 |
|
\ifdt@linkbelow |
|
294 |
|
% link below |
|
295 |
|
\pgfmathsetmacro{\dt@arcin}{-\dt@arcin} |
|
296 |
|
\pgfmathsetmacro{\dt@arcout}{-\dt@arcout} |
|
297 |
|
\fi |
|
298 |
|
\ifdim\xca>\xcb |
|
299 |
|
% right to left |
|
300 |
|
\pgfmathsetmacro{\dt@temp}{\dt@arcin} |
|
301 |
|
\pgfmathsetmacro{\dt@arcin}{\dt@arcout} |
|
302 |
|
\pgfmathsetmacro{\dt@arcout}{\dt@temp} |
|
303 |
|
\fi |
|
304 |
|
%\draw [/depgraph/.cd, reserved/edge style, rounded corners = #5/5, #1] |
|
305 |
|
\draw [out=\dt@arcout, in=\dt@arcin,/depgraph/.cd, reserved/edge style, rounded corners = #5/5, #1] |
|
306 |
|
(\dt@lastlabel-edge-origin) |
|
307 |
|
to node (\dt@lastlabel) [/depgraph/.cd, #1, reserved/label style] {#4} |
|
308 |
|
(\dt@lastlabel-edge-endpoint); |
|
309 |
|
|
|
310 |
|
\else |
|
311 |
|
\draw [/depgraph/.cd, reserved/edge style, rounded corners = #5/5, #1] |
|
312 |
|
(\dt@lastlabel-edge-origin) -- |
|
313 |
|
(\dt@lastlabel-edge-first-corner) -- |
|
314 |
|
(\dt@lastlabel-edge-second-corner) -- |
|
315 |
|
(\dt@lastlabel-edge-endpoint); |
|
316 |
|
\node (\dt@lastlabel) [/depgraph/.cd, #1, reserved/label style] at |
|
317 |
|
($ .5*(\dt@lastlabel-edge-second-corner) + .5*(\dt@lastlabel-edge-first-corner) $) |
|
318 |
|
{#4}; |
|
|
290 |
|
% link above, left to right |
|
291 |
|
\pgfmathsetmacro{\dt@arcin}{180-\dt@arcangle} |
|
292 |
|
\pgfmathsetmacro{\dt@arcout}{\dt@arcangle} |
|
293 |
|
\ifdt@linkbelow |
|
294 |
|
% link below |
|
295 |
|
\pgfmathsetmacro{\dt@arcin}{-\dt@arcin} |
|
296 |
|
\pgfmathsetmacro{\dt@arcout}{-\dt@arcout} |
|
297 |
|
\fi |
|
298 |
|
\ifdim\xca>\xcb |
|
299 |
|
% right to left |
|
300 |
|
\pgfmathsetmacro{\dt@temp}{\dt@arcin} |
|
301 |
|
\pgfmathsetmacro{\dt@arcin}{\dt@arcout} |
|
302 |
|
\pgfmathsetmacro{\dt@arcout}{\dt@temp} |
|
303 |
|
\fi |
|
304 |
|
%\draw [/depgraph/.cd, reserved/edge style, rounded corners = #5/5, #1] |
|
305 |
|
\draw [out=\dt@arcout, in=\dt@arcin,/depgraph/.cd, reserved/edge style, rounded corners = #5/5, #1] |
|
306 |
|
(\dt@lastlabel-edge-origin) |
|
307 |
|
to node (\dt@lastlabel) [/depgraph/.cd, #1, reserved/label style] {#4} |
|
308 |
|
(\dt@lastlabel-edge-endpoint); |
|
309 |
|
|
|
310 |
|
\else |
|
311 |
|
\draw [/depgraph/.cd, reserved/edge style, rounded corners = #5/5, #1] |
|
312 |
|
(\dt@lastlabel-edge-origin) -- |
|
313 |
|
(\dt@lastlabel-edge-first-corner) -- |
|
314 |
|
(\dt@lastlabel-edge-second-corner) -- |
|
315 |
|
(\dt@lastlabel-edge-endpoint); |
|
316 |
|
\node (\dt@lastlabel) [/depgraph/.cd, #1, reserved/label style] at |
|
317 |
|
($ .5*(\dt@lastlabel-edge-second-corner) + .5*(\dt@lastlabel-edge-first-corner) $) |
|
318 |
|
{#4}; |
319 |
319 |
\fi |
\fi |
320 |
320 |
\end{scope} |
\end{scope} |
321 |
321 |
} |
} |