summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing-ifsym.sty
blob: cd13fc96758d211541d64dfb5340f85c2e7b431f (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
89
90
91
92
93
94
95
96
%%
%% This is file `tikz-timing-ifsym.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tikz-timing.dtx  (with options: `tikz-timing-ifsym.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-ifsym.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-ifsym}[%
    2017/12/20
    v0.7f
    tikz-timing library for ifsym compatible macros]
\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'.