summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-16 18:55:35 +0000
committerKarl Berry <karl@freefriends.org>2009-05-16 18:55:35 +0000
commit093e62dd5e34a8c932b37eeec419a37cae5560f0 (patch)
tree06c4115b4cda29e6742023fe731d10759af337f4 /Master/texmf-dist/tex
parente84980c166909c05441e356c43cca766b4053e29 (diff)
tikiz-timing 0.5 (15may09)
git-svn-id: svn://tug.org/texlive/trunk@13124 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/tikz-timing/tikz-timing.sty407
1 files changed, 223 insertions, 184 deletions
diff --git a/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing.sty b/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing.sty
index c00effacb16..afdbd67a7de 100644
--- a/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing.sty
+++ b/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing.sty
@@ -27,21 +27,28 @@
%%
\RequirePackage{svn-prov}[2009/05/03]
\ProvidesPackageSVN
- {$Id: tikz-timing.dtx 1069 2009-05-05 13:52:29Z martin $}
- [v0.4a
+ {$Id: tikz-timing.dtx 1132 2009-05-15 15:23:50Z martin $}
+ [v0.5
Digital Timing Diagrams using TikZ]
\DefineFileInfoSVN[tikztiming]
\RequirePackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{backgrounds}
-\RequirePackage{environ}
+\usetikzlibrary{decorations.pathmorphing}
+\ifx\collect@body\@undefined
+ \IfFileExists{environ.sty}
+ {\RequirePackage{environ}}
+ {\RequirePackage{amsmath}}
+\fi
\def\tikztimingwidth{0.0}
\newcount\tikztiming@numint
\newcount\tikztiming@numfrac
\def\tikztiming@num{1.0}%
-%%\def\tikztiming@num{\the\tikztiming@numint.\the\tikztiming@numfrac}
+\let\tikztiming@back\empty
+\newlength\tikztiming@xunit
+\newlength\tikztiming@yunit
\newcounter{tikztiming@nrows}%
\def\tikztiming@rowdist{2}%
@@ -53,11 +60,16 @@
\tikzset{timing/.style={%
x=1.6ex, y=1.6ex,
line cap=round, line join=round,
+ /utils/exec={\setlength{\tikztiming@xunit}{1.6ex}\setlength{\tikztiming@yunit}{1.6ex}},
}%
}
\tikzset{%
timing/.cd,
+ initchar/.value required,
+ initchar/.code={\ifx\lastchar\empty\uppercase{\def\lastchar{#1}}\fi},
+ metachar/.code 2 args={\tikztimingmetachar{#1}{#2}},
grid/.style={timing,help lines},
+ picture/.style={timing,line width=0.15ex},
intext/.style={timing,line width=0.15ex},
inline node/.style={shape=coordinate},
table/.style={timing,line width=0.15ex,font=\sffamily},
@@ -71,10 +83,14 @@
l/.style={},
d/.style={},
m/.style={black!40!brown},
+ m/decoration/.style={decorate,decoration={zigzag,segment
+ length=.25\tikztiming@xunit,amplitude=.225\tikztiming@yunit}},
+ k/.style={black!40!blue,semitransparent},
u/background/.style={fill=gray},
u/.style={},
o/background/.style={},
o/.style={timing/d,line width=0.10ex,dotted},
+ g/.style={},
z/.style={blue},
t/.style={},
c/.style={timing/slope=0.0},
@@ -102,30 +118,43 @@
\DeclareRobustCommand*\texttiming[2][]{%
\begingroup
\tikztiming@init
- \uppercase{\def\lastchar{#1}}%
- \@ifundefined{tikztiming@initcode@\lastchar}%
- {}%
- {\@nameuse{tikztiming@initcode@\lastchar}}%
- \ifx\lastchar\empty\else
- \@ifundefined{\tikztiming@prefix\lastchar @start}%
- {\PackageWarning{tikz-timing}{Start value for timing character '\lastchar'
- is not defined and will be ignored!}{}{}{}}%
- {\tikztiming@nameaddtostr{\lastchar @start}{}}%
+ \ifx\relax#1\relax\else
+ \tikztiming@testoptarg#1\relax\relax%
\fi
- \tikztiming@#2\relax
- %\message{^^J\meaning\tikztiming@str^^J}%
- \begin{tikzpicture}[timing/intext]%
+ \def\@tempa{\begin{tikzpicture}[timing/intext,}%]}[
+ \expandafter\@tempa\settings]
+ \@ifundefined{tikztiming@initcode@\lastchar}%
+ {}%
+ {\@nameuse{tikztiming@initcode@\lastchar}}%
+ \ifx\lastchar\empty\else
+ \@ifundefined{\tikztiming@prefix\lastchar @start}%
+ {\PackageWarning{tikz-timing}{Start value for timing character '\lastchar'
+ is not defined and will be ignored!}{}{}{}}%
+ {\tikztiming@nameaddtostr{\lastchar @start}{}}%
+ \fi
+ \tikztiming@#2\relax
+ %\message{^^J\meaning\tikztiming@str^^J}%
\path[use as bounding box] (0,0) rectangle
(\timingwidth*\tikztimingwidth,\timingheight);%
\texttimingbefore
\tikztiming@str;%
+ \node [shape=tikztiming@shape,anchor=origin,name=last texttiming] at (0,0)
+ {};
\texttimingafter
\end{tikzpicture}%
\endgroup
}
+\def\tikztiming@testoptarg#1#2\relax{%
+ \ifx\relax#2\relax
+ \uppercase{\def\lastchar{#1}}%
+ \else
+ \def\settings{#1#2}%
+ \fi
+}
\def\tikztiming@init{%
- \def\lastchar{}%
+ \let\lastchar\empty%
\let\currentchar\empty
+ \let\settings\empty
\def\tikztimingwidth{0.0}%
\setcounter{tikztimingtrans}{-1}%
\def\tikztiming@str{\draw (0,0) coordinate (timing/start base) }%
@@ -136,26 +165,38 @@
{\timing@[]}%
}
\def\timing@[#1]{%
- \@ifnextchar{+}%
- {\timing@@{#1}}%
- {\@ifnextchar(%)
+ \@ifnextchar{a}%
+ {\timing@at{#1}}%
+ {\PackageWarning{tikz-timing}{The \string\timing\space command awaits now an
+ `at' before the coordinate, like the \string\node\space command is doing.
+ Please update your source code to ensure compatibility with newer
+ versions}{}{}{}%
+ \@ifnextchar{+}%
{\timing@@{#1}}%
- {\timing@@{#1}+(0,0)}%
+ {\@ifnextchar(%)
+ {\timing@@{#1}}%
+ {\timing@@{#1}++(0,0)}%
+ }%
}%
}
+\def\timing@at#1at#2(#3){%
+ \timing@@@{#1}{#2(#3)}%
+}
\def\timing@@#1#2(#3){%
\timing@@@{#1}{#2(#3)}%
}
\def\timing@@@#1#2#3{%
\begingroup
\tikztiming@init
- \@ifnextchar{[}%
- {\timing@@@init}%
- {\timing@@@init[]}%
- #3\relax
- %\message{^^J\meaning\tikztiming@str^^J}%
+ \let\tikz@alias=\pgfutil@empty%
\begin{scope}[shift={#2},timing,#1]%
+ \@ifnextchar{[}%
+ {\timing@@@init}%
+ {\timing@@@init[]}%
+ #3\relax
+ %\message{^^J\meaning\tikztiming@str^^J}%
\tikztiming@str;%
+ \node [shape=tikztiming@shape,anchor=origin,#1] at (0,0) {};
\end{scope}%
\endgroup
\timing@@@end
@@ -166,7 +207,9 @@
\fi
}
\def\timing@@@init[#1]{%
- \uppercase{\def\lastchar{#1}}%
+ \ifx\relax#1\relax\else
+ \uppercase{\def\lastchar{#1}}%
+ \fi
\@ifundefined{tikztiming@initcode@\lastchar}%
{}%
{\@nameuse{tikztiming@initcode@\lastchar}}%
@@ -344,6 +387,11 @@
\tikztiming@iflower{#1}%
{\pgfmathparse{\tikztiming@num/2.0}\let\tikztiming@num\pgfmathresult}%
{}%
+ \ifx\tikztiming@back\empty\else
+ \pgfmathparse{\tikztiming@num-\tikztiming@back}%
+ \let\tikztiming@num\pgfmathresult
+ \let\tikztiming@back\empty
+ \fi
\pgfmathparse{\tikztimingwidth + \tikztiming@num}%
\let\tikztimingwidth\pgfmathresult
\def\currentchar{#1}%
@@ -409,27 +457,30 @@
}%
\tikztiming@
}
-\def\tikztiming@stoppath#1{%
+\def\tikztiming@defcode#1{%
+ \@namedef{tikztiming@code@\meaning#1}%
+}
+\tikztiming@defcode{,}{%
\tikztiming@output@flush
\tikztiming@eaddtostr{%
\newdraw
}%
\tikztiming@
}
-\def\tikztiming@stoppath@nosave#1{%
+\tikztiming@defcode{;}{%
\tikztiming@output@flush
\tikztiming@eaddtostr{%
\newdrawns
}%
\tikztiming@
}
-\def\tikztiming@addnode#1{%
- \@ifnextchar{[}%]
+\tikztiming@defcode{N}{%
+ \@ifnextchar[%]
{\tikztiming@addnode@getoptions}%
{\tikztiming@addnode@getoptions[]}%
}
\def\tikztiming@addnode@getoptions[#1]{%
- \@ifnextchar{(}%)}
+ \@ifnextchar(%)
{\tikztiming@addnode@getname{#1}}%
{\tikztiming@addnode@getname{#1}()}%
}
@@ -454,18 +505,10 @@
\def\tikztiming@testforcode{%
\@ifnextchar{!}%
{\tikztiming@testforcode@}%
- {\@ifnextchar{[}%
- {\tikztiming@handleoption}%
- {\@ifnextchar{;}%
- {\tikztiming@stoppath@nosave}%
- {\@ifnextchar{,}%
- {\tikztiming@stoppath}%
- {\@ifnextchar{N}%
- {\tikztiming@addnode}%
- {\tikztiming@@}%
- }%
- }%
- }%
+ {\@ifundefined{tikztiming@code@\meaning\@let@token}%
+ {\tikztiming@@}%
+ {\csname tikztiming@code@\meaning\@let@token\expandafter
+ \endcsname\@gobble}%
}%
}
\def\tikztiming@testforcode@#1{%
@@ -477,12 +520,17 @@
\tikztiming@
}%
}
+\tikztiming@defcode{B}{%
+ \pgfmathparse{\tikztiming@back+\tikztiming@num}%
+ \let\tikztiming@back\pgfmathresult
+ \tikztiming@
+}
\def\tikztiming@handlecode#1{%
\tikztiming@output@flush
\tikztiming@addtostr{ #1 }%
\tikztiming@
}
-\def\tikztiming@handleoption[#1]{%
+\tikztiming@defcode[#1]{%
\tikztiming@addtostr{ [#1] }%
\tikztiming@
}
@@ -521,7 +569,14 @@
\tikztiming@numint1\relax
\tikztiming@numfrac0\relax
\def\tikztiming@num{1.0}%
- \expandafter\tikztiming@testforcode
+ \if@tikztiming@metachar
+ {\def\@tempa{\expandafter\expandafter\expandafter
+ \tikztiming@testfornum@@@@
+ \expandafter\expandafter\expandafter{%
+ \csname tikztiming@metachar@\meaning\@let@token\endcsname}}%
+ \expandafter\@tempa\@gobble
+ }%
+ {\tikztiming@testforcode}%
}%
}%
\fi
@@ -548,9 +603,26 @@
\tikztiming@testfornum@@@@
}%
{%
- \tikztiming@testforcode
+ \if@tikztiming@metachar
+ {\def\@tempa{\expandafter\expandafter\expandafter
+ \tikztiming@testfornum@@@@
+ \expandafter\expandafter\expandafter{%
+ \csname tikztiming@metachar@\meaning\@let@token\endcsname}}%
+ \expandafter\@tempa\@gobble
+ }%
+ {\tikztiming@testforcode}%
}%
}
+\def\tikztimingmetachar#1#2{%
+ \ifx\relax#2\relax
+ \expandafter\let\csname tikztiming@metachar@\meaning#1\endcsname\@undefined
+ \else
+ \@namedef{tikztiming@metachar@\meaning#1}{#2}%
+ \fi
+}
+\def\if@tikztiming@metachar#1#2{%
+ \@ifundefined{tikztiming@metachar@\meaning\@let@token}{#2}{#1}%
+}
\def\tikztiming@testfornum@@@@#1{%
\begingroup
\@temptokena{#1}%
@@ -563,7 +635,7 @@
\newcounter{tikztimingrows}
\def\tikztiming@extracode{\@gobble{EXTRACODE}}%
-\NewEnviron{tikztimingtable}[1][]{%
+\newenvironment{tikztimingtable}[1][]{%
\begingroup
\setcounter{tikztiming@nrows}{0}%
\def\tikztiming@maxwidth{0.0}%
@@ -577,13 +649,18 @@
\def\coldist{\tikztiming@coldist}%
\def\nrows{\the\c@tikztiming@nrows}%
\def\twidth{\tikztiming@maxwidth}%
- \begin{tikzpicture}[timing/table,#1]%
+ \tikzpicture[timing/table,#1]%
\coordinate (last row) at (0,\rowdist);
\coordinate (label pos) at (-1*\coldist,0);
\coordinate (timing/table/top left) at (0,1);
\coordinate (timing/table/bottom right) at (0,0);
- \expandafter\tikztimingtable@row\BODY\endtikztimingtable@
- \end{tikzpicture}
+ \collect@body\tikztiming@table
+}{%
+}
+
+\def\tikztiming@table#1{%
+ \tikztimingtable@row#1\endtikztimingtable@
+ \endtikzpicture
\endgroup
}
@@ -630,7 +707,10 @@
\path ($ (last row) + (0,-1*\rowdist) $) coordinate (last row);
\path ($ (last row) + (-1*\coldist,0) $) node [anchor=base east,timing/name]
{\tikztiminglabel{#1}};
- \timing (last row) {#2};
+ \@ifnextchar{[}%
+ {\tikztiming@tabletiming}%
+ {\tikztiming@tabletiming[]}%
+ #2\relax
\path let \p1 = (timing/table/bottom right), \p2 = (timing/end base) in
coordinate (timing/table/bottom right) at ({max(\x1,\x2)},\y2);
%
@@ -647,6 +727,17 @@
}%
}
+\def\tikztiming@tabletiming[#1]#2\relax{%
+ \let\lastchar\empty
+ \let\settings\empty
+ \ifx\relax#1\relax\else
+ \tikztiming@testoptarg#1\relax\relax
+ \fi
+ \edef\@tempa{\noexpand\timing[name=row\the\c@tikztiming@nrows,\settings]
+ at (last row)}%
+ \expandafter\@tempa\expandafter{\expandafter[\lastchar]#2};
+}
+
\newcommand*\tikztiming@fulltablegrid[1][]{%
\begin{pgfonlayer}{background}
\scope[xstep={\timingwidth/2.},ystep={\timingheight/2.},
@@ -706,6 +797,58 @@
;
\endgroup
}
+\pgfdeclareshape{tikztiming@shape}{%
+ \savedanchor\northeast{\pgfpointxy{.5*\tikztimingwidth}{.5}}%
+ \savedanchor\northeastborder{\pgfpointxy{.5*\tikztimingwidth+0.1}{.6}}%
+ \savedanchor\startpoint{%
+ \pgfpointanchor{timing/start}{center}%
+ \@tempdima=\pgf@x
+ \@tempdimb=\pgf@y
+ \pgfpointxy{-.5*\tikztimingwidth}{-.5}%
+ \advance\pgf@x by \@tempdima
+ \advance\pgf@y by \@tempdimb
+ }%
+ \savedanchor\endpoint{%
+ \pgfpointanchor{timing/end}{center}%
+ \@tempdima=\pgf@x
+ \@tempdimb=\pgf@y
+ \pgfpointxy{-.5*\tikztimingwidth}{-.5}%
+ \advance\pgf@x by \@tempdima
+ \advance\pgf@y by \@tempdimb
+ }%
+ \anchor{center}{\pgfpointorigin}%
+ \anchor{start}{\startpoint}%
+ \anchor{end}{\endpoint}%
+ %
+ \anchor{origin}{\northeast \pgf@x=-\pgf@x \pgf@y=-\pgf@y }%
+ \anchor{east}{\northeast \pgf@y=0pt }%
+ \anchor{west}{\northeast \pgf@y=0pt \pgf@x=-\pgf@x }%
+ \anchor{north}{\northeast \pgf@x=0pt }%
+ \anchor{north west}{\northeast \pgf@x=-\pgf@x }%
+ \anchor{north east}{\northeast}
+ \anchor{high mid}{\northeast \pgf@x=0pt }%
+ \anchor{high start}{\northeast \pgf@x=-\pgf@x }%
+ \anchor{high end}{\northeast}
+ \anchor{south}{\northeast \pgf@x=0pt \pgf@y=-\pgf@y }%
+ \anchor{south west}{\northeast \pgf@x=-\pgf@x \pgf@y=-\pgf@y }%
+ \anchor{south east}{\northeast \pgf@y=-\pgf@y }%
+ \anchor{low mid}{\northeast \pgf@x=0pt \pgf@y=-\pgf@y }%
+ \anchor{low start}{\northeast \pgf@x=-\pgf@x \pgf@y=-\pgf@y }%
+ \anchor{low end}{\northeast \pgf@y=-\pgf@y }%
+ \anchor{mid}{\pgfpointorigin}%
+ \anchor{mid east}{\northeast \pgf@y=0pt }%
+ \anchor{mid west}{\northeast \pgf@y=0pt \pgf@x=-\pgf@x }%
+ \anchor{mid end}{\northeast \pgf@y=0pt }%
+ \anchor{mid start}{\northeast \pgf@y=0pt \pgf@x=-\pgf@x }%
+ \anchor{base}{\northeast \pgf@x=0pt \pgf@y=-\pgf@y }%
+ \anchor{base west}{\northeast \pgf@x=-\pgf@x \pgf@y=-\pgf@y }%
+ \anchor{base east}{\northeast \pgf@y=-\pgf@y }%
+ \anchorborder{%
+ \@tempdima=\pgf@x
+ \@tempdimb=\pgf@y
+ \pgfpointborderrectangle{\pgfpoint{\@tempdima}{\@tempdimb}}{\northeastborder}%
+ }%
+}
\def\tikztiming@iflower#1{%
\begingroup
\edef\@tempa{`#1}%
@@ -990,7 +1133,6 @@
-- ++(\gslope,-\height/2.0)
}
\tikztiminglet{DG}{LG}
-\tikztiminglet{MG}{ZG}
\tikztiminglet{HS}{S}
\tikztiminglet{LS}{S}
@@ -1006,7 +1148,7 @@
\newdraw [\style]
-- ++(\zslope,-\height/2.) -- ++($ (#1,0) - (\zslope,0) $)
}
- \tikztimingdef{ZH}{
+\tikztimingdef{ZH}{
\newdraw
-- ++(\zslope,+\height/2.) -- ++($ (#1,0) - (\zslope,0) $)
}
@@ -1070,133 +1212,46 @@
\tikztimingalias{M}{Z}
\tikztimingchar{M}{++(0,\height/2.)}{
- [\style]
- -- ++($ 1/16.*(#1,0) + (0,+\height*.225) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/16.*(#1,0) + (0,+\height*.225) $)
-}
-
-\tikztimingdef{MZ}{
- \newdraw [\style]
+ \newdraw [\style/decoration,\style]
-- ++(#1,0)
}
-
-\tikztimingdef{m}{
- [\style]
- ++(0,+\height/2.)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.225) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/4.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.225) $)
+\tikztimingdef{MG}{
+ \newdraw [timing/m]
+ -- ++(\gslope,-\height/2.0)
+ -- ++(\gslope,+\height)
+ -- ++(\gslope,-\height/2.0)
}
-\tikztimingdef{ZM}{
+\tikztimingdef{MZ}{
\newdraw [\style]
- -- ++($ 1/16.*(#1,0) + (0,+\height*.075) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.20) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.35) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.40) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/16.*(#1,0) + (0,+\height*.225) $)
+ \tikztiminguse{ZZ}{#1}
}
-\tikztimingdef{Zm}{
+\tikztimingdef{ZM}{
\newdraw [\style]
- -- ++($ 1/8.*(#1,0) + (0,+\height*.075) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.20) $)
- -- ++($ 1/4.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.175) $)
-}
-
-\tikztimingdef{Mm}{
- -- ++($ 1/8.*(#1,0) + (0,+\height*.225) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/4.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.225) $)
+ \tikztiminguse{MM}{#1}
}
\tikztimingdef{LM}{
\newdraw [\style]
- -- ++($ 1/16.*(#1,0) + (0,+\height*.60) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.20) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.35) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.40) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/16.*(#1,0) + (0,+\height*.20) $)
+ -- ++($ (1/8,0) + (0,\height/2) $)
+ \newdraw [\style/decoration,\style]
+ -- ++($ (-1/8,0) + (#1,0) $)
}
+
\tikztimingdef{HM}{
\newdraw [\style]
- -- ++($ 1/16.*(#1,0) + (0,-\height*.40) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.20) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.35) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.40) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/16.*(#1,0) + (0,+\height*.20) $)
-}
-\tikztimingdef{DM}{
- ++($ -1/16.*(#1,0) + (0,0) $)
- -- ++($ 1/16.*(#1,0) + (0,0) $)
- -- ++($ 1/16.*(#1,0) + (0,+\height*.50) $)
- ++($ -1/8.*(#1,0) + (0,+\height*.50) $)
- -- ++($ 1/16.*(#1,0) + (0,0) $)
- -- ++($ 1/16.*(#1,0) + (0,-\height*.50) $)
- \newdraw [\style]
- -- ++($ 1/8.*(#1,0) + (0,-\height*.10) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.35) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.40) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/16.*(#1,0) + (0,+\height*.20) $)
+ -- ++($ (1/8,0) + (0,-1*\height/2) $)
+ \newdraw [\style/decoration,\style]
+ -- ++($ (-1/8,0) + (#1,0) $)
}
-\tikztimingdef{Lm}{
- \newdraw [\style]
- -- ++($ 1/8.*(#1,0) + (0,+\height*.575) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.20) $)
- -- ++($ 1/4.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.175) $)
-}
-\tikztimingdef{Hm}{
- \newdraw [\style]
- -- ++($ 1/8.*(#1,0) + (0,-\height*.425) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.20) $)
- -- ++($ 1/4.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.175) $)
-}
-\tikztimingdef{Dm}{
- ++($ -1/8.*(#1,0) + (0,0) $)
- -- ++($ 1/8.*(#1,0) + (0,0) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.50) $)
- ++($ -1/4.*(#1,0) + (0,+\height*.50) $)
- -- ++($ 1/8.*(#1,0) + (0,0) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.50) $)
- \newdraw [\style]
- -- ++($ 1/4.*(#1,0) + (0,-\height*.10) $)
- -- ++($ 1/4.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.15) $)
+\tikztimingdef{DM}{
+ -- +($ (1/8,0) + (0,\height*.50) $)
+ +(0,\height)
+ -- ++($ (1/8,0) + (0,\height*.50) $)
+ \newdraw [\style/decoration,\style]
+ -- ++($ (-1/8,0) + (#1,0) $)
}
\newcounter{tikztimingtrans}
@@ -1247,7 +1302,7 @@
\tikztimingdef{ZT}{%
\newdraw
{[\style]
- node [timing/save] {\setcounter{tikztimingtrans}{-\value{tikztimingtrans}}}
+ \code{\setcounter{tikztimingtrans}{-\value{tikztimingtrans}}}
-- ++(\slope,\value{tikztimingtrans}*\height/2.)
-- ++($ (#1,0) - (\slope,0) $)
}
@@ -1290,25 +1345,9 @@
\tikztimingdef{TM}{%
\newdraw [\style]
\code{\setcounter{tikztimingtrans}{-\value{tikztimingtrans}}}
- -- ++($ 1/16.*(#1,0) + (0,\value{tikztimingtrans}*\height*.50+\height*.10) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.20) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.35) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.40) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.45) $)
- -- ++($ 1/8.*(#1,0) + (0,-\height*.45) $)
- -- ++($ 1/16.*(#1,0) + (0,+\height*.20) $)
-}
-
-\tikztimingdef{Tm}{%
- \newdraw [\style]
- \code{\setcounter{tikztimingtrans}{-\value{tikztimingtrans}}}
- -- ++($ 1/8.*(#1,0) + (0,\value{tikztimingtrans}*\height*.50+\height*.075) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.20) $)
- -- ++($ 1/4.*(#1,0) + (0,+\height*.25) $)
- -- ++($ 1/4.*(#1,0) + (0,-\height*.30) $)
- -- ++($ 1/8.*(#1,0) + (0,+\height*.175) $)
+ -- ++($ (1/8,0) + (0,\value{tikztimingtrans}*\height/2) $)
+ \newdraw [\style/decoration,\style]
+ -- ++($ (-1/8,0) + (#1,0) $)
}
\tikztimingecopy{C}{T}