Is there a way to make a timing gap using the tikz-timing package or tikz, like the timing gap highlighted in the picture below?
-
2Welcome to TeX.SE! Please provide us with an MWE, not just a screen shot.– user121799May 15, 2018 at 23:37
-
Just one more thing: an almost identical question (I believe) has been asked here, also without MWE. As you see, there is no answer. So, if you want to have a timely answer (and also avoid that your question is being closed), please consider posting an MWE.– user121799May 16, 2018 at 0:31
-
Yes there is a reference to an web api, with online editor to make this wavedrom, its an open source HTML5 and has the option implemented for gaps, for the tikz-timing, in a quick view I did not find something similar, only dotted separations. Maybe, if you provide the precious and required MWE, some experts can do it using their best tricks in the tikz way ...– J Leon V.May 16, 2018 at 3:35
1 Answer
(Because I was a bit bored:) Note, there are bound to be several other ways of doing the same thing, and likely better ways. I define a style for a node, and draw the gap symbol as a path picture
. The placement will depend on your diagram. In this case note the timing specification (2L N(A1) 4H N(A2) L
) includes two named nodes A1
and A2
, and the gap
node is placed using those as a reference.
\documentclass[border=5mm]{standalone}
\usepackage{tikz-timing}
\usetikzlibrary{calc}
\tikzset{
alias path picture bounding box/.code=%https://tex.stackexchange.com/q/395628
\pgfnodealias{#1}{path picture bounding box},
gap/.style={
circle,
inner sep=0pt,
minimum size=#1,
node contents={},
path picture={
\tikzset{alias path picture bounding box=@}
\fill [white] (@.265) to[out=40,in=220] (@.70) --
(@.85) to[out=220,in=40] (@.250) -- cycle;
\draw [very thin] (@.265) to[out=40,in=220] (@.70)
(@.85) to[out=220,in=40] (@.250);
}
},
gap/.default=10pt
}
\begin{document}
\begin{tikztimingtable}
foo & 2L N(A1) 4H N(A2) L\\
\extracode
\node[gap, at={($(A1|-A2)!0.5!(A2)$)}];
\end{tikztimingtable}
\end{document}
-
-
@Michael
($(a)!0.5!(b)$)
is the point halfway betweena
andb
, and(a|-b)
is the point that has the x-coordinate ofa
and the y-coordinate ofb
(tex.stackexchange.com/questions/401425). Apr 10, 2021 at 15:29 -
-
@Michael No, the dollar signs are for coordinate calculations, use just
at={(A1)}
Apr 11, 2021 at 13:57 -
Thank you. It is strange that there is no a standard way to insert a gap.– MichaelApr 12, 2021 at 0:46