TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to TeX and I am trying to create a document which has regular text, paragraphs etc and also a timing diagram somewhere in between. I am using the TikZ timing package.

Here is an example of what I am trying to do.

Create a section. Write some text. Add a timing diagram. End section and on to the next section.

Here is the code sample I tried.


% Defining foreground (fg) and background (bg) colors

1.  Timing diagram of SR Flip Flop
    Here is the timing diagram of SR flip flop.  

    timing/slope=0,         % no slope
    timing/coldist=2pt,     % column distance
    xscale=2.05,yscale=1.1, % scale diagrams
    semithick               % set line width
  \scriptsize clock     & 7{C}                              \\
  S                     & [fgblue] .75L h 2.25L H LLl       \\
  R                     & [fgblue]  1.8L .8H 2.2L 1.4H 0.8L \\
  Q                     &          L .8H 1.7L 1.5H LL       \\
  $\overline{\mbox{Q}}$ &          H .8L 1.7H 1.5L HH       \\
  Q                     & [fgred]  HLHHHLL                  \\
  $\overline{\mbox{Q}}$ & [fgred]  LHLLLHH                  \\
  % Draw shaded backgrounds
  \shade [right color=bgblue,left color=white]
     (7,-8.45) rectangle (-2,-4.6);
  \shade [right color=bgred,left color=white]
     (7,-12.8) rectangle (-2,-8.6);
  % Add background grid lines
    \foreach \x in {1,...,6}
      \draw (\x,1) -- (\x,-12.8);
    % similar: \vertlines{1,...,6}
  % Add labels
  \node [anchor=south east,inner sep=0pt]
    at (7,-8.45) {\tiny clocked};
  \node [anchor=south east,inner sep=0pt,fgred]
    at (7,-12.8) {\tiny positive edge triggered};

I am expecting the pdf to show the text first and then the timing diagram, but only the timing diagram is being generated.

Can somebody please help me?


share|improve this question
up vote 2 down vote accepted

Comment out


and all should be fine. The active option previews what you have typeset in your tikzpicture environment in this case. Also, consider updating your tikz-timing. AFAIK, the latest version is Version v0.7d – 2011/01/09. Here is the output when the above lines are commented out.

enter image description here

share|improve this answer

Your Answer


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.