-
Notifications
You must be signed in to change notification settings - Fork 0
/
mts-arrows.tex
120 lines (102 loc) · 3.49 KB
/
mts-arrows.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
%%% Modal transition systems arcs
%%% by Mikael H. Møller - [email protected]
%%% required packages:
\RequirePackage[T1]{fontenc}
\RequirePackage{tikz}
%%% Arrow Commands
\newcommand{\may}[1]{\stackrel{#1}{\mayarrow}}
\newcommand{\must}[1]{\stackrel{#1}{\mustarrow}}
\newcommand{\mayw}[1]{\stackrel{#1}{\weakmayarrow}}
\newcommand{\mustw}[1]{\stackrel{#1}{\weakmustarrow}}
\newcommand{\lmay}[1]{\stackmay{#1}{\mayfill}}
\newcommand{\lmust}[1]{\stackmust{#1}{\mustfill}}
\newcommand{\lmayw}[1]{\stackmay{#1}{\maywfill}}
\newcommand{\lmustw}[1]{\stackmust{#1}{\mustwfill}}
%%% Arrow drawings (normal arrows)
\newcommand{\mayarrow}{\mathrel{
\begin{tikzpicture}[line width=.4, scale=0.13,line cap=round]
%set symbolarea:
\clip (-.06,-.7) rectangle (4.0,.7);
%draw dashed line:
\draw (0,0) -- (1,0);
\draw (1.3,0) -- (2.3,0);
\draw (2.6,0) -- (3.6,0);
%draw arrow tip (symbol requires \usepackage[T1]{fontenc}):
\node at (3.5,0) {\upshape{\guilsinglright}};
\end{tikzpicture}
}}
\newcommand{\mustarrow}{\mathrel{
\begin{tikzpicture}[line width=.4, scale=0.13,line cap=round]
%set symbolarea:
\clip (-.06,-.7) rectangle (4.0,.7);
%draw full line:
\draw (0,0) -- (3.6,0);
%draw arrow tip (symbol requires \usepackage[T1]{fontenc}):
\node at (3.5,0) {\upshape{\guilsinglright}};
\end{tikzpicture}
}}
\newcommand{\weakmayarrow}{\mathrel{
\begin{tikzpicture}[line width=.4, scale=0.13,line cap=round]
%set symbolarea:
\clip (-.06,-.7) rectangle (4.0,.7);
%draw upper dashed line:
\draw (0,.2) -- (1,.2);
\draw (1.3,.2) -- (2.3,.2);
\draw (2.6,.2) -- (3.45,.2);
%draw lower dashed line:
\draw (0,-.2) -- (1,-.2);
\draw (1.3,-.2) -- (2.3,-.2);
\draw (2.6,-.2) -- (3.45,-.2);
%draw arrow tip (symbol requires \usepackage[T1]{fontenc}):
\node at (3.5,0) {\upshape{\guilsinglright}};
\end{tikzpicture}
}}
\newcommand{\weakmustarrow}{\mathrel{
\begin{tikzpicture}[line width=.4, scale=0.13,line cap=round]
%set symbolarea:
\clip (-.06,-.7) rectangle (4.0,.7);
%draw upper full line:
\draw (0,.2) -- (3.45,0.2);
%draw lower full line:
\draw (0,-.2) -- (3.45,-.2);
%draw arrow tip (symbol requires \usepackage[T1]{fontenc}):
\node at (3.5,0) {\upshape{\guilsinglright}};
\end{tikzpicture}
}}
%%% Arrow drawings (long arrows)
%
% Here only the line of the arrow is drawn, and then repeated using \xleaders
\newcommand{\arrowend}{\mathrel{
\begin{tikzpicture}[baseline=-0.559ex, line width=.4, scale=0.13,line cap=round]
%set symbolarea:
\clip (-.06,-.7) rectangle (1.06,.7);
%draw dashed line:
\draw (0,0) -- (1,0);
\end{tikzpicture}
}}
\newcommand{\weakarrowend}{\mathrel{
\begin{tikzpicture}[baseline=-0.559ex, line width=.4, scale=0.13,line cap=round]
%set symbolarea:
\clip (-.06,-.7) rectangle (1.06,.7);
%draw upper dashed line:
\draw (0,.2) -- (1,.2);
%draw lower dashed line:
\draw (0,-.2) -- (1,-.2);
\end{tikzpicture}
}}
%% Long arrows (repeating the line segnemt)
\newcommand{\mayfill}{$
\xleaders\hbox{\hspace{0.2ex}$\arrowend$}
\hfill\text{\hspace{-.74ex}\upshape{\guilsinglright}}$}
\newcommand{\mustfill}{$
\xleaders\hbox{\hspace{-0.4ex}$\arrowend$}
\hfill\text{\hspace{-.74ex}\upshape{\guilsinglright}}$}
\newcommand{\maywfill}{$
\xleaders\hbox{\hspace{0.2ex}$\weakarrowend$}
\hfill\text{\hspace{-.54ex}\upshape{\guilsinglright}}$}
\newcommand{\mustwfill}{$
\xleaders\hbox{\hspace{-0.4ex}$\weakarrowend$}
\hfill\text{\hspace{-.54ex}\upshape{\guilsinglright}}$}
%% adjusting text on long arrows
\newcommand{\stackmay}[2]{\stackrel{\hspace{0.8ex}#1\hspace{1ex}}{\hbox{#2}}}
\newcommand{\stackmust}[2]{\stackrel{\hspace{0ex}#1\hspace{1ex}}{\hbox{#2}}}