Question

Anyone here a guru in Tikz-timing?

I am looking for a way to label a timing diagram with annotations, but the vertical scale is too compressed. I couldn't find a comprehensive list of options for the \timing command (or if I did, it was a meager list).

My initial guesses at what they might be failed (e.g. height=), but eventually I stumbled onto an example from the document that confirmed that yscale= should work, and so it does.

Here's a code snippet to get you started:

\begin{tikzpicture}
    \timing [yscale=2.0] at (0,0)  {3H N (d7) 3L 3H N (d6) 3L 3H N (d5) 3L 3H N (d4) 3L 3H N (d3)3 L 3H N (d2) 3L 3H N (d1) 3L 3H N (d0) 3L 3H N (ack) 3L};
    \path (d7) node [below left] {D7};
    \path (d6) node [below left] {D6};
    \path (d5) node [below left] {D5};
    \path (d4) node [below left] {D4};
    \path (d3) node [below left] {D3};
    \path (d2) node [below left] {D2};
    \path (d1) node [below left] {D1};
    \path (d0) node [below left] {D0};
    \path (ack) node [below left] {ACK};
\end{tikzpicture}
Was it helpful?

Solution

I'm the author of tikz-timing. Stupid question, but did you checked the package manual?
I don't think that you will find any better list of options anywhere. Check CTAN or the package website http://latex.scharrer-online.de/tikz-timing.

If you use a recent version of tikz-timing (v0.7) you can use the 'wscale' to scale the width.
Also by adjusting the 'timing/inline node' style to 'rectangle,below left' you can add the node text directly in the timing string by changing the nodes from 'N(d7)' to 'N{d7}' etc.

\documentclass{article}
\usepackage{tikz-timing}
\begin{document}
\begin{tikzpicture}
  \timing [yscale=2.0,timing/wscale=3.0,timing/inline node/.style={rectangle,below left,font=\sffamily}] at (0,0)
  {H N {D7} L H N {D6} L H N {D5} L H N {D4} L H N {D3} L H N {D2} L H N {D1} L H N {D0} L H N[xscale=.8]{ACK} L};
\end{tikzpicture}
\end{document}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top