| 1 |
%% |
| 2 |
%% This is file `tikz-timing-nicetabs.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% tikz-timing.dtx (with options: `tikz-timing-nicetabs.sty') |
| 8 |
%% |
| 9 |
%% IMPORTANT NOTICE: |
| 10 |
%% |
| 11 |
%% For the copyright see the source file. |
| 12 |
%% |
| 13 |
%% Any modified versions of this file must be renamed |
| 14 |
%% with new filenames distinct from tikz-timing-nicetabs.sty. |
| 15 |
%% |
| 16 |
%% For distribution of the original source see the terms |
| 17 |
%% for copying and modification in the file tikz-timing.dtx. |
| 18 |
%% |
| 19 |
%% This generated file may be distributed as long as the |
| 20 |
%% original source files, as listed above, are part of the |
| 21 |
%% same distribution. (The sources need not necessarily be |
| 22 |
%% in the same archive or directory.) |
| 23 |
%% Copyright (C) 2009-2012 by Martin Scharrer <[email protected]> |
| 24 |
%% ---------------------------------------------------------------------- |
| 25 |
%% This work may be distributed and/or modified under the |
| 26 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 27 |
%% of this license or (at your option) any later version. |
| 28 |
%% The latest version of this license is in |
| 29 |
%% http://www.latex-project.org/lppl.txt |
| 30 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 31 |
%% version 2005/12/01 or later. |
| 32 |
%% |
| 33 |
%% This work has the LPPL maintenance status `maintained'. |
| 34 |
%% |
| 35 |
%% The Current Maintainer of this work is Martin Scharrer. |
| 36 |
%% |
| 37 |
%% This work consists of the files tikz-timing.dtx and tikz-timing.ins |
| 38 |
%% and the derived filebase tikz-timing*.sty. |
| 39 |
%% |
| 40 |
\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
| 41 |
\ProvidesPackage{tikz-timing-nicetabs}[% |
| 42 |
2017/12/20 |
| 43 |
v0.7f |
| 44 |
tikz-timing library for nice timing tables] |
| 45 |
\RequirePackage{array} |
| 46 |
\RequirePackage{booktabs} |
| 47 |
|
| 48 |
\newcommand*\tikztiming@nicetabs@tableheader[1][]{% |
| 49 |
\path [timing/table/midrules] [/utils/exec=\xdef\@gtempa{\the\pgflinewidth}]; |
| 50 |
\path [timing/table/header,#1] |
| 51 |
let \p1 = (0,\belowrulesep + \aboverulesep + \@gtempa |
| 52 |
+ \arraystretch\ht\strutbox + \arraystretch*\extrarowheight |
| 53 |
+ \arraystretch\dp\strutbox) |
| 54 |
in |
| 55 |
coordinate (diagram@header) at (0,\y1) |
| 56 |
coordinate (label@header) at ($ -1*(\tikztiming@coldist,0) + (0,\y1) $) |
| 57 |
; |
| 58 |
\tikztiming@normal@tableheader[#1]% |
| 59 |
} |
| 60 |
\newcommand*\tikztiming@nicetabs@tablerules[1][]{% |
| 61 |
\begin{scope}[#1] |
| 62 |
\coordinate (NW) at (current bounding box.north west); |
| 63 |
\coordinate (SE) at (current bounding box.south east); |
| 64 |
% |
| 65 |
\draw [timing/table/rules] |
| 66 |
let |
| 67 |
\p1 = (NW), |
| 68 |
\p2 = (SE), |
| 69 |
\p3 = (last label.base), |
| 70 |
\p4 = ($ (0,\y3) - (0,\arraystretch\dp\strutbox + \aboverulesep + |
| 71 |
.5\pgflinewidth) $) |
| 72 |
in |
| 73 |
(\x1-\tabcolsep,\y4) -- (\x2+\tabcolsep,\y4) |
| 74 |
\iftikztiming@tablehead |
| 75 |
let |
| 76 |
\p5 = ([email protected]), |
| 77 |
\p6 = ($ (0,\y5) + (0,\arraystretch\ht\strutbox + \arraystretch*\extrarowheight |
| 78 |
+ \belowrulesep + .5\pgflinewidth) $) |
| 79 |
in |
| 80 |
(\x1-\tabcolsep,\y6) -- (\x2+\tabcolsep,\y6) |
| 81 |
\fi |
| 82 |
; |
| 83 |
\draw |
| 84 |
\iftikztiming@tablehead [timing/table/midrules] \else [timing/table/rules] \fi |
| 85 |
let |
| 86 |
\p1 = (NW), |
| 87 |
\p2 = (SE), |
| 88 |
\p3 = (0, \arraystretch\ht\strutbox + \arraystretch*\extrarowheight + |
| 89 |
\belowrulesep + .5\pgflinewidth) |
| 90 |
in |
| 91 |
(\x1-\tabcolsep, \y3) |
| 92 |
-- |
| 93 |
(\x2+\tabcolsep, \y3) |
| 94 |
; |
| 95 |
\end{scope} |
| 96 |
} |
| 97 |
\let\tikztiming@normal@tableheader\tikztiming@tableheader |
| 98 |
\let\tikztiming@normal@tablerules\tikztiming@tablerules |
| 99 |
\let\tikztiming@normal@coldist\tikztiming@coldist |
| 100 |
\let\tikztiming@normal@rowdist\tikztiming@rowdist |
| 101 |
|
| 102 |
\tikzset{% |
| 103 |
timing/no nice tabs/.code={% |
| 104 |
\let\tikztiming@coldist\tikztiming@normal@coldist |
| 105 |
\let\tikztiming@rowdist\tikztiming@normal@rowdist |
| 106 |
\let\tikztiming@tableheader\tikztiming@normal@tableheader |
| 107 |
\let\tikztiming@tablerules\tikztiming@normal@tablerules |
| 108 |
}, |
| 109 |
timing/nice tabs/.code={% |
| 110 |
\ifx\tikztiming@tableheader\tikztiming@nicetabs@tableheader\else |
| 111 |
\let\tikztiming@normal@coldist\tikztiming@coldist |
| 112 |
\let\tikztiming@normal@rowdist\tikztiming@rowdist |
| 113 |
\fi |
| 114 |
\def\tikztiming@rowdist{% |
| 115 |
\arraystretch\ht\strutbox |
| 116 |
+\arraystretch*\extrarowheight |
| 117 |
+\arraystretch\dp\strutbox |
| 118 |
}% |
| 119 |
\def\tikztiming@coldist{2\tabcolsep}% |
| 120 |
\let\tikztiming@tableheader\tikztiming@nicetabs@tableheader |
| 121 |
\let\tikztiming@tablerules\tikztiming@nicetabs@tablerules |
| 122 |
}, |
| 123 |
timing/nicetabs/no nice tabs/.style={/tikz/timing/no nice tabs}, |
| 124 |
timing/nicetabs/off/.style={/tikz/timing/no nice tabs}, |
| 125 |
timing/nicetabs/nice tabs/.style={/tikz/timing/nice tabs}, |
| 126 |
timing/nicetabs/on/.style={/tikz/timing/nice tabs}, |
| 127 |
} |
| 128 |
\tikzset{timing/nice tabs}% |
| 129 |
\RequirePackage{pgfopts} |
| 130 |
\ProcessPgfOptions{/tikz/timing/nicetabs} |
| 131 |
\endinput |
| 132 |
%% |
| 133 |
%% End of file `tikz-timing-nicetabs.sty'. |