15

the document listed below, (taken from here: texample.net) fails on my system (running MacTeX 2011) with the error:

Package pgfkeys Error: I do not know the key '/tikz/drop shadow' and 
I am going to ignore it. Perhaps you misspelled it.

I've checked my packages using the TeX Live Utility and they all seem to be up to date. Any ideas on what I might be doing wrong? Thanks.

The document:

\documentclass{article}

\usepackage{tikz}
\usepackage{pgf-umlsd}
\usepgflibrary{arrows} % for pgf-umlsd
\begin{document}

\begin{figure}
  \centering

  \begin{sequencediagram}
    \newthread{ss}{}{SimulationServer}
    \newinst{ctr}{}{SimControlNode}
    \newinst{ps}{}{PhysicsServer}
    \newinst[1]{sense}{}{SenseServer}

    \begin{call}{ss}{Initialize()}{sense}{}
    \end{call}
    \begin{sdloop}{Run Loop}
      \begin{call}{ss}{StartCycle()}{ctr}{}
        \begin{call}{ctr}{ActAgent()}{sense}{}
        \end{call}
      \end{call}
      \begin{call}{ss}{Update()}{ps}{}
        \begin{call}{ps}{PrePhysicsUpdate()}{sense}{state}
        \end{call}
        \begin{callself}{ps}{PhysicsUpdate()}{}
        \end{callself}
        \begin{call}{ps}{PostPhysicsUpdate()}{sense}{}
        \end{call}
      \end{call}
      \begin{call}{ss}{EndCycle()}{ctr}{}
        \begin{call}{ctr}{SenseAgent()}{sense}{}
        \end{call}
      \end{call}
    \end{sdloop}
  \end{sequencediagram}

  \caption{UML sequence diagram demo.}
\end{figure}
\end{document}

Update: I found the answer: The packages were wrong - for my system running pgf-umlsd.sty v0.5 atleast. They should have been...

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{arrows,shadows} % for pgf-umlsd
\usepackage[underline=true,rounded corners=false]{pgf-umlsd}

Additionally, the command \begin{sdloop}{Run Loop} now needs to be \begin{sdblock}{Run Loop}.

4
  • 1
    Hi Harold, Welcome to TeX.SE! It's great that you found the solution to your problem; it's preferable to post your solution as an answer rather than an update to your question as it will help future visitors to your question
    – cmhughes
    Nov 26, 2011 at 4:11
  • 1
    @mchughes...I tried that before doing the update, but I didn't have sufficient reputation score to answer my own question :( I didn't want to forget the answer, so I posted it as a comment. Nov 26, 2011 at 4:57
  • 2
    @haroldcampbell I don't remember exactly how it works, but you may be able to answer it after some time limit (maybe a day?). When you can, it would be helpful for others if you would do so. Otherwise, someone could add a community wiki answer with your answer (but then you'd not get the reputation that you deserve). Nov 26, 2011 at 6:44
  • I've voted to reopen this question: the number of upvotes on this question over time shows that multiple people have had this problem and been helped by having this question here. So it's not really “too localized” and “unlikely to help any future visitors”; having a message saying those things sends a poor message to future visitors. (I myself reached this question just now, 6+ years later, by searching for “I do not know the key '/tikz/drop shadow'”.) Feb 9, 2018 at 17:55

1 Answer 1

1

For an error message like this:

! Package pgfkeys Error: I do not know the key '/tikz/drop shadow' and I am going to ignore it. Perhaps you misspelled it.

See the pgfkeys package documentation for explanation.

the solution is to include the appropriate TikZ library, in this case

\usetikzlibrary{shadows}

In more detail, here's how you can find the solution:

  1. first open open the TikZ manual, by invoking texdoc tikz or texdoc pgfkeys or texdoc pgfmanual. You can also find it online through a CTAN mirror.

  2. Search for the key the error complained about, in this case /tikz/drop shadow. (Admittedly this can take a while in a file nearly 1200 pages long.) (You can also try the Index at the end of the manual.)

    1. Go up till you find the section it occurs in. In this case, occurs in section 66.3.1:

specific section

If you go up to 66.3 (right there) and then to 66, you'll find the library you need to include:

library

As the instructions say, you can use \usetikzlibrary{shadows} so that you no longer get the error message.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .