summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing-ifsym.sty
blob: e046284c55fcf126ee9c459789ad8d5c0c5160cd (plain)
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
%%
%% This is file `tikz-timing-ifsym.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tikz-timing.dtx  (with options: `lib,lib-ifsym')
%% 
%% Copyright (C) 2009-2011 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.3c
%% 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.3c or later is part of all distributions of LaTeX
%% version 2008/05/04 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, tikz-timing.ins
%% and the derived file tikz-timing.sty.
%% 
\RequirePackage{svn-prov}[2009/05/03]
\ProvidesPackageSVN[tikz-timing-ifsym]
  {$Id: tikz-timing.dtx 2038 2011-01-09 20:44:26Z martin $}
  [v0.7d
   TikZ-Timing Library for
   ifsym compatible macros]
\GetFileInfoSVN*%
\RequirePackage{tikz-timing}[\filedate]%
\DefineFileInfoSVN
\tikzset{%
  timing/ifsym/macro/.style={/tikz/timing/ifsym,/utils/exec={\pgfmathparse{.6*\f@size}\let\ysize\pgfmathresult},/tikz/y=\ysize},
  timing/ifsym/.style={%
    /tikz,timing/slope=0,x=\f@size,y=\f@size,line width=0.1ex,
    timing/metachar={|}{G},
    timing/x/.style={},
    timing/metachar={M}[1]{#1X},
    timing/metachar={m}[1]{#1x},
    /utils/exec={%
\def\tikztimingsetdslope##1{%
  \pgfmathparse{max(0.0,##1)}%
  \let\tikztiming@dslope\pgfmathresult
  \edef\timingdslope{\tikztiming@dslope*\noexpand\timingwidth}%
}
\tikztiming@defcode{<}{%
  \@ifnextchar{<}%
    {\tikztiming@ifsym@longslope{X}{D}}%
    {\tikztiming@parser [timing/dslope=1] 0Xd;}%
}%
\tikztiming@defcode{>}{%
  \@ifnextchar{>}%
    {\tikztiming@ifsym@longslope{D}{X}}%
    {\tikztiming@parser [timing/dslope=1] 0Dx;}%
}%
\def\tikztiming@ifsym@longslope##1##2##3{
    \tikztiming@parser [timing/dslope=2.] 0##1 ##2;%
}%
  }},
}
\tikzset{%
  timing/ifsym/.cd,
  provide/.code={\let\tikztiming@ifsym@def\providecommand},
  renew/.code={\let\tikztiming@ifsym@def\renewcommand},
  new/.code={\let\tikztiming@ifsym@def\newcommand},
  off/.code={\let\tikztiming@ifsym@def\@gobbletwo},
}
\tikzset{timing/ifsym/provide}%
\RequirePackage{pgfopts}
\ProcessPgfOptions{/tikz/timing/ifsym}
\tikztiming@ifsym@def{\RaisingEdge}{\hbox{\texttiming[timing/ifsym/macro]{.4L .4H}}}
\tikztiming@ifsym@def{\FallingEdge}{\hbox{\texttiming[timing/ifsym/macro]{.4H .4L}}}
\tikztiming@ifsym@def{\ShortPulseHigh}{\hbox{\texttiming[timing/ifsym/macro]{.4L .2H .4L}}}
\tikztiming@ifsym@def{\ShortPulseLow}{\hbox{\texttiming[timing/ifsym/macro]{.4H .2L .4H}}}
\tikztiming@ifsym@def{\PulseHigh}{\hbox{\texttiming[timing/ifsym/macro]{.4L .6H .4L}}}
\tikztiming@ifsym@def{\PulseLow}{\hbox{\texttiming[timing/ifsym/macro]{.4H .6L .4H}}}
\tikztiming@ifsym@def{\LongPulseHigh}{\hbox{\texttiming[timing/ifsym/macro]{.4L H .4L}}}
\tikztiming@ifsym@def{\LongPulseLow}{\hbox{\texttiming[timing/ifsym/macro]{.4H L .4H}}}
\tikztiming@ifsym@def{\textifsym}{\texttiming[timing/ifsym]}
\let\tikztiming@ifsym@def\@undefined
\endinput
%%
%% End of file `tikz-timing-ifsym.sty'.