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.

I am trying to compile this not-too-complicated figure, but pdflatex and latex both seem to be taking forever. They have never completed successfully even after multiple attempts and waiting for upto 5 mins.

Anyone else getting this bug? Or is there something wrong with the document?

\documentclass[twocolumn]{article}
\usepackage{tikz}
\begin{document}
\begin{figure}
  \centering
  \begin{tikzpicture}
    [auto,
    block/.style
    ={rectangle, draw=blue, thick, fill=blue!20,
      text width=5em,align=center, rounded corners,
      minimum height=3em},
    line/.style
    ={draw, shorten >=2pt},
    \matrix [column sep=5mm,row sep=7mm]
    {
      % row 1
      \node [text width=4.5em,align=center,font=\large] {Geography\\Dimension}; & &
      \node [text width=4.5em,align=center,font=\large] {Time\\Dimension};\\
      % row 2
      \node [block] (country) {Country}; & &
      \node [block] (year) {Year}; \\
      % row 3
      \node [block] (state) {State}; & &
      \node [block] (month) {Month}; \\
      % row 4
      \node [block] (city) {City}; & &
      \node [block] (day) {Day};\\
    };
    \begin{scope}[every path/.style=line]
      \path
      (country)
      -- (state);
      \path 
      (state)
      -- (city);
      \path
      (year)
      -- (month);
      \path
      (month)
      -- (day);
    \end{scope}
  \end{tikzpicture}
  \caption{Dimension-levels example}
  \label{fig:dimlevels}
\end{figure}

\end{document}

The last few lines of the terminal output:

...
(/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/utilities/pgffor.c
ode.tex))
(/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/frontendlayer/tikz
/tikz.code.tex
(/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/libraries/pgflibra
ryplothandlers.code.tex)
(/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/modules/pgfmodulem
atrix.code.tex)
(/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/frontendlayer/tikz
/libraries/tikzlibrarytopaths.code.tex))) (./test2.aux)
ABD: EveryShipout initializing macros
share|improve this question

1 Answer 1

up vote 9 down vote accepted

You forgot to append a ] to your argument to the tikzpicture environment.

share|improve this answer
    
Damn! My bad. However, latex's behaviour is not nice too! –  donatello Dec 8 '10 at 17:46
    
Agreed, although it's understandable: it keeps on searching for the end of your "command". Note that the same thing will occur if you forget an ending ";" when declaring a node. –  Anthony Labarre Dec 8 '10 at 20:59

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.