0

When I include the package tikz on my latex header, even if the package is not used at all, I get the following error at compiling time:

Undefined control sequence.
l.1131 \pgfdeclarearrow
                   {name=|<->|,   means={>[sep=0pt].|}}

where l.1131 is line 1131 of the file "tikz.code.tex"

A minimal example for this error is the following.

\documentclass{article}
\usepackage{tikz}
\begin{document}
test
\end{document}

So could be the mistake?

verifying
  • 465
  • Try to run \documentclass{minimal} \usepackage{pgf} \begin{document} \pgfversion \end{document} and tell us what is the result, please. Since it says it is a problem in the TikZ you accidentally messed something up in the code, because for me (and for @Zarko) it works fine. – Phelype Oleinik Jan 18 '18 at 15:45
  • 1
    i can't reproduce your error. you should have something else than this example. – Zarko Jan 18 '18 at 15:45
  • @PhelypeOleinik The version is 2.10. Also, Zarko, incredibly that is the minimum example that gives a mistake. It is enough to use the command "\include{tikz}" and I get the error message, even if I don't use any tikz macro. (I'm using ubuntu 14.04) – verifying Jan 18 '18 at 21:39
  • I have a computer with Ubuntu 14.04, and the \pgfversion is also 2.10, but I can \usepackage{tikz} without any problems. So my guess is that your tikz.code.tex is somehow corrupted. Try this. I copied the code from my version of tikz.code.tex. Replace your version (make a backup first!) by this one and see what happens. You can find your tikz.code.tex in /usr/share/texmf/tex/generic/pgf/frontendlayer/tikz. – Phelype Oleinik Jan 18 '18 at 22:02
  • 1
    @PhelypeOleinik Please don't recommend the use of the minimal class. It is not suitable. Suggest article instead. (Or standalone, but that wouldn't be suitable in this case.) – cfr Jan 19 '18 at 00:08
  • 1
    @cfr Yes, I know, David Carlisle already warned me about that. I used the minimal class for this case only to find out the version of pgf, so it wouldn't be a problem. Thanks for the warning anyway :) – Phelype Oleinik Jan 19 '18 at 02:17
  • 1
    @PhelypeOleinik Ah. That may not be obvious to the OP etc., though. (You may know it is safe in this case, but minimal gets read as 'for these minimal examples everyone keeps asking me for' :-). – cfr Jan 19 '18 at 02:41
  • @cfr Good point. I, for one, thought about it that way before I was warned otherwise. I swear not to publicly use minimal ever again :) – Phelype Oleinik Jan 19 '18 at 11:56

1 Answers1

-1

Finally I got to solve this.

I uninstalled and installed texlive several times without success. Until I realized that the texmf directory was not being deleted when running

apt-get remove texlive 

The solution was to manually remove /usr/local/share/texmf

Then I simply run

apt-get install texlive-full 

and everything is compiling as it should now.

verifying
  • 465
  • If you can reproduce this, you should report it to the maintainers of the texlive package for Debian, as it would seem that they are including the tikz package, without its dependencies and that's a packaging bug. However, I wouldn't expect them to install packages under /usr/local, so this may be fallout from something you did yourself (install tikz without all the bits it needs), in which case it is obviously user error and not a bug. – cfr Jan 19 '18 at 00:11