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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
%%
%% This is file `tikz-timing-clockarrows.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tikz-timing.dtx (with options: `tikz-timing-clockarrows.sty')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from tikz-timing-clockarrows.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file tikz-timing.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% Copyright (C) 2009-2012 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Martin Scharrer.
%%
%% This work consists of the files tikz-timing.dtx and tikz-timing.ins
%% and the derived filebase tikz-timing*.sty.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{tikz-timing-clockarrows}[%
2017/12/20
v0.7f
tikz-timing library for timing clock arrows]
\tikztiming@iftrans{CC}%
{\let\tikztiming@trans@C@normal@C\tikztiming@trans@CC}%
{\PackageError{\@currname}{No 'CC' transition defined by the main tikz-timing
package.}{}}%
\tikztiming@iftrans{HC}%
{\let\tikztiming@trans@H@normal@C\tikztiming@trans@HC}%
{\PackageError{\@currname}{No 'HC' transition defined by the main tikz-timing
package.}{}}%
\tikztiming@iftrans{LC}%
{\let\tikztiming@trans@L@normal@C\tikztiming@trans@LC}%
{\PackageError{\@currname}{No 'LC' transition defined by the main tikz-timing
package.}{}}%
\tikztimingdef{CC}{%
\code{\setcounter{tikztimingtrans}{-\value{tikztimingtrans}}}
[timing/c/save]
\newdraw [\style,timing/c/restore,>=\noexpand\tikztiming@c@arrow@tip,timing/c/arrow@style]
-- ++(\slope*\noexpand\tikztiming@c@arrow@pos,\value{tikztimingtrans}*\height*\noexpand\tikztiming@c@arrow@pos)
; \draw [timing/restore,timing/c/restore] (timing@save) ++(0,0) [\style]
-- ++(\slope,\value{tikztimingtrans}*\height)
-- ++($ (#1,0) - (\slope,0) $)
}
\let\tikztiming@trans@C@arrow@C\tikztiming@trans@CC
\tikztimingdef{HC}{%
\code{\setcounter{tikztimingtrans}{-1}}
[timing/c/save]
\newdraw [\style,timing/c/restore,>=\noexpand\tikztiming@c@arrow@tip,timing/c/arrow@style]
-- ++(\slope*\noexpand\tikztiming@c@arrow@pos,\value{tikztimingtrans}*\height*\noexpand\tikztiming@c@arrow@pos)
; \draw [timing/restore,timing/c/restore] (timing@save) ++(0,0) [\style]
-- ++(\slope,\value{tikztimingtrans}*\height)
-- ++($ (#1,0) - (\slope,0) $)
}
\let\tikztiming@trans@H@arrow@C\tikztiming@trans@HC
\tikztimingdef{LC}{%
\code{\setcounter{tikztimingtrans}{+1}}
[timing/c/save]
\newdraw [\style,timing/c/restore,>=\noexpand\tikztiming@c@arrow@tip,timing/c/arrow@style]
-- ++(\slope*\noexpand\tikztiming@c@arrow@pos,\value{tikztimingtrans}*\height*\noexpand\tikztiming@c@arrow@pos)
; \draw [timing/restore,timing/c/restore] (timing@save) ++(0,0) [\style]
-- ++(\slope,\value{tikztimingtrans}*\height)
-- ++($ (#1,0) - (\slope,0) $)
}
\let\tikztiming@trans@L@arrow@C\tikztiming@trans@LC
\tikzset{timing/c/.cd,
rising arrows/.code={%
\let\tikztiming@trans@CC\tikztiming@trans@C@arrow@C%
\let\tikztiming@trans@LC\tikztiming@trans@L@arrow@C%
\let\tikztiming@trans@HC\tikztiming@trans@H@arrow@C%
\def\tikztiming@clockarrow@style{\ifnum1=\c@tikztimingtrans\tikzset{->,timing/c/arrow}\fi}%
},%
falling arrows/.code={%
\let\tikztiming@trans@CC\tikztiming@trans@C@arrow@C%
\let\tikztiming@trans@LC\tikztiming@trans@L@arrow@C%
\let\tikztiming@trans@HC\tikztiming@trans@H@arrow@C%
\def\tikztiming@clockarrow@style{\ifnum-1=\c@tikztimingtrans\tikzset{->,timing/c/arrow}\fi}%
},%
dual arrows/.code={%
\let\tikztiming@trans@CC\tikztiming@trans@C@arrow@C%
\let\tikztiming@trans@LC\tikztiming@trans@L@arrow@C%
\let\tikztiming@trans@HC\tikztiming@trans@H@arrow@C%
\def\tikztiming@clockarrow@style{\tikzset{->,timing/c/arrow}}%
},%
no arrows/.code={%
\let\tikztiming@trans@CC\tikztiming@trans@C@normal@C%
\let\tikztiming@trans@LC\tikztiming@trans@L@normal@C%
\let\tikztiming@trans@HC\tikztiming@trans@H@normal@C%
\def\tikztiming@clockarrow@style{}%
},%
arrow@style/.code={\tikztiming@clockarrow@style},%
arrow/.style={},%
arrow pos/.store in=\tikztiming@c@arrow@pos,
arrow tip/.store in=\tikztiming@c@arrow@tip,
save/.code={%
\global\let\tikztiming@clockarrow@savedstyle\tikztiming@clockarrow@style
\global\let\tikztiming@trans@saved@CC\tikztiming@trans@CC
\global\let\tikztiming@c@arrow@savedpos\tikztiming@c@arrow@pos
\global\let\tikztiming@c@arrow@savedtip\tikztiming@c@arrow@tip
},
restore/.code={%
\let\tikztiming@clockarrow@style\tikztiming@clockarrow@savedstyle
\let\tikztiming@trans@CC\tikztiming@trans@saved@CC
\let\tikztiming@c@arrow@pos\tikztiming@c@arrow@savedpos
\let\tikztiming@c@arrow@tip\tikztiming@c@arrow@savedtip
},
}
\tikzset{timing/c/.cd,
no arrows,
arrow pos=0.95,
arrow tip=to,
}
\RequirePackage{pgfopts}
\ProcessPgfOptions{/tikz/timing/c}
\endinput
%%
%% End of file `tikz-timing-clockarrows.sty'.
|