From 5149fd09e4686b79e89ecc9b5e8fb7b1619f39ba Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 21 Dec 2017 23:56:08 +0000 Subject: tikz-timing (21dec17) git-svn-id: svn://tug.org/texlive/trunk@46111 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/tikz-timing/tikz-timing-clockarrows.sty | 143 +++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/tikz-timing/tikz-timing-clockarrows.sty (limited to 'Master/texmf-dist/tex/latex/tikz-timing/tikz-timing-clockarrows.sty') diff --git a/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing-clockarrows.sty b/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing-clockarrows.sty new file mode 100644 index 00000000000..3b8f1370ba8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikz-timing/tikz-timing-clockarrows.sty @@ -0,0 +1,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 +%% ---------------------------------------------------------------------- +%% 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'. -- cgit v1.2.3