Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The grind in the figure contain a grid of 2x8 squeezers (2 rows and 8 columns) and I use 4 elements.

Example

How could I tell tikz-timing to use a grid of 1x4 squeezers?

Below is an example of my code:

\documentclass{standalone}
\usepackage{tikz-timing}
\usetikztiminglibrary{nicetabs}  

\begin{document}
 \begin{tikztimingtable}
   & 4L\\ 
   & 4H\\ 
   & CCCC \\ 
   & [C]CCCC \\
   & 2{2C} \\
   \extracode
   \tablegrid[black!25]
 \end{tikztimingtable}
\end{document}
share|improve this question
    
Note that you have an error in your example. The & 12{2C} C \\ line is ignored with a warning raised. You miss a \\ in the line above. Also code lines 3-5 are not really required for this example. Example should usually be as minimal as possible. –  Martin Scharrer May 3 '12 at 18:45
    
you are right, i removed it at my new example, below edit –  Eagle May 3 '12 at 19:33
1  
Your update is a completely new question (like "How to use tikz-timing together with the external library") and has nothing to do with the grid. I suggest removing this part again and post it as a fresh question of its own. You can link back to this question if you want, but it isn't really required in this case. –  Martin Scharrer May 3 '12 at 19:40
    
ok, done. Thanks for your comments –  Eagle May 3 '12 at 21:56
add comment

1 Answer

up vote 3 down vote accepted

\tablegrid uses the grid command of TikZ, which is controlled by the step setting. There is also xstep and ystep if you want to set the grid step size different for each axis. In your case you want to set step=1. The default is step=.5.

\documentclass[border=5pt]{standalone}
\usepackage{tikz-timing}
\usetikztiminglibrary{nicetabs} 

\begin{document}
 \begin{tikztimingtable}
   & 4L\\ 
   & 4H\\ 
   & CCCC \\ 
   & [C]CCCC \\
   \extracode
   \tablegrid[black!25,step=1]
 \end{tikztimingtable}
\end{document}

Result

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.